Aircoookie / WLED

Control WS2812B and many more types of digital RGB LEDs with an ESP8266 or ESP32 over WiFi!
https://kno.wled.ge
MIT License
15.1k stars 3.27k forks source link

When using analog quantity to control wled speed, the speed cannot change smoothly. Why? #4313

Open czweb opened 5 days ago

czweb commented 5 days ago

What happened?

When using analog quantity to control wled speed, the speed cannot change smoothly. Why? set2

Video: https://www.youtube.com/shorts/9PZYwQT0Qoc set1

To Reproduce Bug

using analog

Expected Behavior

Just like stepping on the accelerator, it feels like stepless speed regulation and should not jump

Install Method

Binary from WLED.me

What version of WLED?

=WLED 0.13.4

Which microcontroller/board are you seeing the problem on?

ESP32

Relevant log/trace output

No response

Anything else?

No response

Code of Conduct

czweb commented 5 days ago

The speed will also jump when you use wled web page to adjust the speed, or control the speed through node-red or HomeAssistant. The jump looks like starting the playback from the beginning, and it cannot be infinitely changed like driving a car.

DedeHai commented 5 days ago

Smooth speed transitions are not implemened. Also it depends on how the FX handles speed changes, different effects can react differently to a speed change

softhack007 commented 5 days ago

We have almost 200 effects and all of them handle their progress calculations individually. Some use time = strip.now / (256 - SEGENV.speed), which makes them jump when you change the speed slider. It has always been like this.

There are other effects that require a delay between frames, and the delay is controlled by SEGENV.speed. so there is no generic solution - we'd need to comb through more than 200 effects, and each effect would needs it's own special solution. Some effects even use "speed" with a completely different meaning - like Lissajous (phase angle), GEQ (amount of fade), Gravimeter (delay of peak indicator), etc.

I don't see when/how we could find the time and people to address this topic. If you have a special effect in mind and you know how to change the effect source code, please feel free to contribute via pull request (PR).

czweb commented 5 days ago

Smooth speed transitions are not implemened. Also it depends on how the FX handles speed changes, different effects can react differently to a speed change

Thank you. It turns out that different effects will react differently to speed changes. Not smooth: Chase, Lighthouse, Loading, TWODots Smooth: Finally chose "meteor smooth"