Skip to content

Commit c403878

Browse files
authored
Update README.md
1 parent bf71f86 commit c403878

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

usermods/user_fx/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ if ((strip.now - SEGENV.step) >= refresh_ms) {
165165
* You'll see later that it writes results here before updating `SEGMENT.data`.
166166
* Note: this is allocated on the stack each frame. Keep such VLAs ≤ ~1 KiB; for larger sizes, prefer a buffer in `SEGENV.data`.
167167
168-
| IMPORTANT NOTE: Creating variable length arrays is non C++ standard, but this practic is used frequently throughout WLED as it works just fine. But be aware that creating variable length arrays puts them in stack memory, which is limited in size. If for example the array is built from the length of the segment (in 1D), that can overflow the stack and make it crash. The limit that can be safely used is ~1kb; an array with 4000 leds would be 4k and will likely crash. It gets worse if using `uint16_t`. So anything larger than 1k should definitely go into `SEGENV.data` which has a much higher limit. |
168+
> **_IMPORTANT NOTE:_** Creating variable length arrays is non C++ standard, but this practic is used frequently throughout WLED as it works just fine. But be aware that creating variable length arrays puts them in stack memory, which is limited in size. If for example the array is built from the length of the segment (in 1D), that can overflow the stack and make it crash. The limit that can be safely used is ~1kb; an array with 4000 leds would be 4k and will likely crash. It gets worse if using `uint16_t`. So anything larger than 1k should definitely go into `SEGENV.data` which has a much higher limit.
169169
170170
171171
Now we get to the spark generation portion, where new bursts of heat appear at the bottom of the matrix:

0 commit comments

Comments
 (0)