aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2021-03-29 14:29:33 -0400
committerKevin O'Connor <kevin@koconnor.net>2021-04-02 13:43:01 -0400
commitc9ae89e1425dfd2b06118c2f16af2f9d7ccd309d (patch)
tree5b0bb286303d12047f1abe82bd5cd7318b41d86a
parentcdaf9379b05a5c3d85ed737f9e63734ca230ab50 (diff)
downloadkutter-c9ae89e1425dfd2b06118c2f16af2f9d7ccd309d.tar.gz
kutter-c9ae89e1425dfd2b06118c2f16af2f9d7ccd309d.tar.xz
kutter-c9ae89e1425dfd2b06118c2f16af2f9d7ccd309d.zip
bltouch: Use hmove.check_no_movement() to verify bltouch deployed
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r--klippy/extras/bltouch.py13
1 files changed, 3 insertions, 10 deletions
diff --git a/klippy/extras/bltouch.py b/klippy/extras/bltouch.py
index 6646433d..eabb2f2c 100644
--- a/klippy/extras/bltouch.py
+++ b/klippy/extras/bltouch.py
@@ -1,6 +1,6 @@
# BLTouch support
#
-# Copyright (C) 2018-2020 Kevin O'Connor <kevin@koconnor.net>
+# Copyright (C) 2018-2021 Kevin O'Connor <kevin@koconnor.net>
#
# This file may be distributed under the terms of the GNU GPLv3 license.
import logging
@@ -55,7 +55,6 @@ class BLTouchEndstopWrapper:
'pin_up_reports_not_triggered', True)
self.pin_up_touch_triggered = config.getboolean(
'pin_up_touch_mode_reports_triggered', True)
- self.start_mcu_pos = []
# Calculate pin move time
self.pin_move_time = config.getfloat('pin_move_time', 0.680, above=0.)
# Wrappers
@@ -183,18 +182,12 @@ class BLTouchEndstopWrapper:
if self.multi == 'FIRST':
self.multi = 'ON'
self.sync_print_time()
- 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 probe_finish(self, hmove):
if self.multi == 'OFF':
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 self.printer.command_error("BLTouch failed to deploy")
+ if hmove.check_no_movement() is not None:
+ raise self.printer.command_error("BLTouch failed to deploy")
def home_start(self, print_time, sample_time, sample_count, rest_time,
triggered=True):
rest_time = min(rest_time, ENDSTOP_REST_TIME)