Skip to content

fix(channels): emit FL_ERROR when queued LED data has no enabled driver to flush #2517

Closed

Description

@zackees

Context

The ESP32-P4 PARLIO no-output regression fixed in #2515 exposed a missing diagnostic in the channel dispatch layer.

The broken path was:

  1. Sketch called FastLED.setExclusiveDriver("PARLIO").
  2. Legacy FastLED.addLeds<WS2812B, PIN, ...>() still selected/pre-bound the RMT path before fix(esp32p4): route legacy clockless controllers through PARLIO #2515.
  3. RMT registered with ChannelManager, but exclusive-driver mode disabled it because the requested driver was PARLIO.
  4. Channel::showPixels() still encoded/enqueued LED data to the bound driver.
  5. ChannelManager::onEndFrame() only called show() on enabled drivers, so no enabled driver transmitted the queued LED data.
  6. The sketch appeared to run normally but no pin output was produced, and the user got no actionable error.

There are already diagnostics for selectDriverForChannel() returning no compatible driver, but this failure is different: a channel can have data bound/enqueued to a driver that will not be executed by the manager because the driver is disabled or otherwise not present in the enabled flush set.

Proposal

Add a loud FL_ERROR diagnostic when frame-end flush has LED data that cannot be executed by any enabled channel driver.

The diagnostic should cover at least:

  • a channel enqueues data to a driver disabled by setExclusiveDriver(...)
  • a channel has a pre-bound driver that is not registered/enabled in ChannelManager
  • ChannelManager::onEndFrame() has no enabled compatible driver to call for queued LED data

The message should name the channel if available, the intended/bound driver if available, the current exclusive-driver setting if any, and at least one actionable remediation.

Example remediation text could point users toward:

  • use the typed bus overload / compile-time binding for the intended driver
  • call FastLED.enableDrivers<fl::Bus::...>() or FastLED.enableAllDrivers() where appropriate
  • avoid setExclusiveDriver("PARLIO") with channels that are actually bound to another bus

Acceptance criteria

  • Reproduce the pre-fix(esp32p4): route legacy clockless controllers through PARLIO #2515 class of failure in a unit test or focused integration test: channel data is enqueued but the only bound driver is disabled by exclusive-driver selection.
  • FastLED.show() or ChannelManager::onEndFrame() emits an FL_ERROR instead of silently dropping the frame.
  • The error clearly says that no enabled driver will execute the queued LED data.
  • The error includes the relevant driver names / exclusive-driver state when available.
  • Normal successful flush paths do not produce the new error.

Related issues / PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions