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:
commit
ec0b52aea1
1 changed files with 0 additions and 5 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue