First pixel of MatrixEffect is enforced to be white.
This commit is contained in:
parent
ac2de19d7a
commit
788b1f4119
@ -8,5 +8,5 @@ __attribute__ ((aligned(4))) extern const TProgmemRGBGradientPalette_byte palett
|
||||
|
||||
__attribute__ ((aligned(4))) extern const TProgmemRGBGradientPalette_byte palette_matrix[] FL_PROGMEM = {
|
||||
0, 0, 0, 0, // black
|
||||
200, 0,255, 0, // green
|
||||
240, 0,255, 0, // green
|
||||
255, 255,255,255 }; // white
|
||||
|
@ -26,8 +26,12 @@ void MatrixEffectColumn::advance() {
|
||||
|
||||
void MatrixEffectColumn::draw() {
|
||||
for(int i=0; i<length; i++) {
|
||||
if (i==0) {
|
||||
setPixel(*window, x, y-i, CRGB(255, 255, 255));
|
||||
} else {
|
||||
setPixel(*window, x, y-i, ColorFromPalette((CRGBPalette16)palette_matrix, 255 * (length - i) / length));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MatrixEffectColumn::loop() {
|
||||
|
Loading…
Reference in New Issue
Block a user