From 950adf36ed8807c308350c8ddb63140f7a767934 Mon Sep 17 00:00:00 2001 From: "Jakob.Meier" <–meierj@irs.uni-stuttgart.de> Date: Fri, 13 Aug 2021 09:34:44 +0200 Subject: [PATCH] op_code to turn star tracker and sus nominal off --- config/hook_implementations.py | 2 ++ pus_tc/pdu1.py | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/config/hook_implementations.py b/config/hook_implementations.py index b0b561d..30043e7 100644 --- a/config/hook_implementations.py +++ b/config/hook_implementations.py @@ -55,6 +55,8 @@ class EiveHookObject(TmTcHookBase): "1": ("PDU1: Turn star tracker on", {OpCodeDictKeys.TIMEOUT: 2.0}), "2": ("PDU1: Get switch state of star tracker", {OpCodeDictKeys.TIMEOUT: 2.0}), "3": ("PDU1: Turn SUS nominal on", {OpCodeDictKeys.TIMEOUT: 2.0}), + "4": ("PDU1: Turn star tracker off", {OpCodeDictKeys.TIMEOUT: 2.0}), + "5": ("PDU1: Turn SUS nominal off", {OpCodeDictKeys.TIMEOUT: 2.0}), } service_pdu1_tuple = ("PDU1 Device", op_code_dict_srv_pdu1) diff --git a/pus_tc/pdu1.py b/pus_tc/pdu1.py index 762909a..be2ba43 100644 --- a/pus_tc/pdu1.py +++ b/pus_tc/pdu1.py @@ -45,6 +45,18 @@ def pack_pdu1_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: str) PDUConfigTable.out_en_4.parameter_size, Channel.on) command = PusTelecommand(service=8, subservice=128, ssc=31, app_data=command) tc_queue.appendleft(command.pack_command_tuple()) + if op_code == "4": + tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn star racker off")) + command = pack_set_param_command(object_id, PDUConfigTable.out_en_2.parameter_address, + PDUConfigTable.out_en_2.parameter_size, Channel.off) + command = PusTelecommand(service=8, subservice=128, ssc=32, app_data=command) + tc_queue.appendleft(command.pack_command_tuple()) + if op_code == "5": + tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn SUS nominal off")) + command = pack_set_param_command(object_id, PDUConfigTable.out_en_4.parameter_address, + PDUConfigTable.out_en_4.parameter_size, Channel.off) + command = PusTelecommand(service=8, subservice=128, ssc=33, app_data=command) + tc_queue.appendleft(command.pack_command_tuple()) if PDU1TestProcedure.all or PDU1TestProcedure.ping: tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Ping Test"))