From a1de69e39be743d7963da67dc4065c9c98d29cc7 Mon Sep 17 00:00:00 2001 From: Neko-vecter Date: Tue, 8 Nov 2022 22:00:44 -0500 Subject: [PATCH] corexz: Multiple steppers per axis on CoreXZ Allowing multiple steppers per axis. Signed-off-by: Vecter Fang --- klippy/kinematics/corexz.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/klippy/kinematics/corexz.py b/klippy/kinematics/corexz.py index 66e05423..72134c32 100644 --- a/klippy/kinematics/corexz.py +++ b/klippy/kinematics/corexz.py @@ -9,13 +9,12 @@ import stepper class CoreXZKinematics: def __init__(self, toolhead, config): # Setup axis rails - self.rails = [ stepper.PrinterRail(config.getsection('stepper_x')), - stepper.PrinterRail(config.getsection('stepper_y')), - stepper.PrinterRail(config.getsection('stepper_z')) ] - self.rails[0].get_endstops()[0][0].add_stepper( - self.rails[2].get_steppers()[0]) - self.rails[2].get_endstops()[0][0].add_stepper( - self.rails[0].get_steppers()[0]) + self.rails = [stepper.LookupMultiRail(config.getsection('stepper_' + n)) + for n in 'xyz'] + for s in self.rails[0].get_steppers(): + self.rails[2].get_endstops()[0][0].add_stepper(s) + for s in self.rails[2].get_steppers(): + self.rails[0].get_endstops()[0][0].add_stepper(s) self.rails[0].setup_itersolve('corexz_stepper_alloc', b'+') self.rails[1].setup_itersolve('cartesian_stepper_alloc', b'y') self.rails[2].setup_itersolve('corexz_stepper_alloc', b'-')