ACS IMTQ Update #284

Merged
muellerr merged 8 commits from mueller/acs-imtq-update into develop 2022-08-24 16:56:52 +02:00
3 changed files with 33 additions and 18 deletions
Showing only changes of commit 726e448af9 - Show all commits

View File

@ -48,7 +48,7 @@ class AcsController : public ExtendedControllerBase {
PoolEntry<float> mgm1PoolVec = PoolEntry<float>(3); PoolEntry<float> mgm1PoolVec = PoolEntry<float>(3);
PoolEntry<float> mgm2PoolVec = PoolEntry<float>(3); PoolEntry<float> mgm2PoolVec = PoolEntry<float>(3);
PoolEntry<float> mgm3PoolVec = PoolEntry<float>(3); PoolEntry<float> mgm3PoolVec = PoolEntry<float>(3);
PoolEntry<int32_t> imtqMgmPoolVec = PoolEntry<int32_t>(3); PoolEntry<float> imtqMgmPoolVec = PoolEntry<float>(3);
PoolEntry<uint8_t> imtqCalActStatus = PoolEntry<uint8_t>(); PoolEntry<uint8_t> imtqCalActStatus = PoolEntry<uint8_t>();
void copyMgmData(); void copyMgmData();

View File

@ -778,22 +778,37 @@ void IMTQHandler::fillCalibratedMtmDataset(const uint8_t* packet) {
void IMTQHandler::fillRawMtmDataset(const uint8_t* packet) { void IMTQHandler::fillRawMtmDataset(const uint8_t* packet) {
PoolReadGuard rg(&rawMtmMeasurementSet); PoolReadGuard rg(&rawMtmMeasurementSet);
int8_t offset = 2; unsigned int offset = 2;
rawMtmMeasurementSet.mtmRawNt[0] = (*(packet + offset + 3) << 24 | *(packet + offset + 2) << 16 | size_t deSerLen = 16;
*(packet + offset + 1) << 8 | *(packet + offset)) * const uint8_t* dataStart = packet + offset;
7.5; int32_t xRaw = 0;
offset += 4; int32_t yRaw = 0;
rawMtmMeasurementSet.mtmRawNt[1] = (*(packet + offset + 3) << 24 | *(packet + offset + 2) << 16 | int32_t zRaw = 0;
*(packet + offset + 1) << 8 | *(packet + offset)) * uint32_t coilActStatus = 0;
7.5; auto res = SerializeAdapter::deSerialize(&xRaw, &dataStart, &deSerLen,
offset += 4; SerializeIF::Endianness::LITTLE);
rawMtmMeasurementSet.mtmRawNt[2] = (*(packet + offset + 3) << 24 | *(packet + offset + 2) << 16 | if(res != HasReturnvaluesIF::RETURN_OK) {
*(packet + offset + 1) << 8 | *(packet + offset)) * return;
7.5; }
offset += 4; res = SerializeAdapter::deSerialize(&yRaw, &dataStart, &deSerLen,
rawMtmMeasurementSet.coilActuationStatus = (*(packet + offset + 3) << 24) | SerializeIF::Endianness::LITTLE);
(*(packet + offset + 2) << 16) | if(res != HasReturnvaluesIF::RETURN_OK) {
(*(packet + offset + 1) << 8) | (*(packet + offset)); return;
}
res = SerializeAdapter::deSerialize(&zRaw, &dataStart, &deSerLen,
SerializeIF::Endianness::LITTLE);
if(res != HasReturnvaluesIF::RETURN_OK) {
return;
}
res = SerializeAdapter::deSerialize(&coilActStatus, &dataStart, &deSerLen,
SerializeIF::Endianness::LITTLE);
if(res != HasReturnvaluesIF::RETURN_OK) {
return;
}
rawMtmMeasurementSet.mtmRawNt[0] = xRaw * 7.5;
rawMtmMeasurementSet.mtmRawNt[1] = yRaw * 7.5;
rawMtmMeasurementSet.mtmRawNt[2] = zRaw * 7.5;
rawMtmMeasurementSet.coilActuationStatus = static_cast<uint8_t>(coilActStatus);
rawMtmMeasurementSet.setValidity(true, true); rawMtmMeasurementSet.setValidity(true, true);
if (debugMode) { if (debugMode) {
#if OBSW_VERBOSE_LEVEL >= 1 #if OBSW_VERBOSE_LEVEL >= 1

2
tmtc

@ -1 +1 @@
Subproject commit 7a309b4dc1cfb02626bb0b4b3d4e4d06f8192506 Subproject commit 7e2ea08277148873cfa541a872b5cc52bf06ee5e