-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Bus-level global buffering #3280
Merged
Merged
Changes from 29 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
498dd76
Decouple segment led buffer from global led buffer
Aircoookie f6e86bf
First global buffer iteration
Aircoookie 61ba16b
Global buffer and ABL fixes
Aircoookie fa9b151
Slightly more efficient buffer copy to busses
Aircoookie 272f96b
Double buffering at bus level.
blazoncek 858b57d
Return of local leds[]
blazoncek c9ef034
Build bump/fix
blazoncek 66616e1
Some timings added.
blazoncek 8831c76
restoreColorLossy small optimization
softhack007 45a0061
reverting _restaurationBri change
softhack007 ad825b8
Added a few debug timings.
blazoncek 59a144b
Disable global buffer on ESP8266 by default
blazoncek f437fd6
Code readability.
blazoncek 2ad3ab7
Correct scaling for peek.
blazoncek 822298a
Merge branch 'main' into alt-buffer
Aircoookie 6267d11
Fix compilation and ABL scaling
Aircoookie fa6070c
Multiple updates:
blazoncek 4766666
Static queued segment bounds
Aircoookie 72a72db
proper rounding of FPS
softhack007 5e20abd
Move segment bounds queuing to WS2812FX
Aircoookie 57d3585
Merge branch 'main' into alt-buffer
blazoncek f1e1bd4
Slight optimisation in BusDigial::getPixelColor()
blazoncek 82e01f7
Fixed ABL calculation.
blazoncek abfb8bb
Fix (almost good) for unbuffered ABL calculations.
blazoncek ebb4628
Minor correction (slider names)
softhack007 5ef7cd7
blur bugfix
softhack007 7dcbb40
Trying to solve ABL bug.
blazoncek 5b9630c
Repaint NPB buffer on brightness updates
Aircoookie 0cf50e8
FX Fireworks optimisation
blazoncek 2fce15d
Restore brightness immediately after show()
Aircoookie 8ccf349
Always repaint NPB buffer on brightness change
Aircoookie aa54d65
upgrade -S3/-S2/-C3 to platform 5.3.0
softhack007 2db966b
Improvements for -S3 with PSRAM
softhack007 050489d
allow Lolin Wifi Fix on -S3
softhack007 f8e766f
add -S3 PSRAM (qio_opi) to nightly builds
softhack007 c8fdf37
upgrade to FastLED 3.6.0
softhack007 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be better to use
uint16_t
here, to also support "extreme" matrix sizes like 300 x 3.Also uint8_t is very slow, as each computation includes an implicit " & 0xFF" to enforce correct overflows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Matrices with dimensions greater than 255x255 are not supported ATM.
They would require change to Segment and Panel classes.
I do agree that forcibly constraining a counter may not be the best idea. Perhaps we should change every unsigned counter/variable to use
size_t
instead, which should use optimised word size (usuallyunsigned int
).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thanks for the clarification.
This "loop/counter" variable thing is kind of personal preference, as long as its efficient. My point was just that
uint8_t
is not efficient (w.r.t speed) on esp32, as esp32 emulates 8bit with 16bit registers, and you might even have penalties for misaligned addresses of an 8bit value.(slightly off-topic)
I must admit I'm not a friend of
size_t
when used as a generic type, because the standard defines size_t as "type of the result of the sizeof() operator". Its a special purpose type, liketime_t
is the type of unix epoch time.I would suggest this for loops and counters:
int
orunsigned
when the results will fit into 16 bit. This type is guaranteed to be a native register size on any architecture (esp32, 8266, or -C3). Additionally,int
andunsigned
are always stored with native "word alignment".fast
types when more bits are needed, and the compiler will pick the most efficient implementation for us.basic types: https://en.cppreference.com/w/cpp/language/types
fixed-width types: https://en.cppreference.com/w/cpp/types/integer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with every point.
I did start to use
int
(mostly infor
loops) but was not thorough enough.