aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/delta_calibrate.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2018-03-17 14:00:37 -0400
committerKevin O'Connor <kevin@koconnor.net>2018-03-17 14:07:15 -0400
commite3f9ff6701159d8447364121587717208ec521eb (patch)
tree488208f43b08f7649202d330ee012846b6ac3a58 /klippy/extras/delta_calibrate.py
parentc95cc3fb66cdf6058497fdf0ceddf6fb6838af75 (diff)
downloadkutter-e3f9ff6701159d8447364121587717208ec521eb.tar.gz
kutter-e3f9ff6701159d8447364121587717208ec521eb.tar.xz
kutter-e3f9ff6701159d8447364121587717208ec521eb.zip
probe: Add z_offset parameter
Move the probe_z_offset parameter from delta_calibrate and bed_tilt_calibrate to a z_offset parameter within the probe config section. It's easier to understand the z offset setting when it is in the probe config section. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/delta_calibrate.py')
-rw-r--r--klippy/extras/delta_calibrate.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/klippy/extras/delta_calibrate.py b/klippy/extras/delta_calibrate.py
index 57ae8f09..ac9d13aa 100644
--- a/klippy/extras/delta_calibrate.py
+++ b/klippy/extras/delta_calibrate.py
@@ -14,7 +14,6 @@ class DeltaCalibrate:
self.radius = config.getfloat('radius', above=0.)
self.speed = config.getfloat('speed', 50., above=0.)
self.horizontal_move_z = config.getfloat('horizontal_move_z', 5.)
- self.probe_z_offset = config.getfloat('probe_z_offset', 0.)
self.manual_probe = config.getboolean('manual_probe', None)
if self.manual_probe is None:
self.manual_probe = not config.has_section('probe')
@@ -38,7 +37,7 @@ class DeltaCalibrate:
def get_position(self):
kin = self.printer.lookup_object('toolhead').get_kinematics()
return kin.get_stable_position()
- def finalize(self, positions):
+ def finalize(self, z_offset, positions):
kin = self.printer.lookup_object('toolhead').get_kinematics()
logging.info("Calculating delta_calibrate with: %s", positions)
params = kin.get_calibrate_params()
@@ -49,7 +48,7 @@ class DeltaCalibrate:
total_error = 0.
for spos in positions:
x, y, z = delta.get_position_from_stable(spos, params)
- total_error += (z - self.probe_z_offset)**2
+ total_error += (z - z_offset)**2
return total_error
new_params = mathutil.coordinate_descent(
adj_params, params, delta_errorfunc)