From a66021a84817a95a5815d8a8d29a61330bfa1b0c Mon Sep 17 00:00:00 2001 From: Klaus K Wilting Date: Mon, 5 Nov 2018 22:15:15 +0100 Subject: [PATCH] battery.cpp: bugfix compiler directives --- src/battery.cpp | 2 ++ 1 file changed, 2 insertions(+) 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