cleaned up cmd handling

This commit is contained in:
2022-05-03 18:36:28 +02:00
parent aab5c28960
commit f60228f521
5 changed files with 372 additions and 349 deletions

View File

@ -172,7 +172,11 @@ def pack_ploc_mpsoc_commands(
elif op_code == "16":
tc_queue.appendleft((QueueCommands.PRINT, "PLOC MPSoC: Tc cam command send"))
cam_cmd = input("Specify cam command string: ")
command = object_id + struct.pack("!I", CommandIds.TC_CAM_CMD_SEND) + bytearray(cam_cmd, 'utf-8')
command = (
object_id
+ struct.pack("!I", CommandIds.TC_CAM_CMD_SEND)
+ bytearray(cam_cmd, "utf-8")
)
command = PusTelecommand(service=8, subservice=128, ssc=32, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())