diff --git a/eive_tmtc/tmtc/payload/ploc_supervisor.py b/eive_tmtc/tmtc/payload/ploc_supervisor.py index 49dea9d..d6f2892 100644 --- a/eive_tmtc/tmtc/payload/ploc_supervisor.py +++ b/eive_tmtc/tmtc/payload/ploc_supervisor.py @@ -272,13 +272,13 @@ def pack_ploc_supv_commands(p: ServiceProviderParams): key = -1 while True: print("Please select the key for a factory reset operation") - for key, val in FACTORY_RESET_OPS: + for key, val in FACTORY_RESET_OPS.items(): print(f"{key}: {val}") key = int(input("Key Select: ")) if key not in FACTORY_RESET_OPS: print("Key invalid!") break - q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=bytes([key]))) + q.add_pus_tc(make_fsfw_action_cmd(object_id=PLOC_SUPV_ID, action_id=SupvActionIds.FACTORY_RESET, user_data=bytes([key]))) if op_code == "8": q.add_log_cmd("PLOC Supervisor: Set max restart tries") restart_tries = int(input("Specify maximum restart tries: "))