198 if (diameter <= 0.0f) {
XYMap xymap(WIDTH, HEIGHT, SERPENTINE)
central include file for FastLED, defines the CFastLED class/object
UISlider brightness("Brightness", 128, 0, 255, 1)
CLEDController & setTemperature(ColorTemperature temperature)
Set the color temperature, aka white point, for this controller.
CRGB getCorrection()
Get the correction value used by this controller.
CLEDController * next()
Get the next controller in the linked list after this one.
virtual int lanes()
How many Lanes does this controller manage?
static CLEDController * m_pHead
pointer to the first LED controller in the linked list
CRGB getAdjustment(fl::u8 scale)
Get the combined brightness/color adjustment for this controller.
VIRTUAL_IF_NOT_AVR void showLeds(fl::u8 brightness)
CRGB * m_Data
pointer to the LED data used by this controller
CRGB & operator[](int x)
Reference to the n'th LED managed by the controller.
virtual void endShowLeds(void *data)
CRGB m_ColorCorrection
CRGB object representing the color correction to apply to the strip on show()
CLEDController & setScreenMap(fl::u16 width, fl::u16 height, float diameter=-1.f)
virtual int size()
How many LEDs does this controller manage?
void showColorInternal(const struct CRGB &data, int nLeds, fl::u8 brightness)
void showColorInternal(const struct CRGB &data, fl::u8 brightness)
CLEDController & setLeds(CRGB *data, int nLeds)
Set the default array of LEDs to be used by this controller.
VIRTUAL_IF_NOT_AVR void clearLeds(int nLeds=-1)
Clear out/zero out the given number of LEDs.
CLEDController & setCorrection(CRGB correction)
The color corrction to use for this controller, expressed as a CRGB object.
virtual void show(const struct CRGB *data, int nLeds, fl::u8 brightness)=0
Write the passed in RGB data out to the LEDs managed by this controller.
fl::u8 getDither()
Get the dithering option currently set for this controller.
static CLEDController * head()
Get the first LED controller in the linked list of controllers.
CLEDController()
Create an led controller object, add it to the chain of controllers.
EDitherMode m_DitherMode
the current dither mode of the controller
ColorAdjustment getAdjustmentData(fl::u8 brightness)
CLEDController & setTemperature(CRGB temperature)
Set the color temperature, aka white point, for this controller.
virtual void showColor(const CRGB &data, int nLeds, fl::u8 brightness)=0
Set all the LEDs to a given color.
CRGB * leds()
Pointer to the CRGB array for this controller.
CLEDController * m_pNext
pointer to the next LED controller in the linked list
int m_nLeds
the number of LEDs in the LED data array
VIRTUAL_IF_NOT_AVR ~CLEDController()
static CLEDController * m_pTail
pointer to the last LED controller in the linked list
void setEnabled(bool enabled)
CLEDController & setRgbw(const Rgbw &arg=RgbwDefault::value())
void showInternal(const struct CRGB *data, int nLeds, fl::u8 brightness)
void clearLedDataInternal(int nLeds=-1)
Zero out the LED data managed by this controller.
virtual fl::u16 getMaxRefreshRate() const
Gets the maximum possible refresh rate of the strip.
CLEDController & setCorrection(LEDColorCorrection correction)
The color corrction to use for this controller, expressed as a CRGB object.
CRGB m_ColorTemperature
CRGB object representing the color temperature to apply to the strip on show()
void showLedsInternal(fl::u8 brightness)
Write the data to the LEDs managed by this controller.
CLEDController & setScreenMap(const fl::XYMap &map, float diameter=-1.f)
CLEDController & setScreenMap(const fl::ScreenMap &map)
virtual void init()=0
Initialize the LED controller.
CLEDController & setDither(fl::u8 ditherMode=BINARY_DITHER)
Set the dithering mode for this controller to use.
virtual void * beginShowLeds(int size)
CRGB getTemperature()
Get the color temperature, aka white point, for this controller.
static void onCanvasUiSet(CLEDController *strip, const ScreenMap &xymap)
void setDiameter(float diameter)
fl::ScreenMap toScreenMap() const
static XYMap constructRectangularGrid(u16 width, u16 height, u16 offset=0)
FASTLED_NAMESPACE_BEGIN typedef fl::u8 EDitherMode
The dither setting, either DISABLE_DITHER or BINARY_DITHER.
#define BINARY_DITHER
Enable dithering using binary dithering (only option)
Declares dithering options and types.
ColorTemperature
Color temperature values.
LEDColorCorrection
Color correction starting points.
Determines which platform system definitions to include.
#define FASTLED_NAMESPACE_END
#define FASTLED_NAMESPACE_BEGIN
uptr ptr_to_int(T *ptr) noexcept
T * int_to_ptr(uptr value) noexcept
Low level pixel data writing class.
Non-templated low level pixel data writing class.
Includes defintions for RGB and HSV pixels.
Contains definitions for color correction and temperature.
static CRGB computeAdjustment(fl::u8 scale, const CRGB &colorCorrection, const CRGB &colorTemperature)
Calculates the combined color adjustment to the LEDs at a given scale, color correction,...
Representation of an RGB pixel (Red, Green, Blue)
#define FASTLED_UNUSED(x)
#define VIRTUAL_IF_NOT_AVR