minor fixes

This commit is contained in:
Robin Müller 2022-12-23 11:00:19 +01:00
parent 825a1972c4
commit 5c675560ea

View File

@ -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: "))