mem check now always based on file
This commit is contained in:
parent
425870d161
commit
5651475955
@ -431,15 +431,16 @@ def pack_ploc_supv_commands(p: ServiceProviderParams):
|
|||||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||||
if op_code in OpCodes.MEM_CHECK:
|
if op_code in OpCodes.MEM_CHECK:
|
||||||
custom_data = bytearray()
|
custom_data = bytearray()
|
||||||
|
update_file = get_update_file()
|
||||||
memory_id = int(input("Specify memory ID: "))
|
memory_id = int(input("Specify memory ID: "))
|
||||||
start_address = int(input("Specify start address: 0x"), 16)
|
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("!B", memory_id))
|
||||||
custom_data.extend(struct.pack("!I", start_address))
|
custom_data.extend(struct.pack("!I", start_address))
|
||||||
custom_data.extend(struct.pack("!I", check_size))
|
|
||||||
q.add_log_cmd(
|
q.add_log_cmd(
|
||||||
f"{prefix}: {Info.MEM_CHECK} for memory ID {memory_id} at start "
|
f"{prefix}: {Info.MEM_CHECK} for file {update_file} at memory ID {memory_id} at start "
|
||||||
f"address {start_address} with check size {check_size}"
|
f"address {start_address}"
|
||||||
)
|
)
|
||||||
command = make_fsfw_action_cmd(
|
command = make_fsfw_action_cmd(
|
||||||
object_id.as_bytes, SupvActionIds.MEM_CHECK, custom_data
|
object_id.as_bytes, SupvActionIds.MEM_CHECK, custom_data
|
||||||
|
Loading…
Reference in New Issue
Block a user