diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2020-01-13 21:39:55 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2020-01-23 20:47:01 -0500 |
commit | 8ed0f7c5c37a3e2a3c38d19b19bbd6846453a6df (patch) | |
tree | 9363b4e1da37f5cbaf1f6b3a9a966c6c8a2de369 /klippy/extras | |
parent | d1972b1e9ccc1331d2a2e5d3af108abf8a2858e2 (diff) | |
download | kutter-8ed0f7c5c37a3e2a3c38d19b19bbd6846453a6df.tar.gz kutter-8ed0f7c5c37a3e2a3c38d19b19bbd6846453a6df.tar.xz kutter-8ed0f7c5c37a3e2a3c38d19b19bbd6846453a6df.zip |
kinematics: Remove support for identifying Z steppers
The caller can now determine which steppers are connected to cartesian
Z movement via the new stepper.is_active_axis() method. It is
therefore no longer necessary for the kinematic code to identify these
steppers.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras')
-rw-r--r-- | klippy/extras/bltouch.py | 5 | ||||
-rw-r--r-- | klippy/extras/probe.py | 5 | ||||
-rw-r--r-- | klippy/extras/z_tilt.py | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/klippy/extras/bltouch.py b/klippy/extras/bltouch.py index f372b1ab..c4556342 100644 --- a/klippy/extras/bltouch.py +++ b/klippy/extras/bltouch.py @@ -62,8 +62,9 @@ class BLTouchEndstopWrapper: desc=self.cmd_BLTOUCH_DEBUG_help) def _build_config(self): kin = self.printer.lookup_object('toolhead').get_kinematics() - for stepper in kin.get_steppers('Z'): - self.add_stepper(stepper) + for stepper in kin.get_steppers(): + if stepper.is_active_axis('z'): + self.add_stepper(stepper) def handle_connect(self): try: self.raise_probe() diff --git a/klippy/extras/probe.py b/klippy/extras/probe.py index b87aff62..f5c69ec7 100644 --- a/klippy/extras/probe.py +++ b/klippy/extras/probe.py @@ -241,8 +241,9 @@ class ProbeEndstopWrapper: self.TimeoutError = self.mcu_endstop.TimeoutError def _build_config(self): kin = self.printer.lookup_object('toolhead').get_kinematics() - for stepper in kin.get_steppers('Z'): - self.add_stepper(stepper) + for stepper in kin.get_steppers(): + if stepper.is_active_axis('z'): + self.add_stepper(stepper) def home_prepare(self): toolhead = self.printer.lookup_object('toolhead') start_pos = toolhead.get_position() diff --git a/klippy/extras/z_tilt.py b/klippy/extras/z_tilt.py index e6680a75..9784372e 100644 --- a/klippy/extras/z_tilt.py +++ b/klippy/extras/z_tilt.py @@ -16,7 +16,7 @@ class ZAdjustHelper: self.handle_connect) def handle_connect(self): kin = self.printer.lookup_object('toolhead').get_kinematics() - z_steppers = kin.get_steppers('Z') + z_steppers = [s for s in kin.get_steppers() if s.is_active_axis('z')] if len(z_steppers) != self.z_count: raise self.printer.config_error( "%s z_positions needs exactly %d items" % ( |