From e3fd11014fc2cbb83c4a6df1dcfa9a1ede260b25 Mon Sep 17 00:00:00 2001 From: jflyper Date: Wed, 1 May 2019 01:55:59 +0900 Subject: [PATCH] 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. --- src/main/msp/msp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/msp/msp.c b/src/main/msp/msp.c index af2bcb9a69..ca4f13cd02 100644 --- a/src/main/msp/msp.c +++ b/src/main/msp/msp.c @@ -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;