diff --git a/.run/MGM Disable HK.run.xml b/.run/MGM Disable HK.run.xml
new file mode 100644
index 0000000..04e92c3
--- /dev/null
+++ b/.run/MGM Disable HK.run.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.run/MGM Enable HK.run.xml b/.run/MGM Enable HK.run.xml
new file mode 100644
index 0000000..b4cf587
--- /dev/null
+++ b/.run/MGM Enable HK.run.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.run/MGM HK Once.run.xml b/.run/MGM HK Once.run.xml
new file mode 100644
index 0000000..1d8aff0
--- /dev/null
+++ b/.run/MGM HK Once.run.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/deps/tmtccmd b/deps/tmtccmd
index 5e153e5..403c5fd 160000
--- a/deps/tmtccmd
+++ b/deps/tmtccmd
@@ -1 +1 @@
-Subproject commit 5e153e556716d340641563f2a18478a664fa4b92
+Subproject commit 403c5fd2b1cd28af8de2b39f308b633892e660e5
diff --git a/pus_tc/system/acs_ctrl.py b/pus_tc/system/acs_ctrl.py
index b6e5725..35ef21b 100644
--- a/pus_tc/system/acs_ctrl.py
+++ b/pus_tc/system/acs_ctrl.py
@@ -11,7 +11,8 @@ from tmtccmd.config.tmtc import (
OpCodeEntry,
)
from tmtccmd.tc import DefaultPusQueueHelper, service_provider
-from tmtccmd.tc.pus_3_fsfw_hk import generate_one_hk_command, make_sid
+from tmtccmd.tc.pus_3_fsfw_hk import generate_one_hk_command, make_sid, \
+ enable_periodic_hk_command_with_interval, disable_periodic_hk_command
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
LOGGER = get_console_logger()
@@ -23,8 +24,8 @@ class SetIds(enum.IntEnum):
class OpCodes:
REQUEST_MGM_HK = ["0", "req-mgm-hk"]
- ENABLE_MGM_HK = ["1", "enable-hk"]
- DISABLE_MGM_HK = ["1", "enable-hk"]
+ ENABLE_MGM_HK = ["1", "enable-mgm-hk"]
+ DISABLE_MGM_HK = ["1", "disable-mgm-hk"]
class Info:
@@ -48,10 +49,18 @@ def acs_cmd_defs(defs: TmtcDefinitionWrapper):
def pack_acs_ctrl_command(
_info: DefaultProcedureInfo, q: DefaultPusQueueHelper, op_code: str
):
+ sid = make_sid(ACS_CONTROLLER, SetIds.MGM_SET)
if op_code in OpCodes.REQUEST_MGM_HK:
- sid = make_sid(ACS_CONTROLLER, SetIds.MGM_SET)
- q.add_log_cmd("Requesting one MGM HK packet")
+ q.add_log_cmd(Info.REQUEST_MGM_HK)
q.add_pus_tc(generate_one_hk_command(sid))
+ elif op_code in OpCodes.ENABLE_MGM_HK:
+ q.add_log_cmd(Info.ENABLE_MGM_HK)
+ cmd_tuple = enable_periodic_hk_command_with_interval(False, sid, 2.0)
+ q.add_pus_tc(cmd_tuple[0])
+ q.add_pus_tc(cmd_tuple[1])
+ elif op_code in OpCodes.DISABLE_MGM_HK:
+ q.add_log_cmd(Info.DISABLE_MGM_HK)
+ q.add_pus_tc(disable_periodic_hk_command(False, sid))
else:
LOGGER.info(f"Unknown op code {op_code}")