position heaterTransitionControl()
EIVE/eive-obsw/pipeline/pr-develop This commit looks good Details

This commit is contained in:
Irini Kosmidou 2023-03-09 09:37:10 +01:00
parent 7a62624687
commit 131c508cae
2 changed files with 30 additions and 33 deletions

View File

@ -22,6 +22,7 @@ ReturnValue_t TemperatureSensorInserter::initialize() {
}
ReturnValue_t TemperatureSensorInserter::performOperation(uint8_t opCode) {
// TODO: deviceSensors
if (not tempsWereInitialized) {
for (auto& rtdDummy : max31865DummyMap) {
rtdDummy.second->setTemperature(10, true);
@ -35,20 +36,16 @@ ReturnValue_t TemperatureSensorInserter::performOperation(uint8_t opCode) {
if (cycles == 10) {
max31865DummyMap[objects::RTD_9_IC12_HPA]->setTemperature(-100, true);
max31865DummyMap[objects::RTD_11_IC14_MPA]->setTemperature(-100, true);
}
if (cycles == 35){
if (cycles == 35) {
max31865DummyMap[objects::RTD_9_IC12_HPA]->setTemperature(0, true);
max31865DummyMap[objects::RTD_11_IC14_MPA]->setTemperature(0, true);
max31865DummyMap[objects::RTD_2_IC5_4K_CAMERA]->setTemperature(-100, true);
}
if (cycles == 60){
if (cycles == 60) {
max31865DummyMap[objects::RTD_9_IC12_HPA]->setTemperature(-100, true);
max31865DummyMap[objects::RTD_11_IC14_MPA]->setTemperature(0, true);
}
/*

View File

@ -1168,7 +1168,7 @@ void ThermalController::ctrlPcduAcu() {
bool sensorTempAvailable = true;
if (deviceTemperatures.acu.value[0] !=
INVALID_TEMPERATURE) { // TODO: war invalid aber Wert 0 stat 999
INVALID_TEMPERATURE) {
sensorTemp = deviceTemperatures.acu.value[0];
} else if (deviceTemperatures.acu.value[1] != INVALID_TEMPERATURE) {
sensorTemp = deviceTemperatures.acu.value[1];
@ -1344,30 +1344,30 @@ void ThermalController::ctrlScexBoard() {
}
void ThermalController::performThermalModuleCtrl() {
// ctrlAcsBoard();
// ctrlMgt();
// ctrlRw();
// ctrlStr();
// ctrlIfBoard();
// ctrlTcsBoard();
// ctrlObc();
// ctrlObcIfBoard();
// ctrlSBandTransceiver();
// ctrlPcduP60Board();
// ctrlPcduAcu();
// ctrlPcduPdu();
// ctrlPlPcduBoard();
// ctrlPlocMissionBoard();
// ctrlPlocProcessingBoard();
// ctrlDac();
ctrlCameraBody();
// ctrlDro();
// ctrlX8();
ctrlHpa();
// ctrlTx();
ctrlMpa();
// ctrlScexBoard();
// heaterTransitionControl();
ctrlAcsBoard();
ctrlMgt();
ctrlRw();
ctrlStr();
ctrlIfBoard();
ctrlTcsBoard();
ctrlObc();
ctrlObcIfBoard();
// ctrlSBandTransceiver();
ctrlPcduP60Board();
// ctrlPcduAcu();
ctrlPcduPdu();
ctrlPlPcduBoard();
ctrlPlocMissionBoard();
ctrlPlocProcessingBoard();
ctrlDac();
ctrlCameraBody();
ctrlDro();
ctrlX8();
ctrlHpa();
ctrlTx();
ctrlMpa();
ctrlScexBoard();
heaterTransitionControl();
}
void ThermalController::ctrlComponentTemperature(heater::Switchers switchNr,
heater::Switchers redSwitchNr,
@ -1385,7 +1385,6 @@ void ThermalController::ctrlComponentTemperature(heater::Switchers switchNr,
}
}
}
heaterTransitionControl();
resetSensorsArray();
}
bool ThermalController::selectAndReadSensorTemp() {
@ -1439,7 +1438,7 @@ void ThermalController::ctrlHeater(heater::Switchers switchNr, heater::Switchers
heaterStates[switchNr].switchTransition = true;
thermalStates[thermalComponent].heating = true;
// TODO: EVENT; aber heaterHandler erstellt schon event
}else{
} else {
thermalStates[thermalComponent].heating = false;
}
@ -1479,6 +1478,7 @@ void ThermalController::resetSensorsArray() {
thermalComponent = NONE;
}
void ThermalController::heaterTransitionControl() {
// TODO: Test
for (unsigned i = 0; i < 7; i++) {
if (heaterStates[i].switchTransition) {
if (heaterStates[i].heaterSwitchControlErrorCounter > 3) {