less confusing cmd names

This commit is contained in:
Robin Müller 2024-04-30 14:36:11 +02:00
parent f9041f215a
commit de34952df5
1 changed files with 5 additions and 5 deletions

View File

@ -112,7 +112,7 @@ class SupvActionId(enum.IntEnum):
REQUEST_ADC_REPORT = 57
RESET_PL = 58
ENABLE_NVMS = 59
CONTINUE_UPDATE = 60
RESUME_UPDATE = 60
MEM_CHECK = 61
@ -137,7 +137,7 @@ class OpCode:
SET_TIME_REF = "set_time_ref"
FACTORY_FLASH = "factory_flash"
START_UPDATE = "start_update"
PERFORM_UPDATE = "update"
RESUME_UPDATE = "resum_update"
FACTORY_RESET = "factory_reset"
MEM_CHECK = "mem_check"
RESET_MPSOC = "reset_mpsoc"
@ -156,7 +156,7 @@ class Info(str, enum.Enum):
SHUTDOWN_MPSOC = "Shutdown MPSoC"
SET_TIME_REF = "Set time reference"
FACTORY_FLASH = "Factory Flash Mode"
PERFORM_UPDATE = "Start or continue MPSoC SW update at starting bytes"
RESUME_UPDATE = "Start or continue MPSoC SW update at starting bytes"
START_UPDATE = "Start new MPSoC SW update"
FACTORY_RESET = "Factory Reset of loggers"
MEM_CHECK = "Memory Check"
@ -331,7 +331,7 @@ def pack_ploc_supv_commands(q: DefaultPusQueueHelper, cmd_str: str): # noqa C90
q.add_log_cmd("PLOC Supversior: Start new MPSoC SW update")
command = pack_update_command(object_id.as_bytes, True)
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
if cmd_str in OpCode.PERFORM_UPDATE:
if cmd_str in OpCode.RESUME_UPDATE:
q.add_log_cmd("PLOC Supervisor: Perform MPSoC SW update")
command = pack_update_command(object_id.as_bytes, False)
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
@ -370,7 +370,7 @@ def pack_ploc_supv_commands(q: DefaultPusQueueHelper, cmd_str: str): # noqa C90
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
if cmd_str == "58":
q.add_log_cmd("PLOC Supervisor: Continue update")
command = object_id.as_bytes + struct.pack("!I", SupvActionId.CONTINUE_UPDATE)
command = object_id.as_bytes + struct.pack("!I", SupvActionId.RESUME_UPDATE)
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
if cmd_str == OpCode.MEM_CHECK:
custom_data = bytearray()