diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2019-11-14 18:36:42 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2019-11-15 11:55:15 -0500 |
commit | 503891cd0ed787b117bf1f422dcbdebcdc07deb3 (patch) | |
tree | ae2fc4d041e1b87e6266a7e929790f3b5b55823d /klippy/toolhead.py | |
parent | dd529d7ad1f1522183d739bc23ee631a4d00feb0 (diff) | |
download | kutter-503891cd0ed787b117bf1f422dcbdebcdc07deb3.tar.gz kutter-503891cd0ed787b117bf1f422dcbdebcdc07deb3.tar.xz kutter-503891cd0ed787b117bf1f422dcbdebcdc07deb3.zip |
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 <kevin@koconnor.net>
Diffstat (limited to 'klippy/toolhead.py')
-rw-r--r-- | klippy/toolhead.py | 4 |
1 files changed, 3 insertions, 1 deletions
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) |