ThermalController changes
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit

This commit is contained in:
Irini Kosmidou 2023-01-22 21:04:55 +01:00
parent 6fd10e7180
commit 0e2ae50fc5

View File

@ -1059,9 +1059,31 @@ void ThermalController::ctrlPcduP60Board() {
} }
void ThermalController::ctrlPcduAcu() { void ThermalController::ctrlPcduAcu() {
// TODO: check sensors (float,3) heater::Switchers switchNr = heater::HEATER_3_PCDU_PDU;
// ctrlComponentTemperature(heater::HEATER_3_PCDU_PDU, heater::HEATER_2_ACS_BRD, heater::Switchers redSwitchNr = heater::HEATER_2_ACS_BRD;
// deviceTemperatures.acu, deviceTemperatures.acu, sensorTemperatures.sensor_acu, &pcduAcuLimits);
chooseHeater(switchNr, redSwitchNr);
if (heaterAvailable) {
sensorTempAvailable = true;
if (deviceTemperatures.acu.isValid()) { // TODO: how to check the different values
sensorTemp = deviceTemperatures.acu.value[0]; // TODO: check if right
} else if (deviceTemperatures.acu.isValid()) {
sensorTemp = deviceTemperatures.acu.value[1];
} else if (sensorTemperatures.sensor_acu.isValid()) {
sensorTemp = sensorTemperatures.sensor_acu.value;
} else {
if (heaterHandler.checkSwitchState(switchNr)) {
heaterHandler.switchHeater(switchNr, HeaterHandler::SwitchState::OFF);
}
triggerEvent(NO_VALID_SENSOR_TEMPERATURE, switchNr);
sensorTempAvailable = false;
if (sensorTempAvailable) {
ctrlHeater(switchNr, redSwitchNr, &pcduAcuLimits);
}
}
}
} }
void ThermalController::ctrlPcduPdu() { void ThermalController::ctrlPcduPdu() {
@ -1072,10 +1094,33 @@ void ThermalController::ctrlPcduPdu() {
} }
void ThermalController::ctrlPlPcduBoard() { void ThermalController::ctrlPlPcduBoard() {
// TODO: add sensor 4: sensorTemperatures.sensor_plpcdu_heatspreader heater::Switchers switchNr = heater::HEATER_3_PCDU_PDU;
ctrlComponentTemperature(heater::HEATER_3_PCDU_PDU, heater::HEATER_2_ACS_BRD, heater::Switchers redSwitchNr = heater::HEATER_2_ACS_BRD;
sensorTemperatures.tmp1075PlPcdu0, sensorTemperatures.tmp1075PlPcdu1,
deviceTemperatures.adcPayloadPcdu, &plPcduBoardLimits); chooseHeater(switchNr, redSwitchNr);
if (heaterAvailable) {
sensorTempAvailable = true;
if (sensorTemperatures.tmp1075PlPcdu0.isValid()) {
sensorTemp = sensorTemperatures.tmp1075PlPcdu0.value;
} else if (sensorTemperatures.tmp1075PlPcdu1.isValid()) {
sensorTemp = sensorTemperatures.tmp1075PlPcdu1.value;
} else if (deviceTemperatures.adcPayloadPcdu.isValid()) {
sensorTemp = deviceTemperatures.adcPayloadPcdu.value;
} else if (sensorTemperatures.sensor_plpcdu_heatspreader.isValid()) {
sensorTemp = sensorTemperatures.sensor_plpcdu_heatspreader.value;
} else {
if (heaterHandler.checkSwitchState(switchNr)) {
heaterHandler.switchHeater(switchNr, HeaterHandler::SwitchState::OFF);
}
triggerEvent(NO_VALID_SENSOR_TEMPERATURE, switchNr);
sensorTempAvailable = false;
if (sensorTempAvailable) {
ctrlHeater(switchNr, redSwitchNr, &plPcduBoardLimits);
}
}
}
} }
void ThermalController::ctrlPlocMissionBoard() { void ThermalController::ctrlPlocMissionBoard() {