@brief Apply the white-channel selection from ChannelOptions to a CLEDController. The variant alternative chooses RGB-only / RGBW / RGBWW without forcing every call site to duplicate the dispatch.
| 33 | /// CLEDController. The variant alternative chooses RGB-only / RGBW / RGBWW |
| 34 | /// without forcing every call site to duplicate the dispatch. |
| 35 | inline void applyWhiteCfg(CLEDController& ctrl, |
| 36 | const ChannelOptions& options) FL_NOEXCEPT { |
| 37 | if (auto* p = options.mWhiteCfg.ptr<Rgbww>()) { |
| 38 | ctrl.setRgbww(*p); |
| 39 | } else if (auto* p = options.mWhiteCfg.ptr<Rgbw>()) { |
| 40 | ctrl.setRgbw(*p); |
| 41 | } else { |
| 42 | // Empty alternative (or default-constructed) → plain RGB. |
| 43 | ctrl.clearWhiteChannel(); |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | /// @brief Encapsulates pixel iterator construction with optional XYMap reordering |
| 48 | class ReorderingPixelIteratorAny { |
no outgoing calls
no test coverage detected