aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/bltouch.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2020-02-19 12:07:30 -0500
committerKevin O'Connor <kevin@koconnor.net>2020-02-19 12:20:00 -0500
commit804f95ebe4961566603747165ec90a1676a0dc7d (patch)
tree7461ff95946ada095242460618323e1d511e8c07 /klippy/extras/bltouch.py
parentfbbbbc85cf6b717a48c9c62cd39a219af0223655 (diff)
downloadkutter-804f95ebe4961566603747165ec90a1676a0dc7d.tar.gz
kutter-804f95ebe4961566603747165ec90a1676a0dc7d.tar.xz
kutter-804f95ebe4961566603747165ec90a1676a0dc7d.zip
homing: Don't raise a TimeoutError from home_wait()
Change home_wait() to return if the homing operation completed succesfully or not. This simplifies the callers. 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, 2 insertions, 4 deletions
diff --git a/klippy/extras/bltouch.py b/klippy/extras/bltouch.py
index cf9146fc..d5b4becc 100644
--- a/klippy/extras/bltouch.py
+++ b/klippy/extras/bltouch.py
@@ -57,7 +57,6 @@ class BLTouchEndstopWrapper:
self.get_steppers = self.mcu_endstop.get_steppers
self.home_wait = self.mcu_endstop.home_wait
self.query_endstop = self.mcu_endstop.query_endstop
- self.TimeoutError = self.mcu_endstop.TimeoutError
# Register BLTOUCH_DEBUG command
self.gcode = self.printer.lookup_object('gcode')
self.gcode.register_command("BLTOUCH_DEBUG", self.cmd_BLTOUCH_DEBUG,
@@ -98,9 +97,8 @@ class BLTouchEndstopWrapper:
self.mcu_endstop.home_start(check_start_time, ENDSTOP_SAMPLE_TIME,
ENDSTOP_SAMPLE_COUNT, ENDSTOP_REST_TIME,
triggered=triggered)
- try:
- self.mcu_endstop.home_wait(check_end_time)
- except self.mcu_endstop.TimeoutError as e:
+ did_trigger = self.mcu_endstop.home_wait(check_end_time)
+ if not did_trigger:
raise homing.EndstopError("BLTouch failed to %s" % (msg,))
def raise_probe(self):
for retry in range(3):