1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-18 22:05:17 +03:00

Acc fn/variable renames to align with iNav

This commit is contained in:
Martin Budden 2017-12-29 09:56:04 +00:00
parent ff0628193f
commit d90b42970c
10 changed files with 39 additions and 40 deletions

View file

@ -200,9 +200,9 @@ static void imuCalculateAcceleration(uint32_t deltaT)
const float dT = (float)deltaT * 1e-6f;
t_fp_vector accel_ned;
accel_ned.V.X = acc.accSmooth[X];
accel_ned.V.Y = acc.accSmooth[Y];
accel_ned.V.Z = acc.accSmooth[Z];
accel_ned.V.X = acc.accADC[X];
accel_ned.V.Y = acc.accADC[Y];
accel_ned.V.Z = acc.accADC[Z];
imuTransformVectorBodyToEarth(&accel_ned);
@ -392,7 +392,7 @@ static bool imuIsAccelerometerHealthy(void)
{
float accMagnitude = 0;
for (int axis = 0; axis < 3; axis++) {
const float a = acc.accSmooth[axis];
const float a = acc.accADC[axis];
accMagnitude += a * a;
}
@ -478,9 +478,9 @@ void imuUpdateAttitude(timeUs_t currentTimeUs)
imuCalculateEstimatedAttitude(currentTimeUs);
IMU_UNLOCK;
} else {
acc.accSmooth[X] = 0;
acc.accSmooth[Y] = 0;
acc.accSmooth[Z] = 0;
acc.accADC[X] = 0;
acc.accADC[Y] = 0;
acc.accADC[Z] = 0;
}
}