Add ACS Subsystem Commands #117
@ -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 tmtc.acs_subsystem import AcsModes
|
||||||
from tmtccmd.tc.pus_200_fsfw_modes import Modes
|
from tmtccmd.tc.pus_200_fsfw_modes import Modes
|
||||||
|
|
||||||
from tmtccmd.tm import Service5Tm
|
from tmtccmd.tm import Service5Tm
|
||||||
@ -60,19 +61,29 @@ 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":
|
||||||
if obj_name == "ACS_SUBSYSTEM":
|
|
||||||
pass
|
|
||||||
mode_name = "Unknown"
|
mode_name = "Unknown"
|
||||||
if tm.param_1 == Modes.OFF:
|
if obj_name == "ACS_SUBSYSTEM":
|
||||||
mode_name = "Off"
|
if tm.param_1 == Modes.OFF:
|
||||||
elif tm.param_1 == Modes.ON:
|
mode_name = "Off"
|
||||||
mode_name = "On"
|
elif tm.param_1 == AcsModes.IDLE:
|
||||||
elif tm.param_1 == Modes.NORMAL:
|
mode_name = "Idle"
|
||||||
mode_name = "Normal"
|
elif tm.param_1 == AcsModes.DETUMBLE:
|
||||||
elif tm.param_1 == Modes.RAW:
|
mode_name = "Detumble"
|
||||||
mode_str = "Raw"
|
elif tm.param_1 == AcsModes.SAFE:
|
||||||
# pw.dlog(f"Mode: {tm.param_1}{mode_str}")
|
mode_name = "Safe"
|
||||||
# pw.dlog(f"Submode: {tm.param_2}{submode_str}")
|
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:
|
||||||
|
mode_name = "On"
|
||||||
|
elif tm.param_1 == Modes.NORMAL:
|
||||||
|
mode_name = "Normal"
|
||||||
|
elif tm.param_1 == Modes.RAW:
|
||||||
|
mode_name = "Raw"
|
||||||
|
pw.dlog(f"Mode Number {tm.param_1}, Mode Name {mode_name}")
|
||||||
|
pw.dlog(f"Submode: {tm.param_2}")
|
||||||
else:
|
else:
|
||||||
specific_handler = False
|
specific_handler = False
|
||||||
if info.info != "":
|
if info.info != "":
|
||||||
|
Loading…
Reference in New Issue
Block a user