mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-08-05 21:14:05 -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
|
@ -91,11 +91,9 @@ class ManualStepper:
|
|||
# Wait for endstops to trigger
|
||||
error = None
|
||||
for mcu_endstop, name in endstops:
|
||||
try:
|
||||
mcu_endstop.home_wait(self.next_cmd_time)
|
||||
except mcu_endstop.TimeoutError as e:
|
||||
if error is None:
|
||||
error = "Failed to home %s: %s" % (name, str(e))
|
||||
did_trigger = mcu_endstop.home_wait(self.next_cmd_time)
|
||||
if not did_trigger and error is None:
|
||||
error = "Failed to home %s: Timeout during homing" % (name,)
|
||||
self.sync_print_time()
|
||||
if error is not None:
|
||||
raise homing.CommandError(error)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue