indentation + doc
This commit is contained in:
parent
cec7d7140e
commit
04e2bf3de1
@ -14,7 +14,7 @@ int brightness = LED_BRIGHTNESS_DEFAULT;
|
|||||||
int color = LED_COLOR_DEFAULT;
|
int color = LED_COLOR_DEFAULT;
|
||||||
int speed = LED_SPEED_DEFAULT;
|
int speed = LED_SPEED_DEFAULT;
|
||||||
CRGB leds[LED_NUM];
|
CRGB leds[LED_NUM];
|
||||||
String ledEffect = LED_EFFECT_CYLON;
|
String ledEffect = LED_EFFECT_ERROR;
|
||||||
boolean ledState = false;
|
boolean ledState = false;
|
||||||
|
|
||||||
// WIFI
|
// WIFI
|
||||||
@ -149,15 +149,21 @@ void callbackMQTT(char* topic, byte* payload, unsigned int length)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// LED
|
// LED
|
||||||
|
/**
|
||||||
|
* Coupe tout le strip de led.
|
||||||
|
*/
|
||||||
void ledBlackAll()
|
void ledBlackAll()
|
||||||
{
|
{
|
||||||
FastLED.clear();
|
FastLED.clear();
|
||||||
FastLED.show();
|
FastLED.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Effet Cylon : défilement d'une simple led sur le strip aller/retour.
|
||||||
|
* Pour faire plus sympas on ajoute une lueur autour, avec une lumière atténué.
|
||||||
|
*/
|
||||||
void ledCylon()
|
void ledCylon()
|
||||||
{
|
{
|
||||||
// Effet cylon : on allume une led, on attends, on eteinds, on passe à la suivante
|
|
||||||
for(int i = 0; i < LED_NUM; i++) {
|
for(int i = 0; i < LED_NUM; i++) {
|
||||||
client.loop();
|
client.loop();
|
||||||
|
|
||||||
@ -228,6 +234,9 @@ void ledCylon()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Utilise pour indiquer une erreur sur la reception de l'effet.
|
||||||
|
*/
|
||||||
void ledError()
|
void ledError()
|
||||||
{
|
{
|
||||||
for(int i = 0; i < LED_NUM; i++) {
|
for(int i = 0; i < LED_NUM; i++) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user