Test every n seconds plutot qu'un nombre de passe
This commit is contained in:
parent
c2fe8b118f
commit
a4c8fc3606
@ -140,9 +140,8 @@ void ledBlackAll()
|
|||||||
void ledCylon()
|
void ledCylon()
|
||||||
{
|
{
|
||||||
// Effet cylon : on allume une led, on attends, on eteinds, on passe à la suivante
|
// 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++) {
|
for(int i = 0; i < LED_NUM; i++) {
|
||||||
if ((i % 10) == 0) {
|
EVERY_N_SECONDS(1) {
|
||||||
client.loop();
|
client.loop();
|
||||||
if (ledEffect != LED_EFFECT_CYLON) {
|
if (ledEffect != LED_EFFECT_CYLON) {
|
||||||
return;
|
return;
|
||||||
@ -156,8 +155,9 @@ void ledCylon()
|
|||||||
FastLED.show();
|
FastLED.show();
|
||||||
FastLED.delay(1000 / speed);
|
FastLED.delay(1000 / speed);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int i = LED_NUM - 1; i > 0; i--) {
|
for(int i = LED_NUM - 1; i > 0; i--) {
|
||||||
if ((i % 10) == 0) {
|
EVERY_N_SECONDS(1) {
|
||||||
client.loop();
|
client.loop();
|
||||||
if (ledEffect != LED_EFFECT_CYLON) {
|
if (ledEffect != LED_EFFECT_CYLON) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user