stepper: Replace PrinterHomingStepper with PrinterRail
Update the code to use the term "rail" when dealing with a motor controlled "axis". A rail has a series of steppers and endstops that control that motor controlled "axis". Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -44,9 +44,9 @@ class PrinterProbe:
|
||||
'QUERY_PROBE', self.cmd_QUERY_PROBE, desc=self.cmd_QUERY_PROBE_help)
|
||||
def build_config(self):
|
||||
toolhead = self.printer.lookup_object('toolhead')
|
||||
z_steppers = toolhead.get_kinematics().get_steppers("Z")
|
||||
for s in z_steppers:
|
||||
for mcu_endstop, name in s.get_endstops():
|
||||
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)
|
||||
def setup_pin(self, pin_params):
|
||||
|
||||
@@ -32,8 +32,7 @@ class ZTilt:
|
||||
def handle_connect(self):
|
||||
kin = self.printer.lookup_object('toolhead').get_kinematics()
|
||||
try:
|
||||
z_stepper = kin.get_steppers('Z')[0]
|
||||
z_steppers = [z_stepper] + z_stepper.extras
|
||||
z_steppers = kin.get_rails('Z')[0].get_steppers()
|
||||
except:
|
||||
logging.exception("z_tilt stepper lookup")
|
||||
raise self.printer.config_error(
|
||||
|
||||
Reference in New Issue
Block a user