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

◆ setRgbw()

CLEDController & fl::CLEDController::setRgbw ( const Rgbw & arg = RgbwDefault::value())
inline

Definition at line 75 of file cled_controller.h.

75 {
76 // Note that at this time (Sept 13th, 2024) this is only implemented in the ESP32 driver
77 // directly. For an emulated version please see RGBWEmulatedController in chipsets.h
78 //
79 // (#2558) mSettings.mWhiteCfg is now a fl::variant<Empty, Rgbw, Rgbww>;
80 // assigning Rgbw selects the 4-channel alternative. The legacy
81 // "setRgbw(RgbwInvalid::value()) → disable" semantics are preserved
82 // by translating an inactive Rgbw into Empty so observers see the
83 // same "no white channel" state they did before the variant migration.
84 if (!arg.active()) {
85 mSettings.mWhiteCfg.reset();
86 } else {
87 mSettings.mWhiteCfg = arg;
88 }
89 return *this; // builder pattern.
90 }
ChannelOptions mSettings
Optional channel settings (correction, temperature, dither, rgbw, affinity)
FASTLED_FORCE_INLINE bool active() const FL_NOEXCEPT
Definition rgbw.h:182

References CLEDController(), FL_NOEXCEPT, setRgbw(), and fl::type_rank< T >::value.

Referenced by RGBWEmulatedController< CONTROLLER, RGB_ORDER >::RGBWEmulatedController(), fl::UCS7604ControllerT< DATA_PIN, RGB_ORDER, fl::UCS7604Mode::UCS7604_MODE_8BIT_800KHZ, fl::TIMING_UCS7604_800KHZ, CLOCKLESS_CONTROLLER >::init(), and setRgbw().

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