Commit Graph

770 Commits

Author SHA1 Message Date
Joachim Dick
f96c2087d9 New smooth effect: Color Clouds (#5268)
* New Effect: Color Clouds

ColorClouds: Random start points for clouds and color

ColorClouds: new config option 'More red'

* ColorClouds: Incorporated review comments

- Support for color palettes
- Use perlin16() instead of inoise16()
- Use cos8_t() instead of cos8()

* ColorClouds: incorporated more review comments

* ColorClouds: incorporated final review comment
2026-03-11 19:26:42 +01:00
Frank
49130c9ec9 (chores) cleanup some compiler warnings
* switch-cases that fall through
* potential buffer overflow in improv.cpp
* potentially uninitialized variables in FX.cpp
* potential array out-of-range on segment::col[]
* minor optimization: only apply gamma correction when result is needed
* tag some possibly unused variables with   [[maybe_unused]]
2026-03-11 13:54:58 +01:00
Frank
32bc474055 spots effect bugfix, take 2
next try: make sure that the strip is filled, and all gaps are equal
2026-03-04 00:17:43 +01:00
Frank
7f889763d1 flow effect bugfix
effect was showing blak when using default palette
2026-03-03 23:13:34 +01:00
Damian Schneider
a0c0a31480 Fix start & end of segment not "flowing" in Flow FX (#5392) 2026-03-03 22:22:35 +01:00
Frank Möhle
cce3c0b5d3 psram-aware malloc functions (backport of upstream #4895) (#342)
Introduces new memory allocation functions, based on wled#4895 by @DedeHai

* keep a minimum of 15KB RAM available to UI - improves stability
* S3/S2/C3 automatically use "fast RTC Ram" for small data (reduces fragmentation)
* auto-detects PSRAM (or no PSRAM) when firmware was built with -D BOARD_HAS_PSRAM
* d_malloc() and d_calloc() prefer DRAM if possible (faster), but fall back to PSRAM when free RAM gets low.
2026-02-18 17:57:47 +01:00
Frank
dea91bc2ab spots effect bugfix
* use named constants for fixed point scaling
* remove buggy "SEGLEN / (zones >>3)" shortcut
* align code with upstream
2026-02-03 10:33:52 +01:00
Frank
a47bbfe05b spots effect improvements
* use native 32bit types (similar to upstream)
* avoids gaps on left/right side of strip, by using higher accuracy for zoneLength
* prevent overflow on "s"
* fix wrongly named slider in "spots fade"
2026-02-02 23:06:03 +01:00
Frank
b17819e2ce better trails for PS Fireworks 2026-01-30 12:47:13 +01:00
Frank
6aea3b5a77 align 2D particleFX with upstream
minor improvements from upstream
2026-01-17 13:58:04 +01:00
Frank
1f065f69c2 post-merge
* replace all remaining sqrt16() with sqrt32_bw()
* align particleGalaxy effects with upstream
2026-01-17 13:21:02 +01:00
Damian Schneider
532c9b762c replacement for fastled sqrt16() (#4426)
* added bitwise operation based sqrt16

- replacement for fastled, it is about 10% slower for numbers smaller 128 but faster for larger numbers. speed difference is irrelevant to WLED but it saves some flash.

* updated to 32bit, improved for typical WLED use

- making it 32bits allows for larger numbers
- added another initial condition check for medium sized numbers
- increased the "small number" optimization to larger numbers: the function is currently only used to calculate sqrt(x^2+y^2) which even for small segments is larger than the initially used 64, so optimizing for 1024 makes more sense, although the value is arbitrarily chosen
2026-01-17 12:18:35 +01:00
netmindz
bf4aae8e60 Merge pull request #4682 from DedeHai/PS_galaxy
Add new effect: PS Galaxy
2026-01-17 11:52:46 +01:00
Frank
bc7cf062e8 effect math sppedup - up to 3x faster
-> distortion waves 3x speedup
-> hiphotic 2x speedup
-> waving cell 1.5x speedup

* replace sin8_t by lookup-table with pre-computed values
* moved integer sin and cos to fcn_declare.h (inlined by the compiler)
* moved gamma32 to fcn_declare.h (inlined by the compiler)
* a few other small tweaks
2025-12-17 21:59:22 +01:00
Frank
49e6de33c7 soap effect speedup (MM specific)
* postpone LEDs pixel drawing to the end of effect -> up to 30% faster
* some minor optimizations: reduce heap fragmentation, use "fast" types
2025-12-17 16:55:09 +01:00
Frank
6138def82f use WLED-MM error effect instead of plain orange 2025-12-17 01:09:29 +01:00
Frank
3ac0a0a619 segment functions for better upstream compatibility
* added vLength(), vHeight(), vWidth() and mapped them to their WLED-MM counterparts
* added SEG_W and SEG_H macros
* minor variable renaming to avoid name clashes with vWidth, vHeight, vLength
2025-12-16 23:22:38 +01:00
Frank
fde6aa888e post-merge
* align meteor effect with upstream code
* unified meteor & meteor smooth
2025-12-16 02:40:02 +01:00
Damian Schneider
54578f7e61 fixes trail flickering randomly. thx @blazoncek for discovering 2025-12-16 02:14:32 +01:00
Damian Schneider
ea9ae2c46b Merge pull request #4543 from DedeHai/soap-FX-optimization
Soap FX optimization
2025-12-16 02:02:25 +01:00
Frank
218311d31e post-merge
* solve ambiguous function problem
* restore  SEGMENT.setUpLeds() call
* bring back upstream improvements to 2D waving cell
2025-12-16 01:53:37 +01:00
Damian Schneider
6812171c60 update to distortionwave FX (#4693)
- fixed "jumpyness" by improving offset calculation resolution
- added palette support
- added two rendering modes for use with palette: one uses hue-mapping, one uses brightness mapping
- added alternate animation mode (from initial source)
- extended scaling: zoom checkmark (depends on matrix size)
2025-12-16 01:25:11 +01:00
Damian Schneider
b3e9f274b5 improved & refactored Android FX (#4522)
- returns FRAMETIME -> no more flickering in transitions and overlay
- no more double-painting of pixels
2025-12-16 01:23:47 +01:00
Frank
462e4cb805 post-merge
* add missing "cool" option in twinklefox
* upstream compatibility defines for gamma32inv() and gamma8inv()
2025-12-16 01:11:40 +01:00
Benjam Welker
1e57262171 Add reverse checkmark for Twinklecat (#4728)
reverse slowly fades in random lights, and then instantly turns them off.
2025-12-16 00:41:50 +01:00
Frank
cdd1141867 post-merge fixes
* fx.cpp: replace FastLED inoise() with optimized perlin() functions
* minor updates for util.cpp and fcn_declare.h
2025-12-16 00:28:10 +01:00
Damian Schneider
1cb7ebfd6e Fixed "Flow Stripe" FX and added palette support 2025-12-15 23:38:48 +01:00
Frank
71aa32dc21 perlin16 -> FastLED inoise16
we don't have the replacement function from upstream
2025-12-15 22:59:15 +01:00
Damian Schneider
b08f5a43c4 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-12-15 22:52:34 +01:00
Frank
04c466cd6f improved and very fast map()
added map0() that should be used when the input value range is starting at 0. fast and very accurate, much better than map() or map2().
2025-11-26 19:41:13 +01:00
Frank
e0c7d254bb fix outdated URLs
Aircoookie Wiki => mm.kno.wled.ge
MoonModules/WLED => MoonModules/WLED-MM
Aircoookie/WLED => wled/WLED
2024 => 2025
2025-11-23 17:18:10 +01:00
Frank
e6676372d8 refactor / cleanup font selection logic
* centralize font selection logic into  getFontInfo()
* removed unneeded parameter "numberOfChars" from drawText()
* new file: wled_fonts.hpp to centralize font management logic (inline)
* only compile wchar16ToCodepage437 when WLED_ENABLE_FULL_FONTS
* minor cleanup
2025-11-21 17:04:08 +01:00
Frank
aea83a352f bugfix: incomplete time/date in full font mode
maxLen = numberOfChars
2025-11-21 00:55:03 +01:00
Frank
053551d61d scrolling text blur moved to where it should be
accidentally put it into the "full font" ifdef
2025-11-21 00:36:09 +01:00
Frank
e63dc7e71e longer segment names
* introducing WLED_MAX_SEGNAME_LEN from upstream
* default: max name length = 48
* hopefully found all places where the segment name length was hardcoded (32, 33, 34)
* some comments still refer to "32" but wtf
2025-11-20 23:49:26 +01:00
Frank
207b197d04 scrolling text minor exhancements
* scroll faster !
* add softening (=blur) option
2025-11-20 18:08:18 +01:00
Frank
4a4887aaba scrolling text scrolling, unicode-aware strlen 2025-11-20 18:05:53 +01:00
Frank
45f793b338 first light 👍😅
* idea seems to work
* scrolling is broken, probably I need to create a unicode-aware ``strlen``
2025-11-20 13:57:55 +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
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
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
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
Damian Schneider
d856749bea fix change that got lost 2025-10-25 20:56:15 +02:00
Frank
1af94dc9a2 add error message when effects cannot be added 2025-10-24 19:11:06 +02:00
netmindz
a9cdc56f51 Merge pull request #226 from netmindz/gif-MM
GIF Playback
2025-06-29 20:12:20 +01:00
Damian Schneider
f7eba5506f Bugfixes in PS, improvements to PS Fireworks 1D (#4673)
- fixed inconsitencies in size rendering
- fixed palette being wrapped in color by position and color by age modes
- Fixed bug in memory layout: for some unknown reason, if flags come before particles, last flag is sometimes overwritten, changing memory laout seems to fix that
- New color modes in PS Fireworks 1D:
 - custom3 slider < 16: lower saturation (check1: single color or multi-color explosions)
 - custom3 slider <= 23: full saturation (check1: single color or multi-color explosions)
 - custom3 slider > 23: color by speed (check 1 has not effect here)
 - custom slider = max: color by age or color by position (depends on check1)
2025-05-04 12:24:28 +02:00
Damian Schneider
1cb2a6658e fixed wrong gravity setting, added option for no trail (#4665) 2025-05-04 12:21:06 +02:00
Damian Schneider
56d7d84110 cleanup and minor improvements
- removed local buffer for ESP8266 in 1D system to save on RAM
- increased particle brightness in PS Impact
- minor tweak in collision binning (might improve speed)
- removed comments and some other unused stuff
- fixed a few compiler wranings
2025-04-19 10:30:04 +02:00
Damian Schneider
66e2e4d900 Adding Particle System (port from AC)
- port from AC
- also adding hardware random functions
2025-04-18 17:04:14 +02:00