generic_cartesian: Fixed safe_z_home and manual_probe for new kinematics

Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Dmitry Butyugin
2025-05-10 20:25:46 +02:00
committed by Kevin O'Connor
parent 8627c94d6a
commit ca83c13f37
3 changed files with 31 additions and 16 deletions

View File

@@ -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)