aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/bltouch.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2024-05-19 13:15:30 -0400
committerKevin O'Connor <kevin@koconnor.net>2024-05-21 20:16:31 -0400
commit37482178b5482a013a4a5a62789705ccaf1e03c6 (patch)
tree34d936d7d76183bd429fd4dfa399f39fe7ed8dee /klippy/extras/bltouch.py
parent4709f1fad50b642f744a8804608d55855d7d7b42 (diff)
downloadkutter-37482178b5482a013a4a5a62789705ccaf1e03c6.tar.gz
kutter-37482178b5482a013a4a5a62789705ccaf1e03c6.tar.xz
kutter-37482178b5482a013a4a5a62789705ccaf1e03c6.zip
mcu: Raise an error on a failed home_wait() call
Raise a printer.command_error exception if a home_wait() call fails. This makes it easier to support future types of homing errors. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/bltouch.py')
-rw-r--r--klippy/extras/bltouch.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/klippy/extras/bltouch.py b/klippy/extras/bltouch.py
index 49385428..b01cdb9e 100644
--- a/klippy/extras/bltouch.py
+++ b/klippy/extras/bltouch.py
@@ -116,7 +116,11 @@ class BLTouchEndstopWrapper:
self.mcu_endstop.home_start(self.action_end_time, ENDSTOP_SAMPLE_TIME,
ENDSTOP_SAMPLE_COUNT, ENDSTOP_REST_TIME,
triggered=triggered)
- trigger_time = self.mcu_endstop.home_wait(self.action_end_time + 0.100)
+ try:
+ trigger_time = self.mcu_endstop.home_wait(
+ self.action_end_time + 0.100)
+ except self.printer.command_error as e:
+ return False
return trigger_time > 0.
def raise_probe(self):
self.sync_mcu_print_time()