PLOC SUPV tweak #292
@ -146,6 +146,8 @@ class OpCode:
|
|||||||
FACTORY_RESET = "factory_reset"
|
FACTORY_RESET = "factory_reset"
|
||||||
MEM_CHECK = "mem_check"
|
MEM_CHECK = "mem_check"
|
||||||
RESET_MPSOC = "reset_mpsoc"
|
RESET_MPSOC = "reset_mpsoc"
|
||||||
|
SET_GPIO = "set_gpio"
|
||||||
|
READ_GPIO = "read_gpio"
|
||||||
|
|
||||||
|
|
||||||
class Info(str, enum.Enum):
|
class Info(str, enum.Enum):
|
||||||
@ -165,6 +167,8 @@ class Info(str, enum.Enum):
|
|||||||
MEM_CHECK = "Memory Check"
|
MEM_CHECK = "Memory Check"
|
||||||
SEL_NVM = "Select NVM"
|
SEL_NVM = "Select NVM"
|
||||||
RESET_MPSOC = "Reset MPSoC"
|
RESET_MPSOC = "Reset MPSoC"
|
||||||
|
SET_GPIO = "Set GPIO"
|
||||||
|
READ_GPIO = "Read GPIO"
|
||||||
|
|
||||||
|
|
||||||
@tmtc_definitions_provider
|
@tmtc_definitions_provider
|
||||||
@ -182,6 +186,8 @@ def add_ploc_supv_cmds(defs: TmtcDefinitionWrapper):
|
|||||||
oce.add(OpCode.SET_TIME_REF, Info.SET_TIME_REF)
|
oce.add(OpCode.SET_TIME_REF, Info.SET_TIME_REF)
|
||||||
oce.add(OpCode.FACTORY_RESET, Info.FACTORY_RESET)
|
oce.add(OpCode.FACTORY_RESET, Info.FACTORY_RESET)
|
||||||
oce.add(OpCode.RESET_MPSOC, Info.RESET_MPSOC)
|
oce.add(OpCode.RESET_MPSOC, Info.RESET_MPSOC)
|
||||||
|
oce.add(OpCode.SET_GPIO, Info.SET_GPIO)
|
||||||
|
oce.add(OpCode.READ_GPIO, Info.READ_GPIO)
|
||||||
oce.add("8", "PLOC Supervisor: Set max restart tries")
|
oce.add("8", "PLOC Supervisor: Set max restart tries")
|
||||||
oce.add("11", "PLOC Supervisor: Set boot timeout")
|
oce.add("11", "PLOC Supervisor: Set boot timeout")
|
||||||
oce.add("12", "PLOC Supervisor: Disable Hk")
|
oce.add("12", "PLOC Supervisor: Disable Hk")
|
||||||
@ -196,8 +202,6 @@ def add_ploc_supv_cmds(defs: TmtcDefinitionWrapper):
|
|||||||
oce.add("27", "PLOC Supervisor: Copy ADC data to MRAM")
|
oce.add("27", "PLOC Supervisor: Copy ADC data to MRAM")
|
||||||
oce.add("30", "PLOC Supervisor: Run auto EM tests")
|
oce.add("30", "PLOC Supervisor: Run auto EM tests")
|
||||||
oce.add("31", "PLOC Supervisor: MRAM Wipe")
|
oce.add("31", "PLOC Supervisor: MRAM Wipe")
|
||||||
oce.add("35", "PLOC Supervisor: Set GPIO")
|
|
||||||
oce.add("36", "PLOC Supervisor: Read GPIO")
|
|
||||||
oce.add("37", "PLOC Supervisor: Restart supervisor")
|
oce.add("37", "PLOC Supervisor: Restart supervisor")
|
||||||
oce.add(OpCode.PERFORM_UPDATE, Info.PERFORM_UPDATE)
|
oce.add(OpCode.PERFORM_UPDATE, Info.PERFORM_UPDATE)
|
||||||
oce.add(OpCode.START_UPDATE, Info.START_UPDATE)
|
oce.add(OpCode.START_UPDATE, Info.START_UPDATE)
|
||||||
@ -382,11 +386,11 @@ def pack_ploc_supv_commands(p: ServiceProviderParams): # noqa C901
|
|||||||
q.add_log_cmd("PLOC Supervisor: Wipe MRAM")
|
q.add_log_cmd("PLOC Supervisor: Wipe MRAM")
|
||||||
command = pack_mram_wipe_cmd(object_id.as_bytes)
|
command = pack_mram_wipe_cmd(object_id.as_bytes)
|
||||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||||
if op_code == "35":
|
if op_code == OpCode.SET_GPIO:
|
||||||
q.add_log_cmd("PLOC Supervisor: Set GPIO command")
|
q.add_log_cmd("PLOC Supervisor: Set GPIO command")
|
||||||
command = pack_set_gpio_cmd(object_id.as_bytes)
|
command = pack_set_gpio_cmd(object_id.as_bytes)
|
||||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||||
if op_code == "36":
|
if op_code == OpCode.READ_GPIO:
|
||||||
q.add_log_cmd("PLOC Supervisor: Read GPIO command")
|
q.add_log_cmd("PLOC Supervisor: Read GPIO command")
|
||||||
command = pack_read_gpio_cmd(object_id.as_bytes)
|
command = pack_read_gpio_cmd(object_id.as_bytes)
|
||||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user