MCPcopy Create free account
hub / github.com/FastLED/FastLED / applyConfig

Method applyConfig

src/fl/channels/channel.cpp.hpp:287–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

285}
286
287void Channel::applyConfig(const ChannelConfig& config) {
288 mRgbOrder = config.rgb_order;
289 if (config.mName.has_value()) {
290 mName = config.mName.value();
291 }
292 setLeds(config.mLeds);
293 // Sync mSettings from incoming options so the mWhiteCfg variant survives
294 // to showPixels(). Setters below are idempotent overlays on the same data.
295 mSettings = config.options;
296 setCorrection(config.options.mCorrection);
297 setTemperature(config.options.mTemperature);
298 setDither(config.options.mDitherMode);
299 applyWhiteCfg(*this, config.options);
300 auto& events = ChannelEvents::instance();
301 events.onChannelConfigured(*this, config);
302}
303
304int Channel::getClockPin() const {
305 if (const SpiChipsetConfig* spi = mChipset.ptr<SpiChipsetConfig>()) {

Callers 1

FL_TEST_FILEFunction · 0.80

Calls 3

applyWhiteCfgFunction · 0.85
has_valueMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected