client.loop a chaque passage coute pas plus cher et c'est hyper reactif
This commit is contained in:
parent
482a8aef7e
commit
d407a71ce9
@ -153,12 +153,10 @@ void ledCylon()
|
||||
{
|
||||
// Effet cylon : on allume une led, on attends, on eteinds, on passe à la suivante
|
||||
for(int i = 0; i < LED_NUM; i++) {
|
||||
EVERY_N_SECONDS(1) {
|
||||
client.loop();
|
||||
if (ledEffect != LED_EFFECT_CYLON) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
leds[i] = color;
|
||||
FastLED.delay(1000 / speed);
|
||||
@ -167,12 +165,10 @@ void ledCylon()
|
||||
}
|
||||
|
||||
for(int i = LED_NUM - 1; i > 0; i--) {
|
||||
EVERY_N_SECONDS(1) {
|
||||
client.loop();
|
||||
if (ledEffect != LED_EFFECT_CYLON) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
leds[i] = color;
|
||||
FastLED.delay(1000 / speed);
|
||||
@ -202,7 +198,6 @@ void ledFullColor()
|
||||
}
|
||||
|
||||
void loop() {
|
||||
Serial.print(".");
|
||||
// MQTT
|
||||
testConnectMQTT();
|
||||
client.loop();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user