Fix problem of config loss

Sometimes the deepsleep loop is too fast and causes a config reset. Fixed
This commit is contained in:
stefanbode 2020-12-27 10:51:29 +01:00 committed by GitHub
parent 90ad1666e0
commit 01ad0510a1
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