corexz: Multiple steppers per axis on CoreXZ

Allowing multiple steppers per axis.

Signed-off-by: Vecter Fang <vecterfang@icloud.com>
This commit is contained in:
Neko-vecter 2022-11-08 22:00:44 -05:00 committed by KevinOConnor
parent e02b725602
commit a1de69e39b
1 changed files with 6 additions and 7 deletions

View File

@ -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'-')