From c80ac2e6f6a89682c4d4e0d4aac18dc36031a27c Mon Sep 17 00:00:00 2001 From: DeltaLima Date: Thu, 12 Dec 2024 03:37:05 +0100 Subject: [PATCH] firmware - fix set PumpLastOn when activating manually, add stop button for pump in maint --- Arduino/CanGrow/CanGrow_SysFunctions.h | 1 + Arduino/CanGrow/CanGrow_WebFunctions.h | 13 +++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Arduino/CanGrow/CanGrow_SysFunctions.h b/Arduino/CanGrow/CanGrow_SysFunctions.h index 4c3f5a5..a7a2776 100644 --- a/Arduino/CanGrow/CanGrow_SysFunctions.h +++ b/Arduino/CanGrow/CanGrow_SysFunctions.h @@ -736,6 +736,7 @@ void controlPUMP() { PumpOnManual = false; setOutput(3, 0); //digitalWrite(PinPUMP, LOW); + PumpLastOn = timeClient.getEpochTime(); EEPROM.put(237, PumpLastOn); EEPROM.commit(); //write to EEPROM PumpOnTimePassed = 0; diff --git a/Arduino/CanGrow/CanGrow_WebFunctions.h b/Arduino/CanGrow/CanGrow_WebFunctions.h index e7a05ef..7599a35 100644 --- a/Arduino/CanGrow/CanGrow_WebFunctions.h +++ b/Arduino/CanGrow/CanGrow_WebFunctions.h @@ -239,6 +239,12 @@ void SysMaintenance() { } else { body += "
💧 Cannot activate, Pump mode is set to Off in 🔆 Grow settings
"; } + } else if(webserver.hasArg("PumpOffManual")) { + // stooop + setOutput(3, 0); + PumpOnManual = false; + PumpOnTimePassed = 0; + body += "
💧 Pump manual stopped
"; } @@ -247,11 +253,10 @@ void SysMaintenance() { body += "Dimm LED ⛅ On  ⏹️ Off


"; body += "Pump manual 💧 Activate for "; body += PumpOnTime; - body += "s
"; - - - + body += "s  "; + body += "🛑 Stop manual
"; + body += FPSTR(HTMLfooter); webserver.send(200, "text/html", body); }