mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-24 07:04:01 -06:00
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:
parent
e3a5e2d271
commit
fbbbbc85cf
4 changed files with 26 additions and 28 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue