Fix Berry `gpio.dac_voltage()` broken in 13.2.0 (#19997)

This commit is contained in:
s-hadinger 2023-11-12 22:17:17 +01:00 committed by GitHub
parent 44ef425b89
commit 65e07e8387
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -23,6 +23,7 @@ All notable changes to this project will be documented in this file.
- Scripter timer issue (#19914)
- Zero-Cross Dimmer for ESP32 with Core3 (#19929)
- Matter flow sensor (#19961)
- Berry ``gpio.dac_voltage()`` broken in 13.2.0
### Removed

View File

@ -160,8 +160,8 @@ extern "C" {
esp_err_t err = dac_oneshot_new_channel(&channel_cfg, &channel_handle);
#else
dac_channel_t channel = (25 == pin) ? DAC_CHANNEL_1 : DAC_CHANNEL_2;
// esp_err_t err = dac_output_voltage(channel, dac_value);
esp_err_t err = dac_output_enable(channel);
esp_err_t err = dac_output_voltage(channel, dac_value);
// err = dac_output_enable(channel);
#endif
if (err) {
be_raisef(vm, "internal_error", "Error: esp_err_tdac_output_voltage(%i, %i) -> %i", channel, dac_value, err);
@ -180,8 +180,8 @@ extern "C" {
esp_err_t err = dac_oneshot_new_channel(&channel_cfg, &channel_handle);
#else
dac_channel_t channel = (17 == pin) ? DAC_CHANNEL_1 : DAC_CHANNEL_2;
// esp_err_t err = dac_output_voltage(channel, dac_value);
esp_err_t err = dac_output_enable(channel);
esp_err_t err = dac_output_voltage(channel, dac_value);
// err = dac_output_enable(channel);
#endif
if (err) {
be_raisef(vm, "internal_error", "Error: esp_err_tdac_output_voltage(%i, %i) -> %i", channel, dac_value, err);