From 804f95ebe4961566603747165ec90a1676a0dc7d Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Wed, 19 Feb 2020 12:07:30 -0500 Subject: 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 --- klippy/mcu.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'klippy/mcu.py') 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(): -- cgit v1.2.3-70-g09d2