forked copy of the library

Fork of LSM9DS1 by Eugene Gonzalez

Files at this revision

API Documentation at this revision

Comitter:
eugene393393
Date:
Sat Apr 14 05:24:11 2018 +0000
Parent:
1:0e76f237c23d
Commit message:
Made several variables global for extension of functionality

Changed in this revision

LSM9DS1.h Show annotated file Show diff for this revision Revisions of this file
--- a/LSM9DS1.h	Mon Oct 19 13:56:52 2015 +0000
+++ b/LSM9DS1.h	Sat Apr 14 05:24:11 2018 +0000
@@ -315,6 +315,16 @@
     */
     void setMagODR(mag_odr mRate);
 
+    // I2C bus - moved outside of scope for ease of use
+    I2C i2c;
+    
+        /**  gRes, aRes, and mRes store the current resolution for each sensor. 
+    *  Units of these values would be DPS (or g's or Gs's) per ADC tick.
+    *  This value is calculated as (sensor scale) / (2^15).
+    */
+    
+    //moved outside of scope for ease of use
+    float gRes, aRes, mRes;
 
 private:    
     /**  xgAddress and mAddress store the I2C address
@@ -322,8 +332,7 @@
     */
     uint8_t xgAddress, mAddress;
     
-    // I2C bus
-    I2C i2c;
+
 
     /**  gScale, aScale, and mScale store the current scale range for each 
     *  sensor. Should be updated whenever that value changes.
@@ -332,11 +341,7 @@
     accel_scale aScale;
     mag_scale mScale;
     
-    /**  gRes, aRes, and mRes store the current resolution for each sensor. 
-    *  Units of these values would be DPS (or g's or Gs's) per ADC tick.
-    *  This value is calculated as (sensor scale) / (2^15).
-    */
-    float gRes, aRes, mRes;
+
     
     /**  initGyro() -- Sets up the gyroscope to begin reading.
     *  This function steps through all three gyroscope control registers.