Merge pull request #10270 from stefanbode/patch-9

Fix problem of config loss if deepsleep loop is less than 10seconds
This commit is contained in:
Theo Arends 2020-12-27 14:15:17 +01:00 committed by GitHub
commit 5106556f0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -142,6 +142,7 @@ void DeepSleepStart(void)
WifiShutdown();
RtcSettings.ultradeepsleep = RtcSettings.nextwakeup - UtcTime();
RtcSettingsSave();
RtcRebootReset();
#ifdef ESP8266
ESP.deepSleep(100 * RtcSettings.deepsleep_slip * deepsleep_sleeptime);
#endif // ESP8266