firmware wip - add basic manual pump on POST
This commit is contained in:
parent
54fec62a3e
commit
a51cd81651
2 changed files with 8 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
||||||
/* CanGrow_Version.h gets generated from cangrow.sh */
|
/* CanGrow_Version.h gets generated from cangrow.sh */
|
||||||
|
|
||||||
const char* CanGrowVer = "0.1-dev";
|
const char* CanGrowVer = "0.1-dev";
|
||||||
const char* CanGrowBuild = "e1fcb09-20240616201039";
|
const char* CanGrowBuild = "54fec62-20240616204659";
|
||||||
|
|
||||||
|
|
|
@ -1022,6 +1022,12 @@ void POSTsetOutput() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void POSTsetPumpManual() {
|
||||||
|
PumpOnManual = webserver.arg("PumpOnManual").toInt();
|
||||||
|
webserver.sendHeader("Location", String("/?success"), true);
|
||||||
|
webserver.send(302, "text/plain", "switch: success!\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* API section
|
* API section
|
||||||
|
@ -1179,6 +1185,7 @@ void WebHandler() {
|
||||||
|
|
||||||
// switching MOSFETs
|
// switching MOSFETs
|
||||||
webserver.on("/switch", HTTP_POST, POSTsetOutput);
|
webserver.on("/switch", HTTP_POST, POSTsetOutput);
|
||||||
|
webserver.on("/pumpManual", HTTP_POST, POSTsetPumpManual);
|
||||||
|
|
||||||
// api stuff
|
// api stuff
|
||||||
webserver.on("/api/sensors", HTTP_GET, APIgetSensors);
|
webserver.on("/api/sensors", HTTP_GET, APIgetSensors);
|
||||||
|
|
Loading…
Reference in a new issue