mirror of
https://github.com/Klipper3d/klipper.git
synced 2026-01-08 07:47:45 -07:00
toolhead: Flush lookahead on dwell - fix flushing bug after long delays
Some checks are pending
Build test / build (push) Waiting to run
Some checks are pending
Build test / build (push) Waiting to run
Commit 7ea5f5d2 changed how the lookahead queue is flushed.
Previously, the main flush timer would always run while the toolhead
was considered in an active state (print_time). After that commit,
the flush timer could sleep if there were no steps generated (no call
to note_mcu_movequeue_activity() ). This could lead to a situation
where a G4 command (or series of commands) could cause the toolhead to
be considered in an active state while the flush timer was disabled.
The result was that a future command may not be properly flushed (the
toolhead would fail to transition to a "Priming" state).
Fix by ensuring that all dwell() requests fully flush the lookahead
queue.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
9e6430aa60
commit
184ba4080c
1 changed files with 1 additions and 0 deletions
|
|
@ -398,6 +398,7 @@ class ToolHead:
|
|||
self.move(curpos, speed)
|
||||
self.printer.send_event("toolhead:manual_move")
|
||||
def dwell(self, delay):
|
||||
self._flush_lookahead()
|
||||
next_print_time = self.get_last_move_time() + max(0., delay)
|
||||
self._advance_move_time(next_print_time)
|
||||
self._check_pause()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue