firmware - fix set PumpLastOn when activating manually, add stop button for pump in maint
This commit is contained in:
parent
ce7f2b6ec4
commit
c80ac2e6f6
2 changed files with 10 additions and 4 deletions
|
@ -736,6 +736,7 @@ void controlPUMP() {
|
||||||
PumpOnManual = false;
|
PumpOnManual = false;
|
||||||
setOutput(3, 0);
|
setOutput(3, 0);
|
||||||
//digitalWrite(PinPUMP, LOW);
|
//digitalWrite(PinPUMP, LOW);
|
||||||
|
PumpLastOn = timeClient.getEpochTime();
|
||||||
EEPROM.put(237, PumpLastOn);
|
EEPROM.put(237, PumpLastOn);
|
||||||
EEPROM.commit(); //write to EEPROM
|
EEPROM.commit(); //write to EEPROM
|
||||||
PumpOnTimePassed = 0;
|
PumpOnTimePassed = 0;
|
||||||
|
|
|
@ -239,6 +239,12 @@ void SysMaintenance() {
|
||||||
} else {
|
} else {
|
||||||
body += "<div class='warnmsg'>💧 Cannot activate, <i>Pump mode</i> is set to <i>Off</i> in 🔆 Grow settings</div>";
|
body += "<div class='warnmsg'>💧 Cannot activate, <i>Pump mode</i> is set to <i>Off</i> in 🔆 Grow settings</div>";
|
||||||
}
|
}
|
||||||
|
} else if(webserver.hasArg("PumpOffManual")) {
|
||||||
|
// stooop
|
||||||
|
setOutput(3, 0);
|
||||||
|
PumpOnManual = false;
|
||||||
|
PumpOnTimePassed = 0;
|
||||||
|
body += "<div class='infomsg'>💧 Pump manual stopped</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -247,11 +253,10 @@ void SysMaintenance() {
|
||||||
body += "Dimm LED <a class='button' href='/system/maintenance?DimmOn=1'>⛅ On</a> <a class='button' href='/system/maintenance?DimmOff=1'>⏹️ Off</a><br><br><br>";
|
body += "Dimm LED <a class='button' href='/system/maintenance?DimmOn=1'>⛅ On</a> <a class='button' href='/system/maintenance?DimmOff=1'>⏹️ Off</a><br><br><br>";
|
||||||
body += "Pump manual <a class='button' href='/system/maintenance?PumpOnManual=1'>💧 Activate for ";
|
body += "Pump manual <a class='button' href='/system/maintenance?PumpOnManual=1'>💧 Activate for ";
|
||||||
body += PumpOnTime;
|
body += PumpOnTime;
|
||||||
body += "s</a><br>";
|
body += "s</a> ";
|
||||||
|
body += "<a class='button' href='/system/maintenance?PumpOffManual=1'>🛑 Stop manual</a><br>";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body += FPSTR(HTMLfooter);
|
body += FPSTR(HTMLfooter);
|
||||||
webserver.send(200, "text/html", body);
|
webserver.send(200, "text/html", body);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue