From 378120416ad99aaf0dc90dd20c387daf5adeb284 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 17 Feb 2023 13:04:40 +0100 Subject: [PATCH] attach heater handler to TCS subsystem --- mission/core/GenericFactory.cpp | 2 ++ mission/devices/HeaterHandler.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/mission/core/GenericFactory.cpp b/mission/core/GenericFactory.cpp index 992c0093..b62c8af3 100644 --- a/mission/core/GenericFactory.cpp +++ b/mission/core/GenericFactory.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -219,6 +220,7 @@ void ObjectFactory::createGenericHeaterComponents(GpioIF& gpioIF, PowerSwitchIF& }}); heaterHandler = new HeaterHandler(objects::HEATER_HANDLER, &gpioIF, helper, &pwrSwitcher, pcdu::Switches::PDU2_CH3_TCS_BOARD_HEATER_IN_8V); + heaterHandler->connectModeTreeParent(satsystem::tcs::SUBSYSTEM); } void ObjectFactory::createThermalController(HeaterHandler& heaterHandler) { diff --git a/mission/devices/HeaterHandler.h b/mission/devices/HeaterHandler.h index ac856d9c..ecb77ad1 100644 --- a/mission/devices/HeaterHandler.h +++ b/mission/devices/HeaterHandler.h @@ -66,6 +66,8 @@ class HeaterHandler : public ExecutableObjectIF, HeaterHandler(object_id_t setObjectId, GpioIF* gpioInterface_, HeaterHelper helper, PowerSwitchIF* mainLineSwitcherObjectId, power::Switch_t mainLineSwitch); + ReturnValue_t connectModeTreeParent(HasModeTreeChildrenIF& parent) override; + virtual ~HeaterHandler(); protected: @@ -190,7 +192,6 @@ class HeaterHandler : public ExecutableObjectIF, object_id_t getObjectId() const override; const HasHealthIF* getOptHealthIF() const override; const HasModesIF& getModeIF() const override; - ReturnValue_t connectModeTreeParent(HasModeTreeChildrenIF& parent) override; ModeTreeChildIF& getModeTreeChildIF() override; void handleSwitchOnCommand(heater::Switchers heaterIdx);