now it compiles
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
Robin Müller 2023-01-17 15:55:36 +01:00
parent 5e7a088da9
commit d447f4ba42
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
3 changed files with 9 additions and 6 deletions

View File

@ -35,6 +35,7 @@ enum : uint8_t {
SYRLINKS = 137,
SCEX_HANDLER = 138,
CONFIGHANDLER = 139,
TCS_CONTROLLER = 140,
COMMON_SUBSYSTEM_ID_END
};

View File

@ -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<ThermalComponentIF::StateRequest>(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;
}

View File

@ -2,6 +2,7 @@
#define MISSION_CONTROLLER_THERMALCONTROLLER_H_
#include <fsfw/controller/ExtendedControllerBase.h>
#include <fsfw/devicehandlers/DeviceHandlerThermalSet.h>
#include <fsfw/timemanager/Countdown.h>
#include <mission/controller/controllerdefinitions/ThermalControllerDefinitions.h>
#include <mission/devices/devicedefinitions/Max31865Definitions.h>
@ -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;