Commit Graph

4310 Commits

Author SHA1 Message Date
Frank
2f48f03e44 truncate long segment name, instead of discarding
UX improvement: when segment names are too long (esp. with unicode), truncate it instead of deleting the name completely
2025-11-20 22:33:42 +01:00
Frank
2c3592c3f3 fix off-by-one array violation, debug message wghen segment name is too long
* fix possible off-by-one array overflow in drawText
* debug message when too-long segment name was dropped
2025-11-20 18:43:15 +01:00
Frank
3738735c84 engage
make it so
2025-11-20 18:28:42 +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
0a593b4d39 codepage update 2025-11-20 11:41:26 +01:00
Frank
a3ccc5a8eb work in progress
it just compiles, don't ship it !
2025-11-20 02:36:12 +01:00
Frank
c3b8e0182b plan: next steps
just an empty framework
2025-11-20 02:07:30 +01:00
Frank
29e0afc0d7 align error characters
always use "small dot" for unsupported char, "bigger dot" to indicate unicode error
2025-11-20 01:42:04 +01:00
Frank
c2b87f863f minor update 2025-11-20 00:54:25 +01:00
Frank
e4f4294233 strlen => strnlen 2025-11-20 00:41:21 +01:00
Frank
0b1d22b8f1 error codes 2025-11-20 00:34:33 +01:00
Frank
6a4716e490 decoder robustness improvements, and some nitpick 2025-11-20 00:12:26 +01:00
Frank
5597695865 UFT-8 to UTF-16 decoder
* should properly decode all unicodes that fit into 2bytes UTF-16
* with error handling for well-known "malformed UTF-8" expoits
* puh, this stuff looks simple but the details are CRAZY 😝
2025-11-19 23:48:30 +01:00
Frank
8219feb41e more dummies
just to sketch out the final implementation
2025-11-19 18:04:09 +01:00
Frank
55c9741f01 new functions prototypes, minor fixes
* prototypes for UTF-8 ==> wchar16 conversion
* minor fixes
2025-11-19 17:40:11 +01:00
Frank
43ab0dd468 Full Codepage 437 support
part1:

* enable all bitmaps already defined in the font files (increases firmware by ~7KB)
* add traslation for unicode -> codepage437 (as used by font files)
2025-11-19 17:07:30 +01:00
Frank
0a0ca506eb Add WLEDMM_FASTPATH definition for all esp32 builds
force all esp32 builds to use WLEDMM_FASTPATH.
The code is proven in use, while non-fastpath is becoming obsolete.
2025-11-18 23:35:15 +01:00
Frank
1583452c86 oops
fixes a mistake in previous commit
2025-11-18 23:19:25 +01:00
Frank
bc7a96d7d4 strip wait function: increase idle wait time to 120ms
Updated strip wait function to use longer idle wait time (similar to the timeout used by upstream WLED 0.16)
2025-11-18 23:13:47 +01:00
Frank
872c38f3c2 (experimental) HUB75 small speedups
* removed unnecessary sanity checks from sPC and gPC
* gPC: use  inline color_fade() instead of FastLED .scale8()
in my tests on -S3 this gives a small speedup, 2% up to 6%
2025-11-17 19:30:52 +01:00
Frank
deaee37559 (experimental) 2D drawPixel optimizations
* add a dedicated callback for 2D downscaling only (no nested for loop)
   -> up to 10% faster
* minor optimizations for 2D up/downscale drawpixel - move repeated calculations out of the inner loop
  -> small speedup
