Merge branch 'main' into acs-ctrl-updates-v2
This commit is contained in:
@ -9,6 +9,7 @@ from typing import Tuple
|
||||
from eive_tmtc.config.definitions import CustomServiceList
|
||||
from eive_tmtc.config.object_ids import ACS_CONTROLLER
|
||||
from eive_tmtc.pus_tm.defs import PrintWrapper
|
||||
from eive_tmtc.tmtc.acs.defs import AcsMode, SafeSubmode
|
||||
from tmtccmd.config.tmtc import (
|
||||
tmtc_definitions_provider,
|
||||
TmtcDefinitionWrapper,
|
||||
@ -56,17 +57,6 @@ class SetId(enum.IntEnum):
|
||||
ACTUATOR_CMD_DATA = 9
|
||||
|
||||
|
||||
class Submode(enum.IntEnum):
|
||||
OFF = 0
|
||||
SAFE = 10
|
||||
DETUMBLE = 11
|
||||
IDLE = 12
|
||||
PTG_NADIR = 13
|
||||
PTG_TARGET = 14
|
||||
PTG_TARGET_GS = 15
|
||||
PTG_INERTIAL = 16
|
||||
|
||||
|
||||
class ActionId(enum.IntEnum):
|
||||
SOLAR_ARRAY_DEPLOYMENT_SUCCESSFUL = 0
|
||||
RESET_MEKF = 1
|
||||
@ -74,13 +64,13 @@ class ActionId(enum.IntEnum):
|
||||
|
||||
class OpCodes:
|
||||
OFF = ["off"]
|
||||
SAFE = ["normal_safe"]
|
||||
DTBL = ["normal_detumble"]
|
||||
IDLE = ["normal_idle"]
|
||||
NADIR = ["normal_nadir"]
|
||||
TARGET = ["normal_target"]
|
||||
GS = ["normal_gs"]
|
||||
INERTIAL = ["normal_inertial"]
|
||||
SAFE = ["safe"]
|
||||
DTBL = ["safe_detumble"]
|
||||
IDLE = ["ptg_idle"]
|
||||
NADIR = ["ptg_nadir"]
|
||||
TARGET = ["ptg_target"]
|
||||
GS = ["ptg_target_gs"]
|
||||
INERTIAL = ["ptg_inertial"]
|
||||
SAFE_PTG = ["confirm_deployment"]
|
||||
RESET_MEKF = ["reset_mekf"]
|
||||
SET_PARAMETER_SCALAR = ["set_scalar_param"]
|
||||
@ -120,9 +110,9 @@ class OpCodes:
|
||||
|
||||
class Info:
|
||||
OFF = "Switch ACS CTRL off"
|
||||
SAFE = "Switch ACS CTRL normal - safe"
|
||||
DTBL = "Switch ACS CTRL normal - detumble"
|
||||
IDLE = "Switch ACS CTRL normal - idle"
|
||||
SAFE = "Switch ACS CTRL - safe"
|
||||
DTBL = "Switch ACS CTRL - safe with detumble submode"
|
||||
IDLE = "Switch ACS CTRL - pointing idle"
|
||||
NADIR = "Switch ACS CTRL normal - pointing nadir"
|
||||
TARGET = "Switch ACS CTRL normal - pointing target"
|
||||
GS = "Switch ACS CTRL normal - pointing target groundstation"
|
||||
@ -236,29 +226,29 @@ def pack_acs_ctrl_command(p: ServiceProviderParams):
|
||||
q.add_pus_tc(pack_mode_command(ACS_CONTROLLER, Mode.OFF, 0))
|
||||
elif op_code in OpCodes.SAFE:
|
||||
q.add_log_cmd(f"{Info.SAFE}")
|
||||
q.add_pus_tc(pack_mode_command(ACS_CONTROLLER, Mode.NORMAL, Submode.SAFE))
|
||||
q.add_pus_tc(
|
||||
pack_mode_command(ACS_CONTROLLER, AcsMode.SAFE, SafeSubmode.DEFAULT)
|
||||
)
|
||||
elif op_code in OpCodes.DTBL:
|
||||
q.add_log_cmd(f"{Info.DTBL}")
|
||||
q.add_pus_tc(pack_mode_command(ACS_CONTROLLER, Mode.NORMAL, Submode.DETUMBLE))
|
||||
q.add_pus_tc(
|
||||
pack_mode_command(ACS_CONTROLLER, AcsMode.SAFE, SafeSubmode.DETUMBLE)
|
||||
)
|
||||
elif op_code in OpCodes.IDLE:
|
||||
q.add_log_cmd(f"{Info.IDLE}")
|
||||
q.add_pus_tc(pack_mode_command(ACS_CONTROLLER, Mode.NORMAL, Submode.IDLE))
|
||||
q.add_pus_tc(pack_mode_command(ACS_CONTROLLER, AcsMode.IDLE, 0))
|
||||
elif op_code in OpCodes.NADIR:
|
||||
q.add_log_cmd(f"{Info.NADIR}")
|
||||
q.add_pus_tc(pack_mode_command(ACS_CONTROLLER, Mode.NORMAL, Submode.PTG_NADIR))
|
||||
q.add_pus_tc(pack_mode_command(ACS_CONTROLLER, AcsMode.PTG_NADIR, 0))
|
||||
elif op_code in OpCodes.TARGET:
|
||||
q.add_log_cmd(f"{Info.TARGET}")
|
||||
q.add_pus_tc(pack_mode_command(ACS_CONTROLLER, Mode.NORMAL, Submode.PTG_TARGET))
|
||||
q.add_pus_tc(pack_mode_command(ACS_CONTROLLER, AcsMode.PTG_TARGET, 0))
|
||||
elif op_code in OpCodes.GS:
|
||||
q.add_log_cmd(f"{Info.GS}")
|
||||
q.add_pus_tc(
|
||||
pack_mode_command(ACS_CONTROLLER, Mode.NORMAL, Submode.PTG_TARGET_GS)
|
||||
)
|
||||
q.add_pus_tc(pack_mode_command(ACS_CONTROLLER, AcsMode.PTG_TARGET_GS, 0))
|
||||
elif op_code in OpCodes.INERTIAL:
|
||||
q.add_log_cmd(f"{Info.INERTIAL}")
|
||||
q.add_pus_tc(
|
||||
pack_mode_command(ACS_CONTROLLER, Mode.NORMAL, Submode.PTG_INERTIAL)
|
||||
)
|
||||
q.add_pus_tc(pack_mode_command(ACS_CONTROLLER, AcsMode.PTG_INERTIAL, 0))
|
||||
elif op_code in OpCodes.SAFE_PTG:
|
||||
q.add_log_cmd(f"{Info.SAFE_PTG}")
|
||||
q.add_pus_tc(
|
||||
|
Reference in New Issue
Block a user