diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2017-04-07 12:51:52 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-04-07 14:43:25 -0400 |
commit | 98add22891d66d0a9ce21d35b750d20d3671382e (patch) | |
tree | bae6b300d3b76d3650ea49af09817952a99011c6 /klippy/extruder.py | |
parent | 1d81bf559657422db7a7dbd7a1f7f5b2b352eb21 (diff) | |
download | kutter-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/extruder.py')
-rw-r--r-- | klippy/extruder.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/klippy/extruder.py b/klippy/extruder.py index 4321f06b..24153e0f 100644 --- a/klippy/extruder.py +++ b/klippy/extruder.py @@ -169,22 +169,22 @@ class PrinterExtruder: # Acceleration steps if accel_d: - mcu_stepper.step_accel(mcu_time, start_pos, accel_d, start_v, accel) + mcu_stepper.step_const(mcu_time, start_pos, accel_d, start_v, accel) start_pos += accel_d mcu_time += accel_t # Cruising steps if cruise_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 += cruise_t # Deceleration steps if decel_d: - mcu_stepper.step_accel(mcu_time, start_pos, decel_d, decel_v, -accel) + mcu_stepper.step_const(mcu_time, start_pos, decel_d, decel_v, -accel) start_pos += decel_d mcu_time += decel_t # Retraction steps if retract_d: - mcu_stepper.step_accel( + mcu_stepper.step_const( mcu_time, start_pos, -retract_d, retract_v, accel) start_pos -= retract_d self.extrude_pos = start_pos |