Events are in the flat file log too

Sun, 20 Jan 2019 14:08:43 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Sun, 20 Jan 2019 14:08:43 +0100
changeset 576
fbc6012405f1
parent 575
86496d2bc4bb
child 577
7a29f835e20a

Events are in the flat file log too

thermferm/logger.c file | annotate | diff | comparison | revisions
thermferm/thermferm.c file | annotate | diff | comparison | revisions
--- a/thermferm/logger.c	Sun Jan 20 13:34:09 2019 +0100
+++ b/thermferm/logger.c	Sun Jan 20 14:08:43 2019 +0100
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * Copyright (C) 2014-2018
+ * Copyright (C) 2014-2019
  *   
  * Michiel Broek <mbroek at mbse dot eu>
  *
@@ -30,7 +30,7 @@
 {
     char	buf[128], *filename;
 
-    snprintf(buf, 127, "Mode,Air,Beer,Target_L,S_Heater,S_Cooler,S_Fan,S_Door,U_Heater,U_Cooler,U_Fan,Room,Target_H,Chiller");
+    snprintf(buf, 127, "Mode,Air,Beer,Target_L,S_Heater,S_Cooler,S_Fan,S_Door,U_Heater,U_Cooler,U_Fan,Room,Target_H,Chiller,Event");
     filename = xstrcpy(code);
     filename = xstrcat(filename, (char *)" ");
     filename = xstrcat(filename, name);
--- a/thermferm/thermferm.c	Sun Jan 20 13:34:09 2019 +0100
+++ b/thermferm/thermferm.c	Sun Jan 20 14:08:43 2019 +0100
@@ -1925,11 +1925,12 @@
 			    snprintf(room_temp, 39, "%.3f", Config.temp_value / 1000.0);
 			}
 
-			snprintf(buf, 1023, "%s,%.3f,%.3f,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%.3f", 
-					UNITMODE[unit->mode], unit->air_temperature / 1000.0, 
-					unit->beer_temperature / 1000.0, 
+			snprintf(buf, 1023, "%s,%.3f,%.3f,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%.3f,%s",
+					UNITMODE[unit->mode], unit->air_temperature / 1000.0,
+					unit->beer_temperature / 1000.0,
 					target_lo, heater, cooler, fan, door, use_heater, use_cooler, use_fan, room_temp, target_hi,
-					unit->chiller_temperature / 1000.0);
+					unit->chiller_temperature / 1000.0,
+					(unit->event_msg) ? unit->event_msg : (char *)"");
 			filename = xstrcpy(unit->product_code);
 			filename = xstrcat(filename, (char *)" ");
 			filename = xstrcat(filename, unit->product_name);

mercurial