-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added wipe in and wipe out effects #4358
base: main
Are you sure you want to change the base?
Conversation
thanks for contributing! |
Not a bad idea, I'm totally new in this world, and it was easier for me to create a new, instead of modifying and maybe breaking something... If you know how to do that, I would appreciate for your help! |
There seems to be a lot of other duplicate effects and some of them are useless so I see why not add another wipe effect that is as @Rinszky listed have been requested a lot and doing it with playlist is bad . |
@Rinszky Now I see it I am also not sure why add 5 effects when only two can do . The expected behavior we had in mind and done with playlist is one effect to lights all the leds one by one and then all the leds should stay on . The 2nd effect will turn off the leds one by one and then keep all of them off |
@dosipod can you confirm the new blending styles are suited to solve this? if so, there is not need to change the wipe effect as the blend-in is much more versatile. |
@DedeHai I never tested that but if blaz said so then must be |
I think I was traveling at the time but there is even video here of wipe in but not named so it was not clear to others what he was referencing https://discord.com/channels/473448917040758787/779395228624617512/1258428188527296614 |
// All LEDs are off, reset | ||
SEGENV.aux1 = 0; | ||
strip.setBrightness(0); | ||
return 65535; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will not cause a "forever black" - the effect will run again in 65535 millis = 65 seconds. Also manipulating strip
properties in an effect (at segment
level) is a very fragile thing and should be avoided.
|
||
uint16_t duration = 1000 - (SEGMENT.speed * 4); // Adjust speed (1-255) to duration (1000ms to 20ms) | ||
uint16_t stepDuration = duration / SEGLEN; | ||
uint32_t currentTime = millis(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use strip.now instead of millis()
|
||
uint16_t duration = 1000 - (SEGMENT.speed * 4); // Adjust speed (1-255) to duration (1000ms to 20ms) | ||
uint16_t stepDuration = duration / SEGLEN; | ||
uint32_t currentTime = millis(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see previous comment
Everyone, please see blending styles before continuing discussion on this PR. |
@Rinszky If I understand your code correctly, your implementation of "wipe" is always filling / clearing the segment with a single color, right? This means we still have no good solution for animated effects. To preserve some space in the effect table, it might be better to add "wiping" options (checkboxes) and wipe speed control (sliders) to the "Solid" effect. It would be possible to still have a "wipe-off" by using several presets for "wipe in" "normal light", "wipe out" an "lights out" |
This is a wipe in and wipe out effect to turn on and off the led smoothly with slide.
It was very important for me, and maybe it'll be beneficial for others, I saw a lot of topic about this how to turn on and off like this...
Before this, it was possible only with playlists, but the timing was problematic.
example1
example2
example3
example4
So Maintainer, please decide if you need this effect or not!
Should I change something to be better?
If you know a better name for this effect, let me know and I'll rename it!
Thank you for this cool product!!!