From adb0d0a4dbaa2660969d5d2bd72629a108d9c9c8 Mon Sep 17 00:00:00 2001 From: Max Date: Sun, 16 Sep 2012 15:46:31 +0200 Subject: [PATCH] No animation --- RGBStrip.ino | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/RGBStrip.ino b/RGBStrip.ino index 22dda96..1f1db04 100644 --- a/RGBStrip.ino +++ b/RGBStrip.ino @@ -122,25 +122,9 @@ void loop() } void ledUpdate() { - static int animation = 0; - animation += 1; - animation %= LedStripLedCount; - - for(int i = 0; i < 56; ++i) { + for(int i = 0; i < LedStripLedCount; ++i) { HSBColor currentColor = currentColors[i]; - - if(animation == i) { - currentColor.b = (currentColor.b * 256) >> 8; - } else if((animation+1)%LedStripLedCount == i || (animation+LedStripLedCount-1)%LedStripLedCount == i) { - currentColor.b = (currentColor.b * 192) >> 8; - } else if((animation+2)%LedStripLedCount == i || (animation+LedStripLedCount-2)%LedStripLedCount == i) { - currentColor.b = (currentColor.b * 128) >> 8; - } else if((animation+3)%LedStripLedCount == i || (animation+LedStripLedCount-3)%LedStripLedCount == i) { - currentColor.b = (currentColor.b * 64) >> 8; - } else { - currentColor.b = 0; - } - + RGBColor rgbColor = currentColor; ledStrip.setPixelColor(i, GammaCorretion(rgbColor.r), GammaCorretion(rgbColor.g), GammaCorretion(rgbColor.b));