From 399e50e1210062a297dfb93c836731de150cbdc6 Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Wed, 23 Jul 2025 08:01:04 -0400 Subject: [PATCH] flashtool: increase timeout for send block command Signed-off-by: Eric Callahan --- scripts/flashtool.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/flashtool.py b/scripts/flashtool.py index b5f7864..0a08cd5 100755 --- a/scripts/flashtool.py +++ b/scripts/flashtool.py @@ -322,7 +322,8 @@ class CanFlasher: self, cmdname: str, payload: bytes = b"", - tries: int = 5 + tries: int = 5, + read_timeout: float = 2.0 ) -> bytearray: cmd = BOOTLOADER_CMDS[cmdname] out_cmd = self._build_command(cmd, payload) @@ -334,7 +335,7 @@ class CanFlasher: self.node.write(out_cmd) read_done = False while not read_done: - ret = await self.node.readuntil(CMD_TRAILER) + ret = await self.node.readuntil(CMD_TRAILER, read_timeout) data.extend(ret) while len(data) > 7: if data[:2] != CMD_HEADER: @@ -424,7 +425,14 @@ class CanFlasher: self.fw_sha.update(buf) prefix = struct.pack("