Skip to content

Consolidate RMT channel failure logging - #3905

Merged
zackees merged 1 commit into
masterfrom
fix/2983-rmt-create-channel-errors
Aug 19, 2026
Merged

zackees merged 1 commit into
masterfrom
fix/2983-rmt-create-channel-errors

Conversation

@zackees

@zackees zackees commented Aug 19, 2026 •

Copy link
Copy Markdown
Member

Summary

  • move createChannel and network-reconfiguration warning formatting into one cold, noinline structured-event helper
  • extract callback-registration rollback from the normal reconfiguration loop into a cold helper
  • demote successful non-DMA channel creation from warning to opt-in RMT logging
  • compile warning-only helpers, calls, arguments, and literals away when FL_HAS_WARN=0`n

Verification

  • �ash test tests/platforms/esp/32/drivers/rmt/rmt_5/channel_driver_rmt.cppn- �ash lint --cppn- git diff --check`n- clud-review: clean after follow-up

Measurement note

  • �ash bloat esp32s3 found stale metadata pointing to a missing ARM nm
  • �ash bloat esp32s3 --build exhausted the full 15-minute platform-build allowance without producing an ELF; the timed-out process tree was audited and terminated
  • numeric ESP32-S3 symbol thresholds therefore remain an environment verification gap

Fixes #2983

Summary by CodeRabbit

  • Bug Fixes
    • Improved handling of channel allocation and reconfiguration failures.
    • Added clearer diagnostic warnings for DMA, encoder, networking, and callback failures.
    • Improved resource cleanup when channel setup callbacks fail.
    • Adjusted non-DMA channel messages for more appropriate logging visibility.

@zackees
zackees merged commit a098852 into master Aug 19, 2026
10 of 16 checks passed
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Aug 19, 2026
@zackees
zackees deleted the fix/2983-rmt-create-channel-errors branch August 19, 2026 03:39
@coderabbitai

coderabbitai Bot commented Aug 19, 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: 4cfdff94-89d5-4e60-a823-b58852999740

📥 Commits

Reviewing files that changed from the base of the PR and between 9fda1a9 and f1fb9c5.

📒 Files selected for processing (1)
  • src/platforms/esp/32/drivers/rmt/rmt_5/channel_driver_rmt.cpp.hpp

📝 Walkthrough

Walkthrough

The RMT5 channel driver now centralizes allocation and creation warnings through cold event emission. It also centralizes callback-registration failure cleanup, releases recreated resources, resets channel state, and demotes successful channel creation output to RMT logging.

Changes

RMT5 channel failure handling

Layer / File(s) Summary
Centralized channel warnings
src/platforms/esp/32/drivers/rmt/rmt_5/channel_driver_rmt.cpp.hpp
Adds warning events and a cold emitter for DMA conflicts, allocation failures, encoder failures, and channel failures. Channel creation paths use the emitter under FL_HAS_WARN. Successful channel creation uses FL_LOG_RMT_F.
Callback failure rollback
src/platforms/esp/32/drivers/rmt/rmt_5/channel_driver_rmt.cpp.hpp
Adds a cold callback-failure helper that emits a warning, releases recreated resources, updates DMA usage, and resets channel state. Network reconfiguration uses the helper and centralized channel-failure emission.

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

Possibly related PRs

  • FastLED/FastLED#3903: Both changes centralize cold diagnostic and failure handling in the RMT5 channel driver.
  • FastLED/FastLED#3902: Both changes refactor RMT5 warning logging around the shared FL_HAS_WARN gate.
✨ 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 fix/2983-rmt-create-channel-errors

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.

bloat: consolidate error log sites in ChannelEngineRMTImpl::reconfigureForNetwork + createChannel through expected<>::failure

1 participant