From f586824435a0e9c1f8bc3f062c52f5ab7f7b8b07 Mon Sep 17 00:00:00 2001 From: Austin Lane Date: Wed, 22 Apr 2026 17:25:34 -0400 Subject: [PATCH] Fix Power.cpp check warning Local variable 'config' shadows outer variable [shadowVariable] --- src/Power.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Power.cpp b/src/Power.cpp index 9677d85a8..b37424b24 100644 --- a/src/Power.cpp +++ b/src/Power.cpp @@ -437,7 +437,7 @@ class AnalogBatteryLevel : public HasBatteryLevel voltage_mv = (int)((raw / max_code) * DEFAULT_VREF); } scaled = voltage_mv * operativeAdcMultiplier; -#else // block for all other platforms +#else // block for all other platforms #ifdef ARCH_NRF52 concurrency::LockGuard saadcGuard(concurrency::nrf52SaadcLock); #endif @@ -735,19 +735,19 @@ bool Power::analogInit() } } - adc_oneshot_chan_cfg_t config = { + adc_oneshot_chan_cfg_t chan_cfg = { .atten = atten, .bitwidth = adc_width, }; - esp_err_t err = adc_oneshot_config_channel(adc_handle, adc_channel, &config); + esp_err_t err = adc_oneshot_config_channel(adc_handle, adc_channel, &chan_cfg); if (err != ESP_OK) { LOG_ERROR("ADC channel config failed: %s", esp_err_to_name(err)); return false; } adc_calibrated = initAdcCalibration(); -#endif // ARCH_ESP32 +#endif // ARCH_ESP32 // NRF52 ADC init moved to powerHAL_init in nrf52 platform