From 248f7184eb084ea9d5132dde9efb21c02b540abe Mon Sep 17 00:00:00 2001 From: Bas Delfos Date: Thu, 17 Nov 2016 22:19:11 +0100 Subject: [PATCH] Fixed build failure of AFROMINI target --- src/main/sensors/battery.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/sensors/battery.c b/src/main/sensors/battery.c index 4eb374743c..302789e973 100644 --- a/src/main/sensors/battery.c +++ b/src/main/sensors/battery.c @@ -75,10 +75,13 @@ static void updateBatteryVoltage(void) // store the battery voltage with some other recent battery voltage readings uint16_t vbatSample; + #ifdef USE_ESC_TELEMETRY if (batteryConfig->batteryMeterType == BATTERY_SENSOR_ESC && isEscTelemetryActive()) { vbatSample = vbatLatest = getEscTelemetryVbat(); } - else { + else + #endif + { vbatSample = vbatLatest = batteryAdcToVoltage(adcGetChannel(ADC_BATTERY)); }