diff --git a/src/fsfw/devicehandlers/DeviceHandlerBase.cpp b/src/fsfw/devicehandlers/DeviceHandlerBase.cpp index ed1ac280a..d001fc948 100644 --- a/src/fsfw/devicehandlers/DeviceHandlerBase.cpp +++ b/src/fsfw/devicehandlers/DeviceHandlerBase.cpp @@ -196,6 +196,10 @@ ReturnValue_t DeviceHandlerBase::initialize() { if (result != returnvalue::OK) { return result; } + result = datapoolHelper.initialize(); + if (result != returnvalue::OK) { + return result; + } result = fdirInstance->initialize(); if (result != returnvalue::OK) { return result; diff --git a/src/fsfw/housekeeping/HousekeepingHelper.cpp b/src/fsfw/housekeeping/HousekeepingHelper.cpp index 46a2e9954..16c894a04 100644 --- a/src/fsfw/housekeeping/HousekeepingHelper.cpp +++ b/src/fsfw/housekeeping/HousekeepingHelper.cpp @@ -1,9 +1,10 @@ #include "HousekeepingHelper.h" -#include "GeneratesHousekeepingIF.h" #include -HousekeepingHelper::HousekeepingHelper(GeneratesHousekeepingIF* owner): owner(owner) {} +#include "GeneratesHousekeepingIF.h" + +HousekeepingHelper::HousekeepingHelper(GeneratesHousekeepingIF* owner) : owner(owner) {} ReturnValue_t HousekeepingHelper::initialize() { tmManager = ObjectManager::instance()->get(objects::TM_MANAGER); @@ -26,14 +27,20 @@ void HousekeepingHelper::registerSet(HousekeepingSet* set) { housekeepingSets.emplace(id, set); } - ReturnValue_t HousekeepingHelper::reportHousekeeping(HousekeepingSet* set, const Action* action) { SystemObjectIF* ownerAsObject = dynamic_cast(owner); if (ownerAsObject == nullptr) { sif::error << "Duuuuuuuude, what the hell?" << std::endl; return returnvalue::FAILED; } - return tmManager->sendTmPacket(ownerAsObject->getObjectId(), GeneratesHousekeepingIF::INTERFACE_ID, - GeneratesHousekeepingIF::Functions::REPORT, set, - action->tc, action->tcOffset); + store_address_t tc; + size_t tcOffset = 0; + if (action != nullptr) { + tc = action->tc; + tcOffset = action->tcOffset; + } + + return tmManager->sendTmPacket(ownerAsObject->getObjectId(), + GeneratesHousekeepingIF::INTERFACE_ID, + GeneratesHousekeepingIF::Functions::REPORT, set, tc, tcOffset); } \ No newline at end of file diff --git a/src/fsfw/housekeeping/HousekeepingSet.cpp b/src/fsfw/housekeeping/HousekeepingSet.cpp index 86f954aa4..cc65007fa 100644 --- a/src/fsfw/housekeeping/HousekeepingSet.cpp +++ b/src/fsfw/housekeeping/HousekeepingSet.cpp @@ -14,6 +14,8 @@ void HousekeepingSet::setEnum(EnumIF* theEnum) { id = theEnum->getValue(); description = theEnum->getDescription(); } + +const char* HousekeepingSet::getDescription() const { return description; } #else HousekeepingSet::HousekeepingSet(GeneratesHousekeepingIF* owner, HousekeepingSetId_t id) : id(id) { if (owner != nullptr) { @@ -26,7 +28,7 @@ HousekeepingSet::HousekeepingSet(GeneratesHousekeepingIF* owner, HousekeepingSet HousekeepingSet::~HousekeepingSet() {} void HousekeepingSet::report(const Action* action) { - if (helper == nullptr) { + if (helper != nullptr) { helper->reportHousekeeping(this, action); } }