16 template <
typename T>
static T
min(T a, T b) {
return a < b ? a : b; }
24 uint16_t square_size =
Math::min(width, height) / 2;
25 uint16_t start_x = (width - square_size) / 2;
26 uint16_t start_y = (height - square_size) / 2;
28 for (uint16_t
x = 0;
x < width;
x++) {
29 for (uint16_t
y = 0;
y < height;
y++) {
30 uint16_t idx =
mXyMap.mapToIndex(
x,
y);
31 if (idx <
mXyMap.getTotal()) {
32 if (
x >= start_x &&
x < start_x + square_size &&
33 y >= start_y &&
y < start_y + square_size) {
XYMap xymap(WIDTH, HEIGHT, SERPENTINE)
central include file for FastLED, defines the CFastLED class/object
uint16_t getHeight() const
uint16_t getWidth() const
void draw(DrawContext context) override
fl::Str fxName() const override
#define FASTLED_SMART_PTR(type)
Implements a simple red square effect for 2D LED grids.
@ Red
<div style='background:#FF0000;width:4em;height:4em;'></div>
@ Black
<div style='background:#000000;width:4em;height:4em;'></div>