hk handing bpx fix

This commit is contained in:
Robin Mueller 2022-04-06 17:35:04 +02:00
parent d4ebb1b8aa
commit ce7be3a3eb
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814

View File

@ -70,22 +70,22 @@ def handle_regular_hk_print(
elif set_id == SetIds.TX_REGISTERS_DATASET:
return handle_syrlinks_tx_registers_dataset(printer, hk_data)
else:
LOGGER.info("Serive 3 TM: Syrlinks handler reply with unknown set id")
LOGGER.info("Service 3 TM: Syrlinks handler reply with unknown set id")
elif object_id == IMTQ_HANDLER_ID:
if (set_id >= ImtqSetIds.POSITIVE_X_TEST) and (
set_id <= ImtqSetIds.NEGATIVE_Z_TEST
):
return handle_self_test_data(printer, hk_data)
else:
LOGGER.info("Serive 3 TM: Syrlinks handler reply with unknown set id")
LOGGER.info("Service 3 TM: Syrlinks handler reply with unknown set id")
elif object_id == GPS_HANDLER_0_ID or object_id == GPS_HANDLER_1_ID:
return handle_gps_data(printer=printer, hk_data=hk_data)
handle_gps_data(printer=printer, hk_data=hk_data)
elif object_id == BPX_HANDLER_ID:
return handle_bpx_hk_data(hk_data=hk_data, set_id=set_id, printer=printer)
handle_bpx_hk_data(hk_data=hk_data, set_id=set_id, printer=printer)
elif object_id == CORE_CONTROLLER_ID:
return handle_core_hk_data(printer=printer, hk_data=hk_data)
elif object_id == P60_DOCK_HANDLER:
return handle_p60_hk_data(printer=printer, hk_data=hk_data)
handle_p60_hk_data(printer=printer, hk_data=hk_data)
else:
LOGGER.info("Service 3 TM: Parsing for this SID has not been implemented.")
return HkReplyUnpacked()
@ -334,7 +334,7 @@ def handle_gps_data(printer: FsfwTmTcPrinter, hk_data: bytes):
def handle_bpx_hk_data(printer: FsfwTmTcPrinter, set_id: int, hk_data: bytes):
if set_id == BpxSetIds.GET_HK_SET:
fmt_str = "!HHHHhhhhI"
fmt_str = "!HHHHhhhhIB"
inc_len = struct.calcsize(fmt_str)
(
charge_current,