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

Commit

Permalink
Fix for wrong interval of Rainbow/Fire
Browse files Browse the repository at this point in the history
  • Loading branch information
SciLor committed Dec 1, 2016
1 parent 0591659 commit c1e50e5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 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,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:
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 c1e50e5

Please sign in to comment.