mirror of
https://github.com/esphome/esphome.git
synced 2024-11-27 17:27:59 +01:00
Explicitly init all flags
This commit is contained in:
parent
1263c2500c
commit
9ec67d966a
1 changed files with 3 additions and 0 deletions
|
@ -74,6 +74,7 @@ void RemoteTransmitterComponent::configure_rmt_() {
|
|||
carrier.duty_cycle = this->carrier_duty_percent_;
|
||||
}
|
||||
carrier.flags.polarity_active_low = this->inverted_;
|
||||
carrier.flags.always_on = 0;
|
||||
error = rmt_apply_carrier(this->channel_, &carrier);
|
||||
if (error != ESP_OK) {
|
||||
this->error_code_ = error;
|
||||
|
@ -140,6 +141,8 @@ void RemoteTransmitterComponent::send_internal(uint32_t send_times, uint32_t sen
|
|||
this->transmit_trigger_->trigger();
|
||||
for (uint32_t i = 0; i < send_times; i++) {
|
||||
rmt_transmit_config_t config{};
|
||||
config.loop_count = 0;
|
||||
config.flags.eot_level = this->inverted_;
|
||||
esp_err_t error = rmt_transmit(this->channel_, this->encoder_, this->rmt_temp_.data(),
|
||||
this->rmt_temp_.size() * sizeof(rmt_symbol_word_t), &config);
|
||||
if (error != ESP_OK) {
|
||||
|
|
Loading…
Reference in a new issue