WLED icon indicating copy to clipboard operation
WLED copied to clipboard

Clean up UserMod settings: grouping of variables and add preInfo to variables

Open ewoudwijma opened this issue 2 years ago • 6 comments

Small present from the MoonModules team

See https://github.com/MoonModules/WLED/wiki/Merge-history#november-20-2022

Please no 'disapproves' as this is too good ;-)

Screenshot 2022-11-20 at 14 59 01

... and also includes an update to the wemos_shield environment in platform io, to include audio reactive and the alt rotary/4ld implementations

ewoudwijma avatar Nov 20 '22 15:11 ewoudwijma

I personally prefer single topic PRs, where only single changeset, not updating other behaviour

netmindz avatar Nov 20 '22 16:11 netmindz

I personally prefer single topic PRs, where only single changeset, not updating other behaviour

Agree with that, will do next time ;-)

ewoudwijma avatar Nov 21 '22 16:11 ewoudwijma

Added a commit as discussed with @blazoncek to change um settings variable names to init lowercase for the sound reactive usermod (cpp) and add an initCap function in javascript (js) to display all um setting fields and group names initCap.

So PR offered again for approval 🤞

ewoudwijma avatar Nov 21 '22 16:11 ewoudwijma

... and add an initCap function in javascript (js) to display all um setting fields and group names initCap.

An interesting approach. 😀 function initCap(s) { may be easier to understand. I agree with proposed implementation nevertheless. It would be nice if you could also add replacement for - and _ with space.

blazoncek avatar Nov 21 '22 17:11 blazoncek

... and add an initCap function in javascript (js) to display all um setting fields and group names initCap.

An interesting approach. 😀 function initCap(s) { may be easier to understand. I agree with proposed implementation nevertheless. It would be nice if you could also add replacement for - and _ with space.

Sorry, result of copying code from google results without looking ;-) Will change it to function Why replace - and _? I do not see um settings names with - or _ in it.

ewoudwijma avatar Nov 21 '22 19:11 ewoudwijma

IMO ready to merge. @Aircoookie at your leisure.

blazoncek avatar Nov 25 '22 12:11 blazoncek

It may be ridiculous what I have seen in plateformio -D USE_ALT_DISPlAY in the code change. I think, there is a mistake with 1 instead L -D USE_ALT_DISPLAY If this is correct, then sorry to disturb

zigomatichub avatar Nov 28 '22 18:11 zigomatichub

That's called legacy. It is correct as it is.

blazoncek avatar Nov 28 '22 18:11 blazoncek

@blazoncek Due to changes in the way of dealing with txt parameters in addInfo the following code should have also changed:

image

As this is not the way you want it:

image

Can you swap the parameters in above code and commit this to WLED AC in order to correct this? Or revert back to the initial setup, as calling addInfo like this is not looking intuitive

ewoudwijma avatar Nov 28 '22 19:11 ewoudwijma