Repository navigation
fix(channels): register pre-bound legacy driver with ChannelManager (closes #2493) - #2498
Conversation
…loses #2493) PR #2469 made driver TUs opt-in: only the platform-default driver was expected to link, via the Phase 5b `setDriver()` pre-bind in the legacy clockless controller. The pre-bind correctly short-circuits per-frame `selectDriverForChannel()` lookups, but it never registers the driver with `ChannelManager`. `ChannelManager::onEndFrame()` iterates `mDrivers` to call `driver->show()` -- with `mDrivers` empty, the encoded pixel data sits enqueued and never reaches the hardware. Symptoms (matching #2493 user reports on ESP32-S3 / RMT and ESP32-P4 / PARLIO with the stock `addLeds<>` API after the channels refactor): - `FastLED.show()` returns in ~1.4ms with no errors - Serial reports ~170+ FPS - No data burst on the LED data pin Fix: - `ClocklessIdf5` constructor calls `BusTraits<Bus::RMT>::registerWithManager()` before the existing `setDriver()` pre-bind. This adds the driver to `mDrivers` so `onEndFrame()` finds it and triggers transmission. The pre-bind is retained so per-frame `selectDriverForChannel()` is still skipped -- preserves the memory/perf intent of #2469. - `ChannelManager::addDriver()` is now idempotent for true duplicates (same `shared_ptr` at same priority). Each `addLeds<>` template instantiation calls `registerWithManager()` from its constructor, so multiple controllers on the same Bus would otherwise spam "Replacing existing driver" warnings and `waitForReady()` flushes on every instantiation. Verified on ESP32-S3 (COM13) via `bash autoresearch --rmt`: 4/4 multi-run RMT test patterns pass with correct captured data on the internal RX loopback. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
The flag was previously documented as deprecated and ignored, leaving no escape hatch when fbuild's zccache daemon is wedged (e.g., recv timeout on the cache daemon after a stale process or a corrupted cache state). Restore its original purpose: passing `--no-fbuild` now selects the existing-but-dormant `PlatformIODriver` for the build + upload path, while the default remains `FbuildDriver`. This was needed to verify the fix for #2493 when fbuild was broken on the host. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe PR introduces three coordinated changes: ChangesDriver registration and selection refactor
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
addLeds<>path on ESP32-S3 / RMT (and other platforms) silently stopped pushing data:FastLED.show()returns in ~1.4ms, serial reports ~170+ FPS, but no LED data appears on the pin. TheClocklessIdf5constructor pre-binds the driver viasetDriver()(soshowPixels()skips per-frameselectDriverForChannel()), but the pre-bind never registers the driver withChannelManager::mDrivers— soonEndFrame()iterates an empty list anddriver->show()is never called. Encoded pixels sit enqueued and never transmit.ClocklessIdf5constructor now callsBusTraits<Bus::RMT>::registerWithManager()before the existingsetDriver()pre-bind. This wires the driver intomDriverssoonEndFrame()triggersshow(). The pre-bind itself is retained so per-frame priority dispatch is still skipped — preserves the memory/perf intent of feat(channels): remove FASTLED_DISABLE_LEGACY_DRIVER_REGISTRY (default-as-opt-in, closes binary-bloat half of #2421) #2469.ChannelManager::addDriver()now silently no-ops when the sameshared_ptris added at the same priority, so the registration call from everyaddLeds<>template instantiation doesn't spam "Replacing existing driver" warnings or triggerwaitForReady()on each instantiation.--no-fbuildonbash autoresearchto select the dormant PlatformIO backend. This was the escape hatch needed when fbuild's zccache daemon was wedged on my host; the flag was previously documented as deprecated and ignored.Closes #2493.
Test plan
bash autoresearch --rmt --no-fbuild— 4/4 multi-run RMT test patterns pass with correct captured data on the internal RX loopback.Notes
src/forsetDriver\(BusTraits<returns one hit, so no other legacy clockless controllers use this pre-bind pattern.bus_traits.hspecialization but theaddLeds<>template path does not pre-bind via PARLIO'sBusTraits. Follow-up may need a similar fix in any other legacy clockless controller wired through the channels API.🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes