FastLED 3.9.3
|
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 34 of file cled_controller.h.
#include <cled_controller.h>
Public Member Functions | |
CLEDController & | setRgbw (const Rgbw &arg=RgbwDefault::value()) |
Rgbw | getRgbw () const |
CLEDController () | |
Create an led controller object, add it to the chain of controllers. | |
virtual void | init ()=0 |
Initialize the LED controller. | |
virtual void | clearLeds (int nLeds=-1) |
Clear out/zero out the given number of LEDs. | |
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 XYMap &map) |
CLEDController & | setScreenMap (const 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 () |
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 whipe 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 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. | |
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 | |
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 |
|
inline |
Create an led controller object, add it to the chain of controllers.
Definition at line 71 of file cled_controller.h.
|
inlinevirtual |
Definition at line 206 of file cled_controller.h.
|
inline |
Zero out the LED data managed by this controller.
Definition at line 156 of file cled_controller.h.
|
inlinevirtual |
Clear out/zero out the given number of LEDs.
nLeds | the number of LEDs to clear |
Definition at line 83 of file cled_controller.h.
|
inlinevirtual |
Definition at line 223 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 258 of file cled_controller.h.
|
inline |
Definition at line 87 of file cled_controller.h.
|
inline |
Get the correction value used by this controller.
Definition at line 241 of file cled_controller.h.
|
inline |
Get the dithering option currently set for this controller.
Definition at line 204 of file cled_controller.h.
|
inlinevirtual |
Gets the maximum possible refresh rate of the strip.
Definition at line 264 of file cled_controller.h.
|
inline |
Definition at line 68 of file cled_controller.h.
|
inline |
Get the color temperature, aka whipe point, for this controller.
Definition at line 253 of file cled_controller.h.
|
inlinestatic |
Get the first LED controller in the linked list of controllers.
Definition at line 140 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(6), 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 >, and CPixelLEDController< RGB >.
Definition at line 170 of file cled_controller.h.
|
inline |
Pointer to the CRGB array for this controller.
Definition at line 174 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 144 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 179 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 234 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 237 of file cled_controller.h.
|
inline |
Set the dithering mode for this controller to use.
ditherMode | the dithering mode to set |
Definition at line 184 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 149 of file cled_controller.h.
|
inline |
Definition at line 62 of file cled_controller.h.
|
inline |
Definition at line 193 of file cled_controller.h.
|
inline |
Definition at line 186 of file cled_controller.h.
|
inline |
Definition at line 198 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 249 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 246 of file cled_controller.h.
|
protectedpure 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 >, and CPixelLEDController< RGB >.
|
protectedpure 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 >, and CPixelLEDController< RGB >.
|
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 118 of file cled_controller.h.
|
inline |
data | the CRGB color to set the LEDs to |
brightness | the brightness of the LEDs |
Definition at line 134 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 107 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 125 of file cled_controller.h.
|
inlinevirtual |
How many LEDs does this controller manage?
Definition at line 166 of file cled_controller.h.
|
friend |
Definition at line 36 of file cled_controller.h.
|
protected |
CRGB object representing the color correction to apply to the strip on show()
Definition at line 39 of file cled_controller.h.
|
protected |
CRGB object representing the color temperature to apply to the strip on show()
Definition at line 40 of file cled_controller.h.
|
protected |
pointer to the LED data used by this controller
Definition at line 37 of file cled_controller.h.
|
protected |
the current dither mode of the controller
Definition at line 41 of file cled_controller.h.
|
protected |
the number of LEDs in the LED data array
Definition at line 42 of file cled_controller.h.
|
staticprotected |
pointer to the first LED controller in the linked list
Definition at line 43 of file cled_controller.h.
|
protected |
pointer to the next LED controller in the linked list
Definition at line 38 of file cled_controller.h.
|
staticprotected |
pointer to the last LED controller in the linked list
Definition at line 44 of file cled_controller.h.
Rgbw CLEDController::mRgbMode = RgbwInvalid::value() |
Definition at line 61 of file cled_controller.h.