indentation + doc
This commit is contained in:
parent
04e2bf3de1
commit
cb79045c31
@ -250,10 +250,15 @@ void ledError()
|
||||
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()
|
||||
{
|
||||
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/
|
||||
// Augmenter 2000 augmente la fréquence (c'est en fait sin((temps / 1000) * Pi/2)
|
||||
// 0.36787944 ?? censé correspondre au minimum
|
||||
@ -275,7 +280,6 @@ void ledColorPattern()
|
||||
|
||||
FillLEDsFromPaletteColors(startIndex);
|
||||
|
||||
FastLED.show();
|
||||
FastLED.delay(1000 / speed);
|
||||
}
|
||||
|
||||
@ -284,7 +288,12 @@ void FillLEDsFromPaletteColors(uint8_t colorIndex)
|
||||
uint8_t brightness = 255;
|
||||
|
||||
for( int i = 0; i < LED_NUM; i++) {
|
||||
leds[i] = ColorFromPalette(currentPalette, colorIndex, brightness, currentBlending);
|
||||
leds[i] = ColorFromPalette(
|
||||
currentPalette,
|
||||
colorIndex,
|
||||
brightness,
|
||||
currentBlending
|
||||
);
|
||||
colorIndex += 3;
|
||||
}
|
||||
}
|
||||
@ -296,7 +305,6 @@ void FillLEDsFromPaletteColors(uint8_t colorIndex)
|
||||
//
|
||||
// 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.
|
||||
|
||||
void ChangePalettePeriodically()
|
||||
{
|
||||
uint8_t secondHand = (millis() / 1000) % 60;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user