From 56514759551204c20687c393f463e74204b821f2 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 22 Aug 2022 13:41:07 +0200 Subject: [PATCH] mem check now always based on file --- tmtc/ploc_supervisor.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tmtc/ploc_supervisor.py b/tmtc/ploc_supervisor.py index c9016fa..16da1c5 100644 --- a/tmtc/ploc_supervisor.py +++ b/tmtc/ploc_supervisor.py @@ -431,15 +431,16 @@ def pack_ploc_supv_commands(p: ServiceProviderParams): q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command)) if op_code in OpCodes.MEM_CHECK: custom_data = bytearray() + update_file = get_update_file() memory_id = int(input("Specify memory ID: ")) start_address = int(input("Specify start address: 0x"), 16) - check_size = int(input("Specify check size: ")) + custom_data.extend(update_file.encode("utf-8")) + custom_data.append(0) custom_data.extend(struct.pack("!B", memory_id)) custom_data.extend(struct.pack("!I", start_address)) - custom_data.extend(struct.pack("!I", check_size)) q.add_log_cmd( - f"{prefix}: {Info.MEM_CHECK} for memory ID {memory_id} at start " - f"address {start_address} with check size {check_size}" + f"{prefix}: {Info.MEM_CHECK} for file {update_file} at memory ID {memory_id} at start " + f"address {start_address}" ) command = make_fsfw_action_cmd( object_id.as_bytes, SupvActionIds.MEM_CHECK, custom_data