You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Channel::applyConfig drops TypedChannel bus binding and never rebinds the pixel encoder #5160
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:
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.
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