mram dump and mram wipe tc, fix in hook_implementations
This commit is contained in:
@@ -227,6 +227,11 @@ def pack_ploc_supv_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code:
|
||||
command = pack_mram_wipe_cmd(object_id)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=46, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "32":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Dump MRAM"))
|
||||
command = pack_mram_dump_cmd(object_id)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=47, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
return tc_queue
|
||||
|
||||
@@ -450,4 +455,13 @@ def pack_mram_wipe_cmd(object_id: bytearray) -> bytearray:
|
||||
command = object_id + struct.pack('!I', SupvActionIds.WIPE_MRAM)
|
||||
command = command + struct.pack('!I', start)
|
||||
command = command + struct.pack('!I', stop)
|
||||
return command
|
||||
|
||||
def pack_mram_dump_cmd(object_id: bytearray) -> bytearray:
|
||||
start = int(input("Start address: 0x"), 16)
|
||||
stop = int(input("Stop address: 0x"), 16)
|
||||
command = bytearray()
|
||||
command = object_id + struct.pack('!I', SupvActionIds.DUMP_MRAM)
|
||||
command = command + struct.pack('!I', start)
|
||||
command = command + struct.pack('!I', stop)
|
||||
return command
|
Reference in New Issue
Block a user