mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-23 22:54:10 -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
|
@ -252,7 +252,7 @@ class ProbeSessionHelper:
|
|||
self.sample_count = config.getint('samples', 1, minval=1)
|
||||
self.sample_retract_dist = config.getfloat('sample_retract_dist', 2.,
|
||||
above=0.)
|
||||
atypes = {'median': 'median', 'average': 'average'}
|
||||
atypes = ['median', 'average']
|
||||
self.samples_result = config.getchoice('samples_result', atypes,
|
||||
'average')
|
||||
self.samples_tolerance = config.getfloat('samples_tolerance', 0.100,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue