aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/mcu.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/mcu.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/mcu.py')
-rw-r--r--klippy/mcu.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/klippy/mcu.py b/klippy/mcu.py
index 6793fdff..09f5d232 100644
--- a/klippy/mcu.py
+++ b/klippy/mcu.py
@@ -10,8 +10,6 @@ class error(Exception):
pass
class MCU_endstop:
- class TimeoutError(Exception):
- pass
RETRY_QUERY = 1.000
def __init__(self, mcu, pin_params):
self._mcu = mcu
@@ -106,8 +104,7 @@ class MCU_endstop:
s.note_homing_end(did_trigger=did_trigger)
if not self._trigger_completion.test():
self._trigger_completion.complete(False)
- if not did_trigger:
- raise self.TimeoutError("Timeout during endstop homing")
+ return did_trigger
def query_endstop(self, print_time):
clock = self._mcu.print_time_to_clock(print_time)
if self._mcu.is_fileoutput():