536 {
537 const auto* currentClockless =
mChipset.ptr<ClocklessChipset>();
538 const auto* incomingClockless = config.chipset.ptr<ClocklessChipset>();
539 const auto* currentSpi =
mChipset.ptr<SpiChipsetConfig>();
540 const auto* incomingSpi = config.chipset.ptr<SpiChipsetConfig>();
541 const bool compatible = currentClockless && incomingClockless
542 ? currentClockless->timing == incomingClockless->timing &&
543 currentClockless->encoder == incomingClockless->encoder
544 : currentSpi && incomingSpi && currentSpi->timing == incomingSpi->timing &&
545 currentSpi->spiBus == incomingSpi->spiBus;
546 if (!compatible) {
547 FL_WARN(
"Channel " <<
id() <<
": applyConfig rejected, chipset conflicts with the existing binding");
548 return;
549 }
551 (config.options.mBus !=
mBus || config.options.mBusWhich !=
mBusWhich)) {
552 FL_WARN(
"Channel " <<
id() <<
": applyConfig rejected, bus conflicts with the existing binding");
553 return;
554 }
556 if (config.mName.has_value()) {
557 mName = config.mName.value();
558 }
560
562#if !FL_COLOR_PROFILE_RUNTIME && !defined(FL_IS_AVR)
563
564
566#endif
571#if FL_COLOR_PROFILE_RUNTIME
572 if (reconcileColorProfile(config.options)) {
574 }
575#endif
576 events.onChannelConfigured(*this, config);
577}
CLEDController & setLeds(CRGB *data, int nLeds) FL_NO_EXCEPT
Set the default array of LEDs to be used by this controller.
i32 id() const FL_NO_EXCEPT override
Get the channel ID.
ColorProfileStatus colorProfileStatus() const FL_NO_EXCEPT
void syncLegacySettings() FL_NO_EXCEPT
bool mStaticProfileCleared
static ChannelEvents & instance() FL_NO_EXCEPT