FastLED 3.9.15
Loading...
Searching...
No Matches

◆ hsv2rgb_dispatch() [2/2]

FASTLED_FORCE_INLINE void hsv2rgb_dispatch ( const struct CHSV * phsv,
struct CRGB * prgb,
int numLeds )

HSV conversion function selection based on compile-time defines This allows users to configure which HSV conversion algorithm to use by setting one of the following defines:

  • FASTLED_HSV_CONVERSION_SPECTRUM: Use spectrum conversion
  • FASTLED_HSV_CONVERSION_FULL_SPECTRUM: Use full spectrum conversion
  • FASTLED_HSV_CONVERSION_RAINBOW: Use rainbow conversion (explicit)
  • Default (no define): Use rainbow conversion (backward compatibility) Array-based HSV conversion function selection using the same compile-time defines
    Parameters
    phsvCHSV array to convert to RGB
    prgbCRGB array to store the result of the conversion (will be modified)
    numLedsthe number of array values to process

Definition at line 57 of file crgb.h.

58{
59#if defined(FASTLED_HSV_CONVERSION_SPECTRUM)
60 hsv2rgb_spectrum(phsv, prgb, numLeds);
61#elif defined(FASTLED_HSV_CONVERSION_FULL_SPECTRUM)
62 hsv2rgb_fullspectrum(phsv, prgb, numLeds);
63#elif defined(FASTLED_HSV_CONVERSION_RAINBOW)
64 hsv2rgb_rainbow(phsv, prgb, numLeds);
65#else
66 // Default to rainbow for backward compatibility
67 hsv2rgb_rainbow(phsv, prgb, numLeds);
68#endif
69}
CRGB hsv2rgb_rainbow(const struct CHSV &hsv)
Definition hsv2rgb.cpp:261
CRGB hsv2rgb_spectrum(const struct CHSV &hsv)
Inline version of hsv2rgb_spectrum which returns a CRGB object.
Definition hsv2rgb.cpp:45
void hsv2rgb_fullspectrum(const struct CHSV &hsv, CRGB &rgb)
Definition hsv2rgb.cpp:494

References FASTLED_FORCE_INLINE, hsv2rgb_fullspectrum(), hsv2rgb_rainbow(), and hsv2rgb_spectrum().

Referenced by CRGB::CRGB(), CRGB::operator=(), CRGB::setHSV(), and CRGB::setHue().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: