1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 08:45:36 +03:00

Start decoupling imu from config.

This commit is contained in:
Dominic Clifton 2014-06-06 20:36:51 +01:00
parent 9b6e8feeea
commit da73be1b2d
4 changed files with 36 additions and 11 deletions

View file

@ -21,7 +21,15 @@ extern int32_t errorAltitudeI;
extern int32_t BaroPID;
extern int16_t throttleAngleCorrection;
typedef struct imuRuntimeConfig_s {
uint8_t acc_lpf_factor;
float gyro_cmpf_factor;
float gyro_cmpfm_factor;
} imuRuntimeConfig_t;
void configureImu(imuRuntimeConfig_t *initialImuRuntimeConfig);
int getEstimatedAltitude(void);
void computeIMU(void);
void computeIMU(rollAndPitchTrims_t *accelerometerTrims);
void calculateThrottleAngleScale(uint16_t throttle_correction_angle);
int16_t calculateThrottleAngleCorrection(uint8_t throttle_correction_value);