From cf61dfac0d810ef5268c0c7219bd10ac252f5570 Mon Sep 17 00:00:00 2001 From: Jakob Meier Date: Thu, 17 Mar 2022 19:50:25 +0100 Subject: [PATCH] ploc switch command --- pus_tc/cmd_definitions.py | 12 +++++++++++- pus_tc/devs/pdu1.py | 20 ++++++++++++++++++++ tmtccmd | 2 +- 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/pus_tc/cmd_definitions.py b/pus_tc/cmd_definitions.py index 97bdc7d..9487987 100644 --- a/pus_tc/cmd_definitions.py +++ b/pus_tc/cmd_definitions.py @@ -268,7 +268,17 @@ def add_pcdu_cmds(cmd_dict: ServiceOpCodeDictT): add_op_code_entry( op_code_dict=op_code_dict, keys=Pdu1OpCodes.MGT_OFF.value, - info="PDU1: Turn MGT on", + info="PDU1: Turn MGT off", + ) + add_op_code_entry( + op_code_dict=op_code_dict, + keys=Pdu1OpCodes.PLOC_ON.value, + info="PDU1: Turn PLOC on", + ) + add_op_code_entry( + op_code_dict=op_code_dict, + keys=Pdu1OpCodes.PLOC_OFF.value, + info="PDU1: Turn PLOC off", ) add_op_code_entry( op_code_dict=op_code_dict, diff --git a/pus_tc/devs/pdu1.py b/pus_tc/devs/pdu1.py index fd94230..eaaa3c1 100644 --- a/pus_tc/devs/pdu1.py +++ b/pus_tc/devs/pdu1.py @@ -27,6 +27,8 @@ class Pdu1OpCodes(enum.Enum): # Solar Cell Experiment SCEX_ON = "12" SCEX_OFF = "13" + PLOC_ON = "14" + PLOC_OFF = "15" TESTS = "32" @@ -190,6 +192,24 @@ def pack_pdu1_commands(object_id: bytearray, tc_queue: TcQueueT, op_code: str): Channel.off, ) tc_queue.appendleft(command.pack_command_tuple()) + if op_code == Pdu1OpCodes.PLOC_ON.value: + tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn PLOC on")) + command = pack_set_param_command( + object_id, + PDUConfigTable.out_en_6.parameter_address, + PDUConfigTable.out_en_6.parameter_size, + Channel.on, + ) + tc_queue.appendleft(command.pack_command_tuple()) + if op_code == Pdu1OpCodes.PLOC_OFF.value: + tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn PLOC off")) + command = pack_set_param_command( + object_id, + PDUConfigTable.out_en_6.parameter_address, + PDUConfigTable.out_en_6.parameter_size, + Channel.off, + ) + tc_queue.appendleft(command.pack_command_tuple()) if op_code == GomspaceOpCodes.REQUEST_HK_ONCE.value: tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Requesting HK Table Once")) hk_sid = make_sid(object_id=PDU_1_HANDLER_ID, set_id=SetIds.PDU_1) diff --git a/tmtccmd b/tmtccmd index a317237..86cf0bf 160000 --- a/tmtccmd +++ b/tmtccmd @@ -1 +1 @@ -Subproject commit a31723786f4d85e82ba8e685f1652cb59cdb707b +Subproject commit 86cf0bf9530f0d31784ff96b025f8b778d1732b1