Skip to content

Commit

Permalink
fixed unused variable in axes interchange from MPU6050 driver
Browse files Browse the repository at this point in the history
  • Loading branch information
MaEtUgR committed Dec 4, 2015
1 parent cc05a97 commit fc93b6a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions IMU/MPU6050/MPU6050.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,10 @@ void MPU6050::read()
data_acc[i] = raw_acc[i] - offset_acc[i]; // TODO: didn't care about units because IMU-algorithm just uses vector direction

// I have to swich coordinates on my board to match the ones of the other sensors (clear this part if you use the raw coordinates of the sensor)
float tmp = 0;
tmp = data_gyro[0];
data_gyro[0] = -data_gyro[0];
data_gyro[1] = -data_gyro[1];
data_gyro[2] = data_gyro[2];
tmp = data_acc[0];

data_acc[0] = -data_acc[0];
data_acc[1] = -data_acc[1];
data_acc[2] = data_acc[2];
Expand Down Expand Up @@ -107,4 +105,4 @@ void MPU6050::calibrate(int times, float separation_time)

for (int i = 0; i < 2; i++)
offset_acc[i] = calib_acc[i]/times; // take the average of the calibration measurements
}
}

0 comments on commit fc93b6a

Please sign in to comment.