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; |