corexy: Multiple steppers per axis on CoreXY (#4886)

Allowing multiple steppers per axis.

Signed-off-by: Andrei Ignat <andrei@ignat.se>
This commit is contained in:
Andrei Ignat 2022-03-01 05:11:50 +01:00 committed by GitHub
parent 7c964e5fdf
commit bbd1ddadd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 7 deletions

View File

@ -9,13 +9,12 @@ import stepper
class CoreXYKinematics:
def __init__(self, toolhead, config):
# Setup axis rails
self.rails = [ stepper.PrinterRail(config.getsection('stepper_x')),
stepper.PrinterRail(config.getsection('stepper_y')),
stepper.LookupMultiRail(config.getsection('stepper_z')) ]
self.rails[0].get_endstops()[0][0].add_stepper(
self.rails[1].get_steppers()[0])
self.rails[1].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[1].get_steppers():
self.rails[0].get_endstops()[0][0].add_stepper(s)
for s in self.rails[0].get_steppers():
self.rails[1].get_endstops()[0][0].add_stepper(s)
self.rails[0].setup_itersolve('corexy_stepper_alloc', b'+')
self.rails[1].setup_itersolve('corexy_stepper_alloc', b'-')
self.rails[2].setup_itersolve('cartesian_stepper_alloc', b'z')