added test to retrieve pdu config
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
This commit is contained in:
@ -1,14 +1,17 @@
|
||||
#include "ACUHandler.h"
|
||||
#include "OBSWConfig.h"
|
||||
|
||||
#include "p60acu_hk.h"
|
||||
#include "OBSWConfig.h"
|
||||
|
||||
ACUHandler::ACUHandler(object_id_t objectId, object_id_t comIF, CookieIF *comCookie,
|
||||
FailureIsolationBase *customFdir)
|
||||
: GomspaceDeviceHandler(objectId, comIF, comCookie, customFdir, ACU::MAX_CONFIGTABLE_ADDRESS,
|
||||
ACU::MAX_HKTABLE_ADDRESS, P60ACU_HK_SIZE),
|
||||
: GomspaceDeviceHandler(objectId, comIF, comCookie, cfg, customFdir),
|
||||
coreHk(this),
|
||||
auxHk(this) {}
|
||||
auxHk(this) {
|
||||
cfg.maxConfigTableAddress = ACU::MAX_CONFIGTABLE_ADDRESS;
|
||||
cfg.maxHkTableAddress = ACU::MAX_HKTABLE_ADDRESS;
|
||||
cfg.hkTableSize = ACU::HK_TABLE_SIZE;
|
||||
cfg.cfgTableSize = ACU::CONFIG_TABLE_SIZE;
|
||||
}
|
||||
|
||||
ACUHandler::~ACUHandler() {}
|
||||
|
||||
@ -60,32 +63,32 @@ ReturnValue_t ACUHandler::parseHkTableReply(const uint8_t *packet) {
|
||||
return res1;
|
||||
}
|
||||
for (size_t idx = 0; idx < 6; idx++) {
|
||||
coreHk.currentInChannels[idx] = as<int16_t>(packet + (idx*2));
|
||||
coreHk.currentInChannels[idx] = as<int16_t>(packet + (idx * 2));
|
||||
}
|
||||
for (size_t idx = 0; idx < 6; idx++) {
|
||||
coreHk.voltageInChannels[idx] = as<uint16_t>(packet + 0xc + (idx*2));
|
||||
coreHk.voltageInChannels[idx] = as<uint16_t>(packet + 0xc + (idx * 2));
|
||||
}
|
||||
|
||||
coreHk.vcc = as<uint16_t>(packet + 0x1a);
|
||||
coreHk.vbat = as<uint16_t>(packet + 0x18);
|
||||
|
||||
for (size_t idx = 0; idx < 3; idx++) {
|
||||
coreHk.temperatures[idx] = as<int16_t>(packet + 0x1c + (idx*2)) * 0.1;
|
||||
coreHk.temperatures[idx] = as<int16_t>(packet + 0x1c + (idx * 2)) * 0.1;
|
||||
}
|
||||
|
||||
coreHk.mpptMode = packet[0x22];
|
||||
|
||||
for (size_t idx = 0; idx < 6; idx++) {
|
||||
coreHk.vboostInChannels[idx] = as<uint16_t>(packet + 0x24 + (idx*2));
|
||||
coreHk.vboostInChannels[idx] = as<uint16_t>(packet + 0x24 + (idx * 2));
|
||||
}
|
||||
for (size_t idx = 0; idx < 6; idx++) {
|
||||
coreHk.powerInChannels[idx] = as<uint16_t>(packet + 0x30 + (idx*2));
|
||||
coreHk.powerInChannels[idx] = as<uint16_t>(packet + 0x30 + (idx * 2));
|
||||
}
|
||||
for (size_t idx = 0; idx < 3; idx++) {
|
||||
auxHk.dacEnables[idx] = *(packet + 0x3c + idx);
|
||||
}
|
||||
for (size_t idx = 0; idx < 6; idx++) {
|
||||
auxHk.dacRawChannelVals[idx] = as<uint16_t>(packet + 0x40 + (idx*2));
|
||||
auxHk.dacRawChannelVals[idx] = as<uint16_t>(packet + 0x40 + (idx * 2));
|
||||
}
|
||||
|
||||
auxHk.bootCause = as<uint32_t>(packet + 0x50);
|
||||
|
Reference in New Issue
Block a user