From f2d3f8c68cf4f565da885747e44db31b84b275a6 Mon Sep 17 00:00:00 2001 From: Jakob Meier Date: Wed, 13 Apr 2022 11:58:07 +0200 Subject: [PATCH] ploc supervisor enable and disable adc monitor task --- pus_tc/cmd_definitions.py | 2 ++ pus_tc/devs/ploc_supervisor.py | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/pus_tc/cmd_definitions.py b/pus_tc/cmd_definitions.py index d283833..ed1dc6f 100644 --- a/pus_tc/cmd_definitions.py +++ b/pus_tc/cmd_definitions.py @@ -573,6 +573,8 @@ def add_ploc_supv_cmds(cmd_dict: ServiceOpCodeDictT): "46": ("PLOC Supervisor: Factory flash", {OpCodeDictKeys.TIMEOUT: 2.0}), "47": ("PLOC Supervisor: Enable auto TM", {OpCodeDictKeys.TIMEOUT: 2.0}), "48": ("PLOC Supervisor: Disable auto TM", {OpCodeDictKeys.TIMEOUT: 2.0}), + "49": ("PLOC Supervisor: Enable ADC monitor task", {OpCodeDictKeys.TIMEOUT: 2.0}), + "50": ("PLOC Supervisor: Disable ADC monitor task", {OpCodeDictKeys.TIMEOUT: 2.0}), } service_ploc_supv_tuple = ("PLOC Supervisor", op_code_dict_srv_ploc_supv) diff --git a/pus_tc/devs/ploc_supervisor.py b/pus_tc/devs/ploc_supervisor.py index 1f7db2e..7c95555 100644 --- a/pus_tc/devs/ploc_supervisor.py +++ b/pus_tc/devs/ploc_supervisor.py @@ -84,6 +84,8 @@ class SupvActionIds: TERMINATE_SUPV_HELPER = 49 ENABLE_AUTO_TM = 50 DISABLE_AUTO_TM = 51 + ENABLE_ADC_MONITOR_TASK = 52 + DISABLE_ADC_MONITOR_TASK = 53 class SupvHkIds: @@ -421,6 +423,20 @@ def pack_ploc_supv_commands( ) command = PusTelecommand(service=8, subservice=128, ssc=63, app_data=command) tc_queue.appendleft(command.pack_command_tuple()) + elif op_code == "49": + tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Enable ADC monitor task")) + command = object_id + struct.pack( + "!I", SupvActionIds.ENABLE_ADC_MONITOR_TASK + ) + command = PusTelecommand(service=8, subservice=128, ssc=64, app_data=command) + tc_queue.appendleft(command.pack_command_tuple()) + elif op_code == "50": + tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Disable ADC monitor task")) + command = object_id + struct.pack( + "!I", SupvActionIds.DISABLE_ADC_MONITOR_TASK + ) + command = PusTelecommand(service=8, subservice=128, ssc=65, app_data=command) + tc_queue.appendleft(command.pack_command_tuple()) return tc_queue