Some TCS tweaks #729
@ -1596,8 +1596,7 @@ void ThermalController::ctrlComponentTemperature(HeaterContext& htrCtx) {
|
|||||||
// No sensors available, so switch the heater off. We can not perform control tasks if we
|
// No sensors available, so switch the heater off. We can not perform control tasks if we
|
||||||
// are blind..
|
// are blind..
|
||||||
if (chooseHeater(htrCtx.switchNr, htrCtx.redSwitchNr)) {
|
if (chooseHeater(htrCtx.switchNr, htrCtx.redSwitchNr)) {
|
||||||
if (heaterCtrlAllowed() and
|
if (heaterCtrlAllowed()) {
|
||||||
(heaterHandler.getSwitchState(htrCtx.switchNr) == HeaterHandler::SwitchState::ON)) {
|
|
||||||
heaterSwitchHelper(htrCtx.switchNr, HeaterHandler::SwitchState::OFF, thermalComponent);
|
heaterSwitchHelper(htrCtx.switchNr, HeaterHandler::SwitchState::OFF, thermalComponent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1680,7 +1679,7 @@ void ThermalController::checkLimitsAndCtrlHeater(HeaterContext& htrCtx) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
htrCtx.switchState = heaterHandler.getSwitchState(htrCtx.switchNr);
|
htrCtx.switchState = static_cast<HeaterHandler::SwitchState>(heaterInfo.heaterSwitchState[htrCtx.switchNr]);
|
||||||
// Heater off
|
// Heater off
|
||||||
if (htrCtx.switchState == HeaterHandler::SwitchState::OFF) {
|
if (htrCtx.switchState == HeaterHandler::SwitchState::OFF) {
|
||||||
if (sensorTemp < htrCtx.tempLimit.opLowerLimit and heaterCtrlAllowed()) {
|
if (sensorTemp < htrCtx.tempLimit.opLowerLimit and heaterCtrlAllowed()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user