From 224574da4a623e3f37ebfe8082a546a9df697638 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Wed, 13 Nov 2019 17:59:40 -0500 Subject: 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 --- klippy/extras/manual_probe.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'klippy/extras/manual_probe.py') diff --git a/klippy/extras/manual_probe.py b/klippy/extras/manual_probe.py index 38160fef..c3fcadb9 100644 --- a/klippy/extras/manual_probe.py +++ b/klippy/extras/manual_probe.py @@ -83,7 +83,10 @@ class ManualProbeHelper: if toolhead_pos == self.last_toolhead_pos: return self.last_kinematics_pos self.toolhead.get_last_move_time() - kin_pos = self.toolhead.get_kinematics().calc_position() + kin = self.toolhead.get_kinematics() + for s in kin.get_steppers(): + s.set_tag_position(s.get_commanded_position()) + kin_pos = kin.calc_tag_position() self.last_toolhead_pos = toolhead_pos self.last_kinematics_pos = kin_pos return kin_pos -- cgit v1.2.3-70-g09d2