Rework switch / Voltage / Current commands #23

Merged
meierj merged 8 commits from mueller/rework-switch-cmds into develop 2021-09-24 17:29:04 +02:00
Showing only changes of commit 5c65390a8b - Show all commits

View File

@ -96,13 +96,13 @@ def pack_pdu2_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: str)
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_STATES object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_STATES
) )
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
if op_code == PduOpCodes.PRINT_CURRENTS: if op_code == PduOpCodes.PRINT_CURRENTS.value:
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Print Currents")) tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Print Currents"))
command = generate_action_command( command = generate_action_command(
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_CURRENTS object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_CURRENTS
) )
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
if op_code == PduOpCodes.PRINT_VOLTAGES: if op_code == PduOpCodes.PRINT_VOLTAGES.value:
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Print Voltages")) tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Print Voltages"))
command = generate_action_command( command = generate_action_command(
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_VOLTAGES object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_VOLTAGES