mirror of
https://github.com/andreili/katapult.git
synced 2025-08-24 03:44:06 +02:00
flash_can: add retries to verification
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
f754ae2746
commit
f0d7bb7f9c
@ -158,9 +158,14 @@ class CanFlasher:
|
|||||||
if resp == i:
|
if resp == i:
|
||||||
# command should ack with the requested block as
|
# command should ack with the requested block as
|
||||||
# parameter
|
# parameter
|
||||||
|
try:
|
||||||
buf = await self.node.readexactly(
|
buf = await self.node.readexactly(
|
||||||
self.block_size, timeout=10.
|
self.block_size, timeout=5.
|
||||||
)
|
)
|
||||||
|
except asyncio.TimeoutError:
|
||||||
|
if tries:
|
||||||
|
output_line("\nRead Timeout, Retrying...")
|
||||||
|
else:
|
||||||
if len(buf) == self.block_size:
|
if len(buf) == self.block_size:
|
||||||
break
|
break
|
||||||
tries -= 1
|
tries -= 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user