Skip to content

feat(tm1812): add RGBCCT frame encoder - #3911

Merged
zackees merged 1 commit into
masterfrom
feat/995-tm1812-rgbww
Aug 20, 2026
Merged

zackees merged 1 commit into
masterfrom
feat/995-tm1812-rgbww

Conversation

@zackees

@zackees zackees commented Aug 20, 2026 •

Copy link
Copy Markdown
Member

Summary

  • add a TM1812 RGB+CCT encoder for the Channels API
  • pack two logical five-byte RGBWW pixels into each 12-byte/96-bit IC frame, zero-filling the two unused channels
  • add datasheet-backed 800 kHz timing and odd-pixel padding coverage
  • document the Channels API path in the RGBWW example while preserving the legacy continuous-RGB TM1812 controller

Validation

No physical TM1812 strip was available; protocol framing and timing were validated against the TM1812 V1.4 datasheet and unit tests.

Closes #995

Summary by CodeRabbit

  • New Features

    • Added support for TM1812 RGBWW/RGBCCT LED strips, including dedicated timing and pixel encoding.
    • Added a public timing configuration for TM1812 RGBWW controllers.
    • Updated the RGBWW example to demonstrate WS2812 configuration and document TM1812 alternatives.
  • Bug Fixes

    • TM1812 RGBWW channels now correctly encode and transmit pixel data.
  • Tests

    • Added coverage for empty inputs, pixel packing, padding, odd pixel counts, and repeated frames.

Pack two five-channel RGBWW pixels into each 12-byte TM1812 IC frame and expose datasheet-backed timing through the Channels API.

Closes #995
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Aug 20, 2026
@zackees
zackees merged commit 4c7c5df into master Aug 20, 2026
9 of 17 checks passed
@zackees
zackees deleted the feat/995-tm1812-rgbww branch August 20, 2026 06:32
@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Aug 20, 2026
@coderabbitai

coderabbitai Bot commented Aug 20, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 451c104d-fde4-49a4-8a07-e330f0d6d295

📥 Commits

Reviewing files that changed from the base of the PR and between 9d2c9e8 and 15b102d.

📒 Files selected for processing (9)
  • examples/RGBWW/RGBWW.ino
  • src/FastLED.h
  • src/fl/channels/channel.cpp.hpp
  • src/fl/chipsets/clockless_encoder.h
  • src/fl/chipsets/encoders/pixel_iterator.h
  • src/fl/chipsets/encoders/tm1812.h
  • src/fl/chipsets/led_timing.h
  • tests/fl/chipsets/encoders.cpp
  • tests/fl/chipsets/encoders/tm1812.hpp

📝 Walkthrough

Walkthrough

Changes

The PR adds TM1812 RGBWW timing and frame encoding. Channel::showPixels dispatches RGBWW data to the new encoder. Tests cover packing and padding. The RGBWW example and documentation describe the configuration.

TM1812 RGBWW support

Layer / File(s) Summary
Timing contract
src/fl/chipsets/clockless_encoder.h, src/fl/chipsets/led_timing.h
Adds the TM1812 RGBWW encoder selector and timing trait.
Encoding pipeline
src/fl/chipsets/encoders/tm1812.h, src/fl/chipsets/encoders/pixel_iterator.h, src/fl/channels/channel.cpp.hpp
Encodes two five-channel pixels per 12-byte frame and dispatches the encoder from Channel::showPixels.
Validation and usage integration
tests/fl/chipsets/encoders/tm1812.hpp, tests/fl/chipsets/encoders.cpp, examples/RGBWW/RGBWW.ino, src/FastLED.h
Adds encoder tests and documents RGBWW timing and Channels API usage.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ChannelShowPixels
  participant PixelIterator
  participant TM1812Encoder
  ChannelShowPixels->>PixelIterator: writeTM1812RGBWW(&data)
  PixelIterator->>TM1812Encoder: encodeTM1812_RGBWW(scaled RGBWW range)
  TM1812Encoder-->>PixelIterator: encoded TM1812 frames
  PixelIterator-->>ChannelShowPixels: channel data
Loading
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/995-tm1812-rgbww

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

TM1812 RGBCCT Support

1 participant