bootoptions: consider exception to also be reason for crash

This commit is contained in:
Torrie Fischer 2023-02-18 15:40:03 +01:00
parent 6831dfdfca
commit 2a602225d2

View File

@ -42,7 +42,7 @@ BootOptions::BootOptions()
EEPROM.begin(sizeof(crashCount));
EEPROM.get(sizeof(HardwareConfig) + 32, crashCount);
EEPROM.end();
if (resetInfo.reason == REASON_WDT_RST) {
if (resetInfo.reason == REASON_WDT_RST || resetInfo.reason == REASON_EXCEPTION_RST) {
if (crashCount++ >= 3) {
// Boot into safe mode if the watchdog reset us three times in a row.
isSafeMode = true;