Merge branch 'master' into develop

This commit is contained in:
Ben Meadors
2026-05-11 08:09:10 -05:00
27 changed files with 3089 additions and 15 deletions
+18 -3
View File
@@ -95,8 +95,23 @@ int32_t StatusLEDModule::runOnce()
}
}
}
if (power_state != charging && power_state != charged && !doing_fast_blink) {
// If we want a LED to be dedicated to the simple hearbeat, we can use that instead of the charge LED
#if defined(LED_HEARTBEAT)
if (power_state != charging && power_state != charged && !doing_fast_blink && !config.device.led_heartbeat_disabled) {
if (HEARTBEAT_LED_state == LED_STATE_ON) {
HEARTBEAT_LED_state = LED_STATE_OFF;
my_interval = 999;
} else {
HEARTBEAT_LED_state = LED_STATE_ON;
my_interval = 1;
}
digitalWrite(LED_HEARTBEAT, HEARTBEAT_LED_state);
} else {
HEARTBEAT_LED_state = LED_STATE_OFF;
digitalWrite(LED_HEARTBEAT, HEARTBEAT_LED_state);
}
#else
if (power_state != charging && power_state != charged && !doing_fast_blink && !config.device.led_heartbeat_disabled) {
if (CHARGE_LED_state == LED_STATE_ON) {
CHARGE_LED_state = LED_STATE_OFF;
my_interval = 999;
@@ -105,7 +120,7 @@ int32_t StatusLEDModule::runOnce()
my_interval = 1;
}
}
#endif
if (!config.bluetooth.enabled || PAIRING_LED_starttime + 30 * 1000 < millis() || doing_fast_blink) {
PAIRING_LED_state = LED_STATE_OFF;
} else if (ble_state == unpaired) {
+3
View File
@@ -43,6 +43,9 @@ class StatusLEDModule : private concurrency::OSThread
private:
bool CHARGE_LED_state = LED_STATE_OFF;
bool PAIRING_LED_state = LED_STATE_OFF;
#if defined(LED_HEARTBEAT)
bool HEARTBEAT_LED_state = LED_STATE_OFF;
#endif
uint32_t PAIRING_LED_starttime = 0;
uint32_t lastUserbuttonTime = 0;