diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2018-03-12 22:51:44 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2018-03-12 23:00:50 -0400 |
commit | 45afa045782c7edaaeb2d4a1b36b7455d196e57a (patch) | |
tree | e1f97bdd55eec6692b25eab285195dc54f87db41 /klippy/extras/probe.py | |
parent | 9bc4239e9c9375b60114c79b338cf895e410879b (diff) | |
download | kutter-45afa045782c7edaaeb2d4a1b36b7455d196e57a.tar.gz kutter-45afa045782c7edaaeb2d4a1b36b7455d196e57a.tar.xz kutter-45afa045782c7edaaeb2d4a1b36b7455d196e57a.zip |
probe: Add some hints for common errors during PROBE
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/probe.py')
-rw-r--r-- | klippy/extras/probe.py | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/klippy/extras/probe.py b/klippy/extras/probe.py index 4113a263..18ffa121 100644 --- a/klippy/extras/probe.py +++ b/klippy/extras/probe.py @@ -5,6 +5,18 @@ # This file may be distributed under the terms of the GNU GPLv3 license. import pins, homing +HINT_TIMEOUT = """ +Make sure to home the printer before probing. If the probe +did not move far enough to trigger, then consider setting +the probe z_position (and the Z axis minimum position) to a +negative value. +""" +HINT_MOVE_ERROR = """ +Make sure the probe z_position is in range of the Z axis +minimum and maximum position. (The minimum position may +be set to a negative number.) +""" + class PrinterProbe: def __init__(self, config): self.printer = config.get_printer() @@ -51,7 +63,12 @@ class PrinterProbe: homing_state.homing_move( pos, [(self.mcu_probe, "probe")], self.speed, probe_pos=True) except homing.EndstopError as e: - raise self.gcode.error(str(e)) + reason = str(e) + if "Timeout during endstop homing" in reason: + reason += HINT_TIMEOUT + elif "Move out of range" in reason: + reason += HINT_MOVE_ERROR + raise self.gcode.error(reason) self.gcode.reset_last_position() cmd_QUERY_PROBE_help = "Return the status of the z-probe" def cmd_QUERY_PROBE(self, params): |