From 3e466f06ef7737f2f1bab8c3d68feb633da76dbc Mon Sep 17 00:00:00 2001 From: Martin Zietz Date: Sun, 18 Apr 2021 18:52:47 +0200 Subject: [PATCH] turning on imqt channel --- pus_tc/pdu1.py | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/pus_tc/pdu1.py b/pus_tc/pdu1.py index c51d59c..6208d9f 100644 --- a/pus_tc/pdu1.py +++ b/pus_tc/pdu1.py @@ -24,8 +24,10 @@ class PDU1TestProcedure: reboot = False ping = False read_temperature = False - turn_channel_2_on = True # MTQ connected to this channel (5V) - turn_channel_2_on = False + turn_channel_2_on = False # Star Tracker connected to this channel (5V) + turn_channel_2_off = False + turn_channel_3_on = False # MTQ connected to this channel (5V) + turn_channel_3_off = True def pack_pdu1_test_into( @@ -48,14 +50,26 @@ def pack_pdu1_test_into( command = PusTelecommand(service=8, subservice=128, ssc=24, app_data=command) tc_queue.appendleft(command.pack_command_tuple()) if PDU1TestProcedure.all or PDU1TestProcedure.turn_channel_2_on: - tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn channel 2 on (MTQ)")) + tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn channel 2 on (Star Tracker)")) command = pack_set_param_command(pdu1_object_id, PDUConfigTable.out_en_2.parameter_address, PDUConfigTable.out_en_2.parameter_size, Channel.on) - command = PusTelecommand(service=8, subservice=128, ssc=27, app_data=command) + command = PusTelecommand(service=8, subservice=128, ssc=30, app_data=command) tc_queue.appendleft(command.pack_command_tuple()) if PDU1TestProcedure.all or PDU1TestProcedure.turn_channel_2_off: - tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn channel 2 off (MTQ)")) + tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn channel 2 off (Star Tracker)")) command = pack_set_param_command(pdu1_object_id, PDUConfigTable.out_en_2.parameter_address, PDUConfigTable.out_en_2.parameter_size, Channel.off) - command = PusTelecommand(service=8, subservice=128, ssc=27, app_data=command) + command = PusTelecommand(service=8, subservice=128, ssc=31, app_data=command) + tc_queue.appendleft(command.pack_command_tuple()) + if PDU1TestProcedure.all or PDU1TestProcedure.turn_channel_3_on: + tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn channel 3 on (MTQ)")) + command = pack_set_param_command(pdu1_object_id, PDUConfigTable.out_en_3.parameter_address, + PDUConfigTable.out_en_3.parameter_size, Channel.on) + command = PusTelecommand(service=8, subservice=128, ssc=32, app_data=command) + tc_queue.appendleft(command.pack_command_tuple()) + if PDU1TestProcedure.all or PDU1TestProcedure.turn_channel_3_off: + tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn channel 3 off (MTQ)")) + command = pack_set_param_command(pdu1_object_id, PDUConfigTable.out_en_3.parameter_address, + PDUConfigTable.out_en_3.parameter_size, Channel.off) + command = PusTelecommand(service=8, subservice=128, ssc=33, app_data=command) tc_queue.appendleft(command.pack_command_tuple())