thermferm/thermferm.c

changeset 355
8f946f9d125a
parent 352
a8e106c95db4
child 361
308f6a436779
--- a/thermferm/thermferm.c	Wed Apr 01 22:54:27 2015 +0200
+++ b/thermferm/thermferm.c	Wed Apr 01 23:13:08 2015 +0200
@@ -834,7 +834,7 @@
 int server(void)
 {
     char                buf[1024], *filename, target[40], heater[40], cooler[40], fan[40], door[40];
-    char		use_heater[40], use_cooler[40], use_fan[40];
+    char		use_heater[40], use_cooler[40], use_fan[40], room_temp[40];
     time_t		now, last = (time_t)0;
     units_list		*unit;
     profiles_list	*profile;
@@ -1570,7 +1570,7 @@
 			snprintf(use_heater, 39, "NA");
 			snprintf(use_cooler, 39, "NA");
 			snprintf(use_fan, 39, "NA");
-
+			snprintf(room_temp, 39, "NA");
 
 			if (unit->mode == UNITMODE_BEER)
 			    snprintf(target, 39, "%.1f", unit->beer_set);
@@ -1594,10 +1594,13 @@
 			if (unit->door_address) {
 			    snprintf(door, 39, "%d", unit->door_state);
 			}
+			if (Config.temp_address) {
+			    snprintf(room_temp, 39, "%.3f", Config.temp_value / 1000.0);
+			}
 
-			snprintf(buf, 1023, "%s,%.3f,%.3f,%s,%s,%s,%s,%s,%s,%s,%s", 
+			snprintf(buf, 1023, "%s,%.3f,%.3f,%s,%s,%s,%s,%s,%s,%s,%s,%s", 
 					UNITMODE[unit->mode], unit->air_temperature / 1000.0, 
-					unit->beer_temperature / 1000.0, target, heater, cooler, fan, door, use_heater, use_cooler, use_fan);
+					unit->beer_temperature / 1000.0, target, heater, cooler, fan, door, use_heater, use_cooler, use_fan, room_temp);
 			filename = xstrcpy(unit->name);
 			filename = xstrcat(filename, (char *)".log");
 			logger(filename, buf);

mercurial