mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 00:05:33 +03:00
Fixed gyro detection for multi gyro setups.
This commit is contained in:
parent
dcb34d3761
commit
e44f75b4a7
7 changed files with 111 additions and 92 deletions
|
@ -1357,13 +1357,12 @@ static bool mspProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst)
|
|||
sbufWriteU8(dst, compassConfig()->mag_align);
|
||||
|
||||
// API 1.41 - Add multi-gyro indicator, selected gyro, and support for separate gyro 1 & 2 alignment
|
||||
sbufWriteU8(dst, getGyroDetectionFlags());
|
||||
#ifdef USE_MULTI_GYRO
|
||||
sbufWriteU8(dst, 1); // USE_MULTI_GYRO
|
||||
sbufWriteU8(dst, gyroConfig()->gyro_to_use);
|
||||
sbufWriteU8(dst, gyroDeviceConfig(0)->align);
|
||||
sbufWriteU8(dst, gyroDeviceConfig(1)->align);
|
||||
#else
|
||||
sbufWriteU8(dst, 0);
|
||||
sbufWriteU8(dst, GYRO_CONFIG_USE_GYRO_1);
|
||||
sbufWriteU8(dst, gyroDeviceConfig(0)->align);
|
||||
sbufWriteU8(dst, ALIGN_DEFAULT);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue