diff options
Diffstat (limited to 'klippy/extras/safe_z_home.py')
-rw-r--r-- | klippy/extras/safe_z_home.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/klippy/extras/safe_z_home.py b/klippy/extras/safe_z_home.py index 32b515b9..1693487a 100644 --- a/klippy/extras/safe_z_home.py +++ b/klippy/extras/safe_z_home.py @@ -3,6 +3,7 @@ # Copyright (C) 2019 Florian Heilmann <Florian.Heilmann@gmx.net> # # This file may be distributed under the terms of the GNU GPLv3 license. +from . import manual_probe class SafeZHoming: def __init__(self, config): @@ -11,7 +12,9 @@ class SafeZHoming: self.home_x_pos, self.home_y_pos = x_pos, y_pos self.z_hop = config.getfloat("z_hop", default=0.0) self.z_hop_speed = config.getfloat('z_hop_speed', 15., above=0.) - zconfig = config.getsection('stepper_z') + zconfig = manual_probe.lookup_z_endstop_config(config) + if zconfig is None: + raise gcmd.error('Missing Z endstop config for safe_z_homing') 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) |