diff --git a/mission/acs/str/StarTrackerHandler.cpp b/mission/acs/str/StarTrackerHandler.cpp index 1bf35ca2..3ebc92fb 100644 --- a/mission/acs/str/StarTrackerHandler.cpp +++ b/mission/acs/str/StarTrackerHandler.cpp @@ -671,6 +671,10 @@ ReturnValue_t StarTrackerHandler::buildCommandFromCommand(DeviceCommandId_t devi result = prepareRequestBlobsTm(); return result; } + case(startracker::REQ_AUTO_BLOB): { + result = prepareRequestAutoBlobTm(); + return returnvalue::OK; + } case (startracker::REQ_MATCHING): { result = prepareRequestMatchingParams(); return result; @@ -1484,6 +1488,8 @@ ReturnValue_t StarTrackerHandler::initializeLocalDataPool(localpool::DataPool& l localDataPoolMap.emplace(startracker::CHKSUM, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::TICKS_AUTO_BLOB, new PoolEntry()); + localDataPoolMap.emplace(startracker::TIME_AUTO_BLOB, new PoolEntry()); localDataPoolMap.emplace(startracker::AUTO_BLOB_THRESHOLD, new PoolEntry()); localDataPoolMap.emplace(startracker::PoolIds::NUM_MATCHED_CENTROIDS, new PoolEntry()); @@ -2351,6 +2357,7 @@ ReturnValue_t StarTrackerHandler::handleAutoBlobTm(const uint8_t* rawFrame) { if (result != returnvalue::OK) { return result; } + rawFrame += TICKS_OFFSET; size_t remainingLen = fullPacketLen; PoolReadGuard pg(&autoBlobSet); result = pg.getReadResult(); @@ -2381,6 +2388,7 @@ ReturnValue_t StarTrackerHandler::handleMatchedCentroidTm(const uint8_t* rawFram if (result != returnvalue::OK) { return result; } + rawFrame += TICKS_OFFSET; size_t remainingLen = fullPacketLen; PoolReadGuard pg(&matchedCentroidsSet); result = pg.getReadResult(); @@ -2440,6 +2448,7 @@ ReturnValue_t StarTrackerHandler::handleBlobTm(const uint8_t* rawFrame) { if (result != returnvalue::OK) { return result; } + rawFrame += TICKS_OFFSET; size_t remainingLen = fullPacketLen; PoolReadGuard pg(&blobsSet); result = pg.getReadResult(); @@ -2470,6 +2479,7 @@ ReturnValue_t StarTrackerHandler::handleBlobsTm(const uint8_t* rawFrame) { if (result != returnvalue::OK) { return result; } + rawFrame += TICKS_OFFSET; size_t remainingLen = fullPacketLen; PoolReadGuard pg(&blobsSet); result = pg.getReadResult(); @@ -2522,6 +2532,7 @@ ReturnValue_t StarTrackerHandler::handleCentroidTm(const uint8_t* rawFrame) { if (result != returnvalue::OK) { return result; } + rawFrame += TICKS_OFFSET; size_t remainingLen = fullPacketLen; PoolReadGuard pg(¢roidsSet); result = pg.getReadResult(); @@ -2553,6 +2564,7 @@ ReturnValue_t StarTrackerHandler::handleCentroidsTm(const uint8_t* rawFrame) { if (result != returnvalue::OK) { return result; } + rawFrame += TICKS_OFFSET; size_t remainingLen = fullPacketLen; PoolReadGuard pg(¢roidsSet); result = pg.getReadResult(); diff --git a/mission/acs/str/strHelpers.h b/mission/acs/str/strHelpers.h index dff29f95..2fe999c0 100644 --- a/mission/acs/str/strHelpers.h +++ b/mission/acs/str/strHelpers.h @@ -274,6 +274,8 @@ enum PoolIds : lp_id_t { DEBUG_CAMERA_TIMING, DEBUG_CAMERA_TEST, + TICKS_AUTO_BLOB, + TIME_AUTO_BLOB, AUTO_BLOB_THRESHOLD, TICKS_MATCHED_CENTROIDS, @@ -1441,10 +1443,10 @@ class AutoBlobSet : public StaticLocalDataSet<3> { AutoBlobSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, AUTO_BLOB_SET_ID) {} // Ticks timestamp lp_var_t ticks = - lp_var_t(sid.objectId, PoolIds::TICKS_MATCHED_CENTROIDS, this); + lp_var_t(sid.objectId, PoolIds::TICKS_AUTO_BLOB, this); // Unix time stamp lp_var_t timeUs = - lp_var_t(sid.objectId, PoolIds::TIME_MATCHED_CENTROIDS, this); + lp_var_t(sid.objectId, PoolIds::TIME_AUTO_BLOB, this); lp_var_t threshold = lp_var_t(sid.objectId, PoolIds::AUTO_BLOB_THRESHOLD, this); private: @@ -1466,15 +1468,15 @@ class MatchedCentroidsSet : public StaticLocalDataSet<20> { lp_var_t numberOfMatchedCentroids = lp_var_t(sid.objectId, PoolIds::NUM_MATCHED_CENTROIDS, this); lp_vec_t starIds = - lp_vec_t(sid.objectId, PoolIds::MATCHED_CENTROIDS_STAR_IDS); + lp_vec_t(sid.objectId, PoolIds::MATCHED_CENTROIDS_STAR_IDS, this); lp_vec_t xCoords = - lp_vec_t(sid.objectId, PoolIds::MATCHED_CENTROIDS_X_COORDS); + lp_vec_t(sid.objectId, PoolIds::MATCHED_CENTROIDS_X_COORDS, this); lp_vec_t yCoords = - lp_vec_t(sid.objectId, PoolIds::MATCHED_CENTROIDS_Y_COORDS); + lp_vec_t(sid.objectId, PoolIds::MATCHED_CENTROIDS_Y_COORDS, this); lp_vec_t xErrors = - lp_vec_t(sid.objectId, PoolIds::MATCHED_CENTROIDS_X_ERRORS); + lp_vec_t(sid.objectId, PoolIds::MATCHED_CENTROIDS_X_ERRORS, this); lp_vec_t yErrors = - lp_vec_t(sid.objectId, PoolIds::MATCHED_CENTROIDS_Y_ERRORS); + lp_vec_t(sid.objectId, PoolIds::MATCHED_CENTROIDS_Y_ERRORS, this); private: }; diff --git a/tmtc b/tmtc index c4598ff0..97b52931 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit c4598ff05858952d0107d4f6f61cbef8ff2de691 +Subproject commit 97b529318dbc654ec55fd765f892bff212918f39