Repository navigation
refactor(channels): bind RMT5 pixel encoder at construction - #4563
Conversation
Select the encoder once for generic channels, and bind the compile-time RMT5 path directly to WS2812 so unused encoders can be stripped from Blink builds. Refs #2981.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: FastLED/FastLED/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughChannel now selects a pixel encoder from the chipset during construction. ChangesChannel Encoder Dispatch
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Refactor Sequence Diagram(s)sequenceDiagram
participant Channel
participant PixelEncoder
participant PixelIterator
participant encodeManagedSpi
Channel->>PixelEncoder: invoke mPixelEncoder from showPixels
alt Managed SPI hook succeeds
PixelEncoder->>encodeManagedSpi: encode managed SPI pixels
else Legacy writer path
PixelEncoder->>PixelIterator: call chipset-specific write method
end
Merge Risk: ⚪ Minimal · up to No identified encoding regression remains; the change is mergeable after normal checks. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Linked Issues checkExplanation For
✨ Finishing Touches 💡 1📝 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
Channelinstances.Channel::create(config)path retains runtime encoder selection.Bloat analysis
Matched ESP32-S3
Blinkbefore/after builds usingbash bloat esp32s3 --example Blink --build --top 200and Xtensa GCC 14.2. Both reports use base commit26c60462.Channel::showPixelsIn the after Blink symbol report, only the WS2812 encoder callback/writer remain among the encoder symbols (
Channel::encodeWS281215 B,ws2812PixelEncoder8 B, andPixelIterator::writeWS2812313 B); unused SPI and other encoder paths are stripped from this build.These savings are specific to the compile-time RMT5 Blink path.
showPixelsremains above the issue's <1 KB criterion, and frame-time impact has not been benchmarked, so this PR references rather than closes #2981.Validation
bash test channel --quickbash test color_managed_source --quickbash lint --cpp src/fl/channels/channel.cpp.hpp src/fl/channels/channel.h src/platforms/esp/32/drivers/rmt/rmt_5/idf5_clockless.hBlinkbloat before/after buildsApa102example build (generic SPI path smoke check)Refs #2981
Summary by CodeRabbit