mirror of https://github.com/arendst/Tasmota.git
Fix PowerOnState on ESP32 (#20144)
This commit is contained in:
parent
050fdbf5de
commit
28c8f8cf47
|
@ -433,9 +433,9 @@ String ESP_getResetReason(void) {
|
|||
uint32_t ESP_ResetInfoReason(void) {
|
||||
RESET_REASON reason = rtc_get_reset_reason(0);
|
||||
if (1 == reason) { return REASON_DEFAULT_RST; } // POWERON_RESET
|
||||
if (12 == reason) { return REASON_SOFT_RESTART; } // SW_CPU_RESET / RTC_SW_CPU_RESET
|
||||
if ((3 == reason) || (12 == reason)) { return REASON_SOFT_RESTART; } // SW_RESET / RTC_SW_SYS_RESET and SW_CPU_RESET / RTC_SW_CPU_RESET
|
||||
if (5 == reason) { return REASON_DEEP_SLEEP_AWAKE; } // DEEPSLEEP_RESET
|
||||
if (3 == reason) { return REASON_EXT_SYS_RST; } // SW_RESET / RTC_SW_SYS_RESET
|
||||
// if (3 == reason) { return REASON_EXT_SYS_RST; } // SW_RESET / RTC_SW_SYS_RESET
|
||||
return -1; //no "official error code", but should work with the current code base
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue