Chris Seto
/
MPU6050-DMP-fixpossible
Resolve STM issues
Fork of MPU6050 by
Diff: MPU6050_6Axis_MotionApps20.h
- Revision:
- 6:b272bd888e98
- Parent:
- 5:7d1bf3ce0053
diff -r 7d1bf3ce0053 -r b272bd888e98 MPU6050_6Axis_MotionApps20.h --- a/MPU6050_6Axis_MotionApps20.h Sat Nov 23 16:47:00 2013 +0000 +++ b/MPU6050_6Axis_MotionApps20.h Wed Jul 02 19:38:47 2014 +0000 @@ -33,10 +33,9 @@ #ifndef _MPU6050_6AXIS_MOTIONAPPS20_H_ #define _MPU6050_6AXIS_MOTIONAPPS20_H_ -#include <iostream> - #include "I2Cdev.h" #include "helper_3dmath.h" +#include "shared.h" // MotionApps 2.0 DMP implementation, built using the MPU-6050EVB evaluation board #define MPU6050_INCLUDE_DMP_MOTIONAPPS20 @@ -102,18 +101,18 @@ // after moving string constants to flash memory storage using the F() // compiler macro (Arduino IDE 1.0+ required). -//#define DEBUG +#define DEBUG #ifdef DEBUG - #define DEBUG_PRINT(x) std::cout << x //Serial.print(x) - #define DEBUG_PRINTF(x, y) std::cout << x //Serial.print(x, y) - #define DEBUG_PRINTLN(x) std::cout << x << std::endl //Serial.println(x) - #define DEBUG_PRINTLNF(x, y) std::cout << x << std::endl //Serial.println(x, y) + #define DEBUG_PRINT(x) pc.printf(" %s \r\n", x); + #define DEBUG_PRINTF(x, y) pc.printf(" %s \r\n", x); + #define DEBUG_PRINTLN(x) pc.printf(" %s \r\n", x); + #define DEBUG_PRINTLNF(x, y) pc.printf(" %s \r\n", x); #define F(x) x #else - #define DEBUG_PRINT(x) - #define DEBUG_PRINTF(x, y) - #define DEBUG_PRINTLN(x) - #define DEBUG_PRINTLNF(x, y) + #define DEBUG_PRINT(x) + #define DEBUG_PRINTF(x, y) + #define DEBUG_PRINTLN(x) + #define DEBUG_PRINTLNF(x, y) #endif #define MPU6050_DMP_CODE_SIZE 1929 // dmpMemory[] @@ -350,7 +349,7 @@ DEBUG_PRINTLN(F("Checking hardware revision...")); uint8_t hwRevision = readMemoryByte(); DEBUG_PRINT(F("Revision @ user[16][6] = ")); - DEBUG_PRINTLNF(hwRevision, HEX); + pc.printf("%04x\r\n", hwRevision); DEBUG_PRINTLN(F("Resetting memory bank selection to 0...")); setMemoryBank(0, false, false);