thermferm/thermferm.h

changeset 91
901ca9858a7a
parent 89
8bab04a663dd
child 92
116226a8c70a
equal deleted inserted replaced
90:28ee293654fd 91:901ca9858a7a
49 #define TRUE 1 49 #define TRUE 1
50 #define FALSE 0 50 #define FALSE 0
51 51
52 #define MBSE_SS(x) (x)?(x):"(null)" 52 #define MBSE_SS(x) (x)?(x):"(null)"
53 53
54 /* rdconfig.c */
55 //typedef struct _key_list {
56 // char *key;
57 // int (*prc)(char **);
58 // char **dest;
59 //} key_list;
60 54
61 /* 55 /*
62 * Fermenter units. These units are connected via the 1-wire bus. 56 * Fermenter units. These units are connected via the 1-wire bus.
63 * Each unit can have: 57 * Each unit can have:
64 * a DS18B20 sensor to measure the air temperature inside the unit. 58 * a DS18B20 sensor to measure the air temperature inside the unit.
106 #define UNITIO1_HEATER 0x01 /* Heater bit */ 100 #define UNITIO1_HEATER 0x01 /* Heater bit */
107 #define UNITIO1_COOLER 0x02 /* Cooler bit */ 101 #define UNITIO1_COOLER 0x02 /* Cooler bit */
108 #define UNITIO2_FAN 0x01 /* Fan bit */ 102 #define UNITIO2_FAN 0x01 /* Fan bit */
109 #define UNITIO2_DOOR 0x02 /* Door status */ 103 #define UNITIO2_DOOR 0x02 /* Door status */
110 104
105
106
107 /*
108 * Fermenting steps
109 */
110 typedef struct _prof_step {
111 struct _prof_step *next;
112 int version; /* Version 1 */
113 int duration; /* Duration in hours */
114 float target; /* Target temperature */
115 } prof_step;
116
117 /*
118 * Fermenting profiles
119 */
120 typedef struct _prof_list {
121 struct _prof_list *next;
122 int version; /* Version 1 */
123 char *uuid; /* Profile uuid */
124 char *name; /* Profile name */
125 prof_step *steps; /* Profile steps */
126 } profiles_list;
127
111 #define PROFILE_OFF 0 /* Profile not active */ 128 #define PROFILE_OFF 0 /* Profile not active */
112 #define PROFILE_PAUSE 1 /* Profile pause */ 129 #define PROFILE_PAUSE 1 /* Profile pause */
113 #define PROFILE_RUN 2 /* Profile is running */ 130 #define PROFILE_RUN 2 /* Profile is running */
114 #define PROFILE_DONE 3 /* Profile is finished */ 131 #define PROFILE_DONE 3 /* Profile is finished */
115 132
134 int lcd_cols; /* LCD display columns */ 151 int lcd_cols; /* LCD display columns */
135 int lcd_rows; /* LCD display rows */ 152 int lcd_rows; /* LCD display rows */
136 int lcd_address; /* LCD display i2c address */ 153 int lcd_address; /* LCD display i2c address */
137 #endif 154 #endif
138 units_list *units; /* Fermenter units */ 155 units_list *units; /* Fermenter units */
156 profiles_list *profiles; /* Ferment profiles */
139 /* ControlSettings: */ 157 /* ControlSettings: */
140 unsigned char cs_mode; /* mode */ 158 unsigned char cs_mode; /* mode */
141 float cs_beerSet; /* beer temperature */ 159 float cs_beerSet; /* beer temperature */
142 float cs_fridgeSet; /* fridge temperature */ 160 float cs_fridgeSet; /* fridge temperature */
143 float cs_heatEstimator; 161 float cs_heatEstimator;

mercurial