Fix ESP32 invalid initial NVM config count

This commit is contained in:
Theo Arends 2021-10-18 15:41:37 +02:00
parent 56df030bac
commit 097a556e99

View File

@ -685,10 +685,15 @@ void SettingsLoad(void) {
} }
} }
#endif // ESP8266 #endif // ESP8266
#ifdef ESP32 #ifdef ESP32
uint32_t source = SettingsRead(Settings, sizeof(TSettings)); uint32_t source = SettingsRead(Settings, sizeof(TSettings));
if (source) { settings_location = 1; } if (source) {
AddLog(LOG_LEVEL_NONE, PSTR(D_LOG_CONFIG "Loaded from %s, " D_COUNT " %lu"), (source)?"File":"Nvm", Settings->save_flag); settings_location = 1;
if (Settings->cfg_holder == (uint16_t)CFG_HOLDER) {
AddLog(LOG_LEVEL_NONE, PSTR(D_LOG_CONFIG "Loaded from %s, " D_COUNT " %lu"), (source)?"File":"Nvm", Settings->save_flag);
}
}
#endif // ESP32 #endif // ESP32
#ifndef FIRMWARE_MINIMAL #ifndef FIRMWARE_MINIMAL