From c1e50e576deef8dbcf17a69cccad96bdd9a073a7 Mon Sep 17 00:00:00 2001 From: SciLor Date: Thu, 1 Dec 2016 13:16:50 +0100 Subject: [PATCH 1/2] Fix for wrong interval of Rainbow/Fire --- HyperionRGB/HyperionRGB.ino | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/HyperionRGB/HyperionRGB.ino b/HyperionRGB/HyperionRGB.ino index 6f7a733..e4bdecc 100644 --- a/HyperionRGB/HyperionRGB.ino +++ b/HyperionRGB/HyperionRGB.ino @@ -61,7 +61,7 @@ void animationStep() { } } -void changeMode(Mode newMode, double interval = 1.0d) { +void changeMode(Mode newMode, double interval = 0.0d) { if (newMode != activeMode) { Log.info("Mode changed to %i", newMode); activeMode = newMode; @@ -76,7 +76,13 @@ void changeMode(Mode newMode, double interval = 1.0d) { case STATIC_COLOR: break; case RAINBOW: + if (interval == 0.0d) + interval = 500; + animationThread.setInterval(interval); + break; case FIRE2012: + if (interval == 0.0d) + interval = 16; animationThread.setInterval(interval); break; case HYPERION_UDP: @@ -193,7 +199,7 @@ void setup(void) { threadController.add(&statusThread); animationThread.onRun(animationStep); - animationThread.setInterval(500); + animationThread.setInterval(1000); resetThread.onRun(resetMode); #ifdef CONFIG_ENABLE_WEBCONFIG From e9d6b8cda0ce73bdc2976d5ec457bf87bfee8fb7 Mon Sep 17 00:00:00 2001 From: SciLor Date: Thu, 1 Dec 2016 13:18:02 +0100 Subject: [PATCH 2/2] Fix for missing interval factor s/ms --- HyperionRGB/HyperionRGB.ino | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/HyperionRGB/HyperionRGB.ino b/HyperionRGB/HyperionRGB.ino index e4bdecc..5a72d2d 100644 --- a/HyperionRGB/HyperionRGB.ino +++ b/HyperionRGB/HyperionRGB.ino @@ -77,13 +77,13 @@ void changeMode(Mode newMode, double interval = 0.0d) { break; case RAINBOW: if (interval == 0.0d) - interval = 500; - animationThread.setInterval(interval); + interval = 0.5d; + animationThread.setInterval(interval / 1000); break; case FIRE2012: if (interval == 0.0d) - interval = 16; - animationThread.setInterval(interval); + interval = 0.016d; + animationThread.setInterval(interval / 1000); break; case HYPERION_UDP: if (!autoswitch)