aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2024-05-25 20:46:56 -0400
committerKevin O'Connor <kevin@koconnor.net>2024-06-10 12:20:21 -0400
commitabfe3675d69f11567f7592f4b9659d2db46911a8 (patch)
tree73f8dcb96627cfee1839c3ce07d38a462e3f1e12
parente780049a74310d23d110d8beac37b980459893a4 (diff)
downloadkutter-abfe3675d69f11567f7592f4b9659d2db46911a8.tar.gz
kutter-abfe3675d69f11567f7592f4b9659d2db46911a8.tar.xz
kutter-abfe3675d69f11567f7592f4b9659d2db46911a8.zip
bltouch: Use ppins.setup_pin() helper
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r--klippy/extras/bltouch.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/klippy/extras/bltouch.py b/klippy/extras/bltouch.py
index b01cdb9e..482578c7 100644
--- a/klippy/extras/bltouch.py
+++ b/klippy/extras/bltouch.py
@@ -44,10 +44,7 @@ class BLTouchEndstopWrapper:
self.next_cmd_time = self.action_end_time = 0.
self.finish_home_complete = self.wait_trigger_complete = None
# Create an "endstop" object to handle the sensor pin
- pin = config.get('sensor_pin')
- pin_params = ppins.lookup_pin(pin, can_invert=True, can_pullup=True)
- mcu = pin_params['chip']
- self.mcu_endstop = mcu.setup_pin('endstop', pin_params)
+ self.mcu_endstop = ppins.setup_pin('endstop', config.get('sensor_pin'))
# output mode
omodes = {'5V': '5V', 'OD': 'OD', None: None}
self.output_mode = config.getchoice('set_output_mode', omodes, None)