diff --git a/config/hook_implementations.py b/config/hook_implementations.py index 8bc3109..a81640e 100644 --- a/config/hook_implementations.py +++ b/config/hook_implementations.py @@ -208,6 +208,14 @@ def get_eive_service_op_code_dict(service_op_code_dict: ServiceOpCodeDictT): "PDU1: Turn Syrlinks off", {OpCodeDictKeys.TIMEOUT: 2.0}, ), + Pdu1OpCodes.MGT_ON.value: ( + "PDU1: Turn MGT on", + {OpCodeDictKeys.TIMEOUT: 2.0}, + ), + Pdu1OpCodes.MGT_OFF.value: ( + "PDU1: Turn MGT off", + {OpCodeDictKeys.TIMEOUT: 2.0}, + ), GomspaceOpCodes.PRINT_SWITCH_V_I.value: ( "PDU1: Print Switches, Voltages, Currents", {OpCodeDictKeys.TIMEOUT: 2.0}, diff --git a/pus_tc/pdu1.py b/pus_tc/pdu1.py index 943da06..a7bd943 100644 --- a/pus_tc/pdu1.py +++ b/pus_tc/pdu1.py @@ -25,6 +25,8 @@ class Pdu1OpCodes(enum.Enum): ACS_A_SIDE_OFF = "8" SYRLINKS_ON = "9" SYRLINKS_OFF = "10" + MGT_ON = "11" + MGT_OFF = "12" class PDU1TestProcedure: @@ -154,7 +156,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.MGT_ON.value: + tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn MGT on")) + command = pack_set_param_command( + object_id, + PDUConfigTable.out_en_3.parameter_address, + PDUConfigTable.out_en_3.parameter_size, + Channel.on, + ) + tc_queue.appendleft(command.pack_command_tuple()) + if op_code == Pdu1OpCodes.MGT_OFF.value: + tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn MGT off")) + command = pack_set_param_command( + object_id, + PDUConfigTable.out_en_3.parameter_address, + PDUConfigTable.out_en_3.parameter_size, + Channel.off, + ) + tc_queue.appendleft(command.pack_command_tuple()) if PDU1TestProcedure.all or PDU1TestProcedure.ping: tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Ping Test")) ping_data = bytearray([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) diff --git a/spacepackets b/spacepackets index ee22cea..3265de6 160000 --- a/spacepackets +++ b/spacepackets @@ -1 +1 @@ -Subproject commit ee22cea62159650397f08844fc92237daf9b8b73 +Subproject commit 3265de69717e2f718f4c740d77a823f9811f8348