mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-23 22:54:10 -06:00
extruder: Do extruder lookahead based on time instead of cornering
When calculating the extruder lookahead, determine how far to lookahead by the amount of elapsed time each move takes. This makes the extruder lookahead code more flexible as it is no longer limited to the next immediate cornering moves. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
1bb7a22115
commit
528c29c01c
2 changed files with 37 additions and 40 deletions
|
@ -125,7 +125,7 @@ class MoveQueue:
|
|||
for move, start_v2, cruise_v2, end_v2 in move_info[:flush_count]:
|
||||
move.set_junction(start_v2, cruise_v2, end_v2)
|
||||
# Allow extruder to do its lookahead
|
||||
flush_count = self.extruder_lookahead(move_info, flush_count, lazy)
|
||||
flush_count = self.extruder_lookahead(queue, flush_count, lazy)
|
||||
# Generate step times for all moves ready to be flushed
|
||||
for move in queue[:flush_count]:
|
||||
move.move()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue