Add extra 'white' to areas where the four layers of light have lined up brightly
| 106 | // Add extra 'white' to areas where the four layers of light have lined up |
| 107 | // brightly |
| 108 | void Pacifica::pacifica_add_whitecaps(fl::span<CRGB> leds) { |
| 109 | u8 basethreshold = beatsin8(9, 55, 65); |
| 110 | u8 wave = beat8(7); |
| 111 | |
| 112 | for (u16 i = 0; i < mNumLeds; i++) { |
| 113 | u8 threshold = scale8(sin8(wave), 20) + basethreshold; |
| 114 | wave += 7; |
| 115 | u8 l = leds[i].getAverageLight(); |
| 116 | if (l > threshold) { |
| 117 | u8 overage = l - threshold; |
| 118 | u8 overage2 = qadd8(overage, overage); |
| 119 | leds[i] += CRGB(overage, overage2, qadd8(overage2, overage2)); |
| 120 | } |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | // Deepen the blues and greens |
| 125 | void Pacifica::pacifica_deepen_colors(fl::span<CRGB> leds) { |
nothing calls this directly
no test coverage detected