21 fl::vector<fl::i32> polar_theta_raw;
22 fl::vector<fl::i32> distance_raw;
23 fl::vector<fl::i32> sqrt_distance_raw;
24 fl::vector<fl::u16> pixel_idx;
29 bool fade_lut_initialized = false;
31 FPVizState()
FL_NO_EXCEPT : fade_lut{}, fade_lut_initialized(
false) {}
36 const int num_x = e->num_x;
37 const int num_y = e->num_y;
38 const int total_pixels = num_x * num_y;
40 if (count != total_pixels) {
41 const int padded = (total_pixels + 3) & ~3;
42 polar_theta_raw.resize(padded, 0);
43 distance_raw.
resize(padded, 0);
44 sqrt_distance_raw.
resize(padded, 0);
45 pixel_idx.
resize(padded, 0);
48 for (
int x = 0;
x < num_x;
x++) {
49 for (
int y = 0;
y < num_y;
y++) {
50 polar_theta_raw[idx] = fl::s16x16(e->polar_theta[
x][
y]).raw();
51 distance_raw[idx] = fl::s16x16(e->distance[
x][
y]).raw();
52 sqrt_distance_raw[idx] = fl::s16x16(e->distance[
x][
y]).sqrt().raw();
53 pixel_idx[idx] = e->mCtx->xyMapFn(
x,
y, e->mCtx->xyMapUserData);
60 if (!fade_lut_initialized) {
62 fade_lut_initialized =
true;
Alignment macros and utilities for FastLED.
void resize(fl::size n) FL_NO_EXCEPT
u8 u8 fract8 blur_amount FL_NO_EXCEPT
struct FL_ALIGNAS(4) Wave3BitExpansionLut
Lookup table for nibble-to-waveform expansion in wave3 format (32 bytes)
Base definition for an LED controller.
static void init_fade_lut(fl::i32 *table) FL_NO_EXCEPT