From 7ad4bbfa0fbc4920938997a75cf4da7cfab4c66d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=ADguel=20=C3=81ngel=20Mulero=20Mart=C3=ADnez?= Date: Tue, 27 Mar 2018 21:11:08 +0200 Subject: [PATCH] Simplify the precompiler condition for MSP_VOLTAGE_METERS (#5554) ... and MSP_CURRENT_METERS --- src/main/interface/msp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/interface/msp.c b/src/main/interface/msp.c index fdb4e36715..3571c07f00 100644 --- a/src/main/interface/msp.c +++ b/src/main/interface/msp.c @@ -513,7 +513,7 @@ static bool mspCommonProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst, mspPostProce case MSP_VOLTAGE_METERS: { // write out id and voltage meter values, once for each meter we support uint8_t count = supportedVoltageMeterCount; -#if !defined(USE_OSD_SLAVE) && defined(USE_ESC_SENSOR) +#ifdef USE_ESC_SENSOR count -= VOLTAGE_METER_ID_ESC_COUNT - getMotorCount(); #endif @@ -532,7 +532,7 @@ static bool mspCommonProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst, mspPostProce case MSP_CURRENT_METERS: { // write out id and current meter values, once for each meter we support uint8_t count = supportedCurrentMeterCount; -#if !defined(USE_OSD_SLAVE) && defined(USE_ESC_SENSOR) +#ifdef USE_ESC_SENSOR count -= VOLTAGE_METER_ID_ESC_COUNT - getMotorCount(); #endif for (int i = 0; i < count; i++) {