diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2024-06-17 13:49:05 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2024-06-17 13:49:05 -0400 |
commit | 11f04ba1bae774d32fd43bed4a0772c58d8df199 (patch) | |
tree | 7eec3a3fca5012f33602a9f0e434cd85ad1cb96b /klippy/extras/display/menu_keys.py | |
parent | 863a463cb2d07fce2ae09e2b0f925bdf201051dc (diff) | |
download | kutter-11f04ba1bae774d32fd43bed4a0772c58d8df199.tar.gz kutter-11f04ba1bae774d32fd43bed4a0772c58d8df199.tar.xz kutter-11f04ba1bae774d32fd43bed4a0772c58d8df199.zip |
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 <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/display/menu_keys.py')
-rw-r--r-- | klippy/extras/display/menu_keys.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/klippy/extras/display/menu_keys.py b/klippy/extras/display/menu_keys.py index 91a96e19..8094c996 100644 --- a/klippy/extras/display/menu_keys.py +++ b/klippy/extras/display/menu_keys.py @@ -18,7 +18,7 @@ class MenuKeys: # Register rotary encoder encoder_pins = config.get('encoder_pins', None) encoder_steps_per_detent = config.getchoice('encoder_steps_per_detent', - {2: 2, 4: 4}, 4) + [2, 4], 4) if encoder_pins is not None: try: pin1, pin2 = encoder_pins.split(',') |