65 i32
id()
const override {
return mId; }
120 int size()
const override;
187 template<
typename T,
typename... Args>
194 void init()
override;
fl::UISlider brightness("Brightness", BRIGHTNESS, 0, 255)
Compile-time identifier for an LED channel transmission bus.
CPixelLEDController(RegistrationMode mode)
RegistrationMode
Registration mode for constructor.
Rgbw getRgbw() const
Get the RGBW conversion mode.
void removeFromDrawList()
Remove this channel from the global controller draw list.
CRGB getTemperature()
Get the color temperature.
Channel(const Channel &) FL_NOEXCEPT=delete
const fl::ScreenMap & getScreenMap() const
Get the current screen map.
CRGB getCorrection()
Get the color correction.
fl::string getEngineName() const
Get the name of the currently bound driver (if any)
FL_NO_INLINE fl::shared_ptr< IChannelDriver > resolveDynamicDriver()
Cold slow-path helper for showPixels() when the driver was NOT pre-bound via setDriver().
void init() override
Initialize the LED controller.
static fl::string makeName(i32 id, const fl::optional< fl::string > &configName=fl::optional< fl::string >())
fl::span< CRGB > leds()
Get the LED array as a span (non-const)
int size() const override
Get the number of LEDs in this channel.
void setDriver(fl::shared_ptr< IChannelDriver > driver) FL_NOEXCEPT
Pre-bind a driver, bypassing ChannelManager::selectDriverForChannel() on every subsequent showPixels(...
EOrder getRgbOrder() const
Get the RGB channel ordering.
bool hasScreenMap() const
Check if screen map is configured.
void showPixels(PixelController< RGB, 1, 0xFFFFFFFF > &pixels) override
CLEDController * asController()
Get pointer to base CLEDController for linked list traversal.
void addToDrawList()
Add this channel to the global controller draw list.
void applyConfig(const ChannelConfig &config)
Apply reconfigurable settings from a ChannelConfig.
Channel & operator=(const Channel &) FL_NOEXCEPT=delete
int getClockPin() const
Get the clock pin for this channel (SPI only, -1 for clockless)
void showLeds(u8 brightness=255) OVERRIDE_IF_NOT_AVR
Show the LEDs with optional brightness scaling.
const ChipsetTimingConfig & getTiming() const
Get the timing configuration for this channel (clockless only)
i32 id() const override
Get the channel ID.
const ChipsetVariant & getChipset() const
Get the chipset configuration variant.
int getPin() const
Get the pin number for this channel (data pin)
ChannelDataPtr mChannelData
bool isClockless() const
Check if this is a clockless chipset.
const fl::string & name() const override
Get the channel name.
bool isSpi() const
Check if this is an SPI chipset.
Channel(const ChipsetVariant &chipset, EOrder rgbOrder, RegistrationMode mode)
Protected constructor for template subclasses (e.g., ClocklessIdf5)
bool mDisabledDriverWarned
fl::weak_ptr< IChannelDriver > mDriver
Channel & setScreenMap(const fl::XYMap &map, float diameter=-1.f)
Set screen map for JS canvas visualization from XYMap.
Channel(Channel &&) FL_NOEXCEPT=delete
virtual ~Channel() FL_NOEXCEPT
Destructor.
const CLEDController * asController() const
static ChannelPtr create(const ChannelConfig &config)
Create a new channel with optional mBus driver pinning.
fl::optional< float > getGamma() const
Get gamma correction value.
Channel & setGamma(float gamma)
Set gamma correction value.
bool isInDrawList() const
Check if this channel is in the controller draw list.
u8 getDither()
Get the dither mode.
Transmission data for a single LED channel.
LED channel for parallel output, pretty much a CPixelLEDController but with timing and pin informatio...
IChannel() FL_NOEXCEPT=default
Minimal interface for LED channel transmission drivers.
defines the templated version of the CLEDController class
Type-erased base for the templated Channel<Bus, Chipset> family.
IChannelDriver * getStubChannelEngine()
Get stub channel driver for testing or unsupported platforms.
MapRedBlackTree< Key, T, Compare, fl::allocator_slab< char > > map
fl::variant< ClocklessChipset, SpiChipsetConfig > ChipsetVariant
Bus
Driver identifier for compile-time bus selection.
@ AUTO
Sentinel: defer to DefaultBus<Chipset>::value.
shared_ptr< T > make_shared(Args &&... args) FL_NOEXCEPT
EOrder
RGB color channel orderings, used when instantiating controllers to determine what order the controll...
constexpr u32 gamma(float g) FL_NOEXCEPT
Base definition for an LED controller.
#define OVERRIDE_IF_NOT_AVR
#define FASTLED_SHARED_PTR(type)
Representation of an 8-bit RGB pixel (Red, Green, Blue)
Configuration for a single LED channel.
Optional channel configuration parameters All fields have sensible defaults and can be overridden as ...
Runtime bit-period timing for a clockless chipset.
Clockless chipset configuration (single data pin)
SPI chipset configuration (data + clock pins)