From 98add22891d66d0a9ce21d35b750d20d3671382e Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 7 Apr 2017 12:51:52 -0400 Subject: 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 --- klippy/cartesian.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'klippy/cartesian.py') diff --git a/klippy/cartesian.py b/klippy/cartesian.py index c1e07a84..ab95df5d 100644 --- a/klippy/cartesian.py +++ b/klippy/cartesian.py @@ -112,18 +112,19 @@ class CartKinematics: # 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) -- cgit v1.2.3-70-g09d2