aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/corexy.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2017-11-07 12:12:28 -0500
committerKevin O'Connor <kevin@koconnor.net>2017-11-18 17:29:23 -0500
commiteecf3b6ea87e7d9d67e26e965ebf2fe58339484d (patch)
treeaa208b3accee14719933c0605d0afab4952407dc /klippy/corexy.py
parentfc1d690d75f1b0e5be8a5a3e791007c314156065 (diff)
downloadkutter-eecf3b6ea87e7d9d67e26e965ebf2fe58339484d.tar.gz
kutter-eecf3b6ea87e7d9d67e26e965ebf2fe58339484d.tar.xz
kutter-eecf3b6ea87e7d9d67e26e965ebf2fe58339484d.zip
stepper: Store pointers to step_const and step_delta in PrinterStepper
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/corexy.py')
-rw-r--r--klippy/corexy.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/klippy/corexy.py b/klippy/corexy.py
index 561def5f..d459682a 100644
--- a/klippy/corexy.py
+++ b/klippy/corexy.py
@@ -122,7 +122,7 @@ class CoreXYKinematics:
axis_d = axes_d[i]
if not axis_d:
continue
- mcu_stepper = self.steppers[i].mcu_stepper
+ step_const = self.steppers[i].step_const
move_time = print_time
start_pos = move_start_pos[i]
axis_r = abs(axis_d) / move.move_d
@@ -132,19 +132,17 @@ class CoreXYKinematics:
# Acceleration steps
if move.accel_r:
accel_d = move.accel_r * axis_d
- mcu_stepper.step_const(
- move_time, start_pos, accel_d, move.start_v * axis_r, accel)
+ step_const(move_time, start_pos, accel_d,
+ move.start_v * axis_r, accel)
start_pos += accel_d
move_time += move.accel_t
# Cruising steps
if move.cruise_r:
cruise_d = move.cruise_r * axis_d
- mcu_stepper.step_const(
- move_time, start_pos, cruise_d, cruise_v, 0.)
+ step_const(move_time, start_pos, cruise_d, cruise_v, 0.)
start_pos += cruise_d
move_time += move.cruise_t
# Deceleration steps
if move.decel_r:
decel_d = move.decel_r * axis_d
- mcu_stepper.step_const(
- move_time, start_pos, decel_d, cruise_v, -accel)
+ step_const(move_time, start_pos, decel_d, cruise_v, -accel)