USBUART - IRQ

Dependencies:   BufferedSerial MODSERIAL ST_401_84MHZ USBDevice mbed

Fork of MPU9250AHRS by ethan hong

Revision:
1:71c319f03fda
Parent:
0:2e5e65a6fb30
Child:
3:423c156187bd
--- a/main.cpp	Sun Jun 29 22:02:30 2014 +0000
+++ b/main.cpp	Tue Aug 05 01:34:45 2014 +0000
@@ -86,6 +86,13 @@
     wait(1);
     
     mpu9250.resetMPU9250(); // Reset registers to default in preparation for device calibration
+    mpu9250.MPU9250SelfTest(SelfTest); // Start by performing self test and reporting values
+    pc.printf("x-axis self test: acceleration trim within : %f % of factory value\n\r", SelfTest[0]);  
+    pc.printf("y-axis self test: acceleration trim within : %f % of factory value\n\r", SelfTest[1]);  
+    pc.printf("z-axis self test: acceleration trim within : %f % of factory value\n\r", SelfTest[2]);  
+    pc.printf("x-axis self test: gyration trim within : %f % of factory value\n\r", SelfTest[3]);  
+    pc.printf("y-axis self test: gyration trim within : %f % of factory value\n\r", SelfTest[4]);  
+    pc.printf("z-axis self test: gyration trim within : %f % of factory value\n\r", SelfTest[5]);  
     mpu9250.calibrateMPU9250(gyroBias, accelBias); // Calibrate gyro and accelerometers, load biases in bias registers  
     pc.printf("x gyro bias = %f\n\r", gyroBias[0]);
     pc.printf("y gyro bias = %f\n\r", gyroBias[1]);