26 bool hasFixedFrameRate(
float *fps)
const override {
35 mapNoiseToLEDsUsingPalette(context.leds);
38 Str fxName()
const override {
return "NoisePalette"; }
39 void mapNoiseToLEDsUsingPalette(
CRGB *leds);
41 uint8_t changeToRandomPalette();
45 uint8_t getPalettePresetCount()
const {
return 12; }
46 uint8_t getPalettePreset()
const {
return currentPaletteIndex; }
47 void setPalettePreset(
int paletteIndex);
49 uint16_t scale,
bool colorLoop) {
50 currentPalette = palette;
53 this->colorLoop = colorLoop;
55 void setSpeed(uint16_t speed) { this->speed = speed; }
56 void setScale(uint16_t scale) { this->scale = scale; }
60 uint16_t width, height;
66 int currentPaletteIndex = 0;
71 uint16_t XY(uint8_t x, uint8_t y)
const {
return mXyMap.mapToIndex(x, y); }
73 void SetupRandomPalette() {
79 }
while (newPalette == currentPalette);
80 currentPalette = newPalette;
83 void SetupBlackAndWhiteStripedPalette() {
91 void SetupPurpleAndGreenPalette() {
97 green, green, black, black, purple, purple, black, black, green,
98 green, black, black, purple, purple, black, black);
void fill_solid(struct CRGB *targetArray, int numToFill, const struct CRGB &color)
Fill a range of LEDs with a solid color.