Commit Graph

6104 Commits

Author SHA1 Message Date
Frank
dcdc05b592 unicode-related robustness improvements
* enable ARDUINOJSON_DECODE_UNICODE (otherwise unicode needs 6(!) bytes for encoding)
* robustness: increase a few tiny string buffers for some extra margin
* Web UI: allow entering up to 64 chars as segment name
2025-11-20 22:36:46 +01:00
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
219355d047 AR audio sync: improved sequence check for audio packet handling
currently just a comment so I don't forget about it :-) needs some testing but very sure this will work.
2025-11-18 23:57:44 +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
53130f7216 conditional USB mode: first check build_unflags
* build_unflags have priority over build_flags, so we first check if the flag is already "unflaged"
This finally seems to catch all cases properly :)
2025-11-16 13:28:28 +01:00
Frank
14f0d0a03c re-enable raw build flags checks for USB mode
only checking CPPDEFINES sometimes misses the flag
2025-11-16 03:02:12 +01:00
Frank
870dc728f1 Disable raw build flags checks for USB mode
Commented out raw build flags checks for USB mode. The results would be wrong, because raw build_flags ignore build_unflags.
2025-11-16 02:13:29 +01:00
Frank
2b0179850c Merge pull request #263 from MoonModules/copilot/fix-255 (fixes #255)
Implement conditional ARDUINO_USB_MODE: dev=1, release=removed for USB-OTG boards with production warnings
2025-11-16 01:25:59 +01:00
Frank
9860dc5ca0 Disable CDC USB on boot for older framework compatibility
Changed ARDUINO_USB_CDC_ON_BOOT flag to disable CDC USB due to issues with the older framework.
2025-11-16 01:19:08 +01:00
Frank
6ccbfe61ab additional debug help 2025-11-16 01:08:27 +01:00
copilot-swe-agent[bot]
c785cb5f6c Fix Serial breakage: remove ARDUINO_USB_MODE instead of setting to 0
Co-authored-by: softhack007 <91616163+softhack007@users.noreply.github.com>
2025-11-15 23:51:04 +00:00
Frank
2869de215c USB mode script: updated print statements for clarity 2025-11-16 00:35:23 +01:00
copilot-swe-agent[bot]
3bc68c574e Fix conflicting ARDUINO_USB_MODE definitions using BUILD_UNFLAGS
Co-authored-by: softhack007 <91616163+softhack007@users.noreply.github.com>
2025-11-15 23:24:01 +00:00
Frank
43b0da03aa Update debug messages for USB mode detection 2025-11-15 23:15:44 +01:00
copilot-swe-agent[bot]
0c92e573e1 Improve messaging: conditional warnings and production alerts
Co-authored-by: softhack007 <91616163+softhack007@users.noreply.github.com>
2025-11-15 21:48:43 +00:00
copilot-swe-agent[bot]
2932644381 Add CDC_ON_BOOT=1 check: only modify USB_MODE for USB-OTG boards
Co-authored-by: softhack007 <91616163+softhack007@users.noreply.github.com>
2025-11-15 21:25:33 +00:00
Frank
8342679d4a Merge pull request #264 from MoonModules/copilot/fix-256 (fixes #256)
Fix AutoPlaylist race condition with AutoChange preset applications - avoid self-deactivation problem
2025-11-15 17:13:14 +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