Update LCD even when unit is off

Wed, 30 Jul 2014 23:06:46 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Wed, 30 Jul 2014 23:06:46 +0200
changeset 156
5fb74d89f571
parent 155
0d86f3c0a07b
child 157
259a018758f9

Update LCD even when unit is off

thermferm/server.c file | annotate | diff | comparison | revisions
thermferm/thermferm.c file | annotate | diff | comparison | revisions
--- a/thermferm/server.c	Wed Jul 30 22:57:48 2014 +0200
+++ b/thermferm/server.c	Wed Jul 30 23:06:46 2014 +0200
@@ -1023,7 +1023,8 @@
 	    } else if (strncmp(buf, "LIST", 4) == 0) {
 		cmd_list(buf);
 	    } else if (strncmp(buf, "MODE", 4) == 0) {
-		cmd_mode(buf);
+		if (cmd_mode(buf) == 0)
+		    wrconfig();
 	    } else if (strncmp(buf, "PROFILE", 7) == 0) {
 		if (cmd_profile(buf) == 0)
 		    wrconfig();
--- a/thermferm/thermferm.c	Wed Jul 30 22:57:48 2014 +0200
+++ b/thermferm/thermferm.c	Wed Jul 30 23:06:46 2014 +0200
@@ -326,7 +326,7 @@
 	    lcd_buf_write(row++, "    %02d:%02d:%02d    ", tm->tm_hour, tm->tm_min, tm->tm_sec);
 
 	    for (unit = Config.units; unit; unit = unit->next) {
-		if (unit->mode != UNITMODE_OFF) {
+//		if (unit->mode != UNITMODE_OFF) {
 		    lcd_buf_write(row++, "Unit %s              ", unit->name);
 		    lcd_buf_write(row++, "Mode %s              ", UNITMODE[unit->mode]);
 		    if (unit->air_address) {
@@ -335,7 +335,7 @@
 		    if (unit->beer_address) {
 			lcd_buf_write(row++, "Beer %.3f %cC         ", unit->beer_temperature / 1000.0, 0xdf);
 		    }
-		}
+//		}
 	    }
 
 	    lcd_buf_show();

mercurial