Commit Graph

6034 Commits

Author SHA1 Message Date
Frank
9115cd17af tiny cleanup, ready to merge 2025-11-07 11:45:46 +01:00
Frank
f955df0488 camelCase, future support, minor cleanup
* use camelCase for local variables
* furure support: rename drawPixelCallback to draw2DPixelCallback
2025-11-07 11:05:44 +01:00
Frank
9564791640 prevent string underflow
if seg.name is empty or shorter than four characters, ``strlen(lastFilename) - 4``  underflows (size_t), so the pointer passed to strcmp lands far before the buffer and triggers undefined behavior.
This patch catches too-short segment names and aborts decoding.
2025-11-07 00:28:40 +01:00
Frank
25391fe765 try to catch / handle Gif decoder OOM gracefully
... by adding an exception handler that will catch OOM inside decoder.alloc().
not tested yet.
2025-11-07 00:11:14 +01:00
Frank
698da84b4a prevent division by zero when image width or height is 0
catch error early before starting the decode/paint loop
2025-11-06 23:09:09 +01:00
Frank
10b3ac0eb1 gifdecoder speedup and bugfixes
* fixed a bug that caused wrong behavior with segment mirroring
    (effects must use virtualHeight() /  virtualWidth() instead of height() / width())
* added image blur as an option (second slider)
* added very basic error reporting for users
*  up to 25% faster, especially with big animated gifs

