From 2a602225d2951b1568499bf14d1ccfa94da65093 Mon Sep 17 00:00:00 2001 From: Torrie Fischer Date: Sat, 18 Feb 2023 15:40:03 +0100 Subject: [PATCH] bootoptions: consider exception to also be reason for crash --- src/BootOptions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BootOptions.cpp b/src/BootOptions.cpp index 5361c57..70f11ba 100644 --- a/src/BootOptions.cpp +++ b/src/BootOptions.cpp @@ -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;