diff --git a/CHANGELOG b/CHANGELOG index 09b8db6a..75e7ced5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,17 +1,80 @@ -## Changes from ASTP 1.0.0 to 1.1.0 +# Changed from ASTP 1.1.0 to 1.2.0 + +## API Changes + +### FSFW Architecture + +- Internal API changed completely to have separation of sources and headers +- External API mostly stayed the same +- Folder names are now all smaller case: internalError was renamed to internalerror and + FreeRTOS was renamed to freertos + +### HAL + +- HAL added back into FSFW. It is tightly bound to the FSFW, and compiling it as a static library + made using it more complicated than necessary + +## Bugfixes + +### FreeRTOS QueueMapManager + +- Fixed a bug which causes the first generated Queue ID to be invalid + +## Enhancements + +### FSFW Architecture + +- See API changes chapter. This change will keep the internal API consistent in the future + +# Changes from ASTP 1.0.0 to 1.1.0 + +## API Changes ### PUS - Added PUS C support +- SUBSYSTEM_IDs added for PUS Services +- Added new Parameter which must be defined in config: fsfwconfig::FSFW_MAX_TM_PACKET_SIZE + +### ObjectManager + + - ObjectManager is now a singelton + ### Configuration - Additional configuration option fsfwconfig::FSFW_MAX_TM_PACKET_SIZE which need to be specified in FSFWConfig.h +### CMake + +- Changed Cmake FSFW_ADDITIONAL_INC_PATH to FSFW_ADDITIONAL_INC_PATHS + +## Bugfixes + +- timemanager/TimeStamperIF.h: Timestamp config was not used correctly, leading to different timestamp sizes than configured in fsfwconfig::FSFW_MISSION_TIMESTAMP_SIZE +- TCP server fixes + +## Enhancements + +### FreeRTOS Queue Handles + +- Fixed an internal issue how FreeRTOS MessageQueues were handled + +### Linux OSAL + +- Better printf error messages + +### CMake + +- Check for C++11 as mininimum required Version + +### Debug Output + +- Changed Warning color to magenta, which is well readable on both dark and light mode IDEs -## Changes from ASTP 0.0.1 to 1.0.0 +# Changes from ASTP 0.0.1 to 1.0.0 ### Host OSAL diff --git a/inc/fsfw/osal/freertos/QueueMapManager.h b/inc/fsfw/osal/freertos/QueueMapManager.h index 7e999b0d..dbe0526b 100644 --- a/inc/fsfw/osal/freertos/QueueMapManager.h +++ b/inc/fsfw/osal/freertos/QueueMapManager.h @@ -39,8 +39,7 @@ private: QueueMapManager(); ~QueueMapManager(); - // Start at 1 because 0 might be the NO_QUEUE value - uint32_t queueCounter = 1; + uint32_t queueCounter = MessageQueueIF::NO_QUEUE + 1; MutexIF* mapLock; QueueMap queueMap; static QueueMapManager* mqManagerInstance; diff --git a/inc/fsfw/osal/host/QueueMapManager.h b/inc/fsfw/osal/host/QueueMapManager.h index e274bed2..2dd2a01d 100644 --- a/inc/fsfw/osal/host/QueueMapManager.h +++ b/inc/fsfw/osal/host/QueueMapManager.h @@ -41,7 +41,7 @@ private: QueueMapManager(); ~QueueMapManager(); - uint32_t queueCounter = 0; + uint32_t queueCounter = MessageQueueIF::NO_QUEUE + 1; MutexIF* mapLock; QueueMap queueMap; static QueueMapManager* mqManagerInstance; diff --git a/src/osal/freertos/QueueMapManager.cpp b/src/osal/freertos/QueueMapManager.cpp index e32cbe1d..7d6b2f12 100644 --- a/src/osal/freertos/QueueMapManager.cpp +++ b/src/osal/freertos/QueueMapManager.cpp @@ -17,10 +17,12 @@ QueueMapManager* QueueMapManager::instance() { ReturnValue_t QueueMapManager::addMessageQueue(QueueHandle_t queue, MessageQueueId_t* id) { MutexGuard lock(mapLock); - uint32_t currentId = queueCounter++; + uint32_t currentId = queueCounter; + queueCounter++; if(currentId == MessageQueueIF::NO_QUEUE) { // Skip the NO_QUEUE value - currentId = queueCounter++; + currentId = queueCounter; + queueCounter++; } auto returnPair = queueMap.emplace(currentId, queue); if(not returnPair.second) { diff --git a/src/osal/host/QueueMapManager.cpp b/src/osal/host/QueueMapManager.cpp index ad39972f..58575cf6 100644 --- a/src/osal/host/QueueMapManager.cpp +++ b/src/osal/host/QueueMapManager.cpp @@ -24,7 +24,13 @@ QueueMapManager* QueueMapManager::instance() { ReturnValue_t QueueMapManager::addMessageQueue( MessageQueueIF* queueToInsert, MessageQueueId_t* id) { MutexGuard lock(mapLock); - uint32_t currentId = queueCounter++; + uint32_t currentId = queueCounter; + queueCounter++; + if(currentId == MessageQueueIF::NO_QUEUE) { + // Skip the NO_QUEUE value + currentId = queueCounter; + queueCounter++; + } auto returnPair = queueMap.emplace(currentId, queueToInsert); if(not returnPair.second) { /* This should never happen for the atomic variable. */