Simplify the precompiler condition for MSP_VOLTAGE_METERS (#5554)

... and MSP_CURRENT_METERS
This commit is contained in:
Míguel Ángel Mulero Martínez 2018-03-27 21:11:08 +02:00 committed by Michael Keller
parent 8095d3442c
commit 7ad4bbfa0f
1 changed files with 2 additions and 2 deletions

View File

@ -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++) {