FastLED 3.10.6
Loading...
Searching...
No Matches

◆ loadAndScaleRGBWW()

template<EOrder RGB_ORDER, int LANES = 1, fl::u32 MASK = 0xFFFFFFFF>
FASTLED_FORCE_INLINE void PixelController< RGB_ORDER, LANES, MASK >::loadAndScaleRGBWW ( fl::Rgbww rgbww,
fl::u8 * b0_out,
fl::u8 * b1_out,
fl::u8 * b2_out,
fl::u8 * b3_out,
fl::u8 * b4_out )
inline

Load + scale a single pixel to 5-channel RGBWW (issue #2558).

Mirrors loadAndScaleRGBW: applies the per-channel premix scale, dispatches to rgb_2_rgbww for the colorimetric solve, then routes the five output bytes through rgbww_partial_reorder for the wire-order placement.

Definition at line 604 of file pixel_controller.h.

607 {
608#ifdef FL_IS_AVR
609 // AVR: float colorimetric math is too expensive on the 8-bit core;
610 // the strip will get RGB-only output with both white channels black.
611 // Surface this with a FL_WARN_ONCE so the silent dropout is visible
612 // when debugging — a user configuring RGBWW on an AVR target almost
613 // certainly didn't expect their warm/cool W channels to be inert.
614 FL_WARN_ONCE("RGBWW colorimetric is not supported on AVR — the warm "
615 "and cool white channels will be black. Use an ESP32 / "
616 "Teensy / RP2040 target for full RGBWW support.");
621 rgbww.w_placement,
622 r_pre, g_pre, b_pre,
623 0, 0,
625#else
629 CRGB rgb;
630 fl::u8 ww = 0;
631 fl::u8 wc = 0;
634 rgbww.w_placement,
635 rgb.raw[b0_index],
636 rgb.raw[b1_index],
637 rgb.raw[b2_index],
638 ww, wc,
640#endif
641 }
#define FL_WARN_ONCE(...)
Definition log.h:442
void rgbww_partial_reorder(EOrderWW ww_placement, u8 b0, u8 b1, u8 b2, u8 ww, u8 wc, u8 *out_b0, u8 *out_b1, u8 *out_b2, u8 *out_b3, u8 *out_b4) FL_NO_EXCEPT
Dispatch RGB->RGBWW for a given mode.
#define RGB_BYTE2(RO)
Gets the color channel for byte 2.
#define RGB_BYTE1(RO)
Gets the color channel for byte 1.
#define RGB_BYTE0(RO)
Gets the color channel for byte 0.
FASTLED_FORCE_INLINE fl::u8 loadAndScale1()
non-template alias of loadAndScale<1>()
FASTLED_FORCE_INLINE void loadAndScaleRGBWWUnordered(fl::Rgbww rgbww, fl::u8 *r_out, fl::u8 *g_out, fl::u8 *b_out, fl::u8 *ww_out, fl::u8 *wc_out)
loadAndScaleRGBWW before its wire reorder. See loadAndScaleRGBWUnordered.
FASTLED_FORCE_INLINE fl::u8 loadAndScale0()
non-template alias of loadAndScale<0>()
FASTLED_FORCE_INLINE fl::u8 loadAndScale2()
non-template alias of loadAndScale<2>()
Pixel controller class.

References FASTLED_FORCE_INLINE, FL_WARN_ONCE, loadAndScale0(), loadAndScale1(), loadAndScale2(), loadAndScaleRGBWWUnordered(), RGB_BYTE0, RGB_BYTE1, RGB_BYTE2, RGB_ORDER, fl::rgbww_partial_reorder(), and fl::Rgbww::w_placement.

+ Here is the call graph for this function: