1
0
Fork 0
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:
leocb 2018-08-09 14:41:05 -03:00
parent 946cbd257f
commit 34b0707cb6
8 changed files with 13 additions and 11 deletions

View file

@ -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;
}