|
@@ -1,13 +1,16 @@
|
|
|
|
|
|
// LCD
|
|
// LCD
|
|
unsigned char customCharSun[] = {B00100, B10001, B01110, B11111, B11111, B01110, B10001, B00100};
|
|
unsigned char customCharSun[] = {B00100, B10001, B01110, B11111, B11111, B01110, B10001, B00100};
|
|
-unsigned char customCharMoon[] = {B11000, B01110, B00110, B00111, B00111, B00110, B01110, B11000};
|
|
|
|
|
|
+//unsigned char customCharMoon[] = {B11000, B01110, B00110, B00111, B00111, B00110, B01110, B11000};
|
|
|
|
+unsigned char customCharMoon[] = {B00011, B01110, B01100, B11100, B11100, B01100, B01110, B00011};
|
|
unsigned char customCharArrowRight[] = {B01000, B01100, B01110, B01111, B01110, B01100, B01000, B00000};
|
|
unsigned char customCharArrowRight[] = {B01000, B01100, B01110, B01111, B01110, B01100, B01000, B00000};
|
|
unsigned char customCharDegC[] = {B01000, B10100, B01000, B00011, B00100, B00100, B00011, B00000};
|
|
unsigned char customCharDegC[] = {B01000, B10100, B01000, B00011, B00100, B00100, B00011, B00000};
|
|
unsigned char customCharConn[] = {B00000, B00000, B11100, B00010, B11001, B00101, B10101, B00000};
|
|
unsigned char customCharConn[] = {B00000, B00000, B11100, B00010, B11001, B00101, B10101, B00000};
|
|
unsigned char customCharDisconn[] = {B10001, B01010, B00100, B01010, B10001, B00000, B10000, B00000};
|
|
unsigned char customCharDisconn[] = {B10001, B01010, B00100, B01010, B10001, B00000, B10000, B00000};
|
|
unsigned char customCharReduction2[] = {B00000, B11111, B01110, B00100, B00000, B11111, B01110, B00100}; //(2 arrows down)
|
|
unsigned char customCharReduction2[] = {B00000, B11111, B01110, B00100, B00000, B11111, B01110, B00100}; //(2 arrows down)
|
|
unsigned char customCharFlame[] = {B00100, B00100, B01010, B01010, B10101, B10101, B10101, B01110};
|
|
unsigned char customCharFlame[] = {B00100, B00100, B01010, B01010, B10101, B10101, B10101, B01110};
|
|
|
|
+unsigned char customCharLock[] = {B01110, B10001, B10001, B11111, B11011, B11011, B11111, B00000};
|
|
|
|
+unsigned char customCharPause[] = {B11011, B11011, B11011, B11011, B11011, B11011, B11011, B11011};
|
|
// boolean displayActive = false;
|
|
// boolean displayActive = false;
|
|
unsigned long displayLastOnMillis = 0;
|
|
unsigned long displayLastOnMillis = 0;
|
|
|
|
|
|
@@ -36,12 +39,15 @@ void initDisplay()
|
|
lcd.init();
|
|
lcd.init();
|
|
lcd.createChar(0, customCharMoon);
|
|
lcd.createChar(0, customCharMoon);
|
|
lcd.createChar(1, customCharSun);
|
|
lcd.createChar(1, customCharSun);
|
|
- lcd.createChar(2, customCharArrowRight);
|
|
|
|
|
|
+ lcd.createChar(2, customCharArrowRight); // replaced by > char
|
|
lcd.createChar(3, customCharDegC);
|
|
lcd.createChar(3, customCharDegC);
|
|
lcd.createChar(4, customCharConn);
|
|
lcd.createChar(4, customCharConn);
|
|
lcd.createChar(5, customCharDisconn);
|
|
lcd.createChar(5, customCharDisconn);
|
|
lcd.createChar(6, customCharReduction2);
|
|
lcd.createChar(6, customCharReduction2);
|
|
lcd.createChar(7, customCharFlame);
|
|
lcd.createChar(7, customCharFlame);
|
|
|
|
+ //lcd.createChar(7, customCharLock);
|
|
|
|
+
|
|
|
|
+ // only 8 custom chars are possible :-/
|
|
|
|
|
|
lcd.setCursor(0, 0);
|
|
lcd.setCursor(0, 0);
|
|
|
|
|
|
@@ -68,8 +74,8 @@ void displayShowWifiConnected()
|
|
|
|
|
|
lcd.print("WiFi connected ");
|
|
lcd.print("WiFi connected ");
|
|
lcd.setCursor(0, 1);
|
|
lcd.setCursor(0, 1);
|
|
- lcd.print("IP: ");
|
|
|
|
- lcd.setCursor(4, 1);
|
|
|
|
|
|
+ lcd.print(" ");
|
|
|
|
+ lcd.setCursor(0, 1);
|
|
lcd.print(WiFi.localIP());
|
|
lcd.print(WiFi.localIP());
|
|
|
|
|
|
lcd.backlight();
|
|
lcd.backlight();
|
|
@@ -116,7 +122,7 @@ void displayShowMQTTConnected()
|
|
{
|
|
{
|
|
lcd.setCursor(0, 0);
|
|
lcd.setCursor(0, 0);
|
|
|
|
|
|
- lcd.print("MQTT connected ");
|
|
|
|
|
|
+ lcd.print("MQTT conn. to: ");
|
|
lcd.setCursor(0, 1);
|
|
lcd.setCursor(0, 1);
|
|
lcd.print(" ");
|
|
lcd.print(" ");
|
|
lcd.setCursor(0, 1);
|
|
lcd.setCursor(0, 1);
|
|
@@ -327,6 +333,20 @@ void updateDisplay()
|
|
//}
|
|
//}
|
|
displayAddConnectionIcon();
|
|
displayAddConnectionIcon();
|
|
}
|
|
}
|
|
|
|
+ //else if (heatingPause > 0)
|
|
|
|
+ //{ // when heating pause mode is active, do not display target temp - instead show "PAUSE" info in line 2
|
|
|
|
+ // // 1234567890123456
|
|
|
|
+ // lcd.print(" ");
|
|
|
|
+ // lcd.setCursor(0, 1);
|
|
|
|
+ // //lcd.print(confAdv.pauseMessage);
|
|
|
|
+ // lcd.print("PAUSE 0:");
|
|
|
|
+ //
|
|
|
|
+ // unsigned int _pauseMin = heatingPause / 60;
|
|
|
|
+ // if(_pauseMin < 10) lcd.print("0");
|
|
|
|
+ // lcd.print(_pauseMin);
|
|
|
|
+ //
|
|
|
|
+ // displayAddConnectionIcon();
|
|
|
|
+ //}
|
|
else if (displayShowLine2OverlayMsg)
|
|
else if (displayShowLine2OverlayMsg)
|
|
{
|
|
{
|
|
displayShowLine2OverlayMsg = false;
|
|
displayShowLine2OverlayMsg = false;
|
|
@@ -342,6 +362,8 @@ void updateDisplay()
|
|
else
|
|
else
|
|
{
|
|
{
|
|
lcd.write((uint8_t)2); // arrow right symbol
|
|
lcd.write((uint8_t)2); // arrow right symbol
|
|
|
|
+ //lcd.print(">");
|
|
|
|
+
|
|
// lcd.print(" ");
|
|
// lcd.print(" ");
|
|
lcd.print(ch_currSetTemp);
|
|
lcd.print(ch_currSetTemp);
|
|
// lcd.write(0xDF); // degree symbol
|
|
// lcd.write(0xDF); // degree symbol
|
|
@@ -367,13 +389,27 @@ void updateDisplay()
|
|
lcd.write((uint8_t)6); // reduction 2 (2 arrows down) symbol if mode is reduction 2
|
|
lcd.write((uint8_t)6); // reduction 2 (2 arrows down) symbol if mode is reduction 2
|
|
}
|
|
}
|
|
|
|
|
|
- lcd.setCursor(12, 1);
|
|
|
|
- if (turnHeatingOn)
|
|
|
|
|
|
+ if (heatingPause > 0)
|
|
|
|
+ {
|
|
|
|
+ lcd.createChar(7, customCharPause);
|
|
|
|
+ lcd.setCursor(12, 1);
|
|
|
|
+ lcd.write((uint8_t)7); // pause symbol if heating is paused
|
|
|
|
+ }
|
|
|
|
+ else if (heatingLockTime > 0)
|
|
|
|
+ {
|
|
|
|
+ lcd.createChar(7, customCharLock);
|
|
|
|
+ lcd.setCursor(12, 1);
|
|
|
|
+ lcd.write((uint8_t)7); // lock symbol if heating should run BUT lockout time is active
|
|
|
|
+ }
|
|
|
|
+ else if (turnHeatingOn)
|
|
{
|
|
{
|
|
|
|
+ lcd.createChar(7, customCharFlame);
|
|
|
|
+ lcd.setCursor(12, 1);
|
|
lcd.write((uint8_t)7); // flame symbol if heating is active
|
|
lcd.write((uint8_t)7); // flame symbol if heating is active
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
|
|
+ lcd.setCursor(12, 1);
|
|
lcd.print(" ");
|
|
lcd.print(" ");
|
|
}
|
|
}
|
|
displayAddConnectionIcon();
|
|
displayAddConnectionIcon();
|