bugfixes in procedures and hk parsing

This commit is contained in:
Jakob Meier 2022-06-03 11:51:03 +02:00
parent 6cae7f742c
commit ae0217066b
2 changed files with 44 additions and 22 deletions

View File

@ -189,11 +189,11 @@ def pack_generic_hk_listening_cmds(
sid=sid_list[i],
)
)
activate_all_rws_in_sequence(
tc_queue=tc_queue, test_speed=0, test_ramp_time=5000, init_ssc=0
)
tc_queue.appendleft((QueueCommands.WAIT, 30))
if cfg.one_rw or cfg.two_rws:
activate_all_rws_in_sequence(
tc_queue=tc_queue, test_speed=0, test_ramp_time=5000, init_ssc=0
)
tc_queue.appendleft((QueueCommands.WAIT, 60))
current_time = time.time()
current_time += collection_time
if not cfg.use_tc_sched:
@ -330,7 +330,7 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
diag_list = [
False,
False,
False,
True,
False,
False
]
@ -356,7 +356,7 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
diag_list = [
False,
False,
False,
True,
False,
False
]
@ -386,12 +386,12 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
diag_list = [
False,
False,
True,
False,
False,
False,
False,
False,
False,
True,
False,
False,
]
@ -514,12 +514,12 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
oids.SUS_11_R_LOC_XBYMZB_PT_ZB,
]
diag_list = [
False,
False,
False,
False,
False,
False,
True,
True,
True,
True,
True,
True,
]
# SUSs
@ -537,6 +537,15 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
tc_queue.appendleft((QueueCommands.WAIT, 5.0))
pack_sus_cmds(tc_queue=tc_queue, op_code="sus-red")
diag_list = [
True,
True,
True,
True,
True,
True,
]
# SUSs
for red_sus in sus_r_ids:
sid_list.append(make_sid(red_sus, SetIds.HK))
@ -557,7 +566,20 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
sid_list.append(make_sid(nom_sus, SetIds.HK))
for red_sus in sus_r_ids:
sid_list.append(make_sid(red_sus, SetIds.HK))
diag_list = diag_list + diag_list
diag_list = [
True,
True,
True,
True,
True,
True,
True,
True,
True,
True,
True,
True,
]
pack_generic_hk_listening_cmds(
tc_queue=tc_queue,
proc_key=key,
@ -831,23 +853,23 @@ def activate_all_rws_in_sequence(
) -> int:
new_ssc = init_ssc
# RW1 speed cmd
tc_queue.appendleft((QueueCommands.WAIT, 5.0))
tc_queue.appendleft((QueueCommands.WAIT, 58))
new_ssc = rw_speed_cmd_single(
tc_queue, oids.RW1_ID, new_ssc, test_speed, test_ramp_time
)
tc_queue.appendleft((QueueCommands.WAIT, 15.0))
tc_queue.appendleft((QueueCommands.WAIT, 30))
new_ssc = rw_speed_cmd_single(
tc_queue, oids.RW2_ID, new_ssc, test_speed, test_ramp_time
)
tc_queue.appendleft((QueueCommands.WAIT, 15.0))
tc_queue.appendleft((QueueCommands.WAIT, 30))
new_ssc = rw_speed_cmd_single(
tc_queue, oids.RW3_ID, new_ssc, test_speed, test_ramp_time
)
tc_queue.appendleft((QueueCommands.WAIT, 15.0))
tc_queue.appendleft((QueueCommands.WAIT, 30))
new_ssc = rw_speed_cmd_single(
tc_queue, oids.RW4_ID, new_ssc, test_speed, test_ramp_time
)
tc_queue.appendleft((QueueCommands.WAIT, 15.0))
tc_queue.appendleft((QueueCommands.WAIT, 30))
return new_ssc

View File

@ -22,5 +22,5 @@ def handle_sus_hk(
pw.dlog(f"Temperature: {temperature} C")
pw.dlog(f"AIN Channel | Raw Value (hex) | Raw Value (dec)")
for idx, val in enumerate(channels):
pw.dlog(f"{idx} | {val:#06x} | {str(val).ljust(5)}")
pw.dlog(f"{idx} | {val[0]:#06x} |" + str(val[0]).ljust(5))
printer.print_validity_buffer(validity_buffer=hk_data[current_idx:], num_vars=7)