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

Revert new PID stuff and move it to a separate branch for now.

This commit is contained in:
fiendie 2013-11-07 13:15:31 +01:00
parent 14f087a140
commit 6ab48fc438
11 changed files with 30 additions and 187 deletions

View file

@ -19,7 +19,6 @@ int32_t vario = 0; // variometer in cm/s
int16_t throttleAngleCorrection = 0; // correction of throttle in lateral wind,
float magneticDeclination = 0.0f; // calculated at startup from config
float accVelScale;
float gyroScaleRad;
// **************
// gyro+acc IMU
@ -35,7 +34,6 @@ void imuInit(void)
{
accZ_25deg = acc_1G * cosf(RAD * 25.0f);
accVelScale = 9.80665f / acc_1G / 10000.0f;
gyroScaleRad = gyro.scale * (M_PI / 180.0f) * 0.000001f;
#ifdef MAG
// if mag sensor is enabled, use it
@ -263,7 +261,7 @@ static void getEstimatedAttitude(void)
uint32_t deltaT;
float scale, deltaGyroAngle[3];
deltaT = currentT - previousT;
scale = deltaT * gyroScaleRad;
scale = deltaT * gyro.scale;
previousT = currentT;
// Initialization