1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-25 17:25:18 +03:00

Scale acc value in acc sensor code

This commit is contained in:
Martin Budden 2017-11-28 06:50:43 +00:00
parent 61f895333b
commit 089680ffce
7 changed files with 41 additions and 39 deletions

View file

@ -404,7 +404,7 @@ static bool mspFcProcessOutCommand(uint16_t cmdMSP, sbuf_t *dst, mspPostProcessF
// Hack scale due to choice of units for sensor data in multiwii
const uint8_t scale = (acc.dev.acc_1G > 1024) ? 8 : 1;
for (int i = 0; i < 3; i++) {
sbufWriteU16(dst, acc.accADC[i] / scale);
sbufWriteU16(dst, acc.accADCf[i] * acc.dev.acc_1G / scale);
}
for (int i = 0; i < 3; i++) {
sbufWriteU16(dst, gyroRateDps(i));