TCS Ctrl Time Limit not for Heaters in External Control #878
@ -1641,7 +1641,9 @@ bool ThermalController::chooseHeater(heater::Switch& switchNr, heater::Switch re
|
|||||||
bool heaterAvailable = true;
|
bool heaterAvailable = true;
|
||||||
|
|
||||||
HasHealthIF::HealthState mainHealth = heaterHandler.getHealth(switchNr);
|
HasHealthIF::HealthState mainHealth = heaterHandler.getHealth(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::HEALTHY) {
|
if (mainHealth != HasHealthIF::HEALTHY) {
|
||||||
if (redHealth == HasHealthIF::HEALTHY) {
|
if (redHealth == HasHealthIF::HEALTHY) {
|
||||||
switchNr = redSwitchNr;
|
switchNr = redSwitchNr;
|
||||||
@ -1656,6 +1658,8 @@ bool ThermalController::chooseHeater(heater::Switch& switchNr, heater::Switch re
|
|||||||
} else {
|
} else {
|
||||||
ctrlCtx.redSwitchNrInUse = false;
|
ctrlCtx.redSwitchNrInUse = false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return heaterAvailable;
|
return heaterAvailable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user