Rewrote calibration for linesensor