|
|
|
@ -791,7 +791,7 @@ void loop()
@@ -791,7 +791,7 @@ void loop()
|
|
|
|
|
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); |
|
|
|
|
|
|
|
|
|
// Now we'll calculate the gyro value into actual dps's
|
|
|
|
@ -800,8 +800,7 @@ void loop()
@@ -800,8 +800,7 @@ void loop()
|
|
|
|
|
gz = (float)gyroCount[2]*0.153;
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(readByte(EM7180_ADDRESS, EM7180_EventStatus) & 0x08) { // new mag data available
|
|
|
|
|
readSENtralMagData(magCount); |
|
|
|
|
if(eventStatus |
|
|
|
|
|
|
|
|
|
// Now we'll calculate the mag value into actual G's
|
|
|
|
|
mx = (float)magCount[0]*0.305176; // get actual G value
|
|
|
|
@ -809,12 +808,12 @@ void loop()
@@ -809,12 +808,12 @@ void loop()
|
|
|
|
|
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);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// get MS5637 pressure
|
|
|
|
|
if(readByte(EM7180_ADDRESS, EM7180_EventStatus) & 0x40) { // new baro data available
|
|
|
|
|
if(eventStatus & 0x40) { // new baro data available
|
|
|
|
|
// Serial.println("new Baro data!");
|
|
|
|
|
rawPressure = readSENtralBaroData(); |
|
|
|
|
pressure = (float)rawPressure*0.01f +1013.25f; // pressure in mBar
|
|
|
|
|