read acu hk table complete

This commit is contained in:
Martin Zietz
2021-02-16 17:02:03 +01:00
parent 3ac6b7bafe
commit a17b6ffcce
5 changed files with 12 additions and 5 deletions

View File

@ -1,4 +1,5 @@
#include "ACUHandler.h"
#include "OBSWConfig.h"
ACUHandler::ACUHandler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie) :
GomspaceDeviceHandler(objectId, comIF, comCookie, ACU::MAX_CONFIGTABLE_ADDRESS,
@ -28,6 +29,10 @@ void ACUHandler::letChildHandleHkReply(DeviceCommandId_t id, const uint8_t *pack
sif::info << "ACU: Temperature 1: " << temperatureC_1 << " °C" << std::endl;
sif::info << "ACU: Temperature 2: " << temperatureC_2 << " °C" << std::endl;
sif::info << "ACU: Temperature 3: " << temperatureC_3 << " °C" << std::endl;
sif::info << "ACU: Ground Watchdog Timer Count: "
<< acuHkTableDataset.wdtCntGnd.value << std::endl;
sif::info << "ACU: Ground watchdog timer, seconds left before reboot: "
<< acuHkTableDataset.wdtGndLeft.value << std::endl;
acuHkTableDataset.commit();
#endif
}
@ -132,7 +137,9 @@ void ACUHandler::parseHkTableReply(const uint8_t *packet) {
acuHkTableDataset.resetCause = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
dataOffset += 4;
acuHkTableDataset.mpptTime = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
dataOffset += 4;
/* +12 because here starts the second csp packet */
dataOffset += 2 + 12;
acuHkTableDataset.mpptPeriod = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
dataOffset += 4;