mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-24 19:26:37 +00:00
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) {
|
uint32_t ESP_ResetInfoReason(void) {
|
||||||
RESET_REASON reason = rtc_get_reset_reason(0);
|
RESET_REASON reason = rtc_get_reset_reason(0);
|
||||||
if (1 == reason) { return REASON_DEFAULT_RST; } // POWERON_RESET
|
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 (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
|
return -1; //no "official error code", but should work with the current code base
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user