tested some commands
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
Robin Müller 2022-02-03 15:03:35 +01:00
parent e142408bb8
commit 9bf3e46e3c
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
4 changed files with 10 additions and 5 deletions

View File

@ -161,7 +161,7 @@ void ObjectFactory::produce(void* args) {
I2cCookie* bpxI2cCookie = new I2cCookie(addresses::BPX_BATTERY, 100, q7s::I2C_DEFAULT_DEV);
BpxBatteryHandler* bpxHandler =
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->setStartUpImmediately();
#else

View File

@ -77,6 +77,7 @@ debugging. */
#define OBSW_TEST_RADIATION_SENSOR_HANDLER 0
#define OBSW_TEST_SUS_HANDLER 0
#define OBSW_TEST_PLOC_HANDLER 0
#define OBSW_TEST_BPX_BATT 0
#define OBSW_TEST_CCSDS_BRIDGE 0
#define OBSW_TEST_CCSDS_PTME 0
#define OBSW_TEST_TE7020_HEATER 0

View File

@ -44,9 +44,9 @@ ReturnValue_t BpxBatteryHandler::buildTransitionDeviceCommand(DeviceCommandId_t*
void BpxBatteryHandler::fillCommandAndReplyMap() {
insertInCommandAndReplyMap(BpxBattery::GET_HK, 1, &hkSet, 23);
insertInCommandAndReplyMap(BpxBattery::PING, 1, nullptr, 3);
insertInCommandAndReplyMap(BpxBattery::REBOOT, 1);
insertInCommandAndReplyMap(BpxBattery::RESET_COUNTERS, 1);
insertInCommandAndReplyMap(BpxBattery::CONFIG_CMD, 1);
insertInCommandAndReplyMap(BpxBattery::REBOOT, 1, nullptr, 0);
insertInCommandAndReplyMap(BpxBattery::RESET_COUNTERS, 1, nullptr, 2);
insertInCommandAndReplyMap(BpxBattery::CONFIG_CMD, 1, nullptr, 2);
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) {
if (packet[1] != 0) {
return DeviceHandlerIF::DEVICE_REPORTED_ERROR;
}
switch (id) {
case (BpxBattery::GET_HK): {
PoolReadGuard rg(&hkSet);
ReturnValue_t result = hkSet.parseRawHk(packet + 2, 21);
hkSet.setValidity(true, true);
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
}

2
tmtc

@ -1 +1 @@
Subproject commit 8da50e2c3f709def5b26fd9df1cd23beac35482e
Subproject commit 1702d895761311d115c2e79b459b4a6d6843fc97