From 1e98fcbbd597e6393b60cdb4d55877c28fcf41a9 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 6 Jul 2023 12:01:48 +0200 Subject: [PATCH] that really should not cause issues though.. --- mission/controller/ThermalController.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mission/controller/ThermalController.cpp b/mission/controller/ThermalController.cpp index 53babbd5..7de3fc6c 100644 --- a/mission/controller/ThermalController.cpp +++ b/mission/controller/ThermalController.cpp @@ -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(heaterInfo.heaterSwitchState[htrCtx.switchNr]); // Heater off if (htrCtx.switchState == HeaterHandler::SwitchState::OFF) { if (sensorTemp < htrCtx.tempLimit.opLowerLimit and heaterCtrlAllowed()) {