indentation + doc

This commit is contained in:
Julien Cabillot 2017-03-12 01:59:00 +01:00 committed by Cabillot Julien
parent 04e2bf3de1
commit cb79045c31

View File

@ -250,10 +250,15 @@ void ledError()
FastLED.delay(1000 / speed); FastLED.delay(1000 / speed);
} }
/**
* Affiche une couleur de manière uniforme sur le strip.
* Pour éviter un éclairage basique, on applique un breath qui permet
* de faire respirer la couleur (brightness).
*/
void ledFullColor() void ledFullColor()
{ {
fill_solid(leds, LED_NUM, color); fill_solid(leds, LED_NUM, color);
// TODO : il fadrait pas faire 0 -> 255 mais plutot 20 -> brightness // TODO : il fadrait pas faire 0 -> 255 mais plutot 20 (ou plus) -> brightness
// Source : http://sean.voisen.org/blog/2011/10/breathing-led-with-arduino/ // Source : http://sean.voisen.org/blog/2011/10/breathing-led-with-arduino/
// Augmenter 2000 augmente la fréquence (c'est en fait sin((temps / 1000) * Pi/2) // Augmenter 2000 augmente la fréquence (c'est en fait sin((temps / 1000) * Pi/2)
// 0.36787944 ?? censé correspondre au minimum // 0.36787944 ?? censé correspondre au minimum
@ -275,7 +280,6 @@ void ledColorPattern()
FillLEDsFromPaletteColors(startIndex); FillLEDsFromPaletteColors(startIndex);
FastLED.show();
FastLED.delay(1000 / speed); FastLED.delay(1000 / speed);
} }
@ -284,7 +288,12 @@ void FillLEDsFromPaletteColors(uint8_t colorIndex)
uint8_t brightness = 255; uint8_t brightness = 255;
for( int i = 0; i < LED_NUM; i++) { for( int i = 0; i < LED_NUM; i++) {
leds[i] = ColorFromPalette(currentPalette, colorIndex, brightness, currentBlending); leds[i] = ColorFromPalette(
currentPalette,
colorIndex,
brightness,
currentBlending
);
colorIndex += 3; colorIndex += 3;
} }
} }
@ -296,7 +305,6 @@ void FillLEDsFromPaletteColors(uint8_t colorIndex)
// //
// Additionally, you can manually define your own color palettes, or you can write // Additionally, you can manually define your own color palettes, or you can write
// code that creates color palettes on the fly. All are shown here. // code that creates color palettes on the fly. All are shown here.
void ChangePalettePeriodically() void ChangePalettePeriodically()
{ {
uint8_t secondHand = (millis() / 1000) % 60; uint8_t secondHand = (millis() / 1000) % 60;