2025-11-17 14:30:29 +01:00
Frank
d6ee51841b image loader: avoid message flood on error
in case that several "bad" image effect segments competing to use the GIF decoder, we had a flood of repeating user_print messages
2025-11-17 14:27:08 +01:00
Frank
eab946ea87 image loader: allow graceful takeover after error
Allow decoder "takeover" by another segment
a) when last segment has decoding error (unsupported file, etc.)
b) when last segment became inactive
2025-11-17 12:29:47 +01:00
Damian Schneider
e5ab0b6077 Bugfix for gif player WRT inactive segment and 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-11-16 20:48:27 +01:00
Frank
47153baa0c brackets (typo)
does the same thing as before, but looks clearer.
2025-11-16 19:30:34 +01:00
Frank
16540f58b3 (experimental) adjust image scaling when segment options change during playback
* move scaling calculation and decoder.setDrawPixelCallback() into a separate function
*re-calculate scaling before decoding a new frame
* reset gifWidth and gifHeight to zero in endplayback
2025-11-16 19:18:21 +01:00
Frank
2a120e81f8 image effect: flicker fixer for WS2812b leds driven by RMT
Large file read operations can cause RMT stall leading to flicker.
* wait for RMT driver when lading a new gif, and when decoding a new frame.
2025-11-16 16:08:16 +01:00
Frank
b443c13ad8 revert safety check in cfg.cpp
this leads to UI problems in the LEDs setting page.
2025-11-16 15:28:57 +01:00
Frank
737b7cc471 bus robustness improvement
ABL and SerializeConfig explicitly check bus->isOK(), instead of relying on bus->getLength() == 0
2025-11-16 14:52:18 +01:00
Frank
5b52ee612f clean up handling of USB-CDC Serial
when ARDUINO_USB_CDC_ON_BOOT is set, USB-CDC pins are always assigned to 'Serial'.
2025-11-16 14:05:30 +01:00
Frank
4e2605b2a6 fix for 8266 build error 2025-11-15 00:17:16 +01:00
Frank
dc04ccbde7 another attempt to avoid LED glitches during file writing
* mark synchronization variables volatile (thread-safe)
* additional logic in closeFile() to avoid file write while leds are pushed out by NPB driver
* some comments and analysis
* replace "yield()" after file ops with "delay(0)" before operations.
2025-11-15 00:11:35 +01:00
Frank
9f31f2444f some precautions to prevent buffer out-of-bounds access and concurrency problems
* make sure that filenames can hold 32chars of segment.name
* fix logic error in Segment::drawCharacter
* protect free(Segment::_globalLeds) with a critical section
2025-11-14 22:43:44 +01:00
Frank
47f96fdd4a post-merge adjustments 2025-11-14 19:51:17 +01:00
Damian Schneider
9b6ce948f2 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-11-14 19:42:50 +01:00
Damian Schneider
ca35e9914a Improved 1D support for GIF images, bugfixes, blur option by @DedeHai & @softhack007
- add better support for 1D gifs: use the full gif, row by row, scale if needed
- add blur slider to image FX
- improved safety checks to avoid crashes
- add "fast path" if image size matches virtual segment size
2025-11-14 19:30:26 +01:00
Frank
a833cb5706 JMap robustness and use-after-free fixes
* increased ArrayAndSize.size from 8bit to 16bit
* prevent out-of-bounds access in JMapC::getPixelColor
* do not delete[] SEGMENT.name from outside of segment class !!
2025-11-11 23:17:50 +01:00
Frank
1e14e4b4e5 fix minor bug (errorflag reset not working)
typo: == instead of =
2025-11-11 23:09:09 +01:00
Frank
e4c964ebaf deserializeMap robustness improvements
* make sure that fileName is big enough for segmentName".json"
* fix possible buffer overflow in f.readBytesUntil
* stop reading map{ } entries when customMappingSize is reached
* raise "low mem" error when malloc failed
2025-11-11 21:59:19 +01:00
Frank
36648d1936 hot path optimization: make gamma correction inline
* make sure that gamma LUT is always initialized
* remove some unnecessary safety checks
* make gamma8() inline, for more speed
* use fast unGamma8 for preview
* add super-fast unGamma8 for HUB75 - old function lost 3-10 fps, this version does not reduce fps at all *grins*
2025-11-10 23:17:16 +01:00
Frank
4a323ba057 align Release Strings with upstream
"server message" on OTA update page follows the new format used by upstream WLED.
2025-11-09 23:19:43 +01:00
netmindz
b94fc7c3f0 Merge pull request #4849 from Arcitec/0_15_x-improve-version-info
(0.15.2 backport): Make version information consistent across update interfaces
2025-11-09 22:05:41 +01:00
Damian Schneider
71b7121ded bugfix: do not reset segments if unchanged #4969
lines were swapped, causing segment reset on every preset call.
2025-11-09 21:57:12 +01:00
Frank
f9a2099240 always use same GifDecoder initialization
Removed conditional compilation for GifDecoder based on PSRAM availability.
After inspecting the library code, it became clear that any parameter changes for GifDecoder will not impact memory needs - decoder.alloc() always requires 24KB.
2025-11-09 20:30:43 +01:00
Frank
d78ea5ae2e prevent bad filenames in "segment names as ledmap names"
Increase buffer size for fileName to accommodate long segment names (max 32 chars) without producing broken filenames.
2025-11-07 15:07:13 +01:00
Frank
c1979f8bc7 no fun in Germany ;-)
no fun, just rabbits. Lets stay professional.
2025-11-07 12:08:31 +01:00
Frank
c58c6ef268 minor robustness improvement
If seg.name is at least 32 characters long, strncpy will fill the 32-byte window without appending '\0'. This could lead to sporadic errors.
2025-11-07 11:58:55 +01:00
Frank
9115cd17af tiny cleanup, ready to merge 2025-11-07 11:45:46 +01:00