From 1f3a160f47175c44722a3ce1e58e90c359b99c99 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Thu, 3 Sep 2020 16:22:54 -0400 Subject: toolhead: Add a move.move_error() helper Move the EndstopMoveError() code from homing.py to a new method in the toolhead Move class. Signed-off-by: Kevin O'Connor --- klippy/kinematics/corexz.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'klippy/kinematics/corexz.py') diff --git a/klippy/kinematics/corexz.py b/klippy/kinematics/corexz.py index 8addecf7..6cc21624 100644 --- a/klippy/kinematics/corexz.py +++ b/klippy/kinematics/corexz.py @@ -76,9 +76,8 @@ class CoreXZKinematics: 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.EndstopMoveError( - end_pos, "Must home axis first") - raise homing.EndstopMoveError(end_pos) + raise move.move_error("Must home axis first") + raise move.move_error() def check_move(self, move): limits = self.limits xpos, ypos = move.end_pos[:2] -- cgit v1.2.3-70-g09d2