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>
This commit is contained in:
@@ -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"
|
||||
|
Reference in New Issue
Block a user