firmware wip

This commit is contained in:
Marcus 2024-04-17 22:23:40 +02:00
parent f52941b1b3
commit 5f3294c56f

View file

@ -227,6 +227,10 @@ const char HTMLheader[] PROGMEM = R"EOF(
background: #aa4204; background: #aa4204;
} }
.inputShort {
width: 42px;
}
/* from https://gist.github.com/iamhelenliu/5755179 - thank you! */ /* from https://gist.github.com/iamhelenliu/5755179 - thank you! */
.nav { .nav {
background: #333; background: #333;
@ -716,7 +720,7 @@ bool loadEEPROM() {
// size is 32 byte // size is 32 byte
EEPROM.get(170, GrowName); EEPROM.get(170, GrowName);
if(strlen(GrowName) < 1) { if(strlen(GrowName) > 0) {
// size is 4 byte // size is 4 byte
EEPROM.get(202, GrowStart); EEPROM.get(202, GrowStart);
// size is 1 byte // size is 1 byte
@ -1305,7 +1309,7 @@ void WEBsystemSettings() {
// TODO ugly. can this done be better? // TODO ugly. can this done be better?
// PumpOnTime int // PumpOnTime int
body += "Pump on time: <input type='number' name='PumpOnTime' value='"; body += "Pump on time: <input type='number' name='PumpOnTime' min='0' value='";
body += PumpOnTime; body += PumpOnTime;
body += "'required><br>\n"; body += "'required><br>\n";
@ -1319,12 +1323,12 @@ void WEBsystemSettings() {
body += "</select><br>\n"; body += "</select><br>\n";
// SoilmoistureLow byte // SoilmoistureLow byte
body += "Soil moisture low: <input type='number' name='SoilmoistureLow' value='"; body += "Soil moisture low: <input type='number' name='SoilmoistureLow' min='0' value='";
body += SoilmoistureLow; body += SoilmoistureLow;
body += "' required><br>\n"; body += "' required><br>\n";
// ntpOffset int // ntpOffset int
body += "NTP offset: <input type='number' name='ntpOffset' value='"; body += "NTP offset: <input type='number' name='ntpOffset' min='0' value='";
body += ntpOffset; body += ntpOffset;
body+= "' required><br>\n"; body+= "' required><br>\n";
@ -1383,26 +1387,26 @@ void WEBgrowSettings() {
body += "Days of vegetation: <input type='number' name='DaysVeg' value='"; body += "Days of vegetation: <input type='number' name='DaysVeg' min='0' max='255' value='";
body += DaysVeg; body += DaysVeg;
body+= "' required><br>\n"; body+= "' required><br>\n";
body += "Days of bloom: <input type='number' name='DaysBloom' value='"; body += "Days of bloom: <input type='number' name='DaysBloom' min='0' max='255' value='";
body += DaysBloom; body += DaysBloom;
body+= "' required><br>\n"; body+= "' required><br>\n";
body += "Hours light on vegetation: <input type='number' name='LighthoursVeg' value='"; body += "Hours light on vegetation: <input type='number' name='LighthoursVeg' min='0' max='255' value='";
body += LighthoursVeg; body += LighthoursVeg;
body+= "' required><br>\n"; body+= "' required><br>\n";
body += "Hours light on bloom: <input type='number' name='LighthoursBloom' value='"; body += "Hours light on bloom: <input type='number' name='LighthoursBloom' min='0' max='255' value='";
body += LighthoursBloom; body += LighthoursBloom;
body+= "' required><br>\n"; body+= "' required><br>\n";
body += "Sunrise: <input type='number' name='SunriseHour' value='"; body += "Sunrise: <input class='inputShort' type='number' name='SunriseHour' min='0' max='23' value='";
body += SunriseHour; body += SunriseHour;
body+= "' required>\n"; body+= "' required>\n";
body += " : <input type='number' name='SunriseMinute' value='"; body += " <b>:</b> <input class='inputShort' type='number' name='SunriseMinute' min='0' max='59' value='";
body += SunriseMinute; body += SunriseMinute;
body+= "' required><br>\n"; body+= "' required><br>\n";