ploc switch command

This commit is contained in:
Jakob Meier 2022-03-17 19:50:25 +01:00
parent 92e43418c2
commit cf61dfac0d
3 changed files with 32 additions and 2 deletions

View File

@ -268,7 +268,17 @@ def add_pcdu_cmds(cmd_dict: ServiceOpCodeDictT):
add_op_code_entry(
op_code_dict=op_code_dict,
keys=Pdu1OpCodes.MGT_OFF.value,
info="PDU1: Turn MGT on",
info="PDU1: Turn MGT off",
)
add_op_code_entry(
op_code_dict=op_code_dict,
keys=Pdu1OpCodes.PLOC_ON.value,
info="PDU1: Turn PLOC on",
)
add_op_code_entry(
op_code_dict=op_code_dict,
keys=Pdu1OpCodes.PLOC_OFF.value,
info="PDU1: Turn PLOC off",
)
add_op_code_entry(
op_code_dict=op_code_dict,

View File

@ -27,6 +27,8 @@ class Pdu1OpCodes(enum.Enum):
# Solar Cell Experiment
SCEX_ON = "12"
SCEX_OFF = "13"
PLOC_ON = "14"
PLOC_OFF = "15"
TESTS = "32"
@ -190,6 +192,24 @@ def pack_pdu1_commands(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
Channel.off,
)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == Pdu1OpCodes.PLOC_ON.value:
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn PLOC on"))
command = pack_set_param_command(
object_id,
PDUConfigTable.out_en_6.parameter_address,
PDUConfigTable.out_en_6.parameter_size,
Channel.on,
)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == Pdu1OpCodes.PLOC_OFF.value:
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn PLOC off"))
command = pack_set_param_command(
object_id,
PDUConfigTable.out_en_6.parameter_address,
PDUConfigTable.out_en_6.parameter_size,
Channel.off,
)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == GomspaceOpCodes.REQUEST_HK_ONCE.value:
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Requesting HK Table Once"))
hk_sid = make_sid(object_id=PDU_1_HANDLER_ID, set_id=SetIds.PDU_1)

@ -1 +1 @@
Subproject commit a31723786f4d85e82ba8e685f1652cb59cdb707b
Subproject commit 86cf0bf9530f0d31784ff96b025f8b778d1732b1