aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/homing.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2021-04-03 13:20:36 -0400
committerKevin O'Connor <kevin@koconnor.net>2021-08-17 22:01:23 -0400
commit1dc2ab048f7ec681ab1dfdd394660c45f6ff4cd9 (patch)
treeae7f0405bce0e2c2b3d5aed0c653d2eda08117d0 /klippy/extras/homing.py
parent128a2f8cd6e1558c21c21f98a9c0b3efaf543b51 (diff)
downloadkutter-1dc2ab048f7ec681ab1dfdd394660c45f6ff4cd9.tar.gz
kutter-1dc2ab048f7ec681ab1dfdd394660c45f6ff4cd9.tar.xz
kutter-1dc2ab048f7ec681ab1dfdd394660c45f6ff4cd9.zip
mcu: Return time of trigger from home_wait()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/homing.py')
-rw-r--r--klippy/extras/homing.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/klippy/extras/homing.py b/klippy/extras/homing.py
index dc7acd62..67a19513 100644
--- a/klippy/extras/homing.py
+++ b/klippy/extras/homing.py
@@ -76,9 +76,11 @@ class HomingMove:
# Wait for endstops to trigger
move_end_print_time = self.toolhead.get_last_move_time()
for mcu_endstop, name in self.endstops:
- did_trigger = mcu_endstop.home_wait(move_end_print_time)
- if not did_trigger and check_triggered and error is None:
- error = "Failed to home %s: Timeout during homing" % (name,)
+ trigger_time = mcu_endstop.home_wait(move_end_print_time)
+ if trigger_time < 0. and error is None:
+ error = "Communication timeout during homing %s" % (name,)
+ elif not trigger_time and check_triggered and error is None:
+ error = "No trigger on %s after full movement" % (name,)
# Determine stepper halt positions
self.toolhead.flush_step_generation()
self.end_mcu_pos = [(s, name, spos, s.get_mcu_position())