aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2020-02-19 11:38:11 -0500
committerKevin O'Connor <kevin@koconnor.net>2020-02-19 11:45:44 -0500
commitfbbbbc85cf6b717a48c9c62cd39a219af0223655 (patch)
tree270938f67869f4bf23e193c30cc4f991c4a0227b /klippy/extras
parente3a5e2d271d1ead9112654bc19d631aa2cb944ee (diff)
downloadkutter-fbbbbc85cf6b717a48c9c62cd39a219af0223655.tar.gz
kutter-fbbbbc85cf6b717a48c9c62cd39a219af0223655.tar.xz
kutter-fbbbbc85cf6b717a48c9c62cd39a219af0223655.zip
homing: Replace notify callback with a completion
Update the endstop code to return its trigger completion object during home_start(). Update the toolhead class to take a completion object (instead of creating its own). This reduces the number of intermediate callbacks needed during a homing operation. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras')
-rw-r--r--klippy/extras/bltouch.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/klippy/extras/bltouch.py b/klippy/extras/bltouch.py
index 03613f08..cf9146fc 100644
--- a/klippy/extras/bltouch.py
+++ b/klippy/extras/bltouch.py
@@ -174,11 +174,10 @@ class BLTouchEndstopWrapper:
for s, mcu_pos in self.start_mcu_pos:
if s.get_mcu_position() == mcu_pos:
raise homing.EndstopError("BLTouch failed to deploy")
- def home_start(self, print_time, sample_time, sample_count, rest_time,
- notify=None):
+ def home_start(self, print_time, sample_time, sample_count, rest_time):
rest_time = min(rest_time, ENDSTOP_REST_TIME)
- self.mcu_endstop.home_start(print_time, sample_time, sample_count,
- rest_time, notify=notify)
+ return self.mcu_endstop.home_start(print_time, sample_time,
+ sample_count, rest_time)
def get_position_endstop(self):
return self.position_endstop
cmd_BLTOUCH_DEBUG_help = "Send a command to the bltouch for debugging"