thermferm/thermferm.c

changeset 531
2e42fdf59019
parent 526
2f75f94d471b
child 532
34bf9f389749
equal deleted inserted replaced
530:d33516eac22f 531:2e42fdf59019
1763 unit->PID_heat->OutP, unit->heater_state, unit->PID_cool->OutP, unit->cooler_state); 1763 unit->PID_heat->OutP, unit->heater_state, unit->PID_cool->OutP, unit->cooler_state);
1764 1764
1765 /* 1765 /*
1766 * If there is a fan, and the unit door is closed, and the unit should be doing 1766 * If there is a fan, and the unit door is closed, and the unit should be doing
1767 * something, then turn on the global fan. 1767 * something, then turn on the global fan.
1768 * But if there is a chiller, do not turn it on if cooling.
1768 */ 1769 */
1769 if (unit->fan_address) { 1770 if (unit->fan_address) {
1770 if (unit->door_state) { 1771 if ((unit->door_state) && (unit->cooler_state == 0)) {
1771 if (unit->fan_wait < unit->fan_delay) { 1772 if (unit->fan_wait < unit->fan_delay) {
1772 unit->fan_wait++; 1773 unit->fan_wait++;
1773 } else { 1774 } else {
1774 if (! unit->fan_state) { 1775 if (! unit->fan_state) {
1775 syslog(LOG_NOTICE, "Unit `%s' Fan Off => On", unit->name); 1776 syslog(LOG_NOTICE, "Unit `%s' Fan Off => On", unit->name);

mercurial