![]() |
FastLED 3.9.13
|
Base definition for an LED controller.
Pretty much the methods that every LED controller object will make available. If you want to pass LED controllers around to methods, make them references to this type, keeps your code saner. However, most people won't be seeing/using these objects directly at all.
Definition at line 36 of file cled_controller.h.
#include <cled_controller.h>
Public Member Functions | |
virtual void | showColor (const CRGB &data, int nLeds, uint8_t brightness)=0 |
Set all the LEDs to a given color. | |
virtual void | show (const struct CRGB *data, int nLeds, uint8_t brightness)=0 |
Write the passed in RGB data out to the LEDs managed by this controller. | |
CLEDController & | setRgbw (const Rgbw &arg=RgbwDefault::value()) |
void | setEnabled (bool enabled) |
bool | getEnabled () |
CLEDController () | |
Create an led controller object, add it to the chain of controllers. | |
Rgbw | getRgbw () const |
virtual void | init ()=0 |
Initialize the LED controller. | |
VIRTUAL_IF_NOT_AVR void | clearLeds (int nLeds=-1) |
Clear out/zero out the given number of LEDs. | |
VIRTUAL_IF_NOT_AVR void | showLeds (uint8_t brightness) |
ColorAdjustment | getAdjustmentData (uint8_t brightness) |
void | showInternal (const struct CRGB *data, int nLeds, uint8_t brightness) |
void | showColorInternal (const struct CRGB &data, int nLeds, uint8_t brightness) |
void | showLedsInternal (uint8_t brightness) |
Write the data to the LEDs managed by this controller. | |
void | showColorInternal (const struct CRGB &data, uint8_t brightness) |
CLEDController * | next () |
Get the next controller in the linked list after this one. | |
CLEDController & | setLeds (CRGB *data, int nLeds) |
Set the default array of LEDs to be used by this controller. | |
void | clearLedDataInternal (int nLeds=-1) |
Zero out the LED data managed by this controller. | |
virtual int | size () |
How many LEDs does this controller manage? | |
virtual int | lanes () |
How many Lanes does this controller manage? | |
CRGB * | leds () |
Pointer to the CRGB array for this controller. | |
CRGB & | operator[] (int x) |
Reference to the n'th LED managed by the controller. | |
CLEDController & | setDither (uint8_t ditherMode=BINARY_DITHER) |
Set the dithering mode for this controller to use. | |
CLEDController & | setScreenMap (const fl::XYMap &map) |
CLEDController & | setScreenMap (const fl::ScreenMap &map) |
CLEDController & | setScreenMap (uint16_t width, uint16_t height) |
uint8_t | getDither () |
Get the dithering option currently set for this controller. | |
virtual void * | beginShowLeds (int size) |
virtual void | endShowLeds (void *data) |
CLEDController & | setCorrection (CRGB correction) |
The color corrction to use for this controller, expressed as a CRGB object. | |
CLEDController & | setCorrection (LEDColorCorrection correction) |
The color corrction to use for this controller, expressed as a CRGB object. | |
CRGB | getCorrection () |
Get the correction value used by this controller. | |
CLEDController & | setTemperature (CRGB temperature) |
Set the color temperature, aka white point, for this controller. | |
CLEDController & | setTemperature (ColorTemperature temperature) |
Set the color temperature, aka white point, for this controller. | |
CRGB | getTemperature () |
Get the color temperature, aka white point, for this controller. | |
CRGB | getAdjustment (uint8_t scale) |
Get the combined brightness/color adjustment for this controller. | |
virtual uint16_t | getMaxRefreshRate () const |
Gets the maximum possible refresh rate of the strip. | |
Static Public Member Functions | |
static CLEDController * | head () |
Get the first LED controller in the linked list of controllers. | |
Public Attributes | |
Rgbw | mRgbMode = RgbwInvalid::value() |
Protected Attributes | |
CRGB * | m_Data |
pointer to the LED data used by this controller | |
CLEDController * | m_pNext |
pointer to the next LED controller in the linked list | |
CRGB | m_ColorCorrection |
CRGB object representing the color correction to apply to the strip on show() | |
CRGB | m_ColorTemperature |
CRGB object representing the color temperature to apply to the strip on show() | |
EDitherMode | m_DitherMode |
the current dither mode of the controller | |
bool | m_enabled = true |
int | m_nLeds |
the number of LEDs in the LED data array | |
Static Protected Attributes | |
static CLEDController * | m_pHead = NULL |
pointer to the first LED controller in the linked list | |
static CLEDController * | m_pTail = NULL |
pointer to the last LED controller in the linked list | |
Friends | |
class | CFastLED |
CLEDController::CLEDController | ( | ) |
Create an led controller object, add it to the chain of controllers.
Definition at line 14 of file cled_controller.cpp.
|
inlinevirtual |
Definition at line 214 of file cled_controller.h.
void CLEDController::clearLedDataInternal | ( | int | nLeds = -1 | ) |
Zero out the LED data managed by this controller.
Definition at line 23 of file cled_controller.cpp.
|
inline |
Clear out/zero out the given number of LEDs.
nLeds | the number of LEDs to clear |
Definition at line 92 of file cled_controller.h.
|
inlinevirtual |
Definition at line 233 of file cled_controller.h.
|
inline |
Get the combined brightness/color adjustment for this controller.
scale | the brightness scale to get the correction for |
Definition at line 268 of file cled_controller.h.
ColorAdjustment CLEDController::getAdjustmentData | ( | uint8_t | brightness | ) |
Definition at line 32 of file cled_controller.cpp.
|
inline |
Get the correction value used by this controller.
Definition at line 251 of file cled_controller.h.
|
inline |
Get the dithering option currently set for this controller.
Definition at line 212 of file cled_controller.h.
|
inline |
Definition at line 73 of file cled_controller.h.
|
inlinevirtual |
Gets the maximum possible refresh rate of the strip.
Definition at line 274 of file cled_controller.h.
|
inline |
Definition at line 85 of file cled_controller.h.
|
inline |
Get the color temperature, aka white point, for this controller.
Definition at line 263 of file cled_controller.h.
|
inlinestatic |
Get the first LED controller in the linked list of controllers.
Definition at line 154 of file cled_controller.h.
|
pure virtual |
Initialize the LED controller.
Implemented in APA102Controller< DATA_PIN, CLOCK_PIN, RGB_ORDER, SPI_SPEED, GAMMA_CORRECTION_MODE, START_FRAME, END_FRAME >, APA102Controller< DATA_PIN, CLOCK_PIN, RGB, DATA_RATE_MHZ(12), kFiveBitGammaCorrectionMode_BitShift, 0x00000000, 0x00000000 >, APA102Controller< DATA_PIN, CLOCK_PIN, RGB, DATA_RATE_MHZ(12), kFiveBitGammaCorrectionMode_Null, 0x00000000, 0x00000000 >, APA102Controller< DATA_PIN, CLOCK_PIN, RGB, DATA_RATE_MHZ(40), kFiveBitGammaCorrectionMode_Null, 0x00000000, 0x00000000 >, APA102Controller< DATA_PIN, CLOCK_PIN, RGB, DATA_RATE_MHZ(6), kFiveBitGammaCorrectionMode_BitShift, uint32_t(0x00000000), uint32_t(0x00000000)>, APA102Controller< DATA_PIN, CLOCK_PIN, RGB_ORDER, SPI_SPEED, kFiveBitGammaCorrectionMode_BitShift, uint32_t(0x00000000), uint32_t(0x00000000)>, DMXSerialController< RGB_ORDER >, DMXSerialController< RGB_ORDER >, DMXSimpleController< DATA_PIN, RGB_ORDER >, DMXSimpleController< DATA_PIN, RGB_ORDER >, LPD6803Controller< DATA_PIN, CLOCK_PIN, RGB_ORDER, SPI_SPEED >, LPD8806Controller< DATA_PIN, CLOCK_PIN, RGB_ORDER, SPI_SPEED >, P9813Controller< DATA_PIN, CLOCK_PIN, RGB_ORDER, SPI_SPEED >, SM16716Controller< DATA_PIN, CLOCK_PIN, RGB_ORDER, SPI_SPEED >, WS2801Controller< DATA_PIN, CLOCK_PIN, RGB_ORDER, SPI_SPEED >, and WS2801Controller< DATA_PIN, CLOCK_PIN, RGB, DATA_RATE_MHZ(25) >.
|
inlinevirtual |
How many Lanes does this controller manage?
Reimplemented in CPixelLEDController< RGB_ORDER, LANES, MASK >, CPixelLEDController< GRB, CONTROLLER::LANES_VALUE, CONTROLLER::MASK_VALUE >, CPixelLEDController< GRB, WS2812Controller800Khz< DATA_PIN, RGB >::LANES_VALUE, WS2812Controller800Khz< DATA_PIN, RGB >::MASK_VALUE >, CPixelLEDController< RGB >, and CPixelLEDController< RGB_ORDER, WS2812Controller800Khz< DATA_PIN, RGB >::LANES_VALUE, WS2812Controller800Khz< DATA_PIN, RGB >::MASK_VALUE >.
Definition at line 178 of file cled_controller.h.
|
inline |
Pointer to the CRGB array for this controller.
Definition at line 182 of file cled_controller.h.
|
inline |
Get the next controller in the linked list after this one.
Will return NULL at the end of the linked list.
Definition at line 158 of file cled_controller.h.
|
inline |
Reference to the n'th LED managed by the controller.
x | the LED number to retrieve |
Definition at line 187 of file cled_controller.h.
|
inline |
The color corrction to use for this controller, expressed as a CRGB object.
correction | the color correction to set |
Definition at line 244 of file cled_controller.h.
|
inline |
The color corrction to use for this controller, expressed as a CRGB object.
correction | the color correction to set |
Definition at line 247 of file cled_controller.h.
|
inline |
Set the dithering mode for this controller to use.
ditherMode | the dithering mode to set |
Definition at line 192 of file cled_controller.h.
|
inline |
Definition at line 72 of file cled_controller.h.
|
inline |
Set the default array of LEDs to be used by this controller.
data | pointer to the LED data |
nLeds | the number of LEDs in the LED data |
Definition at line 163 of file cled_controller.h.
|
inline |
Definition at line 65 of file cled_controller.h.
|
inline |
Definition at line 201 of file cled_controller.h.
|
inline |
Definition at line 194 of file cled_controller.h.
|
inline |
Definition at line 206 of file cled_controller.h.
|
inline |
Set the color temperature, aka white point, for this controller.
temperature | the color temperature to set |
Definition at line 259 of file cled_controller.h.
|
inline |
Set the color temperature, aka white point, for this controller.
temperature | the color temperature to set |
Definition at line 256 of file cled_controller.h.
|
pure virtual |
Write the passed in RGB data out to the LEDs managed by this controller.
data | the rgb data to write out to the strip |
nLeds | the number of LEDs being written out |
scale | the rgb scaling to apply to each led before writing it out |
Implemented in CPixelLEDController< RGB_ORDER, LANES, MASK >, CPixelLEDController< GRB, CONTROLLER::LANES_VALUE, CONTROLLER::MASK_VALUE >, CPixelLEDController< GRB, WS2812Controller800Khz< DATA_PIN, RGB >::LANES_VALUE, WS2812Controller800Khz< DATA_PIN, RGB >::MASK_VALUE >, CPixelLEDController< RGB >, and CPixelLEDController< RGB_ORDER, WS2812Controller800Khz< DATA_PIN, RGB >::LANES_VALUE, WS2812Controller800Khz< DATA_PIN, RGB >::MASK_VALUE >.
|
pure virtual |
Set all the LEDs to a given color.
data | the CRGB color to set the LEDs to |
nLeds | the number of LEDs to set to this color |
scale | the rgb scaling value for outputting color |
Implemented in CPixelLEDController< RGB_ORDER, LANES, MASK >, CPixelLEDController< GRB, CONTROLLER::LANES_VALUE, CONTROLLER::MASK_VALUE >, CPixelLEDController< GRB, WS2812Controller800Khz< DATA_PIN, RGB >::LANES_VALUE, WS2812Controller800Khz< DATA_PIN, RGB >::MASK_VALUE >, CPixelLEDController< RGB >, and CPixelLEDController< RGB_ORDER, WS2812Controller800Khz< DATA_PIN, RGB >::LANES_VALUE, WS2812Controller800Khz< DATA_PIN, RGB >::MASK_VALUE >.
|
inline |
Will scale for color correction and temperature. Can accept LED data not attached to this controller.
data | the CRGB color to set the LEDs to |
nLeds | the number of LEDs in the data array |
brightness | the brightness of the LEDs |
Definition at line 126 of file cled_controller.h.
|
inline |
data | the CRGB color to set the LEDs to |
brightness | the brightness of the LEDs |
Definition at line 146 of file cled_controller.h.
|
inline |
Will scale for color correction and temperature. Can accept LED data not attached to this controller.
data | the LED data to write to the strip |
nLeds | the number of LEDs in the data array |
brightness | the brightness of the LEDs |
Definition at line 113 of file cled_controller.h.
|
inline |
Definition at line 98 of file cled_controller.h.
|
inline |
Write the data to the LEDs managed by this controller.
brightness | the brightness of the LEDs |
Definition at line 135 of file cled_controller.h.
|
inlinevirtual |
How many LEDs does this controller manage?
Definition at line 174 of file cled_controller.h.
|
friend |
Definition at line 38 of file cled_controller.h.
|
protected |
CRGB object representing the color correction to apply to the strip on show()
Definition at line 41 of file cled_controller.h.
|
protected |
CRGB object representing the color temperature to apply to the strip on show()
Definition at line 42 of file cled_controller.h.
|
protected |
pointer to the LED data used by this controller
Definition at line 39 of file cled_controller.h.
|
protected |
the current dither mode of the controller
Definition at line 43 of file cled_controller.h.
|
protected |
Definition at line 44 of file cled_controller.h.
|
protected |
the number of LEDs in the LED data array
Definition at line 45 of file cled_controller.h.
|
staticprotected |
pointer to the first LED controller in the linked list
Definition at line 46 of file cled_controller.h.
|
protected |
pointer to the next LED controller in the linked list
Definition at line 40 of file cled_controller.h.
|
staticprotected |
pointer to the last LED controller in the linked list
Definition at line 47 of file cled_controller.h.
Rgbw CLEDController::mRgbMode = RgbwInvalid::value() |
Definition at line 64 of file cled_controller.h.