Get current color palette
| 107 | |
| 108 | // Get current color palette |
| 109 | fl::CRGBPalette16 getCurrentPalette() { |
| 110 | switch(colorPalette.as_int()) { |
| 111 | case 0: return fl::CRGBPalette16(fl::RainbowColors_p); |
| 112 | case 1: return fl::CRGBPalette16(fl::HeatColors_p); |
| 113 | case 2: return fl::CRGBPalette16(fl::OceanColors_p); |
| 114 | case 3: return fl::CRGBPalette16(fl::ForestColors_p); |
| 115 | case 4: return fl::CRGBPalette16(fl::PartyColors_p); |
| 116 | case 5: return fl::CRGBPalette16(fl::LavaColors_p); |
| 117 | case 6: return fl::CRGBPalette16(fl::CloudColors_p); |
| 118 | default: return fl::CRGBPalette16(fl::RainbowColors_p); |
| 119 | } |
| 120 | } |
| 121 | |
| 122 | // Beat detection algorithm |
| 123 | bool detectBeat(float energy) { |
no test coverage detected