From 15addeb46e8668bde1dfaae0b485ddb6c570c82f Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Thu, 12 Dec 2024 10:39:46 +0100 Subject: [PATCH] clang-format --- esphome/components/adc/adc_sensor_esp32_v5.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/esphome/components/adc/adc_sensor_esp32_v5.cpp b/esphome/components/adc/adc_sensor_esp32_v5.cpp index b2c77aeb3a..cd5211c349 100644 --- a/esphome/components/adc/adc_sensor_esp32_v5.cpp +++ b/esphome/components/adc/adc_sensor_esp32_v5.cpp @@ -86,7 +86,7 @@ void ADCSensor::setup() { cali_config.unit_id = unit_id; cali_config.atten = this->attenuation_; cali_config.bitwidth = ADC_BITWIDTH_DEFAULT; - + err = adc_cali_create_scheme_curve_fitting(&cali_config, &handle); if (err == ESP_OK) { this->calibration_handle_ = handle; @@ -151,7 +151,7 @@ float ADCSensor::sample() { for (uint8_t sample = 0; sample < this->sample_count_; sample++) { int raw; esp_err_t err; - + if (this->is_adc1_) { err = adc_oneshot_read(this->adc1_handle_, this->channel_, &raw); } else { @@ -200,7 +200,7 @@ float ADCSensor::sample() { } } } - + return sum * 3.3f / 4095.0f; } else { @@ -215,7 +215,7 @@ float ADCSensor::sample() { ESP_LOGW(TAG, "Error configuring ADC1 channel for autorange: %d", err); return {-1, 0.0f}; } - + int raw; err = adc_oneshot_read(this->adc1_handle_, this->channel_, &raw); if (err != ESP_OK) { @@ -242,7 +242,7 @@ float ADCSensor::sample() { ESP_LOGW(TAG, "Error configuring ADC2 channel for autorange: %d", err); return {-1, 0.0f}; } - + int raw; err = adc_oneshot_read(this->adc2_handle_, this->channel_, &raw); if (err != ESP_OK) {