10 for (uint16_t i = 0; i < pixelCount; i++) {
16 for (uint16_t i = 0; i < pixelCount; i++) {
17 uint16_t leftIndex = i;
18 uint16_t rightIndex = i;
20 uint16_t downIndex = i;
24 bool validLeft = pixelGroup->
GetLeftIndex(leftIndex, &leftIndex);
25 bool validRight = pixelGroup->
GetRightIndex(rightIndex, &rightIndex);
26 bool validUp = pixelGroup->
GetUpIndex(upIndex, &upIndex);
27 bool validDown = pixelGroup->
GetDownIndex(downIndex, &downIndex);
30 colorBuffer[leftIndex].
R = 100;
33 colorBuffer[rightIndex].
G = 100;
36 colorBuffer[upIndex].
B = 100;
39 colorBuffer[downIndex].
R = colorBuffer[downIndex].
R == 100 ? 100 : d;
40 colorBuffer[downIndex].
G = colorBuffer[downIndex].
G == 100 ? 100 : d;
41 colorBuffer[downIndex].
B = colorBuffer[downIndex].
B == 100 ? 100 : d;
45 for (uint16_t i = 0; i < pixelCount; i++) {
46 pixelColors[i].
R = colorBuffer[i].
R;
47 pixelColors[i].
G = colorBuffer[i].
G;
48 pixelColors[i].
B = colorBuffer[i].
B;
Defines the Test effect class for debugging and memory issue detection.
float Update()
Updates and calculates the next value of the waveform.
Interface for managing and interacting with a collection of pixels.
virtual RGBColor * GetColors()=0
Retrieves the array of colors for the pixel group.
virtual RGBColor * GetColorBuffer()=0
Retrieves the color buffer for the pixel group.
virtual bool GetLeftIndex(uint16_t count, uint16_t *leftIndex)=0
Retrieves the index of the pixel to the left of a given pixel.
virtual bool GetRightIndex(uint16_t count, uint16_t *rightIndex)=0
Retrieves the index of the pixel to the right of a given pixel.
virtual uint16_t GetPixelCount()=0
Retrieves the total number of pixels in the group.
virtual bool GetUpIndex(uint16_t count, uint16_t *upIndex)=0
Retrieves the index of the pixel above a given pixel.
virtual bool GetDownIndex(uint16_t count, uint16_t *downIndex)=0
Retrieves the index of the pixel below a given pixel.
Represents an RGB color and provides methods for manipulation.
uint8_t B
Blue component of the color (0-255).
uint8_t G
Green component of the color (0-255).
uint8_t R
Red component of the color (0-255).
Test()
Constructs a Test effect instance.
FunctionGenerator fGenD
Function generator for the debug intensity values.
void ApplyEffect(IPixelGroup *pixelGroup) override
Applies the debugging effect to the given pixel group.