bed_tilt: Negate parameters reported by bed_tilt_calibrate

The bed_tilt_calibrate command determines the tilt of the bed.
However, we need to report the tilt compensation which is the negative
of the bed tilt.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2018-02-05 14:52:38 -05:00
parent 6ea36de9f2
commit 955d940b60
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ class BedTiltCalibrate:
logging.debug("Params: %s", params) logging.debug("Params: %s", params)
def adjusted_height(pos, params): def adjusted_height(pos, params):
x, y, z = pos x, y, z = pos
return (z + x*params['x_adjust'] + y*params['y_adjust'] return (z - x*params['x_adjust'] - y*params['y_adjust']
- params['z_adjust']) - params['z_adjust'])
def errorfunc(params): def errorfunc(params):
total_error = 0. total_error = 0.