comparison tempctrl.c @ 43:51e7458d2e76

Init lastdata same as lastheat/coolon/off otherwise we won't handle thing properly early on (ie if now < lastdata/lastheat/coolon/off)
author darius@inchoate.localdomain
date Sun, 06 Jul 2008 22:42:32 +0930
parents 97ae82023d5b
children f219538d6ea7
comparison
equal deleted inserted replaced
42:97ae82023d5b 43:51e7458d2e76
170 */ 170 */
171 void 171 void
172 tempctrl_update(void) { 172 tempctrl_update(void) {
173 /* State variables */ 173 /* State variables */
174 static int32_t checktime = 0; // Time of next check 174 static int32_t checktime = 0; // Time of next check
175 static int32_t lastdata = 0; // Last time we got data 175 static int32_t lastdata = -100000; // Last time we got data
176 176
177 static int16_t fermenter_temp = 0; // Fermenter temperature 177 static int16_t fermenter_temp = 0; // Fermenter temperature
178 static int16_t fridge_temp = 0; // Fridge temperature 178 static int16_t fridge_temp = 0; // Fridge temperature
179 static int16_t ambient_temp = 0; // Ambient temperature 179 static int16_t ambient_temp = 0; // Ambient temperature
180 // These are inited like this so we will still heat/cool when 180 // These are inited like this so we will still heat/cool when