Commit Graph

4283 Commits

Author SHA1 Message Date
Frank
a96e88043d remove commented code for no-PSRAM boards
*sigh* changing gifdecoder parameters seems to have _no_ effect on RAM needed
2025-11-09 20:24:57 +01:00
Frank
29d2f7fc1b debug print for decodeFrame error codes 2025-11-09 19:06:59 +01:00
Frank
1324d49098 revert smaller gif size limits for board without PSRAM
see discussion in PR#5040
2025-11-09 18:28:12 +01:00
Frank
79a52a60ff small optimization: fast 2D drawing without scaling
for 2D segments, setPixelColorXY() should be used because it is faster than  setPixelColor().
2025-11-09 18:14:50 +01:00
Frank
6581dd6ff9 add blur option 2025-11-09 17:33:04 +01:00
Frank
4659939547 error handling and robustness improvements
* catch some error that would lead to undefined behavior
* additional debug messages in case of errors
* robustness: handle OOM exception from  decoder.alloc() gracefully
2025-11-09 17:29:56 +01:00
Damian Schneider
790be35ab8 make all globals static 2025-11-08 16:04:08 +01:00
Damian Schneider
0eef321f88 uising is2D() to check if segment is 2D, use vLength() on 1D setups 2025-11-08 12:54:25 +01:00
Damian Schneider
69dfe6c8a1 speed optimizations: skip setting multiple times, "fastpath" if no scaling needed 2025-11-08 12:01:40 +01:00
Damian Schneider
0e043b2a1b changed to vWidth/vHeight
- since we draw on a segment, we need to use virtual segment dimensions or scaling will be off when using any virtualisation like grouping/spacing/mirror etc.
2025-11-06 15:23:43 +01:00
Damian Schneider
01c84b0140 add better 1D support for gif images
Instead of showing a scaled, single line of the GIF: map the full gif to the strip
2025-11-06 14:55:26 +01:00
Will Tatam
b60313e1f8 Merge pull request #5012 from DedeHai/improved_welcompage_check
Improvement to "Welcome Page" check
2025-10-22 20:40:06 +01:00
Will Tatam
1fff61b726 Merge pull request #4995 from Brandon502/GoLRework
Game of Life Rework
2025-10-21 20:43:28 +01:00
Damian Schneider
c4850aed08 Adding DDP over WS, moving duplicate WS-connection to common.js (#4997)
- Enabling DDP over WebSocket: this allows for UI or html tools to stream data to the LEDs much faster than through the JSON API.
- first byte of data array is used to determine protocol for future use
- Moved the duplicate function to establish a WS connection from the live-view htm files to common.js
- add better safety check for DDP: prevent OOB reads of buffer
2025-10-21 19:41:57 +02:00
Damian Schneider
43eb2d6f47 check config backup as welcome page gate 2025-10-19 07:10:05 +02:00
Damian Schneider
0ec4488dd1 adding function to check if a backup exists 2025-10-19 07:08:18 +02:00
Benjam Welker
ca5debef32 Fix blank area issue with Twinkle (#5005)
* Fix blank area issue with Twinkle
2025-10-17 07:31:00 +02:00
Brandon502
cc0230f83f Game of Life Optimizations
Adjust mutation logic. Use 1D get/set. Reduce code size.
2025-10-14 22:58:22 -04:00
Damian Schneider
3bc728e068 fix low brightness gradient "jumpyness"
during testing at low brightness I noticed that gradients can be "jumping" in colors quite wildly, turning a smooth gradient into a flickering mess. This is due to the color hue preservation being inaccurate and a bit too aggressive. This can be seen for example using a gradient palette and "Running" FX.
Removing the hue preservation completely fixes it but leaves color artefacts for example visible in PS Fire at very low brightness: the bright part of the flames gets a pink hue. This change is a compromise to fix both problems to a "good enough" state
2025-10-12 15:18:48 +02:00
Damian Schneider
7f1f986f13 safety check for bootloop action tracker: bring it back on track if out of bounds 2025-10-09 22:08:18 +02:00
Brandon502
65b91762fd Game of Life Rework
RAM and speed optimizations. Better repeat detection. Mutation toggle. Blur option added.
2025-10-08 22:48:53 -04:00
Damian Schneider
359d46c3e1 Bugfix for gif playback and segment destruction, bugfix in copy FX
- if a segment is destroyed or turned inactive, disable the gif player: only one gif player instance can run at a time, if a inactive or destroyed segment uses it, the effect is broken for other segments.
- copy FX ironically copied the source segment on each call, should use reference not a copy!
2025-10-02 20:06:01 +02:00
Damian Schneider
2b73a349dd Bugfix for FX: Tri Fade
Bugfix for FX: Tri Fade
2025-09-28 19:52:20 +02:00
Mathijs Groothuis
f096320e63 Fix typo changable > changeable
Fix typo that I discovered while tinkering in Wled.
2025-09-28 16:55:03 +02:00
Damian Schneider
e23751bd1d Bugfix in custom palette color picker, fixes #4963 2025-09-27 13:23:36 +02:00
Damian Schneider
daa833f33d Adding Shimmer FX (#4923)
Sends a shimmer across the strip at defined (or random) intervals
Optional brightness modulators: sine or perlin noise
Can be used as an overlay to other effects.
2025-09-24 20:49:40 +02:00
Damian Schneider
8b3975752c speed optimisations, fix for restoreColorLossy, code cleanup (#4895)
- speed optimization in color_add, PS fast_color_add and blur functions
- applying more bit and shift manipulation tricks to squeeze out just a bit more speed on color manipulation functions.
- Optimization on blur is based on work by @blazoncek
- Renamed PS fast_color_add() to fast_color_scaleAdd()
2025-09-23 20:15:42 +02:00
Damian Schneider
529edfc39b "unrestricted" number of custom palettes (#4932)
- allow more than 10 custom palettes
- move palettes into CPP file
- Fix for minimizing cpal.htm (saves 2k of flash)
- shortened names in cpal, saves about 400 bytes of Flash after packing
- removed async from common.js loading to prevent errors on page loads if the file is not cached
- restricted nubmer of user palettes on ESP8266 to 10
- unrestricted number of user palettes on all other platforms (total max palettes: 256)
- added a warning when adding more than 10 palettes to let the user decide to risk it
- Bugfixes in palette enumeration, fixed AR palette adding
- AR palettes are now also added if there are more than 10 custom palettes

Co-authored-by: Blaž Kristan <blaz@kristan-sp.si>
2025-09-22 20:09:54 +02:00
Damian Schneider
4b1b0fe045 Adding center bin selection to 2D GEQ (#4764)
* adding center bin selection to 2D GEQ: this makes it possible to use subsets of the GEQ on distributed strips

setting custom3 to 0 gives the "old" behaviour, this is the default. existing presets will have the custom3 slider at the center, changing presets that do not use the full width so this is a breaking change for those but I assume theser are rare.
2025-09-22 20:01:54 +02:00
Damian Schneider
4d39dd0a5e Fix LED buffer size calculation (#4928)
* Attempt at better bus memory calculation and estimation
* Remov double buffer count for ESP8266 (thanks @dedehai)
* improve UI calculation
* adding mendatory LED buffers to UI memory calculation
* adding buffer for transitions to memory calculation, change "error" to "warning"
* bugfixes in settings_leds.htm
* fix getDataSize() forESP8266, ESP8266 does not use double buffering.
* update led settings: fix parsing by @blazoncek
* new warnings for LED buffer use, deny adding a bus if it exceeds limits
* adds recommendations for users (reboot, disable transitions)

Co-authored-by: Blaž Kristan <blaz@kristan-sp.si>
2025-09-21 22:48:09 +02:00
Will Tatam
2593b11aba Merge pull request #4950 from netmindz/HUB75-AC-Fixes
Hub75  fixes
2025-09-21 20:55:39 +01:00
copilot-swe-agent[bot]
bd4a7e748d Fix compilation error: Use Bus::isHub75 instead of BusManager::isHub75
Co-authored-by: netmindz <442066+netmindz@users.noreply.github.com>
2025-09-20 18:49:47 +00:00
copilot-swe-agent[bot]
45615c07ee Fix HUB75 panel dimensions not loading in LED Preferences page
Co-authored-by: netmindz <442066+netmindz@users.noreply.github.com>
2025-09-20 17:33:53 +00:00
Will Tatam
ee5a70a63e Update: getNumberOfPins to load all pins from config for hub75 2025-09-20 18:03:08 +01:00
Will Tatam
c5119c8aa6 Remove NO_CIE1931 to better sit with other Gamma correction changes in WLED 2025-09-20 16:41:36 +01:00
Will Tatam
6c718c3558 Remove legacy code for double buffer 2025-09-20 15:30:36 +01:00
Will Tatam
75481d3251 Disable VirtualMatrixPanel, CHAIN_BOTTOM_LEFT_UP incomplete 2025-09-20 15:20:38 +01:00
copilot-swe-agent[bot]
7d6f47755c Fix HUB75 panel width not loading correctly in settings UI
Co-authored-by: netmindz <442066+netmindz@users.noreply.github.com>
2025-09-20 12:29:25 +00:00
Will Tatam
3a7de8275f Merge pull request #3777 from netmindz/HUB75-AC
Add HUB75 support
2025-09-20 13:05:48 +01:00
Will Tatam
3410b785db Merge pull request #4944 from wled/copilot/fix-4943
Add GitHub repository information to build and API response
2025-09-20 11:23:42 +01:00
Benjam Welker
762d4433d8 Add reverse checkmark for Twinklecat (#4728)
reverse slowly fades in random lights, and then instantly turns them off.
2025-09-20 10:58:37 +02:00
copilot-swe-agent[bot]
efeb791807 Implement GitHub repo extraction in build process
Co-authored-by: netmindz <442066+netmindz@users.noreply.github.com>
2025-09-19 10:30:36 +00:00
Blaž Kristan
b375c718b0 Merge pull request #4771 from wled/fix-4643
Fix for #4643 - Missing MQTT updates
2025-09-17 12:20:41 +02:00
Will Miles
b16fbafd83 Merge pull request #4890 from willmmiles/esp32-rmthi
Import RmtHI driver
2025-09-16 21:32:16 -04:00
Damian Schneider
76cb2e9988 Improvements to heap-memory and PSRAM handling (#4791)
* Improved heap and PSRAM handling

- Segment `allocateData()` uses more elaborate DRAM checking to reduce fragmentation and allow for larger setups to run on low heap
- Segment data allocation fails if minimum contiguous block size runs low to keep the UI working
- Increased `MAX_SEGMENT_DATA` to account for better segment data handling
- Memory allocation functions try to keep enough DRAM for segment data
- Added constant `PSRAM_THRESHOLD` to improve PSARM usage
- Increase MIN_HEAP_SIZE to reduce risk of breaking UI due to low memory for JSON response
- ESP32 makes use of IRAM (no 8bit access) for pixeluffers, freeing up to 50kB of RAM
- Fix to properly get available heap on all platforms: added function `getFreeHeapSize()`
- Bugfix for effects that divide by SEGLEN: don't run FX in service() if segment is not active
-Syntax fix in AR: calloc() uses (numelements, size) as arguments

* Added new functions for allocation and heap checking

- added `allocate_buffer()` function that can be used to allocate large buffers: takes parameters to set preferred ram location, including 32bit accessible RAM on ESP32. Returns null if heap runs low or switches to PSRAM
- getFreeHeapSize() and getContiguousFreeHeap() helper functions for all platforms to correctly report free useable heap
- updated some constants
- updated segment data allocation to free the data if it is large

- replaced "psramsafe" variable with it's #ifdef: BOARD_HAS_PSRAM and made accomodating changes
- added some compile-time checks to handle invalid env. definitions
- updated all allocation functions and some of the logic behind them
- added use of fast RTC-Memory where available
- increased MIN_HEAP_SIZE for all systems (improved stability in tests)
- updated memory calculation in web-UI to account for required segment buffer
- added UI alerts if buffer allocation fails
- made getUsedSegmentData() non-private (used in buffer alloc function)
- changed MAX_SEGMENT_DATA
- added more detailed memory log to DEBUG output
- added debug output to buffer alloc function
2025-09-16 19:46:16 +02:00
netmindz
a79ae25621 null check in setBrightness
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-09-13 14:10:04 +01:00
netmindz
011e72c3c1 Revert nPins = Bus::getNumberOfPins change
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-13 13:41:04 +01:00
netmindz
46e60b4d0a Only read pinArray if initialized
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-09-13 11:08:35 +01:00
Damian Schneider
75f6de9dc2 bugfix in Colortwinkles
thx @blazoncek
2025-09-09 07:31:19 +02:00
Blaž Kristan
649d43b581 Bugfix for FX: Tri Fade
- incorrectly calculated counter and progress
2025-09-08 11:37:43 +02:00