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
14.57k stars 3.12k forks source link

Playlist: can not set the duration to under 1 second #3359

Closed KlausHans closed 1 year ago

KlausHans commented 1 year ago

What happened?

Based on https://github.com/Aircoookie/WLED/issues/346#issuecomment-1219882212 i tried to set a duration for a playlist entry to 0.1 s. But the minimum duration i can set in the gui is 1 s. If i change to json view and set "dur":[1] (0.1 s) the value doesn't get saved. Instead the default value of 100 (10 s) is saved. Tested Firefox and Chromium.

To Reproduce Bug

Some screenshots of my setup: Preset: grafik

Playlist with fresh input of "dur":[1]: grafik after clicking save and open the playlist again; grafik

Expected Behavior

I can set a duration lower than 1 second.

Install Method

Binary from WLED.me

What version of WLED?

0.14.0-b4

Which microcontroller/board are you seeing the problem on?

ESP32

Relevant log/trace output

No response

Anything else?

No response

Code of Conduct

blazoncek commented 1 year ago

Minimum duration value is 0.2s. This is a design choice. Tested on multiple units.

KlausHans commented 1 year ago

0.2 works indeed. Thank you for clarifying. This info could be added to the documentation.

softhack007 commented 1 year ago

@blazoncek not sure if this was about a value entered in a field in web UI, or just direct json in presets? If it's about web UI, maybe we could add a "min" to the input field?

KlausHans commented 1 year ago

It was both. A min constraint on the input in the Ui is a good idea.

blazoncek commented 1 year ago

@blazoncek not sure if this was about a value entered in a field in web UI, or just direct json in presets? If it's about web UI, maybe we could add a "min" to the input field?

UI already has the "min" property and a "step" property (min="0.2" step="0.1"). This is converted to 1/10ths of a second and submitted in JSON.

KlausHans commented 1 year ago

Ok but it doesn't show any hint or error if i put 0.1 in.

blazoncek commented 1 year ago

Ok but it doesn't show any hint or error if i put 0.1 in.

True, I noticed that. There is a validation, but does not work as expected.