| 157 | return qsub8(noise_val, subtraction_factor); |
| 158 | } |
| 159 | fl::CRGBPalette16 getPalette() { |
| 160 | // This function returns the appropriate color palette based on the UI selection |
| 161 | switch (palette) { |
| 162 | case 0: |
| 163 | return firepal; // Traditional orange/red fire |
| 164 | case 1: |
| 165 | return electricGreenFirePal; // Green "toxic" fire |
| 166 | case 2: |
| 167 | return electricBlueFirePal; // Blue "cold" fire |
| 168 | default: |
| 169 | return firepal; // Default to traditional fire if invalid value |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | void loop() { |
| 174 | // The main program loop that runs continuously |