more teardown on deep sleep (Mirror #2060)

This commit is contained in:
jpirnay
2026-05-19 19:51:49 +02:00
parent c55a36c702
commit 7c1ffdb860
2 changed files with 15 additions and 2 deletions
+7 -1
View File
@@ -14,6 +14,7 @@
#include <I18n.h>
#include <Logging.h>
#include <SPI.h>
#include <WiFi.h>
#include <builtinFonts/all.h>
#include <esp_ota_ops.h>
@@ -165,7 +166,12 @@ void enterDeepSleep() {
APP_STATE.readerActivityLoadCount = 0;
}
APP_STATE.saveToFile();
// Tear down WiFi so the modem power domain isn't held alive across deep sleep.
// Wake from deep sleep is effectively a chip reset, so no state needs to survive.
if (WiFi.getMode() != WIFI_MODE_NULL) {
WiFi.disconnect(true);
WiFi.mode(WIFI_OFF);
}
activityManager.goToSleep();
halTiltSensor.deepSleep();