From feb15eaf2e5e3b64f5e847d8f66f046959304335 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Wed, 12 Feb 2020 13:03:42 -0500 Subject: homing: Merge home_prepare()/home_finalize() into move_begin/move_end events Collapse the "homing:move_begin", "homing:move_end", home_prepare(), and home_finalize() into two new events: "homing:homing_move_begin" and "homing:homing_move_end". This simplifies the homing code. Signed-off-by: Kevin O'Connor --- klippy/extras/bltouch.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'klippy/extras/bltouch.py') diff --git a/klippy/extras/bltouch.py b/klippy/extras/bltouch.py index c4556342..47714709 100644 --- a/klippy/extras/bltouch.py +++ b/klippy/extras/bltouch.py @@ -137,26 +137,24 @@ class BLTouchEndstopWrapper: # Test was successful self.next_test_time = check_end_time + TEST_TIME self.sync_print_time() - def home_prepare(self): + def probe_prepare(self): self.test_sensor() self.sync_print_time() duration = max(MIN_CMD_TIME, self.pin_move_time - MIN_CMD_TIME) self.send_cmd('pin_down', duration=duration) self.send_cmd(None) self.sync_print_time() - self.mcu_endstop.home_prepare() toolhead = self.printer.lookup_object('toolhead') toolhead.flush_step_generation() self.start_mcu_pos = [(s, s.get_mcu_position()) for s in self.mcu_endstop.get_steppers()] - def home_finalize(self): + def probe_finalize(self): self.raise_probe() self.sync_print_time() # Verify the probe actually deployed during the attempt for s, mcu_pos in self.start_mcu_pos: if s.get_mcu_position() == mcu_pos: raise homing.EndstopError("BLTouch failed to deploy") - self.mcu_endstop.home_finalize() def home_start(self, print_time, sample_time, sample_count, rest_time, notify=None): rest_time = min(rest_time, ENDSTOP_REST_TIME) -- cgit v1.2.3-70-g09d2