aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2017-12-05 17:51:54 -0500
committerKevin O'Connor <kevin@koconnor.net>2017-12-06 18:35:51 -0500
commit31db4cc7727e6b8ede83212f7ca950d530836c3e (patch)
tree04125bfdb63e2da7ac35a989ab83e21c316b7e96
parent7932de11a7c1679b867039ff4c4bd99d1435dd7a (diff)
downloadkutter-31db4cc7727e6b8ede83212f7ca950d530836c3e.tar.gz
kutter-31db4cc7727e6b8ede83212f7ca950d530836c3e.tar.xz
kutter-31db4cc7727e6b8ede83212f7ca950d530836c3e.zip
mcu: Make sure steppers added to an endstop are on the same mcu
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r--klippy/mcu.py2
1 files changed, 2 insertions, 0 deletions
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()