FastLED 3.10.10
Loading...
Searching...
No Matches

◆ Channel() [2/4]

fl::Channel::Channel ( int pin,
const ChipsetTimingConfig & timing,
fl::span< CRGB > leds,
EOrder rgbOrder,
const ChannelOptions & options )
private

Backwards-compatible constructor (deprecated)

Deprecated
Use variant-based constructor instead

Definition at line 361 of file channel.cpp.hpp.

363 : CPixelLEDController<RGB>(RegistrationMode::DeferRegister) // Defer registration until FastLED.add()
364 , mChipset(ClocklessChipset(pin, timing)) // Convert to variant
366 , mRgbOrder(rgbOrder)
367 , mDriver() // Empty weak_ptr - late binding on first showPixels()
368 , mBus(options.mBus) // Bus selection (#2459)
369 , mBusWhich(options.mBusWhich)
370 , mId(nextId())
371 , mName(makeName(mId)) {
372 // NOTE: Do NOT call fl::pinMode() here — see comment in the
373 // Channel(ChipsetVariant, span, EOrder, ChannelOptions) constructor.
374
375 // Set the LED data array
376 setLeds(leds);
377
378 // Channels owns its options; synchronize the base rendering fields.
379 mSettings = options;
380
381 // Set color correction/temperature/dither/rgbw from ChannelOptions
383
384 // Create ChannelData during construction
386}
@ DeferRegister
Defer registration until addToList() is called.
CLEDController & setLeds(CRGB *data, int nLeds) FL_NO_EXCEPT
Set the default array of LEDs to be used by this controller.
EOrder mRgbOrder
Definition channel.h:417
static i32 nextId() FL_NO_EXCEPT
fl::u8 mBusWhich
Definition channel.h:441
ChipsetVariant mChipset
Definition channel.h:415
PixelEncoder mPixelEncoder
Definition channel.h:416
static fl::string makeName(i32 id, const fl::optional< fl::string > &configName=fl::optional< fl::string >()) FL_NO_EXCEPT
fl::span< CRGB > leds() FL_NO_EXCEPT
Get the LED array as a span (non-const)
ChannelDataPtr mChannelData
Definition channel.h:454
static PixelEncoder selectPixelEncoder(const ChipsetVariant &) FL_NO_EXCEPT
The chipset is fixed when a Channel is constructed, so bind its pixel encoder once instead of switchi...
void syncLegacySettings() FL_NO_EXCEPT
fl::weak_ptr< IChannelDriver > mDriver
Definition channel.h:435
const i32 mId
Definition channel.h:452
fl::string mName
Definition channel.h:453
ChannelOptions mSettings
Definition channel.h:456
static ChannelDataPtr create(const ChipsetVariant &chipset, fl::vector_psram< u8 > &&encodedData=fl::vector_psram< u8 >(), ChannelPixelFormat pixelFormat=ChannelPixelFormat::RGB) FL_NO_EXCEPT
Create channel transmission data (modern variant-based API)
Definition data.cpp.hpp:12

References CPixelLEDController< RGB >::CPixelLEDController(), fl::ChannelData::create(), fl::CLEDController::DeferRegister, fl::FL_NO_EXCEPT, leds(), makeName(), mBus, mBusWhich, mChannelData, mChipset, mDriver, mId, mName, mPixelEncoder, mRgbOrder, mSettings, nextId(), selectPixelEncoder(), fl::CLEDController::setLeds(), and syncLegacySettings().

+ Here is the call graph for this function: