clean up and extend power TMTC handling

This commit is contained in:
2022-08-26 23:52:47 +02:00
parent 0f9aed4ee2
commit 6c59fb95d3
10 changed files with 108 additions and 157 deletions

View File

@ -8,6 +8,7 @@ from tmtc.power.common_power import (
pdu2_cmds,
pdu1_req_hk_cmds,
pdu2_req_hk_cmds,
add_gomspace_cmd_defs,
)
from config.definitions import CustomServiceList
from tmtccmd import get_console_logger
@ -50,7 +51,7 @@ def add_p60_cmds(defs: TmtcDefinitionWrapper):
oce.add(keys=P60OpCodes.STACK_3V3_OFF, info=P60Info.STACK_3V3_OFF)
oce.add(keys=P60OpCodes.STACK_5V_ON, info=P60Info.STACK_5V_ON)
oce.add(keys=P60OpCodes.STACK_5V_OFF, info=P60Info.STACK_5V_OFF)
add_gomspace_cmds(oce)
add_gomspace_cmd_defs(oce)
oce.add(keys=P60OpCodes.TEST, info="P60 Tests")
defs.add_service(
name=CustomServiceList.P60DOCK.value, info="P60 Device", op_code_entry=oce
@ -76,7 +77,7 @@ def add_power_cmd_defs(defs: TmtcDefinitionWrapper):
def add_pdu1_cmds(defs: TmtcDefinitionWrapper):
oce = OpCodeEntry()
add_pdu1_common_defs(oce)
add_gomspace_cmds(oce)
add_gomspace_cmd_defs(oce)
oce.add(keys=GomspaceOpCodes.REQUEST_CORE_HK_ONCE, info=GsInfo.REQUEST_CORE_HK_ONCE)
oce.add(keys=GomspaceOpCodes.REQUEST_AUX_HK_ONCE, info=GsInfo.REQUEST_AUX_HK_ONCE)
oce.add(
@ -96,7 +97,7 @@ def add_pdu1_cmds(defs: TmtcDefinitionWrapper):
def add_pdu2_cmds(defs: TmtcDefinitionWrapper):
oce = OpCodeEntry()
add_pdu2_common_defs(oce)
add_gomspace_cmds(oce)
add_gomspace_cmd_defs(oce)
oce.add(
keys=GomspaceOpCodes.PRINT_SWITCH_V_I,
info="PDU2: Print Switches, Voltages, Currents",
@ -112,20 +113,6 @@ def add_pdu2_cmds(defs: TmtcDefinitionWrapper):
)
def add_gomspace_cmds(oce: OpCodeEntry):
oce.add(
keys=GomspaceOpCodes.REQUEST_CORE_HK_ONCE,
info=GsInfo.REQUEST_CORE_HK_ONCE,
)
oce.add(
keys=GomspaceOpCodes.REQUEST_AUX_HK_ONCE,
info=GsInfo.REQUEST_AUX_HK_ONCE,
)
oce.add(keys=GomspaceOpCodes.GET_PARAM, info=GsInfo.GET_PARAMETER)
oce.add(keys=GomspaceOpCodes.PRINT_LATCHUPS, info=GsInfo.PRINT_LATCHUPS)
oce.add(keys=GomspaceOpCodes.SET_PARAM, info=GsInfo.SET_PARAMETER)
def add_pcdu_cmds(defs: TmtcDefinitionWrapper):
add_p60_cmds(defs)
add_pdu1_cmds(defs)