FastLED 3.9.15
Loading...
Searching...
No Matches

◆ loop()

void loop ( )

Definition at line 152 of file ServerReal.h.

152 {
153 // Update server multiple times per loop for better responsiveness
154 // Process up to 10 update cycles per loop iteration
155 fl::size total_processed = 0;
156 for (int i = 0; i < 10; ++i) {
157 fl::size processed = server.update();
158 total_processed += processed;
159 if (processed == 0) break; // No more pending requests
160 }
161
162 if (total_processed > 0) {
163 Serial.print("Processed ");
164 Serial.print(static_cast<int>(total_processed));
165 Serial.println(" request(s)");
168 // After processing, flash purple for "responded"
170 }
171
172 autoReset();
173 updateLEDs();
174 FastLED.show();
175
176 delay(10); // 10ms delay between cycles - up to 1000 requests/second possible
177}
fl::HttpServer server
TestState state
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
void autoReset()
Definition ServerReal.h:70
void updateLEDs()
Definition ServerReal.h:50
fl::u32 lastEventTime
Definition ServerReal.h:48
@ REQUEST_RECEIVED
Definition ServerReal.h:42
@ RESPONDED
Definition ServerReal.h:43
fl::u32 millis()
Universal millisecond timer - returns milliseconds since system startup.
void delay(u32 ms, bool run_async=true) FL_NOEXCEPT
Public delay wrapper that keeps bare Arduino delay() preferred after using fl::delay; while still all...
Definition delay.h:98
#define Serial
Definition serial.h:304

References autoReset(), FastLED, lastEventTime, fl::millis(), REQUEST_RECEIVED, RESPONDED, Serial, server, state, and updateLEDs().

+ Here is the call graph for this function: