esp8266-fastled-webserver icon indicating copy to clipboard operation
esp8266-fastled-webserver copied to clipboard

Bug Fixes, More Patterns, and improovements

Open H3wastooshort opened this issue 5 years ago • 9 comments

H3wastooshort avatar Sep 19 '20 08:09 H3wastooshort

Thank you for the PR! I need to add preprocessor directives for enabling/disabling websockets and IR, as some people have had stability and flicker problems with them enabled. I'll try to get this reviewed soon. Thanks!

jasoncoon avatar Oct 09 '20 13:10 jasoncoon

@HACKER-3000 ... Are you still interested in pursuing this change?

henrygab avatar Dec 13 '21 01:12 henrygab

i tried cleaning it up a bit. i hope i didn't miss anything

H3wastooshort avatar Dec 13 '21 15:12 H3wastooshort

@HACKER-3000 ... Well, there were one or two things that needed doing. :smile:

There was a massive set of changes in the last couple months, and those had to get merged first.

I reverted the addition of the palettes... (expand)

Reviewing the code, the inclusion of the gradient palettes directly in the overall palettes structure had a fairly significant impact on RAM. This is because every gradient palette was expanded from ROM into a 64-byte version, since the palettes require exactly 16 CRGB values.

The code worked, but there's likely a better way to do this, that can minimize the overhead. For example, perhaps the palettes that are exposed via the UI can be the combined set of normal 16-entry palettes + the gradient palettes. If the user selects a gradient palette, then it's converted on-the-fly to the 16-entry palette. This will avoid the second (expanded) copy of all the gradient palettes from being in memory.

I think the changes for the new patterns remain.

Can you verify the other bug fixes made it through the massive merge alright?

henrygab avatar Dec 13 '21 22:12 henrygab

@jasoncoon -- Can you review this, as I made a number of changes, so a second set of eyes would be appreciated?

henrygab avatar Dec 20 '21 01:12 henrygab

These changes look fine to me, but I won't be able to test them on an actual device until tomorrow evening at the earliest. And, even then, I don't plan on testing with IR or websockets enabled.

jasoncoon avatar Dec 20 '21 02:12 jasoncoon

These changes look fine to me, but I won't be able to test them on an actual device until tomorrow evening at the earliest. And, even then, I don't plan on testing with IR or websockets enabled.

Of course you wouldn't test IR or websockets ... in fact, they are explicitly marked as unsupported:

https://github.com/jasoncoon/esp8266-fastled-webserver/blob/8f7cfa549451cb8e078b977206349eff494345d1/esp8266-fastled-webserver/config.h#L140 https://github.com/jasoncoon/esp8266-fastled-webserver/blob/8f7cfa549451cb8e078b977206349eff494345d1/esp8266-fastled-webserver/config.h#L195

My changes were simply to move those bits of code into their own files as much as possible, to make maintenance easier, without impacting the binary.

henrygab avatar Dec 20 '21 03:12 henrygab

im sorry if i caused trouble by re-opening discussion on this mess. i completely forgot how messy this was.

H3wastooshort avatar Dec 20 '21 20:12 H3wastooshort

im sorry if i caused trouble ...

There is no trouble. Not all changes go in, but all changes are considered! Thanks for opening the PR!

henrygab avatar Dec 20 '21 21:12 henrygab