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>
This commit is contained in:
Kevin O'Connor 2019-11-14 18:36:42 -05:00
parent dd529d7ad1
commit 503891cd0e
1 changed files with 3 additions and 1 deletions

View File

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