Build expected UCS7604 encoded bytes from LED data.
- Parameters
-
| leds | LED data span |
| encoder | Encoder selector identifying the UCS7604 variant |
- Returns
- Vector of expected encoded bytes (preamble + padding + pixel data)
Definition at line 129 of file AutoResearchTest.cpp.
129 {
131
132
134 switch (encoder) {
137 break;
140 break;
143 break;
144 default:
145 return expected;
146 }
147
148
150
151
154
155
158 if (use_gamma) {
160 }
161
162
164 mode, current,
false ,
gamma.get());
165
166 return expected;
167}
static fl::shared_ptr< const Gamma8 > getOrCreate(float gamma) FL_NOEXCEPT
#define DISABLE_DITHER
Disable dithering.
@ CLOCKLESS_ENCODER_UCS7604_8BIT
UCS7604 8-bit 800KHz.
@ CLOCKLESS_ENCODER_UCS7604_16BIT
UCS7604 16-bit 800KHz.
@ CLOCKLESS_ENCODER_UCS7604_16BIT_1600
UCS7604 16-bit 1600KHz.
back_insert_iterator< Container > back_inserter(Container &c) FL_NOEXCEPT
Helper function to create a back_insert_iterator.
UCS7604Mode
UCS7604 protocol configuration modes.
@ UCS7604_MODE_8BIT_800KHZ
@ UCS7604_MODE_16BIT_1600KHZ
@ UCS7604_MODE_16BIT_800KHZ
constexpr u32 gamma(float g) FL_NOEXCEPT
void encodeUCS7604(PixelIterator &pixel_iter, size_t num_leds, OutputIterator out, UCS7604Mode mode, const UCS7604CurrentControl ¤t, bool is_rgbw, const Gamma8 *gamma=nullptr)
Encode complete UCS7604 frame (preamble + padding + pixel data)
static ColorAdjustment noAdjustment()
the per-channel scale values premixed with brightness.
UCS7604 current control structure with 4-bit fields for each channel.
References PixelController< RGB_ORDER, LANES, MASK >::as_iterator(), fl::back_inserter(), fl::CLOCKLESS_ENCODER_UCS7604_16BIT, fl::CLOCKLESS_ENCODER_UCS7604_16BIT_1600, fl::CLOCKLESS_ENCODER_UCS7604_8BIT, DISABLE_DITHER, fl::encodeUCS7604(), fl::Gamma8::getOrCreate(), leds, ColorAdjustment::noAdjustment(), fl::UCS7604_MODE_16BIT_1600KHZ, fl::UCS7604_MODE_16BIT_800KHZ, and fl::UCS7604_MODE_8BIT_800KHZ.
Referenced by runMultiTest(), and runTest().