mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-11 08:47:53 -06:00
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>
This commit is contained in:
parent
d0ed6e5705
commit
1f3a160f47
9 changed files with 21 additions and 26 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue