Skip to content

Shrink RMT pending channel dispatch failures - #3903

Merged
zackees merged 1 commit into
masterfrom
fix/2980-rmt-pending-log-dispatch
Aug 19, 2026
Merged

zackees merged 1 commit into
masterfrom
fix/2980-rmt-pending-log-dispatch

Conversation

@zackees

@zackees zackees commented Aug 19, 2026 •

Copy link
Copy Markdown
Member

Summary

  • move all pending-channel dispatch logs into one noinline cold formatter
  • consolidate repeated failed-transmission resource cleanup in one cold helper
  • add FL_HAS_RMT_LOG as the resolved zero-cost category gate

Verification

  • bash test log
  • bash test channel_driver_rmt
  • bash lint --cpp
  • git diff --check
  • /clud-review clean

Fixes #2980

Summary by CodeRabbit

  • Bug Fixes
    • Improved reliability when RMT channel setup, encoder reset, or transmission fails.
    • Ensured failed operations consistently release associated channels and buffers.
  • New Features
    • Added a status indicator for whether RMT logging is available.
    • Added clearer diagnostic warnings and log output for pending RMT channel issues when supported.
  • Tests
    • Added coverage confirming the RMT logging status is always reported as enabled or disabled.

@zackees
zackees merged commit 824205b into master Aug 19, 2026
9 of 17 checks passed
@zackees
zackees deleted the fix/2980-rmt-pending-log-dispatch branch August 19, 2026 02:56
@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: 779db612-81c9-412e-b21a-7b60df74f101

📥 Commits

Reviewing files that changed from the base of the PR and between 877d1b4 and aee6aad.

📒 Files selected for processing (3)
  • src/fl/log/log.h
  • src/platforms/esp/32/drivers/rmt/rmt_5/channel_driver_rmt.cpp.hpp
  • tests/fl/log/log.hpp

📝 Walkthrough

Walkthrough

RMT logging now depends on both logging and warning gates. Pending-channel diagnostics use gated dispatching, and transmission failure paths share cleanup logic. Tests validate the FL_HAS_RMT_LOG macro.

Changes

RMT logging and channel cleanup

Layer / File(s) Summary
RMT logging gate
src/fl/log/log.h, tests/fl/log/log.hpp
FL_HAS_RMT_LOG resolves to 1 only when RMT logging and warnings are enabled. The test checks that the macro exists and has value 0 or 1.
Pending-channel diagnostics
src/platforms/esp/32/drivers/rmt/rmt_5/channel_driver_rmt.cpp.hpp
Pending-channel encoder and buffer failures use a no-inline dispatcher for gated warning and RMT log messages.
Shared failure cleanup
src/platforms/esp/32/drivers/rmt/rmt_5/channel_driver_rmt.cpp.hpp
Enable, encoder-reset, and transmit failures use shared cleanup for channel disabling, buffer release, span clearing, and channel release.

Estimated code review effort: 2 (Simple) | ~15 minutes

Possibly related PRs

✨ 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/2980-rmt-pending-log-dispatch

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: reduce dispatch-loop landing pad count in ChannelEngineRMTImpl::processPendingChannels

1 participant