thermferm/server.c

changeset 293
881b1ae75468
parent 289
d810df0df36a
child 299
d1c52fb43e30
--- a/thermferm/server.c	Wed Oct 29 14:41:00 2014 +0100
+++ b/thermferm/server.c	Wed Oct 29 20:27:37 2014 +0100
@@ -1454,6 +1454,7 @@
 	unit->heater_state = unit->cooler_state = unit->fan_state = unit->door_state = unit->mode = unit->prof_state = 0;
 	unit->heater_delay = unit->cooler_delay = unit->fan_delay = 20;     /* 5 minutes delay */
 	unit->heater_wait = unit->cooler_wait = unit->fan_wait = 0;
+	unit->heater_usage = unit->cooler_usage = unit->fan_usage = 0;
 	unit->temp_set_min = 1.0;
 	unit->temp_set_max = 30.0;
 	unit->idle_rangeH = 1.0;
@@ -1535,12 +1536,15 @@
 		srv_send((char *)"HEATER_ADDRESS,%s", unit->heater_address);
 		srv_send((char *)"HEATER_STATE,%d", unit->heater_state);
 		srv_send((char *)"HEATER_DELAY,%d", unit->heater_delay);
+		srv_send((char *)"HEATER_USAGE,%d", unit->heater_usage);
 		srv_send((char *)"COOLER_ADDRESS,%s", unit->cooler_address);
 		srv_send((char *)"COOLER_STATE,%d", unit->cooler_state);
 		srv_send((char *)"COOLER_DELAY,%d", unit->cooler_delay);
+		srv_send((char *)"COOLER_USAGE,%d", unit->cooler_usage);
 		srv_send((char *)"FAN_ADDRESS,%s", unit->fan_address);
 		srv_send((char *)"FAN_STATE,%d", unit->fan_state);
 		srv_send((char *)"FAN_DELAY,%d", unit->fan_delay);
+		srv_send((char *)"FAN_USAGE,%d", unit->fan_usage);
 		srv_send((char *)"DOOR_ADDRESS,%s", unit->door_address);
 		srv_send((char *)"DOOR_STATE,%d", unit->door_state);
 		srv_send((char *)"MODE,%s", UNITMODE[unit->mode]);

mercurial