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
9#include "fl/memfill.h"
11
13
16 m_pNext = NULL;
17 if(m_pHead==NULL) { m_pHead = this; }
18 if(m_pTail != NULL) { m_pTail->m_pNext = this; }
19 m_pTail = this;
20}
21
22
23
25 if(m_Data) {
26 nLeds = (nLeds < 0) ? m_nLeds : nLeds;
27 nLeds = (nLeds > m_nLeds) ? m_nLeds : nLeds;
28 fl::memfill((void*)m_Data, 0, sizeof(struct CRGB) * nLeds);
29 }
30
31}
32
34 // *premixed = getAdjustment(brightness);
35 // if (color_correction) {
36 // *color_correction = getAdjustment(255);
37 // }
38 #if FASTLED_HD_COLOR_MIXING
39 ColorAdjustment out = {this->getAdjustment(brightness), this->getAdjustment(255), brightness};
40 #else
41 ColorAdjustment out = {getAdjustment(brightness)};
42 #endif
43 return out;
44}
45
46
central include file for FastLED, defines the CFastLED class/object
UISlider brightness("Brightness", 128, 0, 255, 1)
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.
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()
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 * 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()
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:14
@ UncorrectedTemperature
Uncorrected temperature (0xFFFFFF)
Definition color.h:94
@ UncorrectedColor
Uncorrected color (0xFFFFFF)
Definition color.h:28
#define FASTLED_NAMESPACE_END
Definition namespace.h:23
#define FASTLED_NAMESPACE_BEGIN
Definition namespace.h:22
void * memfill(void *ptr, int value, fl::size num)
Definition memfill.h:11
Representation of an RGB pixel (Red, Green, Blue)
Definition crgb.h:86