diff options
author | Timofey Titovets <nefelim4ag@gmail.com> | 2025-07-03 21:39:49 +0200 |
---|---|---|
committer | KevinOConnor <kevin@koconnor.net> | 2025-07-11 10:46:57 -0400 |
commit | 37ddab223f54823d7252f87ea1b025a43031b878 (patch) | |
tree | 52accb71f1726c81d0eb99a254dee69ad51086e4 /klippy/serialhdl.py | |
parent | 119d00705836eda8c150437af66c39f58732b492 (diff) | |
download | kutter-37ddab223f54823d7252f87ea1b025a43031b878.tar.gz kutter-37ddab223f54823d7252f87ea1b025a43031b878.tar.xz kutter-37ddab223f54823d7252f87ea1b025a43031b878.zip |
mcu: allow disable send retries
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
Diffstat (limited to 'klippy/serialhdl.py')
-rw-r--r-- | klippy/serialhdl.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/klippy/serialhdl.py b/klippy/serialhdl.py index 30db6170..fc884638 100644 --- a/klippy/serialhdl.py +++ b/klippy/serialhdl.py @@ -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) |