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

◆ changeToRandomPalette()

uint8_t fl::NoisePalette::changeToRandomPalette ( )

Definition at line 184 of file noisepalette.cpp.

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

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

+ Here is the call graph for this function: