Skip to content

Commit 762d443

Browse files
authored
Add reverse checkmark for Twinklecat (wled#4728)
reverse slowly fades in random lights, and then instantly turns them off.
1 parent 741fd8d commit 762d443

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

wled00/FX.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2606,9 +2606,11 @@ static CRGB twinklefox_one_twinkle(uint32_t ms, uint8_t salt, bool cat)
26062606
// This is like 'triwave8', which produces a
26072607
// symmetrical up-and-down triangle sawtooth waveform, except that this
26082608
// function produces a triangle wave with a faster attack and a slower decay
2609-
if (cat) //twinklecat, variant where the leds instantly turn on
2610-
{
2609+
if (cat) { //twinklecat, variant where the leds instantly turn on and fade off
26112610
bright = 255 - ph;
2611+
if (SEGMENT.check2) { //reverse checkbox, reverses the leds to fade on and instantly turn off
2612+
bright = ph;
2613+
}
26122614
} else { //vanilla twinklefox
26132615
if (ph < 86) {
26142616
bright = ph * 3;
@@ -2716,7 +2718,7 @@ uint16_t mode_twinklecat()
27162718
{
27172719
return twinklefox_base(true);
27182720
}
2719-
static const char _data_FX_MODE_TWINKLECAT[] PROGMEM = "Twinklecat@!,Twinkle rate,,,,Cool;!,!;!";
2721+
static const char _data_FX_MODE_TWINKLECAT[] PROGMEM = "Twinklecat@!,Twinkle rate,,,,Cool,Reverse;!,!;!";
27202722

27212723

27222724
uint16_t mode_halloween_eyes()

0 commit comments

Comments
 (0)