mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 01:05:27 +03:00
change divisions by acc_1G to multiply by the reciprocal value
This commit is contained in:
parent
946cbd257f
commit
34b0707cb6
8 changed files with 13 additions and 11 deletions
|
@ -699,7 +699,7 @@ static bool osdDrawSingleElement(uint8_t item)
|
|||
const float a = accAverage[axis];
|
||||
osdGForce += a * a;
|
||||
}
|
||||
osdGForce = sqrtf(osdGForce) / acc.dev.acc_1G;
|
||||
osdGForce = sqrtf(osdGForce) * acc.dev.acc_1G_rec;
|
||||
tfp_sprintf(buff, "%01d.%01dG", (int)osdGForce, (int)(osdGForce * 10) % 10);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue