thermferm/thermferm.h

changeset 89
8bab04a663dd
parent 86
3d7a241329e2
child 91
901ca9858a7a
--- a/thermferm/thermferm.h	Wed Jul 02 22:09:35 2014 +0200
+++ b/thermferm/thermferm.h	Wed Jul 02 22:17:10 2014 +0200
@@ -52,11 +52,11 @@
 #define MBSE_SS(x) (x)?(x):"(null)"
 
 /* rdconfig.c */
-typedef struct _key_list {
-    char		*key;
-    int			(*prc)(char **);
-    char		**dest;
-} key_list;
+//typedef struct _key_list {
+//    char		*key;
+//    int			(*prc)(char **);
+//    char		**dest;
+//} key_list;
 
 /*
  * Fermenter units. These units are connected via the 1-wire bus.
@@ -68,6 +68,7 @@
  */
 typedef struct _units_list {
     struct _units_list	*next;
+    int			version;		/* Record version		*/
     char		*uuid;			/* uid code			*/
     char		*name;			/* friendly name		*/
     float		volume;			/* Volume of this unit		*/
@@ -93,6 +94,7 @@
     float		idle_rangeH;		/* Idle range high		*/
     char		*profile;		/* Active profile		*/
     time_t		prof_started;		/* Profile start time		*/
+    int			prof_state;		/* Profile OFF|PAUSE|RUN|DONE	*/
 } units_list;
 
 #define	UNITMODE_OFF		0		/* Unit turned off		*/
@@ -101,11 +103,16 @@
 #define	UNITMODE_BEER		3		/* Unit acts as beer cooler	*/
 #define	UNITMODE_PROFILE	4		/* Unit runs in profile mode	*/
 
-#define	UNITIO_HEATER		0x01		/* Heater bit			*/
-#define	UNITIO_COOLER		0x02		/* Cooler bit			*/
-#define	UNITIO_FAN		0x04		/* Fan bit			*/
-#define	UNITIO_LIGHT		0x08		/* Light bit			*/
-#define	UNITIO_DOOR		0x10		/* Door status			*/
+#define	UNITIO1_HEATER		0x01		/* Heater bit			*/
+#define	UNITIO1_COOLER		0x02		/* Cooler bit			*/
+#define	UNITIO2_FAN		0x01		/* Fan bit			*/
+#define	UNITIO2_DOOR		0x02		/* Door status			*/
+
+#define PROFILE_OFF		0		/* Profile not active		*/
+#define	PROFILE_PAUSE		1		/* Profile pause		*/
+#define	PROFILE_RUN		2		/* Profile is running		*/
+#define	PROFILE_DONE		3		/* Profile is finished		*/
+
 
 typedef struct _w1_therm {
     struct _w1_therm    *next;

mercurial