some more bugfixes

This commit is contained in:
Robin Müller 2024-12-17 15:17:16 +01:00
parent 5069f8b02b
commit c3f9d6e6b0
Signed by: muellerr
GPG Key ID: A649FB78196E3849
3 changed files with 9 additions and 4 deletions

View File

@ -251,6 +251,9 @@ size_t PoolDataSetBase::getSerializedSize() const {
for (uint16_t count = 0; count < fillCount; count++) { for (uint16_t count = 0; count < fillCount; count++) {
size += registeredVariables[count]->getSerializedSize(); size += registeredVariables[count]->getSerializedSize();
} }
if (serializeWithValidityBlob) {
size += std::ceil(static_cast<float>(fillCount) / 8.0);
}
return size; return size;
} }

View File

@ -100,6 +100,9 @@ class Dataset : public SerializeIF {
for (auto &serializable : serializables) { for (auto &serializable : serializables) {
size += serializable.get().getSerializedSize(); size += serializable.get().getSerializedSize();
} }
if (serializeWithValidityBlob) {
size += std::ceil(static_cast<float>(serializables.size()) / 8.0);
}
return size; return size;
} }

View File

@ -17,7 +17,7 @@ PeriodicHelper::PeriodicHelper(GeneratesPeriodicHkIF* owner, MessageQueueIF* que
MessageQueueId_t hkDestQueue) MessageQueueId_t hkDestQueue)
: hkDestinationId(hkDestQueue) { : hkDestinationId(hkDestQueue) {
if (owner == nullptr) { if (owner == nullptr) {
printWarningOrError(sif::OutputTypes::OUT_WARNING, "LocalDataPoolManager", returnvalue::FAILED, printWarningOrError(sif::OutputTypes::OUT_WARNING, "PeriodicHkHelper", returnvalue::FAILED,
"Invalid supplied owner"); "Invalid supplied owner");
return; return;
} }
@ -200,11 +200,10 @@ void PeriodicHelper::performPeriodicHkGeneration(SetSpecification& setSpec, time
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
// Configuration error // Configuration error
#if FSFW_CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "LocalDataPoolManager::performPeriodicHkOperation: HK generation failed." sif::warning << "hk::PeriodicHelper::performPeriodicHkOperation: HK generation failed."
<< std::endl; << std::endl;
#else #else
sif::printWarning( sif::printWarning("hk::PeriodicHelper::performPeriodicHkOperation: HK generation failed.\n");
"LocalDataPoolManager::performPeriodicHkOperation: HK generation failed.\n");
#endif #endif
return; return;
} }