Fixed build failure of AFROMINI target

This commit is contained in:
Bas Delfos 2016-11-17 22:19:11 +01:00
parent bc1109c546
commit 248f7184eb
1 changed files with 4 additions and 1 deletions

View File

@ -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));
}