mirror of
https://github.com/esphome/esphome.git
synced 2025-03-01 00:08:15 +00:00
clang-format
This commit is contained in:
parent
17919fdf9a
commit
fa437896a1
@ -18,9 +18,7 @@ void ADCSensor::set_sample_count(uint8_t sample_count) {
|
||||
}
|
||||
}
|
||||
|
||||
float ADCSensor::get_setup_priority() const {
|
||||
return setup_priority::DATA;
|
||||
}
|
||||
float ADCSensor::get_setup_priority() const { return setup_priority::DATA; }
|
||||
|
||||
} // namespace adc
|
||||
} // namespace esphome
|
||||
|
@ -38,8 +38,8 @@ void ADCSensor::setup() {
|
||||
for (int32_t i = 0; i <= ADC_ATTEN_DB_12_COMPAT; i++) {
|
||||
auto adc_unit = this->channel1_ != ADC1_CHANNEL_MAX ? ADC_UNIT_1 : ADC_UNIT_2;
|
||||
auto cal_value = esp_adc_cal_characterize(adc_unit, (adc_atten_t) i, ADC_WIDTH_MAX_SOC_BITS,
|
||||
1100, // default vref
|
||||
&this->cal_characteristics_[i]);
|
||||
1100, // default vref
|
||||
&this->cal_characteristics_[i]);
|
||||
switch (cal_value) {
|
||||
case ESP_ADC_CAL_VAL_EFUSE_VREF:
|
||||
ESP_LOGV(TAG, "Using eFuse Vref for calibration");
|
||||
|
@ -50,9 +50,7 @@ float ADCSensor::sample() {
|
||||
return raw / 1024.0f;
|
||||
}
|
||||
|
||||
std::string ADCSensor::unique_id() {
|
||||
return get_mac_address() + "-adc";
|
||||
}
|
||||
std::string ADCSensor::unique_id() { return get_mac_address() + "-adc"; }
|
||||
|
||||
} // namespace adc
|
||||
} // namespace esphome
|
||||
|
Loading…
x
Reference in New Issue
Block a user