aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/z_tilt.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2020-04-23 16:32:52 -0400
committerKevin O'Connor <kevin@koconnor.net>2020-04-24 10:10:33 -0400
commit3990d997de7a38afdeb18a53674ea8e2e68092d4 (patch)
tree651371edadad736dbd6d7fc8724a75698bb3731b /klippy/extras/z_tilt.py
parent43fa41c1af648ea626040e17f0eebda39dcdb2cb (diff)
downloadkutter-3990d997de7a38afdeb18a53674ea8e2e68092d4.tar.gz
kutter-3990d997de7a38afdeb18a53674ea8e2e68092d4.tar.xz
kutter-3990d997de7a38afdeb18a53674ea8e2e68092d4.zip
z_tilt: Raise a gcode.error() instead of directly calling respond_error()
Raising an error (instead of reporting an error) is important as only a raised error will stop a print from virtual_sdcard. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/z_tilt.py')
-rw-r--r--klippy/extras/z_tilt.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/klippy/extras/z_tilt.py b/klippy/extras/z_tilt.py
index 9784372e..e4f4b18a 100644
--- a/klippy/extras/z_tilt.py
+++ b/klippy/extras/z_tilt.py
@@ -94,10 +94,8 @@ class RetryHelper:
return
error = max(z_positions) - min(z_positions)
if self.check_increase(error):
- self.gcode.respond_error(
- "Retries aborting: %s is increasing. %s" % (
- self.value_label, self.error_msg_extra))
- return
+ raise self.gcode.error("Retries aborting: %s is increasing. %s"
+ % (self.value_label, self.error_msg_extra))
self.gcode.respond_info(
"Retries: %d/%d %s: %0.6f tolerance: %0.6f" % (
self.current_retry, self.max_retries, self.value_label,
@@ -106,8 +104,7 @@ class RetryHelper:
return "done"
self.current_retry += 1
if self.current_retry > self.max_retries:
- self.gcode.respond_error("Too many retries")
- return
+ raise self.gcode.error("Too many retries")
return "retry"
class ZTilt: