mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 22:35:23 +03:00
Merge pull request #6233 from leocb/add-gforce-osd
Added G-Force to the OSD
This commit is contained in:
commit
e2cf7fc238
8 changed files with 25 additions and 1 deletions
|
@ -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;
|
||||
|
@ -491,7 +492,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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue