|
|
@ -380,6 +380,7 @@ void ChangePalettePeriodically() |
|
|
|
|
|
|
|
|
if( lastSecond != secondHand) { |
|
|
if( lastSecond != secondHand) { |
|
|
lastSecond = secondHand; |
|
|
lastSecond = secondHand; |
|
|
|
|
|
/*
|
|
|
if (secondHand == 0) { currentPalette = RainbowColors_p; currentBlending = LINEARBLEND; } |
|
|
if (secondHand == 0) { currentPalette = RainbowColors_p; currentBlending = LINEARBLEND; } |
|
|
if (secondHand == 10) { currentPalette = RainbowStripeColors_p; currentBlending = NOBLEND; } |
|
|
if (secondHand == 10) { currentPalette = RainbowStripeColors_p; currentBlending = NOBLEND; } |
|
|
if (secondHand == 15) { currentPalette = RainbowStripeColors_p; currentBlending = LINEARBLEND; } |
|
|
if (secondHand == 15) { currentPalette = RainbowStripeColors_p; currentBlending = LINEARBLEND; } |
|
|
@ -391,9 +392,15 @@ void ChangePalettePeriodically() |
|
|
if (secondHand == 45) { currentPalette = PartyColors_p; currentBlending = LINEARBLEND; } |
|
|
if (secondHand == 45) { currentPalette = PartyColors_p; currentBlending = LINEARBLEND; } |
|
|
if (secondHand == 50) { currentPalette = myRedWhiteBluePalette_p; currentBlending = NOBLEND; } |
|
|
if (secondHand == 50) { currentPalette = myRedWhiteBluePalette_p; currentBlending = NOBLEND; } |
|
|
if (secondHand == 55) { currentPalette = myRedWhiteBluePalette_p; currentBlending = LINEARBLEND; } |
|
|
if (secondHand == 55) { currentPalette = myRedWhiteBluePalette_p; currentBlending = LINEARBLEND; } |
|
|
|
|
|
*/ |
|
|
|
|
|
if (secondHand == 0) { SetupPurpleAndGreenPalette(); currentBlending = LINEARBLEND; } |
|
|
|
|
|
if (secondHand == 10) { SetupBlackAndWhiteStripedPalette(); currentBlending = LINEARBLEND; } |
|
|
|
|
|
if (secondHand == 30) { currentPalette = CloudColors_p; currentBlending = LINEARBLEND; } |
|
|
|
|
|
if (secondHand == 40) { currentPalette = myRedWhiteBluePalette_p; currentBlending = LINEARBLEND; } |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
// This function fills the palette with totally random colors.
|
|
|
// This function fills the palette with totally random colors.
|
|
|
void SetupTotallyRandomPalette() |
|
|
void SetupTotallyRandomPalette() |
|
|
{ |
|
|
{ |
|
|
@ -401,6 +408,7 @@ void SetupTotallyRandomPalette() |
|
|
currentPalette[i] = CHSV(random8(), 255, random8()); |
|
|
currentPalette[i] = CHSV(random8(), 255, random8()); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// This function sets up a palette of black and white stripes,
|
|
|
// This function sets up a palette of black and white stripes,
|
|
|
// using code. Since the palette is effectively an array of
|
|
|
// using code. Since the palette is effectively an array of
|
|
|
@ -511,6 +519,7 @@ void loop() { |
|
|
if (ledEffect == LED_EFFECT_CYLON) { |
|
|
if (ledEffect == LED_EFFECT_CYLON) { |
|
|
ledCylon(); |
|
|
ledCylon(); |
|
|
} else if (ledEffect == LED_EFFECT_FULLRED) { |
|
|
} else if (ledEffect == LED_EFFECT_FULLRED) { |
|
|
|
|
|
//TODO : degager ce nom : LED_EFFECT_FULLRED
|
|
|
ledFullColor(); |
|
|
ledFullColor(); |
|
|
} else if (ledEffect == LED_EFFECT_COLORPATTERN) { |
|
|
} else if (ledEffect == LED_EFFECT_COLORPATTERN) { |
|
|
ledColorPattern(); |
|
|
ledColorPattern(); |
|
|
|