ota flash: print number of blocks
This commit is contained in:
+6
-2
@@ -57,9 +57,13 @@ def hexy(h):
|
||||
def ddec(h):
|
||||
return "".join("{:02d} ".format(x) for x in bytearray(h))
|
||||
|
||||
for i in range(0, 2 + len(rom_image)//BLOCK_SIZE):
|
||||
# header block 0 plus n full blocks plus partial block at end
|
||||
num_blocks = 2 + len(rom_image)//BLOCK_SIZE
|
||||
print(f"{num_blocks} blocks to send")
|
||||
|
||||
for i in range(0, num_blocks):
|
||||
h = hash_for_block(i)
|
||||
print(f"block {i} {len(data_for_block(i))}")
|
||||
print(f"block {i}")
|
||||
sock.send(linked_block(i))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user