diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2020-09-03 16:22:54 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2020-09-03 16:22:54 -0400 |
commit | 1f3a160f47175c44722a3ce1e58e90c359b99c99 (patch) | |
tree | b3dec7de83cea37073ffafa557b8b28b3304b8d3 /klippy/kinematics/cartesian.py | |
parent | d0ed6e57050d280a412f82e17d2de56a5b8280ad (diff) | |
download | kutter-1f3a160f47175c44722a3ce1e58e90c359b99c99.tar.gz kutter-1f3a160f47175c44722a3ce1e58e90c359b99c99.tar.xz kutter-1f3a160f47175c44722a3ce1e58e90c359b99c99.zip |
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 <kevin@koconnor.net>
Diffstat (limited to 'klippy/kinematics/cartesian.py')
-rw-r--r-- | klippy/kinematics/cartesian.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/klippy/kinematics/cartesian.py b/klippy/kinematics/cartesian.py index 3dfd8fc5..073b0b3d 100644 --- a/klippy/kinematics/cartesian.py +++ b/klippy/kinematics/cartesian.py @@ -100,9 +100,8 @@ 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.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] |