From f95331742bd46c6efc6713e75f21e1d81f518ed3 Mon Sep 17 00:00:00 2001 From: meggert Date: Fri, 4 Aug 2023 15:38:32 +0200 Subject: [PATCH] fix --- eive_tmtc/tmtc/acs/gps.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/eive_tmtc/tmtc/acs/gps.py b/eive_tmtc/tmtc/acs/gps.py index 2df5f95..a70ca6a 100644 --- a/eive_tmtc/tmtc/acs/gps.py +++ b/eive_tmtc/tmtc/acs/gps.py @@ -69,10 +69,11 @@ def add_gps_cmds(defs: TmtcDefinitionWrapper): def pack_gps_command(object_id: bytes, q: DefaultPusQueueHelper, op_code: str): - if op_code == OpCode.RESET_GNSS: + print("Yo") + if op_code in OpCode.RESET_GNSS: # TODO: This needs to be re-implemented _LOGGER.warning("Reset pin handling needs to be re-implemented") - if op_code == OpCode.ENABLE_CORE_HK: + if op_code in OpCode.ENABLE_CORE_HK: interval = float(input("Please specify interval in floating point seconds: ")) if interval <= 0: raise ValueError("invalid interval") @@ -82,17 +83,18 @@ def pack_gps_command(object_id: bytes, q: DefaultPusQueueHelper, op_code: str): ) for cmd in cmds: q.add_pus_tc(cmd) - if op_code == OpCode.DISABLE_CORE_HK: + if op_code in OpCode.DISABLE_CORE_HK: q.add_log_cmd(f"gps: {Info.DISABLE_CORE_HK}") q.add_pus_tc(create_disable_periodic_hk_command(diag=False, sid=make_sid(object_id=object_id, set_id=SetId.CORE_HK))) - if op_code == OpCode.REQ_CORE_HK: + if op_code in OpCode.REQ_CORE_HK: + print("Waddup") q.add_log_cmd(f"GPS: {Info.REQ_CORE_HK}") q.add_pus_tc(create_request_one_hk_command(sid=make_sid(object_id=object_id, set_id=SetId.CORE_HK))) - if op_code == OpCode.ON: + if op_code in OpCode.ON: q.add_log_cmd(f"GPS: {Info.ON}") q.add_pus_tc(create_mode_command(object_id, Mode.ON, 0)) - if op_code == OpCode.OFF: + if op_code in OpCode.OFF: q.add_log_cmd(f"GPS: {Info.OFF}") q.add_pus_tc(create_mode_command(object_id, Mode.OFF, 0))