Commit Graph

1115 Commits

Author SHA1 Message Date
Frank
f4fbdbf367 Merge branch 'V5' into V5-C6 2026-03-29 15:34:11 +02:00
Frank
e04a156e78 Merge branch 'main' into V5 2026-03-29 13:30:21 +02:00
Damian Schneider
42844e4fa8 Adding AR support for C3: use DSP FFT and integer math (#4750)
*  fixed problem on S3: turns out to be mem alignment
* fixed scaling for C3
* code cleanup, added arduinoFFT back in, added ifdefs & description

also added major peak and frequency bin calculation for DSP FFT

* moved ifdefs to correct place, separated sample filter & FFT filter application

post FFT band pass and IIR applied to samples are now separated: I found in testing that applying the sample filter helps with aliasing into base-bands, there is no need to hard-cut the lowest frequencies after FFT.

* changed sample low pass cutoff from 80Hz to 90Hz

better anti-aliasing at minimal loss of base frequency.

* code cleanup and minor speed improvement
- moved scaling of FFT values into fftAddAvg() to use ferwer operations
- added "using" for math types, removing some ifdefs and duplications
2026-03-29 13:18:26 +02:00
Benjam Welker
4a6ff64519 add more macro/timer slots (#5140)
* convert to vectors

* Update wled00/cfg.cpp

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* UI fixes

converted preset entry to select box for ease of use

* no eeprom compatibility

* tighten up code

* fix sunrise/sunset issue

* fix issue with sunrise/sunset/regular selector

* preset dropdowns

* sort before use

* delete timer when preset = 0

* truncate long names and add sort options

* html updates

* fix save bug

* make boxes a bit darker

* add fallback if localStorage is empty

* remove sort option

* code rabbit suggested fixes

* remove css

* restyling

* common

* dry preset loading

* revert missing const

* update deep sleep usermod with new timer struct

* tabs

* Revert "tabs"

This reverts commit fdc01f2f5d.

* remove unneeded clamp checks

* leave index alone

* remove useless check

* fix up await functions

* only fetch localstorage

* inline single line function

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-03-29 13:01:24 +02:00
Damian Schneider
b7d2c3cd85 Full fastled replacement (#4615)
* removed fastled dependencies
- copied relevant functions
- optimized some of them for ESP32
* added perlin functions from PR, code cleanup. work in progress
* added hsv2rgb16rainbow function, some cleanup
- new rainbow function is faster and more accurate than original fastled function
* updated conversion functions (now faster), cleanup, optimizations
* code cleanup, moved (most) fastled functions into fastled_fcn.cpp
- resolves licensing issue
- moved PRNG into its own space
- prettified some code
* fixed prng: it now generates a full sequence of random numbers, thx @TripleWhy for pointing out the flaw
* rename to fastled_slim, add hsv2rgb() convenience aliases, fix FX usage
* improve ease8inOutCubic() accuracy
* fix background in twinklefox, minor optimization in PS (always use gamma LUT, no ifs)
* bugfixes in FX, adding white and cct transition to slow transition FX

Co-authored-by: Frank <91616163+softhack007@users.noreply.github.com>
2026-03-29 11:40:16 +02:00
Frank
51af4ecb08 Merge branch 'V5' into V5-C6 2026-03-27 14:35:23 +01:00
Will Miles
0d539c524c Merge branch 'main' into V5 2026-03-25 19:29:45 -04:00
Frank
64f3aa96dd replace depricated ADC constant
according to espressif docs:
`ADC_ATTEN_DB_12` is deprecated, it behaves the same as `ADC_ATTEN_DB_12`
2026-03-12 16:01:43 +01:00
Frank
f816b5fa98 bugfix #5295 - change remaining references to strip.paletteBlend into paletteBlend
these were leftover after refactoring paletteBlend into a global variable.

see #5295 for details
2026-03-12 16:00:20 +01:00
Frank
02fc15ffd1 Merge branch 'main' into V5 2026-03-11 18:15:09 +01:00
BobLoeffler68
c7fa496fda Spinning Wheel FX in the user_fx usermod (#5293)
* Added the Spinning Wheel effect into the user_fx usermod

* Fixed integer overflow when storing color scale in aux1. And added a comment about the velocity scaling.

* Additions/changes:
* Added Color Per Block checkbox. Enabled will set the spinner LEDs to the same color (instead of changing colors depending on the palette and LED position).
* Added Sync Restart checkbox.  Enabled means that all spinners will restart together (instead of individually) after they have all stopped spinning.
* Added resizing the spinner slider (between 1 and 10 LEDs).
* Changed how we do random speed and slowdown start time (sliders set to 0 = random).
* tweaks here and there

* One minor fix for the spinner colors

* Changed the two analogRead() to hw_random16()

* Changes from SEGLEN to vstripLen suggested by coderabbitai, but it's not working correctly now. Committing and pushing so coderabbitai can check the latest code.

* Rolled back changes from vstripLen to SEGLEN as that is what works correctly.  Also changed to the global paletteBlend.

* Fixed a color issue by using ColorFromPaletteWLED() instead of color_from_palette(). Also removed color_wheel() and the Color Mode option as it's very similar to the new color function. And now using strips variable instead of SEGMENT.nrOfVStrips() after the initial assignment at the top of the code.

* Added the ability to spin the wheel(s)/spinner(s) with a push button or the new Spin Me checkbox.

* Set default of check1 to 1 so it will automatically spin.
2026-03-11 18:01:56 +01:00
Will Tatam
493f0fe952 Merge branch 'main' into V5 2026-03-08 16:21:55 +00:00
BobLoeffler68
278a1fb6c1 Lava Lamp FX in the user_fx usermod (#5253)
* Added Lava Lamp effect to user_fx usermod
2026-03-04 10:05:52 +01:00
BobLoeffler68
0e1da4f004 Magma FX in the user_fx usermod (#5360)
* Added Magma effect to user_fx usermod

* Get color from current palette for lava bombs
2026-03-04 06:21:49 +01:00
BobLoeffler68
5f5f468983 Ants FX in the user_fx usermod (#5251)
* Added the Ants effect to the user_fx usermod
2026-03-03 17:13:55 +01:00
BobLoeffler68
5f28406f42 Morse Code FX in the user_fx usermod (#5252)
* Added Morse Code effect to the user_fx usermod

* Added a few comments

* Added punctuation and end-of-message codes, and changing them will force a re-draw.

* Fixed mode name in addEffect

* cosmetic changes

* * removed PROGMEM from letters and numbers arrays.
* changed 1024 to a constexpr named MORSECODE_MAX_PATTERN_SIZE.
* added MORSECODE_MAX_PATTERN_SIZE to build_morsecode_pattern().
* added boundary checked when adding patterns to the array.
*  changed code to allocate per-segment storage for pattern.

* More bounds checking added.

* Added a lookup table for punctuation morse codes.

* Removed PALETTE_MOVING_WRAP macro as it's not used in this effect.

* Moved all static variables to SEGENV.data

* Now using a bit array instead of a bool array

* added a check to see if the pattern is empty

* Added "color by word" option, moved Color modes to a slider and added a couple comments to top comment block.

* Removed return FRAMETIME

* A few changes suggested by coderabbit.

* A few changes suggested by coderabbit
2026-03-02 19:16:43 +01:00
gustebeast
bc229b8cb6 Add flashing effect on line clear in TetrisAI_v2. (#5320)
* Add flashing effect on line clear in TetrisAI_v2.
See https://imgur.com/1dsNCVd for a demo.

* Address feedback for tetris flashing effect.

* Address width == 32 case for isLineFull
2026-03-02 19:11:26 +01:00
gustebeast
5790309371 Introduce comet effect usermod with fire particle system (#5347)
* Introduce comet effect usermod with fire particle system

* Introduce comet effect usermod with fire particle system
2026-03-02 19:10:31 +01:00
Frank
511ff789b5 Merge branch 'V5' into V5-C6 2026-03-01 21:48:12 +01:00
Will Tatam
b3e7e7e8c0 Merge pull request #5357 from netmindz/idf_4_4_8
Upgrade platform to 4.4.8
2026-03-01 20:52:09 +01:00
Frank
d3a8da212c UI improvement: PDM is not a standard I2S microphone
to avoid user confusion, UI now shows "PDM" instead of "I2S PDM"
2026-02-24 12:56:52 +01:00
Frank
522927ea94 fix for I2S ressource conflict with ethernet (aPLL) - V4 builds only
Don't use aPLL clock for I2S (and PDM) microphones.

Ethernet with internal RMII clock (typically on GPIO 0/16/17) uses the Audio PLL (APLL) to generate the 50 MHz reference clock for RMII.

see https://github.com/wled/WLED/issues/5391
2026-02-24 12:35:38 +01:00
Will Tatam
439d4a0e98 Merge pull request #5357 from netmindz/idf_4_4_8
Upgrade platform to 4.4.8
2026-02-20 19:04:39 +00:00
Damian Schneider
d1ed547a7c Improved bus handling: free choice of bus driver in any order and improved memory calculations (#5303)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: DedeHai <6280424+DedeHai@users.noreply.github.com>
2026-02-14 19:00:37 +01:00
Frank
967f6ab2bd Merge branch 'V5' into V5-C6 2026-02-12 11:10:40 +01:00
Frank
993ab49b15 Merge branch 'main' into V5 2026-02-12 11:07:36 +01:00
Frank Möhle
f830ea498c Clean up global variables namespace, save a few 100 bytes of flash (#5368)
* reduce scope of some variables to "static"

these are not used anywhere else. Making them static avoid name conflicts, cleans up the global scope and in some cases allows for better  optimization by the compiler.

* remove unused reference ``tz``from analog clock usermod

* side-catch: remove two "local var shadows global var" warnings

* reduce scope of functions declared globally, but not used anywhere else
Safe to make static
* declared in fcn_declare.h, only used locally in one file
* not declared in fcn_declare.h, only used locally

* HUB75 small optimization
make bit array functions "static inline"
-> better for optimization, saves some bytes because the compiler does not need to preserve a non-inline function copy for external references.

* a few more static functions
as suggested by the rabbit.
2026-02-11 22:24:06 +01:00
Frank
703b90fe88 Merge branch 'V5' into V5-C6 2026-02-10 21:47:51 +01:00
Frank
3243c88055 Merge branch 'main' into V5 2026-02-10 21:26:18 +01:00
Frank
08ca41b96d expand chip-specific "if defined" to C61 and P4 (future support)
Main objective is to fnd out how far away we are from a build for the -P4. I'll clean up the "if def" mess later.
2026-02-10 19:55:36 +01:00
Damian Schneider
6b70c6ae91 Remove FRAMETIME return value from all FX (#5314)
* remove "return FRAMETIME" from all FX, fix timing for some FX

- all FX now render every frame, no more "speed up" during transitions

* fix missing return by adding FS_FALLBACK_STATIC macro

* add FX_FALLBACK_STATIC also to user_fx

* remove obsolete seg.next_time
2026-02-09 07:57:49 +01:00
Frank
83c37f8245 Merge branch 'V5' into V5-C6 2026-02-08 16:14:24 +01:00
Frank Möhle
6d1d494cf5 Extend I2S swapped channel workaround to all 4.4.x versions
It's very unlikely that this old bug will ever be fixed in any esp-idf 4.4.x release.
2026-02-07 20:54:44 +01:00
Will Tatam
a57e895bb9 Merge branch 'main' into V5 2026-02-07 19:28:12 +00:00
Will Tatam
65daf26aee Disable pixels_dice_tray - incompatible due to BLE dependency 2026-02-07 18:59:01 +00:00
Jonny Davey
01b1c51653 Add experimental ESP32-C5 support with WiFi 6 dual-band
ESP32-C5 is a RISC-V based SoC with WiFi 6 (2.4GHz + 5GHz) support.
Treats C5 similarly to C3 for hardware capabilities (2 RMT channels,
no parallel I2S for LEDs, similar GPIO restrictions).

Changes across 25 files:
- Add CONFIG_IDF_TARGET_ESP32C5 conditionals alongside C3/C6 checks
- Add [esp32c5] and [env:esp32c5dev] build environments in platformio.ini
- Uses pioarduino platform (Tasmota framework lacks C5 Arduino libs)
- Exclude esp_dmx library (doesn't support C5 UART registers yet)
- Fix LEDC register access for IDF 5.5.0 (duty_init vs duty)
- Guard mbedtls_sha1_shim for IDF 5.5.0 (SHA1 built-in)
- Add C5 chip identification (ID: 0x0017) in OTA and web UI

Known limitations:
- RMT LED output shows flush timeouts (needs NeoPixelBus C5 support)
- WiFi AP confirmed working on hardware
- esp_dmx/DMX input disabled
- Experimental: requires pioarduino community platform

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 13:37:50 +00:00
gustebeast
0120b1ab79 Add user_fx installation instructions and a usermod config example (#5327)
* Update user_fx to include installation instructions and a usermod config example
* Explain installation when using multiple usermods
2026-02-06 07:16:25 +01:00
Damian Schneider
1ca55e42af fix relay not turning on at boot (#5315)
These changes eliminate an elaborate race condition
* add dedicated function to handle on/off and relay
* add clarifying comment on output set order
* add define for relay delay, honor forceOff in all cases
2026-01-31 17:40:53 +01:00
Damian Schneider
2c4ed4249d New custom palettes editor (#5010)
* full refactoring, added live preview, better minifying in cdata.js
* update main UI buttons, support for gaps in cpal files, cpal UI cleanup
* fixed some layout issues, added un-ordered cpal deletion
* changed to tab indentation, paste button border color now holds stored color
* fix preview to work properly and some other fixes in UI
* always unfreeze
* new approach to loading iro.js, add harmonic random palette, many fixes.
* decoupling iro.j, update UI of cpal.htm
- load iro.js sequentially
- no parallel requests in cpal.htm
- update UI buttons
- fix showing sequential loading of palettes (using opacity)
- better UX for mobile (larger markers, larger editor)
- various fixes
* small change to buttons
* load iro.js dynamically, remove iro.js from index.htm, revert changes to cdata.js
* improved visibility for very dark/black palettes and markers
2026-01-30 20:35:15 +01:00
Damian Schneider
1031e70d70 Replace buffer lock magic numbers with defines (#5217)
* replace magic numbers with defines
2026-01-30 08:14:53 +01:00
Frank Möhle
9683896a21 Merge pull request #5317 from gustebeast/wled-gtb-flash-size
Reduce flash size of TetrisAI_V2 by 97%, by removing includes of iostream, iterator and algorithm headers
2026-01-27 17:14:41 +01:00
Martin Fritzsche
ca1d6614b2 Add option to save unmodified presets to autosave usermod (#5175)
* Add option to save unmodified presets to autosave usermod

* Fix lastRun never being assigned
2026-01-24 16:26:47 -05:00
gustebeast
96f423438b Reduce flash size of TetrisAI_V2 by 97%
Main branch without Tetris
Flash: [========  ]  79.8% (used 1255301 bytes from 1572864 bytes)

Main branch with Tetris (+196kb)
Flash: [========= ]  92.3% (used 1452049 bytes from 1572864 bytes)

This commit with Tetris (+6kb, 97% less flash)
Flash: [========  ]  80.2% (used 1261625 bytes from 1572864 bytes)
2026-01-24 19:34:32 +00:00
Damian Schneider
6e9dc181e1 deepsleep cleanup, use toki to check for valid time 2026-01-10 12:36:07 +01:00
elanworld
fe3a158264 Improvements to deepsleep UM (#4456)
- add touch pin option
- add wake-up on timer macro
- fix powerup behaviour: now works as intended i.e. if no sleep delay set, it enters deepsleep on powerup but only then
- apply macro after wake up even if the window is missed
- respect date-range setting of macro
- removed non-existing pin from touch list
- removed non existing voltageCheck setting
- fixed incorrect threshold setting
- code cleanup
- fix pullup/pulldown for deep-sleep GPIOs

pin init is now working correctly, tested on all platforms

* remove unused statement

---------

Co-authored-by: Damian Schneider <daedae@gmx.ch>
2026-01-10 11:28:07 +01:00
Damian Schneider
5cfb6f984b Palettes fix (#5263)
* Fix for #5201
- use constants instead of magic numbers

Authored-by: Blaž Kristan <blaz@kristan-sp.si>
2026-01-03 10:07:04 +01:00
Damian Schneider
fa868568af minor bugfixes as suggested by the rabbit
- PulLightControl UM: dont release a lock you do not own
- off-by-one error in extractModeSlider (used only in rotary in UM)
- safety check in playlist in case something goes horribly wrong
2025-12-29 12:56:06 +01:00
nename0
8a2a7054ab Usermod Temperature: use full 12-bit precision (#4916)
* Usermod Temperature: use full 12-bit precision

* Temperature Usermod: fix DS1822 and DS18B20 family code

* Add Dropdown to select 9 or 12 bit resolution

* Add 10 and 11 bit resolution, Correct rounding towards negativ inf
2025-12-26 15:32:24 -05:00
Damian Schneider
624763cbc8 Bugfix in rotary encoder UM: off-by-1 in palette count 2025-12-17 18:49:19 +01:00
Frank
b452370be7 Merge pull request #5096 from netmindz/no-dmx-ar-conflict
fix for #4298 - no conflict with DMX output
Removes a compile-time error that was blocking compilation when DMX output mode was enabled, allowing successful builds with DMX support.

Important: this fix does not address the output buffer congestion problems that usually make WLED unstable with >100 LEDs on DMX Serial output. It only removes the compile-time blocker in audioreactive.
2025-12-15 21:54:54 +01:00