mirror of https://github.com/Desuuuu/klipper.git
mcu: Avoid adding the same stepper multiple times to an endstop
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
96acfdc6d2
commit
ad480bd470
|
@ -150,6 +150,8 @@ class MCU_endstop:
|
|||
def add_stepper(self, stepper):
|
||||
if stepper.get_mcu() is not self._mcu:
|
||||
raise pins.error("Endstop and stepper must be on the same mcu")
|
||||
if stepper in self._steppers:
|
||||
return
|
||||
self._steppers.append(stepper)
|
||||
def get_steppers(self):
|
||||
return list(self._steppers)
|
||||
|
|
Loading…
Reference in New Issue