From 31db4cc7727e6b8ede83212f7ca950d530836c3e Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Tue, 5 Dec 2017 17:51:54 -0500 Subject: [PATCH] mcu: Make sure steppers added to an endstop are on the same mcu Signed-off-by: Kevin O'Connor --- klippy/mcu.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/klippy/mcu.py b/klippy/mcu.py index e54c237c..93474b1a 100644 --- a/klippy/mcu.py +++ b/klippy/mcu.py @@ -147,6 +147,8 @@ class MCU_endstop: def get_mcu(self): return self._mcu 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") self._steppers.append(stepper) def build_config(self): self._oid = self._mcu.create_oid()