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>
This commit is contained in:
Kevin O'Connor 2020-06-01 15:08:29 -04:00
parent 38772492f9
commit 9850dc75f4
1 changed files with 1 additions and 0 deletions

View File

@ -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):