Merge pull request 'kranz_revert_mgt_hk' (#150) from kranz_revert_mgt_hk into main

Reviewed-on: #150
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
This commit is contained in:
Robin Müller 2023-03-03 10:53:46 +01:00
commit 783d5a8ed5
1 changed files with 3 additions and 4 deletions

View File

@ -73,7 +73,6 @@ class ImtqSetId(enum.IntEnum):
NEGATIVE_Y_TEST = 13
POSITIVE_Z_TEST = 14
NEGATIVE_Z_TEST = 15
SELF_TEST_SET = 16
class ImtqActionId:
@ -225,7 +224,7 @@ def pack_imtq_test_into(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_cod
)
)
if op_code == "10": # doesnt seem to work anymore
if op_code == "10": # doesnt seem to work anymore
q.add_log_cmd("IMTQ: Get commanded dipole")
command = object_id.as_bytes + ImtqActionId.get_commanded_dipole
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
@ -297,7 +296,7 @@ def pack_imtq_test_into(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_cod
q.add_pus_tc(
create_request_one_diag_command(
sid=make_sid(
object_id=object_id.as_bytes, set_id=ImtqSetId.RAW_MTM_WITH_TORQUE_TORQUE
object_id=object_id.as_bytes, set_id=ImtqSetId.RAW_MTM_WITH_TORQUE
)
)
)
@ -386,7 +385,7 @@ ENG_HK_HEADERS = [
def handle_imtq_hk(printer: FsfwTmTcPrinter, hk_data: bytes, set_id: int):
if set_id == ImtqSetId.SELF_TEST_SET:
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")