85 mSettings.mWhiteCfg.reset();
87 mSettings.mWhiteCfg = arg;
147#if FASTLED_HAS_ENGINE_EVENTS
153#if FASTLED_HAS_ENGINE_EVENTS
219 template<
typename Visitor>
294 if (diameter <= 0.0f) {
fl::UISlider brightness("Brightness", BRIGHTNESS, 0, 255)
CLEDController * controller
fl::UISlider scale("Scale", 4,.1, 4,.1)
const CLEDController * next() const FL_NOEXCEPT
Get the next controller in the linked list after this one (const version).
CLEDController & setCorrection(CRGB correction) FL_NOEXCEPT
The color corrction to use for this controller, expressed as a CRGB object.
virtual void * beginShowLeds(int size) FL_NOEXCEPT
VIRTUAL_IF_NOT_AVR void showLeds(fl::u8 brightness) FL_NOEXCEPT
void showInternal(const CRGB *data, int nLeds, fl::u8 brightness) FL_NOEXCEPT
void clearLedDataInternal(int nLeds=-1) FL_NOEXCEPT
Zero out the LED data managed by this controller.
CLEDController & setRgbw(const Rgbw &arg=RgbwDefault::value()) FL_NOEXCEPT
Rgbww getRgbww() const FL_NOEXCEPT
virtual void endShowLeds(void *data) FL_NOEXCEPT
static CLEDController * mPTail
pointer to the last LED controller in the linked list
fl::u8 getDither() FL_NOEXCEPT
Get the dithering option currently set for this controller.
void removeFromDrawList() FL_NOEXCEPT
Remove this controller from the draw list.
void showColorInternal(const CRGB &data, fl::u8 brightness) FL_NOEXCEPT
CLEDController & setScreenMap(const fl::ScreenMap &map) FL_NOEXCEPT
RegistrationMode
Registration mode for constructor.
@ AutoRegister
Automatically add to linked list (default, backward compatible)
@ DeferRegister
Defer registration until addToList() is called.
CLEDController & setRgbww(const Rgbww &arg=RgbwwDefault::value()) FL_NOEXCEPT
Configure this channel for 5-channel RGBWW (RGB + warm-W + cool-W) output.
bool isInList() const FL_NOEXCEPT
Check if this controller is in the linked list.
virtual void show(const CRGB *data, int nLeds, fl::u8 brightness) FL_NOEXCEPT=0
Write the passed in RGB data out to the LEDs managed by this controller.
CLEDController & clearWhiteChannel() FL_NOEXCEPT
Reset this channel to plain 3-channel RGB (clears any RGBW/RGBWW configuration).
const CRGB * leds() const FL_NOEXCEPT
Const pointer to the CRGB array for this controller.
CLEDController & setLeds(CRGB *data, int nLeds) FL_NOEXCEPT
Set the default array of LEDs to be used by this controller.
void showLedsInternal(fl::u8 brightness) FL_NOEXCEPT
Write the data to the LEDs managed by this controller.
CLEDController(RegistrationMode mode) FL_NOEXCEPT
Protected constructor with registration mode.
CLEDController & setLeds(fl::span< CRGB > leds) FL_NOEXCEPT
Set the default array of LEDs to be used by this controller (span version)
CLEDController & setDither(fl::u8 ditherMode=BINARY_DITHER) FL_NOEXCEPT
Set the dithering mode for this controller to use.
CLEDController * next() FL_NOEXCEPT
Get the next controller in the linked list after this one.
virtual void init() FL_NOEXCEPT=0
Initialize the LED controller.
void setEnabled(bool enabled) FL_NOEXCEPT
CLEDController & setScreenMap(const fl::XYMap &map, float diameter=-1.f) FL_NOEXCEPT
CLEDController & setTemperature(ColorTemperature temperature) FL_NOEXCEPT
Set the color temperature, aka white point, for this controller.
CRGB * leds() FL_NOEXCEPT
Pointer to the CRGB array for this controller.
virtual fl::u16 getMaxRefreshRate() const FL_NOEXCEPT
Gets the maximum possible refresh rate of the strip.
void addToList() FL_NOEXCEPT
Add this controller to the linked list.
static void visitControllers(Visitor &&visitor) FL_NOEXCEPT
Visit all controllers in the linked list with a visitor The visitor must be a callable that accepts (...
fl::span< CRGB > ledsSpan() FL_NOEXCEPT
Span of LEDs managed by this controller.
Rgbw getRgbw() const FL_NOEXCEPT
CRGB getAdjustment(fl::u8 scale) FL_NOEXCEPT
Get the combined brightness/color adjustment for this controller.
CLEDController() FL_NOEXCEPT
Create an led controller object, add it to the chain of controllers.
ChannelOptions mSettings
Optional channel settings (correction, temperature, dither, rgbw, affinity)
static void removeFromList(CLEDController *controller) FL_NOEXCEPT
Remove a controller from the linked list.
virtual int size() const FL_NOEXCEPT
How many LEDs does this controller manage?
CLEDController * mPNext
pointer to the next LED controller in the linked list
static CLEDController * mPHead
pointer to the first LED controller in the linked list
CRGB getCorrection() FL_NOEXCEPT
Get the correction value used by this controller.
CLEDController & setTemperature(CRGB temperature) FL_NOEXCEPT
Set the color temperature, aka white point, for this controller.
ColorAdjustment getAdjustmentData(fl::u8 brightness) FL_NOEXCEPT
static CLEDController * head() FL_NOEXCEPT
Get the first LED controller in the linked list of controllers.
bool getEnabled() FL_NOEXCEPT
CRGB getTemperature() FL_NOEXCEPT
Get the color temperature, aka white point, for this controller.
CLEDController & setCorrection(LEDColorCorrection correction) FL_NOEXCEPT
The color corrction to use for this controller, expressed as a CRGB object.
virtual void showColor(const CRGB &data, int nLeds, fl::u8 brightness) FL_NOEXCEPT=0
Set all the LEDs to a given color.
VIRTUAL_IF_NOT_AVR void clearLeds(int nLeds=-1) FL_NOEXCEPT
Clear out/zero out the given number of LEDs.
CLEDController & setScreenMap(fl::u16 width, fl::u16 height, float diameter=-1.f) FL_NOEXCEPT
void showColorInternal(const CRGB &data, int nLeds, fl::u8 brightness) FL_NOEXCEPT
fl::span< CRGB > mLeds
span of LED data used by this controller
CRGB & operator[](int x) FL_NOEXCEPT
Reference to the n'th LED managed by the controller.
virtual int lanes() FL_NOEXCEPT
How many Lanes does this controller manage?
static void onEndShowLeds() FL_NOEXCEPT
static void onCanvasUiSet(CLEDController *strip, const ScreenMap &xymap) FL_NOEXCEPT
static void onEndFrame() FL_NOEXCEPT
static void onBeginFrame() FL_NOEXCEPT
static XYMap constructRectangularGrid(u16 width, u16 height, u16 offset=0) FL_NOEXCEPT
#define BINARY_DITHER
Enable dithering using binary dithering (only option)
Declares dithering options and types.
ColorTemperature
Color temperature values.
LEDColorCorrection
Color correction starting points.
constexpr int type_rank< T >::value
T * int_to_ptr(uptr value) FL_NOEXCEPT
uptr ptr_to_int(T *ptr) FL_NOEXCEPT
MapRedBlackTree< Key, T, Compare, fl::allocator_slab< char > > map
Base definition for an LED controller.
#define VIRTUAL_IF_NOT_AVR
#define FASTLED_UNUSED(x)
Color adjustment structure for pixel output.
static CRGB computeAdjustment(u8 scale, const CRGB &colorCorrection, const CRGB &colorTemperature) FL_NOEXCEPT
Calculates the combined color adjustment to the LEDs at a given scale, color correction,...
Representation of an 8-bit RGB pixel (Red, Green, Blue)
Optional channel configuration parameters All fields have sensible defaults and can be overridden as ...
static Rgbww value() FL_NOEXCEPT
Per-strip RGBWW configuration.