From c3f9d6e6b0b1cb76c3f55a329f278f73c6b50ecd Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 17 Dec 2024 15:17:16 +0100 Subject: [PATCH] some more bugfixes --- src/fsfw/datapool/PoolDataSetBase.cpp | 3 +++ src/fsfw/housekeeping/Dataset.h | 3 +++ src/fsfw/housekeeping/PeriodicHkHelper.cpp | 7 +++---- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/fsfw/datapool/PoolDataSetBase.cpp b/src/fsfw/datapool/PoolDataSetBase.cpp index f7a21392..0462d761 100644 --- a/src/fsfw/datapool/PoolDataSetBase.cpp +++ b/src/fsfw/datapool/PoolDataSetBase.cpp @@ -251,6 +251,9 @@ size_t PoolDataSetBase::getSerializedSize() const { for (uint16_t count = 0; count < fillCount; count++) { size += registeredVariables[count]->getSerializedSize(); } + if (serializeWithValidityBlob) { + size += std::ceil(static_cast(fillCount) / 8.0); + } return size; } diff --git a/src/fsfw/housekeeping/Dataset.h b/src/fsfw/housekeeping/Dataset.h index 5eed44a2..a1788843 100644 --- a/src/fsfw/housekeeping/Dataset.h +++ b/src/fsfw/housekeeping/Dataset.h @@ -100,6 +100,9 @@ class Dataset : public SerializeIF { for (auto &serializable : serializables) { size += serializable.get().getSerializedSize(); } + if (serializeWithValidityBlob) { + size += std::ceil(static_cast(serializables.size()) / 8.0); + } return size; } diff --git a/src/fsfw/housekeeping/PeriodicHkHelper.cpp b/src/fsfw/housekeeping/PeriodicHkHelper.cpp index e0813b53..bb8472ad 100644 --- a/src/fsfw/housekeeping/PeriodicHkHelper.cpp +++ b/src/fsfw/housekeeping/PeriodicHkHelper.cpp @@ -17,7 +17,7 @@ PeriodicHelper::PeriodicHelper(GeneratesPeriodicHkIF* owner, MessageQueueIF* que MessageQueueId_t hkDestQueue) : hkDestinationId(hkDestQueue) { if (owner == nullptr) { - printWarningOrError(sif::OutputTypes::OUT_WARNING, "LocalDataPoolManager", returnvalue::FAILED, + printWarningOrError(sif::OutputTypes::OUT_WARNING, "PeriodicHkHelper", returnvalue::FAILED, "Invalid supplied owner"); return; } @@ -200,11 +200,10 @@ void PeriodicHelper::performPeriodicHkGeneration(SetSpecification& setSpec, time if (result != returnvalue::OK) { // Configuration error #if FSFW_CPP_OSTREAM_ENABLED == 1 - sif::warning << "LocalDataPoolManager::performPeriodicHkOperation: HK generation failed." + sif::warning << "hk::PeriodicHelper::performPeriodicHkOperation: HK generation failed." << std::endl; #else - sif::printWarning( - "LocalDataPoolManager::performPeriodicHkOperation: HK generation failed.\n"); + sif::printWarning("hk::PeriodicHelper::performPeriodicHkOperation: HK generation failed.\n"); #endif return; }