Skip to content
Browse files

Updating dmpGetLinearAccelInWorld() to use correct sizeof() structure…

… reference
  • Loading branch information...
1 parent 4b0253e commit 8e6c27a2868369cc50ac6caef7a44dbf68565450 @jrowberg committed Aug 6, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 Arduino/MPU6050/MPU6050_6Axis_MotionApps20.h
  2. +1 −1 Arduino/MPU6050/MPU6050_9Axis_MotionApps41.h
View
2 Arduino/MPU6050/MPU6050_6Axis_MotionApps20.h
@@ -616,7 +616,7 @@ uint8_t MPU6050::dmpGetLinearAccel(VectorInt16 *v, VectorInt16 *vRaw, VectorFloa
uint8_t MPU6050::dmpGetLinearAccelInWorld(VectorInt16 *v, VectorInt16 *vReal, Quaternion *q) {
// rotate measured 3D acceleration vector into original state
// frame of reference based on orientation quaternion
- memcpy(v, vReal, sizeof(Quaternion));
+ memcpy(v, vReal, sizeof(VectorInt16));
v -> rotate(q);
return 0;
}
View
2 Arduino/MPU6050/MPU6050_9Axis_MotionApps41.h
@@ -727,7 +727,7 @@ uint8_t MPU6050::dmpGetLinearAccel(VectorInt16 *v, VectorInt16 *vRaw, VectorFloa
uint8_t MPU6050::dmpGetLinearAccelInWorld(VectorInt16 *v, VectorInt16 *vReal, Quaternion *q) {
// rotate measured 3D acceleration vector into original state
// frame of reference based on orientation quaternion
- memcpy(v, vReal, sizeof(Quaternion));
+ memcpy(v, vReal, sizeof(VectorInt16));
v -> rotate(q);
return 0;
}

0 comments on commit 8e6c27a

Please sign in to comment.
Something went wrong with that request. Please try again.