mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +03:00
restart after 1.9.x migration
This commit is contained in:
@@ -31,6 +31,12 @@ class FSPersistence {
|
|||||||
DeserializationError error = deserializeJson(jsonDocument, settingsFile);
|
DeserializationError error = deserializeJson(jsonDocument, settingsFile);
|
||||||
if (error == DeserializationError::Ok && jsonDocument.is<JsonObject>()) {
|
if (error == DeserializationError::Ok && jsonDocument.is<JsonObject>()) {
|
||||||
JsonObject jsonObject = jsonDocument.as<JsonObject>();
|
JsonObject jsonObject = jsonDocument.as<JsonObject>();
|
||||||
|
|
||||||
|
// debug added by Proddy
|
||||||
|
// Serial.printf("Read File: %s: ", _filePath);
|
||||||
|
// serializeJson(jsonDocument, Serial);
|
||||||
|
// Serial.println();
|
||||||
|
|
||||||
_statefulService->updateWithoutPropagation(jsonObject, _stateUpdater);
|
_statefulService->updateWithoutPropagation(jsonObject, _stateUpdater);
|
||||||
settingsFile.close();
|
settingsFile.close();
|
||||||
return;
|
return;
|
||||||
@@ -57,6 +63,7 @@ class FSPersistence {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// debug added by Proddy
|
||||||
// Serial.printf("Write File: %s: ", _filePath);
|
// Serial.printf("Write File: %s: ", _filePath);
|
||||||
// serializeJson(jsonDocument, Serial);
|
// serializeJson(jsonDocument, Serial);
|
||||||
// Serial.println();
|
// Serial.println();
|
||||||
|
|||||||
@@ -717,7 +717,9 @@ bool System::check_upgrade() {
|
|||||||
},
|
},
|
||||||
"local");
|
"local");
|
||||||
|
|
||||||
|
Serial.println(F("Restarting..."));
|
||||||
Serial.end();
|
Serial.end();
|
||||||
|
restart(); // force a restart, nice and tidy
|
||||||
return true;
|
return true;
|
||||||
#else
|
#else
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user