From 762d4433d8a3da135cb1d3a13c5c87f89e2a47cd Mon Sep 17 00:00:00 2001 From: Benjam Welker Date: Sat, 20 Sep 2025 02:58:37 -0600 Subject: [PATCH] Add reverse checkmark for Twinklecat (#4728) reverse slowly fades in random lights, and then instantly turns them off. --- wled00/FX.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/wled00/FX.cpp b/wled00/FX.cpp index 3d580bb9..f6bf54c0 100644 --- a/wled00/FX.cpp +++ b/wled00/FX.cpp @@ -2606,9 +2606,11 @@ static CRGB twinklefox_one_twinkle(uint32_t ms, uint8_t salt, bool cat) // This is like 'triwave8', which produces a // symmetrical up-and-down triangle sawtooth waveform, except that this // 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; + if (SEGMENT.check2) { //reverse checkbox, reverses the leds to fade on and instantly turn off + bright = ph; + } } else { //vanilla twinklefox if (ph < 86) { bright = ph * 3; @@ -2716,7 +2718,7 @@ uint16_t mode_twinklecat() { return twinklefox_base(true); } -static const char _data_FX_MODE_TWINKLECAT[] PROGMEM = "Twinklecat@!,Twinkle rate,,,,Cool;!,!;!"; +static const char _data_FX_MODE_TWINKLECAT[] PROGMEM = "Twinklecat@!,Twinkle rate,,,,Cool,Reverse;!,!;!"; uint16_t mode_halloween_eyes()