FastLED 3.9.15
Loading...
Searching...
No Matches
cled_controller.cpp
Go to the documentation of this file.
1
3
4#define FASTLED_INTERNAL
5#include "FastLED.h"
6
7#include "cled_controller.h"
8
10
12
15 m_pNext = NULL;
16 if(m_pHead==NULL) { m_pHead = this; }
17 if(m_pTail != NULL) { m_pTail->m_pNext = this; }
18 m_pTail = this;
19}
20
21
22
24 if(m_Data) {
25 nLeds = (nLeds < 0) ? m_nLeds : nLeds;
26 nLeds = (nLeds > m_nLeds) ? m_nLeds : nLeds;
27 memset((void*)m_Data, 0, sizeof(struct CRGB) * nLeds);
28 }
29
30}
31
33 // *premixed = getAdjustment(brightness);
34 // if (color_correction) {
35 // *color_correction = getAdjustment(255);
36 // }
37 #if FASTLED_HD_COLOR_MIXING
38 ColorAdjustment out = {this->getAdjustment(brightness), this->getAdjustment(255), brightness};
39 #else
41 #endif
42 return out;
43}
44
45
47
48
central include file for FastLED, defines the CFastLED class/object
UISlider brightness("Brightness", 255, 0, 255, 1)
CRGB * m_Data
pointer to the LED data used by this controller
CRGB m_ColorCorrection
CRGB object representing the color correction to apply to the strip on show()
ColorAdjustment getAdjustmentData(uint8_t brightness)
CLEDController()
Create an led controller object, add it to the chain of controllers.
EDitherMode m_DitherMode
the current dither mode of the 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 clearLedDataInternal(int nLeds=-1)
Zero out the LED data managed by this controller.
CRGB m_ColorTemperature
CRGB object representing the color temperature to apply to the strip on show()
CRGB getAdjustment(uint8_t scale)
Get the combined brightness/color adjustment for this controller.
static CLEDController * m_pHead
pointer to the first LED controller in the linked list
base definitions used by led controllers for writing out led data
#define BINARY_DITHER
Enable dithering using binary dithering (only option)
Definition dither_mode.h:13
@ UncorrectedTemperature
Uncorrected temperature (0xFFFFFF)
Definition color.h:94
@ UncorrectedColor
Uncorrected color (0xFFFFFF)
Definition color.h:28
#define FASTLED_NAMESPACE_END
Definition namespace.h:22
Representation of an RGB pixel (Red, Green, Blue)
Definition crgb.h:54