| 856 | } |
| 857 | |
| 858 | void fill_noise16(CRGB *leds, int num_leds, |
| 859 | fl::u8 octaves, fl::u16 x, int scale, |
| 860 | fl::u8 hue_octaves, fl::u16 hue_x, int hue_scale, |
| 861 | fl::u16 time, fl::u8 hue_shift) { |
| 862 | |
| 863 | if (num_leds <= 0) return; |
| 864 | |
| 865 | for (int j = 0; j < num_leds; j += 255) { |
| 866 | const int LedsRemaining = num_leds - j; |
| 867 | const int LedsPer = LedsRemaining > 255 ? 255 : LedsRemaining; // limit to 255 max |
| 868 | if (LedsPer <= 0) continue; |
| 869 | FASTLED_STACK_ARRAY(fl::u8, V, LedsPer); |
| 870 | FASTLED_STACK_ARRAY(fl::u8, H, LedsPer); |
| 871 | |
| 872 | fl::memset(V, 0, LedsPer); |
| 873 | fl::memset(H, 0, LedsPer); |
| 874 | |
| 875 | fill_raw_noise16into8(V, LedsPer, octaves, x, scale, time); |
| 876 | fill_raw_noise8(H, LedsPer, hue_octaves, hue_x, hue_scale, time); |
| 877 | |
| 878 | for (int i = 0; i < LedsPer; ++i) { |
| 879 | leds[i + j] = CHSV(H[i] + hue_shift, 255, V[i]); |
| 880 | } |
| 881 | } |
| 882 | } |
| 883 | |
| 884 | void fill_2dnoise8(CRGB *leds, int width, int height, bool serpentine, |
| 885 | fl::u8 octaves, fl::u16 x, int xscale, fl::u16 y, int yscale, fl::u16 time, |
nothing calls this directly
no test coverage detected