watchdog timer
This commit is contained in:
parent
87f0ee073b
commit
ca0ee31e95
|
@ -28,6 +28,15 @@ void ESPMegaRecovery::loop() {
|
||||||
delay(1000);
|
delay(1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Watchdog timer
|
||||||
|
static bool booted = false;
|
||||||
|
static uint32_t boot_time = millis();
|
||||||
|
if(!booted) {
|
||||||
|
if(millis() - boot_time > RECOVERY_WATCHDOG_TIMEOUT * 1000) {
|
||||||
|
this->resetBootloopCounter();
|
||||||
|
booted = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
void ESPMegaRecovery::enterRecoveryMode() {
|
void ESPMegaRecovery::enterRecoveryMode() {
|
||||||
// Set the recovery mode flag
|
// Set the recovery mode flag
|
||||||
|
|
Loading…
Reference in New Issue