firmware - cosmetic changes

This commit is contained in:
DeltaLima 2024-12-11 02:31:26 +01:00
parent c81e68b3e4
commit a4c0d060e1
5 changed files with 56 additions and 39 deletions

View file

@ -485,7 +485,7 @@ const char HTMLgauge[] PROGMEM = R"EOF(
</div> </div>
<div class='gauge gauge--liveupdate spacer' id='gaugeHumidity' style='float:left; margin-right: 10px;'> <div class='gauge gauge--liveupdate spacer' id='gaugeHumidity' style='float:left; margin-right: 10px;'>
<div class='gaugeLabel'>&#x1F343; Humidity</div> <div class='gaugeLabel'>&#x2601;&#xFE0F; Humidity</div>
<div class='gauge__container'> <div class='gauge__container'>
<div class='gauge__background'></div> <div class='gauge__background'></div>
<div class='gauge__center'></div> <div class='gauge__center'></div>

View file

@ -37,6 +37,9 @@ byte ScreenIterationPassed = 0;
// VPD value - https://www.grower.ch/forum/threads/diy-grow-controller-cangrow-projektvorstellung.163654/page-4#post-4294197 // VPD value - https://www.grower.ch/forum/threads/diy-grow-controller-cangrow-projektvorstellung.163654/page-4#post-4294197
float valVPD; float valVPD;
// DayNight -
// true Day , false night
bool DayNight;
bool MaintenanceMode = false; bool MaintenanceMode = false;
unsigned long MaintenanceStarted = 0; unsigned long MaintenanceStarted = 0;

View file

@ -551,10 +551,15 @@ void controlLED() {
setOutput(1, PinLEDPWM); setOutput(1, PinLEDPWM);
} }
// its daytime
DayNight = true;
} else { } else {
//Serial.println("good night time"); //Serial.println("good night time");
// turn off // turn off
setOutput(1, 0); setOutput(1, 0);
// nighttime
DayNight = false;
} }
} }

View file

@ -363,10 +363,15 @@ void WEBroot() {
body += "'></a>\n<br>\n"; body += "'></a>\n<br>\n";
} }
body += "<b>Grow started:</b> "; body += "<b>Grow started: &#x1F5D3;&#xFE0F;</b> ";
body += returnStrDateFromEpoch(GrowStart); body += returnStrDateFromEpoch(GrowStart);
body += "<br>\n"; body += "<br>\n";
body += "<b>Day of Grow:</b> "; body += "<b>Day of Grow: </b> ";
if(DayNight == true) {
body += " &#x1F31E; ";
} else {
body += " &#x1F31A; ";
}
body += DayOfGrow; body += DayOfGrow;
body += "<br>\n"; body += "<br>\n";
body += "<b>Grow status:</b> "; body += "<b>Grow status:</b> ";
@ -375,13 +380,48 @@ void WEBroot() {
body += "&#x1F331; vegetation<br>\n"; body += "&#x1F331; vegetation<br>\n";
break; break;
case 2: case 2:
body += "&#x1F33C; bloom<br>\n"; body += "&#x1F33C; bloom (";
body += DayOfGrow - DaysVeg;
body += ")<br>\n";
break; break;
case 3: case 3:
body += "&#x1F342; harvest\n"; body += "&#x1F342; harvest (";
body += DayOfGrow - (DaysVeg + DaysBloom);
body += ")<br>\n";
break; break;
} }
// VPD
body += "<b>VPD (est.): ";
// apply text color to the value according to this chart
if(valVPD < 0) {
body += "&#x26A0;&#xFE0F; <span class=''>";
body += valVPD;
body += "</span></b> (Danger! Check for disease!)";
} else if(valVPD < 0.4 ) {
body += "&#x26A0;&#xFE0F; <span class='vpd_danger1'>";
body += valVPD;
body += "</span></b> (Danger! Under transpiration!)";
} else if(valVPD < 0.8 ) {
body += "&#x1F343; <span class='vpd_earlyveg'>";
body += valVPD;
body += "</span></b> (Early vegetation)";
} else if(valVPD < 1.2 ) {
body += "&#x1F343; <span class='vpd_lateveg'>";
body += valVPD;
body += "</span></b> (Late vegetation)";
} else if(valVPD < 1.6 ) {
body += "&#x1F343; <span class='vpd_latebloom'>";
body += valVPD;
body += "</span></b> (Late bloom)";
} else if(valVPD > 1.6 ) {
body += "&#x26A0;&#xFE0F; <span class='vpd_danger2'>";
body += valVPD;
body += "</span></b> (Danger - over transpiration!)";
}
body += "<br>\n";
if(UsePump > 0) { if(UsePump > 0) {
body += "<b>Pump water level:</b> "; body += "<b>Pump water level:</b> ";
switch(getWaterlevel()) { switch(getWaterlevel()) {
@ -402,37 +442,6 @@ void WEBroot() {
body += ((PinLEDPWM * 100) / 255); body += ((PinLEDPWM * 100) / 255);
body += " %<br>\n"; body += " %<br>\n";
// VPD
body += "<b>VPD (est.): <span class='";
// apply text color to the value according to this chart
if(valVPD < 0) {
body += "'>";
body += valVPD;
body += "</span></b> (Danger - check for disease!)";
} else if(valVPD < 0.4 ) {
body += "vpd_danger1'>";
body += valVPD;
body += "</span></b> (Danger - under transpiration!)";
} else if(valVPD < 0.8 ) {
body += "vpd_earlyveg'>";
body += valVPD;
body += "</span></b> (Early vegetation)";
} else if(valVPD < 1.2 ) {
body += "vpd_lateveg'>";
body += valVPD;
body += "</span></b> (Late vegetation)";
} else if(valVPD < 1.6 ) {
body += "vpd_latebloom'>";
body += valVPD;
body += "</span></b> (Late bloom)";
} else if(valVPD > 1.6 ) {
body += "vpd_danger2'>";
body += valVPD;
body += "</span></b> (Danger - over transpiration!)";
}
body += "<br>\n";
//~ body += "<form method='post' action='/switch'>\n"; //~ body += "<form method='post' action='/switch'>\n";
//~ body += "<b>MOSFET:</b> <select id='output' name='output' >\n"; //~ body += "<b>MOSFET:</b> <select id='output' name='output' >\n";

View file

@ -3,7 +3,7 @@
test -z $TTY && TTY="/dev/ttyUSB0" test -z $TTY && TTY="/dev/ttyUSB0"
test -z $IP && IP="192.168.4.20" test -z $IP && IP="192.168.4.20"
test -z $VER && VER="0.1.2" test -z $VER && VER="0.1.3-dev"
BUILD="$(git rev-parse --short HEAD)-$(date '+%Y%m%d%H%M%S')" BUILD="$(git rev-parse --short HEAD)-$(date '+%Y%m%d%H%M%S')"
ACLI="$HOME/.local/bin/arduino-cli" ACLI="$HOME/.local/bin/arduino-cli"