Skip to content

Commit 340be41

Browse files
committed
Fix formatting and deprecation messages #2
Fixed old notation of bool variables, version string of the library, and CHANGELOG extension, this time without excessive changes
1 parent 5884be7 commit 340be41

File tree

3 files changed

+19
-28
lines changed

3 files changed

+19
-28
lines changed

CHANGELOG

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,8 @@ Arduino_LSM9DS1 1.0.0 - 2019.07.31
77
Arduino_LSM9DS1 1.1.0 - 2020.02.11
88

99
* Added support for FIFO continuous reading of values
10+
11+
Arduino_LSM9DS1 2.0.0 - 2020.05.15
12+
13+
* Offset, Full scale, sample rate on all DOF.
14+
* Calibration parameters integrated

CHANGELOG.txt

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/LSM9DS1.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
version 2.0.0
2222
*/
2323

24-
#ifndef LSM9DS1_V2.0
25-
#define LSM9DS1_V2.0
24+
#ifndef LSM9DS1_V2
25+
#define LSM9DS1_V2
2626
#endif
2727

2828
#define accelerationSampleRate getAccelODR
@@ -74,12 +74,12 @@ class LSM9DS1Class {
7474

7575
// Accelerometer
7676
float accelOffset[3] = {0,0,0}; // zero point offset correction factor for calibration
77-
float accelSlope[3] = {1,1,1}; // slope correction factor for calibration
78-
float accelUnit = GRAVITY; // GRAVITY OR METERPERSECOND2
77+
float accelSlope[3] = {1,1,1}; // slope correction factor for calibration
78+
float accelUnit = GRAVITY; // GRAVITY OR METERPERSECOND2
7979
virtual int readAccel(float& x, float& y, float& z); // Results are in G (earth gravity) or m/s2.
8080
virtual int accelAvailable(); // Number of samples in the FIFO.
81-
virtual void setAccelOffset(float x, float y, float z); //Look out, from measurements only
82-
virtual void setAccelSlope(float x, float y, float z);
81+
virtual void setAccelOffset(float x, float y, float z); //Look out, from measurements only
82+
virtual void setAccelSlope(float x, float y, float z);
8383
virtual int setAccelODR(int8_t range); // Sample Rate 0:off, 1:10Hz, 2:50Hz, 3:119Hz, 4:238Hz, 5:476Hz, 6:952Hz, 7:NA Automatic setting of BW
8484
virtual float getAccelODR(); // Sample Rate of the sensor.
8585
virtual float setAccelBW(int8_t range); //0,1,2,3 Override autoBandwidth setting see doc.table 67
@@ -88,13 +88,13 @@ class LSM9DS1Class {
8888
virtual float getAccelFS(); // Full Scale setting (output = 2.0, 16.0 , 4.0 , 8.0)
8989

9090
// Gyroscope
91-
float gyroOffset[3] = {0,0,0}; // zero point offset correction factor for calibration
92-
float gyroSlope[3] = {1,1,1}; // slope correction factor for calibration
91+
float gyroOffset[3] = {0,0,0}; // zero point offset correction factor for calibration
92+
float gyroSlope[3] = {1,1,1}; // slope correction factor for calibration
9393
float gyroUnit = DEGREEPERSECOND; // DEGREEPERSECOND or RADIANSPERSECOND
9494
virtual int readGyro(float& x, float& y, float& z); // Results are in degrees/second or rad/s.
9595
virtual int gyroAvailable(); // Number of samples in the FIFO.
96-
virtual void setGyroOffset(float x, float y, float z); //Look out, from measurements only
97-
virtual void setGyroSlope(float x, float y, float z);
96+
virtual void setGyroOffset(float x, float y, float z); //Look out, from measurements only
97+
virtual void setGyroSlope(float x, float y, float z);
9898
virtual int setGyroODR(int8_t range); //Sampling Rate 0:off, 1:10Hz, 2:50Hz, 3:119Hz, 4:238Hz, 5:476Hz, 6:952Hz, 7:NA
9999
virtual float getGyroODR(); // Sampling rate of the sensor.
100100
virtual int setGyroBW(int8_t range); //Bandwidth setting 0,1,2,3 see documentation table 46 and 47
@@ -103,13 +103,13 @@ class LSM9DS1Class {
103103
virtual float getGyroFS(); // (output = 245.0, 500.0 , 1000.0, 2000.0)
104104

105105
// Magnetometer
106-
float magnetOffset[3] = {0,0,0}; // zero point offset correction factor for calibration
107-
float magnetSlope[3] = {1,1,1}; // slope correction factor for calibration
106+
float magnetOffset[3] = {0,0,0}; // zero point offset correction factor for calibration
107+
float magnetSlope[3] = {1,1,1}; // slope correction factor for calibration
108108
float magnetUnit = MICROTESLA; // GAUSS or MICROTESLA
109109
virtual int readMagnet(float& x, float& y, float& z); // Default results are in uT (micro Tesla)
110110
virtual int magnetAvailable(); // Number of samples in the FIFO.
111-
virtual void setMagnetOffset(float x, float y, float z); //Look out, from measurements only
112-
virtual void setMagnetSlope(float x, float y, float z);
111+
virtual void setMagnetOffset(float x, float y, float z); //Look out, from measurements only
112+
virtual void setMagnetSlope(float x, float y, float z);
113113
virtual int setMagnetODR(int8_t range); // Sampling rate (0..7) corresponds to {0.625,1.25,2.5,5.0,10.0,20.0,40.0,80.0}Hz
114114
virtual float getMagnetODR(); // Sampling rate of the sensor in Hz.
115115
virtual int setMagnetFS(int8_t range); // 0=400.0; 1=800.0; 2=1200.0 , 3=1600.0 (µT)

0 commit comments

Comments
 (0)