* made all local variables "static" (don't pollute global namespace)
* drawPixelCallback: cache calculation that do not depend on x/y position
* reduced memory allocations on boards without PSRAM, to avoid crashes
2025-11-06 22:50:59 +01:00
Frank
5177ebd271 fix false warnings when temporarily exceeding MAX_SEGMENT_DATA
The segment copy constructors can temporarily exceed the budget of MAX_SEGMENT_DATA. The original segment will be de-allocated a few milliseconds later.
This change introduced an "overdraft" budget of 50% that can be used for temporary segment copies.
2025-11-06 22:09:11 +01:00
Frank
a956b22a16 unGamma8() accuracy improvement
based on upstream changes by @DedeHai
2025-11-05 22:01:07 +01:00
MoonModules
5122a80f50 Fix typo in disclaimer about liability 2025-11-05 09:55:50 +01:00
Frank
bb44dd8616 robustness improvements for image presets
prevent errors / crashes when drawing "i" images from a preset.
- prevent out-of-bounds writing (segment smaller than image)
- make sure that segment properties are cached correctly
- always do "show" when strip was triggered (avoids lost frames)
2025-11-04 20:28:26 +01:00
Frank
69f9499e25 CSS bugfix: #pql and #rgbwrap should be hidden initially
a missing comma caused unexpected UI behaviour in some corner cases.
2025-11-04 16:39:02 +01:00
netmindz
2c62cd5e41 Merge pull request #4690 from Arcitec/ar-agc-control
AR: add compile-time flag for "Automatic Gain Control" option
2025-11-03 16:16:19 +01:00
Frank
d9e5426636 HUB75: small correction of order
first set _valid=false, then perform delay.
2025-11-02 16:38:03 +01:00
Frank
0510fd308f HUB75: small delay at cleanup, to ensure that DMA finishes before deleting the driver
based on a suggestion by @DedeHai
2025-11-02 16:33:10 +01:00
Frank
d5dee6f58a small segment level setPixelColor and getPixelColor optimization
replaced CRGB -> RGBW32 conversion with FastLED native ``uint32_t(c) & 0x00FFFFFF`` operator.  `
`& 0x00FFFFFF`` is needed to cut out the "alpha" channel, because the fastLED operator return RGBA not RGBW.

--> slightly faster
2025-11-01 17:06:58 +01:00
Frank
40064490ad strip level setPixelColor and getPixelColor optimization
* moved sPC and gPC functions out of their .cpp files into FX.h, so the compiler can optimize better.

depending of effect used, this gives a 2% up to 8% speedup.
2025-11-01 16:50:20 +01:00
Frank
297a2c2b9c bring back lost function ColorFromPaletteWLED (WLEDMM_SAVE_FLASH only)
this change was somehow lost - ColorFromPaletteWLED existed in colorTools.hpp (for fast inline) but was missing in colors.cpp (WLEDMM_SAVE_FLASH fallback).
2025-11-01 14:16:47 +01:00
Frank
96bfd56d20 Merge pull request #276 from DedeHai/PS_fixes
ParticleFX: adding fixes and improvements from AC
2025-11-01 13:41:39 +01:00
Frank
eec3e6d64d Merge pull request #269 from MoonModules/bus_sPC_gPC_optimizations
Bus level setPixelColor and getPixelColor optimizations
2025-11-01 13:39:25 +01:00
Frank
96c3244318 removing deactivated code 2025-11-01 13:30:51 +01:00
Frank
13331e3de0 const WS2812FX::setPixelColorXY
small optimization for speed
2025-10-31 11:09:45 +01:00
Frank
74c701b745 HUB75: no color temperature correction for performance reasons
Enable building color correction code if you really need it.
The effect of color correction is less noticeable on HUB75 than on ws2812b, however it can reduce your framerate by up to 10%.
2025-10-27 21:19:40 +01:00
Frank
c4f6d3d2cb ParticleFX better defaults for 64 pixel height
change default sliders of PS Fireworks, PS Volcano and PS GEQ 2D for better visibility on 64x64 panel
2025-10-27 19:34:51 +01:00
Damian Schneider
b3f1c5d06c adding fixes and improvements from AC 2025-10-27 19:28:50 +01:00
Frank
c896768c0b small correction
mode_oops() should not call mode_oops()
2025-10-27 11:43:23 +01:00
Frank
3752409b46 no more ORANGE on effect memory failure
For maintainers of custom effects: replace "return mode_solid()" with "return mode_oops()"

Effect errors fall back to Akemi (2D) or Rainbow(1D) instead of SOLID ORANGE.
2025-10-27 11:24:12 +01:00
Frank
bb84f85924 FxParticlesystem Fix memory calculation of framebuffer size #275
Updated memory calculation for CRGB to use virtual width and height. Somehow virtualLength is not reliable, so use vWidth * vHeight
2025-10-27 01:12:30 +01:00
Frank
56380ce04c slightly faster to keep IRAM_ATTR for sPC and color_add 2025-10-26 01:41:30 +02:00
Frank
3e99bb8643 Fix fast-math attribute syntax in const.h
a fatal typo
2025-10-26 00:35:06 +02:00
Frank
0071677340 (experimental) tweak optimization level of color functions 2025-10-25 23:59:29 +02:00
Frank
4713f26bb8 additional constants to improve upstream compatibility
* a few new error constants
*  WLED_O2_ATTR - ask the compiler for stronger optimization of a single function
*  WLED_O3_ATTR (WLEDMM) optimize even more
2025-10-25 23:43:44 +02:00
Damian Schneider
4eb9f0855d Merge pull request #4913 from DedeHai/percentFX_UI_fix
fix ancient UI bug that hides the speed slider in percent FX
2025-10-25 22:37:53 +02:00
Frank
9968ed9a22 fix merge error 2025-10-25 22:17:13 +02:00
Damian Schneider
82ba119402 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-25 22:08:09 +02:00
Frank
b215c8209d post-merge updates
CONFIG_ASYNC_TCP_TASK_STACK_SIZE => CONFIG_ASYNC_TCP_STACK_SIZE
2025-10-25 21:48:55 +02:00
Will Miles
832c0c4bf4 Update to AsyncTCP 3.4.7
Bugfix on 3.4.6
2025-10-25 21:24:47 +02:00
Will Miles
86dda32d11 Update AsyncWebServer and AsyncTCP
This should fix (or at least improve) some of the crash cases under
excessive web server load.
2025-10-25 21:20:52 +02:00
Damian Schneider
d856749bea fix change that got lost 2025-10-25 20:56:15 +02:00
Frank
f373044e77 Update repository link to upstream 2025-10-25 20:30:55 +02:00
Frank
8fbaf63565 decodeIRJson bugfix: avoid buffer overrun #272
Increase the size of objKey to accommodate 32bit code number.
The previous buffer size was too small.
2025-10-25 19:57:59 +02:00
Frank
12b3bedba7 cleanup - removed old code in comments 2025-10-25 16:55:52 +02:00
Frank
f78edc43dc bugfix for #272 (only affects rotary usermod)
Refactor name copying logic to avoid use-after-free issue.
2025-10-25 16:52:42 +02:00
Frank
60878305fb debug code updates & fixes
better output when using WLED_DEBUG_HEAP without WLED_DEBUG
2025-10-25 00:53:25 +02:00
Frank
22d142942a build 2510241, version 14.7.0-dev
ongoing development
2025-10-24 19:15:20 +02:00
Frank
1af94dc9a2 add error message when effects cannot be added 2025-10-24 19:11:06 +02:00
Frank
80a6866f16 small bugfix for previous commit (PSRAM caching) 2025-10-24 16:35:11 +02:00
Frank
6ce663784d bugfix to prevent random corruption of presets.json
accroding to the docs of setBufferSize() and svbuf():
> setBufferSize() has to be called right after opening file before any other operation!

so changing buffer sizes on an already opened and partially read file can cause file corruption as the internal buffer is exchanged "mid-flight".

Fix: move all f.setBufferSize() so they appear directly after f.open().
2025-10-24 16:24:33 +02:00
Frank
1f99aeb506 small optimization: always allow gPC to use cached busses
previously gPC cached busses were disabled in slowMode (one pixel mapped to several outputs). However this should not be needed, because the first copy found should be like all other.
2025-10-24 00:05:44 +02:00
MoonModules
e6876caba1 Update GitHub links to MM-Effects repository
WLED-Effects repo has been renamed to MM-Effects.
ArtiFX links to this repo so updated in artifx.js
2025-10-23 19:24:45 +02:00
Frank
e6b15a1c84 Add .vscode/extensions.json to .gitignore 2025-10-23 01:18:18 +02:00