mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-26 01:35:41 +03:00
Refactoring of IMU and ACC
This commit is contained in:
parent
b6b24ba946
commit
f85ebba6a4
24 changed files with 141 additions and 195 deletions
|
@ -1122,7 +1122,7 @@ void osdProcessStats3()
|
|||
&& (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
|
||||
for (int axis = 0; axis < XYZ_AXIS_COUNT; axis++) {
|
||||
const float a = accAverage[axis];
|
||||
const float a = acc.accADC[axis];
|
||||
osdGForce += a * a;
|
||||
}
|
||||
osdGForce = sqrtf(osdGForce) * acc.dev.acc_1G_rec;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue