diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2018-09-26 10:32:57 -0400 |
---|---|---|
committer | KevinOConnor <kevin@koconnor.net> | 2018-10-01 11:12:30 -0400 |
commit | 8e7eac9b08a6ae3ecf94919faca02a9df5e10551 (patch) | |
tree | 412702a216b7ffc74642e7c52deb967b28864905 /klippy/extras/delta_calibrate.py | |
parent | ae4eb35a707fe588b77806bc77a2515b1d1a2d01 (diff) | |
download | kutter-8e7eac9b08a6ae3ecf94919faca02a9df5e10551.tar.gz kutter-8e7eac9b08a6ae3ecf94919faca02a9df5e10551.tar.xz kutter-8e7eac9b08a6ae3ecf94919faca02a9df5e10551.zip |
probe: Implement ProbePointsHelper get_probed_position() locally
Now that all users of ProbePointsHelper use the same
get_probed_position() code, it is possible to implement that locally
within the ProbePointsHelper class.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/delta_calibrate.py')
-rw-r--r-- | klippy/extras/delta_calibrate.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/klippy/extras/delta_calibrate.py b/klippy/extras/delta_calibrate.py index d079eac5..c97f15ab 100644 --- a/klippy/extras/delta_calibrate.py +++ b/klippy/extras/delta_calibrate.py @@ -142,7 +142,7 @@ class DeltaCalibrate: dist = radius * scatter[i] points.append((math.cos(r) * dist, math.sin(r) * dist)) self.probe_helper = probe.ProbePointsHelper( - config, self, default_points=points) + config, self.probe_finalize, default_points=points) # Restore probe stable positions self.last_probe_positions = [] for i in range(999): @@ -192,10 +192,7 @@ class DeltaCalibrate: "%.3f,%.3f,%.3f" % tuple(spos1)) configfile.set(section, "distance%d_pos2" % (i,), "%.3f,%.3f,%.3f" % tuple(spos2)) - def get_probed_position(self): - kin = self.printer.lookup_object('toolhead').get_kinematics() - return kin.calc_position() - def finalize(self, offsets, positions): + def probe_finalize(self, offsets, positions): # Convert positions into (z_offset, stable_position) pairs z_offset = offsets[2] kin = self.printer.lookup_object('toolhead').get_kinematics() |