aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/cartesian.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2016-11-18 12:42:39 -0500
committerKevin O'Connor <kevin@koconnor.net>2016-11-18 14:17:53 -0500
commit4f30dce64f16ad17ba471538fa3abe0e63f5b91f (patch)
tree821f724fbef0a667723e50f91ea4bc6bf4c5949b /klippy/cartesian.py
parent2b5b899d35d33ed6b8bfb90133d22095d0a56c66 (diff)
downloadkutter-4f30dce64f16ad17ba471538fa3abe0e63f5b91f.tar.gz
kutter-4f30dce64f16ad17ba471538fa3abe0e63f5b91f.tar.xz
kutter-4f30dce64f16ad17ba471538fa3abe0e63f5b91f.zip
homing: Add EndstopMoveError wrapper around EndstopError
Allow an EndstopError to be raised without a destination position. Introduce EndstopMoveError wrapper so that current callers can continue to pass in a move destination. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/cartesian.py')
-rw-r--r--klippy/cartesian.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/klippy/cartesian.py b/klippy/cartesian.py
index 706ebc5e..f6dc3685 100644
--- a/klippy/cartesian.py
+++ b/klippy/cartesian.py
@@ -84,8 +84,9 @@ class CartKinematics:
and (end_pos[i] < self.limits[i][0]
or end_pos[i] > self.limits[i][1])):
if self.limits[i][0] > self.limits[i][1]:
- raise homing.EndstopError(end_pos, "Must home axis first")
- raise homing.EndstopError(end_pos)
+ raise homing.EndstopMoveError(
+ end_pos, "Must home axis first")
+ raise homing.EndstopMoveError(end_pos)
def check_move(self, move):
limits = self.limits
xpos, ypos = move.end_pos[:2]