diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2018-07-16 10:16:16 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2018-07-16 10:16:16 -0400 |
commit | ca505bf4ac380bbc2430493ec33779777e82d3da (patch) | |
tree | 46f78c89d1d763e109006ef8629e567f109547b0 /klippy/kinematics/corexy.py | |
parent | 89835940f70ff4b9f19a77d14fdaeefa86d777db (diff) | |
download | kutter-ca505bf4ac380bbc2430493ec33779777e82d3da.tar.gz kutter-ca505bf4ac380bbc2430493ec33779777e82d3da.tar.xz kutter-ca505bf4ac380bbc2430493ec33779777e82d3da.zip |
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>
Diffstat (limited to 'klippy/kinematics/corexy.py')
-rw-r--r-- | klippy/kinematics/corexy.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/klippy/kinematics/corexy.py b/klippy/kinematics/corexy.py index 46d8def3..47bc3e92 100644 --- a/klippy/kinematics/corexy.py +++ b/klippy/kinematics/corexy.py @@ -32,10 +32,10 @@ class CoreXYKinematics: self.rails[1].set_max_jerk(max_xy_halt_velocity, max_accel) self.rails[2].set_max_jerk( min(max_halt_velocity, self.max_z_velocity), self.max_z_accel) - def get_rails(self, flags=""): + def get_steppers(self, flags=""): if flags == "Z": - return [self.rails[2]] - return list(self.rails) + return self.rails[2].get_steppers() + return [s for rail in self.rails for s in rail.get_steppers()] def calc_position(self): pos = [rail.get_commanded_position() for rail in self.rails] return [0.5 * (pos[0] + pos[1]), 0.5 * (pos[0] - pos[1]), pos[2]] |