aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/stepper.py
diff options
context:
space:
mode:
Diffstat (limited to 'klippy/stepper.py')
-rw-r--r--klippy/stepper.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/klippy/stepper.py b/klippy/stepper.py
index 8fbd86cd..d187a69f 100644
--- a/klippy/stepper.py
+++ b/klippy/stepper.py
@@ -338,11 +338,11 @@ class PrinterRail:
def add_extra_stepper(self, config):
stepper = PrinterStepper(config, self.stepper_units_in_radians)
self.steppers.append(stepper)
- endstop_pin = config.get('endstop_pin', None)
- if self.endstops and endstop_pin is None:
+ if self.endstops and config.get('endstop_pin', None) is None:
# No endstop defined - use primary endstop
self.endstops[0][0].add_stepper(stepper)
return
+ endstop_pin = config.get('endstop_pin')
printer = config.get_printer()
ppins = printer.lookup_object('pins')
pin_params = ppins.parse_pin(endstop_pin, True, True)