Commit Graph

365 Commits

Author SHA1 Message Date
Damian Schneider
3259b3acb0 Bugfix for brightness factor upon save: fixes #4824 (#4827) 2026-01-17 11:17:07 +01:00
Frank
80032bfe1c statusled: stop the blinking 2026-01-09 17:18:45 +01:00
Frank Möhle
94ac42f445 Fix typo in garbage collection log message 2026-01-07 13:16:45 +01:00
Frank
2a56f9b658 fix presets.json corruption, part 2: mutex for presets file writing
prevents concurrent presets.json writes from doSaveState() and savePreset()
2025-12-29 20:48:07 +01:00
Frank
c185f37791 improved mutex error handling
- debug message in case of "unexpected" mutex errors
- removed experimental delay() in requestJSONBufferLock
2025-12-23 00:33:28 +01:00
Frank
1c2e6aac6e oppsie 2025-12-23 00:11:40 +01:00
Frank
30fcd6efad segment & bus.show mutex redesign
* separate mutexes for improved performance:
  - busses.show and effect drawing
  - critical changes to segment vector
  - block out critical segment changes while strip.service() loops over segments
* UDP realtime acquires mutex before drawing
  - prevents corrupted outputs, caused by parallel tasks updating pixels while busses.show() runs
2025-12-21 23:56:09 +01:00
Frank
7df63db744 and mutex for all
revised mutex and critical section handling for segment drawing
- simplified code with macros (no more #if ESP32 ... #endif)
- remove some critical sections (prevents interrupt stalling)
- added mutex to functions that change the list of segments
- added mutexes to all (potential) background drawing code
- use recursive mutexes to prevent accidental self-locking of tasks
2025-12-20 17:13:52 +01:00
Frank
c25f082231 improve stability of DDP via tcp_task (websockets)
* protect pixel buffer changes with critical section
* protect segment list modification with critical section
* make _isServicing and _triggered atomic (move out of packed bitarray)
* allow custom timeout for waitUntilIdle - DDP needs a longer timeout
* protect strip.show() and effect drawing functions with mutex, to prevent crashes
2025-12-19 18:13:20 +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
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
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
60878305fb debug code updates & fixes
better output when using WLED_DEBUG_HEAP without WLED_DEBUG
2025-10-25 00:53:25 +02:00
Troy
55e9c3d7a2 IDF v4 Ethernet Fixes 2025-01-29 14:01:29 -05:00
Frank
c144c77b81 S3: don't wait for serial to initialize
... allows to start effects a bit aerlier. Enabled by default on -S3. for your own builds, add `-DWLEDMM_NO_SERIAL_WAIT` to build_flags.
2025-01-10 15:50:52 +01:00
Frank
6caa9d78b8 avoid glitches at relay power-on
* switch on relay _after_ the current leds transmission is complete.
2025-01-10 12:49:46 +01:00
Frank
c0d8e256ae WLEDMM: we need the same delay when initially switching the relay on 2025-01-09 23:51:03 +01:00
Frank
79c26db4fa MM-specific handling of PICO reserved pins
this complements the previous commit
2025-01-07 16:45:42 +01:00
Troy
3b46af1101 Make IP clickable via serial monitor 2024-11-23 18:13:05 +01:00
Frank
9312506217 detection of "OPI" flash (esp32s3 WROOM-2) 2024-10-30 18:40:26 +01:00
Frank
a362b619fb fix JSON buffer problem on classic esp32 with PSRAM
as it turns out, classic esp32 cannot allocate more than 64kb for json doc.
2024-10-30 17:00:44 +01:00
Frank
e3444174c0 align PSRAM build flags on all MM targets 2024-10-30 15:52:39 +01:00
Ewoud
33318dab25 Merge pull request #170 from MoonModules/license 2024-10-16 00:14:46 +02:00
Frank
a3545581ea Update wled.cpp - redo undo
This line wasn't the causing the problem I'm chasing ...
2024-10-15 19:37:45 +02:00
Frank
ced453d3a0 undo "fix re-initialised bus' brightness" 2024-10-15 17:03:48 +02:00
Frank
22b16ab542 Align all licensing statements with EUPL-1.2 2024-10-14 21:52:52 +02:00
Frank
68536635d7 show toast when reboot is needed, or error restart happened
less WTF, more information
2024-10-14 11:25:41 +02:00
Blaz Kristan
3a38d0cfed Fix for #4005 2024-10-02 23:22:27 +02:00
Frank
8338b58b88 HUB75 memory usage info on serial 2024-09-28 02:15:41 +02:00
Frank
f1088bb5c0 (experimental) loop2 to get fresh audio just before drawing
* introducing usermod::loop2() - runs just before strip.service()
--> expecting to reduce lagging between audio and visual to an absolute minimum.
2024-09-21 20:41:05 +02:00
Frank
569ba1c626 s3: better handling of PSRAM pins 2024-09-21 19:29:28 +02:00
Troy
aa38c113e3 More boot log clarity 2024-08-21 14:01:11 -04:00
Troy
b12b23d02c Boot log clarification. 2024-08-21 13:59:03 -04:00
Troy
01e51e5751 More fixes for non-ESP32 boards 2024-08-21 13:57:58 -04:00
Troy
0a26aa918c Fixes for non-ESP32 boards 2024-08-21 13:51:58 -04:00
Troy
9e24a634c2 ESP32 Dual Booting 2024-08-21 13:43:59 -04:00
Frank
c66a8af85c reduce WiFi disconnects
HUB75 is very heap-hungry - use a more relaxed metric for triggering "low heap emergency" actions
2024-08-08 17:44:13 +02:00
Frank
a84ac5b1ee Merge pull request #4060 from DedeHai/0_15_bootdelay
boot-up delay to fix wifi not starting in some setups

use
`-D WLED_BOOTUPDELAY=500` (or some other delay you want, in milliseconds)
in platformio env definition to add 500ms of delay before hardware init.
2024-07-26 17:45:54 +02:00
Troy
e08ae84a83 Allow 8 AoftAP clients (for Dom)
Increases the allowed SoftAP clients so folks doing syncing "in the field" can connect more devices without a proper WiFi network.
2024-05-08 12:18:31 -04:00
Frank
06f94743bf pico board: always protect pin 16+17
runtime detection of PICO boards, to ensure that SPIRAM pins are protected even when users install a non-pico firmware build.
2024-05-07 13:35:16 +02:00
Frank
e0a4a7c71e minor updates 2024-04-30 17:16:11 +02:00
Frank
858610e39b trying to reduce flickering
The NeoPixelBus RMT driver seems to get stalled when ESP.get.... functions are called (big kernel lock?). Also its glitching during flash file access.

This change tries to avoid some conflicts by first checking that the driver is not sending.
2024-04-26 21:21:32 +02:00
Frank
c8e181f3b1 overlooked one 2024-02-23 11:19:17 +01:00
Frank
2cc67245ca avoid infinite disconnect loops when RAM is low 2024-02-23 10:54:50 +01:00
Frank
7593c23105 minor fixies
* setup: print free filesystem space after mount
* loop: forgot to actually reset the stale lock
* handleConnection: (8266) user messages in case of "heap too low".
2024-02-12 21:51:23 +01:00
netmindz
42109fe606 Merge branch 'mdev' into dmx_input 2024-01-16 13:27:42 +00:00
Frank
e33bcb822e USB CDC: avoid hung devices when USB host is not connected
see https://github.com/espressif/arduino-esp32/issues/9043

"
The S3, C3, C6 and H2 that have HW CDC JTAG USB port may cause a delay when using HWCDC in Serial by activating CDC on Boot and selecting the USB Mode for Hardware CDC and JTAG. This happens when no USB application in USB Host side is started to receive the data sent by the ESP32xx.

The USB CDC buffer gets full and the Arduino HW CDC layer will timeout, by default 100ms, until give up trying to send the CDC data.

As a workaround, it is necessary to use HWCDC::setTxTimeoutMs(timeout_ms) and set it to zero.
"
2024-01-04 16:03:46 +01:00
Frank
80a9736d0d print WLED error codes to serial + netdebug
These errors were shown in UI only, but missing in debug output.
2023-12-29 21:40:46 +01:00
Blaz Kristan
738df1847a Fix for #2922 2023-12-29 17:21:43 +01:00
Frank
58fe146a70 the experiment evolves
trying to find all the conditions when _doc[]_ should _not_ be touched ...
2023-12-19 11:28:46 +01:00