Skip to content

Commit

Permalink
Update FxKnightRider.ino
Browse files Browse the repository at this point in the history
fix knight rider mode when using more than 255 pixels, thanks Alexander Post
  • Loading branch information
neophob committed Mar 5, 2013
1 parent e078092 commit 45398db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions FxKnightRider.ino
Expand Up @@ -29,15 +29,15 @@ void loopKnightRider() {
if (krMode==0) {
//single pixel mode
uint32_t clearCol = complementaryColor();
for (byte i=0; i < strip.numPixels(); i++) {
for (uint16_t i=0; i < strip.numPixels(); i++) {
setTintPixelColor(i, clearCol);
}
drawKnightRider();
} else {
//block mode
uint16_t ofs = kr*pixelsPerBlock;
uint32_t cc = Wheel((frames+kr)%255);
for (byte i=0; i<pixelsPerBlock; i++) {
for (uint16_t i=0; i<pixelsPerBlock; i++) {
setTintPixelColor(ofs++, cc);
}

Expand Down

0 comments on commit 45398db

Please sign in to comment.