Fixed accelerometer scaling in MSP
This commit is contained in:
parent
e3767e1b09
commit
acee56764b
|
@ -766,7 +766,7 @@ static bool processOutCommand(uint8_t cmdMSP)
|
||||||
headSerialReply(18);
|
headSerialReply(18);
|
||||||
|
|
||||||
// Hack scale due to choice of units for sensor data in multiwii
|
// Hack scale due to choice of units for sensor data in multiwii
|
||||||
uint8_t scale = (acc.acc_1G > 1024) ? 8 : 1;
|
const uint8_t scale = (acc.acc_1G > 512) ? 4 : 1;
|
||||||
|
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
serialize16(accSmooth[i] / scale);
|
serialize16(accSmooth[i] / scale);
|
||||||
|
|
Loading…
Reference in New Issue