aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/corexy.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2017-04-07 12:51:52 -0400
committerKevin O'Connor <kevin@koconnor.net>2017-04-07 14:43:25 -0400
commit98add22891d66d0a9ce21d35b750d20d3671382e (patch)
treebae6b300d3b76d3650ea49af09817952a99011c6 /klippy/corexy.py
parent1d81bf559657422db7a7dbd7a1f7f5b2b352eb21 (diff)
downloadkutter-98add22891d66d0a9ce21d35b750d20d3671382e.tar.gz
kutter-98add22891d66d0a9ce21d35b750d20d3671382e.tar.xz
kutter-98add22891d66d0a9ce21d35b750d20d3671382e.zip
stepcompress: Merge stepcompress_push_accel() and stepcompress_push_const()
It's not necessary to have separate C functions for constant acceleration and constant velocity as constant velocity can be obtained by using a constant acceleration of zero. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/corexy.py')
-rw-r--r--klippy/corexy.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/klippy/corexy.py b/klippy/corexy.py
index b724a4e1..dfee7bb3 100644
--- a/klippy/corexy.py
+++ b/klippy/corexy.py
@@ -126,18 +126,19 @@ class CoreXYKinematics:
# Acceleration steps
if move.accel_r:
accel_d = move.accel_r * axis_d
- mcu_stepper.step_accel(
+ mcu_stepper.step_const(
mcu_time, start_pos, accel_d, move.start_v * axis_r, accel)
start_pos += accel_d
mcu_time += move.accel_t
# Cruising steps
if move.cruise_r:
cruise_d = move.cruise_r * axis_d
- mcu_stepper.step_const(mcu_time, start_pos, cruise_d, cruise_v)
+ mcu_stepper.step_const(
+ mcu_time, start_pos, cruise_d, cruise_v, 0.)
start_pos += cruise_d
mcu_time += move.cruise_t
# Deceleration steps
if move.decel_r:
decel_d = move.decel_r * axis_d
- mcu_stepper.step_accel(
+ mcu_stepper.step_const(
mcu_time, start_pos, decel_d, cruise_v, -accel)