From feb64598783af99abdb66ce6ee668446a168efe9 Mon Sep 17 00:00:00 2001 From: meggert Date: Thu, 19 Oct 2023 14:54:12 +0200 Subject: [PATCH] might wanna push this --- mission/acs/str/StarTrackerHandler.cpp | 19 +++++++++++++++++-- mission/acs/str/StarTrackerHandler.h | 3 ++- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/mission/acs/str/StarTrackerHandler.cpp b/mission/acs/str/StarTrackerHandler.cpp index 1b1300b5..0e81b7e4 100644 --- a/mission/acs/str/StarTrackerHandler.cpp +++ b/mission/acs/str/StarTrackerHandler.cpp @@ -660,7 +660,7 @@ ReturnValue_t StarTrackerHandler::buildCommandFromCommand(DeviceCommandId_t devi return result; } case (startracker::REQ_MATCHED_CENTROIDS): { - result = prepareRequestMatchedCentroids(); + result = prepareRequestMatchedCentroidsTm(); return result; } case (startracker::REQ_BLOB): { @@ -793,6 +793,8 @@ void StarTrackerHandler::fillCommandAndReplyMap() { startracker::MAX_FRAME_SIZE * 2 + 2); this->insertInCommandAndReplyMap(startracker::REQ_DEBUG_CAMERA, 3, &debugCameraSet, startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::REQ_AUTO_BLOB, 3, &autoBlobSet, + startracker::MAX_FRAME_SIZE * 2 + 2); this->insertInCommandAndReplyMap(startracker::REQ_MATCHED_CENTROIDS, 3, &matchedCentroidsSet, startracker::MAX_FRAME_SIZE * 2 + 2); this->insertInCommandAndReplyMap(startracker::REQ_BLOB, 3, &blobSet, @@ -1445,6 +1447,9 @@ ReturnValue_t StarTrackerHandler::initializeLocalDataPool(localpool::DataPool& l localDataPoolMap.emplace(startracker::DEBUG_CAMERA_TEST, new PoolEntry({0})); localDataPoolMap.emplace(startracker::CHKSUM, new PoolEntry({0})); + + localDataPoolMap.emplace(startracker::AUTO_BLOB_THRESHOLD, new PoolEntry()); + localDataPoolMap.emplace(startracker::PoolIds::NUM_MATCHED_CENTROIDS, new PoolEntry()); localDataPoolMap.emplace(startracker::PoolIds::MATCHED_CENTROIDS_STAR_IDS, new PoolEntry(16)); @@ -1498,6 +1503,8 @@ ReturnValue_t StarTrackerHandler::initializeLocalDataPool(localpool::DataPool& l subdp::RegularHkPeriodicParams(histogramSet.getSid(), false, 10.0)); poolManager.subscribeForRegularPeriodicPacket( subdp::RegularHkPeriodicParams(lisaSet.getSid(), false, 10.0)); + poolManager.subscribeForRegularPeriodicPacket( + subdp::RegularHkPeriodicParams(autoBlobSet.getSid(), false, 10.0)); poolManager.subscribeForRegularPeriodicPacket( subdp::RegularHkPeriodicParams(matchedCentroidsSet.getSid(), false, 10.0)); poolManager.subscribeForRegularPeriodicPacket( @@ -1925,7 +1932,15 @@ void StarTrackerHandler::prepareHistogramRequest() { rawPacketLen = length; } -ReturnValue_t StarTrackerHandler::prepareRequestMatchedCentroids() { +ReturnValue_t StarTrackerHandler::prepareRequestAutoBlobTm() { + uint32_t length = 0; + arc_tm_pack_autoblob_req(commandBuffer, &length); + rawPacket = commandBuffer; + rawPacketLen = length; + return returnvalue::OK; +} + +ReturnValue_t StarTrackerHandler::prepareRequestMatchedCentroidsTm() { uint32_t length = 0; arc_tm_pack_matchedcentroids_req(commandBuffer, &length); rawPacket = commandBuffer; diff --git a/mission/acs/str/StarTrackerHandler.h b/mission/acs/str/StarTrackerHandler.h index 90261285..d63335ae 100644 --- a/mission/acs/str/StarTrackerHandler.h +++ b/mission/acs/str/StarTrackerHandler.h @@ -454,7 +454,8 @@ class StarTrackerHandler : public DeviceHandlerBase { ReturnValue_t prepareRequestCentroidingParams(); ReturnValue_t prepareRequestLisaParams(); ReturnValue_t prepareRequestMatchingParams(); - ReturnValue_t prepareRequestMatchedCentroids(); + ReturnValue_t prepareRequestAutoBlobTm(); + ReturnValue_t prepareRequestMatchedCentroidsTm(); ReturnValue_t prepareRequestBlobTm(); ReturnValue_t prepareRequestBlobsTm(); ReturnValue_t prepareRequestCentroidTm();