mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-14 11:59:58 +03:00
took out cycle counter stuff for timing, now using systick + counter strictly. ... seems improved loop precision a bit.
put gyro interleave under define. this needs to be cleaned sometime. took out "gyro glitch" stuff that was leftover from nintendo days. git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@162 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
This commit is contained in:
parent
19ca85963b
commit
572d5827cc
7 changed files with 2478 additions and 2794 deletions
|
@ -272,7 +272,6 @@ void Baro_update(void)
|
|||
|
||||
static void GYRO_Common(void)
|
||||
{
|
||||
static int16_t previousGyroADC[3] = { 0, 0, 0 };
|
||||
static int32_t g[3];
|
||||
uint8_t axis;
|
||||
|
||||
|
@ -293,13 +292,6 @@ static void GYRO_Common(void)
|
|||
}
|
||||
calibratingG--;
|
||||
}
|
||||
|
||||
for (axis = 0; axis < 3; axis++) {
|
||||
gyroADC[axis] -= gyroZero[axis];
|
||||
//anti gyro glitch, limit the variation between two consecutive readings
|
||||
gyroADC[axis] = constrain(gyroADC[axis], previousGyroADC[axis] - 800, previousGyroADC[axis] + 800);
|
||||
previousGyroADC[axis] = gyroADC[axis];
|
||||
}
|
||||
}
|
||||
|
||||
void Gyro_getADC(void)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue