Skip to content

Commit

Permalink
Merge pull request #1 from unbiot/master
Browse files Browse the repository at this point in the history
Fix bug in acceleration sensor measurement
  • Loading branch information
searobin committed Dec 13, 2015
2 parents 1a354cd + f0a87d3 commit 4466c21
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions examples/sme9Axis/Accelerometer/Accelerometer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

// the setup function runs once when you press reset or power the board
void setup() {
Wire.begin();
smeAccelerometer.begin();
SerialUSB.begin(115200);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

// the setup function runs once when you press reset or power the board
void setup() {
Wire.begin();
smeGyroscope.begin();
SerialUSB.begin(115200);
}
Expand Down
1 change: 1 addition & 0 deletions examples/sme9Axis/Magnetic/Magnetic.ino
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

// the setup function runs once when you press reset or power the board
void setup() {
Wire.begin();
smeMagnetic.begin();
SerialUSB.begin(115200);
}
Expand Down
4 changes: 2 additions & 2 deletions src/accelerometer/LSM9DS1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ int
LSM9DS1_A::readZ()
{
int data = 0;
if (readInternal(AG_ACC_Z_H, AG_ACC_Y_L, &data)) {
if (readInternal(AG_ACC_Z_H, AG_ACC_Z_L, &data)) {
_z = data;
}
// Decode Accel z-axis [mdps measurement unit]
Expand Down Expand Up @@ -295,7 +295,7 @@ LSM9DS1_M::activate(void)
return true;
}

bool
bool
LSM9DS1_M::deactivate(void)
{
uint8_t data;
Expand Down

0 comments on commit 4466c21

Please sign in to comment.