thermferm/thermferm.c

changeset 367
b9130db48c63
parent 364
2f9bbbcd2407
child 395
e32e83550963
equal deleted inserted replaced
366:7b698d012a0c 367:b9130db48c63
253 if ((current_unit->mode == UNITMODE_OFF) && (mode != UNITMODE_OFF)) 253 if ((current_unit->mode == UNITMODE_OFF) && (mode != UNITMODE_OFF))
254 initlog(current_unit->name); 254 initlog(current_unit->name);
255 syslog(LOG_NOTICE, "Mode from %s to %s via panel interface", UNITMODE[current_unit->mode], UNITMODE[mode]); 255 syslog(LOG_NOTICE, "Mode from %s to %s via panel interface", UNITMODE[current_unit->mode], UNITMODE[mode]);
256 current_unit->mode = mode; 256 current_unit->mode = mode;
257 /* Allways turn everything off after a mode change */ 257 /* Allways turn everything off after a mode change */
258 current_unit->PID_iState = current_unit->PID_dState = 0.0; 258 current_unit->PID_cool->OutP = current_unit->PID_heat->OutP = 0.0;
259 current_unit->heater_state = current_unit->cooler_state = current_unit->fan_state = 0; 259 current_unit->PID_cool->Mode = current_unit->PID_heat->Mode = PID_MODE_NONE;
260 current_unit->heater_wait = current_unit->cooler_wait = current_unit->fan_wait = 0; 260 current_unit->heater_state = current_unit->cooler_state = current_unit->fan_state = current_unit->light_state = 0;
261 current_unit->heater_wait = current_unit->cooler_wait = current_unit->fan_wait = current_unit->light_wait = 0;
261 device_out(current_unit->heater_address, current_unit->heater_state); 262 device_out(current_unit->heater_address, current_unit->heater_state);
262 device_out(current_unit->cooler_address, current_unit->cooler_state); 263 device_out(current_unit->cooler_address, current_unit->cooler_state);
263 device_out(current_unit->fan_address, current_unit->fan_state); 264 device_out(current_unit->fan_address, current_unit->fan_state);
265 device_out(current_unit->light_address, current_unit->light_state);
264 if (current_unit->mode == UNITMODE_PROFILE) { 266 if (current_unit->mode == UNITMODE_PROFILE) {
265 /* 267 /*
266 * Set a sane default until it will be overruled by the 268 * Set a sane default until it will be overruled by the
267 * main processing loop. 269 * main processing loop.
268 */ 270 */

mercurial