From c91ad9e08b47a51ec1d07297fecbf1fede1233ff Mon Sep 17 00:00:00 2001 From: meggert Date: Fri, 4 Aug 2023 15:01:34 +0200 Subject: [PATCH] bump --- eive_tmtc/tmtc/acs/gps.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/eive_tmtc/tmtc/acs/gps.py b/eive_tmtc/tmtc/acs/gps.py index 4bb0a66..2df5f95 100644 --- a/eive_tmtc/tmtc/acs/gps.py +++ b/eive_tmtc/tmtc/acs/gps.py @@ -69,30 +69,30 @@ def add_gps_cmds(defs: TmtcDefinitionWrapper): def pack_gps_command(object_id: bytes, q: DefaultPusQueueHelper, op_code: str): - sid = make_sid(object_id=object_id, set_id=SetId.HK) - if op_code in OpCode.RESET_GNSS: + if op_code == OpCode.RESET_GNSS: # TODO: This needs to be re-implemented _LOGGER.warning("Reset pin handling needs to be re-implemented") - if op_code in OpCode.ENABLE_HK: + if op_code == OpCode.ENABLE_CORE_HK: interval = float(input("Please specify interval in floating point seconds: ")) if interval <= 0: raise ValueError("invalid interval") - q.add_log_cmd(f"GPS: {Info.ENABLE_HK}") + q.add_log_cmd(f"GPS: {Info.ENABLE_CORE_HK}") cmds = create_enable_periodic_hk_command_with_interval( - diag=False, sid=sid, interval_seconds=interval + diag=False, sid=make_sid(object_id=object_id, set_id=SetId.CORE_HK), interval_seconds=interval ) for cmd in cmds: q.add_pus_tc(cmd) - if op_code in OpCode.DISABLE_HK: - q.add_log_cmd(f"gps: {Info.DISABLE_HK}") - q.add_pus_tc(create_disable_periodic_hk_command(diag=False, sid=sid)) - if op_code in OpCode.REQ_OS_HK: - q.add_log_cmd(f"GPS: {Info.REQ_OS_HK}") - q.add_pus_tc(create_request_one_hk_command(sid=sid)) - if op_code in OpCode.ON: + if op_code == 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: + 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: q.add_log_cmd(f"GPS: {Info.ON}") q.add_pus_tc(create_mode_command(object_id, Mode.ON, 0)) - if op_code in OpCode.OFF: + if op_code == OpCode.OFF: q.add_log_cmd(f"GPS: {Info.OFF}") q.add_pus_tc(create_mode_command(object_id, Mode.OFF, 0)) @@ -107,8 +107,8 @@ def handle_gps_data( match set_id: case SetId.CORE_HK: handle_core_data(pw, hk_data) - case SetId.SKYVIEW_HK: - handle_mgm_data_processed(pw, hk_data) + #case SetId.SKYVIEW_HK: + # handle_mgm_data_processed(pw, hk_data) def handle_core_data(pw: PrintWrapper, hk_data: bytes):