safe_z_home: Use configfile note_valid=False when inspecting z position_max
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
b25520795d
commit
14fd40e3f9
|
@ -8,16 +8,16 @@ class SafeZHoming:
|
|||
def __init__(self, config):
|
||||
self.printer = config.get_printer()
|
||||
try:
|
||||
x_pos, y_pos = config.get("home_xy_position",
|
||||
default=",").split(',')
|
||||
x_pos, y_pos = config.get("home_xy_position").split(',')
|
||||
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()))
|
||||
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_speed = config.getfloat('z_hop_speed', 15., above=0.)
|
||||
self.max_z = config.getsection('stepper_z').getfloat('position_max')
|
||||
zconfig = config.getsection('stepper_z')
|
||||
self.max_z = zconfig.getfloat('position_max', note_valid=False)
|
||||
self.speed = config.getfloat('speed', 50.0, above=0.)
|
||||
self.move_to_previous = config.getboolean('move_to_previous', False)
|
||||
self.printer.load_object(config, 'gcode_move')
|
||||
|
|
Loading…
Reference in New Issue