mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-16 03:07:56 -06:00
bltouch: Add "probe in touch mode" option
Signed-off-by: Mike Stiemke <fandjango@gmx.de>
This commit is contained in:
parent
703490da1c
commit
20a27c697f
2 changed files with 7 additions and 0 deletions
|
@ -31,6 +31,8 @@ class BLTouchEndstopWrapper:
|
|||
self.position_endstop = config.getfloat('z_offset')
|
||||
self.stow_on_each_sample = config.getboolean('stow_on_each_sample',
|
||||
True)
|
||||
self.probe_touch_mode = config.getboolean('probe_with_touch_mode',
|
||||
False)
|
||||
# Create a pwm object to handle the control pin
|
||||
ppins = self.printer.lookup_object('pins')
|
||||
self.mcu_pwm = ppins.setup_pin('pwm', config.get('control_pin'))
|
||||
|
@ -134,6 +136,8 @@ class BLTouchEndstopWrapper:
|
|||
self.test_sensor()
|
||||
self.sync_print_time()
|
||||
self.send_cmd('pin_down', duration=self.pin_move_time)
|
||||
if self.probe_touch_mode:
|
||||
self.send_cmd('touch_mode')
|
||||
def test_sensor(self):
|
||||
if not self.pin_up_touch_triggered:
|
||||
# Nothing to test
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue