TCS CTRL bugfix #730

Merged
muellerr merged 6 commits from tcs-ctrl-bugfix into main 2023-07-07 11:44:39 +02:00
Showing only changes of commit 3e92d175d5 - Show all commits

View File

@ -1687,7 +1687,7 @@ void ThermalController::checkLimitsAndCtrlHeater(HeaterContext& htrCtx) {
// Heater off
if (htrCtx.switchState == HeaterHandler::SwitchState::OFF) {
if (sensorTemp < htrCtx.tempLimit.opLowerLimit and heaterCtrlAllowed()) {
sif::info << "TCS: Heater " << (int)htrCtx.switchNr << " for component "
sif::info << "TCS: Heater " << static_cast<int>(htrCtx.switchNr) << " for component "
<< static_cast<int>(currThermalComponent) << " ON" << std::endl;
heaterSwitchHelper(htrCtx.switchNr, HeaterHandler::SwitchState::ON, currThermalComponent);
heaterStates[htrCtx.switchNr].switchTransition = true;
@ -1705,7 +1705,7 @@ void ThermalController::checkLimitsAndCtrlHeater(HeaterContext& htrCtx) {
if (thermalStates[thermalComponent].heating) {
// We are already in a heating cycle, so need to check whether heating task is complete.
if (sensorTemp >= htrCtx.tempLimit.opLowerLimit + TEMP_OFFSET and heaterCtrlAllowed()) {
sif::info << "TCS: Heater " << (int)htrCtx.switchNr << " for component "
sif::info << "TCS: Heater " << static_cast<int>(htrCtx.switchNr) << " for component "
<< static_cast<int>(currThermalComponent) << " OFF" << std::endl;
heaterSwitchHelper(htrCtx.switchNr, HeaterHandler::SwitchState::OFF, currThermalComponent);
heaterStates[htrCtx.switchNr].switchTransition = true;