more print commands for PCDU
This commit is contained in:
@ -15,7 +15,10 @@ from gomspace.gomspace_pdu_definitions import *
|
||||
class Pdu2OpCodes(enum.Enum):
|
||||
ACS_SIDE_B_ON = "1"
|
||||
ACS_SIDE_B_OFF = "2"
|
||||
PRINT_SWITCH_STATE = "17"
|
||||
SUS_REDUNDANT_ON = "3"
|
||||
SUS_REDUNDANT_OFF = "4"
|
||||
RW_ON = "5"
|
||||
RW_OFF = "6"
|
||||
|
||||
|
||||
class PDU2TestProcedure:
|
||||
@ -59,31 +62,50 @@ def pack_pdu2_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: str)
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
return tc_queue
|
||||
if op_code == "3":
|
||||
if op_code == Pdu2OpCodes.SUS_REDUNDANT_ON.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Turn SUS redundant on"))
|
||||
command = pack_set_param_command(object_id, PDUConfigTable.out_en_4.parameter_address,
|
||||
PDUConfigTable.out_en_4.parameter_size, Channel.on)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == "4":
|
||||
if op_code == Pdu2OpCodes.SUS_REDUNDANT_OFF.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Turn SUS redundant off"))
|
||||
command = pack_set_param_command(object_id, PDUConfigTable.out_en_4.parameter_address,
|
||||
PDUConfigTable.out_en_4.parameter_size, Channel.off)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == "5":
|
||||
if op_code == Pdu2OpCodes.RW_ON.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Turn reaction wheels on"))
|
||||
command = pack_set_param_command(
|
||||
object_id, PDUConfigTable.out_en_2.parameter_address, PDUConfigTable.out_en_2.parameter_size, Channel.on
|
||||
object_id, PDUConfigTable.out_en_2.parameter_address,
|
||||
PDUConfigTable.out_en_2.parameter_size, Channel.on
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == "6":
|
||||
if op_code == Pdu2OpCodes.RW_OFF.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Turn reaction wheels off"))
|
||||
command = pack_set_param_command(object_id, PDUConfigTable.out_en_2.parameter_address,
|
||||
PDUConfigTable.out_en_2.parameter_size, Channel.off)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == Pdu2OpCodes.PRINT_SWITCH_STATE.value:
|
||||
if op_code == PduOpCodes.PRINT_ALL.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Print Info"))
|
||||
command = generate_action_command(
|
||||
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_ALL
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == PduOpCodes.PRINT_SWITCH_STATES.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Print Switch Status"))
|
||||
command = generate_action_command(
|
||||
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_STATE
|
||||
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_STATES
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == PduOpCodes.PRINT_CURRENTS:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Print Currents"))
|
||||
command = generate_action_command(
|
||||
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_CURRENTS
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == PduOpCodes.PRINT_VOLTAGES:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Print Voltages"))
|
||||
command = generate_action_command(
|
||||
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_VOLTAGES
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
|
Reference in New Issue
Block a user