probe: Simplify mcu_probe stepper registration
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
a31c31aed4
commit
2af73d1006
|
@ -43,12 +43,10 @@ class PrinterProbe:
|
|||
self.gcode.register_command(
|
||||
'QUERY_PROBE', self.cmd_QUERY_PROBE, desc=self.cmd_QUERY_PROBE_help)
|
||||
def build_config(self):
|
||||
toolhead = self.printer.lookup_object('toolhead')
|
||||
z_rails = toolhead.get_kinematics().get_rails("Z")
|
||||
for rail in z_rails:
|
||||
for mcu_endstop, name in rail.get_endstops():
|
||||
for mcu_stepper in mcu_endstop.get_steppers():
|
||||
self.mcu_probe.add_stepper(mcu_stepper)
|
||||
kin = self.printer.lookup_object('toolhead').get_kinematics()
|
||||
for rail in kin.get_rails("Z"):
|
||||
for stepper in rail.get_steppers():
|
||||
stepper.add_to_endstop(self.mcu_probe)
|
||||
def setup_pin(self, pin_params):
|
||||
if (pin_params['pin'] != 'z_virtual_endstop'
|
||||
or pin_params['type'] != 'endstop'):
|
||||
|
|
Loading…
Reference in New Issue