start acu hk handling
This commit is contained in:
@ -87,11 +87,12 @@ class P60DockHkTable:
|
||||
wdt_gnd_left = TableEntry(bytearray([0x00, 0xA8]), TableEntry.uint32_size)
|
||||
|
||||
|
||||
def pack_p60dock_cmds(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
||||
def pack_p60dock_cmds(object_id: ObjectId, tc_queue: TcQueueT, op_code: str):
|
||||
objb = object_id.as_bytes
|
||||
if op_code in P60OpCodes.STACK_3V3_ON:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, Info.STACK_3V3_ON))
|
||||
command = pack_set_param_command(
|
||||
object_id,
|
||||
objb,
|
||||
P60DockConfigTable.out_en_9.parameter_address,
|
||||
P60DockConfigTable.out_en_9.parameter_size,
|
||||
Channel.on,
|
||||
@ -100,7 +101,7 @@ def pack_p60dock_cmds(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
||||
if op_code in P60OpCodes.STACK_3V3_OFF:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, Info.STACK_3V3_OFF))
|
||||
command = pack_set_param_command(
|
||||
object_id,
|
||||
objb,
|
||||
P60DockConfigTable.out_en_9.parameter_address,
|
||||
P60DockConfigTable.out_en_9.parameter_size,
|
||||
Channel.off,
|
||||
@ -109,7 +110,7 @@ def pack_p60dock_cmds(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
||||
if op_code in P60OpCodes.STACK_5V_ON:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, Info.STACK_5V_ON))
|
||||
command = pack_set_param_command(
|
||||
object_id,
|
||||
objb,
|
||||
P60DockConfigTable.out_en_10.parameter_address,
|
||||
P60DockConfigTable.out_en_10.parameter_size,
|
||||
Channel.on,
|
||||
@ -118,7 +119,7 @@ def pack_p60dock_cmds(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
||||
if op_code in P60OpCodes.STACK_5V_OFF:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, Info.STACK_5V_OFF))
|
||||
command = pack_set_param_command(
|
||||
object_id,
|
||||
objb,
|
||||
P60DockConfigTable.out_en_10.parameter_address,
|
||||
P60DockConfigTable.out_en_10.parameter_size,
|
||||
Channel.off,
|
||||
@ -143,13 +144,13 @@ def pack_p60dock_cmds(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
||||
(QueueCommands.PRINT, "P60 Dock: Print Switches, Voltages, Currents")
|
||||
)
|
||||
command = generate_action_command(
|
||||
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_V_I
|
||||
object_id=objb, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_V_I
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code in GomspaceOpCodes.PRINT_LATCHUPS:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Print Latchups"))
|
||||
command = generate_action_command(
|
||||
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_LATCHUPS
|
||||
object_id=objb, action_id=GomspaceDeviceActionIds.PRINT_LATCHUPS
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if P60DockTestProcedure.all or P60DockTestProcedure.reboot:
|
||||
@ -162,7 +163,7 @@ def pack_p60dock_cmds(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
||||
(QueueCommands.PRINT, "P60 Dock: Reading ground watchdog timer value")
|
||||
)
|
||||
command = pack_get_param_command(
|
||||
object_id,
|
||||
objb,
|
||||
TableIds.hk,
|
||||
P60DockHkTable.wdt_gnd_left.parameter_address,
|
||||
P60DockHkTable.wdt_gnd_left.parameter_size,
|
||||
@ -188,7 +189,7 @@ def pack_p60dock_cmds(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
||||
)
|
||||
parameter = 0 # set channel off
|
||||
command = pack_set_param_command(
|
||||
object_id,
|
||||
objb,
|
||||
P60DockConfigTable.out_en_3.parameter_address,
|
||||
P60DockConfigTable.out_en_3.parameter_size,
|
||||
parameter,
|
||||
@ -200,7 +201,7 @@ def pack_p60dock_cmds(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
||||
(QueueCommands.PRINT, "P60 Dock: Testing temperature reading")
|
||||
)
|
||||
command = pack_get_param_command(
|
||||
object_id,
|
||||
objb,
|
||||
TableIds.hk,
|
||||
P60DockHkTable.temperature1.parameter_address,
|
||||
P60DockHkTable.temperature1.parameter_size,
|
||||
@ -212,7 +213,7 @@ def pack_p60dock_cmds(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
||||
(QueueCommands.PRINT, "P60 Dock: Testing Output Channel 3 state (PDU2)")
|
||||
)
|
||||
command = pack_get_param_command(
|
||||
object_id,
|
||||
objb,
|
||||
TableIds.config,
|
||||
P60DockConfigTable.out_en_3.parameter_address,
|
||||
P60DockConfigTable.out_en_3.parameter_size,
|
||||
@ -227,7 +228,7 @@ def pack_p60dock_cmds(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
||||
)
|
||||
)
|
||||
command = pack_get_param_command(
|
||||
object_id,
|
||||
objb,
|
||||
TableIds.config,
|
||||
P60DockConfigTable.cur_lu_lim_0.parameter_address,
|
||||
P60DockConfigTable.cur_lu_lim_0.parameter_size,
|
||||
@ -240,7 +241,7 @@ def pack_p60dock_cmds(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
||||
)
|
||||
parameter = 1 # set channel on
|
||||
command = pack_set_param_command(
|
||||
object_id,
|
||||
objb,
|
||||
P60DockConfigTable.out_en_3.parameter_address,
|
||||
P60DockConfigTable.out_en_3.parameter_size,
|
||||
parameter,
|
||||
@ -253,7 +254,7 @@ def pack_p60dock_cmds(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
||||
)
|
||||
table_id_invalid = 5
|
||||
command = pack_get_param_command(
|
||||
object_id,
|
||||
objb,
|
||||
table_id_invalid,
|
||||
P60DockHkTable.temperature1.parameter_address,
|
||||
P60DockHkTable.temperature1.parameter_size,
|
||||
@ -269,7 +270,7 @@ def pack_p60dock_cmds(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
||||
)
|
||||
invalid_address = bytearray([0x01, 0xF4])
|
||||
command = pack_get_param_command(
|
||||
object_id,
|
||||
objb,
|
||||
TableIds.hk,
|
||||
invalid_address,
|
||||
P60DockHkTable.temperature1.parameter_size,
|
||||
@ -286,7 +287,7 @@ def pack_p60dock_cmds(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
||||
parameter_size = 2
|
||||
parameter = 1
|
||||
command = pack_set_param_command(
|
||||
object_id, invalid_address, parameter_size, parameter
|
||||
objb, invalid_address, parameter_size, parameter
|
||||
)
|
||||
# command = PusTelecommand(service=8, subservice=128, ssc=30, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
@ -299,7 +300,7 @@ def pack_p60dock_cmds(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
||||
)
|
||||
invalid_size = 5
|
||||
command = pack_get_param_command(
|
||||
object_id,
|
||||
objb,
|
||||
TableIds.hk,
|
||||
P60DockHkTable.temperature1.parameter_address,
|
||||
invalid_size,
|
||||
@ -314,7 +315,7 @@ def pack_p60dock_cmds(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
||||
)
|
||||
parameter = 1
|
||||
command = pack_set_param_command(
|
||||
object_id,
|
||||
objb,
|
||||
P60DockConfigTable.out_en_3.parameter_address,
|
||||
invalid_size,
|
||||
parameter,
|
||||
|
Reference in New Issue
Block a user