1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 20:35:33 +03:00

main uart baud rate commit before tearing stuff up

git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@134 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
This commit is contained in:
timecop 2012-03-29 06:00:22 +00:00
parent da5ac020e1
commit c98b6b30af
12 changed files with 2584 additions and 2579 deletions

View file

@ -173,14 +173,13 @@ static void getEstimatedAttitude(void)
static uint32_t previousT;
uint32_t currentT = micros();
float scale, deltaGyroAngle[3];
scale = (currentT - previousT) * GYRO_SCALE;
previousT = currentT;
// Initialization
for (axis = 0; axis < 3; axis++) {
deltaGyroAngle[axis] = gyroADC[axis] * scale;
if (cfg.acc_lpf_factor > 0) {
accTemp[axis] = (accTemp[axis] - (accTemp[axis] >> cfg.acc_lpf_factor)) + accADC[axis];
accSmooth[axis] = accTemp[axis] >> cfg.acc_lpf_factor;