update ACS SS commands #130
@ -10,6 +10,11 @@ list yields a list of all related PRs for each release.
|
||||
|
||||
# [unreleased]
|
||||
|
||||
## Changed
|
||||
|
||||
- Updated ACS SS commands for OBSW ACS SS update.
|
||||
PR: https://egit.irs.uni-stuttgart.de/eive/eive-tmtc/pulls/130
|
||||
|
||||
## Fixed
|
||||
|
||||
- Fixed parsing of processed GPS data
|
||||
|
@ -84,7 +84,8 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
||||
10800;0x2a30;STORE_ERROR;LOW;;fsfw/src/fsfw/cfdp/handler/defs.h
|
||||
10801;0x2a31;MSG_QUEUE_ERROR;LOW;;fsfw/src/fsfw/cfdp/handler/defs.h
|
||||
10802;0x2a32;SERIALIZATION_ERROR;LOW;;fsfw/src/fsfw/cfdp/handler/defs.h
|
||||
11200;0x2bc0;SAFE_RATE_VIOLATION;MEDIUM;;mission/controller/AcsController.h
|
||||
11200;0x2bc0;SAFE_RATE_VIOLATION;MEDIUM;;mission/acsDefs.h
|
||||
11201;0x2bc1;SAFE_RATE_RECOVERY;MEDIUM;;mission/acsDefs.h
|
||||
11300;0x2c24;SWITCH_CMD_SENT;INFO;Indicates that a FSFW object requested setting a switch P1: 1 if on was requested, 0 for off | P2: Switch Index;mission/devices/devicedefinitions/powerDefinitions.h
|
||||
11301;0x2c25;SWITCH_HAS_CHANGED;INFO;Indicated that a switch state has changed P1: New switch state, 1 for on, 0 for off | P2: Switch Index;mission/devices/devicedefinitions/powerDefinitions.h
|
||||
11302;0x2c26;SWITCHING_Q7S_DENIED;MEDIUM;;mission/devices/devicedefinitions/powerDefinitions.h
|
||||
|
|
@ -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"
|
||||
|
@ -21,6 +21,7 @@ from tmtccmd.tc.pus_3_fsfw_hk import (
|
||||
make_sid,
|
||||
enable_periodic_hk_command_with_interval,
|
||||
disable_periodic_hk_command,
|
||||
create_request_one_diag_command,
|
||||
)
|
||||
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
||||
|
||||
@ -286,7 +287,9 @@ def pack_acs_ctrl_command(p: ServiceProviderParams):
|
||||
elif op_code in OpCodes.REQUEST_PROC_GYR_HK:
|
||||
q.add_log_cmd(Info.REQUEST_PROC_GYR_HK)
|
||||
q.add_pus_tc(
|
||||
generate_one_hk_command(make_sid(ACS_CONTROLLER, SetId.GYR_PROC_SET))
|
||||
create_request_one_diag_command(
|
||||
make_sid(ACS_CONTROLLER, SetId.GYR_PROC_SET)
|
||||
)
|
||||
)
|
||||
elif op_code in OpCodes.ENABLE_PROC_GYR_HK:
|
||||
q.add_log_cmd(Info.ENABLE_PROC_GYR_HK)
|
||||
|
@ -20,16 +20,22 @@ class OpCode(str, enum.Enum):
|
||||
SAFE = "safe"
|
||||
DETUMBLE = "detumble"
|
||||
IDLE = "idle"
|
||||
TARGET_PT = "target"
|
||||
PTG_TARGET = "ptg_target"
|
||||
PTG_TARGET_NADIR = "ptg_nadir"
|
||||
PTG_TARGET_GS = "ptg_target_gs"
|
||||
PTG_TARGET_INERTIAL = "ptg_inertial"
|
||||
REPORT_ALL_MODES = "all_modes"
|
||||
|
||||
|
||||
class AcsMode(enum.IntEnum):
|
||||
OFF = 0
|
||||
SAFE = 1 << 24
|
||||
DETUMBLE = 2 << 24
|
||||
IDLE = 3 << 24
|
||||
TARGET_PT = 4 << 24
|
||||
SAFE = 2
|
||||
DETUMBLE = 3
|
||||
IDLE = 4
|
||||
PTG_TARGET_NADIR = 5
|
||||
PTG_TARGET = 6
|
||||
PTG_TARGET_GS = 7
|
||||
PTG_TARGET_INERTIAL = 8
|
||||
|
||||
|
||||
class Info(str, enum.Enum):
|
||||
@ -37,15 +43,22 @@ class Info(str, enum.Enum):
|
||||
SAFE = "Safe Mode Command"
|
||||
DETUMBLE = "Detumble Mode Command"
|
||||
IDLE = "Idle Mode Command"
|
||||
TARGET_PT = "Target Pointing Mode Command"
|
||||
PTG_TARGET_NADIR = "Target Pointing Nadir"
|
||||
PTG_TARGET = "Target Pointing"
|
||||
PTG_TARGET_GS = "Target Pointing Ground Station"
|
||||
PTG_TARGET_INERTIAL = "Target Pointing Inertial"
|
||||
REPORT_ALL_MODES = "Report All Modes Recursively"
|
||||
|
||||
|
||||
HANDLER_LIST: Dict[str, Tuple[int, str]] = {
|
||||
OpCode.OFF: (AcsMode.OFF, Info.OFF),
|
||||
OpCode.IDLE: (AcsMode.IDLE, Info.IDLE),
|
||||
OpCode.SAFE: (AcsMode.SAFE, Info.SAFE),
|
||||
OpCode.DETUMBLE: (AcsMode.DETUMBLE, Info.DETUMBLE),
|
||||
OpCode.IDLE: (AcsMode.IDLE, Info.IDLE),
|
||||
OpCode.PTG_TARGET: (AcsMode.PTG_TARGET, Info.PTG_TARGET),
|
||||
OpCode.PTG_TARGET_GS: (AcsMode.PTG_TARGET_GS, Info.PTG_TARGET_GS),
|
||||
OpCode.PTG_TARGET_NADIR: (AcsMode.PTG_TARGET_NADIR, Info.PTG_TARGET_NADIR),
|
||||
OpCode.PTG_TARGET_INERTIAL: (AcsMode.PTG_TARGET_INERTIAL, Info.PTG_TARGET_INERTIAL),
|
||||
}
|
||||
|
||||
|
||||
@ -78,8 +91,7 @@ def build_acs_subsystem_cmd(p: ServiceProviderParams):
|
||||
@tmtc_definitions_provider
|
||||
def add_acs_subsystem_cmds(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
oce.add(OpCode.OFF, Info.OFF)
|
||||
oce.add(OpCode.SAFE, Info.SAFE)
|
||||
oce.add(OpCode.IDLE, Info.IDLE)
|
||||
for op_code, (_, info) in HANDLER_LIST.items():
|
||||
oce.add(op_code, info)
|
||||
oce.add(OpCode.REPORT_ALL_MODES, Info.REPORT_ALL_MODES)
|
||||
defs.add_service(CustomServiceList.ACS_SS, "ACS Subsystem", oce)
|
||||
|
Loading…
Reference in New Issue
Block a user