From 0badbeffd84d17685a4bd537cdc228949366e657 Mon Sep 17 00:00:00 2001 From: cyberman54 Date: Thu, 25 Mar 2021 11:34:16 +0100 Subject: [PATCH] don't count sleep wakeups as restarts --- src/reset.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/reset.cpp b/src/reset.cpp index 350e33cb..3b58f9ed 100644 --- a/src/reset.cpp +++ b/src/reset.cpp @@ -56,6 +56,7 @@ void do_after_reset(void) { case SW_CPU_RESET: // 0x0c Software reset CPU // keep previous set runmode (update / normal / maintenance) + RTC_restarts++; break; case DEEPSLEEP_RESET: // 0x05 Deep Sleep reset digital core @@ -84,10 +85,10 @@ void do_after_reset(void) { case RTCWDT_RTC_RESET: // 0x10 RTC Watch dog reset digital core and rtc mode default: RTC_runmode = RUNMODE_POWERCYCLE; + RTC_restarts++; break; } - RTC_restarts++; ESP_LOGI(TAG, "Starting Software v%s (runmode=%d / restarts=%d)", PROGVERSION, RTC_runmode, RTC_restarts); }