delta_calibrate: Use config.getfloatlist() for parsing "stable positions"
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
99b0cacf3b
commit
ab023bb61d
|
@ -14,14 +14,7 @@ from . import probe
|
||||||
|
|
||||||
# Load a stable position from a config entry
|
# Load a stable position from a config entry
|
||||||
def load_config_stable(config, option):
|
def load_config_stable(config, option):
|
||||||
spos = config.get(option)
|
return config.getfloatlist(option, count=3)
|
||||||
try:
|
|
||||||
sa, sb, sc = map(float, spos.split(','))
|
|
||||||
except:
|
|
||||||
msg = "Unable to parse stable position '%s'" % (spos,)
|
|
||||||
logging.exception(msg)
|
|
||||||
raise config.error(msg)
|
|
||||||
return sa, sb, sc
|
|
||||||
|
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
Loading…
Reference in New Issue