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/bed_mesh.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/bed_mesh.py')
-rw-r--r-- | klippy/extras/bed_mesh.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/klippy/extras/bed_mesh.py b/klippy/extras/bed_mesh.py index 19039353..6ac3d098 100644 --- a/klippy/extras/bed_mesh.py +++ b/klippy/extras/bed_mesh.py @@ -136,7 +136,8 @@ class BedMeshCalibrate: self.probe_params = {} points = self._generate_points(config) self._init_probe_params(config, points) - self.probe_helper = probe.ProbePointsHelper(config, self, points) + self.probe_helper = probe.ProbePointsHelper( + config, self.probe_finalize, points) self.z_endstop_pos = None if config.has_section('stepper_z'): zconfig = config.getsection('stepper_z') @@ -212,9 +213,6 @@ class BedMeshCalibrate: self.bedmesh.set_mesh(None) self.gcode.run_script_from_command("G28") self.probe_helper.start_probe() - def get_probed_position(self): - kin = self.printer.lookup_object('toolhead').get_kinematics() - return kin.calc_position() def print_probed_positions(self, print_func): if self.probed_z_table is not None: msg = "Mesh Leveling Probed Z positions:\n" @@ -225,7 +223,7 @@ class BedMeshCalibrate: print_func(msg) else: print_func("bed_mesh: bed has not been probed") - def finalize(self, offsets, positions): + def probe_finalize(self, offsets, positions): self.probe_params['x_offset'] = offsets[0] self.probe_params['y_offset'] = offsets[1] z_offset = offsets[2] |