stepper: No need to pass printer reference to kinematic/stepper constructors

The config reference already stores a reference to the printer object.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2018-06-21 13:47:39 -04:00
parent 76e2b041b4
commit d0590ccb0e
6 changed files with 40 additions and 45 deletions

View file

@ -9,14 +9,11 @@ import stepper, homing, chelper
StepList = (0, 1, 2)
class CoreXYKinematics:
def __init__(self, toolhead, printer, config):
def __init__(self, toolhead, config):
self.steppers = [
stepper.PrinterHomingStepper(
printer, config.getsection('stepper_x')),
stepper.PrinterHomingStepper(
printer, config.getsection('stepper_y')),
stepper.LookupMultiHomingStepper(
printer, config.getsection('stepper_z'))]
stepper.PrinterHomingStepper(config.getsection('stepper_x')),
stepper.PrinterHomingStepper(config.getsection('stepper_y')),
stepper.LookupMultiHomingStepper(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()