From 37eafb722b36ebabb50252121c80ef7712216486 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 11 Apr 2024 10:52:14 +0200 Subject: [PATCH] this should do the job --- eive_tmtc/tmtc/payload/ploc_mpsoc.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/eive_tmtc/tmtc/payload/ploc_mpsoc.py b/eive_tmtc/tmtc/payload/ploc_mpsoc.py index 49a5bd4..508f2cb 100644 --- a/eive_tmtc/tmtc/payload/ploc_mpsoc.py +++ b/eive_tmtc/tmtc/payload/ploc_mpsoc.py @@ -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: