High resolution barometer and altimeter using i2c mode

Dependents:   upverter_fitbit_clone ReadingMag_HMC5883L_work

Revision:
12:e9a90b8c8688
Parent:
11:e0417b67a4b5
--- a/ms5611.cpp	Thu Dec 03 19:47:10 2015 +0000
+++ b/ms5611.cpp	Fri Nov 11 18:13:36 2016 +0000
@@ -21,7 +21,7 @@
 double A;                       // altitude (ft)
 double S;                       // sea level barometer (mB)
 
-uint32_t C[8];                  //coefficient storage
+//uint32_t C[8];                  //coefficient storage
 
 //--------------------------------------------------------------------------------------------------------------------------------------//
 // Constructor and destructor - default to be compatible with legacy m5611 driver
@@ -278,12 +278,16 @@
 //!
 //! @return none
 //********************************************************
+extern RawSerial pc;
 
 void ms5611::loadCoefs() {
+    pc.printf("\r\n   - Coefs: ");
     for (int i = 0; i < 8; i++){ 
         wait_ms(50);
         C[i] = cmd_prom(i);
+        pc.printf("%04x ", C[i]);
     }
+    pc.printf("\r\n");
     uint8_t n_crc = crc4(C);
 }
 
@@ -389,3 +393,4 @@
     S = pow(pow((P * INHG), 0.190284) + 0.00001313 * known_alt * FTMETERS , 5.2553026) * MB;
     return((float)S);
 } 
+