Add IDF 5 test yaml, add adc to IDF tests, fix adc for IDF 5 (#5379)

This commit is contained in:
Keith Burzinski
2023-09-12 18:36:17 -05:00
committed by GitHub
parent b8fa737bc9
commit 736dbfac13
4 changed files with 708 additions and 1 deletions
+1 -1
View File
@@ -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
+4
View File
@@ -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
+697
View File
File diff suppressed because it is too large Load Diff
+6
View File
@@ -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