diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2019-11-13 17:59:40 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2019-11-13 19:00:17 -0500 |
commit | 224574da4a623e3f37ebfe8082a546a9df697638 (patch) | |
tree | 81c65dca1a785d7a18708a81ad674866f58a9d22 /klippy/kinematics/winch.py | |
parent | e0e2f154986aa05666f3e0eea44a8c4074fa7cf7 (diff) | |
download | kutter-224574da4a623e3f37ebfe8082a546a9df697638.tar.gz kutter-224574da4a623e3f37ebfe8082a546a9df697638.tar.xz kutter-224574da4a623e3f37ebfe8082a546a9df697638.zip |
stepper: Add get/set_tag_position() and convert calc_position()
Rename calc_position() to calc_tag_position() and have it calculate
the value of the position from the last stepper set_tag_position()
call. This enables the calc_tag_position() code to be more flexible
as it can be run with arbitrary positions.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/kinematics/winch.py')
-rw-r--r-- | klippy/kinematics/winch.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/klippy/kinematics/winch.py b/klippy/kinematics/winch.py index 32d388ad..6792dbd7 100644 --- a/klippy/kinematics/winch.py +++ b/klippy/kinematics/winch.py @@ -31,9 +31,9 @@ class WinchKinematics: self.set_position([0., 0., 0.], ()) def get_steppers(self, flags=""): return list(self.steppers) - def calc_position(self): + def calc_tag_position(self): # Use only first three steppers to calculate cartesian position - spos = [s.get_commanded_position() for s in self.steppers[:3]] + spos = [s.get_tag_position() for s in self.steppers[:3]] return mathutil.trilateration(self.anchors[:3], [sp*sp for sp in spos]) def set_position(self, newpos, homing_axes): for s in self.steppers: |