mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-29 13:46:37 +00:00
avoid crash during savedata when heavy load on counter
https://arduino-esp8266.readthedocs.io/en/latest/reference.html
This commit is contained in:
parent
a83be8d33d
commit
9ef95b4db5
@ -624,7 +624,7 @@ void SettingsSave(uint8_t rotate) {
|
|||||||
Settings->cfg_size = sizeof(TSettings);
|
Settings->cfg_size = sizeof(TSettings);
|
||||||
Settings->cfg_crc = GetSettingsCrc(); // Keep for backward compatibility in case of fall-back just after upgrade
|
Settings->cfg_crc = GetSettingsCrc(); // Keep for backward compatibility in case of fall-back just after upgrade
|
||||||
Settings->cfg_crc32 = GetSettingsCrc32();
|
Settings->cfg_crc32 = GetSettingsCrc32();
|
||||||
|
CounterInterruptDisable(true);
|
||||||
#ifdef ESP8266
|
#ifdef ESP8266
|
||||||
#ifdef USE_UFILESYS
|
#ifdef USE_UFILESYS
|
||||||
TfsSaveFile(TASM_FILE_SETTINGS, (const uint8_t*)Settings, sizeof(TSettings));
|
TfsSaveFile(TASM_FILE_SETTINGS, (const uint8_t*)Settings, sizeof(TSettings));
|
||||||
@ -650,6 +650,7 @@ void SettingsSave(uint8_t rotate) {
|
|||||||
}
|
}
|
||||||
#endif // FIRMWARE_MINIMAL
|
#endif // FIRMWARE_MINIMAL
|
||||||
RtcSettingsSave();
|
RtcSettingsSave();
|
||||||
|
CounterInterruptDisable(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsLoad(void) {
|
void SettingsLoad(void) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user