1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-26 01:35:41 +03:00

Merge pull request #1724 from martinbudden/gyro_merge_error_fix

Fixed harmless error in gyro merge
This commit is contained in:
Martin Budden 2016-12-01 20:52:27 +01:00 committed by GitHub
commit ec0b52aea1

View file

@ -39,7 +39,6 @@
gyro_t gyro; // gyro access functions gyro_t gyro; // gyro access functions
static int32_t gyroADC[XYZ_AXIS_COUNT]; static int32_t gyroADC[XYZ_AXIS_COUNT];
float gyroADCf[XYZ_AXIS_COUNT];
static int32_t gyroZero[XYZ_AXIS_COUNT] = { 0, 0, 0 }; static int32_t gyroZero[XYZ_AXIS_COUNT] = { 0, 0, 0 };
static const gyroConfig_t *gyroConfig; static const gyroConfig_t *gyroConfig;
@ -190,10 +189,6 @@ void gyroUpdate(void)
} }
for (int axis = 0; axis < XYZ_AXIS_COUNT; axis++) { for (int axis = 0; axis < XYZ_AXIS_COUNT; axis++) {
gyroADC[axis] -= gyroZero[axis];
// scale gyro output to degrees per second
gyroADCf[axis] = (float)gyroADC[axis] * gyro.dev.scale;
gyroADC[axis] -= gyroZero[axis]; gyroADC[axis] -= gyroZero[axis];
// scale gyro output to degrees per second // scale gyro output to degrees per second
gyro.gyroADCf[axis] = (float)gyroADC[axis] * gyro.dev.scale; gyro.gyroADCf[axis] = (float)gyroADC[axis] * gyro.dev.scale;