mirror of
https://github.com/richardghirst/PiBits.git
synced 2024-11-28 12:24:11 +01:00
fixed bug in MPU6050_6Axis_MotionApps20.h function uint8_t MPU6050::dmpInitialize() which caused an i2c-read error in case of an empty fifoCount.
This commit is contained in:
parent
1b78f9ad6b
commit
0a349ee600
@ -414,7 +414,8 @@ uint8_t MPU6050::dmpInitialize() {
|
||||
|
||||
printf("Current FIFO count=%d\n", fifoCount);
|
||||
DEBUG_PRINTLN(fifoCount);
|
||||
getFIFOBytes(fifoBuffer, fifoCount);
|
||||
if (fifoCount > 0)
|
||||
getFIFOBytes(fifoBuffer, fifoCount);
|
||||
|
||||
DEBUG_PRINTLN(F("Setting motion detection threshold to 2..."));
|
||||
setMotionDetectionThreshold(2);
|
||||
|
Loading…
Reference in New Issue
Block a user