Add ACS Subsystem Commands #117

Merged
muellerr merged 26 commits from mueller/add-acs-ss-cmds into main 2022-11-02 10:33:18 +01:00
Showing only changes of commit 986539d648 - Show all commits

View File

@ -3,6 +3,7 @@ import os.path
from datetime import datetime from datetime import datetime
from config.object_ids import get_object_ids from config.object_ids import get_object_ids
from pus_tm.defs import PrintWrapper from pus_tm.defs import PrintWrapper
from tmtccmd.tc.pus_200_fsfw_modes import Modes
from tmtccmd.tm import Service5Tm from tmtccmd.tm import Service5Tm
from tmtccmd.logging import get_console_logger from tmtccmd.logging import get_console_logger
@ -59,8 +60,19 @@ def handle_event_packet(raw_tm: bytes, printer: FsfwTmTcPrinter):
pw.dlog(additional_event_info) pw.dlog(additional_event_info)
pw.dlog(context) pw.dlog(context)
if info.name == "MODE_INFO": if info.name == "MODE_INFO":
pw.dlog(f"Mode: {tm.param_1}") if obj_name == "ACS_SUBSYSTEM":
pw.dlog(f"Submode: {tm.param_2}") pass
mode_name = "Unknown"
if tm.param_1 == Modes.OFF:
mode_name = "Off"
elif tm.param_1 == Modes.ON:
mode_name = "On"
elif tm.param_1 == Modes.NORMAL:
mode_name = "Normal"
elif tm.param_1 == Modes.RAW:
mode_str = "Raw"
pw.dlog(f"Mode: {tm.param_1}{mode_str}")
pw.dlog(f"Submode: {tm.param_2}{submode_str}")
else: else:
specific_handler = False specific_handler = False
if info.info != "": if info.info != "":