Remove heartbeat on pixel 9
This commit is contained in:
@@ -35,8 +35,6 @@ private:
|
|||||||
bool initialized;
|
bool initialized;
|
||||||
uint32_t activity_off_time = 0;
|
uint32_t activity_off_time = 0;
|
||||||
uint8_t saved_r = 0, saved_g = 0, saved_b = 0;
|
uint8_t saved_r = 0, saved_g = 0, saved_b = 0;
|
||||||
uint32_t heartbeat_time = 0;
|
|
||||||
uint8_t heartbeat_phase = 0;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DefaultLedStub();
|
DefaultLedStub();
|
||||||
|
|||||||
@@ -294,19 +294,4 @@ void DefaultLedStub::update() {
|
|||||||
mux_ptr->show();
|
mux_ptr->show();
|
||||||
activity_off_time = 0;
|
activity_off_time = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Heartbeat: pulse LED 9 slowly (amber)
|
|
||||||
if (now - heartbeat_time > 2000 && !activity_off_time) {
|
|
||||||
heartbeat_time = now;
|
|
||||||
heartbeat_phase = 1;
|
|
||||||
}
|
|
||||||
if (heartbeat_phase && !activity_off_time) {
|
|
||||||
uint8_t brightness = (heartbeat_phase < 100) ? (heartbeat_phase * 2) : (400 - heartbeat_phase * 2);
|
|
||||||
if (!led_states[9].active) {
|
|
||||||
mux_ptr->set_led_color(9, brightness, brightness / 4, 0);
|
|
||||||
mux_ptr->show();
|
|
||||||
}
|
|
||||||
heartbeat_phase++;
|
|
||||||
if (heartbeat_phase > 200) heartbeat_phase = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user