From a4c0d060e1ddc7d48c6391d0521da55bfd87a1a7 Mon Sep 17 00:00:00 2001 From: DeltaLima Date: Wed, 11 Dec 2024 02:31:26 +0100 Subject: [PATCH] firmware - cosmetic changes --- Arduino/CanGrow/CanGrow_HTML.h | 2 +- Arduino/CanGrow/CanGrow_Init.h | 3 + Arduino/CanGrow/CanGrow_SysFunctions.h | 5 ++ Arduino/CanGrow/CanGrow_WebFunctions.h | 83 ++++++++++++++------------ cangrow.sh | 2 +- 5 files changed, 56 insertions(+), 39 deletions(-) diff --git a/Arduino/CanGrow/CanGrow_HTML.h b/Arduino/CanGrow/CanGrow_HTML.h index 5cbf8a6..9220d18 100644 --- a/Arduino/CanGrow/CanGrow_HTML.h +++ b/Arduino/CanGrow/CanGrow_HTML.h @@ -485,7 +485,7 @@ const char HTMLgauge[] PROGMEM = R"EOF(
-
🍃 Humidity
+
☁️ Humidity
diff --git a/Arduino/CanGrow/CanGrow_Init.h b/Arduino/CanGrow/CanGrow_Init.h index 1d5c3f6..74de3d1 100644 --- a/Arduino/CanGrow/CanGrow_Init.h +++ b/Arduino/CanGrow/CanGrow_Init.h @@ -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 float valVPD; +// DayNight - +// true Day , false night +bool DayNight; bool MaintenanceMode = false; unsigned long MaintenanceStarted = 0; diff --git a/Arduino/CanGrow/CanGrow_SysFunctions.h b/Arduino/CanGrow/CanGrow_SysFunctions.h index 3cbee87..481b0c9 100644 --- a/Arduino/CanGrow/CanGrow_SysFunctions.h +++ b/Arduino/CanGrow/CanGrow_SysFunctions.h @@ -551,10 +551,15 @@ void controlLED() { setOutput(1, PinLEDPWM); } + // its daytime + DayNight = true; + } else { //Serial.println("good night time"); // turn off setOutput(1, 0); + // nighttime + DayNight = false; } } diff --git a/Arduino/CanGrow/CanGrow_WebFunctions.h b/Arduino/CanGrow/CanGrow_WebFunctions.h index a0f796a..1c3976b 100644 --- a/Arduino/CanGrow/CanGrow_WebFunctions.h +++ b/Arduino/CanGrow/CanGrow_WebFunctions.h @@ -363,10 +363,15 @@ void WEBroot() { body += "'>\n
\n"; } - body += "Grow started: "; + body += "Grow started: 🗓️ "; body += returnStrDateFromEpoch(GrowStart); body += "
\n"; - body += "Day of Grow: "; + body += "Day of Grow: "; + if(DayNight == true) { + body += " 🌞 "; + } else { + body += " 🌚 "; + } body += DayOfGrow; body += "
\n"; body += "Grow status: "; @@ -375,13 +380,48 @@ void WEBroot() { body += "🌱 vegetation
\n"; break; case 2: - body += "🌼 bloom
\n"; + body += "🌼 bloom ("; + body += DayOfGrow - DaysVeg; + body += ")
\n"; break; case 3: - body += "🍂 harvest\n"; + body += "🍂 harvest ("; + body += DayOfGrow - (DaysVeg + DaysBloom); + body += ")
\n"; break; } - + + // VPD + body += "VPD (est.): "; + // apply text color to the value according to this chart + if(valVPD < 0) { + body += "⚠️ "; + body += valVPD; + body += " (Danger! Check for disease!)"; + } else if(valVPD < 0.4 ) { + body += "⚠️ "; + body += valVPD; + body += " (Danger! Under transpiration!)"; + } else if(valVPD < 0.8 ) { + body += "🍃 "; + body += valVPD; + body += " (Early vegetation)"; + } else if(valVPD < 1.2 ) { + body += "🍃 "; + body += valVPD; + body += " (Late vegetation)"; + } else if(valVPD < 1.6 ) { + body += "🍃 "; + body += valVPD; + body += " (Late bloom)"; + } else if(valVPD > 1.6 ) { + body += "⚠️ "; + body += valVPD; + body += " (Danger - over transpiration!)"; + } + body += "
\n"; + + if(UsePump > 0) { body += "Pump water level: "; switch(getWaterlevel()) { @@ -401,38 +441,7 @@ void WEBroot() { body += "Growlight brightness: "; body += ((PinLEDPWM * 100) / 255); body += " %
\n"; - - // VPD - body += "VPD (est.): "; - body += valVPD; - body += " (Danger - check for disease!)"; - } else if(valVPD < 0.4 ) { - body += "vpd_danger1'>"; - body += valVPD; - body += " (Danger - under transpiration!)"; - } else if(valVPD < 0.8 ) { - body += "vpd_earlyveg'>"; - body += valVPD; - body += " (Early vegetation)"; - } else if(valVPD < 1.2 ) { - body += "vpd_lateveg'>"; - body += valVPD; - body += " (Late vegetation)"; - } else if(valVPD < 1.6 ) { - body += "vpd_latebloom'>"; - body += valVPD; - body += " (Late bloom)"; - } else if(valVPD > 1.6 ) { - body += "vpd_danger2'>"; - body += valVPD; - body += " (Danger - over transpiration!)"; - } - - - body += "
\n"; + //~ body += "
\n"; //~ body += "MOSFET: