Wykres commitów

4137 Commity (remove-v1-usermod)

Autor SHA1 Wiadomość Data
Frank 566c5057f9 optimizations as per reviewer recommendations
* removed unneeded initializations in blur() and blur2D()
* remove check for _t in progress()
* code readability: if (_t) --> if(isInTransition())
* add `isInTransition()` checks to currentBri() and currentMode()
* added missing `_transitionprogress = 0xFFFFU` in stopTransition()
2025-01-19 07:35:46 +01:00
Frank cd52d7bcf6 align some function declariations with their implementation
This is purely a "clean code" thing, no impact on function -  it helps to avoid confusion when reading the code.

C++ allows declaration and implementation to use different variable names.
2025-01-19 07:35:46 +01:00
Frank ed3ec66d33 fix compile error
"const" was missing in the function implementation
2025-01-19 07:35:46 +01:00
Blaž Kristan 01c463c8e8 More tuning
- replaced POD new/delete with malloc/free
- some more SEGLEN <= 1
- some gnu::pure
- more const attributes
- some static attributes
2025-01-19 07:35:46 +01:00
Frank 872465df40 typo in comments 2025-01-19 07:35:46 +01:00
Frank b6f74287d0 implement recommendations from reviewers
* simplified transition bugfix
* removed cast same type
* isIp parameter changed to pass-by-reference, to avoid copy constructor
2025-01-19 07:35:46 +01:00
Frank 013684b5ca making some parameters `const`, plus minor improvements
* changed some parameters to "pointer to const", so compiler can better optimize code size and performance -  because data behind a const pointer will never be modified by the called function.
* made setPixelColor `const`

* fixed a few potentially uninitialized local vars (the may have random values if not initialized)

* avoid shadowing "state" in handleSerial()
* plus a few very minor improvements
2025-01-19 07:35:46 +01:00
Frank 90c2955a71 avoid using keywords for variables: module, final
these are reserved names and future compilers may reject them.
2025-01-19 07:35:46 +01:00
Frank 7be868db12 bugfix: indexOf() returns -1 if string not found
... so we must use `int` instead of `unsigned`
2025-01-19 07:35:46 +01:00
Frank 703f84e5e1 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-19 07:35:46 +01:00
Christian Dahmen 8ee2c44550 Fixed DNRGBW 2025-01-18 00:24:24 +01:00
netmindz 48f5099646
Merge pull request #4495 from netmindz/DMX-Input-AC
Add Wired DMX Input support
2025-01-17 19:31:25 +00:00
Kilrah b9aeb19834
RF433 json usermod (#4234)
* RF433 remote usermod

---------

Co-authored-by: Kilrah <kilrah@kilrah.xyz>
2025-01-17 08:01:17 +01:00
netmindz a4c3491f0c
Merge pull request #4428 from blazoncek/waterfall-fix
FX: Waterfall, Matripix & Dissolve fix
2025-01-16 15:52:21 +00:00
netmindz b2aac9f991
Merge pull request #4386 from DedeHai/ESPNow_glitchfix
Fix for ESPNow remote causing output glitches
2025-01-16 13:01:00 +00:00
Will Tatam a582786655 Port over remaining WLEDMM part of DMX Input and adapt for AC 2025-01-16 12:48:36 +00:00
Will Tatam 9a6e91d3e5 DMX Input - reinstate loggers for connection state change 2025-01-16 12:22:51 +00:00
Will Tatam fc4e7a2dee Swap DMX port to 1, persist user choice of port, validate port vs UART count 2025-01-16 12:22:32 +00:00
Will Tatam a56014bb66 Hide DMX port as just confusing to users 2025-01-16 12:20:37 +00:00
Will Tatam ebfc438bd4 Tweak DMX settings UI 2025-01-16 12:20:15 +00:00
Will Tatam 3996f02dea Revert "Rename WLED_ENABLE_DMX to WLED_ENABLE_DMX_OUTPUT"
This reverts commit 7f9cc67518.
2025-01-16 12:19:25 +00:00
Arne d637524bfc chore: remove outdated comments 2025-01-16 12:16:50 +00:00
Arne 8570922dcc chore: adapt code style 2025-01-16 12:16:39 +00:00
Arne 6598265f9b make compile after rebase 2025-01-16 12:15:58 +00:00
Arne 8f398dfd08 Move dmx_input into its own task on core 0.
This was necessary because otherwise it is not able to respond to rdm in time.
2025-01-16 12:15:49 +00:00
Arne 68e9d701de Do no longer disable dmx_input when cache is disabled.
No longer needed because missing ISR_ATTR have been added to esp_dmx.
2025-01-16 12:15:37 +00:00
Arne 67e8a00b6d rename initDmx() -> initDmxOutput() 2025-01-16 12:11:21 +00:00
Arne 11b48bc374 rename handleDMX() handleDMXOutput() 2025-01-16 12:10:13 +00:00
Arne fa80c62b28 rename dmx.cpp -> dmx_output.cpp 2025-01-16 12:06:10 +00:00
Arne 7f9cc67518 Rename WLED_ENABLE_DMX to WLED_ENABLE_DMX_OUTPUT 2025-01-16 12:05:40 +00:00
Arne 84eb6fd460 Add dmx input port to configuration 2025-01-16 11:47:48 +00:00
Arne 2cc5a29b86 keep dmx rdm identify on if dmx disconnects.
Some rdm testers disconnect after setting it.
2025-01-16 11:42:35 +00:00
Arne b178c08271 Support dmx rdm personality change 2025-01-16 11:42:16 +00:00
Arne 9a3b208ac5 comments and cleanup 2025-01-16 11:37:14 +00:00
Arne 2989155f05 handle rdm dmx address changes 2025-01-16 11:37:05 +00:00
Arne 50b56c64f5 extract creation of dmx config into own method 2025-01-16 11:36:58 +00:00
Arne be3e331afb Monitor dmx personality and dmx start address for change and update rdm 2025-01-16 11:36:50 +00:00
Arne 9d8fdd0b20 extract test for rdm identify into own method 2025-01-16 11:36:44 +00:00
Arne 033c7abe62 add enable/disable methods for dmxInput 2025-01-16 11:36:36 +00:00
Arne 5525a21696 rename settings 2025-01-16 11:36:24 +00:00
Arne aed03cd03b hack: disable dmx receiver while wifi is being activated
This fixes a crash in the dmx receiver. The dmx receiver cannot work while cache is disabled. For some reason activating wifi disables the cache. In theory, the driver is placed in iram and should work, but it doesn't. This might be a bug in the driver.
2025-01-16 11:35:04 +00:00
Arne 5a5661f136 handle dmx rdm identify 2025-01-16 11:32:49 +00:00
Arne a3bcf92ea5 Turn dmx_into into class with state.
This is much nicer to read and in the future more state will be added to support all the rdm stuff.
2025-01-16 11:29:39 +00:00
Will Tatam 0ad31c90f6 fix merge error 2025-01-16 11:26:42 +00:00
Arne 789d68e80d Move globals to top of file and change scope to compile unit only.
Some minor cleanup changes
2025-01-16 11:21:52 +00:00
Arne f06a1e8b49 Extract dmx_input from dmx.cpp into dmx_input.cpp.
This greatly improves readability because it gets rid of most of the
ifdefs.
2025-01-16 11:21:41 +00:00
Arne a0ca243955 Move dmx_input pin allocations from wled.cpp to dmx.cpp 2025-01-16 11:20:19 +00:00
Arne 9e2268bd74 Adapt to new api of esp_dmx v3.1 2025-01-16 11:17:58 +00:00
Arne 702d085117 rename global dmx... variables to dmxInput...
This is the first step in supporting both dmx input and dmx output on different pins.
2025-01-16 11:16:39 +00:00
Damian Schneider 278d204d1c
merge fix for Deep-Sleep UM 2025-01-15 20:36:53 +01:00
Damian Schneider 39b3e7e507
BUGFIX in oscillate FX (#4494)
effect was changed from int to uint but it relied on negative numbers. fixed by checking overflow and a cast.
2025-01-15 15:17:56 +01:00
Will Tatam ef2eb0764c Merge branch 'main' into usermod-libs 2025-01-15 11:00:52 +00:00
Blaž Kristan a65f97ac75 Merge branch 'main' into blending-styles 2025-01-14 22:39:20 +01:00
Will Tatam 56b8af86d7 Swap to WLED_ENABLE_GIF 2025-01-14 18:40:41 +00:00
Christian Schwinne e852df3179 Proper debug statements 2025-01-14 18:30:34 +00:00
Will Tatam deb0306347 Merge branch 'main' into gif-fix 2025-01-14 18:26:41 +00:00
Will Tatam 4f4476b79f Set new codename 2025-01-14 11:53:10 +00:00
Will Tatam 1dbd7066de Revert LOROL_LITTLEFS hack 2025-01-14 00:27:54 +00:00
Blaž Kristan cc011e39ce Bus creation bugfix
- speed improvements in ABL
- verbose debugging
2025-01-13 17:27:33 +01:00
Blaž Kristan adead9b578 Bus wrapper modifications
- NeoPixelBus update 2.8.3
- automatic selection of appropriate I2S bus (`X1xxxxxxMethod`)
- removed I2S0 on ESP32 (used by AudioReactive)
- renumbered internal bus numbers (iType)
- added buffer size reporting

Bus modifications
- WWA strip support
- bus initialisation rewrite
- optional parallel I2S (ESP32, S2 & S3)
2025-01-12 15:17:22 +01:00
Will Tatam c16d83fab0 Build custom_usermods = audioreactive auto_save animartrix 2025-01-11 22:36:06 +00:00
Will Miles b8685f2c39 Convert usermods to static libraries
Redesign the usermod system so that usermods are implemented as
PlatformIO libraries instead of headers.  This permits them to call for
dependencies, and eliminates the compiler flags for enabling each one,
allowing the build cache to behave better.

The usermod list is built using some linker magic to construct a static
list in ROM memory.  This eliminates the need for wasting SRAM on
something fixed at build time.
2025-01-11 12:08:29 -05:00
Damian Schneider bb0c0af189
added a delay after switching relay (#4474)
- helps to stabilize power on the LEDs before sending data
2025-01-09 22:41:45 +01:00
netmindz 709aeff9ea
Merge pull request #4435 from TripleWhy/TripleWhy/issue4425
palette effect overflow fix
2025-01-09 11:03:44 +00:00
netmindz 34f18122f5
Merge pull request #4295 from WouterGritter/mqtt-use-topic-buffer-len
FIX: "magic numbers" for MQTT topic buffer length in mqtt.cpp and button.cpp (use already defined MQTT_MAX_TOPIC_LEN)
2025-01-09 11:01:23 +00:00
Will Miles 204e72e9eb
Merge pull request #4213 from willmmiles/static-class-to-namespace
Complete transition of UsermodManager and PinManager away from classes
2025-01-08 21:38:10 -05:00
Frank 2e06f5b1e8
Merge pull request #4450 from adafruit/main
Add correct pin availability for ESP32 Mini modules
2025-01-06 22:33:31 +01:00
Damian Schneider 3adcbb7904
Playlist output glitchfix update: found it also happens on S3 (#4462)
* Fix output glitches when playlist changes preset update: glitches also happen on S3
2025-01-06 22:24:28 +01:00
Damian Schneider ae4de2782a
DeepSleep usermod (#4190)
* DeepSleep Usermod

- sleep delay is now 1 by default, disabling sleep at powerup
- renamed bootup variable to powerup
- using delay counter for proper bootup
- changed power-up and bootup logic
- added fallback to always power-on at boot except at powerup
- fixed bug in settings page
2025-01-04 08:07:11 +01:00
ladyada dcf89e0dbd simplify logic 2025-01-03 16:37:26 -05:00
ladyada 35d92f43c0 >sigh< https://github.com/espressif/arduino-esp32/issues/10683 2025-01-02 20:54:19 -05:00
ladyada 12db60885f try debug 2024-12-31 17:02:52 -05:00
ladyada d637260dc3 typo fix 2024-12-31 16:42:49 -05:00
ladyada 0937064e18 fix pin availability calculations for ESP32-mini modules 2024-12-31 16:40:11 -05:00
Blaž Kristan 54264efb20 Fill SSID fix 2024-12-30 15:04:25 +01:00
Damian Schneider 6a1d3de75b
Fix output glitches when playlist changes preset (#4442)
same issue as with https://github.com/Aircoookie/WLED/pull/4386
waiting on bus to finish updating before file access fixes the glitches.
this issue is only present on S2 and C3, not on ESP8266 or dual-core ESPs, the fix is only applied for these two.
2024-12-30 12:58:38 +01:00
TripleWhy 56e1d577fd palette effect overflow fix 2024-12-27 11:19:24 +01:00
Blaž Kristan 272129f66c Add ability to enter desired BSSID
- add event handling (debug)
- fixes #2151
2024-12-25 15:54:50 +01:00
Blaž Kristan 0441ede229 Fix for #4401 2024-12-25 15:18:34 +01:00
Blaž Kristan f001846e00
Merge branch 'main' into waterfall-fix 2024-12-25 10:51:34 +01:00
Blaž Kristan 0ac627dfbb FX: Waterfall and Matripix fix
- for Arc expansion
- or gaps
- or ledmaps with missing pixels
2024-12-25 10:46:14 +01:00
Damian Schneider 0ad65f4748 fixed CIE brightness calculation for PWM outputs 2024-12-23 14:57:22 +01:00
shafingazi 97bbe6f305
fixed typo in LED Preferences
Changed "poweing" to "powering" within a text block of LED Preferences.
2024-12-21 21:18:57 -08:00
wled-install 1711286ef0
Update usermods_list.cpp 2024-12-21 23:05:13 +01:00
Will Tatam 099d3f7b41 version bump 2024-12-20 18:15:12 +00:00
Damian Schneider 5f77478841
Replace PRNG with hardware RNG (#4225)
Both ESP8266 and ESP32 have a hardware random register. This update makes use of that. It is slightly faster than the fastled variants but mostly it is truly random, even when the timing limitations stated in the datasheet are disregarded. Also saves a bit on code size.

- Replaced all random8() and random16() calls with new hw_random() versions
- Not replaced in FX where PRNG is required
2024-12-20 19:12:29 +01:00
Damian Schneider 07cc3aa5c0
FX improvements and cleanup (#4145)
Improvements & merges of FX

- Scrolling Text: Gradient Palette support added
- Waving Cell: Improved with higher temporal resolution (smoother at lower speeds) and added additional mode setting and optional blurring
- Julia: added blur option
- Squared Swirl: added fade option

- Added smearing option to:
    - DNA
    - DNA Spiral
    - Drift
    - Drift Rose
    - Crazy Bees
    - Ripple
    - Colored Bursts
    - Frizzles
    - Lissajous
    - Sindots
    - Spaceships

- Added palette support to:
    - Crazy Bees
    - Polar Lights
    - Drift Rose

- Changed default palette handling (no more special treatment for some FX)
- Merged puddles and puddlepeak
- Merged Gravcenter, Gravcentric, Gravfreq and Gravimeter (saves 1.2k of flash)
- Merged meteor and meteor smooth
- Renamed police_base into mode_two_dots as that was just an alias
- Added 'Traffic Light' palette (originally defined in Polar Lights FX)
-  Firenoise: removed local palette, use fire palette -> slight change in looks (+bugfix)
- Some code cleanup (removed unused / commented stuff)
- Moved dev info for AR to the top so ist easier to find as a reference, also added link to KB there
2024-12-20 14:13:53 +01:00
Damian Schneider 3323d2ed37 another merge fix 2024-12-20 09:37:41 +01:00
Damian Schneider 7b9b3f1ee2 merge fix 2024-12-20 09:12:20 +01:00
Damian Schneider cae98451e3 Merge remote-tracking branch 'upstream/main' into 0_15__speed_improvements 2024-12-20 09:12:01 +01:00
Damian Schneider 83da7569f5
code consolidation in drawCircle() (#4302)
- saves about 600bytes of flash
- speed tradoff: drawing is now a tiny bit slower but insignificant in my tests
2024-12-19 20:19:42 +01:00
Damian Schneider 26397ee8ad
Optimization: color_blend() (#4245)
Removing the bool saves on code size and makes the function a tiny bit faster. Also this is a cleaner solution IMHO.

-updated blend function to optimized 8bit calculation
- efficient color blend calculation in fews operations possible
- omitting min / max checks makes it faster on average
- using 8bit for "blend" variable does not significantly influence the resulting color, just transition points are slightly shifted but yield very good results (and better than the original 16bit version using the old fastled math with improper rounding)
- updated drawCircle and drawLine to use 8bit directly instead of 16bit with a shift
2024-12-19 18:20:56 +01:00
Damian Schneider dcfebcb973 allow for 0 value button code 2024-12-19 17:46:39 +01:00
Damian Schneider fd3b47908b renamed functions, changed timeout to 24ms 2024-12-19 17:41:44 +01:00
Damian Schneider e57c701837 fix for repeating glitch
glitch appeared every 65s due to missing uint16_t overflow.
2024-12-19 09:21:57 +01:00
Blaž Kristan b4aa8376de
Idle current bugfix (#4402) 2024-12-17 18:59:53 +01:00
Will Tatam 68b80cdadc Merge branch '0_15' 2024-12-16 13:12:38 +00:00
Damian Schneider 3261c5b071
replaced repeated progress() calculation calls with a variable (#4256)
progress() is called in setPixelColor(), calculating the transition progress for each pixel. Replaced that call with an inline function to get the new segment variable.
The progress is updated in service() when handleTransition() is called.
The new variable is in a spot where padding is added, so this should not use more RAM.
Result: over 10% increase in FPS on 16x16 matrix

* removed IRAM_ATTR: `updateTransitionProgress()` is called only once per frame, no need to put it in RAM.
* changed transitionprogress to static, private variable, this is now more aligned with other variables using the same logic
* added inline: the function is only used in one place
2024-12-15 13:46:18 +01:00
Damian Schneider e16d3bf040 Fix: output-glitching on ESPNow remote command reception
Processing of received button command is no longer processed in the callback, instead the value is saved to a variable and processed in the main loop.
The actual fix is to not access the file system while data is being sent out: even just trying to open a non-existing file causes glitches on the C3. Waiting for the bus to finish fixes this BUT it causes a frame-delay which is the lesser evil than random color flashes.
2024-12-13 07:40:04 +01:00
netmindz 2c58a87982
Merge pull request #4356 from blazoncek/json-cycle
Proper fix for #3605 & #4346
2024-12-12 15:53:03 +00:00
Will Tatam a705ae5278 Merge branch '0_15' 2024-12-10 22:12:02 +00:00
Blaž Kristan 1c220d25ca WiFi reconnect bugfix
- additional debug info
2024-12-07 16:47:50 +01:00
Blaž Kristan 039858dca2 Incorrect limit fix 2024-12-07 10:14:11 +01:00
Blaž Kristan 4758b5efe8 Proper fix for #3605 & #4346
- allow incrementing/decrementing as specified in API
2024-12-07 10:11:25 +01:00
Frank 36e065ab4d
Merge pull request #4336 from willmmiles/4280-limiter-not-saving
settings_leds: always initialize current limiter field (partly solves #4280 )
2024-12-05 13:40:14 +01:00
Damian Schneider 076497e14d Fix update for #4193 (twinkle fox & cat)
- previous fix worked but there was still an overflow after some time passed. there were still missing roll-overs apparently: reverting these two variables back to 16bit/8bit should fix it for good.
2024-12-05 06:54:30 +01:00
Will Tatam e8d9891d13 set version to dev 2024-12-04 18:57:32 +00:00
Damian Schneider 4902d7fb9e Fix for #4193 (twinkle fox & cat) 2024-12-04 17:10:44 +01:00
netmindz a873ca6a3e
Merge pull request #4244 from MoonModules/framerate_ac015
Improved framerate control code - strip.show(), strip.service()
2024-12-04 07:48:19 +00:00
Will Miles a86cb27cfe settings_leds: Init current limiter
Supersedes previous approach; this should use less space and be more robust to future changes.
2024-12-03 21:48:08 +00:00
Will Miles d620930f10 settings_leds: Remove unused variables
Remove a couple of leftover variables from previous revisions.
2024-12-02 21:52:41 +00:00
Will Miles 8db8ecfef3 settings_leds: Fix quotes on LA value 2024-12-02 21:50:29 +00:00
Frank ae8c3b02d0
blends FX - hotfix for black pixels
fixing an off-by-one error to solve #4335
2024-12-02 21:35:48 +01:00
netmindz 99427c2ef7
Merge pull request #4210 from 1Prototype1/dist-cpal
Added Distribute Horizontally for cpal
2024-12-01 19:09:34 +00:00
netmindz 334f16c0b6
Merge pull request #4203 from maxi4329/minor-webui-enhancements
minor webui enhancements
2024-12-01 19:03:36 +00:00
netmindz 7a80a772c1
Merge pull request #4270 from DedeHai/palette_code_crunch
Replaced single palette cases with an array to consolidate code
2024-12-01 19:02:28 +00:00
Will Miles 8b1d712e1e settings_leds: Initialize current limiter field
When adding a new bus, the numeric current limit field was not being
initialized; this was causing it to save 0 when saved instead of the
default 55mA value.
2024-12-01 13:00:37 -05:00
Will Miles a121f5b61b
Merge pull request #4286 from blazoncek/xml-bugfix
xml comma bugfix + few string optimisations
2024-11-28 09:48:29 -05:00
Frank 251062170e
Merge pull request #4324 from dosipod/0_15
Update settings_sec.htm [Fix the  warning text and Backup presets button misalignment]
2024-11-28 12:22:46 +01:00
Damian Schneider fa4c23b76e minor improvement 2024-11-27 22:23:48 +01:00
Damian Schneider a0a46850f5 Merge remote-tracking branch 'upstream/0_15' into 0_15_trig_math 2024-11-27 22:22:50 +01:00
Damian Schneider 4cd0563a93 changed 90° offset to hex, fixed potential bug in FX using sin/cos with incrementing number
- sin/cos calls with incrementing numbers can lead to bad outcomes, the functions (_approx or original sinf/cosf) return bad values for very large float inputs
2024-11-27 21:53:32 +01:00
netmindz b83f0f461c
Merge pull request #4263 from DedeHai/palette_FX_fix
fixed palette FX to more closely match original 1D version
2024-11-27 19:48:00 +00:00
netmindz 3668ede0ff
Merge pull request #4327 from willmmiles/4312-missing-clock
Fix missing clock setting introduce by #4312
2024-11-27 19:35:19 +00:00
netmindz 945584384a
Merge pull request #4328 from blazoncek/clarify
Fix for #4321 - unclear use of comma operator
2024-11-27 19:31:53 +00:00
Blaž Kristan b1dd27b516 Fix for #4321 2024-11-27 16:08:10 +01:00
Will Miles dcba1aad10 PolyBus: Clarify use of clock_kHz
While not used by most bus types, it's not an optional parameter.
2024-11-27 09:05:10 -05:00
Will Miles acc8b9cdbc BusDigital::begin: Pass clock rate argument
Fixes bug introduced by #4312.
2024-11-27 09:00:25 -05:00
netmindz f8a7a0d6e8
Merge pull request #4326 from blazoncek/com-fix
Fix for #4300 - removal of color order override
2024-11-27 10:01:22 +00:00
Damian Schneider 0a05611e1d more improvements to setPixelColor
- code is a bit cleaner and faster as well
- chaning array access to pointer access in bus_manager makes it a few instructions faster
- changed getNumberOfPins and getNumberOfChannels to return 32bit values, saving the unnecessary 8bit conversion
2024-11-26 20:59:36 +01:00
Damian Schneider 1a8aaa3b26 Speed improvements, commented legacy _t trig functions
- speed improvement: by default M_TWOPI is treated as a double float
- directly calling sin16_t in cos_approx() saves a lot of overhead
2024-11-26 20:32:39 +01:00
Blaž Kristan cd1c13b4b1 Fix for #4300 2024-11-26 19:35:15 +01:00
AlDIY d87c5035dd
Update settings_sec.htm 2024-11-26 19:33:22 +03:00
netmindz 0b54034470
Merge pull request #4284 from blazoncek/search-keep
Keep selected FX visible while searching
2024-11-26 09:10:14 +00:00
netmindz 8ad2583785
Merge pull request #4309 from netmindz/release-name-fix
Fix release name macro expansion
2024-11-25 23:00:56 +00:00
Will Tatam dd533a9ab4 Update sample WLED_RELEASE_NAME 2024-11-25 23:00:31 +00:00
Blaž Kristan 7236589037 Allow pre-compiled OTA password 2024-11-25 22:57:21 +01:00
Blaž Kristan 2c583c3071 Allow editing WiFi settings 2024-11-25 22:56:22 +01:00
Frank 5b989adebc
Allow TV Simulator on single LED segments
I've checked the code - nothing preventing the effect to run with SEGLEN=1
2024-11-25 15:27:53 +01:00
Blaž Kristan 855e606163 Fix 1st use 2024-11-24 17:17:17 +01:00
Will Tatam 20f8d3c8a9 Builds without WLED_RELEASE_NAME should be called Custom 2024-11-24 15:26:30 +00:00
Will Miles d53d7aa2e2 Defer calling begin() on digital buses
NeoPixelBus requires that all parallel I2S bus members be constructed
before any of them call Begin().  Implement this by deferring the
call to the end of bus construction.

Fixes #4301.
2024-11-23 12:34:06 -05:00
Will Tatam 6aef0e145c Remove TOSTRING for releaseString and add quotes to WLED_RELEASE_NAME 2024-11-23 16:31:07 +00:00
Blaž Kristan 4f1965fbaa Add ability to configure settings PIN at compile time 2024-11-23 11:24:03 +01:00
Damian Schneider 32dc54ce72 reverted rotation scale, offset only on static rotation, inverted shift direction
- inverting the shift direction in signed int is computationally safe as it is cast into an uint8_t and it matches the original FX in 1D
2024-11-22 08:43:45 +01:00
Frank 548736f432
SparkFunDMX fix for possible array bounds violation in DMX.write
Align with code in espdmx.cpp
2024-11-21 22:50:55 +01:00
Frank 6790f8af08
Same MIN_FRAME_DELAY=3 for -C3 and -S2 2024-11-21 22:16:03 +01:00
netmindz 89d587e7dd
Merge pull request #4296 from WouterGritter/mqtt-fix-settings-input-maxlength
Introduce printSetInputMaxlength to properly set an inputs maxlength …
2024-11-21 18:25:26 +00:00
Wouter Gritter 5c8b2ebf7a maxlength -> maxLength to fix this attribute not being modified correctly 2024-11-21 12:04:01 +01:00
Wouter Gritter 5ac8ba9bae Revert "Introduce printSetInputMaxlength to properly set an inputs maxlength variable"
This reverts commit 49fb16e2c6.
2024-11-21 12:02:55 +01:00
Wouter Gritter 8f8afd98a5 Replace comment with compile-time error and warning 2024-11-21 11:20:42 +01:00
Wouter Gritter 49fb16e2c6 Introduce printSetInputMaxlength to properly set an inputs maxlength variable 2024-11-21 10:52:22 +01:00
Wouter Gritter 0db47a8586 Add comment warning about modification of MQTT_MAX_TOPIC_LEN 2024-11-21 09:51:13 +01:00
Wouter Gritter cec8978886 Fix comment alignment 2024-11-20 12:45:39 +01:00
Wouter Gritter 0160e3fa87 Use MQTT_MAX_TOPIC_LEN in places where it was not used before to avoid buffer overflows when value is increased 2024-11-20 12:39:39 +01:00
Blaž Kristan c596b5a17d Bugfix 2024-11-17 14:31:23 +01:00
Blaž Kristan 84dd26c1b7 Some more optimisations. 2024-11-17 10:47:09 +01:00
Will Miles a765903a41 Fix array overflow in exploding_fireworks
Attempt to allocate enough room for the "minimum" sparks; and ensure
that we never overrun the allocated array size.

Fixes #4120
2024-11-16 17:10:30 -05:00
Woody 4d3df5d98f
Fix default/solid not being first 2024-11-16 20:12:29 +01:00
Woody 6fe2024542
move selected to the bottom in search result 2024-11-16 19:53:10 +01:00
maxi4329 7f69a0bc5e removed obsolete code as of #4267 2024-11-16 12:37:24 +01:00
maxi4329 5b829adedb Merge branch '0_15' of https://github.com/maxi4329/WLED into minor-webui-enhancements 2024-11-16 12:24:55 +01:00
Blaž Kristan 86be5df475 xml comma bugfix + few optimisations 2024-11-15 19:03:46 +01:00
Blaž Kristan 8c5e0cd4e9 Keep selected FX while searching 2024-11-15 16:01:58 +01:00
Will Miles ba01cb82f7
Merge pull request #4271 from Aircoookie/4269-crashes-when-using-http-api-within-mqtt
Fix for #4269
2024-11-11 19:53:06 -05:00
Will Miles 223b97b884 handleSet: Fix incorrect response generation
Don't generate a response if there's no HTTP request.

Fixes #4269
2024-11-10 19:30:01 -05:00
Damian Schneider d437027f26 Replaced single palette cases with an array to consolidate code
- all palettes are defined in palettes.h
- access to fastled palettes as an array to remove the switch cases
- palette createn in json.cpp in a loop instead of repeaded calls to save flash
2024-11-10 22:48:26 +01:00
Damian Schneider 536444f9d1 fixed palette FX to more closely match original 1D version
- rotation scale is now exactly 180° (divide slider input by 255 instead of 256)
- removed shift offset: offset is now zero at slider 0, to hit 128 on touch input devices is really hard
- added a 90° shift to input rotation, enabling to rotate from 0 to 180° instead of +90 to -90 (which is not useful in 1D)
- changed default settings values to more closely match the old 1D effect
2024-11-09 16:38:18 +01:00
Blaž Kristan ba5ec57e4d Enumeration support. 2024-11-09 11:33:10 +01:00
Blaž Kristan 9fa53ccf05 Large ledmap support
- add filtering support for readObjectFromFile()
2024-11-09 11:22:38 +01:00
Blaž Kristan 5c2bac4b9d Merge branch '0_15' into 0_15__speed_improvements 2024-11-09 10:53:27 +01:00
Blaž Kristan ef1e24cec2 Bugfix & code reduction
- correctly clear segment spacing change
- renamed Segment::setUp() to Segment::setGeometry()
- removed WS2812FX::setSegment()
- removed obsolete/unfunctional word clock usermod .cpp file
2024-11-09 10:42:49 +01:00
Frank 0404ec9881 changes in response to feedback from @willmmiles
* MIN_SHOW_DELAY -> MIN_FRAME_DELAY
* allow up to 250 for target FPS
* minor cleanup
* added specific MIN_FRAME_DELAY for -S2
2024-11-07 23:15:39 +01:00
Frank 1e761c31bd simpler hight FPS warning
* removed "use 0 for unlimited"
* added "high FPS mode is experimental" warning
* added "backup first!" warning
* added anchor #backup to sec page
2024-11-06 22:09:33 +01:00
Frank ab7b2d729e use class="warn" for unlimited mode message 2024-11-05 12:24:20 +01:00
Frank 029293a086 simplify sheduler logic
* _frametime ensures that effects are not serviced too often
*  MIN_SHOW_DELAY is the minimum allowed FRAMETIME that can be requested by effects
2024-11-04 20:11:10 +01:00
Frank cf1630a94a 0 FPS = unlimited 2024-11-04 19:49:43 +01:00
Damian Schneider 4634ace74e Added define for bitshift, removed dithering
dithering is not really needed, the FPS_MULTIPLIER is a much better option.
2024-11-04 19:33:42 +01:00
Damian Schneider 3733715184
bugfix
bitshift was still set from testing, forgot to update
2024-11-04 17:38:45 +01:00
Damian Schneider bf37ac53a3 improved FPS calc resolution, added averaging & multiplier compileflags
Fixed point calculation for improved accuracy, dithering in debug builds only.
Averaging and optional multiplier can be set as compile flags, example for speed testing with long averaging and a 10x multiplier:

-D FPS_CALC_AVG=200
-D FPS_MULTIPLIER=10

The calculation resolution is limited (9.7bit fixed point) so values larger than 200 can hit resolution limit and get stuck before reaching the final value.

If WLED_DEBUG is defined, dithering is added to the returned value so sub-frame accuracy is possible in post-processingwithout enabling the multiplier.
2024-11-04 08:10:05 +01:00
Frank 50934e6840 adressing some review comments
* keep FRAMETIME_FIXED as a fixed value
* remove WLED_FPS_SLOW and FRAMETIME_FIXED_SLOW
* explicit test "(_targetFps != FPS_UNLIMITED)" for debug messages
* don't modify _lastServiceShow in show()
* test for "fps == FPS_UNLIMITED" explicitly, so we could pick a different
 magic number later
2024-11-02 18:16:51 +01:00
Frank 70323b9477 rename delay -> frameDelay
Avoiding name collisions with the 'delay' function.
2024-11-02 17:50:30 +01:00
Frank 451cd4c74a Improved framerate control in strip.show(), strip.service()
* separate fps calculation (strip.show) from framerate control (strio.service)
* improved condition for early exit in strip.show
* make MIN_SHOW_DELAY depend on target fps
* strip.show consideres complete time for effect calculation + show; old code wrongly used the time between completion of last show and start of next effect drawing, causing unexpected slowdown
* add "unlimited FPS mode" for testing
* increase warning limits for "slow strip" and "slow effects"
2024-11-01 23:19:38 +01:00
Frank d98ca9a202 show correct flash mode in WLED_DEBUG 2024-11-01 21:51:46 +01:00
Frank 749d34cd30 pinmanager support for S3 WROOM-2 (pin 33-37 reserved for flash) 2024-11-01 21:31:57 +01:00
Blaž Kristan 6e89346f00 WLED 0.15.0-b7 release
- fix for #4172
- fix for #4230
- /json/live enabled when WS disabled
2024-10-27 18:47:10 +01:00
Damian Schneider 2703c9899a Bugfix in FX `ripple_base()` 2024-10-27 15:08:25 +01:00
Blaž Kristan 4cc2cc4ad4 Multiple fixes
- increase WLED_MAX_BUSSES for C3 (fixes #4215)
- fix for #4228
- fix for very long running effect (strip.now, strip.timebase)
- C++ API change to allow `seg.setColor().setOpacity()`
2024-10-26 15:16:11 +02:00
Svennte 832599b8c5
Fix alexa devices invisible/uncontrollable (#4214)
Fix for LED and Scenes uncontrollable using Alexa.
Weird behavior regarding to the device names and shared scenes fixed with this.

Seen in issue Aircoookie/Espalexa#228 and fixed from @ams-hh
Tested by myself and works just fine. Created second pull request here because the library seems to be a bit different from the official Espalexa repo.

---------
Co-authored-by: Frank <91616163+softhack007@users.noreply.github.com>
Co-authored-by: Blaz Kristan <blaz@kristan-sp.si>
2024-10-25 09:33:05 +02:00
Will Miles 19d837c222
Merge pull request #4222 from Aircoookie/esp8266-oappend-fix
Esp8266 oappend fix
2024-10-24 15:22:46 -04:00
Will Miles b3b326738c Fix incorrect SET_F calls
Replace with F() or PSTR() as appropriate.
2024-10-23 21:26:40 -04:00
Will Miles 2a094883ad Better oappend shim on ESP8266
Detect IRAM pointers if we can't be sure.
2024-10-23 20:01:42 -04:00
Will Miles 32eee3365a PinManager: Make in to namespace
Namespaces are the C++ language construct for grouping global functions.
2024-10-20 11:11:23 -04:00
Will Miles 95b4bde918 UsermodManager: Make into namespace
Namespaces are the C++ language construct for grouping global functions.
2024-10-20 11:11:20 -04:00
Frank 0a97e28aab bugfix: prevent preset loading from resetting other errors
without this fix, any not-yet reported error - like filesystem problems at startup, or out-of-memory - was rest by successfully loading a preset.
2024-10-19 18:43:10 +02:00
1Prototype1 4fa8a3898a Added Distribute for cpal
Added a button to distribute the color markers in palette equally
2024-10-19 00:30:24 +05:30
maxi4329 caa997fff1 removed onkeydown tried to find a replacement for the nbsp 2024-10-18 18:43:41 +02:00
maxi4329 bd68b977d5 minor webui enhancements 2024-10-17 18:07:01 +02:00
Damian Schneider 98a6907976 cleanup and improvement to sin_appros()
-replaced all PI references with M_PI version
-there is no need to do the angle-modulo in float, casting it to an integer does the same BUT it has to be cast to an `int` first, see comment.
2024-10-16 19:53:58 +02:00
Christian Schwinne e9d2182390
Re-license the WLED project from MIT to EUPL (#4194) 2024-10-16 00:07:19 +02:00
Damian Schneider 5e29f2c1b7 fixed atan2_t
approximation was incorrect, now doing it right.
also removed hypotf() from octopus, saving a little flash.
2024-10-15 20:11:33 +02:00
Damian Schneider 44e28f96e0 Fix for Octopus on ESP32 C3
Apparently the C3 can not convert negative floats to uint8_t directly, casting it into an int first fixes it.
2024-10-15 13:49:58 +02:00
Blaž Kristan a0e81da8c5
WLED 0.15.0-b6 release (#4180)
* modified Improv chip & version handling
* Update build and changelog
2024-10-14 20:13:59 +02:00
AlDIY 01e07ca0bc
Update xml.cpp 2024-10-13 20:34:18 +03:00
Frank 1468ee5fde
Merge pull request #4188 from LuisFadini/0_15_brt_timezone
Added BRT timezone
2024-10-13 11:01:05 +02:00
Blaž Kristan 49f044ecde Better fix for #4154 2024-10-13 10:43:56 +02:00
Luis 37f32ab197 Added BRT timezone 2024-10-12 10:56:40 -03:00
maxi4329 a60231ba59
Fixed the positioning of the "Download the latest binary" button (#4184)
* fixed the positioning of the download button

* fixed space after "Download the latest binary:" disapering after building

* fixed typo

---------

Co-authored-by: maxi4329 <maxi4329>
2024-10-09 22:10:59 +02:00
Blaž Kristan c8dafede6d
Merge pull request #4183 from PaoloTK/autosegment_outputs_flag
Add WLED_AUTOSEGMENTS compile flag
2024-10-09 22:00:12 +02:00
Blaž Kristan 210191b251 Fix for realtime drawing on main segment 2024-10-07 20:19:07 +02:00
Blaž Kristan 7deea9eb75 Minor button & rover CSS tweak. 2024-10-07 17:52:36 +02:00
Blaž Kristan 5e9a46d54d Fix for #4154 2024-10-07 17:15:35 +02:00
Blaž Kristan be64930ebb Indentation and shadowed variable. 2024-10-07 16:50:51 +02:00
PaoloTK 488974dd3e change flag 2024-10-07 10:39:45 +02:00
PaoloTK 5975b9125f add autosegment outputs compile flag 2024-10-06 22:56:30 +02:00
Damian Schneider f301296f1e added rounding to sin8_t
thx to @softhack007
2024-10-06 21:27:58 +02:00
Blaž Kristan 407477dc68 Fix for #4168
- set min value to 0 for disabled ABL
2024-10-06 15:42:58 +02:00
Blaž Kristan eb5ad232a0 Minor tweaks and whitespace 2024-10-05 23:31:31 +02:00
Blaz Kristan 1b0ce9a123 Fix for #4179 2024-10-05 15:00:58 +02:00
Damian Schneider 7b855c851d Added integer based `sin()/cos()` functions, changed all trig functions to wled_math
- `sin16_t() / cos16_t()` are faster and more accurate than fastled versions
- `sin_approx() / cos_approx()` are float wrappers for `sin16_t() / cos16_t()` and are accurate enough to replace `sinf()/cosf()`
- `atan2()` is used only in octopus to calculate center offset, new approximated version saves flash
- `tan(), atan(), asin(), acos(), floor(), fmod()` are used only for sunrise/sunset calculation, using wled_math version saves flash
- `beatsinx()` replacements are to make use of new `sin16_t()/sin8_t()` functions to reduce flash size
- Extensively tested surnise/sunset calculation: deviation is 1min. max
- Tested some of the relevant FX and found no visual difference: Julia, 2D Drift, Drift Rose, Ghost rider, Rotozoomer, Palette, Arc 1D expansion
- total flash savings: 7.4k
2024-10-05 12:32:41 +02:00
Damian Schneider ca062140f3 removed todo. 2024-10-03 19:39:39 +00:00
Damian Schneider a15c391e6c Improvement to `setPixelColorXY` and some flash optimisations
- changes to `setPixelColorXY` give an extra FPS, some checks and the loops are only done when needed, additional function call is still faster (force inlining it gives negligible speed boost but eats more flash)
- commented out the unused `boxBlur` function
- code size improvemnts (also faster) in `moveX()` and `moveY()` by only copying whats required and avoiding code duplications
- consolidated the `blur()` functions by enabling asymmetrical blur2D() to replace `blurRow` and `blurCol`
- compiler warning fixes (explicit unsigned casts)
2024-10-03 21:19:34 +02:00
Blaž Kristan ba636b17a0
Merge pull request #4175 from Xevel/fix_polybus_canshow
fix Polybus canShow
2024-10-03 16:19:44 +02:00
Nicolas Saugnier 949b9fb10e Fixed Polybus.canShow always returning true on ESP32 2024-10-03 15:21:39 +02:00
Nicolas Saugnier ae1b6af0d4 Indent formatting... 2024-10-03 11:07:58 +02:00
Nicolas Saugnier dd27504d30 Fixed Improv rejecting all properly formatted packets. 2024-10-03 11:04:47 +02:00
Blaz Kristan c30a08cfc5 Merge branch '0_15' of https://github.com/aircoookie/WLED into 0_15 2024-10-02 20:16:41 +02:00
Blaz Kristan a4c49aa35e Fix for #4005 2024-10-02 20:15:58 +02:00
Blaz Kristan ba3a61f623 Reduced code size by:
- removing WS2812FX::setMode()
- removing WS2812FX::setColor()
- removing floating point in transition
- color handling modification in set.cpp
- replaced uint8_t with unsigned in function parameters
- inlined WS2812FX::isUpdating()
- (MAY BE BREAKING) alexa & smartnest update
2024-10-02 20:14:25 +02:00
Frank 402fba734a
bugfix for holes in 2D DNA Spiral
Holes were visible at height > 32. Root cause: "lerp8x8" seems to be inaccurate --> replaced by a simple linear calculation.
2024-10-02 16:34:36 +02:00
Frank 262af0678f
colored burst effect bugfix (swapped XY dimensions)
fixing a bug where width and height got swapped (visible on non-square panels)
2024-09-30 18:35:14 +02:00
Frank 3765d558b6
akemi bugfix fix
map2 --> map
2024-09-30 18:26:00 +02:00
Frank 4ed8ded502
Akemi bugfix for panel width > 32
due to a math accident, Akemi did not show proper GEQ bands in its hands when width>32
2024-09-30 17:44:38 +02:00
Blaz Kristan ee380c5377 Replace uint16_t with unsigned for segment data
swap if statements in color_fade
2024-09-30 16:35:40 +02:00
Frank d3c401ed4e wu_pixel small optimization
5% faster
2024-09-29 19:29:12 +02:00
Will Miles cb8dae1ddb PWM: Revert always apply dead time 2024-09-29 10:13:19 -04:00
Will Miles 59deebc961 Improve PWM on ESP8266
- Better phase updates without dropping samples
- Make second pin duty cycle always after first, even inverted
2024-09-29 10:00:27 -04:00
Blaz Kristan 0ae73296cf Update comment 2024-09-29 15:19:37 +02:00
Blaz Kristan 8e78fb4caa Merge branch '0_15' into 0_15__speed_improvements 2024-09-29 14:31:00 +02:00
Blaz Kristan 336da25463 Private global _colorScaled 2024-09-29 14:14:07 +02:00
Damian Schneider ffbc8c5f70 Reverting addition of `bool unScale`, added new improvements and fixes
- Added pre-calculation for segment brightness: stored in _segBri. The impact on FPS is not huge but measurable (~1-2FPS in my test conditions)
- Removed `bool unScaled` from `setPixelColor()` function again (it has no/minimal impact on speed but huge impact on flash usage: +850 bytes)
- Removed negative checking in `setPixelColorXY()` and replaced it with a local typecast to unsigned, saves a few instructions (tested and working)
- Changed int8_t to int in `moveX()` and `moveY()`
- Removed a few functions from IRAM as they are now not called for every pixel but only once per segment update
- Removed a `virtualWidth()` call from `ripple_base()`
- Bugfix in `mode_colortwinkle()`
2024-09-29 13:55:00 +02:00
Blaz Kristan 10d8cfde85 Fix FX filter bug 2024-09-29 13:00:07 +02:00
Will Miles fe4b668107 Slightly reduce PWM jankiness 2024-09-28 23:12:03 -04:00
Will Miles cc87b32206 Support PWM phase shifts on ESP8266
Use the phase-locked soft PWM from the Arduino core to implement the
same PWM phase management as ESP32s are using.  The soft PWM code is
vendored in, as it was previously, to add the NMI workaround from #4035.

Completes #4034
2024-09-28 23:07:28 -04:00
Blaz Kristan 9114867578 Fix compiler error 2024-09-28 18:48:43 +02:00
Blaz Kristan c842994df5 Pre-calculate virtual
- move SEGCOLOR() to Segment class
- add SEG_H, SEG_W macros
- try to speed up virtualXxxxx()
- compile warning fixes
2024-09-28 18:14:43 +02:00
Damian Schneider 202901b09f bugfix, ESP32 compiler requires the color order to be identical 2024-09-28 15:38:41 +02:00
Damian Schneider 7c0fe1285a updated setPixelColor() and getPixelColor() functions
uint16_t to unsigned to make it consisten throughout the hand-down.
colorFromPaletteWLED now returns uint32_t which saves the conversion to CRGB and back to uint32_t (in most uses at least).
also added (preliminary) CRGBW struct. I tried to use it in place of uint32_t colors but it adds a lot of overhead when passing the struct so reverted to uint32_t in most places.
updated a few FX to use the CRGBW struct and also cleaned some code to improve flash useage.
2024-09-28 15:26:14 +02:00
Will Miles 9a4b56db6e Fix incorrect F-strings
A merge issue with end-oappend: some strings did not get correctly
converted from SET_F() to F(), which can cause crashes.
2024-09-27 21:06:21 -04:00
Damian Schneider a76a895f1d bugfix 2024-09-27 06:17:26 +02:00