From b4b11ebd3b46603584a9f4d7722b66715a4c3e6a Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 16 Sep 2022 18:08:20 +0200 Subject: [PATCH 1/2] fixes and tweaks --- src/fsfw/tcdistribution/definitions.h | 10 +++++----- src/fsfw/tmtcpacket/ccsds/defs.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/fsfw/tcdistribution/definitions.h b/src/fsfw/tcdistribution/definitions.h index 3d455077..1da1f8ab 100644 --- a/src/fsfw/tcdistribution/definitions.h +++ b/src/fsfw/tcdistribution/definitions.h @@ -14,11 +14,11 @@ static constexpr ReturnValue_t INVALID_PACKET_TYPE = MAKE_RETURN_CODE(2); static constexpr ReturnValue_t INVALID_SEC_HEADER_FIELD = MAKE_RETURN_CODE(3); static constexpr ReturnValue_t INCORRECT_PRIMARY_HEADER = MAKE_RETURN_CODE(4); -static constexpr ReturnValue_t INCOMPLETE_PACKET = MAKE_RETURN_CODE(5); -static constexpr ReturnValue_t INVALID_PUS_VERSION = MAKE_RETURN_CODE(6); -static constexpr ReturnValue_t INCORRECT_CHECKSUM = MAKE_RETURN_CODE(7); -static constexpr ReturnValue_t ILLEGAL_PACKET_SUBTYPE = MAKE_RETURN_CODE(8); -static constexpr ReturnValue_t INCORRECT_SECONDARY_HEADER = MAKE_RETURN_CODE(9); +static constexpr ReturnValue_t INCOMPLETE_PACKET = MAKE_RETURN_CODE(7); +static constexpr ReturnValue_t INVALID_PUS_VERSION = MAKE_RETURN_CODE(8); +static constexpr ReturnValue_t INCORRECT_CHECKSUM = MAKE_RETURN_CODE(9); +static constexpr ReturnValue_t ILLEGAL_PACKET_SUBTYPE = MAKE_RETURN_CODE(10); +static constexpr ReturnValue_t INCORRECT_SECONDARY_HEADER = MAKE_RETURN_CODE(11); }; // namespace tcdistrib #endif // FSFW_TMTCPACKET_DEFINITIONS_H diff --git a/src/fsfw/tmtcpacket/ccsds/defs.h b/src/fsfw/tmtcpacket/ccsds/defs.h index 1c7de540..da7c524d 100644 --- a/src/fsfw/tmtcpacket/ccsds/defs.h +++ b/src/fsfw/tmtcpacket/ccsds/defs.h @@ -23,11 +23,11 @@ constexpr uint16_t getSpacePacketIdFromApid(bool isTc, uint16_t apid, return ((isTc << 4) | (secondaryHeaderFlag << 3) | ((apid >> 8) & 0x07)) << 8 | (apid & 0x00ff); } -constexpr uint16_t getTcSpacePacketIdFromApid(uint16_t apid, bool secondaryHeaderFlag = true) { +constexpr uint16_t getTcSpacePacketIdFromApid(uint16_t apid, bool secondaryHeaderFlag) { return getSpacePacketIdFromApid(true, apid, secondaryHeaderFlag); } -constexpr uint16_t getTmSpacePacketIdFromApid(uint16_t apid, bool secondaryHeaderFlag = true) { +constexpr uint16_t getTmSpacePacketIdFromApid(uint16_t apid, bool secondaryHeaderFlag) { return getSpacePacketIdFromApid(false, apid, secondaryHeaderFlag); } From 72172a972bca7a2026a30d5a87289ab0510b1e31 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 16 Sep 2022 18:24:23 +0200 Subject: [PATCH 2/2] update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 03cc0613..44e2262b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## Changes +- Remove default secondary header argument for + `uint16_t getTcSpacePacketIdFromApid(uint16_t apid, bool secondaryHeaderFlag)` and + `uint16_t getTmSpacePacketIdFromApid(uint16_t apid, bool secondaryHeaderFlag)` + PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/689 - Removed `HasReturnvaluesIF` class in favor of `returnvalue` namespace with `OK` and `FAILED` constants. PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/659