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:
parent
61f895333b
commit
089680ffce
7 changed files with 41 additions and 39 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue