Skip to content
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

Use canvas instead of CSS gradient for liveview #3620

Closed
wants to merge 37 commits into from

Conversation

zanhecht
Copy link
Contributor

Allows for "pixel perfect" liveview instead of diffused view, to better match what's shown at https://kno.wled.ge/features/effects/. This will make it easier to see what the LEDs are doing, although it may not be as accurate a representation for installations with diffused LEDs.

@zanhecht
Copy link
Contributor Author

As a side note, I could've added the black border between pixels as shown on the effects page, but it doesn't look great on smaller screens. The basic code to do so, added after the fillRect line, is

            context.strokeStyle = "black";
            context.lineWidth = 1;
            context.strokeRect ( i * w / len, 0, w, h);

If the borders are desired, it would be possible to test for a minimum value of "w/len" before drawing them, but it would lead to an inconsistent apparent brightness between devices so it's not a great solution.

@blazoncek
Copy link
Collaborator

Thank you. Please rebase this PR to 0_15 branch as such change will not make it into current version.

w00000dy and others added 28 commits December 27, 2023 10:31
By adding a random string to the path of the js file every time, we make sure to never hit the browser cache.
By setting the response header "Cache-Control" to "no-store" and setting "Expires" to 0, we make sure the browsers and place calling this never store it in cache.
* purge old (not yet processes) NTP responses
* validate server responses before updating WLED time
* purge receive buffer when package is rejected (avoids mem leak on esp32)
when NTP got enabled via UI, WLED would wait up to 12 hours before issuing the first NTP request.
Fix for UCS8904 hasWhite().
I've found a code spellchecker, so this is what can be corrected easily. Changes are only affecting comments, readme and a few user-visible strings. So no functional impact expected.
if you can spell Fahrenheit, you can't spell Celsius. And vice versa :-)
obuf is reset to nullptr in some cases
PHST abbreviation added for clarity.
According to the technical manual, GPIO 16 + 17 are used for onboard flash, so cannot be used by WLED.

example buildenv:

[env:esp32_pico]
extends = env:esp32dev_qio80
board = pico32
refreshing all UI files
softhack007 and others added 9 commits December 27, 2023 10:34
if case of invalid or impossible sunset/sunrise results, retry with the previous day. max 3 days back, to prevent infinite loops and far-away results.
sunset = 0 is a valid result, as the function result is in UTC and not local time .
Example: local time is UTC-8, local sunrise = 08:00am => getSunriseUTC()  = 0.

So we cannot use "0" for "invalid". Using UINT16_MAX resolves the problem, and even allows to simplify calculateSunriseAndSunset() a bit.
Allows for "pixel perfect" liveview instead of diffused view.
@zanhecht zanhecht changed the base branch from main to 0_15 December 27, 2023 15:37
@zanhecht
Copy link
Contributor Author

zanhecht commented Dec 27, 2023

I think I messed up on the rebase. I closed this PR and replaced it with #3621

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants