diff --git a/linux/devices/startracker/StarTrackerHandler.cpp b/linux/devices/startracker/StarTrackerHandler.cpp index d06b73f1..86bbc0dc 100644 --- a/linux/devices/startracker/StarTrackerHandler.cpp +++ b/linux/devices/startracker/StarTrackerHandler.cpp @@ -1223,6 +1223,13 @@ ReturnValue_t StarTrackerHandler::doSendReadHook() { return RETURN_OK; } +ReturnValue_t StarTrackerHandler::getSwitches(const uint8_t** switches, + uint8_t* numberOfSwitches) { + *numberOfSwitches = 1; + *switches = &powerSwitch; + return RETURN_OK; +} + ReturnValue_t StarTrackerHandler::checkMode(ActionId_t actionId) { switch (actionId) { case startracker::UPLOAD_IMAGE: diff --git a/linux/devices/startracker/StarTrackerHandler.h b/linux/devices/startracker/StarTrackerHandler.h index 4bc0f5a5..781eff02 100644 --- a/linux/devices/startracker/StarTrackerHandler.h +++ b/linux/devices/startracker/StarTrackerHandler.h @@ -12,6 +12,7 @@ #include "fsfw/timemanager/Countdown.h" #include "linux/devices/devicedefinitions/StarTrackerDefinitions.h" #include "thirdparty/arcsec_star_tracker/common/SLIP.h" +#include "devices/powerSwitcherList.h" /** * @brief This is the device handler for the star tracker from arcsec. @@ -75,6 +76,7 @@ class StarTrackerHandler : public DeviceHandlerBase { */ virtual size_t getNextReplyLength(DeviceCommandId_t deviceCommand) override; virtual ReturnValue_t doSendReadHook() override; + ReturnValue_t getSwitches(const uint8_t** switches, uint8_t* numberOfSwitches) override; virtual void doTransition(Mode_t modeFrom, Submode_t subModeFrom) override; private: @@ -268,6 +270,8 @@ class StarTrackerHandler : public DeviceHandlerBase { bool strHelperExecuting = false; + const power::Switch_t powerSwitch = pcduSwitches::PDU1_CH2_STAR_TRACKER_5V; + /** * @brief Handles internal state */ diff --git a/tmtc b/tmtc index 6db0a2cb..ed85e170 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 6db0a2cb791909a69506ed56df5518c277ece275 +Subproject commit ed85e1706f818ec652285b57a31b113f60128f70