FastLED 3.9.15
Loading...
Searching...
No Matches

◆ changeToRandomPalette()

uint8_t fl::NoisePalette::changeToRandomPalette ( )

Definition at line 183 of file noisepalette.cpp.

183 {
184 while (true) {
185 uint8_t new_idx = random8() % 12;
186 if (new_idx == currentPaletteIndex) {
187 continue;
188 }
189 currentPaletteIndex = new_idx;
191 return currentPaletteIndex;
192 }
193}
void setPalettePreset(int paletteIndex)
LIB8STATIC uint8_t random8()
Generate an 8-bit random number.
Definition random8.h:46

References currentPaletteIndex, random8(), and setPalettePreset().

+ Here is the call graph for this function: