homing: Pass printer instead of toolhead object to Homing class
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
e7498fa241
commit
fedf90680e
|
@ -47,7 +47,7 @@ class PrinterProbe:
|
||||||
cmd_PROBE_help = "Probe Z-height at current XY position"
|
cmd_PROBE_help = "Probe Z-height at current XY position"
|
||||||
def cmd_PROBE(self, params):
|
def cmd_PROBE(self, params):
|
||||||
toolhead = self.printer.lookup_object('toolhead')
|
toolhead = self.printer.lookup_object('toolhead')
|
||||||
homing_state = homing.Homing(toolhead)
|
homing_state = homing.Homing(self.printer)
|
||||||
pos = toolhead.get_position()
|
pos = toolhead.get_position()
|
||||||
pos[2] = self.z_position
|
pos[2] = self.z_position
|
||||||
endstops = [(self.mcu_probe, "probe")]
|
endstops = [(self.mcu_probe, "probe")]
|
||||||
|
|
|
@ -513,7 +513,7 @@ class GCodeParser:
|
||||||
axes.append(self.axis2pos[axis])
|
axes.append(self.axis2pos[axis])
|
||||||
if not axes:
|
if not axes:
|
||||||
axes = [0, 1, 2]
|
axes = [0, 1, 2]
|
||||||
homing_state = homing.Homing(self.toolhead)
|
homing_state = homing.Homing(self.printer)
|
||||||
if self.is_fileinput:
|
if self.is_fileinput:
|
||||||
homing_state.set_no_verify_retract()
|
homing_state.set_no_verify_retract()
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -10,8 +10,9 @@ ENDSTOP_SAMPLE_TIME = .000015
|
||||||
ENDSTOP_SAMPLE_COUNT = 4
|
ENDSTOP_SAMPLE_COUNT = 4
|
||||||
|
|
||||||
class Homing:
|
class Homing:
|
||||||
def __init__(self, toolhead):
|
def __init__(self, printer):
|
||||||
self.toolhead = toolhead
|
self.printer = printer
|
||||||
|
self.toolhead = printer.lookup_object('toolhead')
|
||||||
self.changed_axes = []
|
self.changed_axes = []
|
||||||
self.verify_retract = True
|
self.verify_retract = True
|
||||||
def set_no_verify_retract(self):
|
def set_no_verify_retract(self):
|
||||||
|
|
Loading…
Reference in New Issue