mirror of
https://github.com/airgradienthq/arduino.git
synced 2025-07-16 02:02:11 +02:00
Move rebooting process out of OtaHandler
This commit is contained in:
@ -487,10 +487,22 @@ static void displayExecuteOta(OtaState state, String msg, int processing) {
|
||||
break;
|
||||
}
|
||||
case OtaState::OTA_STATE_SUCCESS: {
|
||||
if (ag->isOne()) {
|
||||
oledDisplay.showNewFirmwareSuccess(String(processing));
|
||||
} else {
|
||||
Serial.println("Rebooting... " + String(processing));
|
||||
int i = 6;
|
||||
while(i != 0) {
|
||||
i = i - 1;
|
||||
Serial.println("OTA update performed, restarting ...");
|
||||
int i = 6;
|
||||
while (i != 0) {
|
||||
i = i - 1;
|
||||
if (ag->isOne()) {
|
||||
oledDisplay.showNewFirmwareSuccess(String(i));
|
||||
} else {
|
||||
Serial.println("Rebooting... " + String(i));
|
||||
}
|
||||
|
||||
delay(1000);
|
||||
}
|
||||
esp_restart();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user