1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 22:35:23 +03:00

Added G-Force to the OSD

This commit is contained in:
leocb 2018-06-27 13:56:26 -03:00
parent e260c37be3
commit e2eca1b762
7 changed files with 20 additions and 1 deletions

View file

@ -85,6 +85,7 @@ static bool imuUpdated = false;
#define GPS_COG_MIN_GROUNDSPEED 500 // 500cm/s minimum groundspeed for a gps heading to be considered valid
int32_t accSum[XYZ_AXIS_COUNT];
float accAverage[XYZ_AXIS_COUNT];
uint32_t accTimeSum = 0; // keep track for integration of acc
int accSumCount = 0;
@ -488,7 +489,6 @@ static void imuCalculateEstimatedAttitude(timeUs_t currentTimeUs)
#endif
float gyroAverage[XYZ_AXIS_COUNT];
gyroGetAccumulationAverage(gyroAverage);
float accAverage[XYZ_AXIS_COUNT];
if (accGetAccumulationAverage(accAverage)) {
useAcc = imuIsAccelerometerHealthy(accAverage);
}