mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 16:25:31 +03:00
Report BARO_NONE and MAG_NONE for baro and mag MSP requests
Responding with zero (BARO_DEFAULT and MAG_DEFAULT) will cause configurator to display these sensors enabled, and since write (set) side is ignored, they can never be displayed as disabled.
This commit is contained in:
parent
cb935ff55c
commit
e3fd11014f
1 changed files with 2 additions and 2 deletions
|
@ -1504,12 +1504,12 @@ static bool mspProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst)
|
||||||
#ifdef USE_BARO
|
#ifdef USE_BARO
|
||||||
sbufWriteU8(dst, barometerConfig()->baro_hardware);
|
sbufWriteU8(dst, barometerConfig()->baro_hardware);
|
||||||
#else
|
#else
|
||||||
sbufWriteU8(dst, 0);
|
sbufWriteU8(dst, BARO_NONE);
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_MAG
|
#ifdef USE_MAG
|
||||||
sbufWriteU8(dst, compassConfig()->mag_hardware);
|
sbufWriteU8(dst, compassConfig()->mag_hardware);
|
||||||
#else
|
#else
|
||||||
sbufWriteU8(dst, 0);
|
sbufWriteU8(dst, MAG_NONE);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue