diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2019-05-24 22:54:35 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2019-05-24 22:54:35 -0400 |
commit | 772ad53e20d224475949a441781266f2c1bdf142 (patch) | |
tree | 664744be3541ca19a99a1d3615bef3c172f80644 | |
parent | c77285287b0f746023d979c61eac9f5d16b19be3 (diff) | |
download | kutter-772ad53e20d224475949a441781266f2c1bdf142.tar.gz kutter-772ad53e20d224475949a441781266f2c1bdf142.tar.xz kutter-772ad53e20d224475949a441781266f2c1bdf142.zip |
manual_probe: Make sure the nozzle has moved during a manual probe
Make sure the TESTZ procedure is followed prior to accepting a manual
probe.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r-- | klippy/extras/manual_probe.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/klippy/extras/manual_probe.py b/klippy/extras/manual_probe.py index b816d6c8..bd17eccb 100644 --- a/klippy/extras/manual_probe.py +++ b/klippy/extras/manual_probe.py @@ -71,6 +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.report_z_status() def get_kinematics_pos(self): toolhead_pos = self.toolhead.get_position() @@ -115,6 +116,12 @@ 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: + self.gcode.respond_info( + "Manual probe failed! Use TESTZ commands to position the\n" + "nozzle prior to running ACCEPT.") + self.finalize(False) + return self.finalize(True) cmd_ABORT_help = "Abort manual Z probing tool" def cmd_ABORT(self, params): |