firmware wip - WebUI tweaks

This commit is contained in:
Marcus 2024-05-03 01:25:08 +02:00
parent 67d8968d0c
commit 150a8b9b02

View file

@ -572,7 +572,7 @@ const char HTMLgauge[] PROGMEM = R"EOF(
</div>
<div class='gauge gauge--liveupdate' id='gaugeSoilmoisture' style='float:left;'>
<span class='gaugeLabel'>Moisture</span>
<span class='gaugeLabel'>Soilmoisture</span>
<div class='gauge__container'>
<div class='gauge__background'></div>
<div class='gauge__center'></div>
@ -1728,7 +1728,7 @@ String returnStrSelected(byte savedValue, byte selectId) {
if(configured == true) {
if(savedValue == selectId) {
returnStr = "selected";
returnStr = " selected ";
} else {
returnStr = "";
}
@ -2027,21 +2027,21 @@ void WEBgrowSettings() {
body += "Days of vegetation: <input type='number' name='DaysVeg' min='0' max='255' value='";
body += "Vegetation duration: <input class='inputShort' type='number' name='DaysVeg' min='0' max='255' value='";
body += DaysVeg;
body+= "' required><br>\n";
body+= "' required>Days<br>\n";
body += "Days of bloom: <input type='number' name='DaysBloom' min='0' max='255' value='";
body += "Bloom duration: <input class='inputShort' type='number' name='DaysBloom' min='0' max='255' value='";
body += DaysBloom;
body+= "' required><br>\n";
body+= "' required> Days<br>\n";
body += "Hours light on vegetation: <input type='number' name='LighthoursVeg' min='0' max='255' value='";
body += "Time LED ON vegetation: <input class='inputShort' type='number' name='LighthoursVeg' min='0' max='255' value='";
body += LighthoursVeg;
body+= "' required><br>\n";
body+= "' required> Hours<br>\n";
body += "Hours light on bloom: <input type='number' name='LighthoursBloom' min='0' max='255' value='";
body += "Time LED ON bloom: <input class='inputShort' type='number' name='LighthoursBloom' min='0' max='255' value='";
body += LighthoursBloom;
body+= "' required><br>\n";
body+= "' required> Hours<br>\n";
body += "Sunrise: <input class='inputShort' type='number' name='SunriseHour' min='0' max='23' value='";
body += SunriseHour;
@ -2051,25 +2051,25 @@ void WEBgrowSettings() {
body+= "' required><br>\n";
// SunFade bool
body += "Fade LED on Sunrise/Sunset?: <select id='SunFade' name='SunFade' required>\n";
body += "Fade in/out sunrise/sunset?: <select id='SunFade' name='SunFade' required>\n";
body += "<option value='1'" + returnStrSelected(SunFade, 1) + ">Yes</option>\n";
body += "<option value='0'" + returnStrSelected(SunFade, 0) + ">No</option>\n";
body += "</select><br>\n";
body += "Fading duration (minutes): <input type='number' name='SunFadeDuration' min='1' max='255' value='";
body += "Fade duration: <input class='inputShort' type='number' name='SunFadeDuration' min='1' max='255' value='";
body += SunFadeDuration;
body+= "' required><br>\n";
body+= "' required> Minutes<br>\n";
if(UseLEDrelais == false) {
body += "Brightness LED: <input type='range' id='PinLEDPWM' name='PinLEDPWM' min='1' max='255' value='";
body += "LED brightness: <input type='range' id='PinLEDPWM' name='PinLEDPWM' min='1' max='255' value='";
body += PinLEDPWM;
body += "'/><br>\n";
body += "'/> %<br>\n";
}
if(UseFANrelais == false) {
body += "Speed FAN: <input type='range' id='PinFANPWM' name='PinFANPWM' min='1' max='255' value='";
body += "FAN speed: <input type='range' id='PinFANPWM' name='PinFANPWM' min='1' max='255' value='";
body += PinFANPWM;
body += "'/><br>\n";
body += "'/> %<br>\n";
}
body += "<input type='submit' value='Save'>\n";
@ -2107,14 +2107,14 @@ void WEBsystemSettings() {
body += "<form method='post' action='/systemSettings/save'>\n";
// UseFan bool
body += "Use fan: <select id='UseFan' name='UseFan' required>\n";
body += "Use FAN: <select id='UseFan' name='UseFan' required>\n";
if(configured == false){body += "<option disabled value='' selected hidden>---</option>\n";}
body += "<option value='1'" + returnStrSelected(UseFan, 1) + ">Yes</option>\n";
body += "<option value='0'" + returnStrSelected(UseFan, 0) + ">No</option>\n";
body += "</select><br>\n";
// UsePump bool
body += "Use pump: <select id='UsePump' name='UsePump' required>\n";
body += "Use PUMP: <select id='UsePump' name='UsePump' required>\n";
if(configured == false){body += "<option disabled value='' selected hidden>---</option>\n";}
body += "<option value='1'" + returnStrSelected(UsePump, 1) + ">Yes</option>\n";
body += "<option value='0'" + returnStrSelected(UsePump, 0) + ">No</option>\n";
@ -2136,12 +2136,12 @@ void WEBsystemSettings() {
// TODO ugly. can this done be better?
// PumpOnTime int
body += "Pump on time: <input type='number' name='PumpOnTime' min='0' max='255' value='";
body += "PUMP ON time: <input class='inputShort' type='number' name='PumpOnTime' min='0' max='255' value='";
body += PumpOnTime;
body += "'required><br>\n";
body += "'required> Seconds<br>\n";
// MoistureSensor_Type byte
body += "Moisture sensor type: <select id='MoistureSensor_Type' name='MoistureSensor_Type' required>\n";
body += "Soilmoisture sensor: <select id='MoistureSensor_Type' name='MoistureSensor_Type' required>\n";
if(configured == false) {
body += "<option disabled value='' selected hidden>---</option>\n";
}
@ -2150,12 +2150,12 @@ void WEBsystemSettings() {
body += "</select><br>\n";
// SoilmoistureLow byte
body += "Soil moisture low: <input type='number' name='SoilmoistureLow' min='0' value='";
body += "Soilmoisture low: <input class='inputShort' type='number' name='SoilmoistureLow' min='0' value='";
body += SoilmoistureLow;
body += "' required><br>\n";
body += "' required> %<br>\n";
// TemperatureSensor_Type byte
body += "Temperature sensor type: <select id='TemperatureSensor_Type' name='TemperatureSensor_Type' required>\n";
body += "Temperature sensor: <select id='TemperatureSensor_Type' name='TemperatureSensor_Type' required>\n";
if(configured == false) {
body += "<option disabled value='' selected hidden>---</option>\n";
}
@ -2164,9 +2164,9 @@ void WEBsystemSettings() {
body += "</select><br>\n";
// NtpOffset int
body += "NTP offset: <input type='number' name='NtpOffset' min='-12' max='14' value='";
body += "NTP offset: <input class='inputShort' type='number' name='NtpOffset' min='-12' max='14' value='";
body += NtpOffset;
body+= "' required><br>\n";
body+= "' required> Hours<br>\n";
body += "<input type='submit' value='Save'>\n";
body += "</form>\n";