From f18ff4b533a6caf0a4423549e690fa8b3d5220f0 Mon Sep 17 00:00:00 2001 From: Jonathan Swoboda Date: Tue, 12 Nov 2024 14:29:44 -0500 Subject: [PATCH] Cleanup transmitter --- .../remote_transmitter/remote_transmitter_esp32.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/components/remote_transmitter/remote_transmitter_esp32.cpp b/esphome/components/remote_transmitter/remote_transmitter_esp32.cpp index e29d2313b9..5e62cfe97f 100644 --- a/esphome/components/remote_transmitter/remote_transmitter_esp32.cpp +++ b/esphome/components/remote_transmitter/remote_transmitter_esp32.cpp @@ -28,14 +28,14 @@ void RemoteTransmitterComponent::dump_config() { } void RemoteTransmitterComponent::configure_rmt_() { + esp_err_t error; rmt_tx_channel_config_t config{}; config.clk_src = RMT_CLK_SRC_DEFAULT; config.resolution_hz = 1 * 1000 * 1000; config.gpio_num = gpio_num_t(this->pin_->get_pin()); config.mem_block_symbols = 64 * this->mem_block_num_; config.trans_queue_depth = 1; - - esp_err_t error = rmt_new_tx_channel(&config, &this->channel_); + error = rmt_new_tx_channel(&config, &this->channel_); if (error != ESP_OK) { this->error_code_ = error; this->error_string_ = "in rmt_new_tx_channel";