From e70e467e9b316e929b8b973945af733b444a39b8 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 27 Oct 2021 00:40:46 +0200 Subject: [PATCH] properly set last run time, as it apparently was missing --- esp32/src/main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/esp32/src/main.cpp b/esp32/src/main.cpp index 1ce9f03..e0729ec 100644 --- a/esp32/src/main.cpp +++ b/esp32/src/main.cpp @@ -577,6 +577,7 @@ void pumpActiveLoop() log(LOG_LEVEL_INFO, "Starting pump " + String(pumpToRun) , LOG_PUMP_STARTED_CODE ); initPumpLogic(); pumpStarted = true; + rtcLastWateringPlant[pumpToRun] = getCurrentTime(); } #ifdef FLOWMETER_PIN @@ -620,6 +621,8 @@ void pumpActiveLoop() } //disable loop, to prevent multi processing pumpStarted = false; + //if runtime is larger than cooldown, else it would run continously + rtcLastWateringPlant[pumpToRun] = getCurrentTime(); espDeepSleep(); } }