diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2019-11-05 15:42:19 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2019-11-06 15:51:51 -0500 |
commit | 076a66f791414b0eaf9a9a9c8907b20be327385a (patch) | |
tree | 24285d2628f5840eb4023af34da1d8580d4fb50d /klippy/toolhead.py | |
parent | 7ca86f17232e5e0653de512b6322c301b153919c (diff) | |
download | kutter-076a66f791414b0eaf9a9a9c8907b20be327385a.tar.gz kutter-076a66f791414b0eaf9a9a9c8907b20be327385a.tar.xz kutter-076a66f791414b0eaf9a9a9c8907b20be327385a.zip |
trapq: Use separate 'move' entries for accel, cruise, and decel phases
Only track a single acceleration movement in a 'struct move' instance.
Break the classic trapezoid movement (accel, cruise, decel) into three
separate movements. This simplifies the calculation logic.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/toolhead.py')
-rw-r--r-- | klippy/toolhead.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/klippy/toolhead.py b/klippy/toolhead.py index e1f2ddc9..f23f2bc3 100644 --- a/klippy/toolhead.py +++ b/klippy/toolhead.py @@ -306,7 +306,8 @@ class ToolHead: move.start_v, move.cruise_v, move.accel) if move.axes_d[3]: self.extruder.move(next_move_time, move) - next_move_time += move.accel_t + move.cruise_t + move.decel_t + next_move_time = (next_move_time + move.accel_t + + move.cruise_t + move.decel_t) # Generate steps for moves if self.special_queuing_state == "Drip": self._update_drip_move_time(next_move_time) |