aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/bltouch.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2020-02-12 13:03:42 -0500
committerKevinOConnor <kevin@koconnor.net>2020-02-15 17:52:44 -0500
commitfeb15eaf2e5e3b64f5e847d8f66f046959304335 (patch)
tree41c6cdfec8c701bfa826c3d8422cc54c1c0e3f05 /klippy/extras/bltouch.py
parentb23346a521b4b6e671ceecd85ce04ef5a03a644b (diff)
downloadkutter-feb15eaf2e5e3b64f5e847d8f66f046959304335.tar.gz
kutter-feb15eaf2e5e3b64f5e847d8f66f046959304335.tar.xz
kutter-feb15eaf2e5e3b64f5e847d8f66f046959304335.zip
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 <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/bltouch.py')
-rw-r--r--klippy/extras/bltouch.py6
1 files changed, 2 insertions, 4 deletions
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)