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

◆ XY()

uint8_t XY ( uint8_t x,
uint8_t y )

Definition at line 208 of file Fire2023.ino.

208 {
209 // any out of bounds address maps to the first hidden pixel
210 // https://macetech.github.io/FastLED-XY-Map-Generator/
211 if ( (x >= WIDTH) || (y >= HEIGHT) ) {
212 return (LAST_VISIBLE_LED + 1);
213 }
214 const uint8_t XYTable[] = {
215 25, 26, 81, 82,
216 25, 27, 81, 83,
217 25, 28, 80, 84,
218 24, 29, 79, 85,
219 23, 30, 78, 86,
220 22, 31, 77, 87,
221 21, 32, 76, 88,
222 20, 33, 75, 89,
223 19, 34, 74, 90,
224 18, 35, 73, 91,
225 17, 36, 72, 92,
226 16, 37, 71, 93,
227 15, 38, 70, 94,
228 14, 39, 69, 95,
229 13, 40, 68, 96,
230 12, 41, 67, 97,
231 11, 42, 66, 98,
232 10, 43, 65, 99,
233 9, 44, 64, 100,
234 8, 45, 63, 101,
235 7, 46, 62, 102,
236 6, 47, 61, 103,
237 5, 48, 60, 104,
238 4, 49, 59, 105,
239 3, 50, 58, 106,
240 2, 51, 57, 107,
241 1, 52, 56, 108,
242 0, 53, 55, 109
243 };
244
245 uint8_t i = (y * WIDTH) + x;
246 uint8_t j = XYTable[i];
247 return j;
248}
#define WIDTH
Definition Blur2d.ino:9
#define HEIGHT
Definition Blur2d.ino:10
uint32_t x[NUM_LAYERS]
Definition Fire2023.ino:80
#define LAST_VISIBLE_LED
Definition Fire2023.ino:36
uint32_t y[NUM_LAYERS]
Definition Fire2023.ino:81

References HEIGHT, LAST_VISIBLE_LED, WIDTH, x, and y.

Referenced by Fire2023().

+ Here is the caller graph for this function: