added first ACS ASS command
This commit is contained in:
parent
859cbf0eb3
commit
0bdc8f04a8
@ -42,3 +42,4 @@ class CustomServiceList(enum.Enum):
|
||||
PDEC_HANDLER = "pdec_handler"
|
||||
STR_IMG_HELPER = "str_img_helper"
|
||||
SYRLINKS = "syrlinks"
|
||||
ACS_ASS = "acs-ass"
|
||||
|
@ -125,6 +125,7 @@ def get_eive_service_op_code_dict(service_op_code_dict: ServiceOpCodeDictT):
|
||||
add_rw_cmds,
|
||||
add_rad_sens_cmds,
|
||||
add_ploc_cmds,
|
||||
add_system_cmds
|
||||
)
|
||||
from pus_tc.devs.gps import GpsOpCodes
|
||||
|
||||
@ -136,6 +137,7 @@ def get_eive_service_op_code_dict(service_op_code_dict: ServiceOpCodeDictT):
|
||||
add_rad_sens_cmds(cmd_dict=service_op_code_dict)
|
||||
add_rw_cmds(cmd_dict=service_op_code_dict)
|
||||
add_ploc_cmds(cmd_dict=service_op_code_dict)
|
||||
add_system_cmds(cmd_dict=service_op_code_dict)
|
||||
|
||||
op_code_dict = {
|
||||
GpsOpCodes.RESET_GNSS.value: ("Reset GPS", {OpCodeDictKeys.TIMEOUT: 2.0})
|
||||
|
@ -511,3 +511,20 @@ def add_ploc_cmds(cmd_dict: ServiceOpCodeDictT):
|
||||
cmd_dict[
|
||||
CustomServiceList.PLOC_MEMORY_DUMPER.value
|
||||
] = service_ploc_memory_dumper_tuple
|
||||
|
||||
|
||||
def add_system_cmds(cmd_dict: ServiceOpCodeDictT):
|
||||
from pus_tc.system.acs import AcsOpCodes
|
||||
|
||||
op_code_dict = dict()
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=AcsOpCodes.ACS_ASS_A_SIDE,
|
||||
info="Switch to ACS board A side",
|
||||
)
|
||||
add_service_op_code_entry(
|
||||
srv_op_code_dict=cmd_dict,
|
||||
name=CustomServiceList.ACS_ASS.value,
|
||||
info="ACS Assemblies",
|
||||
op_code_entry=op_code_dict,
|
||||
)
|
||||
|
@ -1,10 +1,11 @@
|
||||
import enum
|
||||
from tmtccmd.tc.definitions import TcQueueT
|
||||
from tmtccmd.tc.service_200_mode import pack_mode_data, Modes
|
||||
from tmtccmd.tc.definitions import TcQueueT, QueueCommands
|
||||
from spacepackets.ecss.tc import PusTelecommand
|
||||
from tmtccmd.tc.service_200_mode import pack_mode_data, Modes, Subservices
|
||||
from config.object_ids import ACS_BOARD_ASS_ID
|
||||
|
||||
|
||||
class AcsOpCodes(enum.Enum):
|
||||
class AcsOpCodes:
|
||||
ACS_ASS_A_SIDE = ["0", "a"]
|
||||
ACS_ASS_B_SIDE = ["1", "b"]
|
||||
ACS_ASS_DUAL_MODE = ["2", "d"]
|
||||
@ -17,11 +18,16 @@ class AcsBoardSubmodes(enum.IntEnum):
|
||||
|
||||
|
||||
def pack_acs_command(tc_queue: TcQueueT, op_code: str):
|
||||
if op_code == AcsOpCodes.ACS_ASS_A_SIDE:
|
||||
if op_code in AcsOpCodes.ACS_ASS_A_SIDE:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Switching to ACS board assembly A side"))
|
||||
mode_data = pack_mode_data(
|
||||
object_id=ACS_BOARD_ASS_ID,
|
||||
mode=Modes.NORMAL,
|
||||
submode=AcsBoardSubmodes.A_SIDE,
|
||||
)
|
||||
|
||||
pass
|
||||
cmd = PusTelecommand(
|
||||
service=200,
|
||||
subservice=Subservices.COMMAND_MODE_COMMAND,
|
||||
app_data=mode_data
|
||||
)
|
||||
tc_queue.appendleft(cmd.pack_command_tuple())
|
||||
|
@ -195,6 +195,8 @@ def pack_service_queue_user(
|
||||
)
|
||||
if service == CustomServiceList.PL_PCDU.value:
|
||||
return pack_pl_pcdu_commands(tc_queue=service_queue, op_code=op_code)
|
||||
if service == CustomServiceList.ACS_ASS.value:
|
||||
return pack_acs_command(tc_queue=service_queue, op_code=op_code)
|
||||
LOGGER.warning("Invalid Service !")
|
||||
|
||||
|
||||
|
@ -27,6 +27,7 @@ limitations under the License.
|
||||
@author R. Mueller
|
||||
"""
|
||||
import sys
|
||||
import traceback
|
||||
|
||||
try:
|
||||
from tmtccmd.runner import (
|
||||
@ -39,12 +40,9 @@ try:
|
||||
except ImportError as error:
|
||||
run_tmtc_commander = None
|
||||
initialize_tmtc_commander = None
|
||||
print(error)
|
||||
tb = traceback.format_exc()
|
||||
print(tb)
|
||||
print("Python tmtccmd submodule could not be imported")
|
||||
print(
|
||||
'Install with "cd tmtccmd && python3 -m pip '
|
||||
'install -e .[gui]" for interactive installation'
|
||||
)
|
||||
sys.exit(1)
|
||||
|
||||
try:
|
||||
|
2
tmtccmd
2
tmtccmd
@ -1 +1 @@
|
||||
Subproject commit 67fd6ef97435a6f6098792ab8d04ecba6be5dda4
|
||||
Subproject commit 0f4d4730ab35163c5a06138f4b54e4eaf89bc24c
|
Loading…
Reference in New Issue
Block a user