aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/manual_stepper.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2019-11-06 08:41:50 -0500
committerKevin O'Connor <kevin@koconnor.net>2019-11-06 15:51:51 -0500
commit86121ff79ef730a0a7a4d2d35f40cc01f7e1b9e7 (patch)
tree0bd56060e88f145b419b48b4aeeaf8ca5e6c1151 /klippy/extras/manual_stepper.py
parent257058981eff9b0944029c101de5f18af2fbf914 (diff)
downloadkutter-86121ff79ef730a0a7a4d2d35f40cc01f7e1b9e7.tar.gz
kutter-86121ff79ef730a0a7a4d2d35f40cc01f7e1b9e7.tar.xz
kutter-86121ff79ef730a0a7a4d2d35f40cc01f7e1b9e7.zip
toolhead: Calculate and store axes_r in move class
Calculate the ratio of axis distance to total move distance (axis_d / move_d) and store in a new member variable axes_r. This avoids needing to recalculate the value in other code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/manual_stepper.py')
-rw-r--r--klippy/extras/manual_stepper.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/klippy/extras/manual_stepper.py b/klippy/extras/manual_stepper.py
index 9b985007..73766622 100644
--- a/klippy/extras/manual_stepper.py
+++ b/klippy/extras/manual_stepper.py
@@ -54,11 +54,11 @@ class ManualStepper:
self.sync_print_time()
cp = self.stepper.get_commanded_position()
dist = movepos - cp
- accel_t, cruise_t, cruise_v = force_move.calc_move_time(
+ axis_r, accel_t, cruise_t, cruise_v = force_move.calc_move_time(
dist, speed, accel)
self.trapq_append(self.trapq, self.next_cmd_time,
accel_t, cruise_t, accel_t,
- cp, 0., 0., dist, 0., 0.,
+ cp, 0., 0., axis_r, 0., 0.,
0., cruise_v, accel)
self.next_cmd_time += accel_t + cruise_t + accel_t
self.stepper.generate_steps(self.next_cmd_time)