| 103 | } |
| 104 | |
| 105 | void setup() { |
| 106 | CLEDController *controller = |
| 107 | &FastLED.addLeds<LED_TYPE, DATA_PIN, COLOR_ORDER>(leds, NUM_LEDS); |
| 108 | FastLED.setBrightness(BRIGHTNESS); |
| 109 | FastLED.clear(true); |
| 110 | // When user adjusts UI, reflect into model speed |
| 111 | // Provide screen map to UI with a specific LED diameter |
| 112 | fl::XYMap xy = kMatrixSerpentineLayout |
| 113 | ? fl::XYMap::constructSerpentine(WIDTH, HEIGHT) |
| 114 | : fl::XYMap::constructRectangularGrid(WIDTH, HEIGHT); |
| 115 | fl::ScreenMap screenmap = xy.toScreenMap(); |
| 116 | screenmap.setDiameter(0.15f); |
| 117 | controller->setScreenMap(screenmap); |
| 118 | // init particles as "dead" |
| 119 | for (int i = 0; i < MAXP; ++i) |
| 120 | ps[i].alive = false; |
| 121 | } |
| 122 | |
| 123 | |
| 124 |
nothing calls this directly
no test coverage detected