thermferm/thermferm.c

changeset 175
b73490398368
parent 174
244de612c572
child 176
8c7d87a2c094
--- a/thermferm/thermferm.c	Sat Aug 02 22:33:15 2014 +0200
+++ b/thermferm/thermferm.c	Sun Aug 03 22:49:33 2014 +0200
@@ -355,19 +355,20 @@
 			    snprintf(target, 39, "%.1f", unit->beer_set);
 			else if (unit->mode == UNITMODE_FRIDGE)
 			    snprintf(target, 39, "%.1f", unit->fridge_set);
-
-			if (unit->io1_address) {
-			    if (unit->heater_available) {
-
-			    }
-			    if (unit->cooler_available) {
+			else if (unit->mode == UNITMODE_PROFILE)
+			    snprintf(target, 39, "%.1f", unit->prof_target);
 
-			    }
+			if (unit->heater_address) {
+			    snprintf(heater, 39, "%d", unit->heater_state);
+			}
+			if (unit->cooler_address) {
+			    snprintf(cooler, 39, "%d", unit->cooler_state);
 			}
-			if (unit->io2_address) {
-			    if (unit->fan_available) {
-
-			    }
+			if (unit->fan_address) {
+			    snprintf(fan, 39, "%d", unit->fan_state);
+			}
+			if (unit->door_address) {
+			    snprintf(door, 39, "%d", unit->door_state);
 			}
 
 			snprintf(buf, 1023, "%s,%.3f,%.3f,%s,%s,%s,%s,%s", 

mercurial