Fixed build failure of AFROMINI target
This commit is contained in:
parent
bc1109c546
commit
248f7184eb
|
@ -75,10 +75,13 @@ static void updateBatteryVoltage(void)
|
||||||
// store the battery voltage with some other recent battery voltage readings
|
// store the battery voltage with some other recent battery voltage readings
|
||||||
uint16_t vbatSample;
|
uint16_t vbatSample;
|
||||||
|
|
||||||
|
#ifdef USE_ESC_TELEMETRY
|
||||||
if (batteryConfig->batteryMeterType == BATTERY_SENSOR_ESC && isEscTelemetryActive()) {
|
if (batteryConfig->batteryMeterType == BATTERY_SENSOR_ESC && isEscTelemetryActive()) {
|
||||||
vbatSample = vbatLatest = getEscTelemetryVbat();
|
vbatSample = vbatLatest = getEscTelemetryVbat();
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
vbatSample = vbatLatest = batteryAdcToVoltage(adcGetChannel(ADC_BATTERY));
|
vbatSample = vbatLatest = batteryAdcToVoltage(adcGetChannel(ADC_BATTERY));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue