mcu: allow disable send retries

Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
This commit is contained in:
Timofey Titovets
2025-07-03 21:39:49 +02:00
committed by KevinOConnor
parent 119d007058
commit 37ddab223f
2 changed files with 15 additions and 8 deletions

View File

@@ -310,9 +310,12 @@ class SerialRetryCommand:
self.serial.register_response(self.handle_callback, name, oid)
def handle_callback(self, params):
self.last_params = params
def get_response(self, cmds, cmd_queue, minclock=0, reqclock=0):
def get_response(self, cmds, cmd_queue, minclock=0, reqclock=0,
retry=True):
retries = 5
retry_delay = .010
if not retry:
retries = 0
while 1:
for cmd in cmds[:-1]:
self.serial.raw_send(cmd, minclock, reqclock, cmd_queue)