Commit Graph

628 Commits

Author SHA1 Message Date
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
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
56380ce04c slightly faster to keep IRAM_ATTR for sPC and color_add 2025-10-26 01:41:30 +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
Will Tatam
c5a28c2977 only call endImagePlayback if reset true in resetIfRequired 2025-06-15 12:13:16 +01:00
Will Tatam
d9ab878503 Swap to WLED_ENABLE_GIF 2025-02-22 12:56:47 +00:00
Christian Schwinne
9caa7cb4e9 Fix missing GIF enable macros 2025-02-22 12:40:42 +00:00
Christian Schwinne
b8a29bcbf8 GIFs work again in principle 2025-02-22 12:37:13 +00:00
Frank
2c0063dc5b tiny optimization
* use bitmask operations in getBitFromArray, setBitInArray
* make currentBri "const"
2025-01-17 21:13:27 +01:00
Frank
8daf9d9ffb transition optimization (small speedup)
* move "progress()" into FX.h so the compiler can inline it
* removed redundant checks in  currentBri()
2025-01-16 18:26:10 +01:00
Frank
8317c891c1 better transitions overspeed bugfix
when the user wants less than 42 fps, respect this limit during transitions.
2025-01-10 13:50:25 +01:00
Frank
d9153854c4 bugfix: avoid effect speedups during transitions 2025-01-10 13:09:19 +01:00
Frank
f8a673ce81 code robustness improvements plus minor speedup
* make  XY() and _setPixelColorXY_raw() const (minor speedup)
* segment is a struct not a class: friend class Segment --> friend struct Segment
* fix missing braces around two macros
* use non-throwing "new" where possible
* improve robustness of transition code
2025-01-07 15:58:38 +01:00
Frank
02f51d4582 realtime mode bugfixes
- busses: ignore not valid bus instances
- "use main segment only": prevent flickering du to intermitted strip.service().
2024-12-20 17:47:07 +01:00
Frank
40bfe619b9 bugfix: avoid double blanking segments
if both seg.reset and seg.needsBlank were set, this caused a second (unwanted) blanking in frame 1.
2024-12-11 18:52:02 +01:00
Frank
972257a7ee minor code cleanup
* removed dead code
* prevent promotion to double
* made constants constexpr
* made some methods const
* fixed a few typo's
2024-12-04 22:18:39 +01:00
Frank
102d098e28 bugfix #3 for ghostly appearing switched-off segments 2024-12-04 18:05:37 +01:00
Frank
23d41e66c9 bugfix #2 for switched-off segments
segments that are "off" were still rendered during transitions.
2024-12-03 16:04:21 +01:00
Frank
9922d2aa8d bugfix: don't render segments that are "off" 2024-12-03 14:44:46 +01:00
Frank
f21b2949f1 fix for effect double restart problem when cross-fade is enabled
we only use palette and brightness transitions, so effect restart at the transition end is not required.
2024-11-27 21:13:46 +01:00
Frank
ce8fc8930e const const const
small speedup by declaring some functions "const"
2024-11-24 17:45:25 +01:00
Frank
5ea3aa9ce5 misses one 2024-11-14 00:00:58 +01:00
Frank
c73ed486e9 effect bugfixes for width>255
* band-aid for ripple, matrix, crazy bee
* arc mapping fix for diameter > 255
* small speedup for "block" mapping
2024-11-13 23:57:53 +01:00
Frank
b1194f597c fix for a potential endless loop in palette blending
this bug is hard to trigger - when a palette transition is in progress and the main loop gets delayed (wifi connect, saving large preset files) then a calculation in setCurrentPalette() could overflow leading to an infinite loop.
2024-11-08 12:12:22 +01:00
Frank
aafebf7aad bugfix: make pseudo-1D segments (width=1, height=x) work again 2024-11-07 19:34:19 +01:00
Frank
53ecf16ab1 bugfix: make freeze work again
the last commit had a side-effect that cause "freeze" to first blank the screen, then freeze.
2024-11-07 16:43:20 +01:00
Frank
d1541b520f Bugfix: remove ghost pixels when changing segment options
... transpose, mirror, reverse, grouping, spacing, size

* unlike AC WLED, when calling seg.fill(BLACK) from webserver context this usually has no effect --> added  markForBlank() that shedules segment blanking at the next drawing cycle
* fill previous segment with black when size, grouping or spacing changes
2024-11-07 14:36:39 +01:00
Frank
7fb3fe65b2 experimental: strict framerate limit for strip.show() 2024-11-06 13:19:54 +01:00
Frank
d53c0a31e9 FPS calculation minor improvement
seems to work better without rounding
2024-11-06 13:18:33 +01:00
Frank
7f3d43bc57 WS2812FX::service() fix for non-fastpath builds 2024-11-05 18:50:22 +01:00
Frank
a2e9e77ca7 setTargetFps with rounding 2024-11-05 18:07:17 +01:00
Frank
b793c7cb9c trying to stabilze FPS for Art-Net 2024-11-05 17:44:57 +01:00
Frank
68c4b830a6 legacy code cleanup 2024-11-04 14:17:59 +01:00
Frank
dc4964a491 small update
based on feedback from the PR to upstream
* support "0 FPS" meaning "unlimited"
* keep FRAMETIME_FIXED fixed
2024-11-04 13:47:05 +01:00
Frank
6bae356789 renaming
upstream has renamed "now" to "showNow" - so we follow
2024-11-01 17:17:54 +01:00
Frank
bf5fb9ccaa fix compile errors 2024-11-01 15:12:07 +01:00
Frank
7c0ecdf7c4 make "target FPS" work 2024-11-01 14:51:12 +01:00
Frank
85035e54e8 bugfix for random crash when changing effects 2024-11-01 13:32:50 +01:00
Frank
e652bd7064 do not restart effects after LEDs off/on 2024-10-27 17:26:04 +01:00
Frank
cff17861a4 bugfix: rest segments when leds are switched off/on
based on an idea from @blazoncek in 4cc2cc4ad4 (diff-749825f808f7ce1ce1108fffc7ed037085160a63cad32397135dfc0063494373R56)
2024-10-27 16:43:21 +01:00
Frank
54cc4cac08 Arc - gPC fix 2 by @Brandon502 2024-10-20 10:06:51 +02:00
Frank
a99a54c9fa cache SEGMENT
actually its just a minor speedup, at least with -O2
2024-10-20 01:06:18 +02:00
Frank
7c6178418a cache virtualLength() and some cleanup
speedup for 1D->2D mapping
2024-10-19 23:29:53 +02:00
Frank
670c621ffe Arc - gPC fix by @Brandon502
with fix for missing pixel on 8x32 and similar ratios.
2024-10-19 22:26:11 +02:00
Brandon502
e37afd0cb8 Expand1D Corner Fix, Arc gPC fix.
Only matripix is not working correctly on arc. Effect starts at the end of the strip and use gPC to fill to beginning.
2024-10-16 18:12:56 -04:00
Brandon502
c1e75ac127 Expand1D Arc - No holes 2024-10-16 12:12:28 -04:00
Ewoud
33318dab25 Merge pull request #170 from MoonModules/license 2024-10-16 00:14:46 +02:00
Frank
22b16ab542 Align all licensing statements with EUPL-1.2 2024-10-14 21:52:52 +02:00
Frank
d67ba8451a S3: increase MAX_LEDS
S3 (opi PSRAM) can handle 128x128 pixels on HUB75.
2024-10-14 17:37:37 +02:00
Frank
a84216947b forgot one 2024-10-06 22:19:08 +02:00