Repository navigation
Closed
Labels
Description
Board / MCU
ESP32-S3
LED Chipset
WS2812B / NeoPixel
FastLED Version
master#7767ad1
Arduino / PlatformIO version
PlatformIO 6.1.19
Operating System
Windows
Description
When using the split-interface addressing feature of FastLED, the strips no longer show any output. If using the standard global instance, all strips output as expected.
When I say "split-interface addressing" what I mean is code that calls FastLED.addLeds twice in setup(), then instead of calling the global FastLED.show(); to write to all LEDs at once it instead calls:
FastLED[0].showLeds(255);
FastLED[1].showLeds(255);This method works perfectly in FastLED 3.10.3 and earlier.
Steps to reproduce
- Have code that uses
FastLED[0].showLeds(255);andFastLED[1].showLeds(255);instead ofFastLED.show(). - See that the LED strips have no output.
Minimal sketch
#include <FastLED.h>
#define BARREL_LED_PIN 41
#define BARREL_LEDS_MAX 50
CRGB barrel_leds[BARREL_LEDS_MAX];
#define TOP_LED_PIN 42
#define VENT_LEDS_MAX 2
CRGB vent_leds[VENT_LEDS_MAX];
void setup() {
FastLED.addLeds<NEOPIXEL, BARREL_LED_PIN>(barrel_leds, BARREL_LEDS_MAX).setCorrection(TypicalLEDStrip);
FastLED.setMaxRefreshRate(0);
FastLED.addLeds<NEOPIXEL, TOP_LED_PIN>(vent_leds, VENT_LEDS_MAX).setCorrection(TypicalLEDStrip);
FastLED.show();
for(uint8_t i = 0; i < BARREL_LEDS_MAX; i++) {
barrel_leds[i] = CRGB::Green;
}
vent_leds[0] = CRGB::Red;
vent_leds[1] = CRGB::Blue;
}
void loop() {
EVERY_N_MILLISECONDS(750) {
FastLED[0].showLeds(255);
if(barrel_leds[0]) {
for(uint8_t i = 0; i < BARREL_LEDS_MAX; i++) {
barrel_leds[i] = CRGB::Black;
}
}
else {
for(uint8_t i = 0; i < BARREL_LEDS_MAX; i++) {
barrel_leds[i] = CRGB::Green;
}
}
}
EVERY_N_MILLISECONDS(500) {
FastLED[1].showLeds(255);
CRGB temp_leds[1];
temp_leds[0] = vent_leds[1];
vent_leds[1] = vent_leds[0];
vent_leds[0] = temp_leds[0];
}
}Checklist
- I have searched existing issues for duplicates
- I have tested with the latest FastLED release or git master
- I can reproduce this with a minimal sketch
Activity
zackees commentedon Apr 22, 2026
Investigated this against
master/7767ad1. This looks like a regression in the direct per-controller show path after the ESP32 RMT5 path moved onto theChannelManagerarchitecture.What is happening:
NEOPIXEL/ WS2812 goes throughClocklessIdf5, which inherits fromfl::Channel.FastLED[0].showLeds(255)enters the legacyCLEDController::showLeds()path:beginShowLeds()->showLedsInternal()->endShowLeds().Channel,showLedsInternal()reachesChannel::showPixels().Channel::showPixels()encodes the pixel bytes and callsdriver->enqueue(mChannelData), but it does not start transmission.ChannelManager::onEndFrame(), which callsentry.driver->show()for the registered drivers.ChannelManager::onEndFrame()is fired byFastLED.show(), but it is not fired by directCLEDController::showLeds().So
FastLED[0].showLeds()/FastLED[1].showLeds()currently queue channel data, but never flush the queue to the RMT driver. That matches the symptom: globalFastLED.show()works, but indexed controllershowLeds()produces no output.This also explains why FastLED
3.10.3worked: the old ESP32 RMT5 controller was self-contained. ItsshowPixels()loaded data into the RMT controller, and itsendShowLeds()directly calledmRMTController.showPixels(). The current channel-backed controller depends on the frame-endChannelManagerflush instead.Temporary workaround: use
FastLED.show(). If the sketch needs to update only one strip at a time, a possible workaround is to temporarily disable the other controllers withsetEnabled(false), callFastLED.show(), then restore them. That keeps execution on the global frame path that actually flushesChannelManager.Likely library fix: make the direct per-controller
showLeds()path trigger channel-driver transmission forChannel-backed controllers, or make direct controller shows emit the same relevant frame-end flush thatFastLED.show()emits. The important part is thatdriver->enqueue()must be followed by the channel drivershow()step for this API to remain compatible.zackees commentedon Apr 22, 2026
Design note for the fix:
The compatibility fix should be gated to large-memory/channel-capable builds only. We do not want small-memory legacy targets to pull in
EngineEvents,ChannelManager, or other channel/event objects from a dead path.Recommended shape:
Why this guard:
FASTLED_HAS_ENGINE_EVENTSalready defaults toSKETCH_HAS_LARGE_MEMORY.SKETCH_HAS_LARGE_MEMORY=1, so this restores the channel-backed ESP32 behavior.Why put this in
CLEDController::showLeds()rather than onlyChannel::showLeds():ClocklessIdf5inherits fromfl::Channel.CPixelLEDControllersubclasses rather thanfl::Channelsubclasses.Channel::showLeds()would address this specific RMT5 repro but leave other direct controller show paths fragile.Why this should not break global batching:
FastLED.show()callsshowLedsInternal()on each controller, not publicshowLeds().FastLED[n].showLeds(...)/ directcontroller.showLeds(...).Tests I would add:
channel->showLeds(255)causes the mock driver to transmit without manually callingdriver->show().FastLED.show()test confirming the driver still receives one batched flush.FastLED[0].showLeds(255)test confirming only the direct call path flushes.This keeps the old API contract: direct controller
showLeds()should actually put data on the wire. On channel-backed platforms, that now requires the same frame-end flush thatFastLED.show()already performs.nomakewan commentedon Apr 22, 2026
Confirmed that after #2377 the individual LED strips went back to working. Thanks!
fix(core): flush channel-backed drivers on direct CLEDController::sho…