Skip to content

Channel::applyConfig drops TypedChannel bus binding and never rebinds the pixel encoder #5160

Closed

Description

@zackees

Found during review of the #5157 work. The bug is pre-existing on master and is not introduced by that branch.

Channel::applyConfig() (src/fl/channels/channel.cpp.hpp, around line 506) does two things wrong:

  1. It overwrites mBus / mBusWhich with the new config's options. Calling it on a TypedChannel<Bus::X, ...> therefore silently drops the compile-time bus binding.
  2. It ignores config.chipset, so mPixelEncoder stays bound to the original encoder.

Repro

auto ch = fl::TypedChannel<fl::Bus::BIT_BANG, fl::ClocklessChipset>::create(cfg);
ch->applyConfig(fl::ChannelConfig(pin, timing, leds));  // options.mBus defaults to AUTO
// next frame routes via AUTO/priority dispatch instead of BIT_BANG

Changing the chipset in the applied config has no effect either, because the encoder is never rebound.

Expected

Either keep the typed bus binding and rebind the encoder when the chipset changes, or reject or warn on a config that conflicts with the typed binding.

Activity

  1. added
    sanitized
    on Nov 8, 2026
  2. moved this from Triage to Done in FastLED Trackeron Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    sanitized

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions