this should do the job
EIVE/-/pipeline/head This commit looks good Details

This commit is contained in:
Robin Müller 2024-04-11 10:52:14 +02:00
parent a8d0143b1e
commit 37eafb722b
Signed by: muellerr
GPG Key ID: A649FB78196E3849
1 changed files with 5 additions and 2 deletions

View File

@ -503,15 +503,18 @@ def prepare_cam_take_pic_cmd(object_id: bytes) -> bytearray:
return bytearray(command)
def prepare_simplex_send_file_cmd(object_id: bytes) -> bytearray:
def prepare_simplex_send_file_cmd(object_id: bytes) -> bytes:
num_of_chunks = int(input("Please specify the number of chunks: "))
assert num_of_chunks >= 0
filename = input("Specify filename: ")
command = (
object_id
+ struct.pack("!I", num_of_chunks)
+ struct.pack("!I", ActionId.TC_SIMPLEX_SEND_FILE)
+ bytearray(filename, "utf-8")
+ bytes([0])
)
return bytearray(command)
return command
def prepare_downlink_data_modulate_cmd(object_id: bytes) -> bytearray: