quad_gantry_level: Use config.getlists() for gantry_corners config option
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
8a556f2581
commit
2461b30a6a
|
@ -35,15 +35,8 @@ class QuadGantryLevel:
|
|||
"Need exactly 4 probe points for quad_gantry_level")
|
||||
self.z_status = z_tilt.ZAdjustStatus(self.printer)
|
||||
self.z_helper = z_tilt.ZAdjustHelper(config, 4)
|
||||
gantry_corners = config.get('gantry_corners').split('\n')
|
||||
try:
|
||||
gantry_corners = [line.split(',', 1)
|
||||
for line in gantry_corners if line.strip()]
|
||||
self.gantry_corners = [(float(zp[0].strip()), float(zp[1].strip()))
|
||||
for zp in gantry_corners]
|
||||
except:
|
||||
raise config.error("Unable to parse gantry_corners in %s" % (
|
||||
config.get_name()))
|
||||
self.gantry_corners = config.getlists('gantry_corners', parser=float,
|
||||
seps=(',', '\n'), count=2)
|
||||
if len(self.gantry_corners) < 2:
|
||||
raise config.error(
|
||||
"quad_gantry_level requires at least two gantry_corners")
|
||||
|
|
Loading…
Reference in New Issue