kinematics: Convert get_rails() method to get_steppers()

All callers of get_rails() actually just want the steppers, so return
them directly.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2018-07-16 10:16:16 -04:00
parent 89835940f7
commit ca505bf4ac
6 changed files with 14 additions and 21 deletions

View File

@@ -44,9 +44,8 @@ class PrinterProbe:
'QUERY_PROBE', self.cmd_QUERY_PROBE, desc=self.cmd_QUERY_PROBE_help)
def build_config(self):
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)
for stepper in kin.get_steppers('Z'):
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'):