Blue Robotics Bar02 Pressure Sensor sample MS5837-02BA Pressure Sensor

Dependents:   Bar02_MS5837-02BA OCE360_Project

Fork of MS5837 by Andrew Olguin

Files at this revision

API Documentation at this revision

Comitter:
yuuitirou528
Date:
Tue Jul 17 16:35:51 2018 +0000
Parent:
1:ee71a13b8e68
Commit message:
Pressure Correction

Changed in this revision

MS5837.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/MS5837.cpp	Tue Jul 17 16:11:48 2018 +0000
+++ b/MS5837.cpp	Tue Jul 17 16:35:51 2018 +0000
@@ -114,10 +114,10 @@
     SENS2 = SENS-SENSi;
     
     temp = (temp-Ti);
-    press = (((D1*SENS2)/2097152l-OFF2)/32768l)/100;
+    press = (((D1*SENS2)/2097152l-OFF2)/32768l);
     
     T_MS5837 = (float) temp / 100.0f;                 // result of temperature in deg C in this var
-    P_MS5837 = (float) press / 1.00f;                 // result of pressure in mBar in this var
+    P_MS5837 = (float) press / 100.0f;                 // result of pressure in mBar in this var
     
 }