Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #21 from SciLor/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
SciLor authored Dec 2, 2016
2 parents 11fbc91 + e9d6b8c commit 2d69c5c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions HyperionRGB/HyperionRGB.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -76,8 +76,14 @@ void changeMode(Mode newMode, double interval = 1.0d) {
case STATIC_COLOR:
break;
case RAINBOW:
if (interval == 0.0d)
interval = 0.5d;
animationThread.setInterval(interval / 1000);
break;
case FIRE2012:
animationThread.setInterval(interval);
if (interval == 0.0d)
interval = 0.016d;
animationThread.setInterval(interval / 1000);
break;
case HYPERION_UDP:
if (!autoswitch)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2d69c5c

Please sign in to comment.