FastLED 3.10.8
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 359 of file channel.cpp.hpp.

361 : CPixelLEDController<RGB>(RegistrationMode::DeferRegister) // Defer registration until FastLED.add()
362 , mChipset(ClocklessChipset(pin, timing)) // Convert to variant
364 , mRgbOrder(rgbOrder)
365 , mDriver() // Empty weak_ptr - late binding on first showPixels()
366 , mBus(options.mBus) // Bus selection (#2459)
367 , mBusWhich(options.mBusWhich)
368 , mId(nextId())
369 , mName(makeName(mId)) {
370 // NOTE: Do NOT call fl::pinMode() here — see comment in the
371 // Channel(ChipsetVariant, span, EOrder, ChannelOptions) constructor.
372
373 // Set the LED data array
374 setLeds(leds);
375
376 // Channels owns its options; synchronize the base rendering fields.
377 mSettings = options;
378
379 // Set color correction/temperature/dither/rgbw from ChannelOptions
381
382 // Create ChannelData during construction
384}
@ 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:415
static i32 nextId() FL_NO_EXCEPT
fl::u8 mBusWhich
Definition channel.h:439
ChipsetVariant mChipset
Definition channel.h:413
PixelEncoder mPixelEncoder
Definition channel.h:414
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:457
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:433
const i32 mId
Definition channel.h:455
fl::string mName
Definition channel.h:456
ChannelOptions mSettings
Definition channel.h:459
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: