delta_calibrate: Use config.getfloatlist() for parsing "stable positions"

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2021-08-19 14:54:10 -04:00
parent 99b0cacf3b
commit ab023bb61d
1 changed files with 1 additions and 8 deletions

View File

@ -14,14 +14,7 @@ from . import probe
# Load a stable position from a config entry
def load_config_stable(config, option):
spos = config.get(option)
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
return config.getfloatlist(option, count=3)
######################################################################