This commit is contained in:
parent
e142408bb8
commit
9bf3e46e3c
@ -161,7 +161,7 @@ void ObjectFactory::produce(void* args) {
|
|||||||
I2cCookie* bpxI2cCookie = new I2cCookie(addresses::BPX_BATTERY, 100, q7s::I2C_DEFAULT_DEV);
|
I2cCookie* bpxI2cCookie = new I2cCookie(addresses::BPX_BATTERY, 100, q7s::I2C_DEFAULT_DEV);
|
||||||
BpxBatteryHandler* bpxHandler =
|
BpxBatteryHandler* bpxHandler =
|
||||||
new BpxBatteryHandler(objects::BPX_BATT_HANDLER, objects::I2C_COM_IF, bpxI2cCookie);
|
new BpxBatteryHandler(objects::BPX_BATT_HANDLER, objects::I2C_COM_IF, bpxI2cCookie);
|
||||||
#if OBSW_DEBUG_BPX_BATT == 1
|
#if OBSW_TEST_BPX_BATT == 1
|
||||||
bpxHandler->setToGoToNormalMode(true);
|
bpxHandler->setToGoToNormalMode(true);
|
||||||
bpxHandler->setStartUpImmediately();
|
bpxHandler->setStartUpImmediately();
|
||||||
#else
|
#else
|
||||||
|
@ -77,6 +77,7 @@ debugging. */
|
|||||||
#define OBSW_TEST_RADIATION_SENSOR_HANDLER 0
|
#define OBSW_TEST_RADIATION_SENSOR_HANDLER 0
|
||||||
#define OBSW_TEST_SUS_HANDLER 0
|
#define OBSW_TEST_SUS_HANDLER 0
|
||||||
#define OBSW_TEST_PLOC_HANDLER 0
|
#define OBSW_TEST_PLOC_HANDLER 0
|
||||||
|
#define OBSW_TEST_BPX_BATT 0
|
||||||
#define OBSW_TEST_CCSDS_BRIDGE 0
|
#define OBSW_TEST_CCSDS_BRIDGE 0
|
||||||
#define OBSW_TEST_CCSDS_PTME 0
|
#define OBSW_TEST_CCSDS_PTME 0
|
||||||
#define OBSW_TEST_TE7020_HEATER 0
|
#define OBSW_TEST_TE7020_HEATER 0
|
||||||
|
@ -44,9 +44,9 @@ ReturnValue_t BpxBatteryHandler::buildTransitionDeviceCommand(DeviceCommandId_t*
|
|||||||
void BpxBatteryHandler::fillCommandAndReplyMap() {
|
void BpxBatteryHandler::fillCommandAndReplyMap() {
|
||||||
insertInCommandAndReplyMap(BpxBattery::GET_HK, 1, &hkSet, 23);
|
insertInCommandAndReplyMap(BpxBattery::GET_HK, 1, &hkSet, 23);
|
||||||
insertInCommandAndReplyMap(BpxBattery::PING, 1, nullptr, 3);
|
insertInCommandAndReplyMap(BpxBattery::PING, 1, nullptr, 3);
|
||||||
insertInCommandAndReplyMap(BpxBattery::REBOOT, 1);
|
insertInCommandAndReplyMap(BpxBattery::REBOOT, 1, nullptr, 0);
|
||||||
insertInCommandAndReplyMap(BpxBattery::RESET_COUNTERS, 1);
|
insertInCommandAndReplyMap(BpxBattery::RESET_COUNTERS, 1, nullptr, 2);
|
||||||
insertInCommandAndReplyMap(BpxBattery::CONFIG_CMD, 1);
|
insertInCommandAndReplyMap(BpxBattery::CONFIG_CMD, 1, nullptr, 2);
|
||||||
insertInCommandAndReplyMap(BpxBattery::CONFIG_GET, 1, &cfgSet, 3);
|
insertInCommandAndReplyMap(BpxBattery::CONFIG_GET, 1, &cfgSet, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -181,10 +181,14 @@ ReturnValue_t BpxBatteryHandler::scanForReply(const uint8_t* start, size_t remai
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t BpxBatteryHandler::interpretDeviceReply(DeviceCommandId_t id, const uint8_t* packet) {
|
ReturnValue_t BpxBatteryHandler::interpretDeviceReply(DeviceCommandId_t id, const uint8_t* packet) {
|
||||||
|
if (packet[1] != 0) {
|
||||||
|
return DeviceHandlerIF::DEVICE_REPORTED_ERROR;
|
||||||
|
}
|
||||||
switch (id) {
|
switch (id) {
|
||||||
case (BpxBattery::GET_HK): {
|
case (BpxBattery::GET_HK): {
|
||||||
PoolReadGuard rg(&hkSet);
|
PoolReadGuard rg(&hkSet);
|
||||||
ReturnValue_t result = hkSet.parseRawHk(packet + 2, 21);
|
ReturnValue_t result = hkSet.parseRawHk(packet + 2, 21);
|
||||||
|
hkSet.setValidity(true, true);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
|||||||
Subproject commit 8da50e2c3f709def5b26fd9df1cd23beac35482e
|
Subproject commit 1702d895761311d115c2e79b459b4a6d6843fc97
|
Loading…
Reference in New Issue
Block a user