From ae0217066b0b4b21b45aa1b39b8f39254ffd926a Mon Sep 17 00:00:00 2001 From: Cleanroom Laptop L15 Date: Fri, 3 Jun 2022 11:51:03 +0200 Subject: [PATCH] bugfixes in procedures and hk parsing --- pus_tc/system/proc.py | 64 +++++++++++++++++++++++++++++-------------- pus_tm/devs/sus.py | 2 +- 2 files changed, 44 insertions(+), 22 deletions(-) diff --git a/pus_tc/system/proc.py b/pus_tc/system/proc.py index da7aa68..f524193 100644 --- a/pus_tc/system/proc.py +++ b/pus_tc/system/proc.py @@ -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 diff --git a/pus_tm/devs/sus.py b/pus_tm/devs/sus.py index 62a11ce..0067998 100644 --- a/pus_tm/devs/sus.py +++ b/pus_tm/devs/sus.py @@ -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)