     parameters[activeParameter] %= parameterMax[activeParameter];
 
     /* Run the currently active mode. */
-    modes[activeMode]();
+    modes[parameters[PARAMETER_MODE]]();
     FastLED.show();
 }

/* Rainbow colors, used to signify active parameter to the user. */
CRGB rainbowColors[MAX_PARAMETERS] = {
    CHSV(0,   255, 255),
    CHSV(36,  255, 255),
    CHSV(73,  255, 255),
    CHSV(109, 255, 255),
    CHSV(146, 255, 255),
    CHSV(182, 255, 255),
    CHSV(219, 255, 255)
};

/* Initial setup, called once on boot. */

CRGB leds[NUM_LEDS];

/* All the different modes that are available. */
#define MAX_MODES 2
void modeSolid();
void modeRainbow();
void (*modes[MAX_MODES])() = {
    &modeSolid,
    &modeRainbow
};

/* Define the different parameters that can be changed using the rotary wheel. */
#define PARAMETER_MODE 0
