From c697d0f8ab83163c5d58e288ca74c771e6a9bb45 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 30 May 2022 10:34:03 +0200 Subject: [PATCH 1/5] bump etl to 20.28.0 --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 40c0b879..6328f176 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,7 +71,7 @@ set(FSFW_ETL_LIB_MAJOR_VERSION 20 CACHE STRING "ETL library major version requirement") set(FSFW_ETL_LIB_VERSION - ${FSFW_ETL_LIB_MAJOR_VERSION}.27.3 + ${FSFW_ETL_LIB_MAJOR_VERSION}.28.0 CACHE STRING "ETL library exact version requirement") set(FSFW_ETL_LINK_TARGET etl::etl) @@ -185,7 +185,7 @@ endif() message(STATUS "${MSG_PREFIX} Finding and/or providing ETL library") # Check whether the user has already installed ETL first -find_package(${FSFW_ETL_LIB_NAME} ${FSFW_ETL_LIB_MAJOR_VERSION} QUIET) +find_package(${FSFW_ETL_LIB_NAME} ${FSFW_ETL_LIB_MAJOR_VERSION} CONFIG QUIET) # Not installed, so use FetchContent to download and provide etl if(NOT ${FSFW_ETL_LIB_NAME}_FOUND) message( From e03f55604a64f54f379744246ca02ebb01a26ac2 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 27 May 2022 02:09:49 +0200 Subject: [PATCH 2/5] rtems fixes --- src/fsfw/osal/rtems/MessageQueue.cpp | 2 +- src/fsfw/osal/rtems/MessageQueue.h | 10 ++++++---- src/fsfw/osal/rtems/QueueFactory.cpp | 4 ++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/fsfw/osal/rtems/MessageQueue.cpp b/src/fsfw/osal/rtems/MessageQueue.cpp index f52f1852..534015dc 100644 --- a/src/fsfw/osal/rtems/MessageQueue.cpp +++ b/src/fsfw/osal/rtems/MessageQueue.cpp @@ -65,7 +65,7 @@ ReturnValue_t MessageQueue::sendMessageFrom(MessageQueueId_t sendTo, MessageQueu } ReturnValue_t returnCode = convertReturnCode(result); - if (result == MessageQueueIF::EMPTY) { + if (returnCode == MessageQueueIF::EMPTY) { return HasReturnvaluesIF::RETURN_FAILED; } diff --git a/src/fsfw/osal/rtems/MessageQueue.h b/src/fsfw/osal/rtems/MessageQueue.h index bb31a508..f64a3d83 100644 --- a/src/fsfw/osal/rtems/MessageQueue.h +++ b/src/fsfw/osal/rtems/MessageQueue.h @@ -36,7 +36,7 @@ class MessageQueue : public MessageQueueBase { * @param max_message_size With this parameter, the maximum message size can be adjusted. * This should be left default. */ - MessageQueue(size_t message_depth = 3, + explicit MessageQueue(size_t message_depth = 3, size_t max_message_size = MessageQueueMessage::MAX_MESSAGE_SIZE, MqArgs* args = nullptr); @@ -48,13 +48,15 @@ class MessageQueue : public MessageQueueBase { * @brief The destructor deletes the formerly created message queue. * @details This is accomplished by using the delete call provided by the operating system. */ - virtual ~MessageQueue(); + ~MessageQueue() override; // Implement non-generic MessageQueueIF functions not handled by MessageQueueBase ReturnValue_t flush(uint32_t* count) override; + + ReturnValue_t receiveMessage(MessageQueueMessageIF* message) override; ReturnValue_t sendMessageFrom(MessageQueueId_t sendTo, MessageQueueMessageIF* message, - MessageQueueId_t sentFrom = NO_QUEUE, - bool ignoreFault = false) override; + MessageQueueId_t sentFrom, + bool ignoreFault) override; private: /** diff --git a/src/fsfw/osal/rtems/QueueFactory.cpp b/src/fsfw/osal/rtems/QueueFactory.cpp index 2519f444..074ce273 100644 --- a/src/fsfw/osal/rtems/QueueFactory.cpp +++ b/src/fsfw/osal/rtems/QueueFactory.cpp @@ -45,9 +45,9 @@ QueueFactory* QueueFactory::instance() { return factoryInstance; } -QueueFactory::QueueFactory() {} +QueueFactory::QueueFactory() = default; -QueueFactory::~QueueFactory() {} +QueueFactory::~QueueFactory() = default; MessageQueueIF* QueueFactory::createMessageQueue(uint32_t messageDepth, size_t maxMessageSize, MqArgs* args) { From 6d921f03fd03ed8ae769747183d519d32cac4a96 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 13 Jun 2022 10:50:15 +0200 Subject: [PATCH 3/5] Fix SPI ComIF shadowing warning --- hal/src/fsfw_hal/linux/spi/SpiComIF.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hal/src/fsfw_hal/linux/spi/SpiComIF.cpp b/hal/src/fsfw_hal/linux/spi/SpiComIF.cpp index dcf92b5d..b06def69 100644 --- a/hal/src/fsfw_hal/linux/spi/SpiComIF.cpp +++ b/hal/src/fsfw_hal/linux/spi/SpiComIF.cpp @@ -210,7 +210,7 @@ ReturnValue_t SpiComIF::performRegularSendOperation(SpiCookie* spiCookie, const #endif return result; } - ReturnValue_t result = gpioComIF->pullLow(gpioId); + result = gpioComIF->pullLow(gpioId); if (result != HasReturnvaluesIF::RETURN_OK) { #if FSFW_VERBOSE_LEVEL >= 1 #if FSFW_CPP_OSTREAM_ENABLED == 1 From 4a06b558c1a385f73448af43ccf32c716ddfbc2e Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 13 Jun 2022 10:50:15 +0200 Subject: [PATCH 4/5] Fix SPI ComIF shadowing warning --- hal/src/fsfw_hal/linux/spi/SpiComIF.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hal/src/fsfw_hal/linux/spi/SpiComIF.cpp b/hal/src/fsfw_hal/linux/spi/SpiComIF.cpp index dcf92b5d..b06def69 100644 --- a/hal/src/fsfw_hal/linux/spi/SpiComIF.cpp +++ b/hal/src/fsfw_hal/linux/spi/SpiComIF.cpp @@ -210,7 +210,7 @@ ReturnValue_t SpiComIF::performRegularSendOperation(SpiCookie* spiCookie, const #endif return result; } - ReturnValue_t result = gpioComIF->pullLow(gpioId); + result = gpioComIF->pullLow(gpioId); if (result != HasReturnvaluesIF::RETURN_OK) { #if FSFW_VERBOSE_LEVEL >= 1 #if FSFW_CPP_OSTREAM_ENABLED == 1 From e67fc2ab0d6b7c291adf60f7838b88c8859d693f Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 13 Jun 2022 10:56:37 +0200 Subject: [PATCH 5/5] some fixes for TC Map printout function --- .../pus/Service11TelecommandScheduling.tpp | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/fsfw/pus/Service11TelecommandScheduling.tpp b/src/fsfw/pus/Service11TelecommandScheduling.tpp index cb43e8e8..5ce6f744 100644 --- a/src/fsfw/pus/Service11TelecommandScheduling.tpp +++ b/src/fsfw/pus/Service11TelecommandScheduling.tpp @@ -615,23 +615,24 @@ inline ReturnValue_t Service11TelecommandScheduling::handleInvalidD template inline void Service11TelecommandScheduling::debugPrintMultimapContent() const { - for ([[maybe_unused]] const auto &dit : telecommandMap) { #if FSFW_DISABLE_PRINTOUT == 0 #if FSFW_CPP_OSTREAM_ENABLED == 1 - sif::debug << "Service11TelecommandScheduling::debugPrintMultimapContent: Multimap Content" - << std::endl; + sif::debug << "Service11TelecommandScheduling::debugPrintMultimapContent: Multimap Content" + << std::endl; +#else + sif::printDebug( + "Service11TelecommandScheduling::debugPrintMultimapContent: Multimap Content\n"); +#endif + for (const auto &dit : telecommandMap) { +#if FSFW_CPP_OSTREAM_ENABLED == 1 sif::debug << "[" << dit.first << "]: Request ID: " << dit.second.requestId << " | " << "Store Address: " << dit.second.storeAddr.raw << std::endl; #else - sif::printDebug( - "Service11TelecommandScheduling::debugPrintMultimapContent: Multimap Content\n"); - for (auto dit = telecommandMap.begin(); dit != telecommandMap.end(); ++dit) { - sif::printDebug("[%d]: Request ID: %d | Store Address: %d\n", dit->first, - dit->second.requestId, dit->second.storeAddr); - } -#endif + sif::printDebug("[%d]: Request ID: %d | Store Address: %d\n", dit.first, + dit.second.requestId, dit.second.storeAddr); #endif } +#endif } template