diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2019-09-24 22:46:17 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2019-09-26 11:10:36 -0400 |
commit | 9fcd3e75cd69ba265cce41f436dc1d1187f433e6 (patch) | |
tree | b9dd1616359d20d3c699860852d705566362eab2 | |
parent | f8f0c3f142dc76146ba9c83e512634a2859db488 (diff) | |
download | kutter-9fcd3e75cd69ba265cce41f436dc1d1187f433e6.tar.gz kutter-9fcd3e75cd69ba265cce41f436dc1d1187f433e6.tar.xz kutter-9fcd3e75cd69ba265cce41f436dc1d1187f433e6.zip |
toolhead: Fix velocity jumps in accel_to_decel lookahead processing
When reducing the maximum speed due to the max_accel_to_decel setting,
move velocity limits must still be propagated. Otherwise, the
trapezoid move planner may produce moves with velocity jumps.
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r-- | klippy/toolhead.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/klippy/toolhead.py b/klippy/toolhead.py index 5b076dd5..f697cb1b 100644 --- a/klippy/toolhead.py +++ b/klippy/toolhead.py @@ -157,8 +157,9 @@ class MoveQueue: if delayed: # Propagate peak_cruise_v2 to any delayed moves if not update_flush_count and i < flush_count: - for m, ms_v2, me_v2 in delayed: - mc_v2 = min(peak_cruise_v2, ms_v2) + mc_v2 = peak_cruise_v2 + for m, ms_v2, me_v2 in reversed(delayed): + mc_v2 = min(mc_v2, ms_v2) m.set_junction(min(ms_v2, mc_v2), mc_v2 , min(me_v2, mc_v2)) del delayed[:] |