formal changes

This commit is contained in:
Irini Kosmidou 2023-02-24 13:39:23 +01:00
parent 9a7779cffb
commit 63275df3f0
2 changed files with 50 additions and 50 deletions

View File

@ -955,7 +955,7 @@ void ThermalController::ctrlAcsBoard() {
heater::Switchers redSwitchNr = heater::HEATER_0_OBC_BRD; heater::Switchers redSwitchNr = heater::HEATER_0_OBC_BRD;
// A side // A side
thermalComponent = acsBoard; thermalComponent = ACS_BOARD;
sensors[0].first = deviceTemperatures.gyro0SideA.isValid(); sensors[0].first = deviceTemperatures.gyro0SideA.isValid();
sensors[0].second = deviceTemperatures.gyro0SideA.value; sensors[0].second = deviceTemperatures.gyro0SideA.value;
sensors[1].first = deviceTemperatures.mgm0SideA.isValid(); sensors[1].first = deviceTemperatures.mgm0SideA.isValid();
@ -999,7 +999,7 @@ void ThermalController::ctrlAcsBoard() {
} }
void ThermalController::ctrlMgt() { void ThermalController::ctrlMgt() {
thermalComponent = mgt; thermalComponent = MGT;
PoolReadGuard pg(&imtqThermalSet); PoolReadGuard pg(&imtqThermalSet);
auto heaterReq = auto heaterReq =
static_cast<ThermalComponentIF::StateRequest>(imtqThermalSet.heaterRequest.value); static_cast<ThermalComponentIF::StateRequest>(imtqThermalSet.heaterRequest.value);
@ -1019,7 +1019,7 @@ void ThermalController::ctrlMgt() {
void ThermalController::ctrlRw() { void ThermalController::ctrlRw() {
// TODO: better solution? // TODO: better solution?
// RW1 // RW1
thermalComponent = rw; thermalComponent = RW;
sensors[0].first = sensorTemperatures.sensor_rw1.isValid(); sensors[0].first = sensorTemperatures.sensor_rw1.isValid();
sensors[0].second = sensorTemperatures.sensor_rw1.value; sensors[0].second = sensorTemperatures.sensor_rw1.value;
sensors[1].first = deviceTemperatures.rw1.isValid(); sensors[1].first = deviceTemperatures.rw1.isValid();
@ -1032,7 +1032,7 @@ void ThermalController::ctrlRw() {
ctrlComponentTemperature(heater::HEATER_6_DRO, heater::HEATER_6_DRO, rwLimits); ctrlComponentTemperature(heater::HEATER_6_DRO, heater::HEATER_6_DRO, rwLimits);
// RW2 // RW2
thermalComponent = rw; thermalComponent = RW;
sensors[0].first = deviceTemperatures.rw2.isValid(); sensors[0].first = deviceTemperatures.rw2.isValid();
sensors[0].second = deviceTemperatures.rw2.value; sensors[0].second = deviceTemperatures.rw2.value;
sensors[1].first = deviceTemperatures.rw3.isValid(); sensors[1].first = deviceTemperatures.rw3.isValid();
@ -1045,7 +1045,7 @@ void ThermalController::ctrlRw() {
ctrlComponentTemperature(heater::HEATER_6_DRO, heater::HEATER_6_DRO, rwLimits); ctrlComponentTemperature(heater::HEATER_6_DRO, heater::HEATER_6_DRO, rwLimits);
// RW3 // RW3
thermalComponent = rw; thermalComponent = RW;
sensors[0].first = deviceTemperatures.rw3.isValid(); sensors[0].first = deviceTemperatures.rw3.isValid();
sensors[0].second = deviceTemperatures.rw3.value; sensors[0].second = deviceTemperatures.rw3.value;
sensors[1].first = deviceTemperatures.rw4.isValid(); sensors[1].first = deviceTemperatures.rw4.isValid();
@ -1058,7 +1058,7 @@ void ThermalController::ctrlRw() {
ctrlComponentTemperature(heater::HEATER_6_DRO, heater::HEATER_6_DRO, rwLimits); ctrlComponentTemperature(heater::HEATER_6_DRO, heater::HEATER_6_DRO, rwLimits);
// RW4 // RW4
thermalComponent = rw; thermalComponent = RW;
sensors[0].first = deviceTemperatures.rw4.isValid(); sensors[0].first = deviceTemperatures.rw4.isValid();
sensors[0].second = deviceTemperatures.rw4.value; sensors[0].second = deviceTemperatures.rw4.value;
sensors[1].first = deviceTemperatures.rw1.isValid(); sensors[1].first = deviceTemperatures.rw1.isValid();
@ -1072,7 +1072,7 @@ void ThermalController::ctrlRw() {
} }
void ThermalController::ctrlStr() { void ThermalController::ctrlStr() {
thermalComponent = str; thermalComponent = STR;
sensors[0].first = sensorTemperatures.sensor_startracker.isValid(); sensors[0].first = sensorTemperatures.sensor_startracker.isValid();
sensors[0].second = sensorTemperatures.sensor_startracker.value; sensors[0].second = sensorTemperatures.sensor_startracker.value;
sensors[1].first = deviceTemperatures.startracker.isValid(); sensors[1].first = deviceTemperatures.startracker.isValid();
@ -1084,7 +1084,7 @@ void ThermalController::ctrlStr() {
} }
void ThermalController::ctrlIfBoard() { void ThermalController::ctrlIfBoard() {
thermalComponent = ifBoard; thermalComponent = IF_BOARD;
sensors[0].first = sensorTemperatures.tmp1075IfBrd.isValid(); sensors[0].first = sensorTemperatures.tmp1075IfBrd.isValid();
sensors[0].second = sensorTemperatures.tmp1075IfBrd.value; sensors[0].second = sensorTemperatures.tmp1075IfBrd.value;
sensors[1].first = sensorTemperatures.sensor_magnettorquer.isValid(); sensors[1].first = sensorTemperatures.sensor_magnettorquer.isValid();
@ -1096,7 +1096,7 @@ void ThermalController::ctrlIfBoard() {
} }
void ThermalController::ctrlTcsBoard() { void ThermalController::ctrlTcsBoard() {
thermalComponent = tcsBoard; thermalComponent = TCS_BOARD;
sensors[0].first = sensorTemperatures.sensor_tcs_board.isValid(); sensors[0].first = sensorTemperatures.sensor_tcs_board.isValid();
sensors[0].second = sensorTemperatures.sensor_tcs_board.value; sensors[0].second = sensorTemperatures.sensor_tcs_board.value;
sensors[1].first = sensorTemperatures.tmp1075Tcs0.isValid(); sensors[1].first = sensorTemperatures.tmp1075Tcs0.isValid();
@ -1108,7 +1108,7 @@ void ThermalController::ctrlTcsBoard() {
} }
void ThermalController::ctrlObc() { void ThermalController::ctrlObc() {
thermalComponent = obc; thermalComponent = OBC;
sensors[0].first = deviceTemperatures.q7s.isValid(); sensors[0].first = deviceTemperatures.q7s.isValid();
sensors[0].second = deviceTemperatures.q7s.value; sensors[0].second = deviceTemperatures.q7s.value;
sensors[1].first = sensorTemperatures.tmp1075Tcs1.isValid(); sensors[1].first = sensorTemperatures.tmp1075Tcs1.isValid();
@ -1123,7 +1123,7 @@ void ThermalController::ctrlObc() {
} }
void ThermalController::ctrlObcIfBoard() { void ThermalController::ctrlObcIfBoard() {
thermalComponent = obcIfBoard; thermalComponent = OBCIF_BOARD;
sensors[0].first = deviceTemperatures.q7s.isValid(); sensors[0].first = deviceTemperatures.q7s.isValid();
sensors[0].second = deviceTemperatures.q7s.value; sensors[0].second = deviceTemperatures.q7s.value;
sensors[1].first = sensorTemperatures.tmp1075Tcs0.isValid(); sensors[1].first = sensorTemperatures.tmp1075Tcs0.isValid();
@ -1135,7 +1135,7 @@ void ThermalController::ctrlObcIfBoard() {
} }
void ThermalController::ctrlSBandTransceiver() { void ThermalController::ctrlSBandTransceiver() {
thermalComponent = sBandTransceiver; thermalComponent = SBAND_TRANSCEIVER;
sensors[0].first = deviceTemperatures.syrlinksPowerAmplifier.isValid(); sensors[0].first = deviceTemperatures.syrlinksPowerAmplifier.isValid();
sensors[0].second = deviceTemperatures.syrlinksPowerAmplifier.value; sensors[0].second = deviceTemperatures.syrlinksPowerAmplifier.value;
sensors[1].first = deviceTemperatures.syrlinksBasebandBoard.isValid(); sensors[1].first = deviceTemperatures.syrlinksBasebandBoard.isValid();
@ -1150,7 +1150,7 @@ void ThermalController::ctrlSBandTransceiver() {
} }
} }
void ThermalController::ctrlPcduP60Board() { void ThermalController::ctrlPcduP60Board() {
thermalComponent = pcduP60Board; thermalComponent = PCDUP60_BOARD;
sensors[0].first = deviceTemperatures.temp1P60dock.isValid(); sensors[0].first = deviceTemperatures.temp1P60dock.isValid();
sensors[0].second = deviceTemperatures.temp1P60dock.value; sensors[0].second = deviceTemperatures.temp1P60dock.value;
sensors[1].first = deviceTemperatures.temp2P60dock.isValid(); sensors[1].first = deviceTemperatures.temp2P60dock.isValid();
@ -1160,7 +1160,7 @@ void ThermalController::ctrlPcduP60Board() {
} }
void ThermalController::ctrlPcduAcu() { void ThermalController::ctrlPcduAcu() {
thermalComponent = pcduAcu; thermalComponent = PCDUACU;
heater::Switchers switchNr = heater::HEATER_3_PCDU_PDU; heater::Switchers switchNr = heater::HEATER_3_PCDU_PDU;
heater::Switchers redSwitchNr = heater::HEATER_2_ACS_BRD; heater::Switchers redSwitchNr = heater::HEATER_2_ACS_BRD;
@ -1187,7 +1187,7 @@ void ThermalController::ctrlPcduAcu() {
} }
void ThermalController::ctrlPcduPdu() { void ThermalController::ctrlPcduPdu() {
thermalComponent = pcduPdu; thermalComponent = PCDUPDU;
sensors[0].first = deviceTemperatures.pdu1.isValid(); sensors[0].first = deviceTemperatures.pdu1.isValid();
sensors[0].second = deviceTemperatures.pdu1.value; sensors[0].second = deviceTemperatures.pdu1.value;
sensors[1].first = deviceTemperatures.pdu2.isValid(); sensors[1].first = deviceTemperatures.pdu2.isValid();
@ -1199,7 +1199,7 @@ void ThermalController::ctrlPcduPdu() {
} }
void ThermalController::ctrlPlPcduBoard() { void ThermalController::ctrlPlPcduBoard() {
thermalComponent = plPcduBoard; thermalComponent = PLPCDU_BOARD;
sensors[0].first = sensorTemperatures.tmp1075PlPcdu0.isValid(); sensors[0].first = sensorTemperatures.tmp1075PlPcdu0.isValid();
sensors[0].second = sensorTemperatures.tmp1075PlPcdu0.value; sensors[0].second = sensorTemperatures.tmp1075PlPcdu0.value;
sensors[1].first = sensorTemperatures.tmp1075PlPcdu1.isValid(); sensors[1].first = sensorTemperatures.tmp1075PlPcdu1.isValid();
@ -1216,7 +1216,7 @@ void ThermalController::ctrlPlPcduBoard() {
} }
void ThermalController::ctrlPlocMissionBoard() { void ThermalController::ctrlPlocMissionBoard() {
thermalComponent = plocMissionBoard; thermalComponent = PLOCMISSION_BOARD;
sensors[0].first = sensorTemperatures.sensor_ploc_heatspreader.isValid(); sensors[0].first = sensorTemperatures.sensor_ploc_heatspreader.isValid();
sensors[0].second = sensorTemperatures.sensor_ploc_heatspreader.value; sensors[0].second = sensorTemperatures.sensor_ploc_heatspreader.value;
sensors[1].first = sensorTemperatures.sensor_ploc_missionboard.isValid(); sensors[1].first = sensorTemperatures.sensor_ploc_missionboard.isValid();
@ -1232,7 +1232,7 @@ void ThermalController::ctrlPlocMissionBoard() {
} }
void ThermalController::ctrlPlocProcessingBoard() { void ThermalController::ctrlPlocProcessingBoard() {
thermalComponent = plocProcessingBoard; thermalComponent = PLOCPROCESSING_BOARD;
sensors[0].first = sensorTemperatures.sensor_ploc_missionboard.isValid(); sensors[0].first = sensorTemperatures.sensor_ploc_missionboard.isValid();
sensors[0].second = sensorTemperatures.sensor_ploc_missionboard.value; sensors[0].second = sensorTemperatures.sensor_ploc_missionboard.value;
sensors[1].first = sensorTemperatures.sensor_ploc_heatspreader.isValid(); sensors[1].first = sensorTemperatures.sensor_ploc_heatspreader.isValid();
@ -1245,7 +1245,7 @@ void ThermalController::ctrlPlocProcessingBoard() {
} }
void ThermalController::ctrlDac() { void ThermalController::ctrlDac() {
thermalComponent = dac; thermalComponent = DAC;
sensors[0].first = sensorTemperatures.sensor_dac_heatspreader.isValid(); sensors[0].first = sensorTemperatures.sensor_dac_heatspreader.isValid();
sensors[0].second = sensorTemperatures.sensor_dac_heatspreader.value; sensors[0].second = sensorTemperatures.sensor_dac_heatspreader.value;
sensors[1].first = sensorTemperatures.sensor_ploc_missionboard.isValid(); sensors[1].first = sensorTemperatures.sensor_ploc_missionboard.isValid();
@ -1257,7 +1257,7 @@ void ThermalController::ctrlDac() {
} }
void ThermalController::ctrlCameraBody() { void ThermalController::ctrlCameraBody() {
thermalComponent = camera; thermalComponent = CAMERA;
sensors[0].first = sensorTemperatures.sensor_4k_camera.isValid(); sensors[0].first = sensorTemperatures.sensor_4k_camera.isValid();
sensors[0].second = sensorTemperatures.sensor_4k_camera.value; sensors[0].second = sensorTemperatures.sensor_4k_camera.value;
sensors[1].first = sensorTemperatures.sensor_dro.isValid(); sensors[1].first = sensorTemperatures.sensor_dro.isValid();
@ -1269,7 +1269,7 @@ void ThermalController::ctrlCameraBody() {
} }
void ThermalController::ctrlDro() { void ThermalController::ctrlDro() {
thermalComponent = dro; thermalComponent = DRO;
sensors[0].first = sensorTemperatures.sensor_dro.isValid(); sensors[0].first = sensorTemperatures.sensor_dro.isValid();
sensors[0].second = sensorTemperatures.sensor_dro.value; sensors[0].second = sensorTemperatures.sensor_dro.value;
sensors[1].first = sensorTemperatures.sensor_4k_camera.isValid(); sensors[1].first = sensorTemperatures.sensor_4k_camera.isValid();
@ -1281,7 +1281,7 @@ void ThermalController::ctrlDro() {
} }
void ThermalController::ctrlX8() { void ThermalController::ctrlX8() {
thermalComponent = x8; thermalComponent = X8;
sensors[0].first = sensorTemperatures.sensor_x8.isValid(); sensors[0].first = sensorTemperatures.sensor_x8.isValid();
sensors[0].second = sensorTemperatures.sensor_x8.value; sensors[0].second = sensorTemperatures.sensor_x8.value;
sensors[1].first = sensorTemperatures.sensor_hpa.isValid(); sensors[1].first = sensorTemperatures.sensor_hpa.isValid();
@ -1293,7 +1293,7 @@ void ThermalController::ctrlX8() {
} }
void ThermalController::ctrlTx() { void ThermalController::ctrlTx() {
thermalComponent = tx; thermalComponent = TX;
sensors[0].first = sensorTemperatures.sensor_tx_modul.isValid(); sensors[0].first = sensorTemperatures.sensor_tx_modul.isValid();
sensors[0].second = sensorTemperatures.sensor_tx_modul.value; sensors[0].second = sensorTemperatures.sensor_tx_modul.value;
sensors[1].first = sensorTemperatures.sensor_x8.isValid(); sensors[1].first = sensorTemperatures.sensor_x8.isValid();
@ -1305,7 +1305,7 @@ void ThermalController::ctrlTx() {
} }
void ThermalController::ctrlMpa() { void ThermalController::ctrlMpa() {
thermalComponent = mpa; thermalComponent = MPA;
sensors[0].first = sensorTemperatures.sensor_mpa.isValid(); sensors[0].first = sensorTemperatures.sensor_mpa.isValid();
sensors[0].second = sensorTemperatures.sensor_mpa.value; sensors[0].second = sensorTemperatures.sensor_mpa.value;
sensors[1].first = sensorTemperatures.sensor_hpa.isValid(); sensors[1].first = sensorTemperatures.sensor_hpa.isValid();
@ -1317,7 +1317,7 @@ void ThermalController::ctrlMpa() {
} }
void ThermalController::ctrlHpa() { void ThermalController::ctrlHpa() {
thermalComponent = hpa; thermalComponent = HPA;
sensors[0].first = sensorTemperatures.sensor_hpa.isValid(); sensors[0].first = sensorTemperatures.sensor_hpa.isValid();
sensors[0].second = sensorTemperatures.sensor_hpa.value; sensors[0].second = sensorTemperatures.sensor_hpa.value;
sensors[1].first = sensorTemperatures.sensor_x8.isValid(); sensors[1].first = sensorTemperatures.sensor_x8.isValid();
@ -1332,7 +1332,7 @@ void ThermalController::ctrlHpa() {
} }
void ThermalController::ctrlScexBoard() { void ThermalController::ctrlScexBoard() {
thermalComponent = scexBoard; thermalComponent = SCEX_BOARD;
sensors[0].first = sensorTemperatures.sensor_scex.isValid(); sensors[0].first = sensorTemperatures.sensor_scex.isValid();
sensors[0].second = sensorTemperatures.sensor_scex.value; sensors[0].second = sensorTemperatures.sensor_scex.value;
sensors[1].first = sensorTemperatures.sensor_x8.isValid(); sensors[1].first = sensorTemperatures.sensor_x8.isValid();
@ -1397,7 +1397,7 @@ bool ThermalController::selectAndReadSensorTemp() {
} }
thermalStates[thermalComponent].errorCounter++; thermalStates[thermalComponent].errorCounter++;
if (thermalComponent != rw and thermalComponent != acsBoard) { if (thermalComponent != RW and thermalComponent != ACS_BOARD) {
if (thermalStates[thermalComponent].errorCounter <= 3) { if (thermalStates[thermalComponent].errorCounter <= 3) {
triggerEvent(NO_VALID_SENSOR_TEMPERATURE, thermalComponent); triggerEvent(NO_VALID_SENSOR_TEMPERATURE, thermalComponent);
} }

View File

@ -52,29 +52,29 @@ struct HeaterState {
enum ThermalComponents : uint8_t { enum ThermalComponents : uint8_t {
// TODO: Großbuchstaben // TODO: Großbuchstaben
NONE = 0, NONE = 0,
acsBoard = 1, ACS_BOARD = 1,
mgt = 2, MGT = 2,
rw = 3, RW = 3,
str = 4, STR = 4,
ifBoard = 5, IF_BOARD = 5,
tcsBoard = 6, TCS_BOARD = 6,
obc = 7, OBC = 7,
obcIfBoard = 8, OBCIF_BOARD = 8,
sBandTransceiver = 9, SBAND_TRANSCEIVER = 9,
pcduP60Board = 10, PCDUP60_BOARD = 10,
pcduAcu = 11, PCDUACU = 11,
pcduPdu = 12, PCDUPDU = 12,
plPcduBoard = 13, PLPCDU_BOARD = 13,
plocMissionBoard = 14, PLOCMISSION_BOARD = 14,
plocProcessingBoard = 15, PLOCPROCESSING_BOARD = 15,
dac = 16, DAC = 16,
camera = 17, CAMERA = 17,
dro = 18, DRO = 18,
x8 = 19, X8 = 19,
hpa = 20, HPA = 20,
tx = 21, TX = 21,
mpa = 22, MPA = 22,
scexBoard = 23, SCEX_BOARD = 23,
NUM_ENTRIES NUM_ENTRIES
}; };