More debug output

This commit is contained in:
c3ma 2020-10-23 16:32:05 +02:00
parent 3e3eaa96e4
commit 80ce95d5d6

View File

@ -379,10 +379,12 @@ void onHomieEvent(const HomieEvent& event) {
break; break;
case HomieEventType::OTA_STARTED: case HomieEventType::OTA_STARTED:
digitalWrite(OUTPUT_SENSOR, HIGH); digitalWrite(OUTPUT_SENSOR, HIGH);
digitalWrite(OUTPUT_PUMP, LOW);
mode3Active=true; mode3Active=true;
break; break;
case HomieEventType::OTA_SUCCESSFUL: case HomieEventType::OTA_SUCCESSFUL:
digitalWrite(OUTPUT_SENSOR, LOW); digitalWrite(OUTPUT_SENSOR, LOW);
digitalWrite(OUTPUT_PUMP, LOW);
break; break;
default: default:
break; break;
@ -399,9 +401,9 @@ int determineNextPump(){
long sinceLastActivation = getCurrentTime()-lastActivation; long sinceLastActivation = getCurrentTime()-lastActivation;
//this pump is in cooldown skip it and disable low power mode trigger for it //this pump is in cooldown skip it and disable low power mode trigger for it
if(mPlants[i].isInCooldown(sinceLastActivation) ){ if(mPlants[i].isInCooldown(sinceLastActivation) ){
Serial.println("Skipping due to cooldown"); Serial.printf("%d Skipping due to cooldown\r\n", i);
//setMoistureTrigger(i, DEACTIVATED_PLANT); setMoistureTrigger(i, DEACTIVATED_PLANT);
//continue; continue;
} }
//skip as it is not low light //skip as it is not low light
if(!isLowLight && mPlants[i].isAllowedOnlyAtLowLight()){ if(!isLowLight && mPlants[i].isAllowedOnlyAtLowLight()){
@ -410,7 +412,7 @@ int determineNextPump(){
} }
if(mPlants->isPumpRequired()){ if(mPlants->isPumpRequired()){
Serial.println("Requested pumpin"); Serial.printf("%d Requested pumping\r\n", i);
return i; return i;
} }
Serial.println("No pump required"); Serial.println("No pump required");