Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FastLED/FastLED.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kriegsman <kriegsman@tr.org>2017-01-15 20:56:45 +0300
committerMark Kriegsman <kriegsman@tr.org>2017-01-15 20:56:45 +0300
commit94e46e3978b9f2bce8f76383ff9a19879b245ad0 (patch)
treef15860df57167dac6b3dc3515b631610af9b0f6d /examples
parentd90a4524714c75884256db201beda2d7c4d10516 (diff)
Updated scale16 and scale16by8 for AVR when FASTLED_SCALE8_FIXED is 1. scale16(foo,65535) now equals foo. Updated DemoReel100 to stay within range of NUM_LEDS on non-AVR platforms. Fixes #368.
Diffstat (limited to 'examples')
-rw-r--r--examples/DemoReel100/DemoReel100.ino4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/DemoReel100/DemoReel100.ino b/examples/DemoReel100/DemoReel100.ino
index ffa3a9fd..03534a91 100644
--- a/examples/DemoReel100/DemoReel100.ino
+++ b/examples/DemoReel100/DemoReel100.ino
@@ -99,7 +99,7 @@ void sinelon()
{
// a colored dot sweeping back and forth, with fading trails
fadeToBlackBy( leds, NUM_LEDS, 20);
- int pos = beatsin16(13,0,NUM_LEDS);
+ int pos = beatsin16( 13, 0, NUM_LEDS-1 );
leds[pos] += CHSV( gHue, 255, 192);
}
@@ -119,7 +119,7 @@ void juggle() {
fadeToBlackBy( leds, NUM_LEDS, 20);
byte dothue = 0;
for( int i = 0; i < 8; i++) {
- leds[beatsin16(i+7,0,NUM_LEDS)] |= CHSV(dothue, 200, 255);
+ leds[beatsin16( i+7, 0, NUM_LEDS-1 )] |= CHSV(dothue, 200, 255);
dothue += 32;
}
}