safe_z_home: Use config.getfloatlist() for home_xy_position config option
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
d82dc1e844
commit
d0e4b03739
|
@ -7,13 +7,8 @@
|
||||||
class SafeZHoming:
|
class SafeZHoming:
|
||||||
def __init__(self, config):
|
def __init__(self, config):
|
||||||
self.printer = config.get_printer()
|
self.printer = config.get_printer()
|
||||||
try:
|
x_pos, y_pos = config.getfloatlist("home_xy_position", count=2)
|
||||||
x_pos, y_pos = config.get("home_xy_position").split(',')
|
self.home_x_pos, self.home_y_pos = x_pos, y_pos
|
||||||
self.home_x_pos, self.home_y_pos = float(x_pos), float(y_pos)
|
|
||||||
except:
|
|
||||||
raise config.error("Unable to parse home_xy_position in %s"
|
|
||||||
% (config.get_name(),))
|
|
||||||
|
|
||||||
self.z_hop = config.getfloat("z_hop", default=0.0)
|
self.z_hop = config.getfloat("z_hop", default=0.0)
|
||||||
self.z_hop_speed = config.getfloat('z_hop_speed', 15., above=0.)
|
self.z_hop_speed = config.getfloat('z_hop_speed', 15., above=0.)
|
||||||
zconfig = config.getsection('stepper_z')
|
zconfig = config.getsection('stepper_z')
|
||||||
|
|
Loading…
Reference in New Issue