From 11f04ba1bae774d32fd43bed4a0772c58d8df199 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Mon, 17 Jun 2024 13:49:05 -0400 Subject: configfile: Allow getchoice() to take a list If a list is passed to getchoice(), seamlessly convert it to a dict. Signed-off-by: Kevin O'Connor --- klippy/extras/bltouch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'klippy/extras/bltouch.py') diff --git a/klippy/extras/bltouch.py b/klippy/extras/bltouch.py index 58f66819..ae461f4b 100644 --- a/klippy/extras/bltouch.py +++ b/klippy/extras/bltouch.py @@ -42,7 +42,7 @@ class BLTouchProbe: # Create an "endstop" object to handle the sensor pin self.mcu_endstop = ppins.setup_pin('endstop', config.get('sensor_pin')) # output mode - omodes = {'5V': '5V', 'OD': 'OD', None: None} + omodes = ['5V', 'OD', None] self.output_mode = config.getchoice('set_output_mode', omodes, None) # Setup for sensor test self.next_test_time = 0. -- cgit v1.2.3-70-g09d2