17#include "platforms/is_platform.h"
110 FL_WARN(
"Chipset has fixed R,G,B,W output; " << operation <<
" is unsupported and was ignored");
123#if defined(FL_IS_ESP32)
163 detail::enable_rgbw_conversion();
248#if FASTLED_HAS_ENGINE_EVENTS
313 template<
typename Visitor>
389 if (diameter <= 0.0f) {
fl::UISlider brightness("Brightness", BRIGHTNESS, 0, 255)
CLEDController * controller
fl::UISlider scale("Scale", 4,.1, 4,.1)
void showColorInternal(const CRGB &data, int nLeds, fl::u8 brightness) FL_NO_EXCEPT
Rgbww getRgbww() const FL_NO_EXCEPT
const Rgbw * rgbwConfig() const FL_NO_EXCEPT
virtual int lanes() FL_NO_EXCEPT
How many Lanes does this controller manage?
void showLedsInternal(fl::u8 brightness) FL_NO_EXCEPT
Write the data to the LEDs managed by this controller.
static void visitControllers(Visitor &&visitor) FL_NO_EXCEPT
Visit all controllers in the linked list with a visitor The visitor must be a callable that accepts (...
CLEDController & setRgbw(const Rgbw &arg=RgbwDefault::value()) FL_NO_EXCEPT
void applyRgbw(const Rgbw &arg) FL_NO_EXCEPT
RegistrationMode
Registration mode for constructor.
@ AutoRegister
Automatically add to linked list (default, backward compatible)
@ DeferRegister
Defer registration until addToList() is called.
CLEDController & setTemperature(CRGB temperature) FL_NO_EXCEPT
Set the color temperature, aka white point, for this controller.
void clearLedDataInternal(int nLeds=-1) FL_NO_EXCEPT
Zero out the LED data managed by this controller.
static CLEDController * head() FL_NO_EXCEPT
Get the first LED controller in the linked list of controllers.
bool getEnabled() FL_NO_EXCEPT
void settingsChanged(SettingsChange change) FL_NO_EXCEPT
CLEDController & setRgbww(const Rgbww &arg=RgbwwDefault::value()) FL_NO_EXCEPT
Configure this channel for 5-channel RGBWW (RGB + warm-W + cool-W) output.
VIRTUAL_IF_NOT_AVR void * beginShowLeds(int size) FL_NO_EXCEPT
fl::span< CRGB > ledsSpan() FL_NO_EXCEPT
Span of LEDs managed by this controller.
void setFixedRgbw(const Rgbw &arg) FL_NO_EXCEPT
Configure a chipset-owned RGBW policy that public white-channel setters cannot replace.
virtual void onSettingsChanged(SettingsChange change) FL_NO_EXCEPT
const CRGB * leds() const FL_NO_EXCEPT
Const pointer to the CRGB array for this controller.
virtual const Channel * asChannel() const FL_NO_EXCEPT
VIRTUAL_IF_NOT_AVR void clearLeds(int nLeds=-1) FL_NO_EXCEPT
Clear out/zero out the given number of LEDs.
LegacySettings mLegacySettings
virtual void show(const CRGB *data, int nLeds, fl::u8 brightness) FL_NO_EXCEPT=0
Write the passed in RGB data out to the LEDs managed by this controller.
void setEnabled(bool enabled) FL_NO_EXCEPT
CLEDController & setScreenMap(const fl::XYMap &map, float diameter=-1.f) FL_NO_EXCEPT
CLEDController & setScreenMap(fl::u16 width, fl::u16 height, float diameter=-1.f) FL_NO_EXCEPT
VIRTUAL_IF_NOT_AVR int size() const FL_NO_EXCEPT
How many LEDs does this controller manage?
CLEDController & setLeds(CRGB *data, int nLeds) FL_NO_EXCEPT
Set the default array of LEDs to be used by this controller.
CRGB getCorrection() FL_NO_EXCEPT
Get the correction value used by this controller.
fl::u8 getDither() const FL_NO_EXCEPT
Get the dithering option currently set for this controller.
VIRTUAL_IF_NOT_AVR void endShowLeds(void *data) FL_NO_EXCEPT
void showColorInternal(const CRGB &data, fl::u8 brightness) FL_NO_EXCEPT
CRGB getTemperature() FL_NO_EXCEPT
Get the color temperature, aka white point, for this controller.
bool mFixedWhiteChannel
chipset wire format owns the white policy
void removeFromDrawList() FL_NO_EXCEPT
Remove this controller from the draw list.
void showInternal(const CRGB *data, int nLeds, fl::u8 brightness) FL_NO_EXCEPT
bool rejectFixedWhiteChannelChange(const char *operation) const FL_NO_EXCEPT
CLEDController & setLeds(fl::span< CRGB > leds) FL_NO_EXCEPT
Set the default array of LEDs to be used by this controller (span version)
CRGB * leds() FL_NO_EXCEPT
Pointer to the CRGB array for this controller.
static void removeFromList(CLEDController *controller) FL_NO_EXCEPT
Remove a controller from the linked list.
CLEDController & clearWhiteChannel() FL_NO_EXCEPT
Reset this channel to plain 3-channel RGB (clears any RGBW/RGBWW configuration).
virtual fl::u16 getMaxRefreshRate() const FL_NO_EXCEPT
Gets the maximum possible refresh rate of the strip.
const CLEDController * next() const FL_NO_EXCEPT
Get the next controller in the linked list after this one (const version).
CLEDController * mPNext
pointer to the next LED controller in the linked list
CLEDController & setDither(fl::u8 ditherMode=BINARY_DITHER) FL_NO_EXCEPT
Set the dithering mode for this controller to use.
static CLEDController * mPHead
pointer to the first LED controller in the linked list
CLEDController & setCorrection(LEDColorCorrection correction) FL_NO_EXCEPT
The color corrction to use for this controller, expressed as a CRGB object.
CLEDController * next() FL_NO_EXCEPT
Get the next controller in the linked list after this one.
CRGB & operator[](int x) FL_NO_EXCEPT
Reference to the n'th LED managed by the controller.
CLEDController(RegistrationMode mode) FL_NO_EXCEPT
Protected constructor with registration mode.
virtual void showColor(const CRGB &data, int nLeds, fl::u8 brightness) FL_NO_EXCEPT=0
Set all the LEDs to a given color.
Rgbw getRgbw() const FL_NO_EXCEPT
CLEDController & setSpiBus(Esp32SpiBus bus) FL_NO_EXCEPT
Select an ESP-IDF SPI host for this clocked controller before init().
VIRTUAL_IF_NOT_AVR void showLeds(fl::u8 brightness) FL_NO_EXCEPT
CLEDController & setCorrection(CRGB correction) FL_NO_EXCEPT
The color corrction to use for this controller, expressed as a CRGB object.
CLEDController & setTemperature(ColorTemperature temperature) FL_NO_EXCEPT
Set the color temperature, aka white point, for this controller.
CRGB getAdjustment(fl::u8 scale) FL_NO_EXCEPT
Get the combined brightness/color adjustment for this controller.
virtual void init() FL_NO_EXCEPT=0
Initialize the LED controller.
fl::span< CRGB > mLeds
span of LED data used by this controller
CLEDController & setScreenMap(const fl::ScreenMap &map) FL_NO_EXCEPT
LED channel for parallel output, pretty much a CPixelLEDController but with timing and pin informatio...
static void onBeginFrame() FL_NO_EXCEPT
static void onEndShowLeds() FL_NO_EXCEPT
static void onEndFrame() FL_NO_EXCEPT
static void onCanvasUiSet(CLEDController *strip, const ScreenMap &xymap) FL_NO_EXCEPT
static XYMap constructRectangularGrid(u16 width, u16 height, u16 offset=0) FL_NO_EXCEPT
fl::CLEDController CLEDController
#define VIRTUAL_IF_NOT_AVR
#define FASTLED_UNUSED(x)
#define BINARY_DITHER
Enable dithering using binary dithering (only option)
Declares dithering options and types.
ColorTemperature
Color temperature values.
LEDColorCorrection
Color correction starting points.
Centralized logging categories for FastLED hardware interfaces and subsystems.
void enable_rgbww_conversion() FL_NO_EXCEPT
Installs the RGBWW pixel conversion (see enable_rgbw_conversion, #4795).
void enable_rgbw_power_estimate() FL_NO_EXCEPT
Lets the power limiter charge a controller's RGBW conversion.
Compile-time linker keep-alive hook for a single fl::Bus.
Esp32SpiBus
ESP-IDF SPI host selection for an individual clocked LED controller.
u8 u8 fract8 blur_amount FL_NO_EXCEPT
constexpr int type_rank< T >::value
MapRedBlackTree< Key, T, Compare, fl::allocator_slab< char > > map
void prepare_rgbw_colorimetric(const Rgbw &) FL_NO_EXCEPT
uptr ptr_to_int(T *ptr) FL_NO_EXCEPT
T * int_to_ptr(uptr value) FL_NO_EXCEPT
Base definition for an LED controller.
Low level pixel data writing class.
#define FL_STATIC_ASSERT(...)
Color adjustment structure for pixel output.
static CRGB computeAdjustment(u8 scale, const CRGB &colorCorrection, const CRGB &colorTemperature) FL_NO_EXCEPT
Calculates the combined color adjustment to the LEDs at a given scale, color correction,...
Representation of an 8-bit RGB pixel (Red, Green, Blue)
static Rgbww value() FL_NO_EXCEPT