You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up to #5356. This stacks on #5477 because it uses the encoder status introduced there.
TM1812, TM1908 and UCS7604 could submit a truncated clockless frame when the output vector failed to grow. Their encoders now verify the protocol frame length. The channel drops incomplete frames before it notifies listeners, submits to the driver or advances dither. A later show can retry after allocation recovers.
The runtime regression covers WS2812, TM1812, TM1908 and UCS7604. The original code failed with a partial TM1812 submission under sanitizers. The completed change passed the focused sanitizer run and changed-file lint. Full host validation is running.
Summary by CodeRabbit
Bug Fixes
Improved reliability for UCS7604, TM1812, and TM1908 lighting output. Frames with invalid or incomplete sizes are now reported as failed rather than successful.
When memory allocation temporarily prevents a frame from being completed, the incomplete frame is not captured and the dither phase does not advance. After allocation is available again, the encoder can produce a frame of the expected size.
CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.
Parsing warnings: 1
Validation error: Unrecognized key: "enabled" at "reviews.pre_merge_checks"
If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
No actionable comments were generated in the recent review.
Walkthrough
Clockless encoders now check that encoded output matches expected frame sizes and report failures when checks fail. Tests cover allocation failure and retry behavior for WS2812, TM1812, TM1908, and UCS7604.
UCS7604 checks for overflow and verifies its encoded size. TM1812 RGBWW and TM1908 verify their expected frame sizes. UCS7604 propagates the encoding result.
Allocation-failure and retry coverage tests/unit/fl/channels/channel.cpp
A table-driven test covers four clockless encoders. It checks that allocation failure produces no captured frame or encoded event and does not advance the dither phase, then checks that a retry captures the expected frame and emits one encoded event.
Issue 5492, item 1, tracks the clockless incomplete-frame behavior after allocation failure. This change addresses that item.
Possibly related PRs
FastLED/FastLED#5475: Both changes address incomplete clockless frames; this PR adds size checks for TM1812, TM1908, and UCS7604 and tests WS2812 as well.
FastLED/FastLED#5477: This PR uses the encoder status introduced by the base PR to report clockless encoding failures.
Merge Risk: Minimal · up to 36bc6
The change stops incomplete clockless frames from being submitted when an allocation fails, and a later show can retry. Tests cover four chipsets. No merge-blocking risk is visible.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title names the main change: clockless chipset encoders (TM1812, TM1908, UCS7604) now reject incomplete frames. The changeset matches this. The summary confirms that writeUCS7604 and the TM1812/TM…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: clockless chipset encoders (TM1812, TM1908, UCS7604) now reject incomplete frames. The changeset matches this. The summary confirms that writeUCS7604 and the TM1812/TM1908 encoders verify frame size and return failure on mismatch, and that the channel propagates the failure. The title uses the fix(channels) convention and is short, specific, and clear.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Fix failing CI checks
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Reviewing files that changed from the base of the PR and between bc3caab and 36bc6d5.
Files selected for processing: 2
src/fl/channels/channel.cpp.hpp
tests/unit/fl/channels/channel.cpp
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
Change in examples/Blink per target. The left number is this PR's image flash / attributed RAM in bytes; the colored delta is the change from the merge base (red ↑ is larger, green ↓ is smaller, Same is unchanged).
Target
FLASH [bytes]
RAM [bytes]
attiny85
2,460 (Same)
136 (Same)
esp32c3
322,844 (Same)
13,814 (Same)
esp32c6
351,430 (Same)
17,905 (Same)
esp32s3
318,723 ($\color{red}\uparrow$ 4)
22,519 (Same)
esp8266
264,607 (Same)
6,808 (Same)
nrf52840_dk
66,976 (Same)
19,468 (Same)
rp2040
102,004 (Same)
8,624 (Same)
stm32f103c8
21,676 (Same)
1,789 (Same)
teensy41
46,080 (Same)
21,738 (Same)
uno
3,644 (Same)
134 (Same)
No comparison (build missing on one side): esp32dev
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ci-fullRun the complete release-equivalent CI matrix on this PR SHA
1 participant
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #5356. This stacks on #5477 because it uses the encoder status introduced there.
TM1812, TM1908 and UCS7604 could submit a truncated clockless frame when the output vector failed to grow. Their encoders now verify the protocol frame length. The channel drops incomplete frames before it notifies listeners, submits to the driver or advances dither. A later show can retry after allocation recovers.
The runtime regression covers WS2812, TM1812, TM1908 and UCS7604. The original code failed with a partial TM1812 submission under sanitizers. The completed change passed the focused sanitizer run and changed-file lint. Full host validation is running.
Summary by CodeRabbit