diff --git a/src/battery.cpp b/src/battery.cpp index bb2ffce7..c7a43070 100644 --- a/src/battery.cpp +++ b/src/battery.cpp @@ -3,6 +3,7 @@ // Local logging tag static const char TAG[] = "main"; +#ifdef HAS_BATTERY_PROBE esp_adc_cal_characteristics_t *adc_characs = (esp_adc_cal_characteristics_t *)calloc( 1, sizeof(esp_adc_cal_characteristics_t)); @@ -10,6 +11,7 @@ esp_adc_cal_characteristics_t *adc_characs = static const adc1_channel_t adc_channel = HAS_BATTERY_PROBE; static const adc_atten_t atten = ADC_ATTEN_DB_11; static const adc_unit_t unit = ADC_UNIT_1; +#endif void calibrate_voltage(void) { #ifdef HAS_BATTERY_PROBE