mirror of https://github.com/Desuuuu/klipper.git
probe: Use config.getlists() for points config option
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
673ecec6a2
commit
d3484efe73
|
@ -360,14 +360,8 @@ class ProbePointsHelper:
|
||||||
self.gcode = self.printer.lookup_object('gcode')
|
self.gcode = self.printer.lookup_object('gcode')
|
||||||
# Read config settings
|
# Read config settings
|
||||||
if default_points is None or config.get('points', None) is not None:
|
if default_points is None or config.get('points', None) is not None:
|
||||||
points = config.get('points').split('\n')
|
self.probe_points = config.getlists('points', seps=(',', '\n'),
|
||||||
try:
|
parser=float, count=2)
|
||||||
points = [line.split(',', 1) for line in points if line.strip()]
|
|
||||||
self.probe_points = [(float(p[0].strip()), float(p[1].strip()))
|
|
||||||
for p in points]
|
|
||||||
except:
|
|
||||||
raise config.error("Unable to parse probe points in %s" % (
|
|
||||||
self.name))
|
|
||||||
self.horizontal_move_z = config.getfloat('horizontal_move_z', 5.)
|
self.horizontal_move_z = config.getfloat('horizontal_move_z', 5.)
|
||||||
self.speed = config.getfloat('speed', 50., above=0.)
|
self.speed = config.getfloat('speed', 50., above=0.)
|
||||||
self.use_offsets = False
|
self.use_offsets = False
|
||||||
|
|
Loading…
Reference in New Issue