FastLED 3.9.15
Loading...
Searching...
No Matches

◆ shiftUp()

void shiftUp ( )

Definition at line 113 of file Audio.ino.

113 {
114 // fade each led by 1%
115 if (fadeToBlack.as_int()) {
116
117 for (int i = 0; i < NUM_LEDS; ++i) {
118 auto &c = framebuffer[i];
119 c.fadeToBlackBy(fadeToBlack.as_int());
120 }
121 }
122
123 for (int y = HEIGHT - 1; y > 0; --y) {
124 CRGB* row1 = &framebuffer[frameBufferXY(0, y)];
125 CRGB* row2 = &framebuffer[frameBufferXY(0, y - 1)];
126 memcpy(row1, row2, WIDTH * sizeof(CRGB));
127 }
128 CRGB* row = &framebuffer[frameBufferXY(0, 0)];
129 memset(row, 0, sizeof(CRGB) * WIDTH);
130}
#define NUM_LEDS
Definition Apa102.ino:6
int y
Definition Audio.ino:72
#define WIDTH
Definition Audio.ino:33
CRGB framebuffer[NUM_LEDS]
Definition Audio.ino:56
XYMap frameBufferXY(WIDTH, HEIGHT, IS_SERPINTINE)
UISlider fadeToBlack("Fade to black by", 5, 0, 20, 1)
#define HEIGHT
Definition Audio.ino:32
Representation of an RGB pixel (Red, Green, Blue)
Definition crgb.h:55

References fadeToBlack, framebuffer, frameBufferXY, HEIGHT, NUM_LEDS, WIDTH, and y.

Referenced by loop().

+ Here is the caller graph for this function: