336 {
339
340
341 if (
result.contains(
"ack")) {
342 auto ackOpt =
result[
"ack"].as_bool();
343 if (ackOpt && *ackOpt) {
344 Serial.println(
"<<< [CLIENT] Received ACK");
345 return;
346 }
347 }
348
349
350 if (
result.contains(
"update")) {
351 auto updateOpt =
result[
"update"].as_int();
352 if (updateOpt) {
353 int update = *updateOpt;
354 fl::printf(
"<<< [CLIENT] Received update: %d\n", update);
357 }
358 return;
359 }
360
361
362 if (
result.contains(
"stop")) {
363 auto stopOpt =
result[
"stop"].as_bool();
364 if (stopOpt && *stopOpt) {
365 Serial.println(
"<<< [CLIENT] Received FINAL result");
367 return;
368 }
369 }
370
371
372 Serial.print(
"<<< [CLIENT] Received result: ");
375 }
376}
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
void printf(const char *format, const Args &... args) FL_NOEXCEPT
Printf-like formatting function that prints directly to the platform output.
expected< T, E > result
Alias for expected (Rust-style naming)
@ Purple
<div style='background:#800080;width:4em;height:4em;'></div>