From 2a9f9e97a9162f17a610c5dd9872a9a6b3b31196 Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Sun, 20 Jul 2025 15:31:59 -0500 Subject: [PATCH] Don't double save nodeDB on shutdown --- src/Power.cpp | 2 +- src/shutdown.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Power.cpp b/src/Power.cpp index 8ff2cb48a..b9cb960ba 100644 --- a/src/Power.cpp +++ b/src/Power.cpp @@ -700,7 +700,7 @@ void Power::shutdown() #ifdef PIN_LED3 ledOff(PIN_LED3); #endif - doDeepSleep(DELAY_FOREVER, false, false); + doDeepSleep(DELAY_FOREVER, false, true); #elif defined(ARCH_PORTDUINO) exit(EXIT_SUCCESS); #else diff --git a/src/shutdown.h b/src/shutdown.h index 46148599e..973e388b1 100644 --- a/src/shutdown.h +++ b/src/shutdown.h @@ -41,6 +41,7 @@ void powerCommandsCheck() } if (shutdownAtMsec && millis() > shutdownAtMsec) { + shutdownAtMsec = 0; power->shutdown(); } } \ No newline at end of file