Browse Source

Update EM7180_LSM9DS0_MS5637_t3.ino

Fixed status polling
master
Kris Winer 9 years ago
parent
commit
7e5e25e5cf
  1. 6
      EM7180_LSM9DS0_MS5637_t3.ino

6
EM7180_LSM9DS0_MS5637_t3.ino

@ -655,7 +655,7 @@ void loop()
az = (float)accelCount[2]*0.000488; az = (float)accelCount[2]*0.000488;
} }
if(readByte(EM7180_ADDRESS, EM7180_EventStatus) & 0x20) { // new gyro data available if(eventStatus & 0x20) { // new gyro data available
readSENtralGyroData(gyroCount); readSENtralGyroData(gyroCount);
// Now we'll calculate the gyro value into actual dps's // Now we'll calculate the gyro value into actual dps's
@ -664,7 +664,7 @@ void loop()
gz = (float)gyroCount[2]*0.153; gz = (float)gyroCount[2]*0.153;
} }
if(readByte(EM7180_ADDRESS, EM7180_EventStatus) & 0x08) { // new mag data available if(eventStatus & 0x08) { // new mag data available
readSENtralMagData(magCount); readSENtralMagData(magCount);
// Now we'll calculate the mag value into actual G's // Now we'll calculate the mag value into actual G's
@ -673,7 +673,7 @@ void loop()
mz = (float)magCount[2]*0.305176; mz = (float)magCount[2]*0.305176;
} }
if(readByte(EM7180_ADDRESS, EM7180_EventStatus) & 0x04) { // new quaternion data available if(eventStatus & 0x04) { // new quaternion data available
readSENtralQuatData(Quat); readSENtralQuatData(Quat);
} }
} }

Loading…
Cancel
Save