MCPcopy Create free account
hub / github.com/FastLED/FastLED / setup

Function setup

examples/Downscale/Downscale.h:101–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101void setup() {
102 Serial.begin(115200);
103 auto screenmap = xyMap.toScreenMap();
104 screenmap.setDiameter(.2);
105 FastLED.addLeds<NEOPIXEL, 2>(leds, xyMap.getTotal())
106 .setScreenMap(screenmap);
107 auto screenmap2 = xyMap_Dst.toScreenMap();
108 screenmap.setDiameter(.5);
109 screenmap2.addOffsetY(-HEIGHT / 2);
110 FastLED.addLeds<NEOPIXEL, 3>(leds_downscaled, xyMap_Dst.getTotal())
111 .setScreenMap(screenmap2);
112 setupUiCallbacks();
113 // Initialize wave simulation. Please don't use static constructors, keep it
114 // in setup().
115 trigger.click();
116 wave_fx = NewWaveSimulation2D(xyMap);
117}
118
119//////////////////// LOOP SECTION /////////////////////////////
120

Callers

nothing calls this directly

Calls 8

setDiameterMethod · 0.80
getTotalMethod · 0.80
setupUiCallbacksFunction · 0.70
NewWaveSimulation2DFunction · 0.50
beginMethod · 0.45
toScreenMapMethod · 0.45
setScreenMapMethod · 0.45
clickMethod · 0.45

Tested by

no test coverage detected