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

◆ shiftUp()

void shiftUp ( )

Definition at line 134 of file simple.h.

134 {
135 // fade each led by 1%
136 if (fadeToBlack.as_int()) {
137
138 for (int i = 0; i < NUM_LEDS; ++i) {
139 auto &c = framebuffer[i];
140 c.fadeToBlackBy(fadeToBlack.as_int());
141 }
142 }
143
144 for (int y = HEIGHT - 1; y > 0; --y) {
145 CRGB* row1 = &framebuffer[frameBufferXY(0, y)];
146 CRGB* row2 = &framebuffer[frameBufferXY(0, y - 1)];
147 memcpy(row1, row2, WIDTH * sizeof(CRGB));
148 }
149 CRGB* row = &framebuffer[frameBufferXY(0, 0)];
150 fl::memfill(row, 0, sizeof(CRGB) * WIDTH);
151}
#define NUM_LEDS
int y
Definition simple.h:93
UISlider fadeToBlack("Fade to black by", 5, 0, 20, 1)
CRGB framebuffer[NUM_LEDS]
Definition simple.h:77
XYMap frameBufferXY(WIDTH, HEIGHT, IS_SERPINTINE)
#define WIDTH
Definition advanced.h:36
#define HEIGHT
Definition advanced.h:37
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

References fadeToBlack(), framebuffer, frameBufferXY(), HEIGHT, fl::memfill(), NUM_LEDS, WIDTH, and y.

Referenced by loop().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: