add missing HK handling

This commit is contained in:
Robin Müller 2023-02-19 13:27:59 +01:00
parent a2d04b28fd
commit 335d901451
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814

View File

@ -28,6 +28,9 @@ from tmtccmd.util import ObjectIdU32
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
_LOGGER = logging.getLogger(__name__)
class OpCode:
ON = "on"
NORMAL = "normal"
@ -307,16 +310,24 @@ def handle_imtq_hk(printer: FsfwTmTcPrinter, hk_data: bytes, set_id: int):
if (set_id >= ImtqSetId.POSITIVE_X_TEST) and (set_id <= ImtqSetId.NEGATIVE_Z_TEST):
return handle_self_test_data(printer, hk_data)
elif set_id == ImtqSetId.ENG_HK_NO_TORQUE:
_LOGGER.info("Found engineering HK without torque")
return handle_eng_set(printer, hk_data)
elif set_id == ImtqSetId.ENG_HK_SET_WITH_TORQUE:
_LOGGER.info("Found engineering HK during torque")
return handle_eng_set(printer, hk_data)
elif set_id == ImtqSetId.CAL_MTM_SET:
return handle_calibrated_mtm_measurement(printer, hk_data)
elif set_id == ImtqSetId.RAW_MTM_NO_TORQUE:
_LOGGER.info("Found raw MTM measurement without torque")
return handle_raw_mtm_measurement(printer, hk_data)
elif set_id == ImtqSetId.RAW_MTM_WITH_TORQUE:
_LOGGER.info("Found raw MTM measurement during torque")
return handle_raw_mtm_measurement(printer, hk_data)
elif set_id == ImtqSetId.STATUS_SET:
return handle_status_set(printer, hk_data)
else:
logging.getLogger(__name__).info(
"Service 3 TM: IMTQ handler reply with unknown set id"
_LOGGER.warning(
f"IMTQ handler HK reply with unknown or unimplemented set id {set_id}"
)