From 4325b8ccaa0495eb8b23f4b6aeec3165c62e7bd1 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 11 Oct 2021 17:08:54 +0200 Subject: [PATCH 1/7] spacepackets update --- spacepackets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacepackets b/spacepackets index 559e42f..596b0d4 160000 --- a/spacepackets +++ b/spacepackets @@ -1 +1 @@ -Subproject commit 559e42f03b51cfb673e46cd3b25e68348c33fc21 +Subproject commit 596b0d46fe3442ed60401ded6da1bd2966d15308 From ae5a788f49cb318e3744b7a512a77a3a6467521e Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 12 Oct 2021 09:59:02 +0200 Subject: [PATCH 2/7] submodule update --- spacepackets | 2 +- tmtccmd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spacepackets b/spacepackets index 596b0d4..f3c2685 160000 --- a/spacepackets +++ b/spacepackets @@ -1 +1 @@ -Subproject commit 596b0d46fe3442ed60401ded6da1bd2966d15308 +Subproject commit f3c268541ca32463f7b97f369dc8ae5e871da98a diff --git a/tmtccmd b/tmtccmd index a7299e7..fa913b2 160000 --- a/tmtccmd +++ b/tmtccmd @@ -1 +1 @@ -Subproject commit a7299e7a68936ce7fa1fdf004a6c2dd2c8073711 +Subproject commit fa913b2fa58433db81e3c974392ae67862719ccc From 56f1ca2ef89e3456a4fb38cfc1a0d8210dce01f0 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 12 Oct 2021 16:29:17 +0200 Subject: [PATCH 3/7] spacepackets update --- spacepackets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacepackets b/spacepackets index f3c2685..a83ae85 160000 --- a/spacepackets +++ b/spacepackets @@ -1 +1 @@ -Subproject commit f3c268541ca32463f7b97f369dc8ae5e871da98a +Subproject commit a83ae859e9a56469279f8f5675733230434d1400 From 423f1fbb2c9f93f6eb3f3ae8ecbbdbfa30002596 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 12 Oct 2021 17:50:20 +0200 Subject: [PATCH 4/7] added tcs board commands --- config/hook_implementations.py | 9 ++++++--- pus_tc/pdu1.py | 33 ++++++++++++++++++++++++++------- tmtccmd | 2 +- 3 files changed, 33 insertions(+), 11 deletions(-) diff --git a/config/hook_implementations.py b/config/hook_implementations.py index d80ab19..ab3c1c0 100644 --- a/config/hook_implementations.py +++ b/config/hook_implementations.py @@ -138,13 +138,16 @@ def get_eive_service_op_code_dict(service_op_code_dict: ServiceOpCodeDictT): op_code_dict_srv_pdu1 = { "0": ("PDU1 Tests", {OpCodeDictKeys.TIMEOUT: 2.0}), + Pdu1OpCodes.TCS_BOARD_ON.value: + ("PDU1: Turn TCS board on", {OpCodeDictKeys.TIMEOUT: 2.0}), + Pdu1OpCodes.TCS_BOARD_OFF.value: + ("PDU1: Turn TCS board off", {OpCodeDictKeys.TIMEOUT: 2.0}), Pdu1OpCodes.STAR_TRACKER_ON.value: ("PDU1: Turn star tracker on", {OpCodeDictKeys.TIMEOUT: 2.0}), - "2": ("PDU1: Get switch state of star tracker", {OpCodeDictKeys.TIMEOUT: 2.0}), - Pdu1OpCodes.SUS_NOMINAL_ON.value: - ("PDU1: Turn SUS nominal on", {OpCodeDictKeys.TIMEOUT: 2.0}), Pdu1OpCodes.STAR_TRACKER_OFF.value: ("PDU1: Turn star tracker off", {OpCodeDictKeys.TIMEOUT: 2.0}), + Pdu1OpCodes.SUS_NOMINAL_ON.value: + ("PDU1: Turn SUS nominal on", {OpCodeDictKeys.TIMEOUT: 2.0}), Pdu1OpCodes.SUS_NOMINAL_OFF.value: ("PDU1: Turn SUS nominal off", {OpCodeDictKeys.TIMEOUT: 2.0}), Pdu1OpCodes.ACS_A_SIDE_ON.value: diff --git a/pus_tc/pdu1.py b/pus_tc/pdu1.py index 0a713cc..d5ee2ec 100644 --- a/pus_tc/pdu1.py +++ b/pus_tc/pdu1.py @@ -14,12 +14,15 @@ from gomspace.gomspace_pdu_definitions import * class Pdu1OpCodes(enum.Enum): - STAR_TRACKER_ON = "1" - SUS_NOMINAL_ON = "3" + TESTS = "0" + TCS_BOARD_ON = "1" + TCS_BOARD_OFF = "2" + STAR_TRACKER_ON = "3" STAR_TRACKER_OFF = "4" - SUS_NOMINAL_OFF = "5" - ACS_A_SIDE_ON = "6" - ACS_A_SIDE_OFF = "7" + SUS_NOMINAL_ON = "5" + SUS_NOMINAL_OFF = "6" + ACS_A_SIDE_ON = "7" + ACS_A_SIDE_OFF = "8" class PDU1TestProcedure: @@ -41,10 +44,26 @@ class PDU1TestProcedure: def pack_pdu1_commands(object_id: bytearray, tc_queue: TcQueueT, op_code: str): tc_queue.appendleft((QueueCommands.PRINT, "Commanding PDU1")) + if op_code == Pdu1OpCodes.TCS_BOARD_ON.value: + tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn TCS board on")) + command = pack_set_param_command( + object_id, PDUConfigTable.out_en_0.parameter_address, + PDUConfigTable.out_en_2.parameter_size, Channel.on + ) + tc_queue.appendleft(command.pack_command_tuple()) + if op_code == Pdu1OpCodes.TCS_BOARD_OFF.value: + tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn TCS board off")) + command = pack_set_param_command( + object_id, PDUConfigTable.out_en_0.parameter_address, + PDUConfigTable.out_en_2.parameter_size, Channel.off + ) + tc_queue.appendleft(command.pack_command_tuple()) if op_code == Pdu1OpCodes.STAR_TRACKER_ON.value: tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn star tracker on")) - command = pack_set_param_command(object_id, PDUConfigTable.out_en_2.parameter_address, - PDUConfigTable.out_en_2.parameter_size, Channel.on) + command = pack_set_param_command( + object_id, PDUConfigTable.out_en_2.parameter_address, + PDUConfigTable.out_en_2.parameter_size, Channel.on + ) tc_queue.appendleft(command.pack_command_tuple()) if op_code == Pdu1OpCodes.SUS_NOMINAL_ON.value: tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn SUS nominal on")) diff --git a/tmtccmd b/tmtccmd index fa913b2..6776dfc 160000 --- a/tmtccmd +++ b/tmtccmd @@ -1 +1 @@ -Subproject commit fa913b2fa58433db81e3c974392ae67862719ccc +Subproject commit 6776dfcde91293b09d341deb4e9d309ee4617bc7 From 5976e657353661587d26b1312d5fe099b7011273 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 12 Oct 2021 18:24:45 +0200 Subject: [PATCH 5/7] higher timeout for pdu1 cmd --- .idea/runConfigurations/PDU1_Commanding.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.idea/runConfigurations/PDU1_Commanding.xml b/.idea/runConfigurations/PDU1_Commanding.xml index ccd6e1a..76cde0b 100644 --- a/.idea/runConfigurations/PDU1_Commanding.xml +++ b/.idea/runConfigurations/PDU1_Commanding.xml @@ -13,7 +13,7 @@