properly set last run time, as it apparently was missing

This commit is contained in:
Your Name 2021-10-27 00:40:46 +02:00
parent 6a97215a04
commit e70e467e9b

View File

@ -577,6 +577,7 @@ void pumpActiveLoop()
log(LOG_LEVEL_INFO, "Starting pump " + String(pumpToRun) , LOG_PUMP_STARTED_CODE ); log(LOG_LEVEL_INFO, "Starting pump " + String(pumpToRun) , LOG_PUMP_STARTED_CODE );
initPumpLogic(); initPumpLogic();
pumpStarted = true; pumpStarted = true;
rtcLastWateringPlant[pumpToRun] = getCurrentTime();
} }
#ifdef FLOWMETER_PIN #ifdef FLOWMETER_PIN
@ -620,6 +621,8 @@ void pumpActiveLoop()
} }
//disable loop, to prevent multi processing //disable loop, to prevent multi processing
pumpStarted = false; pumpStarted = false;
//if runtime is larger than cooldown, else it would run continously
rtcLastWateringPlant[pumpToRun] = getCurrentTime();
espDeepSleep(); espDeepSleep();
} }
} }