bootoptions: consider exception to also be reason for crash
This commit is contained in:
parent
6831dfdfca
commit
2a602225d2
@ -42,7 +42,7 @@ BootOptions::BootOptions()
|
|||||||
EEPROM.begin(sizeof(crashCount));
|
EEPROM.begin(sizeof(crashCount));
|
||||||
EEPROM.get(sizeof(HardwareConfig) + 32, crashCount);
|
EEPROM.get(sizeof(HardwareConfig) + 32, crashCount);
|
||||||
EEPROM.end();
|
EEPROM.end();
|
||||||
if (resetInfo.reason == REASON_WDT_RST) {
|
if (resetInfo.reason == REASON_WDT_RST || resetInfo.reason == REASON_EXCEPTION_RST) {
|
||||||
if (crashCount++ >= 3) {
|
if (crashCount++ >= 3) {
|
||||||
// Boot into safe mode if the watchdog reset us three times in a row.
|
// Boot into safe mode if the watchdog reset us three times in a row.
|
||||||
isSafeMode = true;
|
isSafeMode = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user