some mode printouts

This commit is contained in:
Robin Müller 2022-10-10 17:32:05 +02:00
parent 6e493064a7
commit 986539d648
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814

View File

@ -3,6 +3,7 @@ import os.path
from datetime import datetime
from config.object_ids import get_object_ids
from pus_tm.defs import PrintWrapper
from tmtccmd.tc.pus_200_fsfw_modes import Modes
from tmtccmd.tm import Service5Tm
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(context)
if info.name == "MODE_INFO":
pw.dlog(f"Mode: {tm.param_1}")
pw.dlog(f"Submode: {tm.param_2}")
if obj_name == "ACS_SUBSYSTEM":
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:
specific_handler = False
if info.info != "":