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 61317e695c - Show all commits

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 tmtc.acs_subsystem import AcsModes
from tmtccmd.tc.pus_200_fsfw_modes import Modes
from tmtccmd.tm import Service5Tm
@ -60,9 +61,19 @@ def handle_event_packet(raw_tm: bytes, printer: FsfwTmTcPrinter):
pw.dlog(additional_event_info)
pw.dlog(context)
if info.name == "MODE_INFO":
if obj_name == "ACS_SUBSYSTEM":
pass
mode_name = "Unknown"
if obj_name == "ACS_SUBSYSTEM":
if tm.param_1 == Modes.OFF:
mode_name = "Off"
elif tm.param_1 == AcsModes.IDLE:
mode_name = "Idle"
elif tm.param_1 == AcsModes.DETUMBLE:
mode_name = "Detumble"
elif tm.param_1 == AcsModes.SAFE:
mode_name = "Safe"
elif tm.param_1 == AcsModes.TARGET_PT:
mode_name = "Target Pointing"
else:
if tm.param_1 == Modes.OFF:
mode_name = "Off"
elif tm.param_1 == Modes.ON:
@ -70,9 +81,9 @@ def handle_event_packet(raw_tm: bytes, printer: FsfwTmTcPrinter):
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}")
mode_name = "Raw"
pw.dlog(f"Mode Number {tm.param_1}, Mode Name {mode_name}")
pw.dlog(f"Submode: {tm.param_2}")
else:
specific_handler = False
if info.info != "":