| 200 | |
| 201 | template <typename CONTAINER_UIN8_T> |
| 202 | void writeWS2812(CONTAINER_UIN8_T* out) FL_NOEXCEPT { |
| 203 | auto back_ins = fl::back_inserter(*out); |
| 204 | // (#2558) Dispatch order: RGBWW > RGBW > RGB. The variant migration |
| 205 | // makes these mutually exclusive — at most one alternative is active. |
| 206 | if (mRgbww.active()) { |
| 207 | auto range = makeScaledPixelRangeRGBWW(this); |
| 208 | encodeWS2812_RGBWW(range.first, range.second, back_ins); |
| 209 | } else if (mRgbw.active()) { |
| 210 | auto range = makeScaledPixelRangeRGBW(this); |
| 211 | encodeWS2812_RGBW(range.first, range.second, back_ins); |
| 212 | } else { |
| 213 | auto range = makeScaledPixelRangeRGB(this); |
| 214 | encodeWS2812_RGB(range.first, range.second, back_ins); |
| 215 | } |
| 216 | } |
| 217 | |
| 218 | /// @brief Encode pixels in APA102/DOTSTAR format (zero allocation) |
| 219 | /// @param out Output buffer to write encoded bytes |
no test coverage detected