stepper: Support for multiple steppers controlling a single axis

Allow multiple steppers to be defined for a single cartesian axis.
This adds support for dual-z setups.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2017-11-07 13:10:08 -05:00
parent 38643f52c9
commit 8c2fa2e2d6
4 changed files with 72 additions and 4 deletions

View file

@ -10,9 +10,13 @@ StepList = (0, 1, 2)
class CoreXYKinematics:
def __init__(self, toolhead, printer, config):
self.steppers = [stepper.PrinterHomingStepper(
printer, config.getsection('stepper_' + n))
for n in ['x', 'y', 'z']]
self.steppers = [
stepper.PrinterHomingStepper(
printer, config.getsection('stepper_x')),
stepper.PrinterHomingStepper(
printer, config.getsection('stepper_y')),
stepper.LookupMultiHomingStepper(
printer, config.getsection('stepper_z'))]
self.steppers[0].mcu_endstop.add_stepper(self.steppers[1].mcu_stepper)
self.steppers[1].mcu_endstop.add_stepper(self.steppers[0].mcu_stepper)
max_velocity, max_accel = toolhead.get_max_velocity()