Nextion, VerifyOTA? RollBackConfig

This commit is contained in:
Mit4el
2024-09-20 12:05:34 +03:00
parent 3919e5a0ab
commit d6a24b1837
13 changed files with 386 additions and 232 deletions

View File

@@ -124,6 +124,8 @@ void setup() {
// получение chip id
setChipId();
verifyFirmware();
// синхронизация глобальных переменных с flash
globalVarsSync();
@@ -148,6 +150,14 @@ void setup() {
SerialPrint("i", "i2c", F("i2c pins overriding done"));
}
if (bootloop_panic_count >= 3)
{
resetSettingsFlashByPanic();
bootloop_panic_count = -1;
}
if (bootloop_panic_count == -1)
SerialPrint("E", "CORE", F("CONFIG and SCENARIO reset !!!"));
// настраиваем микроконтроллер
configure("/config.json");
@@ -232,6 +242,7 @@ void setup() {
Serial.println("--------test end---------");
stopErrorMarker(SETUPLAST_ERRORMARKER);
bootloop_panic_count = 0;
}
void loop() {