diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2018-07-13 11:24:36 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2018-07-13 11:37:36 -0400 |
commit | a31c31aed43a6852880ec3e47f0621c811b0e2d0 (patch) | |
tree | 96ce46dcf70c86526078baaad5067388709c3b64 /klippy/kinematics/delta.py | |
parent | b9885965195d1e25cbfec887e5794c59f775f897 (diff) | |
download | kutter-a31c31aed43a6852880ec3e47f0621c811b0e2d0.tar.gz kutter-a31c31aed43a6852880ec3e47f0621c811b0e2d0.tar.xz kutter-a31c31aed43a6852880ec3e47f0621c811b0e2d0.zip |
mcu: Enhance itersolve stepper kinematics allocation
Allocate the stepper_kinematics directly in mcu.py - that way the
kinematic classes don't have to interact with the chelper code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/kinematics/delta.py')
-rw-r--r-- | klippy/kinematics/delta.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/klippy/kinematics/delta.py b/klippy/kinematics/delta.py index 2e51681d..b584f9c9 100644 --- a/klippy/kinematics/delta.py +++ b/klippy/kinematics/delta.py @@ -4,7 +4,7 @@ # # This file may be distributed under the terms of the GNU GPLv3 license. import math, logging -import stepper, homing, chelper, mathutil +import stepper, homing, mathutil # Slow moves once the ratio of tower to XY movement exceeds SLOW_RATIO SLOW_RATIO = 3. @@ -60,12 +60,8 @@ class DeltaKinematics: self.towers = [(math.cos(math.radians(angle)) * radius, math.sin(math.radians(angle)) * radius) for angle in self.angles] - # Setup iterative solver - ffi_main, ffi_lib = chelper.get_ffi() for r, a, t in zip(self.rails, self.arm2, self.towers): - sk = ffi_main.gc(ffi_lib.delta_stepper_alloc(a, t[0], t[1]), - ffi_lib.free) - r.setup_itersolve(sk) + r.setup_itersolve('delta_stepper_alloc', a, t[0], t[1]) # Find the point where an XY move could result in excessive # tower movement half_min_step_dist = min([r.get_steppers()[0].get_step_dist() |