From 02eeb72713b2910a01f1006fc62e69b364f9b6c4 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 31 May 2019 09:05:12 -0400 Subject: [PATCH] manual_probe: Verify no XY moves since start of manual probe Signed-off-by: Kevin O'Connor --- klippy/extras/manual_probe.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/klippy/extras/manual_probe.py b/klippy/extras/manual_probe.py index bd17eccb..d18d40f3 100644 --- a/klippy/extras/manual_probe.py +++ b/klippy/extras/manual_probe.py @@ -71,7 +71,7 @@ class ManualProbeHelper: self.gcode.respond_info( "Starting manual Z probe. Use TESTZ to adjust position.\n" "Finish with ACCEPT or ABORT command.") - self.start_z_position = self.toolhead.get_position()[2] + self.start_position = self.toolhead.get_position() self.report_z_status() def get_kinematics_pos(self): toolhead_pos = self.toolhead.get_position() @@ -116,7 +116,9 @@ class ManualProbeHelper: prev_str, z_pos, next_str)) cmd_ACCEPT_help = "Accept the current Z position" def cmd_ACCEPT(self, params): - if self.toolhead.get_position()[2] >= self.start_z_position: + pos = self.toolhead.get_position() + start_pos = self.start_position + if pos[:2] != start_pos[:2] or pos[2] >= start_pos[2]: self.gcode.respond_info( "Manual probe failed! Use TESTZ commands to position the\n" "nozzle prior to running ACCEPT.")