From 503891cd0ed787b117bf1f422dcbdebcdc07deb3 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Thu, 14 Nov 2019 18:36:42 -0500 Subject: [PATCH] toolhead: Don't call _process_moves() if no moves present Don't transition to the normal movement state if there aren't any moves actually ready to be processed. Signed-off-by: Kevin O'Connor --- klippy/toolhead.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/klippy/toolhead.py b/klippy/toolhead.py index a2651fea..4855caf6 100644 --- a/klippy/toolhead.py +++ b/klippy/toolhead.py @@ -167,10 +167,12 @@ class MoveQueue: return # Allow extruder to do its lookahead move_count = self.extruder_lookahead(queue, flush_count, lazy) + self.leftover = flush_count - move_count + if not move_count: + return # Generate step times for all moves ready to be flushed self.toolhead._process_moves(queue[:move_count]) # Remove processed moves from the queue - self.leftover = flush_count - move_count del queue[:move_count] def add_move(self, move): self.queue.append(move)