MCPcopy Create free account
hub / github.com/OpenEPaperLink/OpenEPaperLink / showColorPattern

Function showColorPattern

ESP32_AP-Flasher/src/leds.cpp:96–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95
96void showColorPattern(CRGB colorone, CRGB colortwo, CRGB colorthree) {
97 struct ledInstructionRGB* rgb;
98 const int patternLengths[] = {600, 120, 200, 120, 200, 120};
99 const CRGB patternColors[] = {CRGB::Black, colorone, CRGB::Black, colortwo, CRGB::Black, colorthree};
100
101 while (xQueueReceive(rgbLedQueue, &rgb, 0) == pdPASS) { }
102
103 for (int i = 0; i < sizeof(patternLengths) / sizeof(patternLengths[0]); i++) {
104 rgb = new struct ledInstructionRGB;
105 rgb->ledColor = patternColors[i];
106 rgb->fadeTime = 0;
107 rgb->length = patternLengths[i];
108 addToRGBQueue(rgb, true);
109 }
110}
111
112void showRGB() {
113 FastLED.show();

Callers 3

checkWaitPowerCycleFunction · 0.70
APTaskFunction · 0.70
setupFunction · 0.70

Calls 1

addToRGBQueueFunction · 0.70

Tested by

no test coverage detected