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

Function updateLEDs

examples/Asio/Server/ServerReal.h:50–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48fl::u32 lastEventTime = 0;
49
50void updateLEDs() {
51 switch (state) {
52 case STARTING:
53 fill_solid(leds, NUM_LEDS, fl::CRGB(0, 0, beatsin8(60))); // Blue pulse
54 break;
55 case RUNNING:
56 fill_solid(leds, NUM_LEDS, fl::CRGB(0, 64, 0)); // Green
57 break;
58 case REQUEST_RECEIVED:
59 fill_solid(leds, NUM_LEDS, fl::CRGB(0, 128, 128)); // Cyan
60 break;
61 case RESPONDED:
62 fill_solid(leds, NUM_LEDS, fl::CRGB(64, 0, 64)); // Purple
63 break;
64 case ERROR:
65 fill_solid(leds, NUM_LEDS, fl::CRGB(64, 0, 0)); // Red
66 break;
67 }
68}
69
70void autoReset() {
71 // Auto-reset flash states to RUNNING after 200ms

Callers 2

setupFunction · 0.70
loopFunction · 0.70

Calls 2

fill_solidFunction · 0.50
CRGBClass · 0.50

Tested by

no test coverage detected