mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-08-06 21:44:13 -06:00
homing: Make homing.py an "extras" module
Move klippy/homing.py to klippy/extras/homing.py and convert the code to an "extras" modules. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
ea85d419de
commit
8260a3a0c3
7 changed files with 45 additions and 29 deletions
|
@ -1,10 +1,10 @@
|
|||
# Z-Probe support
|
||||
#
|
||||
# Copyright (C) 2017-2020 Kevin O'Connor <kevin@koconnor.net>
|
||||
# Copyright (C) 2017-2021 Kevin O'Connor <kevin@koconnor.net>
|
||||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
import logging
|
||||
import pins, homing
|
||||
import pins
|
||||
from . import manual_probe
|
||||
|
||||
HINT_TIMEOUT = """
|
||||
|
@ -75,11 +75,11 @@ class PrinterProbe:
|
|||
def _handle_homing_move_end(self, endstops):
|
||||
if self.mcu_probe in endstops:
|
||||
self.mcu_probe.probe_finish()
|
||||
def _handle_home_rails_begin(self, rails):
|
||||
def _handle_home_rails_begin(self, homing_state, rails):
|
||||
endstops = [es for rail in rails for es, name in rail.get_endstops()]
|
||||
if self.mcu_probe in endstops:
|
||||
self.multi_probe_begin()
|
||||
def _handle_home_rails_end(self, rails):
|
||||
def _handle_home_rails_end(self, homing_state, rails):
|
||||
endstops = [es for rail in rails for es, name in rail.get_endstops()]
|
||||
if self.mcu_probe in endstops:
|
||||
self.multi_probe_end()
|
||||
|
@ -112,7 +112,7 @@ class PrinterProbe:
|
|||
curtime = self.printer.get_reactor().monotonic()
|
||||
if 'z' not in toolhead.get_status(curtime)['homed_axes']:
|
||||
raise self.printer.command_error("Must home before probe")
|
||||
homing_state = homing.Homing(self.printer)
|
||||
homing_state = self.printer.lookup_object('homing').new_homing_state()
|
||||
pos = toolhead.get_position()
|
||||
pos[2] = self.z_position
|
||||
endstops = [(self.mcu_probe, "probe")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue