thermferm/thermferm.c

changeset 484
7362ebd40f26
parent 481
3dd5d68f59df
child 486
5a237a99a793
--- a/thermferm/thermferm.c	Mon Feb 22 19:24:49 2016 +0100
+++ b/thermferm/thermferm.c	Thu Feb 25 20:12:27 2016 +0100
@@ -59,6 +59,14 @@
 extern int		sock;
 
 
+unsigned char		degC[8] 	= { 0b01000, 0b10100, 0b01000, 0b00111, 0b01000, 0b01000, 0b01000, 0b00111 };	// [1] degree c sybmol
+unsigned char		SP_Symbol[8]    = { 0b11100, 0b10000, 0b11100, 0b00111, 0b11101, 0b00111, 0b00100, 0b00100 };	// [2] SP Symbol
+unsigned char		CoolONOFF[8]    = { 0b00000, 0b01110, 0b01000, 0b01000, 0b01000, 0b01000, 0b01110, 0b00000 };	// [3] Cool Symbol
+unsigned char		RevCoolONOFF[8] = { 0b11111, 0b10001, 0b10111, 0b10111, 0b10111, 0b10111, 0b10001, 0b11111 };	// [4] Reverse Cool Symbol
+unsigned char		HeatONOFF[8]    = { 0b00000, 0b01010, 0b01010, 0b01110, 0b01110, 0b01010, 0b01010, 0b00000 };	// [5] HEAT symbol
+unsigned char		RevHeatONOFF[8] = { 0b11111, 0b10101, 0b10101, 0b10001, 0b10001, 0b10101, 0b10101, 0b11111 };	// [6] reverse HEAT symbol
+
+
 int  server(void);
 void help(void);
 void die(int);
@@ -857,6 +865,21 @@
 	return 1;
     }
 
+#ifdef HAVE_WIRINGPI_H
+    lcdCharDef(lcdHandle, 1, degC);
+    lcdCharDef(lcdHandle, 2, SP_Symbol);
+    lcdCharDef(lcdHandle, 3, CoolONOFF);
+    lcdCharDef(lcdHandle, 4, RevCoolONOFF);
+    lcdCharDef(lcdHandle, 5, HeatONOFF);
+    lcdCharDef(lcdHandle, 6, RevHeatONOFF);
+#endif
+    slcdCharDef(slcdHandle, 1, degC);
+    slcdCharDef(slcdHandle, 2, SP_Symbol);
+    slcdCharDef(slcdHandle, 3, CoolONOFF);
+    slcdCharDef(slcdHandle, 4, RevCoolONOFF);
+    slcdCharDef(slcdHandle, 5, HeatONOFF);
+    slcdCharDef(slcdHandle, 6, RevHeatONOFF);
+
     if (debug) {
 	/*
 	 * For debugging run in foreground.
@@ -1107,7 +1130,7 @@
 #ifdef HAVE_WIRINGPI_H
 		    piLock(LOCK_LCD);
 #endif
-		    lcd_buf_write(row++, "Room temp %.1f %cC    ", Config.temp_value / 1000.0, 0xdf);
+		    lcd_buf_write(row++, "Room temp %.1f%c    ", Config.temp_value / 1000.0, 0x01);
 #ifdef HAVE_WIRINGPI_H
 		    piUnlock(LOCK_LCD);
 #endif

mercurial