updated pl pcdu commands

This commit is contained in:
Robin Mueller
2022-04-04 13:53:26 +02:00
parent a39c7007c6
commit 8b5554d6fd
6 changed files with 59 additions and 53 deletions

View File

@ -43,16 +43,12 @@ def pack_syrlinks_command(
)
if op_code == "0":
tc_queue.appendleft(
(QueueCommands.PRINT, "Syrlinks: Set mode off")
)
tc_queue.appendleft((QueueCommands.PRINT, "Syrlinks: Set mode off"))
command = pack_mode_data(object_id, Modes.OFF, 0)
command = PusTelecommand(service=200, subservice=1, ssc=9, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "1":
tc_queue.appendleft(
(QueueCommands.PRINT, "Syrlinks: Set mode on")
)
tc_queue.appendleft((QueueCommands.PRINT, "Syrlinks: Set mode on"))
command = pack_mode_data(object_id, Modes.ON, 0)
command = PusTelecommand(service=200, subservice=1, ssc=10, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
@ -111,23 +107,17 @@ def pack_syrlinks_command(
command = PusTelecommand(service=8, subservice=128, ssc=16, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "12":
tc_queue.appendleft(
(QueueCommands.PRINT, "Syrlinks: Write LCL config")
)
command = object_id + struct.pack('!I', CommandIds.WRITE_LCL_CONFIG)
tc_queue.appendleft((QueueCommands.PRINT, "Syrlinks: Write LCL config"))
command = object_id + struct.pack("!I", CommandIds.WRITE_LCL_CONFIG)
command = PusTelecommand(service=8, subservice=128, ssc=17, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "13":
tc_queue.appendleft(
(QueueCommands.PRINT, "Syrlinks: Read RX status registers")
)
command = object_id + struct.pack('!I', CommandIds.READ_RX_STATUS_REGISTERS)
tc_queue.appendleft((QueueCommands.PRINT, "Syrlinks: Read RX status registers"))
command = object_id + struct.pack("!I", CommandIds.READ_RX_STATUS_REGISTERS)
command = PusTelecommand(service=8, subservice=128, ssc=18, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "14":
tc_queue.appendleft(
(QueueCommands.PRINT, "Syrlinks: Read LCL config register")
)
command = object_id + struct.pack('!I', CommandIds.READ_LCL_CONFIG_REGISTER)
tc_queue.appendleft((QueueCommands.PRINT, "Syrlinks: Read LCL config register"))
command = object_id + struct.pack("!I", CommandIds.READ_LCL_CONFIG_REGISTER)
command = PusTelecommand(service=8, subservice=128, ssc=19, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())