diff --git a/CHANGELOG.md b/CHANGELOG.md index 8049f154..e1ff3ead 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,10 +22,18 @@ will consitute of a breaking change warranting a new major release: - Added parameter to disable STR input for MEKF. +## Changed + +- If a primary heater is set to `EXTERNAL CONTROL` and `ON`, the `TCS Controller` will no + try to control the temperature of that object. +- Set lower OP limit of `PLOC` to -5°C. + ## Fixed - Added prevention of sign jump for target quaternion of GS pointing, which would reduce the performance of the controller. +- Heaters set to `EXTERNAL CONTROL` no longer can be switched off by the `TCS Controller`, if + they violate the maximum burn duration of the controller. # [v7.7.2] 2024-03-06 diff --git a/mission/controller/ThermalController.cpp b/mission/controller/ThermalController.cpp index 2729cec0..c406a5be 100644 --- a/mission/controller/ThermalController.cpp +++ b/mission/controller/ThermalController.cpp @@ -1641,7 +1641,11 @@ bool ThermalController::chooseHeater(heater::Switch& switchNr, heater::Switch re bool heaterAvailable = true; HasHealthIF::HealthState mainHealth = heaterHandler.getHealth(switchNr); + heater::SwitchState mainState = heaterHandler.getSwitchState(switchNr); HasHealthIF::HealthState redHealth = heaterHandler.getHealth(redSwitchNr); + if (mainHealth == HasHealthIF::EXTERNAL_CONTROL and mainState == heater::SwitchState::ON) { + return false; + } if (mainHealth != HasHealthIF::HEALTHY) { if (redHealth == HasHealthIF::HEALTHY) { switchNr = redSwitchNr; @@ -1656,6 +1660,7 @@ bool ThermalController::chooseHeater(heater::Switch& switchNr, heater::Switch re } else { ctrlCtx.redSwitchNrInUse = false; } + return heaterAvailable; } @@ -1792,7 +1797,8 @@ void ThermalController::heaterMaxDurationControl( for (unsigned i = 0; i < heater::Switch::NUMBER_OF_SWITCHES; i++) { // Right now, we only track the maximum duration for heater which were commanded by the TCS // controller. - if (currentHeaterStates[i] == heater::SwitchState::ON and + if (heaterHandler.getHealth(static_cast(i)) != HasHealthIF::EXTERNAL_CONTROL and + currentHeaterStates[i] == heater::SwitchState::ON and heaterStates[i].trackHeaterMaxBurnTime and heaterStates[i].heaterOnMaxBurnTime.hasTimedOut()) { heaterStates[i].switchTransition = false; diff --git a/mission/controller/ThermalController.h b/mission/controller/ThermalController.h index 1062fe97..6b6d9cde 100644 --- a/mission/controller/ThermalController.h +++ b/mission/controller/ThermalController.h @@ -197,9 +197,9 @@ class ThermalController : public ExtendedControllerBase { tcsCtrl::TempLimits pcduAcuLimits = tcsCtrl::TempLimits(-35.0, -35.0, 80.0, 85.0, 85.0); tcsCtrl::TempLimits pcduPduLimits = tcsCtrl::TempLimits(-35.0, -35.0, 80.0, 85.0, 85.0); tcsCtrl::TempLimits plPcduBoardLimits = tcsCtrl::TempLimits(-55.0, -40.0, 80.0, 85.0, 125.0); - tcsCtrl::TempLimits plocMissionBoardLimits = tcsCtrl::TempLimits(-30.0, -10.0, 40.0, 45.0, 60); + tcsCtrl::TempLimits plocMissionBoardLimits = tcsCtrl::TempLimits(-30.0, -5.0, 40.0, 45.0, 60); tcsCtrl::TempLimits plocProcessingBoardLimits = - tcsCtrl::TempLimits(-30.0, -10.0, 40.0, 45.0, 60.0); + tcsCtrl::TempLimits(-30.0, -5.0, 40.0, 45.0, 60.0); tcsCtrl::TempLimits dacLimits = tcsCtrl::TempLimits(-65.0, -40.0, 113.0, 118.0, 150.0); tcsCtrl::TempLimits cameraLimits = tcsCtrl::TempLimits(-40.0, -30.0, 60.0, 65.0, 85.0); tcsCtrl::TempLimits droLimits = tcsCtrl::TempLimits(-40.0, -30.0, 75.0, 80.0, 90.0);