thermferm/thermferm.h

changeset 397
00ca08f5a6f8
parent 362
c92651a54969
child 418
0bfe08c7ba6e
equal deleted inserted replaced
396:66d4e137b99d 397:00ca08f5a6f8
162 float temp_set_min; /* Minimum temperature */ 162 float temp_set_min; /* Minimum temperature */
163 float temp_set_max; /* Maximum temperature */ 163 float temp_set_max; /* Maximum temperature */
164 char *profile; /* Active profile uuid */ 164 char *profile; /* Active profile uuid */
165 time_t prof_started; /* Profile start time */ 165 time_t prof_started; /* Profile start time */
166 int prof_state; /* Profile OFF|PAUSE|RUN|DONE */ 166 int prof_state; /* Profile OFF|PAUSE|RUN|DONE */
167 float prof_target; /* Profile current target temp */ 167 float prof_target_lo; /* Profile current target low */
168 float prof_target_hi; /* Profile current target high */
168 time_t prof_paused; /* Profile total pause time */ 169 time_t prof_paused; /* Profile total pause time */
169 int prof_percent; /* Profile percentage done */ 170 int prof_percent; /* Profile percentage done */
170 float prof_peak_abs; /* Profile absolute peak temp */ 171 float prof_peak_abs; /* Profile absolute peak temp */
171 float prof_peak_rel; /* Profile relative peak temp */ 172 float prof_peak_rel; /* Profile relative peak temp */
172 time_t prof_primary_done; /* Profile primary is done */ 173 time_t prof_primary_done; /* Profile primary is done */
174 int prof_fridge_mode; /* Profile fridge/beer mode */
173 pid_var *PID_cool; /* PID cooler */ 175 pid_var *PID_cool; /* PID cooler */
174 pid_var *PID_heat; /* PID heater */ 176 pid_var *PID_heat; /* PID heater */
175 } units_list; 177 } units_list;
176 178
177 #define UNITMODE_OFF 0 /* Unit turned off */ 179 #define UNITMODE_OFF 0 /* Unit turned off */
187 typedef struct _prof_step { 189 typedef struct _prof_step {
188 struct _prof_step *next; 190 struct _prof_step *next;
189 int version; /* Version 1 */ 191 int version; /* Version 1 */
190 int steptime; /* Step time to target in hours */ 192 int steptime; /* Step time to target in hours */
191 int resttime; /* Rest time on target in hours */ 193 int resttime; /* Rest time on target in hours */
192 float target; /* Target temperature */ 194 float target_lo; /* Low Target temperature */
195 float target_hi; /* High target temperature */
196 int fridge_mode; /* Fridge or beer mode */
193 } prof_step; 197 } prof_step;
194 198
195 /* 199 /*
196 * Fermenting profiles 200 * Fermenting profiles
197 */ 201 */
199 struct _prof_list *next; 203 struct _prof_list *next;
200 int version; /* Version 1 */ 204 int version; /* Version 1 */
201 char *uuid; /* Profile uuid */ 205 char *uuid; /* Profile uuid */
202 char *name; /* Profile name */ 206 char *name; /* Profile name */
203 int busy; /* Profile busy == 1, free == 0 */ 207 int busy; /* Profile busy == 1, free == 0 */
204 float inittemp; /* Temp target before start */ 208 float inittemp_lo; /* Low target before start */
209 float inittemp_hi; /* High target before start */
210 int fridge_mode; /* Fridge or beer mode */
205 prof_step *steps; /* Profile steps */ 211 prof_step *steps; /* Profile steps */
206 } profiles_list; 212 } profiles_list;
207 213
208 #define PROFILE_OFF 0 /* Profile not active */ 214 #define PROFILE_OFF 0 /* Profile not active */
209 #define PROFILE_PAUSE 1 /* Profile pause */ 215 #define PROFILE_PAUSE 1 /* Profile pause */

mercurial