mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-18 04:08:04 -06:00
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>
This commit is contained in:
parent
863a463cb2
commit
11f04ba1ba
11 changed files with 12 additions and 11 deletions
|
@ -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(',')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue