Compare commits
3 Commits
a9a6468718
...
9fff4a90bc
Author | SHA1 | Date | |
---|---|---|---|
![]() |
9fff4a90bc | ||
![]() |
5e0e51c258 | ||
![]() |
5bea19a09a |
@@ -92,9 +92,23 @@ 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_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_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=OpCodes.UPDATE_DRO_TO_X8_WAIT,
|
||||
info="Update DRO to X8 wait time",
|
||||
)
|
||||
add_service_op_code_entry(
|
||||
srv_op_code_dict=cmd_dict,
|
||||
name=CustomServiceList.PL_PCDU.value,
|
||||
|
@@ -114,7 +114,7 @@ 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
|
||||
add_pl_pcdu_cmds,
|
||||
)
|
||||
from pus_tc.gps import GpsOpCodes
|
||||
|
||||
@@ -426,8 +426,14 @@ def get_eive_service_op_code_dict(service_op_code_dict: ServiceOpCodeDictT):
|
||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||
),
|
||||
"69": ("Star Tracker: Firmware update", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"70": ("Star Tracker: Disable timestamp generation", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"71": ("Star Tracker: Enable timestamp generation", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"70": (
|
||||
"Star Tracker: Disable timestamp generation",
|
||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||
),
|
||||
"71": (
|
||||
"Star Tracker: Enable timestamp generation",
|
||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
||||
),
|
||||
}
|
||||
service_star_tracker_tuple = ("Star tracker", op_code_dict_srv_star_tracker)
|
||||
|
||||
|
@@ -6,7 +6,7 @@ from tmtccmd.tc.definitions import TcQueueT
|
||||
from tmtccmd.tc.service_200_mode import pack_mode_data, Modes, Subservices
|
||||
from tmtccmd.tc.service_20_parameter import (
|
||||
pack_scalar_double_param_app_data,
|
||||
pack_fsfw_load_param_cmd
|
||||
pack_fsfw_load_param_cmd,
|
||||
)
|
||||
from tmtccmd.utility.logger import get_console_logger
|
||||
from spacepackets.ecss.tc import PusTelecommand
|
||||
@@ -27,7 +27,8 @@ class Submodes(enum.IntEnum):
|
||||
|
||||
|
||||
class ParamIds(enum.IntEnum):
|
||||
DRO_TO_X8_WAIT_TIME = 17
|
||||
SSR_TO_DRO_WAIT_TIME = 17
|
||||
DRO_TO_X8_WAIT_TIME = 18
|
||||
|
||||
|
||||
def pack_pl_pcdu_commands(tc_queue: TcQueueT, op_code: str):
|
||||
@@ -50,15 +51,17 @@ def pack_pl_pcdu_commands(tc_queue: TcQueueT, op_code: str):
|
||||
)
|
||||
tc_queue.appendleft(mode_cmd.pack_command_tuple())
|
||||
if op_code in OpCodes.UPDATE_DRO_TO_X8_WAIT:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Updating DRO to X8 wait time"))
|
||||
wait_time = request_wait_time()
|
||||
tc_queue.appendleft(
|
||||
(QueueCommands.PRINT, f"Updating DRO to X8 wait time to {wait_time}")
|
||||
)
|
||||
if wait_time is None:
|
||||
return
|
||||
param_data = pack_scalar_double_param_app_data(
|
||||
object_id=PL_PCDU_ID,
|
||||
domain_id=0,
|
||||
unique_id=ParamIds.DRO_TO_X8_WAIT_TIME,
|
||||
parameter=wait_time
|
||||
parameter=wait_time,
|
||||
)
|
||||
cmd = pack_fsfw_load_param_cmd(ssc=0, app_data=param_data)
|
||||
tc_queue.appendleft(cmd.pack_command_tuple())
|
||||
@@ -66,13 +69,14 @@ def pack_pl_pcdu_commands(tc_queue: TcQueueT, op_code: str):
|
||||
|
||||
def request_wait_time() -> Optional[float]:
|
||||
while True:
|
||||
wait_time = input("Please enter DRO to X8 wait time in seconds, x to cancel")
|
||||
wait_time = input("Please enter DRO to X8 wait time in seconds, x to cancel: ")
|
||||
if wait_time.lower() == "x":
|
||||
return None
|
||||
if not wait_time.isnumeric():
|
||||
try:
|
||||
wait_time = float(wait_time)
|
||||
except ValueError:
|
||||
LOGGER.warning("Invalid input")
|
||||
continue
|
||||
wait_time = float(wait_time)
|
||||
if wait_time <= 0:
|
||||
LOGGER.warning("Invalid input")
|
||||
else:
|
||||
|
@@ -11,6 +11,7 @@ from tmtccmd.pus.service_1_verification import Service1TMExtended
|
||||
from tmtccmd.pus.service_17_test import Service17TMExtended
|
||||
from tmtccmd.tm.service_3_housekeeping import Service3TM
|
||||
from tmtccmd.tm.service_200_mode import Service200TM
|
||||
from tmtccmd.tm.service_20_parameters import Service20TM
|
||||
from tmtccmd.tm.service_5_event import Service5TM
|
||||
from tmtccmd.tm.service_200_mode import Service200TM
|
||||
from tmtccmd.utility.tmtc_printer import TmTcPrinter, PrintFormats
|
||||
@@ -46,6 +47,8 @@ def pus_factory_hook(raw_tm_packet: bytearray, tmtc_printer: TmTcPrinter):
|
||||
tm_packet = Service8TM.unpack(raw_telemetry=raw_tm_packet)
|
||||
if service_type == 17:
|
||||
tm_packet = Service17TMExtended.unpack(raw_telemetry=raw_tm_packet)
|
||||
if service_type == 20:
|
||||
tm_packet = Service20TM.unpack(raw_telemetry=raw_tm_packet)
|
||||
if service_type == 200:
|
||||
tm_packet = Service200TM.unpack(raw_telemetry=raw_tm_packet)
|
||||
if tm_packet is None:
|
||||
|
2
tmtccmd
2
tmtccmd
Submodule tmtccmd updated: 9af8340c02...efa1e6636e
Reference in New Issue
Block a user