|
|
|
@ -140,13 +140,12 @@ void ledBlackAll() |
|
|
|
void ledCylon() |
|
|
|
{ |
|
|
|
// Effet cylon : on allume une led, on attends, on eteinds, on passe à la suivante
|
|
|
|
// TODO : trop d'attente entre les clients.loop !!!!
|
|
|
|
for(int i = 0; i < LED_NUM; i++) { |
|
|
|
if ((i % 10) == 0) { |
|
|
|
client.loop(); |
|
|
|
if (ledEffect != LED_EFFECT_CYLON) { |
|
|
|
return; |
|
|
|
} |
|
|
|
EVERY_N_SECONDS(1) { |
|
|
|
client.loop(); |
|
|
|
if (ledEffect != LED_EFFECT_CYLON) { |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
leds[i] = color; |
|
|
|
@ -156,14 +155,15 @@ void ledCylon() |
|
|
|
FastLED.show(); |
|
|
|
FastLED.delay(1000 / speed); |
|
|
|
} |
|
|
|
|
|
|
|
for(int i = LED_NUM - 1; i > 0; i--) { |
|
|
|
if ((i % 10) == 0) { |
|
|
|
client.loop(); |
|
|
|
if (ledEffect != LED_EFFECT_CYLON) { |
|
|
|
return; |
|
|
|
} |
|
|
|
EVERY_N_SECONDS(1) { |
|
|
|
client.loop(); |
|
|
|
if (ledEffect != LED_EFFECT_CYLON) { |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
leds[i] = color; |
|
|
|
FastLED.show(); |
|
|
|
FastLED.delay(1000 / speed); |
|
|
|
|