aboutsummaryrefslogtreecommitdiffstats
path: root/klippy
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2020-06-01 15:08:29 -0400
committerKevin O'Connor <kevin@koconnor.net>2020-06-01 15:29:20 -0400
commit9850dc75f4a7641a5bd12d9d2ccb7ca698619c88 (patch)
tree47ed2d2d68a41061c817e8465eb2e00f206fdb01 /klippy
parent38772492f953221c801ad0fe853b0503dbb9558e (diff)
downloadkutter-9850dc75f4a7641a5bd12d9d2ccb7ca698619c88.tar.gz
kutter-9850dc75f4a7641a5bd12d9d2ccb7ca698619c88.tar.xz
kutter-9850dc75f4a7641a5bd12d9d2ccb7ca698619c88.zip
toolhead: Handle flush_step_generation() call after dwell()
If self.kin_flush_delay changes after a G4 dwell command (or other non-kinematic time update) then it could lead to "internal step compression" errors. Make sure to handle this case in flush_step_generation(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy')
-rw-r--r--klippy/toolhead.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/klippy/toolhead.py b/klippy/toolhead.py
index cf8fba4a..617186f6 100644
--- a/klippy/toolhead.py
+++ b/klippy/toolhead.py
@@ -337,6 +337,7 @@ class ToolHead:
self.move_queue.set_flush_time(self.buffer_time_high)
self.idle_flush_print_time = 0.
flush_time = self.last_kin_move_time + self.kin_flush_delay
+ flush_time = max(flush_time, self.print_time - self.kin_flush_delay)
self.last_kin_flush_time = max(self.last_kin_flush_time, flush_time)
self._update_move_time(max(self.print_time, self.last_kin_flush_time))
def _flush_lookahead(self):