From d447f4ba42d1fa3f17c2cbb2c0ac8ea56e3afdfb Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 17 Jan 2023 15:55:36 +0100 Subject: [PATCH] now it compiles --- common/config/eive/eventSubsystemIds.h | 1 + mission/controller/ThermalController.cpp | 5 +++-- mission/controller/ThermalController.h | 9 +++++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/common/config/eive/eventSubsystemIds.h b/common/config/eive/eventSubsystemIds.h index 8785f599..29afe97e 100644 --- a/common/config/eive/eventSubsystemIds.h +++ b/common/config/eive/eventSubsystemIds.h @@ -35,6 +35,7 @@ enum : uint8_t { SYRLINKS = 137, SCEX_HANDLER = 138, CONFIGHANDLER = 139, + TCS_CONTROLLER = 140, COMMON_SUBSYSTEM_ID_END }; diff --git a/mission/controller/ThermalController.cpp b/mission/controller/ThermalController.cpp index a14f4f13..0861c08a 100644 --- a/mission/controller/ThermalController.cpp +++ b/mission/controller/ThermalController.cpp @@ -994,7 +994,8 @@ void ThermalController::ctrlAcsBoard() { void ThermalController::ctrlMgt() { // TODO: cast deviceTemperatures.mgt PoolReadGuard pg(&imtqThermalSet); - ThermalComponentIF::StateRequest heaterReq = imtqThermalSet.heaterRequest.value; + ThermalComponentIF::StateRequest heaterReq = + static_cast(imtqThermalSet.heaterRequest.value); // ctrlComponentTemperature(heater::HEATER_2_ACS_BRD, heater::HEATER_3_PCDU_PDU, // sensorTemperatures.sensor_magnettorquer, deviceTemperatures.mgt, // sensorTemperatures.sensor_plpcdu_heatspreader, &mgtLimits); @@ -1162,7 +1163,7 @@ void ThermalController::chooseHeater(heater::Switchers& switchNr, heater::Switch redSwitchNrInUse = true; } else { heaterAvailable = false; - // TODO: triggerEvent(NO_HEALTHY_HEATER_AVAILABLE, switchNr, redSwitchNr); + triggerEvent(NO_HEALTHY_HEATER_AVAILABLE, switchNr, redSwitchNr); sif::error << "ThermalController::chooseSensor: Both heater: " << switchNr << " + " << redSwitchNr << " not healthy" << std::endl; } diff --git a/mission/controller/ThermalController.h b/mission/controller/ThermalController.h index 96f0c60a..c97b3fdc 100644 --- a/mission/controller/ThermalController.h +++ b/mission/controller/ThermalController.h @@ -2,6 +2,7 @@ #define MISSION_CONTROLLER_THERMALCONTROLLER_H_ #include +#include #include #include #include @@ -54,9 +55,9 @@ class ThermalController : public ExtendedControllerBase { uint32_t* msToReachTheMode) override; private: - static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::HEATER_HANDLER; - static constexpr Event NO_VALID_SENSOR_TEMPERATURE = MAKE_EVENT(8, severity::MEDIUM); - static constexpr Event NO_HEALTHY_HEATER_AVAILABLE = MAKE_EVENT(9, severity::MEDIUM); + static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::TCS_CONTROLLER; + static constexpr Event NO_VALID_SENSOR_TEMPERATURE = MAKE_EVENT(0, severity::MEDIUM); + static constexpr Event NO_HEALTHY_HEATER_AVAILABLE = MAKE_EVENT(1, severity::MEDIUM); static const uint32_t DELAY = 500; @@ -139,7 +140,7 @@ class ThermalController : public ExtendedControllerBase { TempLimits mpaLimits = TempLimits(-40.0, -30.0, -75.0, 80.0, 90.0); TempLimits scexBoardLimits = TempLimits(-60.0, -40.0, 80.0, 85.0, 150.0); - static float sensorTemp; + float sensorTemp = 0.0; bool sensorTempAvailable = true; bool heaterAvailable = true; bool redSwitchNrInUse = false;