clean up and extend power TMTC handling
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
@author J. Meier
|
||||
@date 17.12.2020
|
||||
"""
|
||||
from tmtc.power.common_power import pdu2_cmds, pdu2_req_hk_cmds
|
||||
from tmtc.power.common_power import pdu2_cmds, pdu2_req_hk_cmds, add_gomspace_cmds
|
||||
from gomspace.gomspace_common import *
|
||||
from gomspace.gomspace_pdu_definitions import *
|
||||
|
||||
@ -43,26 +43,7 @@ def pack_pdu2_commands(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code
|
||||
objb = object_id.as_bytes
|
||||
pdu2_cmds(q, op_code)
|
||||
pdu2_req_hk_cmds(q, op_code)
|
||||
if op_code in GomspaceOpCodes.PRINT_SWITCH_V_I:
|
||||
q.add_log_cmd(f"PDU2: {GsInfo.PRINT_SWITCH_V_I}")
|
||||
q.add_pus_tc(
|
||||
make_fsfw_action_cmd(
|
||||
object_id=objb, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_V_I
|
||||
)
|
||||
)
|
||||
if op_code in GomspaceOpCodes.PRINT_LATCHUPS:
|
||||
q.add_log_cmd("PDU2: Print Latchups")
|
||||
q.add_pus_tc(
|
||||
make_fsfw_action_cmd(
|
||||
object_id=objb, action_id=GomspaceDeviceActionIds.PRINT_LATCHUPS
|
||||
)
|
||||
)
|
||||
if op_code in GomspaceOpCodes.SET_PARAM:
|
||||
q.add_log_cmd(f"PDU2: {GsInfo.SET_PARAMETER}")
|
||||
prompt_and_pack_set_param_command(q, object_id)
|
||||
if op_code in GomspaceOpCodes.GET_PARAM:
|
||||
q.add_log_cmd(f"PDU2: {GsInfo.GET_PARAMETER}")
|
||||
prompt_and_pack_get_param_command(q, object_id)
|
||||
add_gomspace_cmds("PDU2", object_id, q, op_code)
|
||||
if PDU2TestProcedure.all or PDU2TestProcedure.reboot:
|
||||
q.add_log_cmd("PDU2: Reboot")
|
||||
q.add_pus_tc(pack_reboot_command(object_id))
|
||||
|
Reference in New Issue
Block a user