1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 16:25:31 +03:00

Fix g force calculation (#12892)

This commit is contained in:
Schuwi 2023-06-18 00:45:05 +02:00 committed by GitHub
parent ac84115f8d
commit c1694c2b60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1271,6 +1271,7 @@ void osdProcessStats2(timeUs_t currentTimeUs)
void osdProcessStats3(void)
{
#if defined(USE_ACC)
osdGForce = 0.0f;
if (sensors(SENSOR_ACC)
&& (VISIBLE(osdElementConfig()->item_pos[OSD_G_FORCE]) || osdStatGetState(OSD_STAT_MAX_G_FORCE))) {
// only calculate the G force if the element is visible or the stat is enabled