make it compile ...

master
Georges Kesseler 2013-07-31 00:45:23 +02:00
parent 14d709e30b
commit cc7e087931
1 changed files with 12 additions and 9 deletions

View File

@ -1,6 +1,6 @@
// testcolors demo for RGBmatrixPanel library. // gunsticks little pattern player
// Renders 512 colors on a 16x32 RGB LED matrix. // has several routines displaying various patterns
// Library supports 4096 colors, but there aren't that many pixels! // using x/y coords or window addresses
#include <Adafruit_GFX.h> // Core graphics library #include <Adafruit_GFX.h> // Core graphics library
#include <RGBmatrixPanel.h> // Hardware-specific library #include <RGBmatrixPanel.h> // Hardware-specific library
@ -30,8 +30,8 @@ int patternSwitcher=0;
while ( true ) { while ( true ) {
switch(patternSwitcher) { switch(patternSwitcher) {
case 0: case 0:
case 1: case 1: // this will repeat the following patterns 3 times
case 2: case 2: {
// scan through line by line from top to bottom // scan through line by line from top to bottom
myWindows(xyToWindow(x,y), brightness, red, green, blue); myWindows(xyToWindow(x,y), brightness, red, green, blue);
if(x++>3) { if(x++>3) {
@ -42,10 +42,11 @@ while ( true ) {
} }
} }
break; break;
}
case 3: case 3:
case 4: case 4: {
// move a pixel around a path // move a pixel around a path
int path[4*5] = { 1, 6,11,16, int path[] = { 1, 6,11,16,
17,18,19,20, 17,18,19,20,
15,10, 5, 15,10, 5,
4, 3, 2, 4, 3, 2,
@ -55,12 +56,13 @@ while ( true ) {
0}; 0};
myWindows(path[pos], brightness, red, green, blue); myWindows(path[pos], brightness, red, green, blue);
pos++; pos++;
if(path[pos]==0 { pos=0; patternSwitcher++; } if(path[pos]==0) { pos=0; patternSwitcher++; }
break; break;
}
case 5: case 5:
case 6: case 6:
case 7: case 7:
case 8: case 8: {
// top bottom line wiper // top bottom line wiper
for(x=0;x<4;x++) for(x=0;x<4;x++)
myWindows(xyToWindow(x,y), brightness, red, green, blue); myWindows(xyToWindow(x,y), brightness, red, green, blue);
@ -68,6 +70,7 @@ while ( true ) {
y=0; y=0;
patternSwitcher++; patternSwitcher++;
} }
}
default: default:
patternSwitcher=0; patternSwitcher=0;
break; break;