From 4a8e111a185aef1daf0232bce9784e10199716ba Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 23 Jun 2023 17:44:18 +0200 Subject: [PATCH 1/7] bugfix packet demux --- mission/tmtc/PusLiveDemux.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/mission/tmtc/PusLiveDemux.cpp b/mission/tmtc/PusLiveDemux.cpp index bbe1be4f..28114252 100644 --- a/mission/tmtc/PusLiveDemux.cpp +++ b/mission/tmtc/PusLiveDemux.cpp @@ -10,7 +10,10 @@ ReturnValue_t PusLiveDemux::demultiplexPackets(StorageManagerIF& tmStore, size_t tmSize) { ReturnValue_t result = returnvalue::OK; for (unsigned int idx = 0; idx < destinations.size(); idx++) { + sif::debug << "Destination size: " << destinations.size() << std::endl; + sif::debug << "Sending" << destinations[idx].name << std::endl; const auto& dest = destinations[idx]; + bool setOrigStoreId = false; if (destinations.size() > 1) { if (idx < destinations.size() - 1) { // Create copy of data to ensure each TM recipient has its own copy. That way, we don't need @@ -26,8 +29,14 @@ ReturnValue_t PusLiveDemux::demultiplexPackets(StorageManagerIF& tmStore, #endif } } else { - message.setStorageId(origStoreId); + setOrigStoreId = true; + sif::debug << "Setting org store ID" << std::endl; } + } else { + setOrigStoreId = true; + } + if(setOrigStoreId) { + message.setStorageId(origStoreId); } result = ownerQueue.sendMessage(dest.queueId, &message); if (result != returnvalue::OK) { From db5e7a535eae18fe82ddf2db8abcfaafc72ddf91 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 23 Jun 2023 17:47:18 +0200 Subject: [PATCH 2/7] remove printouts --- mission/tmtc/PusLiveDemux.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/mission/tmtc/PusLiveDemux.cpp b/mission/tmtc/PusLiveDemux.cpp index 28114252..47e1fc1f 100644 --- a/mission/tmtc/PusLiveDemux.cpp +++ b/mission/tmtc/PusLiveDemux.cpp @@ -10,8 +10,6 @@ ReturnValue_t PusLiveDemux::demultiplexPackets(StorageManagerIF& tmStore, size_t tmSize) { ReturnValue_t result = returnvalue::OK; for (unsigned int idx = 0; idx < destinations.size(); idx++) { - sif::debug << "Destination size: " << destinations.size() << std::endl; - sif::debug << "Sending" << destinations[idx].name << std::endl; const auto& dest = destinations[idx]; bool setOrigStoreId = false; if (destinations.size() > 1) { @@ -30,13 +28,12 @@ ReturnValue_t PusLiveDemux::demultiplexPackets(StorageManagerIF& tmStore, } } else { setOrigStoreId = true; - sif::debug << "Setting org store ID" << std::endl; } } else { setOrigStoreId = true; } - if(setOrigStoreId) { - message.setStorageId(origStoreId); + if (setOrigStoreId) { + message.setStorageId(origStoreId); } result = ownerQueue.sendMessage(dest.queueId, &message); if (result != returnvalue::OK) { From b261779ebf79c45ce45bae3057eb70a43e8d20bb Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 23 Jun 2023 17:53:19 +0200 Subject: [PATCH 3/7] this iis less confusing --- mission/tmtc/PusLiveDemux.cpp | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/mission/tmtc/PusLiveDemux.cpp b/mission/tmtc/PusLiveDemux.cpp index 47e1fc1f..8ba69e07 100644 --- a/mission/tmtc/PusLiveDemux.cpp +++ b/mission/tmtc/PusLiveDemux.cpp @@ -11,28 +11,19 @@ ReturnValue_t PusLiveDemux::demultiplexPackets(StorageManagerIF& tmStore, ReturnValue_t result = returnvalue::OK; for (unsigned int idx = 0; idx < destinations.size(); idx++) { const auto& dest = destinations[idx]; - bool setOrigStoreId = false; - if (destinations.size() > 1) { - if (idx < destinations.size() - 1) { - // Create copy of data to ensure each TM recipient has its own copy. That way, we don't need - // to bother with send order and where the data is deleted. - store_address_t storeId; - result = tmStore.addData(&storeId, tmData, tmSize); - if (result == returnvalue::OK) { - message.setStorageId(storeId); - } else { -#if FSFW_CPP_OSTREAM_ENABLED == 1 - sif::error << "PusLiveDemux::handlePacket: Store too full to create data copy" - << std::endl; -#endif - } + if ((destinations.size() > 1) and (idx < (destinations.size() - 1))) { + // Create copy of data to ensure each TM recipient has its own copy. That way, we don't need + // to bother with send order and where the data is deleted. + store_address_t storeId; + result = tmStore.addData(&storeId, tmData, tmSize); + if (result == returnvalue::OK) { + message.setStorageId(storeId); } else { - setOrigStoreId = true; +#if FSFW_CPP_OSTREAM_ENABLED == 1 + sif::error << "PusLiveDemux::handlePacket: Store too full to create data copy" << std::endl; +#endif } } else { - setOrigStoreId = true; - } - if (setOrigStoreId) { message.setStorageId(origStoreId); } result = ownerQueue.sendMessage(dest.queueId, &message); From a95ab49690e5302657924e51c9fb4522e343772f Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 23 Jun 2023 17:56:54 +0200 Subject: [PATCH 4/7] changelog --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53ccf1d5..c918c5e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,13 @@ will consitute of a breaking change warranting a new major release: # [unreleased] +# [v4.0.1] 2023-06-23 + +## Fixed + +- `PusLiveDemux` packet demultiplexing bugfix where the demultiplexing did not work when there was + only one destination available. + # [v4.0.0] 2023-06-22 - `eive-tmtc` version v5.0.0 From 2901ebc15c3320c677c87481ff7995461c0b75db Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Sat, 24 Jun 2023 01:21:46 +0200 Subject: [PATCH 5/7] prep v4.0.1 patch --- CHANGELOG.md | 2 +- CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c918c5e7..3a4eac1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,7 @@ will consitute of a breaking change warranting a new major release: # [unreleased] -# [v4.0.1] 2023-06-23 +# [v4.0.1] 2023-06-24 ## Fixed diff --git a/CMakeLists.txt b/CMakeLists.txt index 3c7e1c1e..9e234cae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ cmake_minimum_required(VERSION 3.13) set(OBSW_VERSION_MAJOR 4) set(OBSW_VERSION_MINOR 0) -set(OBSW_VERSION_REVISION 0) +set(OBSW_VERSION_REVISION 1) # set(CMAKE_VERBOSE TRUE) From facfad3367b3fa9a2044a937b436af5da0d5a651 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Sat, 24 Jun 2023 20:12:37 +0200 Subject: [PATCH 6/7] v3.1.1 changelog --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a4eac1f..fb62b8fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,6 +52,17 @@ will consitute of a breaking change warranting a new major release: restore the PL I2C. - Core controller now announces firmware version as well when requesting a version info event +# [v3.3.1] 2023-06-22 + +## Fixed + +- `PusLiveDemux` packet demultiplexing bugfix where the demultiplexing did not work when there was + only one destination available. + +## Fixed + +- Fixed H parameter in SUS converter from 1 mm to 2.5 mm. + # [v3.3.0] 2023-06-21 Like v3.2.0 but without the custom FM changes related to VC0. From c2b415bdd601869811bd1945b32d9ea0d6ab2469 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Sun, 25 Jun 2023 01:01:21 +0200 Subject: [PATCH 7/7] update .cproject file --- misc/eclipse/.cproject | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/misc/eclipse/.cproject b/misc/eclipse/.cproject index 4cfe3fa1..154cb27e 100644 --- a/misc/eclipse/.cproject +++ b/misc/eclipse/.cproject @@ -57,7 +57,8 @@ - + + @@ -119,7 +120,8 @@ - + + @@ -187,7 +189,8 @@ - + + @@ -255,7 +258,8 @@ - + + @@ -418,7 +422,8 @@ - + + @@ -580,7 +585,8 @@ - + + @@ -750,7 +756,8 @@ - + + @@ -917,7 +924,8 @@ - + + @@ -1084,7 +1092,8 @@ - + + @@ -1149,7 +1158,8 @@ - + + @@ -1172,7 +1182,7 @@ - + - + + + @@ -1386,7 +1398,8 @@ - + +