From 69cda351e4c980de150b072248e7be59c0bc0c22 Mon Sep 17 00:00:00 2001 From: Ryan Mounce Date: Mon, 15 Apr 2024 23:14:47 +0930 Subject: [PATCH] Update WS2812X ESP32 RMT timing for WS2815 compat The existing values are out of spec for WS2815 which results in flickering, especially on longer cable runs. These new RMT values are still closer to ideal WS2812B specs than the current I2S WS2812X timing (about 310us / 940us). | | T0H | T1H | T0L | T1L | | ----------------------- | ------- | --------- | -------- | ------- | | WS2812B | 250-550 | 650-950 | 700-1000 | 300-600 | | WS2815 | 220-380 | 580-1600 | 580-1600 | 220-420 | --- src/internal/methods/NeoEsp32RmtMethod.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/internal/methods/NeoEsp32RmtMethod.h b/src/internal/methods/NeoEsp32RmtMethod.h index 5c27b1a3..59b48046 100644 --- a/src/internal/methods/NeoEsp32RmtMethod.h +++ b/src/internal/methods/NeoEsp32RmtMethod.h @@ -313,8 +313,8 @@ class NeoEsp32RmtInvertedSpeedWs2811 : public NeoEsp32RmtInvertedSpeedBase class NeoEsp32RmtInvertedSpeedWs2812x : public NeoEsp32RmtInvertedSpeedBase { public: - const static DRAM_ATTR uint32_t RmtBit0 = Item32Val(400, 850); - const static DRAM_ATTR uint32_t RmtBit1 = Item32Val(800, 450); + const static DRAM_ATTR uint32_t RmtBit0 = Item32Val(315, 935); // WS2812B / WS2815 compat compromise + const static DRAM_ATTR uint32_t RmtBit1 = Item32Val(890, 360); // WS2812B / WS2815 compat compromise const static DRAM_ATTR uint16_t RmtDurationReset = FromNs(300000); // 300us static void IRAM_ATTR Translate(const void* src,