From 8a13956add3c9796416ec00bc1fb13280e64e128 Mon Sep 17 00:00:00 2001 From: sabas1080 Date: Thu, 5 Sep 2019 07:41:22 -0500 Subject: [PATCH] Change the order of ifdef and define by julred --- .../MPU6050_DMP6_ESPWiFi/MPU6050_DMP6_ESPWiFi.ino | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/examples/MPU6050_DMP6_ESPWiFi/MPU6050_DMP6_ESPWiFi.ino b/examples/MPU6050_DMP6_ESPWiFi/MPU6050_DMP6_ESPWiFi.ino index 588cf91..08dc43d 100755 --- a/examples/MPU6050_DMP6_ESPWiFi/MPU6050_DMP6_ESPWiFi.ino +++ b/examples/MPU6050_DMP6_ESPWiFi/MPU6050_DMP6_ESPWiFi.ino @@ -91,12 +91,7 @@ VectorInt16 aa; // [x, y, z] accel sensor measurements VectorInt16 aaReal; // [x, y, z] gravity-free accel sensor measurements VectorInt16 aaWorld; // [x, y, z] world-frame accel sensor measurements VectorFloat gravity; // [x, y, z] gravity vector -#ifdef OUTPUT_READABLE_EULER -float euler[3]; // [psi, theta, phi] Euler angle container -#endif -#ifdef OUTPUT_READABLE_YAWPITCHROLL -float ypr[3]; // [yaw, pitch, roll] yaw/pitch/roll container and gravity vector -#endif + // uncomment "OUTPUT_READABLE_QUATERNION" if you want to see the actual // quaternion components in a [w, x, y, z] format (not best for parsing @@ -133,6 +128,14 @@ float ypr[3]; // [yaw, pitch, roll] yaw/pitch/roll container and gra // format used for the InvenSense teapot demo #define OUTPUT_TEAPOT_OSC + +#ifdef OUTPUT_READABLE_EULER +float euler[3]; // [psi, theta, phi] Euler angle container +#endif +#ifdef OUTPUT_READABLE_YAWPITCHROLL +float ypr[3]; // [yaw, pitch, roll] yaw/pitch/roll container and gravity vector +#endif + #define INTERRUPT_PIN 15 // use pin 15 on ESP8266 const char DEVICE_NAME[] = "mpu6050";