From fbbbbc85cf6b717a48c9c62cd39a219af0223655 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Wed, 19 Feb 2020 11:38:11 -0500 Subject: 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 --- klippy/extras/bltouch.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'klippy/extras/bltouch.py') 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" -- cgit v1.2.3-70-g09d2