From 80ce95d5d60d157127a5868a38d1babd3eb86e51 Mon Sep 17 00:00:00 2001 From: c3ma Date: Fri, 23 Oct 2020 16:32:05 +0200 Subject: [PATCH] More debug output --- esp32/src/main.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/esp32/src/main.cpp b/esp32/src/main.cpp index 6b19fcc..7d4513f 100644 --- a/esp32/src/main.cpp +++ b/esp32/src/main.cpp @@ -379,10 +379,12 @@ void onHomieEvent(const HomieEvent& event) { break; case HomieEventType::OTA_STARTED: digitalWrite(OUTPUT_SENSOR, HIGH); + digitalWrite(OUTPUT_PUMP, LOW); mode3Active=true; break; case HomieEventType::OTA_SUCCESSFUL: digitalWrite(OUTPUT_SENSOR, LOW); + digitalWrite(OUTPUT_PUMP, LOW); break; default: break; @@ -399,9 +401,9 @@ int determineNextPump(){ long sinceLastActivation = getCurrentTime()-lastActivation; //this pump is in cooldown skip it and disable low power mode trigger for it if(mPlants[i].isInCooldown(sinceLastActivation) ){ - Serial.println("Skipping due to cooldown"); - //setMoistureTrigger(i, DEACTIVATED_PLANT); - //continue; + Serial.printf("%d Skipping due to cooldown\r\n", i); + setMoistureTrigger(i, DEACTIVATED_PLANT); + continue; } //skip as it is not low light if(!isLowLight && mPlants[i].isAllowedOnlyAtLowLight()){ @@ -410,7 +412,7 @@ int determineNextPump(){ } if(mPlants->isPumpRequired()){ - Serial.println("Requested pumpin"); + Serial.printf("%d Requested pumping\r\n", i); return i; } Serial.println("No pump required");