Library for use on MS5803 devices
Dependents: MS5803-Demo mbed_PI_Depth robfish_pressuresensors_encoderQEI sensor_library_test ... more
Diff: MS5803.cpp
- Revision:
- 4:ff505486c804
- Parent:
- 3:77cf75d8a6ce
--- a/MS5803.cpp Wed Aug 06 17:27:29 2014 +0000 +++ b/MS5803.cpp Sun Mar 20 03:05:18 2016 +0000 @@ -118,8 +118,10 @@ /* calculation according MS5803-01BA data sheet DA5803-01BA_006 */ dT = D2 - (C[5]* 256); - OFF = (int64_t)C[2] * (1<<16) + ((int64_t)dT * (int64_t)C[4]) / (1<<7); - SENS = (int64_t)C[1] * (1<<15) + ((int64_t)dT * (int64_t)C[3]) / (1<<8); + OFF = (int64_t)C[2] * (1<<18) + ((int64_t)dT * (int64_t)C[4]) / (1<<5); + SENS = (int64_t)C[1] * (1<<17) + ((int64_t)dT * (int64_t)C[3]) / (1<<6); + //OFF = (int64_t)C[2] * (1<<16) + ((int64_t)dT * (int64_t)C[4]) / (1<<7); + //SENS = (int64_t)C[1] * (1<<15) + ((int64_t)dT * (int64_t)C[3]) / (1<<8); temp = 2000 + (dT * C[6]) / (1<<23); T_MS5803 = (float) temp / 100.0f; // result of temperature in deg C in this var