Skip to content

Commit

Permalink
indexOut incremented independent of outPos
Browse files Browse the repository at this point in the history
This resolves issue #5
  • Loading branch information
dmadison committed Mar 28, 2017
1 parent 672f401 commit 91223e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Arduino/LEDstream_FastLED/LEDstream_FastLED.ino
Original file line number Diff line number Diff line change
Expand Up @@ -171,16 +171,16 @@ void adalight(){
if (outPos < sizeof(leds)){
#ifdef CALIBRATE
if(outPos < 3)
ledsRaw[outPos++] = buffer[indexOut++];
ledsRaw[outPos++] = buffer[indexOut];
else{
ledsRaw[outPos] = ledsRaw[outPos%3]; // Sets RGB data to first LED color
outPos++;
indexOut++;
}
#else
ledsRaw[outPos++] = buffer[indexOut++]; // Issue next byte
ledsRaw[outPos++] = buffer[indexOut]; // Issue next byte
#endif
}
indexOut++;
bytesBuffered--;
bytesRemaining--;
}
Expand Down

0 comments on commit 91223e9

Please sign in to comment.