Merge pull request #3449 from IoTThinks/MCdev-KeepLEDOffBeforePowerOff-20260919
Off LED before powering off for repeaters
This commit is contained in:
1 file changed
+3
-1
@@ -140,8 +140,10 @@ void UITask::loop() {
|
||||
}
|
||||
|
||||
if (_powering_off_at > 0) { // power off timer armed
|
||||
#ifdef LED_PIN
|
||||
#if defined(LED_PIN) && defined(LED_STATE_ON)
|
||||
digitalWrite(LED_PIN, LED_STATE_ON); // switch on the led until poweroff
|
||||
delay(1000);
|
||||
digitalWrite(LED_PIN, !LED_STATE_ON); // off LED
|
||||
#endif
|
||||
if (millis() > _powering_off_at) {
|
||||
_board->powerOff(); // should not return
|
||||
|
||||
Reference in new issue
Block a user