bltouch: Add a pin_up_touch_mode_reports_triggered config option

Rework the undocumented test_sensor_pin config option into a
pin_up_touch_mode_reports_triggered option and document it.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2019-01-04 20:41:56 -05:00
parent 56141c21d7
commit 8a97bc592b
2 changed files with 9 additions and 2 deletions

View File

@ -63,6 +63,11 @@
# triggered" state after a successful "pin_up" command. This should
# be True for a genuine BLTouch; some BLTouch clones may require
# False. The default is True.
#pin_up_touch_mode_reports_triggered: True
# Set if the BLTouch consistently reports a "triggered" state after
# the commands "pin_up" followed by "touch_mode". This should be
# True for a genuine BLTouch; some BLTouch clones may require
# False. The default is True.
#x_offset:
#y_offset:
#z_offset:

View File

@ -42,7 +42,8 @@ class BLTouchEndstopWrapper:
self.next_test_time = 0.
self.pin_up_not_triggered = config.getboolean(
'pin_up_reports_not_triggered', True)
self.test_sensor_pin = config.getboolean('test_sensor_pin', True)
self.pin_up_touch_triggered = config.getboolean(
'pin_up_touch_mode_reports_triggered', True)
self.start_mcu_pos = []
# Calculate pin move time
pmt = max(config.getfloat('pin_move_time', 0.200), MIN_CMD_TIME)
@ -105,7 +106,8 @@ class BLTouchEndstopWrapper:
self.verify_state(check_start_time, check_end_time,
False, "raise probe")
def test_sensor(self):
if not self.test_sensor_pin:
if not self.pin_up_touch_triggered:
# Nothing to test
return
toolhead = self.printer.lookup_object('toolhead')
print_time = toolhead.get_last_move_time()