mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-02 19:02:00 +00:00
Off LED before powering off for repeater
This commit is contained in:
@@ -140,8 +140,10 @@ void UITask::loop() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (_powering_off_at > 0) { // power off timer armed
|
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
|
digitalWrite(LED_PIN, LED_STATE_ON); // switch on the led until poweroff
|
||||||
|
delay(1000);
|
||||||
|
digitalWrite(LED_PIN, !LED_STATE_ON); // off LED
|
||||||
#endif
|
#endif
|
||||||
if (millis() > _powering_off_at) {
|
if (millis() > _powering_off_at) {
|
||||||
_board->powerOff(); // should not return
|
_board->powerOff(); // should not return
|
||||||
|
|||||||
Reference in New Issue
Block a user