From bb5982a2f771043cd824e026f1df12c833b95805 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 13 Oct 2026 10:19:34 -1000 Subject: [PATCH] Seed the refresh gate with the interval it compares against --- esphome/components/esp32_rmt_led_strip/led_strip.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/components/esp32_rmt_led_strip/led_strip.cpp b/esphome/components/esp32_rmt_led_strip/led_strip.cpp index bc27c3ecbd5..ffaaf872fbd 100644 --- a/esphome/components/esp32_rmt_led_strip/led_strip.cpp +++ b/esphome/components/esp32_rmt_led_strip/led_strip.cpp @@ -101,8 +101,8 @@ void ESP32RMTLEDStripLightOutput::setup() { uint64_t frame_ticks = (uint64_t) bit_ticks * buffer_size * RMT_SYMBOLS_PER_BYTE + this->params_.reset.duration0 + this->params_.reset.duration1; this->frame_time_us_ = frame_ticks * 1000000 / resolution_hz + RESET_GAP_US; - // Seed so the first frame is not deferred until uptime exceeds the frame time - this->last_refresh_ = micros() - this->frame_time_us_; + // Seed with the interval write_state() gates on, so the first frame is not deferred + this->last_refresh_ = micros() - std::max(this->frame_time_us_, this->max_refresh_rate_); rmt_tx_channel_config_t channel; memset(&channel, 0, sizeof(channel));