5951 Commits

Author SHA1 Message Date
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
Will Tatam
9d706010f5 Update WLED app links for Android and iOS nightly 2025-09-14 19:05:47 +01:00
Will Tatam
97b20438fd Fix typo in 'Originally' in readme.md 2025-09-14 19:03:21 +01:00
Will Tatam
65913f990d Update project title and add creator attribution 2025-09-14 18:24:19 +01:00
Will Tatam
56d00357d3 testing thanks.dev 2025-09-14 18:12:03 +01:00
netmindz
1864e550e6 Update funding to include currently active maintainers 2025-09-14 15:32:37 +01:00
Damian Schneider
75f6de9dc2 bugfix in Colortwinkles
thx @blazoncek
2025-09-09 07:31:19 +02:00
Damian Schneider
16cfbf7500 Merge pull request #4913 from DedeHai/percentFX_UI_fix
fix ancient UI bug that hides the speed slider in percent FX
2025-09-07 20:34:57 +02:00
Soeren
aecac2c56c Add CORS proxy information to README 2025-09-07 13:15:28 +02:00
Damian Schneider
385504e6db fix ancient UI bug that hides the speed slider in percent FX 2025-09-05 19:53:15 +02:00
Will Miles
a0321170d0 Merge pull request #4859 from Liliputech/udp_name_sync_rework
new usermod hooks "onUdpPacket"
2025-09-04 22:29:21 -04:00
netmindz
d70018ae9f Merge pull request #4910 from willmmiles/async-mqtt-client-dep
Un-vendor AsyncMqttClient
2025-09-04 07:33:27 +01:00
Will Miles
9359f0b7fc Fix include style 2025-09-03 23:29:24 -04:00
Will Miles
be74196a62 Un-vendor AsyncMqttClient
Switch to the upstream version.  This fixes a memory leak when
re-connection fails.
2025-09-03 23:05:20 -04:00
netmindz
705f2035f4 Change npm install to npm ci for dependencies
Updated installation instructions for dependencies.
2025-09-03 20:42:15 +01:00
Damian Schneider
65efcb351e Merge pull request #4908 from wled/copilot/fix-4788
Fix 2D matrix generator preview not updating after population
2025-09-03 20:07:54 +02:00
copilot-swe-agent[bot]
72ad39d6a7 Fix 2D matrix generator preview update issue
Co-authored-by: DedeHai <6280424+DedeHai@users.noreply.github.com>
2025-09-03 17:51:00 +00:00
copilot-swe-agent[bot]
5950204d34 Initial plan 2025-09-03 17:41:50 +00:00
netmindz
46df9410b3 Merge pull request #4900 from wled/copilot/fix-4881
Fix changelog generation to exclude unresolved closed issues
2025-09-03 07:16:45 +01:00
copilot-swe-agent[bot]
b7e4cd0d9a Fix parameter naming for changelog generator configuration
Co-authored-by: netmindz <442066+netmindz@users.noreply.github.com>
2025-09-02 07:54:14 +00:00
copilot-swe-agent[bot]
0becd61323 Fix changelog generation to exclude unresolved closed issues
Co-authored-by: netmindz <442066+netmindz@users.noreply.github.com>
2025-09-02 07:52:13 +00:00
copilot-swe-agent[bot]
3f2e92c4c5 Initial plan 2025-09-02 07:45:32 +00:00
netmindz
666a59ff53 Update platformio_override configuration for esp32 2025-09-02 08:06:41 +01:00
netmindz
ce7ca3f2d2 Add pull_request trigger for usermods workflow 2025-09-02 07:35:51 +01:00
netmindz
87092ccb80 Correct message formatting in PR merge workflow
Fix formatting in Discord webhook message for PR merge.
2025-09-02 07:11:55 +01:00
Damian Schneider
a037d99469 added debug output on crash, removed whitespaces 2025-09-01 22:22:16 +02:00
Damian Schneider
8cc5d64819 Merge pull request #4853 from willmmiles/bootloop-platform-simplification
Bootloop detection platform factoring
2025-09-01 22:17:07 +02:00
netmindz
4c948cca13 Merge pull request #4860 from tarontop/main
support iotorero ethernet controller
2025-09-01 10:03:54 +01:00
Aiden
5cb8dc3978 Delete the same define 2025-09-01 11:05:31 +08:00
netmindz
8fc87aa17d Merge pull request #4844 from Arcitec/0_16-fix-sync
Fix broken Sync button after 0.15 refactor
2025-08-31 12:30:19 +01:00
Arthur Suzuki
c8757d45c8 fix more nitpicks comments 2025-08-30 04:12:46 +02:00
Arthur Suzuki
62fad4dcdf applied coderabbit suggestions 2025-08-30 01:52:36 +02:00
Liliputech
da7f107273 fix POV Display usermod (#4427)
* POV Display usermod

this usermod adds a new effect called "POV Image".
To get it to work:
- read the README :)
- upload a bmp image to the ESP filesystem using "/edit" url.
- select "POV Image" effect.
- set the filename (ie: "/myimage.bmp") as segment name.
- rotate the segment at approximately 20 RPM.
- enjoy the show!
* improve file extension checks
* improve README, remove PNGdec reference, clean usermod
* restrain to esp32 platform + reduce memory footprint with malloc
2025-08-29 20:42:54 +02:00
Damian Schneider
d5d7fde30f use video scaling instead of NPB luminance & new ABL (#4798)
* updated color scaling to preserve hue at low brightness resulting in much better colors
* replace NPBlg with NPB, moved brightness scaling to bus manager
* improved gamma table calculation: fixed mismatch in inverting gamma table calculation: inversion should now be as good as it gets
* code cleanup, fixed gamma being applied in unnecessary places

Improvements to ABL handling:
- removed strip level handling, ist now all done on bus level
- limiter now respects pixel mapping
- proper handling of white channel
- improved current estimation
- current is now always correctly reported to UI
- minimal FPS impact if the ABL is not limiting but slighly higher impact for global ABL limit due to double-scaling

- moved brightness scaling to BusDigital
- created new header file colors.h to be able to access color functions in bus-manager.
- updated colo_fade() with better video scaling to preserve hue's at low brightness
- added IRAM_ATTR to color_fade (negligible speed impact when compared to inline and benefits other functions)
- added IRAM_ATTR to color_blend as it is used a lot throughout the code, did not test speed impact but adding it to color_fade made it almost on-par with an inlined function

Additional changes:
- fixes for properly handling `scaledBri()` (by @blazoncek)
- also use bit-shift instead of division in blending for ESP8266
- improvements for faster "softlight" calculation in blending
- changed some variables to uint8_t to maybe let the compiler optimize better, uint8_t can be faster if read, store and set are all done in uint8_t, which is the case in the ones I changed
- various minor code formatting changes
2025-08-29 17:12:10 +02:00
Will Miles
6f914d79b1 Increase boot loop timeout
Any repeating crash that prevents a human from logging in and fixing
the config should be treated as a boot loop.  Increase the detection
timeout, so anything that's fast enough to preclude a user fix will
trigger the recovery behaviour.
2025-08-28 21:17:12 -04:00
Will Miles
dd13c2df47 Reset crash counter after long interval
Don't treat consecutive but infrequent crashes as bootloops.  The
bootloop recovery actions only make sense when there is no opportunity
for a user to reconfigure their system.

Suggested by @coderabbitai
2025-08-28 21:10:39 -04:00
Damian Schneider
8aeb9e1abe bugfix in PS pointer alignment
- bug was leading to crashes when heap is low
2025-08-28 18:57:11 +02:00
Damian Schneider
cfad0b8a52 bugfix to prevent "almost infinite" loops in palette blend (#4841)
this fixes a very long loop when an overflow was happening in palette blending.
- reset prevPaletteBlends to prevent overflow
- add safety check in case overflow should still happen in another combination (or in future changes)
2025-08-28 18:08:31 +02:00
Arthur Suzuki
a60be251d2 fix nitpicks from coderabbit 2025-08-28 10:56:57 +02:00
netmindz
f15c1fbca6 Merge pull request #4880 from wled/copilot/fix-4879
Fix pr-merge.yaml to include PR title and link in Discord notifications
2025-08-28 08:43:28 +01:00
copilot-swe-agent[bot]
708baf1ed7 Fix pr-merge.yaml to include PR title and link in Discord notifications
Co-authored-by: netmindz <442066+netmindz@users.noreply.github.com>
2025-08-28 06:51:22 +00:00
copilot-swe-agent[bot]
4155a6bc23 Initial plan 2025-08-28 06:45:52 +00:00
netmindz
c92f0a9d90 Merge pull request #4878 from willmmiles/fix-pwm
Fix operation of length 1 strips, such as PWM LEDs
2025-08-28 06:31:39 +01:00
Will Miles
5fa901c37c Fix operation of length 1 strips, such as PWM LEDs
This reverts commit e5ba97bbe2.
2025-08-27 22:28:24 -04:00
Will Miles
46f3bc0ced Bootloop: Include soft wdt on ESP8266 2025-08-26 21:00:54 -04:00
Arthur Suzuki
f8ce5980a1 removed tabs and replace by space 2025-08-25 22:45:01 +02:00
Arthur Suzuki
4b5c3a396d applied suggestions from review 2025-08-25 22:22:51 +02:00
Arthur Suzuki
550b4d9dea fix comments for usermod hooks "onUdpPacket" 2025-08-24 15:54:45 +02:00
Liliputech
f3e3f585df usermod udp_name_sync : properly initialize packet if segment name is empty
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-08-24 13:52:39 +02:00
netmindz
2082b01a3c Apply suggestions from code review
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-08-21 08:53:11 +01:00