diff --git a/mission/controller/AcsController.cpp b/mission/controller/AcsController.cpp index 7dce604e..2b6a1ffc 100644 --- a/mission/controller/AcsController.cpp +++ b/mission/controller/AcsController.cpp @@ -73,6 +73,17 @@ ReturnValue_t AcsController::executeAction(ActionId_t actionId, MessageQueueId_t } return HasActionsIF::EXECUTION_FINISHED; } + case (READ_TLE): { + uint8_t tle[69 * 2] = {}; + uint8_t line2[69] = {}; + ReturnValue_t result = readTleFromFs(tle, line2); + if (result != returnvalue::OK) { + return result; + } + std::memcpy(tle + 69, line2, 69); + actionHelper.reportData(commandedBy, actionId, tle, 69 * 2); + return EXECUTION_FINISHED; + } default: { return HasActionsIF::INVALID_ACTION_ID; } diff --git a/mission/controller/AcsController.h b/mission/controller/AcsController.h index c2e4790f..4c0480bd 100644 --- a/mission/controller/AcsController.h +++ b/mission/controller/AcsController.h @@ -97,6 +97,7 @@ class AcsController : public ExtendedControllerBase, public ReceivesParameterMes static const DeviceCommandId_t RESET_MEKF = 0x1; static const DeviceCommandId_t RESTORE_MEKF_NONFINITE_RECOVERY = 0x2; static const DeviceCommandId_t UPDATE_TLE = 0x3; + static const DeviceCommandId_t READ_TLE = 0x4; static const uint8_t INTERFACE_ID = CLASS_ID::ACS_CTRL; //! [EXPORT] : [COMMENT] File deletion failed and at least one file is still existent.