diff --git a/pus_tc/procedure_packer.py b/pus_tc/procedure_packer.py index 1a3376a..5271163 100644 --- a/pus_tc/procedure_packer.py +++ b/pus_tc/procedure_packer.py @@ -208,8 +208,6 @@ def handle_default_procedure( return pack_acs_command(q=queue_helper, op_code=op_code) if service == CustomServiceList.TCS_ASS.value: return pack_tcs_sys_commands(q=queue_helper, op_code=op_code) - if service == CustomServiceList.TIME.value: - return pack_set_current_time_ascii_command(q=queue_helper) if service == CustomServiceList.RW_ASSEMBLY.value: return pack_rw_ass_cmds(q=queue_helper, object_id=RW_ASSEMBLY, op_code=op_code) if service == CustomServiceList.CONTROLLERS.value: diff --git a/tmtc/ploc_supervisor.py b/tmtc/ploc_supervisor.py index 7df428a..750ef9e 100644 --- a/tmtc/ploc_supervisor.py +++ b/tmtc/ploc_supervisor.py @@ -114,6 +114,9 @@ class OpCodes: OFF = ["0", "off"] ON = ["1", "on"] NORMAL = ["2", "nml"] + HK_REPORT = ["3", "hk"] + START_MPSOC = ["4", "mpsoc-start"] + STOP_MPSOC = ["5", "mpsoc-stop"] @tmtc_definitions_provider @@ -127,9 +130,9 @@ def add_ploc_supv_cmds(defs: TmtcDefinitionWrapper): oce.add(OpCodes.OFF, "Mode Off") oce.add(OpCodes.ON, "Mode On") oce.add(OpCodes.NORMAL, "Mode Normal") - oce.add("3", "PLOC Supervisor: Get HK Report") - oce.add("5", "PLOC Supervisor: Start MPSoC") - oce.add("6", "PLOC Supervisor: Shutdown MPSoC") + oce.add(OpCodes.HK_REPORT, "HK Report") + oce.add(OpCodes.START_MPSOC, "PLOC Supervisor: Start MPSoC") + oce.add(OpCodes.STOP_MPSOC, "PLOC Supervisor: Shutdown MPSoC") oce.add("7", "PLOC Supervisor: Select MPSoC boot image") oce.add("8", "PLOC Supervisor: Set max restart tries") oce.add("9", "PLOC Supervisor: Reset MPSoC") @@ -190,7 +193,7 @@ def pack_ploc_supv_commands(p: ServiceProviderParams): q.add_log_cmd("PLOC Supervisor: Mode Normal") command = pack_mode_data(object_id.as_bytes, Modes.NORMAL, 0) q.add_pus_tc(PusTelecommand(service=200, subservice=1, app_data=command)) - if op_code == "3": + if op_code in OpCodes.HK_REPORT: q.add_log_cmd("PLOC Supervisor: TC Get Hk Report") command = obyt + struct.pack("!I", SupvActionIds.HK_REPORT) q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))