|
|
|
@ -988,13 +988,15 @@ void ThermalController::ctrlAcsBoard() {
|
|
|
|
|
sensors[4].first = sensorTemperatures.tcsBoard.isValid();
|
|
|
|
|
sensors[4].second = sensorTemperatures.tcsBoard.value;
|
|
|
|
|
numSensors = 5;
|
|
|
|
|
if (selectAndReadSensorTemp()) {
|
|
|
|
|
if (chooseHeater(switchNr, redSwitchNr)) {
|
|
|
|
|
HeaterContext htrCtx(switchNr, redSwitchNr, acsBoardLimits);
|
|
|
|
|
checkLimitsAndCtrlHeater(htrCtx);
|
|
|
|
|
{
|
|
|
|
|
HeaterContext htrCtx(switchNr, redSwitchNr, acsBoardLimits);
|
|
|
|
|
if (selectAndReadSensorTemp(htrCtx)) {
|
|
|
|
|
if (chooseHeater(switchNr, redSwitchNr)) {
|
|
|
|
|
checkLimitsAndCtrlHeater(htrCtx);
|
|
|
|
|
}
|
|
|
|
|
resetSensorsArray();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
resetSensorsArray();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
resetSensorsArray();
|
|
|
|
|
// B side
|
|
|
|
@ -1007,15 +1009,18 @@ void ThermalController::ctrlAcsBoard() {
|
|
|
|
|
sensors[3].first = sensorTemperatures.tcsBoard.isValid();
|
|
|
|
|
sensors[3].second = sensorTemperatures.tcsBoard.value;
|
|
|
|
|
numSensors = 4;
|
|
|
|
|
if (selectAndReadSensorTemp()) {
|
|
|
|
|
if (chooseHeater(switchNr, redSwitchNr)) {
|
|
|
|
|
HeaterContext htrCtx(switchNr, redSwitchNr, acsBoardLimits);
|
|
|
|
|
checkLimitsAndCtrlHeater(htrCtx);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (chooseHeater(switchNr, redSwitchNr)) {
|
|
|
|
|
if (heaterHandler.getSwitchState(switchNr)) {
|
|
|
|
|
heaterHandler.switchHeater(switchNr, HeaterHandler::SwitchState::OFF);
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
HeaterContext htrCtx(switchNr, redSwitchNr, acsBoardLimits);
|
|
|
|
|
if (selectAndReadSensorTemp(htrCtx)) {
|
|
|
|
|
if (chooseHeater(switchNr, redSwitchNr)) {
|
|
|
|
|
checkLimitsAndCtrlHeater(htrCtx);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (chooseHeater(switchNr, redSwitchNr)) {
|
|
|
|
|
if (heaterHandler.getSwitchState(switchNr)) {
|
|
|
|
|
heaterHandler.switchHeater(switchNr, HeaterHandler::SwitchState::OFF);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1546,7 +1551,7 @@ void ThermalController::performThermalModuleCtrl(const HeaterSwitchStates& heate
|
|
|
|
|
heaterTransitionControl(heaterSwitchStates);
|
|
|
|
|
}
|
|
|
|
|
void ThermalController::ctrlComponentTemperature(HeaterContext& htrCtx) {
|
|
|
|
|
if (selectAndReadSensorTemp()) {
|
|
|
|
|
if (selectAndReadSensorTemp(htrCtx)) {
|
|
|
|
|
if (chooseHeater(htrCtx.switchNr, htrCtx.redSwitchNr)) {
|
|
|
|
|
checkLimitsAndCtrlHeater(htrCtx);
|
|
|
|
|
}
|
|
|
|
@ -1560,9 +1565,11 @@ void ThermalController::ctrlComponentTemperature(HeaterContext& htrCtx) {
|
|
|
|
|
}
|
|
|
|
|
resetSensorsArray();
|
|
|
|
|
}
|
|
|
|
|
bool ThermalController::selectAndReadSensorTemp() {
|
|
|
|
|
bool ThermalController::selectAndReadSensorTemp(HeaterContext& htrCtx) {
|
|
|
|
|
for (unsigned i = 0; i < numSensors; i++) {
|
|
|
|
|
if (sensors[i].first and sensors[i].second != INVALID_TEMPERATURE) {
|
|
|
|
|
if (sensors[i].first and sensors[i].second != INVALID_TEMPERATURE and
|
|
|
|
|
sensors[i].second > SANITY_LIMIT_LOWER_TEMP and
|
|
|
|
|
sensors[i].second < SANITY_LIMIT_UPPER_TEMP) {
|
|
|
|
|
sensorTemp = sensors[i].second;
|
|
|
|
|
thermalStates[thermalComponent].errorCounter = 0;
|
|
|
|
|
return true;
|
|
|
|
|