mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-15 02:37:52 -06:00
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>
This commit is contained in:
parent
fbbbbc85cf
commit
804f95ebe4
5 changed files with 9 additions and 19 deletions
|
@ -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():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue