This commit is contained in:
parent
096328aadc
commit
950e86ce4b
@ -1643,7 +1643,9 @@ bool ThermalController::chooseHeater(heater::Switch& switchNr, heater::Switch re
|
|||||||
HasHealthIF::HealthState mainHealth = heaterHandler.getHealth(switchNr);
|
HasHealthIF::HealthState mainHealth = heaterHandler.getHealth(switchNr);
|
||||||
heater::SwitchState mainState = heaterHandler.getSwitchState(switchNr);
|
heater::SwitchState mainState = heaterHandler.getSwitchState(switchNr);
|
||||||
HasHealthIF::HealthState redHealth = heaterHandler.getHealth(redSwitchNr);
|
HasHealthIF::HealthState redHealth = heaterHandler.getHealth(redSwitchNr);
|
||||||
if (not(mainHealth == HasHealthIF::EXTERNAL_CONTROL and mainState == heater::SwitchState::ON)) {
|
if (mainHealth == HasHealthIF::EXTERNAL_CONTROL and mainState == heater::SwitchState::ON) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (mainHealth != HasHealthIF::HEALTHY) {
|
if (mainHealth != HasHealthIF::HEALTHY) {
|
||||||
if (redHealth == HasHealthIF::HEALTHY) {
|
if (redHealth == HasHealthIF::HEALTHY) {
|
||||||
switchNr = redSwitchNr;
|
switchNr = redSwitchNr;
|
||||||
@ -1658,7 +1660,6 @@ bool ThermalController::chooseHeater(heater::Switch& switchNr, heater::Switch re
|
|||||||
} else {
|
} else {
|
||||||
ctrlCtx.redSwitchNrInUse = false;
|
ctrlCtx.redSwitchNrInUse = false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return heaterAvailable;
|
return heaterAvailable;
|
||||||
}
|
}
|
||||||
@ -1714,7 +1715,8 @@ void ThermalController::checkLimitsAndCtrlHeater(HeaterContext& htrCtx) {
|
|||||||
if (thermalStates[ctrlCtx.thermalComponent].heating) {
|
if (thermalStates[ctrlCtx.thermalComponent].heating) {
|
||||||
// We are already in a heating cycle, so need to check whether heating task is complete.
|
// We are already in a heating cycle, so need to check whether heating task is complete.
|
||||||
if (ctrlCtx.sensorTemp >= htrCtx.tempLimit.opLowerLimit + TEMP_OFFSET and
|
if (ctrlCtx.sensorTemp >= htrCtx.tempLimit.opLowerLimit + TEMP_OFFSET and
|
||||||
heaterCtrlAllowed()) {
|
heaterCtrlAllowed() /*and
|
||||||
|
heaterHandler.getHealth(htrCtx.switchNr) != HasHealthIF::EXTERNAL_CONTROL*/) {
|
||||||
sif::info << "TCS: Heater " << static_cast<int>(ctrlCtx.thermalComponent) << " OFF"
|
sif::info << "TCS: Heater " << static_cast<int>(ctrlCtx.thermalComponent) << " OFF"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
heaterSwitchHelper(htrCtx.switchNr, heater::SwitchState::OFF, ctrlCtx.thermalComponent);
|
heaterSwitchHelper(htrCtx.switchNr, heater::SwitchState::OFF, ctrlCtx.thermalComponent);
|
||||||
|
Loading…
Reference in New Issue
Block a user