show toast when reboot is needed, or error restart happened

less WTF, more information
This commit is contained in:
Frank
2024-10-14 11:25:41 +02:00
parent 0dd036cdce
commit 68536635d7
4 changed files with 39 additions and 1 deletions

View File

@@ -548,6 +548,9 @@ void WLED::setup()
USER_PRINTF("Core#0 %s (%d)", resetCode2Info(core0code).c_str(), core0code);
if (core1code > 0) {USER_PRINTF("; Core#1 %s (%d)", resetCode2Info(core1code).c_str(), core1code);}
USER_PRINTLN(F("."));
if ((core0code > 1) && (core0code <= 20) && (core0code != 3) && (core0code != 12) && (core0code != 14)) errorFlag = ERR_SYS_REBOOT; // abnormal reboot
if ((resetReason >= 4) && (resetReason < 10)) errorFlag = ERR_SYS_REBOOT; // abnormal reboot (crash, brownout, watchdog, etc)
if ((resetReason == ESP_RST_BROWNOUT) || (core0code == 15)) errorFlag = ERR_SYS_BROWNOUT; // brownout detected
// WLEDMM end
USER_PRINT(F("FLASH: ")); USER_PRINT((ESP.getFlashChipSize()/1024)/1024);