mirror of
https://github.com/esphome/esphome.git
synced 2026-06-02 03:02:19 +08:00
Add IDF 5 test yaml, add adc to IDF tests, fix adc for IDF 5 (#5379)
This commit is contained in:
@@ -226,7 +226,7 @@ jobs:
|
||||
fail-fast: false
|
||||
max-parallel: 2
|
||||
matrix:
|
||||
file: [1, 2, 3, 3.1, 4, 5, 6, 7, 8, 10]
|
||||
file: [1, 2, 3, 3.1, 4, 5, 6, 7, 8, 10, 11.5]
|
||||
steps:
|
||||
- name: Check out code from GitHub
|
||||
uses: actions/checkout@v4.0.0
|
||||
|
||||
@@ -62,8 +62,12 @@ class ADCSensor : public sensor::Sensor, public PollingComponent, public voltage
|
||||
adc1_channel_t channel1_{ADC1_CHANNEL_MAX};
|
||||
adc2_channel_t channel2_{ADC2_CHANNEL_MAX};
|
||||
bool autorange_{false};
|
||||
#if ESP_IDF_VERSION_MAJOR >= 5
|
||||
esp_adc_cal_characteristics_t cal_characteristics_[SOC_ADC_ATTEN_NUM] = {};
|
||||
#else
|
||||
esp_adc_cal_characteristics_t cal_characteristics_[ADC_ATTEN_MAX] = {};
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
|
||||
} // namespace adc
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -392,6 +392,12 @@ select:
|
||||
"Three": 3
|
||||
|
||||
sensor:
|
||||
- platform: adc
|
||||
id: adc_sensor_p32
|
||||
name: ADC pin 32
|
||||
pin: 32
|
||||
attenuation: 11db
|
||||
update_interval: 1s
|
||||
- platform: internal_temperature
|
||||
name: Internal Temperature
|
||||
- platform: selec_meter
|
||||
|
||||
Reference in New Issue
Block a user