Switched to fixed point math and made calibration work