From 551bd105a6e61cdd8c56f8d7376e472be05c972a Mon Sep 17 00:00:00 2001 From: Jakob Meier Date: Sun, 27 Mar 2022 12:21:37 +0200 Subject: [PATCH] removed null terminator from flash write command --- pus_tc/devs/ploc_mpsoc.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pus_tc/devs/ploc_mpsoc.py b/pus_tc/devs/ploc_mpsoc.py index 3b0dbab..3433e35 100644 --- a/pus_tc/devs/ploc_mpsoc.py +++ b/pus_tc/devs/ploc_mpsoc.py @@ -170,8 +170,8 @@ def prepare_mem_read_command(object_id: bytearray) -> bytearray: def prepare_flash_write_cmd(object_id: bytearray) -> bytearray: obcFile = get_obc_file() mpsocFile = get_mpsoc_file() - command = object_id + struct.pack('!I', CommandIds.FLASH_WRITE) + bytearray(obcFile, 'utf-8') + \ - struct.pack('B', 0) + bytearray(mpsocFile, 'utf-8') + command = object_id + struct.pack('!I', CommandIds.FLASH_WRITE) + bytearray(obcFile, 'utf-8') + bytearray(mpsocFile, + 'utf-8') return command @@ -182,7 +182,7 @@ def prepare_flash_delete_cmd(object_id: bytearray) -> bytearray: def prepare_replay_start_cmd(object_id: bytearray) -> bytearray: - replay = int(input("Specify replay mode (0 - repeated, 1 - once): ")) + replay = int(input("Specify replay mode (0 - once, 1 - repeated): ")) command = object_id + struct.pack('!I', CommandIds.TC_REPLAY_START) + struct.pack('!B', replay) return command