Add reverse checkmark for Twinklecat (#4728)
reverse slowly fades in random lights, and then instantly turns them off.
This commit is contained in:
@@ -2795,9 +2795,11 @@ CRGB twinklefox_one_twinkle(uint32_t ms, uint8_t salt, bool cat)
|
|||||||
// This is like 'triwave8', which produces a
|
// This is like 'triwave8', which produces a
|
||||||
// symmetrical up-and-down triangle sawtooth waveform, except that this
|
// symmetrical up-and-down triangle sawtooth waveform, except that this
|
||||||
// function produces a triangle wave with a faster attack and a slower decay
|
// function produces a triangle wave with a faster attack and a slower decay
|
||||||
if (cat) //twinklecat, variant where the leds instantly turn on
|
if (cat) { //twinklecat, variant where the leds instantly turn on and fade off
|
||||||
{
|
|
||||||
bright = 255 - ph;
|
bright = 255 - ph;
|
||||||
|
if (SEGMENT.check2) { //reverse checkbox, reverses the leds to fade on and instantly turn off
|
||||||
|
bright = ph;
|
||||||
|
}
|
||||||
} else { //vanilla twinklefox
|
} else { //vanilla twinklefox
|
||||||
if (ph < 86) {
|
if (ph < 86) {
|
||||||
bright = ph * 3;
|
bright = ph * 3;
|
||||||
@@ -2905,7 +2907,7 @@ uint16_t mode_twinklecat()
|
|||||||
{
|
{
|
||||||
return twinklefox_base(true);
|
return twinklefox_base(true);
|
||||||
}
|
}
|
||||||
static const char _data_FX_MODE_TWINKLECAT[] PROGMEM = "Twinklecat@!,Twinkle rate;!,!;!";
|
static const char _data_FX_MODE_TWINKLECAT[] PROGMEM = "Twinklecat@!,Twinkle rate,,,,Cool,Reverse;!,!;!";
|
||||||
|
|
||||||
|
|
||||||
//inspired by https://www.tweaking4all.com/hardware/arduino/adruino-led-strip-effects/#LEDStripEffectBlinkingHalloweenEyes
|
//inspired by https://www.tweaking4all.com/hardware/arduino/adruino-led-strip-effects/#LEDStripEffectBlinkingHalloweenEyes
|
||||||
|
|||||||
Reference in New Issue
Block a user