mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-11-01 10:56:18 +01: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:
@@ -54,6 +54,10 @@ class Move:
|
||||
self.accel = min(self.accel, accel)
|
||||
self.delta_v2 = 2.0 * self.move_d * self.accel
|
||||
self.smooth_delta_v2 = min(self.smooth_delta_v2, self.delta_v2)
|
||||
def move_error(self, msg="Move out of range"):
|
||||
pos = self.end_pos
|
||||
return homing.EndstopError("%s: %.3f %.3f %.3f [%.3f]"
|
||||
% (msg, pos[0], pos[1], pos[2], pos[3]))
|
||||
def calc_junction(self, prev_move):
|
||||
if not self.is_kinematic_move or not prev_move.is_kinematic_move:
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user