Library version of MPU9250AHRS code.
Fork of MPU9250AHRS by
Diff: MPU9250.h
- Revision:
- 5:ea541d293095
- Parent:
- 4:404c35f32ce3
--- a/MPU9250.h Thu Sep 04 21:19:05 2014 +0000 +++ b/MPU9250.h Mon Sep 08 21:50:33 2014 +0000 @@ -217,8 +217,6 @@ float GyroMeasDrift = PI * (1.0f / 180.0f); // gyroscope measurement drift in rad/s/s (start at 0.0 deg/s/s) float zeta = sqrt(3.0f / 4.0f) * GyroMeasDrift; // compute zeta, the other free parameter in the Madgwick scheme usually set to a small or zero value -float pitch, yaw, roll; -float deltat = 0.0f; // integration interval for both filter schemes int lastUpdate = 0, firstUpdate = 0, Now = 0; // used to calculate integration interval // used to calculate integration interval float eInt[3] = {0.0f, 0.0f, 0.0f}; // vector to hold integral error for Mahony method @@ -616,7 +614,7 @@ // Configure the accelerometer for self-test writeByte(MPU9250_ADDRESS, ACCEL_CONFIG, 0xE0); // Enable self test on all three axes and set accelerometer range to +/- 2 g writeByte(MPU9250_ADDRESS, GYRO_CONFIG, 0xE0); // Enable self test on all three axes and set gyro range to +/- 250 degrees/s - wait(25); // Delay a while to let the device stabilize + wait(2); // Delay a while to let the device stabilize for( int ii = 0; ii < 200; ii++) { // get average self-test values of gyro and acclerometer @@ -639,7 +637,7 @@ // Configure the gyro and accelerometer for normal operation writeByte(MPU9250_ADDRESS, ACCEL_CONFIG, 0x00); writeByte(MPU9250_ADDRESS, GYRO_CONFIG, 0x00); - wait(25); // Delay a while to let the device stabilize + wait(2); // Delay a while to let the device stabilize // Retrieve accelerometer and gyro factory Self-Test Code from USR_Reg selfTest[0] = readByte(MPU9250_ADDRESS, SELF_TEST_X_ACCEL); // X-axis accel self-test results