aboutsummaryrefslogtreecommitdiffstats
path: root/klippy
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2019-05-31 09:05:12 -0400
committerKevin O'Connor <kevin@koconnor.net>2019-05-31 10:24:52 -0400
commit02eeb72713b2910a01f1006fc62e69b364f9b6c4 (patch)
tree7a19720b5261c158569efa3083902a12fd4450dc /klippy
parentc54b8da530dc724b129066d1f3a825226926c5e6 (diff)
downloadkutter-02eeb72713b2910a01f1006fc62e69b364f9b6c4.tar.gz
kutter-02eeb72713b2910a01f1006fc62e69b364f9b6c4.tar.xz
kutter-02eeb72713b2910a01f1006fc62e69b364f9b6c4.zip
manual_probe: Verify no XY moves since start of manual probe
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy')
-rw-r--r--klippy/extras/manual_probe.py6
1 files 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.")