firmware - fix set PumpLastOn when activating manually, add stop button for pump in maint

This commit is contained in:
DeltaLima 2024-12-12 03:37:05 +01:00
parent ce7f2b6ec4
commit c80ac2e6f6
2 changed files with 10 additions and 4 deletions

View file

@ -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;

View file

@ -239,6 +239,12 @@ void SysMaintenance() {
} else {
body += "<div class='warnmsg'>&#x1F4A7; Cannot activate, <i>Pump mode</i> is set to <i>Off</i> in &#128262; Grow settings</div>";
}
} else if(webserver.hasArg("PumpOffManual")) {
// stooop
setOutput(3, 0);
PumpOnManual = false;
PumpOnTimePassed = 0;
body += "<div class='infomsg'>&#x1F4A7; Pump manual stopped</div>";
}
@ -247,9 +253,8 @@ void SysMaintenance() {
body += "Dimm LED <a class='button' href='/system/maintenance?DimmOn=1'>&#x26C5; On</a>&nbsp;&nbsp;<a class='button' href='/system/maintenance?DimmOff=1'>&#x23F9;&#xFE0F; Off</a><br><br><br>";
body += "Pump manual <a class='button' href='/system/maintenance?PumpOnManual=1'>&#x1F4A7; Activate for ";
body += PumpOnTime;
body += "s</a><br>";
body += "s</a>&nbsp;&nbsp;";
body += "<a class='button' href='/system/maintenance?PumpOffManual=1'>&#x1F6D1; Stop manual</a><br>";
body += FPSTR(HTMLfooter);