1510 * cooling or heating. The Fan has a start/stop delay. |
1510 * cooling or heating. The Fan has a start/stop delay. |
1511 */ |
1511 */ |
1512 if ((unit->heater_address && unit->heater_state) || (unit->cooler_address && unit->cooler_state)) { |
1512 if ((unit->heater_address && unit->heater_state) || (unit->cooler_address && unit->cooler_state)) { |
1513 if (unit->fan_wait < unit->fan_delay) { |
1513 if (unit->fan_wait < unit->fan_delay) { |
1514 unit->fan_wait++; |
1514 unit->fan_wait++; |
1515 // syslog(LOG_NOTICE, "fan_wait + %d/%d", unit->fan_wait, unit->fan_delay); |
|
1516 } else { |
1515 } else { |
1517 if (! unit->fan_state) { |
1516 if (! unit->fan_state) { |
1518 syslog(LOG_NOTICE, "Unit `%s' Fan Off => On", unit->name); |
1517 syslog(LOG_NOTICE, "Unit `%s' Fan Off => On", unit->name); |
1519 unit->fan_state = 100; |
1518 unit->fan_state = 100; |
1520 } |
1519 } |
1521 } |
1520 } |
1522 } else { |
1521 } else { |
1523 if (unit->fan_wait > 0) { |
1522 if (unit->fan_wait > 0) { |
1524 unit->fan_wait--; |
1523 unit->fan_wait--; |
1525 // syslog(LOG_NOTICE, "fan_wait - %d/%d", unit->fan_wait, unit->fan_delay); |
|
1526 } else { |
1524 } else { |
1527 if (unit->fan_state) { |
1525 if (unit->fan_state) { |
1528 syslog(LOG_NOTICE, "Unit `%s' Fan On => Off", unit->name); |
1526 syslog(LOG_NOTICE, "Unit `%s' Fan On => Off", unit->name); |
1529 unit->fan_state = 0; |
1527 unit->fan_state = 0; |
1530 } |
1528 } |