added PL PCDU tcs

This commit is contained in:
Robin Mueller 2022-02-25 19:25:14 +01:00
parent b8d666a183
commit 0284846867
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
4 changed files with 19 additions and 0 deletions

View File

@ -90,6 +90,19 @@ def add_core_controller_definitions(cmd_dict: ServiceOpCodeDictT):
)
def add_pl_pcdu_cmds(cmd_dict: ServiceOpCodeDictT):
from pus_tc.plpcdu import OpCodes
op_code_dict = dict()
add_op_code_entry(op_code_dict=op_code_dict, keys=OpCodes.SWITCH_ADC_ON, info="Switch PL PCDU ADC on")
add_op_code_entry(op_code_dict=op_code_dict, keys=OpCodes.SWITCH_ALL_ON, info="Switch all PL PCDU modules on")
add_service_op_code_entry(
srv_op_code_dict=cmd_dict,
name=CustomServiceList.PL_PCDU.value,
info="PL PCDU",
op_code_entry=op_code_dict,
)
def add_pcdu_cmds(cmd_dict: ServiceOpCodeDictT):
from pus_tc.p60dock import P60OpCodes, GomspaceOpCodes
from pus_tc.pdu1 import Pdu1OpCodes

View File

@ -24,6 +24,7 @@ class CustomServiceList(enum.Enum):
IMTQ = "imtq"
PLOC = "ploc"
PCDU = "pcdu"
PL_PCDU = "plpcdu"
SA_DEPLYOMENT = "sa_depl"
REACTION_WHEEL_1 = "reaction_wheel_1"
REACTION_WHEEL_2 = "reaction_wheel_2"

View File

@ -114,11 +114,13 @@ def get_eive_service_op_code_dict(service_op_code_dict: ServiceOpCodeDictT):
add_bpx_cmd_definitions,
add_core_controller_definitions,
add_pcdu_cmds,
add_pl_pcdu_cmds
)
from pus_tc.gps import GpsOpCodes
add_bpx_cmd_definitions(cmd_dict=service_op_code_dict)
add_core_controller_definitions(cmd_dict=service_op_code_dict)
add_pl_pcdu_cmds(cmd_dict=service_op_code_dict)
op_code_dict = {
GpsOpCodes.RESET_GNSS.value: ("Reset GPS", {OpCodeDictKeys.TIMEOUT: 2.0})

View File

@ -31,6 +31,7 @@ from pus_tc.star_tracker import pack_star_tracker_commands
from pus_tc.syrlinks_hk_handler import pack_syrlinks_command
from pus_tc.gps import pack_gps_command
from pus_tc.acs import pack_acs_command
from pus_tc.plpcdu import pack_pl_pcdu_commands
from pus_tc.str_img_helper import pack_str_img_helper_command
from config.definitions import CustomServiceList
from config.object_ids import (
@ -192,6 +193,8 @@ def pack_service_queue_user(
return pack_syrlinks_command(
object_id=SYRLINKS_HANDLER_ID, tc_queue=service_queue, op_code=op_code
)
if service == CustomServiceList.PL_PCDU.value:
return pack_pl_pcdu_commands(tc_queue=service_queue, op_code=op_code)
LOGGER.warning("Invalid Service !")