param update success
This commit is contained in:
parent
5bea19a09a
commit
5e0e51c258
@ -104,6 +104,11 @@ def add_pl_pcdu_cmds(cmd_dict: ServiceOpCodeDictT):
|
|||||||
keys=OpCodes.SWITCH_ALL_ON,
|
keys=OpCodes.SWITCH_ALL_ON,
|
||||||
info="Switch all PL PCDU modules 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(
|
add_service_op_code_entry(
|
||||||
srv_op_code_dict=cmd_dict,
|
srv_op_code_dict=cmd_dict,
|
||||||
name=CustomServiceList.PL_PCDU.value,
|
name=CustomServiceList.PL_PCDU.value,
|
||||||
|
@ -27,7 +27,8 @@ class Submodes(enum.IntEnum):
|
|||||||
|
|
||||||
|
|
||||||
class ParamIds(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):
|
def pack_pl_pcdu_commands(tc_queue: TcQueueT, op_code: str):
|
||||||
@ -50,8 +51,10 @@ def pack_pl_pcdu_commands(tc_queue: TcQueueT, op_code: str):
|
|||||||
)
|
)
|
||||||
tc_queue.appendleft(mode_cmd.pack_command_tuple())
|
tc_queue.appendleft(mode_cmd.pack_command_tuple())
|
||||||
if op_code in OpCodes.UPDATE_DRO_TO_X8_WAIT:
|
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()
|
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:
|
if wait_time is None:
|
||||||
return
|
return
|
||||||
param_data = pack_scalar_double_param_app_data(
|
param_data = pack_scalar_double_param_app_data(
|
||||||
@ -66,13 +69,14 @@ def pack_pl_pcdu_commands(tc_queue: TcQueueT, op_code: str):
|
|||||||
|
|
||||||
def request_wait_time() -> Optional[float]:
|
def request_wait_time() -> Optional[float]:
|
||||||
while True:
|
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":
|
if wait_time.lower() == "x":
|
||||||
return None
|
return None
|
||||||
if not wait_time.isnumeric():
|
try:
|
||||||
|
wait_time = float(wait_time)
|
||||||
|
except ValueError:
|
||||||
LOGGER.warning("Invalid input")
|
LOGGER.warning("Invalid input")
|
||||||
continue
|
continue
|
||||||
wait_time = float(wait_time)
|
|
||||||
if wait_time <= 0:
|
if wait_time <= 0:
|
||||||
LOGGER.warning("Invalid input")
|
LOGGER.warning("Invalid input")
|
||||||
else:
|
else:
|
||||||
|
@ -11,6 +11,7 @@ from tmtccmd.pus.service_1_verification import Service1TMExtended
|
|||||||
from tmtccmd.pus.service_17_test import Service17TMExtended
|
from tmtccmd.pus.service_17_test import Service17TMExtended
|
||||||
from tmtccmd.tm.service_3_housekeeping import Service3TM
|
from tmtccmd.tm.service_3_housekeeping import Service3TM
|
||||||
from tmtccmd.tm.service_200_mode import Service200TM
|
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_5_event import Service5TM
|
||||||
from tmtccmd.tm.service_200_mode import Service200TM
|
from tmtccmd.tm.service_200_mode import Service200TM
|
||||||
from tmtccmd.utility.tmtc_printer import TmTcPrinter, PrintFormats
|
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)
|
tm_packet = Service8TM.unpack(raw_telemetry=raw_tm_packet)
|
||||||
if service_type == 17:
|
if service_type == 17:
|
||||||
tm_packet = Service17TMExtended.unpack(raw_telemetry=raw_tm_packet)
|
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:
|
if service_type == 200:
|
||||||
tm_packet = Service200TM.unpack(raw_telemetry=raw_tm_packet)
|
tm_packet = Service200TM.unpack(raw_telemetry=raw_tm_packet)
|
||||||
if tm_packet is None:
|
if tm_packet is None:
|
||||||
|
2
tmtccmd
2
tmtccmd
@ -1 +1 @@
|
|||||||
Subproject commit 9af8340c0276460128bd343139bc6e20bf020f6a
|
Subproject commit 8c4315c79fb7b7afecfb8e7ea9ccbf7847698468
|
Loading…
Reference in New Issue
Block a user