diff --git a/CHANGELOG.md b/CHANGELOG.md index 5dd6ef7c..e0926cc4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ will consitute of a breaking change warranting a new major release: the current active SD Card. After a reboot, the TLE will be read from the filesystem. A filesystem change via `prefSD` on bootup, can lead to the TLE not being read, even though it is there. +- Added action cmd to read the currently stored TLE. # [v7.4.0] 2023-11-30 diff --git a/mission/controller/AcsController.cpp b/mission/controller/AcsController.cpp index 2b6a1ffc..8bdc7d15 100644 --- a/mission/controller/AcsController.cpp +++ b/mission/controller/AcsController.cpp @@ -1084,9 +1084,12 @@ ReturnValue_t AcsController::readTleFromFs(uint8_t *line1, uint8_t *line2) { std::memcpy(line2, tleLine2.c_str(), 69); } else { triggerEvent(acs::TLE_FILE_READ_FAILED); - return returnvalue::FAILED; + return READ_FILE_FAILED; } tleFile.close(); + } else { + triggerEvent(acs::TLE_FILE_READ_FAILED); + return READ_FILE_FAILED; } return returnvalue::OK; } diff --git a/mission/controller/AcsController.h b/mission/controller/AcsController.h index 4c0480bd..4d80da3e 100644 --- a/mission/controller/AcsController.h +++ b/mission/controller/AcsController.h @@ -104,6 +104,8 @@ class AcsController : public ExtendedControllerBase, public ReceivesParameterMes static constexpr ReturnValue_t FILE_DELETION_FAILED = MAKE_RETURN_CODE(0); //! [EXPORT] : [COMMENT] Writing the TLE to the file has failed. static constexpr ReturnValue_t WRITE_FILE_FAILED = MAKE_RETURN_CODE(1); + //! [EXPORT] : [COMMENT] Reading the TLE to the file has failed. + static constexpr ReturnValue_t READ_FILE_FAILED = MAKE_RETURN_CODE(2); ReturnValue_t initialize() override; ReturnValue_t handleCommandMessage(CommandMessage* message) override;