includes were not updated..
This commit is contained in:
@ -7,7 +7,7 @@ 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_boolean_parameter_app_data
|
||||
pack_boolean_parameter_app_data,
|
||||
)
|
||||
from tmtccmd.utility.logger import get_console_logger
|
||||
from spacepackets.ecss.tc import PusTelecommand
|
||||
@ -80,24 +80,22 @@ class ParamIds(enum.IntEnum):
|
||||
def pack_pl_pcdu_commands(tc_queue: TcQueueT, op_code: str):
|
||||
if op_code in OpCodes.SWITCH_ON:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Switching PL PCDU on"))
|
||||
mode_data = pack_mode_data(
|
||||
object_id=PL_PCDU_ID, mode=Modes.ON, submode=0
|
||||
)
|
||||
mode_data = pack_mode_data(object_id=PL_PCDU_ID, mode=Modes.ON, submode=0)
|
||||
mode_cmd = PusTelecommand(
|
||||
service=200, subservice=Subservices.SWITCH_MODE, app_data=mode_data
|
||||
)
|
||||
tc_queue.appendleft(mode_cmd.pack_command_tuple())
|
||||
if op_code in OpCodes.SWITCH_OFF:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Switching PL PCDU off"))
|
||||
mode_data = pack_mode_data(
|
||||
object_id=PL_PCDU_ID, mode=Modes.OFF, submode=0
|
||||
)
|
||||
mode_data = pack_mode_data(object_id=PL_PCDU_ID, mode=Modes.OFF, submode=0)
|
||||
mode_cmd = PusTelecommand(
|
||||
service=200, subservice=Subservices.SWITCH_MODE, app_data=mode_data
|
||||
)
|
||||
tc_queue.appendleft(mode_cmd.pack_command_tuple())
|
||||
if op_code in OpCodes.SWITCH_ADC_NORMAL:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Switching PL PCDU ADC module normal, submode ADC ON"))
|
||||
tc_queue.appendleft(
|
||||
(QueueCommands.PRINT, "Switching PL PCDU ADC module normal, submode ADC ON")
|
||||
)
|
||||
mode_data = pack_mode_data(
|
||||
object_id=PL_PCDU_ID, mode=Modes.NORMAL, submode=Submodes.ADC_ON
|
||||
)
|
||||
@ -106,7 +104,12 @@ def pack_pl_pcdu_commands(tc_queue: TcQueueT, op_code: str):
|
||||
)
|
||||
tc_queue.appendleft(mode_cmd.pack_command_tuple())
|
||||
if op_code in OpCodes.SWITCH_ALL_NORMAL:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Switching all PL PCDU modules normal, submode ALL ON"))
|
||||
tc_queue.appendleft(
|
||||
(
|
||||
QueueCommands.PRINT,
|
||||
"Switching all PL PCDU modules normal, submode ALL ON",
|
||||
)
|
||||
)
|
||||
mode_data = pack_mode_data(
|
||||
object_id=PL_PCDU_ID, mode=Modes.NORMAL, submode=Submodes.ALL_ON
|
||||
)
|
||||
@ -142,7 +145,7 @@ def pack_pl_pcdu_commands(tc_queue: TcQueueT, op_code: str):
|
||||
pack_failure_injection_cmd(
|
||||
tc_queue=tc_queue,
|
||||
param_id=ParamIds.INJECT_ALL_ON_FAILURE,
|
||||
print_str="All On"
|
||||
print_str="All On",
|
||||
)
|
||||
|
||||
|
||||
@ -182,10 +185,7 @@ def pack_wait_time_cmd(tc_queue: TcQueueT, param_id: int, print_str: str):
|
||||
def pack_failure_injection_cmd(tc_queue: TcQueueT, param_id: int, print_str: str):
|
||||
tc_queue.appendleft((QueueCommands.PRINT, f"Inserting {print_str} error"))
|
||||
param_data = pack_boolean_parameter_app_data(
|
||||
object_id=PL_PCDU_ID,
|
||||
domain_id=0,
|
||||
unique_id=param_id,
|
||||
parameter=True
|
||||
object_id=PL_PCDU_ID, domain_id=0, unique_id=param_id, parameter=True
|
||||
)
|
||||
cmd = pack_fsfw_load_param_cmd(ssc=0, app_data=param_data)
|
||||
tc_queue.appendleft(cmd.pack_command_tuple())
|
||||
|
Reference in New Issue
Block a user