1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 08:15:30 +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:
jflyper 2019-05-01 01:55:59 +09:00
parent cb935ff55c
commit e3fd11014f

View file

@ -1504,12 +1504,12 @@ static bool mspProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst)
#ifdef USE_BARO
sbufWriteU8(dst, barometerConfig()->baro_hardware);
#else
sbufWriteU8(dst, 0);
sbufWriteU8(dst, BARO_NONE);
#endif
#ifdef USE_MAG
sbufWriteU8(dst, compassConfig()->mag_hardware);
#else
sbufWriteU8(dst, 0);
sbufWriteU8(dst, MAG_NONE);
#endif
break;