thermferm/thermferm.c

changeset 516
65299c11774b
parent 515
7ab5cf2afc0c
child 518
fd36bedab944
equal deleted inserted replaced
515:7ab5cf2afc0c 516:65299c11774b
1677 } 1677 }
1678 } 1678 }
1679 } 1679 }
1680 if (unit->door_state) { 1680 if (unit->door_state) {
1681 device_out(unit->heater_address, unit->heater_state); 1681 device_out(unit->heater_address, unit->heater_state);
1682 pub_domoticz_output(unit->heater_idx, unit->heater_state);
1683 } else { 1682 } else {
1684 device_out(unit->heater_address, 0); 1683 device_out(unit->heater_address, 0);
1685 pub_domoticz_output(unit->heater_idx, 0);
1686 } 1684 }
1687 } 1685 }
1688 1686
1689 if (unit->cooler_address && ! unit->heater_state) { 1687 if (unit->cooler_address && ! unit->heater_state) {
1690 if (unit->PID_cool->OutP >= 50) { 1688 if (unit->PID_cool->OutP >= 50) {
1713 } 1711 }
1714 } 1712 }
1715 } 1713 }
1716 if (unit->door_state) { 1714 if (unit->door_state) {
1717 device_out(unit->cooler_address, unit->cooler_state); 1715 device_out(unit->cooler_address, unit->cooler_state);
1718 pub_domoticz_output(unit->cooler_idx, unit->cooler_state);
1719 } else { 1716 } else {
1720 device_out(unit->cooler_address, 0); 1717 device_out(unit->cooler_address, 0);
1721 pub_domoticz_output(unit->cooler_idx, 0);
1722 } 1718 }
1723 } 1719 }
1724 if (debug) 1720 if (debug)
1725 fprintf(stdout, "Final: PIDheat=%.2f PWRheat=%d PIDcool=%.2f PWRcool=%d\n", 1721 fprintf(stdout, "Final: PIDheat=%.2f PWRheat=%d PIDcool=%.2f PWRcool=%d\n",
1726 unit->PID_heat->OutP, unit->heater_state, unit->PID_cool->OutP, unit->cooler_state); 1722 unit->PID_heat->OutP, unit->heater_state, unit->PID_cool->OutP, unit->cooler_state);

mercurial