diff --git a/fsfw b/fsfw index 6dd6f28d..bbe21e7e 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 6dd6f28db0259ec37c351a81ee8d26696f47118a +Subproject commit bbe21e7e8957a39e6697c6dd4fb2fe044b560044 diff --git a/mission/system/TcsSubsystem.cpp b/mission/system/TcsSubsystem.cpp index 2d697d61..bddd8398 100644 --- a/mission/system/TcsSubsystem.cpp +++ b/mission/system/TcsSubsystem.cpp @@ -4,16 +4,14 @@ TcsSubsystem::TcsSubsystem(object_id_t objectId, object_id_t parentId, PowerSwitchIF* pwrSwitcher, power::Switch_t theSwitch, TcsBoardHelper helper) - : SubsystemBase(objectId, parentId, MODE_OFF, 24), + : AssemblyBase(objectId, parentId, 24), switcher(pwrSwitcher, theSwitch), helper(helper) {} -ReturnValue_t TcsSubsystem::handleCommandMessage(CommandMessage* message) { return RETURN_OK; } - void TcsSubsystem::performChildOperation() { switcher.doStateMachine(); if (not switcher.active()) { - + AssemblyBase::performChildOperation(); } } @@ -35,5 +33,3 @@ ReturnValue_t TcsSubsystem::initialize() { } return SubsystemBase::initialize(); } - -void TcsSubsystem::startTransition(Mode_t mode, Submode_t submode) {} diff --git a/mission/system/TcsSubsystem.h b/mission/system/TcsSubsystem.h index 7ccf51cf..7d023b5b 100644 --- a/mission/system/TcsSubsystem.h +++ b/mission/system/TcsSubsystem.h @@ -2,8 +2,8 @@ #define MISSION_SYSTEM_TCSSUBSYSTEM_H_ #include +#include #include -#include struct TcsBoardHelper { TcsBoardHelper(std::array rtdIds) : rtdIds(rtdIds) {} @@ -11,27 +11,25 @@ struct TcsBoardHelper { std::array rtdIds = {}; }; -class TcsSubsystem : public SubsystemBase { +class TcsSubsystem : public AssemblyBase { public: TcsSubsystem(object_id_t objectId, object_id_t parentId, PowerSwitchIF *pwrSwitcher, power::Switch_t switcher, TcsBoardHelper helper); ReturnValue_t initialize() override; + void performChildOperation() override; private: static constexpr uint8_t NUMBER_RTDS = 16; PowerSwitcher switcher; TcsBoardHelper helper; FixedArrayList modeTable; - ReturnValue_t handleCommandMessage(CommandMessage *message) override; - - void performChildOperation() override; - + ReturnValue_t commandChildren(Mode_t mode, Submode_t submode) override; + ReturnValue_t checkChildrenStateOn(Mode_t wantedMode, Submode_t wantedSubmode) override; + ReturnValue_t isModeCombinationValid(Mode_t mode, Submode_t submode) override; ReturnValue_t checkModeCommand(Mode_t mode, Submode_t submode, - uint32_t *msToReachTheMode) override; - - void startTransition(Mode_t mode, Submode_t submode) override; + uint32_t* msToReachTheMode) override; }; #endif /* MISSION_SYSTEM_TCSSUBSYSTEM_H_ */