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:
parent
6ea36de9f2
commit
955d940b60
|
@ -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.
|
||||||
|
|
Loading…
Reference in New Issue