minor fixes for ACS SS commanding

This commit is contained in:
Robin Müller 2023-02-03 14:21:22 +01:00
parent 5b309e4013
commit c3c58b95ad
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
2 changed files with 10 additions and 13 deletions

View File

@ -56,16 +56,13 @@ def handle_event_packet(raw_tm: bytes, printer: FsfwTmTcPrinter):
if info.name == "MODE_INFO":
mode_name = "Unknown"
if obj_name == "ACS_SUBSYSTEM":
if event_def.param1 == Mode.OFF:
mode_name = "Off"
elif event_def.param1 == AcsMode.IDLE:
mode_name = "Idle"
elif event_def.param1 == AcsMode.DETUMBLE:
mode_name = "Detumble"
elif event_def.param1 == AcsMode.SAFE:
mode_name = "Safe"
elif event_def.param1 == AcsMode.TARGET_PT:
mode_name = "Target Pointing"
acs_mode = AcsMode(event_def.param1)
pw.dlog(f"ACS Mode: {acs_mode!r}")
elif obj_name == "ACS_CONTROLLER_ID":
mode_name = Mode(event_def.param1)
submode = AcsMode(event_def.param2)
pw.dlog(f"Mode: {mode_name!r}")
pw.dlog(f"ACS Mode: {submode!r}")
else:
if event_def.param1 == Mode.OFF:
mode_name = "Off"

View File

@ -30,7 +30,7 @@ class OpCode(str, enum.Enum):
class AcsMode(enum.IntEnum):
OFF = 0
SAFE = 2
DETUMBLE = 2
DETUMBLE = 3
IDLE = 4
PTG_TARGET_NADIR = 5
PTG_TARGET = 6