that really should not cause issues though..
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
Robin Müller 2023-07-06 12:01:48 +02:00
parent dea3077f29
commit 1e98fcbbd5
Signed by: muellerr
GPG Key ID: A649FB78196E3849

View File

@ -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
// are blind..
if (chooseHeater(htrCtx.switchNr, htrCtx.redSwitchNr)) {
if (heaterCtrlAllowed() and
(heaterHandler.getSwitchState(htrCtx.switchNr) == HeaterHandler::SwitchState::ON)) {
if (heaterCtrlAllowed()) {
heaterSwitchHelper(htrCtx.switchNr, HeaterHandler::SwitchState::OFF, thermalComponent);
}
}
@ -1680,7 +1679,7 @@ void ThermalController::checkLimitsAndCtrlHeater(HeaterContext& htrCtx) {
return;
}
htrCtx.switchState = heaterHandler.getSwitchState(htrCtx.switchNr);
htrCtx.switchState = static_cast<HeaterHandler::SwitchState>(heaterInfo.heaterSwitchState[htrCtx.switchNr]);
// Heater off
if (htrCtx.switchState == HeaterHandler::SwitchState::OFF) {
if (sensorTemp < htrCtx.tempLimit.opLowerLimit and heaterCtrlAllowed()) {