94 |
94 |
95 /* |
95 /* |
96 * Fermenter units. These units are connected via the 1-wire bus. |
96 * Fermenter units. These units are connected via the 1-wire bus. |
97 * Each unit can have: |
97 * Each unit can have: |
98 * a DS18B20 sensor to measure the air temperature inside the unit. |
98 * a DS18B20 sensor to measure the air temperature inside the unit. |
99 * a DS18B20 sensor to measure the beer temperature. |
99 * a DS18B20 sensor(s) to measure the beer temperature. |
100 * a DS2413 to turn the cooler and heater on or off. |
100 * a DS2408 to turn the cooler, heater and fans on or off. Sense door and PSU state. |
101 * a DS2413 to switch the fan and sense the door. |
|
102 */ |
101 */ |
103 typedef struct _units_list { |
102 typedef struct _units_list { |
104 struct _units_list *next; |
103 struct _units_list *next; |
105 int version; /* Record version */ |
104 int version; /* Record version */ |
106 char *uuid; /* uid code */ |
105 char *uuid; /* uid code */ |
125 char *fan_address; /* Fan relay or PWM */ |
124 char *fan_address; /* Fan relay or PWM */ |
126 int fan_state; /* Fan state 0..100 */ |
125 int fan_state; /* Fan state 0..100 */ |
127 int fan_delay; /* Fan delay time /15 sec */ |
126 int fan_delay; /* Fan delay time /15 sec */ |
128 int fan_wait; /* Fan wait counter */ |
127 int fan_wait; /* Fan wait counter */ |
129 int fan_usage; /* Fan usage in seconds */ |
128 int fan_usage; /* Fan usage in seconds */ |
|
129 char *light_address; /* Lights relay */ |
|
130 int light_state; /* Lights state 0..100 */ |
|
131 int light_delay; /* Lights delay time /15 sec */ |
|
132 int light_wait; /* Lights wait counter */ |
|
133 int light_usage; /* Lights usage in seconds */ |
130 char *door_address; /* Door input address */ |
134 char *door_address; /* Door input address */ |
131 int door_state; /* Door and light status */ |
135 int door_state; /* Door status */ |
|
136 char *psu_address; /* Power Supply input address */ |
|
137 int psu_state; /* Power Supply status */ |
132 int mode; /* Unit mode */ |
138 int mode; /* Unit mode */ |
133 float beer_set; /* Beer temperature setting */ |
139 float beer_set; /* Beer temperature setting */ |
134 float fridge_set; /* Fridge temperature setting */ |
140 float fridge_set; /* Fridge temperature setting */ |
135 float temp_set_min; /* Minimum temperature */ |
141 float temp_set_min; /* Minimum temperature */ |
136 float temp_set_max; /* Maximum temperature */ |
142 float temp_set_max; /* Maximum temperature */ |