Compare commits

...

4334 Commits

Author SHA1 Message Date
Damian Schneider
353868414a
Removed PS memory manager and some minor improvements (#4651)
* Removed memory manager from PS

- reverted all changes related to memory manager
- moved local buffer into effect data memory
- some RAM issues may occur on larger setups: tested on S3 it works fine up to 32x32 but runs into memory issues at 64x32

* fixed ifdef, improved readability, add optimize "o2" flags to improve speed

- added struct for x and y coordinates, thx to @blazoncek

* cleanup and minor improvements

- removed local buffer for ESP8266 in 1D system to save on RAM
- increased particle brightness in PS Impact
- minor tweak in collision binning (might improve speed)
- removed comments and some other unused stuff
- fixed a few compiler wranings

* fixed init sequence bug
2025-04-20 11:38:32 +02:00
Blaž Kristan
c661d8f5b7
Merge pull request #4627 from blazoncek/overlay-fix
Allow clock overlay to use LED beyond 255
2025-04-20 11:05:35 +02:00
Damian Schneider
02f14baad4
Updates to particle system (#4630)
* added Sonic Boom AR FX, some tweaks to Sonic Stream
* added white color option to Sonic Stream
* improvements to collisions (speed look-ahead)
* code prettified
* added "playful" mode to PS Chase plus some minor speed optimizations
* Adding new FX: PS Springy with many config options
2025-04-15 19:07:21 +02:00
netmindz
e979c58c98
Merge pull request #4609 from willmmiles/usermod-cfg-live
Use live cfg json instead of file for usermod settings page
2025-04-06 09:28:45 +00:00
Blaž Kristan
b941654a68 Allow clock overlay to use LED beyond 255 2025-03-29 23:39:47 +01:00
Will Miles
b0b3196e52
Merge pull request #4620 from gsieben/USERMOD-BME68X-Update-to-Version-1.0.2
Update USERMOD BME68X to version 1.0.2
2025-03-29 11:09:17 -04:00
Gabriel Sieben
7e87891701 Update USERMOD BME68X to version 1.0.2 2025-03-28 16:27:26 +01:00
Damian Schneider
e76e9a3e1f
Merge pull request #4594 from DedeHai/perlin_noise
Adding perlin noise replacement for fastled functions
2025-03-26 07:40:40 +01:00
Will Miles
36cb1cad36 settings_um: Use live config
Use json/cfg for the usermod settings page.  Should fix issues
with outdated content when a new firmware is loaded.
2025-03-23 15:20:16 -04:00
Will Miles
22e2b6f3c5 Have json/cfg return live config
Rather than reading the file off disk, have the json/cfg endpoint
return the live config from system state data.  This can improve
UI behaviour as it can never be out of date or include values that
do not apply to the current firmware install.
2025-03-23 15:18:08 -04:00
Will Miles
9c8f8c645e Rename 'doSerializeConfig' to 'configNeedsWrite'
Clarify the name and usage of this flag, as the function name has
changed out from underneath it.
2025-03-23 15:16:52 -04:00
Will Miles
e21a09cec9 Separate FS write from serializeConfig
Break the actual JSON assembly apart from the file writing code.  This
permits calling it in other contexts, allowing us to pull the live
config data even if the filesystem is out of date.
2025-03-23 15:15:52 -04:00
Will Miles
a0d1a8cbc4 Use enum class for json endpoint subtypes
Part of the ongoing quest to migrate macro definitions to typed
language constructs.  This actually yields a small improvement in
code size, likely from the byte->int conversion.
2025-03-23 15:08:12 -04:00
Blaž Kristan
86393e0b1d
Merge pull request #4608 from marcone/patch-2
Fix typo
2025-03-23 19:29:18 +01:00
marcone
f328713710
Fix typo 2025-03-23 11:11:34 -07:00
netmindz
ed6efe4c9e
Merge pull request #4551 from Brandon502/PinwheelRework
Pinwheel Rework
2025-03-23 09:29:54 +00:00
netmindz
befff2f034
Merge pull request #4605 from marcone/patch-1
Fix typo in build.yml
2025-03-22 17:55:15 +00:00
marcone
630315180d
Fix typo in build.yml 2025-03-22 10:28:38 -07:00
Blaž Kristan
a70bfa0c89 Merge pull request #4596 from Dschogo/patch-1
Fix wipe effect smoothness
2025-03-16 10:58:02 +01:00
Damian Schneider
d2b7e474d6 add legacy defines for compatibility, reverted test changes in rotozoomer 2025-03-14 06:48:18 +01:00
Damian Schneider
494b72c287 Merge remote-tracking branch 'upstream/main' into perlin_noise 2025-03-12 20:15:40 +01:00
Damian Schneider
229e7b940f added ranges, removed unused code 2025-03-12 19:58:32 +01:00
Damian Schneider
95dcb03f6d updated scaling 2025-03-12 06:56:33 +01:00
netmindz
a6d9a8220c
Merge pull request #4480 from willmmiles/usermod-libs
Convert usermods to static libraries
2025-03-11 22:37:36 +00:00
Will Tatam
0ba80ce61e Merge branch 'main' into usermod-libs 2025-03-11 22:31:52 +00:00
Will Tatam
7c23872e03 Add dmxInput.isConnected() 2025-03-11 22:31:19 +00:00
netmindz
507938be35
Update pr-merge.yaml - shell bash 2025-03-11 22:28:21 +00:00
netmindz
8bee304e4d
Merge pull request #4577 from DevJogger/main
Add apple-touch-icon Link Tag
2025-03-11 22:19:38 +00:00
netmindz
be239993f4
Update pr-merge.yaml 2025-03-11 22:15:48 +00:00
netmindz
f396dac1cc
Merge pull request #4266 from w00000dy/cdata
Migrate from inliner to web-resource-inliner
2025-03-11 22:14:03 +00:00
netmindz
ebba1f78ab
update secrets syntax for pr-merge action 2025-03-11 22:05:32 +00:00
netmindz
c8c3fc2bcc
Merge pull request #4591 from srg74/patch-4
Update README.md
2025-03-11 20:59:34 +00:00
srg74
14c6c05e00
Update README.md
Added record to change log according to latest update from @blazoncek
2025-03-11 16:24:55 -04:00
netmindz
3fbdd9635f
Merge pull request #4568 from blazoncek/multifix
Multifix
2025-03-11 08:34:23 +00:00
Blaž Kristan
d7be9c9a66 Address issues reported 2025-03-10 07:12:45 +01:00
Blaž Kristan
928c9fbacd Bugfix for #4590 2025-03-09 15:06:20 +01:00
Blaž Kristan
2b666ab9f7 Merge branch 'master' into multifix 2025-03-08 12:59:15 +01:00
Damian Schneider
4ecc531998 updated scaling, improved hashing, updated rotozoomer to not use a buffer 2025-03-08 12:48:27 +01:00
Blaž Kristan
b908384ba2
Merge pull request #4307 from blazoncek/compile-pin
Compile time lock PIN definition
2025-03-08 12:44:10 +01:00
Blaž Kristan
b27a4a94e4
Merge pull request #4529 from blazoncek/unlimited-bus
"Unlimited" buses
2025-03-08 12:43:25 +01:00
Damian Schneider
5e8073022b 3D works but needs finetuning to match old looks 2025-03-07 06:39:49 +01:00
Damian Schneider
9553425374 some speed improvements using better hash, scaling is still off...
needs a proper scaling analysis of all steps in all resolutions to minimize errors.
2025-03-04 07:55:41 +01:00
Damian Schneider
2012317bc9 initial version, basically working but repetitive patterns, work in progress 2025-03-03 06:57:16 +01:00
Will Miles
18a118bb7a Update platformio version
There is a necessary LDF fix in 6.1.17.
2025-03-01 20:53:43 +00:00
Will Miles
e00789f838 Merge remote-tracking branch 'upstream/main' into usermod-libs 2025-03-01 20:32:12 +00:00
Will Miles
20563e6306 usermod/Temperature: Update doc 2025-03-01 20:29:59 +00:00
Will Miles
580c2d8213 usermods/MY9291: Enable for ESP8266 2025-03-01 20:29:37 +00:00
DevJogger
c9b8789ea9 Reduce apple-touch-icon image size 2025-02-28 18:47:32 +00:00
Blaž Kristan
4271588ecd unique_ptr fix 2025-02-25 16:06:13 +01:00
Blaž Kristan
a5277ff4a0 Merge fix 2025-02-25 16:01:30 +01:00
Blaž Kristan
a66f5d660d Merge branch 'main' into unlimited-bus 2025-02-25 13:54:42 +01:00
Brandon502
80061e8d76 Pinwheel: Use sin/cos16_t 2025-02-24 21:51:49 -05:00
DevJogger
d07a057f04 Add an apple touch icon for better recognition on the home screen of Apple devices 2025-02-25 01:13:22 +00:00
netmindz
fa2949af7d
use npm ci 2025-02-22 17:39:00 +00:00
netmindz
a4680b7216
Update nightly.yml 2025-02-22 17:27:28 +00:00
netmindz
523eb910a6
Update nightly.yml 2025-02-22 16:43:09 +00:00
netmindz
2f21de79f7
Create test.yaml 2025-02-22 16:41:29 +00:00
netmindz
092d402ff8
Update nightly.yml 2025-02-22 16:38:18 +00:00
netmindz
12e8d6c4c6
Update nightly.yml 2025-02-22 15:20:23 +00:00
netmindz
8c1486d577
Update nightly.yml 2025-02-22 15:13:37 +00:00
netmindz
57e9199baa
Enable dispatch with PAT 2025-02-22 15:02:45 +00:00
netmindz
f4aac0bd8d
use onlyLastTag rather than hard coded lastTag 2025-02-22 14:49:01 +00:00
netmindz
664150811a
Generate changelog 2025-02-22 12:00:16 +00:00
netmindz
3cb4ae16ab
Create pr-merge.yaml 2025-02-22 10:21:19 +00:00
Damian Schneider
73fc9ea54d
Merge pull request #4543 from DedeHai/soap-FX-optimization
Soap FX optimization
2025-02-22 08:43:01 +01:00
Blaž Kristan
dd80919ed6
Merge pull request #4429 from blazoncek/use-bssid
Add ability to enter desired BSSID
2025-02-19 13:46:49 +01:00
Blaž Kristan
d7103cd75c
Merge pull request #4262 from blazoncek/large-ledmap
Large ledmap support
2025-02-19 13:43:52 +01:00
Blaž Kristan
29beee367c Cherry-pick fix 2025-02-19 12:27:10 +01:00
Blaž Kristan
d22fe9227b Prevent push transition if effect stays the same 2025-02-19 11:56:37 +01:00
Blaž Kristan
6ea9535463 Avoid shadowing global col[] 2025-02-19 11:54:03 +01:00
Blaž Kristan
bbd1b730b1 Add simulation modes (bugfix) 2025-02-19 11:52:58 +01:00
Blaž Kristan
6e138e4f79 Clarify use of index counter 2025-02-19 11:52:14 +01:00
Blaž Kristan
d6453bb53d Use constant CALL_MODE_INIT 2025-02-19 11:47:55 +01:00
Blaž Kristan
9bfd34e6b2 Rework color_from_palette()
- respect paletteBlend
- bugfix in ColorFromPaletteWLED()
2025-02-19 11:47:13 +01:00
Blaž Kristan
7b13771cfe Bugfix in settings 2025-02-19 11:42:00 +01:00
Blaž Kristan
b70b222f80 Replace magic with cosntant 2025-02-19 11:39:48 +01:00
Blaž Kristan
2ffc8dd228 W Hex entry bugfix & optiisation 2025-02-19 11:36:48 +01:00
Blaž Kristan
08d12f9ee6 Shifting bugfix & size tuning in fade_out 2025-02-19 11:35:51 +01:00
Blaž Kristan
7ce96c190f Manual advance playlist 2025-02-19 11:34:29 +01:00
Blaž Kristan
409b4b1963 Clear spaced segment
- also wait for strip before updating segment
2025-02-19 11:32:21 +01:00
Blaž Kristan
05cd7d753e Bugfix for color_blend 2025-02-19 11:26:51 +01:00
Blaž Kristan
7be460e8b1 Incorrect limit fix 2025-02-19 11:23:23 +01:00
Blaž Kristan
6dfbd07e86 retrun value fix 2025-02-19 11:21:17 +01:00
Blaž Kristan
7b56e53c47 Nested playlist 2025-02-19 11:19:59 +01:00
Blaž Kristan
a8cde3289a Minor speed & size tweaks
- new function fadeToSecondaryBy()
2025-02-19 11:13:52 +01:00
Blaž Kristan
f4e7202dd0 UI info 2025-02-19 11:12:12 +01:00
Damian Schneider
a2de3d33bf
intermediate fix for transition speedup (#4562)
- fixes FX speedup in fade transitions but its not a proper solution
2025-02-17 19:32:43 +01:00
Damian Schneider
46a3e3d353
Adding Particle System with many new FX (#4506)
* cleanup

* added collision handling back in

update from another commit that got lost

* reformat

* added latest version of functions

this somehow also got lost from an earlier commit

* Update platformio.ini

* updated particle box and firework effects

particle box now is more random in random mode (still a work in progress)
firework is now more configurable by sliders

* added preliminary functions and FX

* added particle attractor, added two new FX but still buggy

particle attractor animation does not work, somthing wrong with pointer allocation, it worked with static variables

* bugfixes, attracot now works

still unknown, why more than 256 particles are needed in memory allocation to not make it crash, but it works for now

* added angle emitter, added fireworks effect using it

* Added saturation to be set for each particle individually

at the expense of more ram usage, animations now have more options for color control (already used in fireworks now)

* bugfixes in impact animation

* added option to use fast color add, may improve performance a little

also fixed a bug in fire animation

* collision detection is now a function plus some improvements & fixes

* improved collision efficiency

improved efficiency for stackup (pushback), added code to correctly determine direction if particles meed (probably overkill but now its there)

* added fix for piling oscillations

untested, need to verify it works

* Improved collision handling (faster, less oscillations), changed variables to 32bit for faster calculation

32bit variables are faster on ESP32, so use them whenever a variable is used a lot, it saves one instruction per access.

* removed option for fastcolor add

it made very little difference in performance, but for ESP8266 it may matter so it is set permanently there. graphically the difference is also very small (sometimes a particle gets brighter or less saturated)

* Fixed some bugs in particle system, runs much smoother now

also tweaked some of the FX

* Bugfix in particle push, now piling is working again

particle pile-up did not work correctly, now fixed

* changed particle pile demo into waterfall plus some tweaks

* lots of bugfixes

* updated particle attractor animation parameters and added more user options to perlin noise

* removed TODOs

* added particle WrapUpdate function, added spray FX, some bugfixes

* fixed touch buttons for ESP32 S2 and S3

touch is implemented differently on S2 and S3, these changes make touch buttons work on S2 and S3

* some tuning for touch buttons on S2/S3

now better fits the default threshold value of 32

* updated rotating particle spray with more user options

* chaned rotating spray default parameters

* add todo

* Revert "some tuning for touch buttons on S2/S3"

This reverts commit d21ad8e7d1651a96f879d43ef1146a72a6ed8271.

* Revert "fixed touch buttons for ESP32 S2 and S3"

This reverts commit 09041551862361cd8c7444ca25403f5f96a9077b.

* removed comments, added comments

* cleanup

-removed wrap_update function, now integrated into move_update
-added more 'out of bounds' checking in fire functions, may speed it up a little

* cleanup session

-removed particle box 'rocking boat' (buggy) and replaced with random sloshing.
-removed comments
-changed some variables into 32bit for speed boost on ESP32
-added link to KB at the top of FX.cpp

* cleanup

removed / added comments

* added particle GEQ effect (untested)

* Particle GEQ fixes, it now actually works

* GEQ  FX parameter tuning

* added rotating GEQ, work in progress

-animation works but sliders are too sensitive. need to adjust the ranges

* FX update

- changed firework exhaust to low saturation
- updated rotating particle spray animation

* Cleanup & Bugfixes plus major improvements for ESP8266

-added particle reductions for ESP8266 for all FX
-Removed collisions from Particle Perlin Noise FX, slows things down and does not contribute to a better effect experience
-lots of optimizations for ESP8266, all FX now work (at least on 160MHz but still slow)
-Some bugfixes
-removed unused variables to make compiler happy

* Particle FX Rename, default parameter tuning, bugfix

-Now shorter names, 'PS' in front to filter the list
-Tuned default parameters to make them look better by default
-Bugfix in particle system (removed duplicate application of velocity)
-reduced PS fire RAM usage (less particles, less base flames, no noticeable difference)
-some variable renaming

* slight speed improvements in fire, like 1-2FPS

* Big update: lots of little fixes and big speed boost on fire animation

-fixed fire burning more on the left side
-fixed crash in particle attractor
-added many improvements for ESP8266
-improved particle rendering efficiency
-efficiency improvements in general
-changed the way fire is rendered, now more than 2x faster
-re-tuned fire to new rendering, also seperately tuned it for ESP8266
-changed all random8() to random16() as it runs faster on ESPs
-some reformating
-some renaming of effect stuff
-fine tuning on falling particle effect
-improvements to collision handling (faster and better)
-added a (temporary) function for speed tests, will be removed again

* bugfix

* updated PS Fireworks with many changes and fine-tuning of parameters

-removed spiral explosions
-added more versatility to circular explosions
-removed user selectable amount of rockets
-tuned explosion size of circular explosions to match random explosions (more or less, may need improvement)
-changed order of sliders in volcano animation

* put particle system in a class. work in progress.

another huge update to the particle system.
went through the whole code, rewrote many of the functions. many improvements over the previous code. fixed many bugs (and even an ancient one in rendering function). spent many hours optimizing the code for speed and usability.
still a work in progress, debugging is ongoing. more updates to come.

* many (many!) bugfixes, added fire FX back in (and improved it a lot) added local renderbuffer for huge speed boost

-lots of bugfixes in Particle system
-added local rendering buffer (renders to buffer in heap)
-added fast and accurate color-add function
-bugfixes in render function
-added improved 'sticky' particles in collision (unfinished business)
-added ballpit animation back
-lots of tweaks to fire FX and fire rendering functions, looks even better now (still unfinished)
-added palette render option to fire

still many debug print outputs around, needs cleanup at one point

* More Bugfixes, more converted FX

* more bugfixes, some animation tuning, added volcano back in

- fixed animation transitions with proper pointer setting in each FX call
- added color by age setting to particle system
- maybe fixed collision having a tendency to go to the left
- fixed bugs in fireworks FX
- added fire spread width as a slider
- changed max number of particles and sprays based on some ram calculations
- some other random fixes

* updated fire, added some functions to PS, ported attractor FX

- added turbulance to fire (after hours of fine-tuning) it now looks even more awesome
- added attractor animation back in and improved it with more functionality
- fixed the attractor function in the PS
- renamed FX: 'candy' is now called 'vortex'
- added new force function to apply a force immediately (and handle the timing in the FX)
- added update function to PS for size update to handle dynamic segment size change
- made waterfall width dynamic on segment width
- removed some debug stuff
- added #defines for maximum number of particles/sprays
- updated fire parameter to make it look better on ESP8266
- some little bugfixes

* another huge update, many improvements, fine-tune collision, fire and some other FX

-removed classic fire render as palette now looks much better
-tweaked fire parameters to more awesome
-added (optional) turbulence to fire using perlin-noise
-ported spray FX to use PS-class
-now definitely fixed asymmetrical collision issue: do not use bitshifts on negative numbers!
-changed piling behaviour of particles, full rework. looks way more natural now and works much better
-changed bouncing behavour: they now bounce at full diameter, making them stay fully in frame when laying on the floor
-replaced all relevant bitshifts with divisions for higher accuracy throughout the PS
-added new modes to particle box FX
-changed a lot of FX parameters (finetuning)
-changed all config strings to proper settings (matrix only)
-fixed newly introduced bugs
-added speedup/slowdown to vortex FX (aka candy, aka rotating sprays)
-some renaming
-fixed bugs… lots of bugs
-merged rendering functions, removed obsolete stuff

* Fixed Speed limit

limiting speed was incorrect, leading to overflows. fixed this.
also fixed bugs in GEQ, removed some debug stuff, added FPS limit to fire (just en experiment)

* work in progress, added motion blur and line attracto (non working)

* work in progress, added test function to increase particle size, also added wobbling test

* added more tests, non compiling at the moment

* in the middle of fixing FX to use new PS functions

* debugging going on

* bugfix in wrap function and firwork FX

* added local render blurring, boosting FPS, work in progress

- changed fast-add function to use pointers
- added fast-scaling function
- added simple (but fast) 2D blurring function
test shows that local blurring of full frame is almost double the speed (40FPS now is 80FPS).
lots of comments still there

* Bugfixes, improvements and added wall roughness setting

- fixed bug in PS fuzzy noise which made it asymmetric for some reason, seems to work better now
- added particle size option to attractor but had to remove speed setting (now fixed emit speed)
- some parameter tuning of FX
- improvements to code size in render function
- added smear option to blurring (not tested much, may be buggy without smear)
- speed improvement to caldForce_dv, added zero checking.

* removed zero inits

- removed zero initialisations in FX, segment.data is set to zero by alloc function

* added individual size particle rendering plus some fixes

- advanced particles can now be rendered to individual sizes. It is computationally intensive but it works well for up to 15 very large particles and more smaller ones
- added collision handling for individual sizes (walls and collisions)
- fixed bugs in particlebox
- fixed fire not transitioning properly (flickering) when frame skip is active
- removed 'wraparound' function as it can easily be done by casting to an unsigned and then modulo
- fixed ballpit particles wandering left and right very fast if wrapX is set

* Fixed some nasty memory bugs, fixed some FX parameters

- fixed memory alignment bug in PS pointer assignment by making sure only multiples of 4 are allowed for particles and sources
- added saturation back to particle struct, as it was aligned to 10 bytes anyway.
- fixed a bug where a null pointer could be accessed
- fixed rendering out of frame particles if buffer allocation failed
- improvements on ESP8266

* Replaced Ghost Rider FX with PS version

- new FX is kept close to original animation but added more user settings

* added walls to ghostride, fixed some bugs

* added 'perpetual' flag to particles

* Fixed another memory / pointer bug, but there is still one left...

-also some minor fixes

* Found and fixed crashes, it was wrongly assigned pointers

* Added advanced particle size control and new Blob FX

- advanced size control allows for growing, shrinking, wobbling
- render function updated to support asymmetric rendering
- various code improvements and bugfixes
- some FX parameter tuning
- bugfix: removed sli() sei() calls in render function that caused random flickering on S3/C3 (may add that back in but only for ESP8266 to reduce fragmentation)
- removed some debug / test stuff

* code cleanup, removed some unused stuff

* bugfix, sprayEmit() would not return and get stuck

- forgot default return value...

* remove esp_random() as it is not supported on ESP8266

* small bugfix for ESP32, cleanup / reformatting

* added WLED_DISABLE_PARTICLESYSTEM option, fixed volcano movement

use '-D WLED_DISABLE_PARTICLESYSTEM' to disable compiling

* a line got lost in the last commit

* - added WLED_DISABLE_PARTICLESYSTEM option & cleanup & bugfixes

- cleanup / reformatting
- fixed volcano movement
- small bugfix for ESP32 (random() does not work, using random16() )

* Added PS source option to emit more than one particle, addes AR to Blobs and Spray

* added center GEQ back in, changed AR behaviour of spray a little

center GEQ is a mix between the PS equalizer and vortex, tuned for AR. some more tuning may be needed, it can probably be extended and improved a little.

* Bugfix and minor improvements

- fixed bug in center GEQ
- added '2D washing machine' mode for particle box
- improved color-change rate in ghostrider
- added AR to attractor (experimental, may remove again)

* hacked in a 1D port of the 2D PS, untested code

* fixed first bugs in 1D system, added test FX

* fixed bug in wrapping (also was wrong for 2D system)

* fixed collisions, added bouncing ball replacement (work in progress)

* replaced more FX, some tweaks to 1D PS

- changed virtual particle size from 64 to 32, making them able to move faster
- added 'rolling balls' option to bouncing balls (i.e. no gravity plus some tweaks)
- added dancing shadows with PS (work in progress)
- temporarily removed native FX: bouncing balls, rolling balls, popcorn, dancing shadows
-and of course some bugfixes

* updated dancing shadows to more closely mimic original

* added drip FX, added #ifdefs, removed some common functions

#ifdefs to individually disable 1D and 2D system.

* fixed compile issue, removed replaced FX (again)

* added Fireworks1D replacement (unfinished)

also fixed a bug in `applyForce()` using uninitialized variable.

* added sparkler and hourglass (both work in progress) tried fixing 1D collisions

* many improvements in 1D collisions (fine tuned), hour glass FX is almost done

spent A LOT of time in fine-tuning collisions for best stacking without collipsing, ringing, oscillations or particle flips. still not perfect but probably as good as it can be with the limited time-resolution

* many bugfixes in PS and FX

* minor FX adjustments

* Improved 1D collisions, added 2 new 1D FX (work in progress)

* bugfixes

* added 'color by position' as a PS setting

 -made settings struct for 1D and 2D version to be different
 -added setting 'color by position' as that is used by multiple FX now

* added large size rendering to 1D PS, work in progress

* bugfix (forgot to free memory)

also: made random size a permanent option in 1D fireworks as it looks kind of cool

* Added PS based Chase, fixed some bugs

* minor update

* two new FX: Starburst and 1D GEQ

* Added more advanced (and proper) size handling in collisions, work in progress

 - copied and adapted some stuff from 2D system (out of bounds size rendering, dynamic collision detection distance, dynamic wall bounce distance)

* fixed some parameters in 1D FX

* added #ifndef to disable FX replaced by PS

- define DISABLE_1D_PS_REPLACEMENTS or DISABLE_2D_PS_REPLACEMENTS

* bugfixes

* default parameter change

* explicit cast to fix compile error

* Bugfixes

* added color-waves to PS chase, some parameter tuning plus bugfixes

* FX update and bugfixes

- fixed wall collisions on larger particle sizes
- update to bouncing balls:
 - added size setting
 - added proper updating on parameter change
 - bugfixes
added support for 'colorwaves' and 'pride' to PS Chase to save on code size. currently broken...

* minor update to rolling balls, fixed stuff in Chase, pride option still not working

* update on 'pride' now working again but needs finetuning

* SEGMENT -> SEGENV on data, aux0, aux1, step

also removed debug outputs

* added pride and colorwaves to 1D replacement list

* removed unused variables

* added variable to set number of particles if not all are required (saves ram) also fixed a nasty render bug

* added preliminary 1D fire function, unfinished

* added fractal FX test, fixed bugs in emit function

* tweaked 1D fire a little, still work in progress

* minor tuning on 1D fire to avoid 'oscillation' at start

* improved 1D particle fire, much more natural now.

* updated 2D fire, fixed init bug

- source init was wrong making fire init weirdly
- changed parameters on 2D fire making it look better and improving flame height for larger setups

* fixed 'nervours' fire

* slight improvements and some cleanup

* removed douplicate code for fire emit (tradeoff for some speed), removed unfinished fractal FX

- with the duplicate code removed, the fire particle emits are a bit slower but it saves on code. it is not really noticeable, its slower by about 1FPS

* Re-license from MIT to EUPL

* Started cleanup, speed improvement to rendering, renamed class

- removed 'smar' parameter in blur functions as smear is always used
- improved particle rendering (passing by reference, passing wrap parameters for faster access)
- renamed class to ParticleSystem2D
- removed some whitespaces
- some reformating, removed some comments
- minor tweaks
- removed non-working line-attractor function

* Optimization and bugfixes

- added out of bounds checking function
- fixed rendering at boundaries
- various small changes and cleanup
- bugfixes with comparing ints of different signeness
- fixed bounce radius

* Cleanup, bugfixes, speed improvements, refactoring

- lots of code refactoring / reformating
- fixed bug in fire particle update and improved speed a bit
- refactoring of pixel rendering
- removed 2D buffers, replaced with 1D buffer for faster access
- bugfix in blur2D
- many small improvements to 2D system

* Refactoring and cleanup of 1D PS, removed debug printouts

- code reformating for consistency and readability
- replaced "'?" operator with min / max (produces the same code, more readable)
- minor changes for speed (random16 used, can later be replaced with hardware random function)
- renamed PS Equalizer to PS 2D GEQ

* Cleanup and some refactoring of particle FX

- moved 2D / length check to PS initi
- code reformating
- removed some comments

* missed a spot

* minor tweaks to fast_color_add()

* Work in progress: update to fireworks, needs more testing & finetuning

also bugs fixed and some minor cleanup

* Work in Progress: added particle memory manager for transitions

- uses only one, persistant buffer to render all present particle systems
- Buffer for particles is shared for one segment (may allow interacitng systems in the future)
- updated some of the FX to handle the new transfer, 1D FX still not done
- updated parameters for particle impact FX

* work in progress: lots of changes & fixes, transitions now work correctly in 2D

- still fragile code with lots of cleanup to do

* added transitions for big-size rendering

- transitions now work with FX that use global large size rendering. this is done by handling the buffer correctly. to avoid creating a second buffer, it is transferred back and forth to the segment. this is a bit slow but a compromise solution.
- multiple segment handling is still untested

* speed improvement to  fast_color_add, added preliminary buffer transfer function

* merge fixes

* bugfix in setCurrentPalette, corrected order of 2D memory allocation, increased max particles/sources

- fixed timing for vortex

* fixed particle buffer handover, added 2D blur option, increased particle limits, various fixes

- fixed bug in memory watchdog, now works and also works when freezing segments
- fixed PS Box to work again with particle handover
- added smear blurring to waterfall
- added smear blurring to vortex, fixed color distribution, removed random color distribution option
- replaced all random() calls with hw_random()
- transitions now work but only if FX transitions are enabled and not when chaning segment size

* implemented correct 1D<->2D buffer handover+bugfixes

work in progress

* added smear to fuzzy noise, some cleanup

* added blurring option to PS 2D fireworks, work in progress in finding that nasty bug that crashes all

* BUGFIX: finally found and squased the memory bug, no more random crashes

also: removed debug outputs and minor cleanup

* minor cleanup and fixed a bug

1D system had a lot of crashes, some out of bounds memory issue. fixed it but I have no idea which change did that, maybe the order in 1D initialization

* BUGFIX: out of bounds checking was wrong, leading to crashes

* better handling of used particles in transitions

for FX that do not use all particles, transitions were constantly shifting the pointer, resulting in newly generated particles and weird particle flickering, this is not fixed by keeping the pointer constant once the number of used particles is reached.

* improved particle transition for low-count FX, updated 1D FX

now most 1D FX work again, still needs some fine-tuning

* Rework on Fireworks 1D, some minor fixes

- fireworks 1D now matches as closely as possible to the old FX
still not identical but as good as it gets.

* bugfix in PS Chase, increased brightness of 1D fireworks

* replaced sin16/cos16 with new versions

* bugfixes

* fixed hourglass init, rearranged PS FX init

* speed optimization

- moved out of bounds calculation to proper spot
- removed repeated allocation attempts if initial buffer alloc fails

* Added Sonic Stream FX, some cleanup, bugfix in emitter

* changed TTL to brightness calculation, added collision binning

- brightness is now doubled as some FX were really dim due to low TTL
- added binning in x-direction giving a huge speed advantage on larger matrix sizes

* collision binning bugfix, made particles less sticky, update to waterfall

- updated waterfall intensity and blurring

* WIP: fixed 1D system for over 1000 pixels, added collision binning for 1D

- making x coordinate 32bit allows for larger strips but uses a lot of ram due to struct memory alignment (12bytes instead of 8 bytes), this needs some more work to properly fix.
- adding collision binning significantly speeds things up, about a factor of 2 on most FX using collision
- there are still some bugs in FX or 1D memory handling (or both) on large setups

* moved particle flags to seperate array to save on RAM, refactoring

- moving the flags optimizes ram alignment, saving memory for each particle
- changed lots of parameters to `const`
- moved fire intensity to a variable instead of passing it to every render() call
- changed passing pointers to passing reference where possible
- saves a total of 340 bytes of flash

* removed todos after some checks, minor improvements

* inverted y axis in 2D render, 1D collision improvements, cleanup and fixes

- inverting the y-axis in the buffer instead of in buffer transfer fixes the FX flipping when transitiononing 1D<->2D
- improved particle binning for collisions
- added hard-pushing also when not using gravity so piles close to an edge dont collapse
- some improvments to "balance" FX
- renaming and cleanup

* FX fixes and minor tweaks

* increased min rockets

* fixed #ifdefs

* another fix

* revert unnecessary changes to base code

* merge fix

* minor tweak

* tweaked sparkler FX, some cleanup

* Fix in volcano FX, changed blurring of volcano and waterfall

* added ifdefs

* minor tweaks, increased 1D minsurfacehardness

* improved sparkler FX, made overlay possible (1D not yet), cleanup

* cleanup, now using new hsv2rgb/rgb2hsv, add overlay rendering to 1D

- new hsv2rgb is a tiny bit faster
- removed redundant code (using transferBuffer instead)
- tweked parameters in vortex, removed unneeded slider defaults

* fix for non or partially overlapping segments

- can not use overlay rendering if no segment clears the buffer, it will all add up to white eventually
- now additive transfer i.e. overlay mode is only activated if the segment is fully overlapping an underlying segment

* change got lost...

* increased sparkler intensity, some cleanup

* replaced #ifdefs, removed 1D replacements that have 2D version, removed notes

* cleanup, improvements to PS bouncing ball, replaced multicomet

- bouncing balls is now named pinball and has settings/parameters updated to be a replacement for multicomet

* cleanup, improvements, bugfixes

- large size rendering now works without framebuffer
- background adding is now done on buffer (if avilable) instead of segment
- fixed overflow bug in 2D large particle rendering (it worked only for powers of 2 size)

* potential bugfix, compiler warning fix

* removed colorwaves and pride option from chase (not worthy replacements)

* updated #defines, removed PS from 1M and 2M builds

* Adding Particle System and PS FX

Adding all 187 commits from particle system dev branch

* reverted some accidental changes

* reverted some accidental changes

* merge fixes

* changed replacement: multicomet instead of comet (lighthouse)

* changed replacement: multicomet instead of comet (lighthouse)

* disable 2D PS for ESP8266, some cleanup, improved pinball FX parameters, bugfixes

* Improved collision binning for large particles, improved pinball FX

* improved speed handling in pinball FX - rolling

* disable 2D PS for ESP8266, some cleanup, improved pinball FX parameters, bugfixes

* improved hourglass: millis instead of frame timing, better stacking. and cleanup.

* revert whitespaces

* simplified 1D collisions, improved binning for larger particles

- ran a lot of experiments with collisions in 1D, the new much simpler approach seems to be a good compromise with regards to stacking and normal collisions.

* Improved collision binning for large particles, improved pinball FX

* improved speed handling in pinball FX - rolling

* improved hourglass: millis instead of frame timing, better stacking. and cleanup.

* revert whitespaces

* prohibit use of 1D and 2D system simultaneously on ESP8266

* prohibit use of 1D and 2D system simultaneously on ESP8266

* update to handle blending styles

* fixed bugs, improved new transition handling

* updated 1D system to work with new transitions, replaced NULL with nullptr

* merge fixes

* added single pixel particle rendering for 2D system, adjusted FX to work with it

* improved collisions in 1D and 2D, some bugfixes in radius calculation, minor tweaks

- collisions are now also velocity based in 1D, there was a bug that prevented that from working well (wrong collision distance calculation)
- improvement and bugfix in 2D collision distance calculation
- added distance based pushing in 2D (instead of only using the dotproduct)
the combination of improved distance calculation and proper pushing make collisions a lot better in all tested FX

* minor fix

* fixed overlay detection, checking for partial overlay

if a PS FX is partially overlapping, it will render in overlay mode

* better blur range in PS Firworks

* minor code consolidation

* updated 1D collisions (yet again), improved 2D collision speed

- slight improvement to 2D collision code efficiency
- added faster "division" to C3/ESP8266 by using a right shift trick (biasing towards 0 also for negative numbers by applying proper rounding)

* minor tweak in PS balance
2025-02-17 18:32:12 +01:00
netmindz
756e27fb52
Disable notify - pending permissons fix 2025-02-16 14:02:06 +00:00
netmindz
1d6e5a2464
notify on nightly 2025-02-16 13:17:40 +00:00
netmindz
dc77428df4
Notify on daily 2025-02-16 13:17:03 +00:00
Will Tatam
b293356cec Revert "Disable changelog while fixing release update"
This reverts commit 1fd703aff9658ad3edeb548822f9fc4529d80137.
2025-02-16 10:53:19 +00:00
Will Tatam
1dc7647bb9 Merge branch 'main' into usermod-libs 2025-02-16 10:40:30 +00:00
netmindz
c3f6537a4d
Merge pull request #4558 from DedeHai/wifi_hardware_timing_fix
Bugfix for incorrect wifi-hardware timing
2025-02-16 10:33:52 +00:00
netmindz
70a3dc938a
Merge pull request #4560 from maxi4329/update-links
update links to point to the new repo
2025-02-16 10:29:05 +00:00
netmindz
1fd703aff9
Disable changelog while fixing release update 2025-02-16 10:21:38 +00:00
maxi4329
aa3fb7d165 update links to point to the new repo 2025-02-15 20:07:41 +01:00
netmindz
2b9ff3148c
Merge pull request #4556 from spiro-c/npm-check
Fix for: Build should stop if npm fails #4513
2025-02-15 15:09:46 +00:00
maxi4329
7f24269511
Fix for #4153 (#4253)
* fix for #4153

* only load touch/mouse events for touch/mouse devices

* undid formating changes

* undid more formating changes

* undid all formating changes

* use pointerover and pointerout eventlisteners
2025-02-15 15:14:52 +01:00
Damian Schneider
b34d65fce0 fix for incorrect hardware timing 2025-02-15 10:34:44 +01:00
SpiroC
778cecb512 Check if Node.js is installed and present in PATH 2025-02-15 14:43:08 +11:00
Brandon502
e7e0eb0f32 Pinwheel Rework
Optimized pinwheel algorithm. Math and memory optimizations by @DedeHai
2025-02-13 19:01:10 -05:00
Blaž Kristan
a0c55c6406
Merge pull request #4484 from blazoncek/parallel-I2S
WWA strip support & parallel I2S for S2/S3 (bumping outputs from 5/4 to 12)
2025-02-13 19:10:37 +01:00
Damian Schneider
aba736cb96 moved modulo 2025-02-10 20:26:34 +01:00
Damian Schneider
bdec873fed removed slider default 2025-02-10 08:42:22 +01:00
Damian Schneider
2cc73660bf bugfix (XY needs the modulo for zF/zD), updated amplitude for better range 2025-02-10 08:30:36 +01:00
Blaž Kristan
f3de45c6ad Remove reference to custom allocators 2025-02-09 21:43:35 +01:00
Blaž Kristan
386e2c6306
Merge pull request #4528 from blazoncek/ir-bugfix
Fix for "Send notifications on button press or IR" does not work when using "JSON remote" #4519
2025-02-09 20:36:44 +01:00
Blaž Kristan
2473065b98 Soap gap bugfix & aditional size tuning 2025-02-09 19:08:42 +01:00
Blaž Kristan
ed91c54654 Uninitialised _data bugfix 2025-02-09 18:24:10 +01:00
Damian Schneider
4d53e0adde
Fixes first pixel not being set in Stream FX (#4542)
* Fixes first pixel not being set
* added fix to Stream 2 as well
2025-02-08 16:45:33 +01:00
yangminglong
35f87365c9
Brightness follow sun (#4485)
* add usermod : Brightness Follow Sun
2025-02-08 10:11:14 +01:00
Damian Schneider
8e7d6d5dad cleanup and added Density slider
- moved local variables into function
- made coordinates an array
- amplitude can now be changed by user (default setting is a slight increase to original which cannot be avoided without complicated logic or default slider setting)
2025-02-08 10:06:29 +01:00
scourge411
95a10c692c
constexpr is invalid on is2D() (#4540)
* constexpr is invalid on is2D() (it does work on _V4 builds though)
2025-02-08 08:44:46 +01:00
Blaž Kristan
77d7082ffc Bugfix
- correct string length in strlcpy()
2025-02-07 16:56:16 +01:00
Blaž Kristan
c43d09c8b1 Move _data and allocation to derived class
- as suggested by @TripleWhy
- minimum length guard

Conflicts:
	wled00/bus_manager.cpp
	wled00/bus_manager.h
2025-02-07 16:18:53 +01:00
Damian Schneider
d92e60ee5f adding XY() lambda function back in
- slight increase in code size, speed is the same but better readability.
2025-02-07 15:23:44 +01:00
Damian Schneider
b9ceacb43d more optimizations and better readability 2025-02-07 11:14:13 +01:00
Damian Schneider
2fe809f15a consolidated double loops into function
- saves ~500 bytes of flash
- slight speed improvement
2025-02-07 09:46:06 +01:00
Will Miles
078a054dbd usermods/pixels_dice_tray: Fix BLE dependency 2025-02-07 04:12:07 +00:00
Will Miles
c57be77039 Fix sensor usermod globals
These can be static locals instead; allows these usermods to build and
link together.
2025-02-06 22:26:45 -05:00
Will Miles
e6910f732f Disable EleksTube_IPS usermod
For some reason, building it seems to consume 300kb of SRAM??
Probably there's still something wrong with the configuration.
2025-02-06 22:25:39 -05:00
Will Miles
d0b599781d Fix up BME280_v2 usermod
Minor compile correctness tweak
2025-02-06 22:24:53 -05:00
Will Miles
2431f2058b load_usermods: Split on any whitespace
This allows the common newline syntax in platformio
2025-02-06 22:23:12 -05:00
Blaž Kristan
8c717537c4 Lambda XY() 2025-02-06 15:12:04 +01:00
Damian Schneider
e088f4654a removed unnecessary changes 2025-02-06 11:32:33 +01:00
Damian Schneider
b363b6151c revert using color_fade() as it is slower
- ran a few more tests, it is 30% faster like it was originally so reverting. The conversion to 32bit color appears to be wasteful in resources.
2025-02-06 11:32:33 +01:00
Damian Schneider
3baa4f8223 improved speed and fixed issue
- fixed issue: blending was also done when color was on a key-index-color which is now skipped
- speed improvement: conversion is skipped if color is key-color
2025-02-06 11:32:33 +01:00
Damian Schneider
373f4cfefd removed unnecessary lambda function
performance is the same, the function just makes it a bit confusing.
2025-02-06 06:44:26 +01:00
Blaž Kristan
64a02b705a Blending style bugfix (wrong limit)
SoundSim bugfix (missing options)
2025-02-04 18:42:38 +01:00
Will Miles
f72b5d04e8 usermod/pixels_dice_try: Add missing dep
The "arduino-pixels-dice" library needs the ESP32 BLE subsystem, but
doesn't explicitly depend on it.
2025-02-03 19:35:12 +00:00
Will Miles
1688546519 Fix RTC usermod 2025-02-03 18:48:07 +00:00
Will Miles
2eff6b7a3a usermod/sensors_to_mqtt: Add explicit dep
This mod includes a header from the Adafruit Unified Sensor library
inherited by its target sensor libraries.  This isn't reliably
picked up by PlatformIO's dependency finder.  Add an explicit dep to
ensure build stability.
2025-02-03 17:57:09 +00:00
Woody
58962f8470
npm update 2025-02-01 22:56:06 +01:00
Woody
dfd7ff5b39
Merge branch 'cdata' of https://github.com/w00000dy/WLED into cdata 2025-02-01 22:54:20 +01:00
Woody
d56ded8c18
npm update 2025-02-01 22:52:31 +01:00
Woody
af3ebbb3c2
Merge branch 'main' into cdata 2025-02-01 22:51:02 +01:00
Blaž Kristan
1db3359b84 Replace unsigned with size_t 2025-02-01 12:07:31 +01:00
Will Miles
7a40ef74c6 Fix up PWM_fan
Use a custom setup script to check for the dependencies and pass along
the required compile flags to the module; also split the object
definitions for the target modules from their source so as to allow
#including them.
2025-01-31 23:59:37 +00:00
Damian Schneider
b64cd36468 fixes trail flickering randomly. thx @blazoncek for discovering 2025-01-31 14:14:23 +01:00
Will Miles
b3f9983f44 First half of usermod readme updates
Describe the new usermod enable process, and update sample
platformio_override.ini stubs.
2025-01-31 03:57:23 +00:00
Will Miles
070b08a9e6 Rename usermod EXAMPLE_v2 to EXAMPLE
It'd be better to not propagate the 'v2' suffix any further.  This is
the standard flavor of usermods now.
2025-01-31 03:54:17 +00:00
Will Miles
851e9ece03 Remove deprecated mqtt_switch_v2 usermod
...it's been 3 years, and it's easier than cleaning up the readme.
2025-01-31 03:52:59 +00:00
Will Miles
51db63dff7 load_usermods: Also search for mod_v2 2025-01-31 03:39:05 +00:00
Will Miles
a5b972d87e Merge remote-tracking branch 'upstream/main' into usermod-libs 2025-01-31 02:51:56 +00:00
Will Miles
4bc3408410 load_usermods: Don't cross usermod includes
Only include paths for the base system deps, not those of other
usermods.
2025-01-31 01:35:58 +00:00
Will Miles
5d392d89ce load_usermods: Improve include path assembly
Don't blast the path of any mentioned library - parse only the tree of
the actual build deps.
2025-01-31 01:33:34 +00:00
Will Miles
86f97614b0 platformio.ini: Fix esp32dev_V4 usermods 2025-01-31 01:32:34 +00:00
Blaž Kristan
5b7bab6752 Compile fixes 2025-01-30 20:46:26 +01:00
Blaž Kristan
70042db2de Allow "unlimited" virtual buses
- added config upload options
- number of buses it limited to 36 (0-9+A-Z identifiers)
- WRNING web server may not support that many variables
2025-01-30 19:41:44 +01:00
Blaž Kristan
bf69d37cbe Revert getBus() changes 2025-01-30 19:35:36 +01:00
Blaž Kristan
ee7ec20f29 Convert BusManager class to namespace
- use unique_ptr/make_unique for busses
2025-01-30 19:31:09 +01:00
Blaž Kristan
1e1ba9afa3 Fix for aircoookie/WLED#4519
- added JSON handling for irApplyToAllSelected
2025-01-30 19:19:27 +01:00
netmindz
32a75c1ff5
Merge pull request #4165 from willmmiles/esp8266-pwm-phase
Support PWM phase shifts on ESP8266
2025-01-27 19:05:46 +00:00
netmindz
61b99471a1
Merge pull request #4516 from willmmiles/aws-queue-0_16
Update AsyncWebServer and enable response queue
2025-01-26 16:15:24 +00:00
Will Tatam
e27fa882fa Move CONFIG_ASYNC_TCP_USE_WDT=0 to new esp32_all_variants 2025-01-26 16:12:08 +00:00
Will Tatam
7c05914e5a Merge branch 'main' into aws-queue-0_16 2025-01-26 16:07:15 +00:00
netmindz
daa438b349
Merge pull request #3835 from Aircoookie/gif
Image effect (GIF support)
2025-01-26 15:46:16 +00:00
Will Tatam
35624ab998 Merge branch 'main' into gif-fix 2025-01-26 15:19:56 +00:00
netmindz
2d6ad41ed4
Merge pull request #4430 from inverse/fix-devcontainers-config
Use proper devcontainers schema for vscode customisations
2025-01-25 08:20:38 +00:00
netmindz
8544bdd881
Merge pull request #4518 from zuckschwerdt/gh-add-gz-nightly
Nightly release - Add bin.gz artifacts
2025-01-25 07:48:21 +00:00
Christian W. Zuckschwerdt
a778ff01f6 Nightly release - Add bin.gz artifacts 2025-01-24 23:17:01 +01:00
Blaž Kristan
e7c0ce794b Merge conflict fix
- updated blending style constants
2025-01-24 10:10:14 +01:00
Will Miles
4c50119ac2 Merge remote-tracking branch 'upstream/main' into esp8266-pwm-phase 2025-01-23 19:39:01 -05:00
Will Miles
2181618357 stress_test: Add replicated index as a target
No locking contention, but a much larger target
2025-01-23 19:10:43 -05:00
Will Miles
bec7e54f7f Defer web requests if JSON lock contended
Use the web server's queuing mechanism to call us back later.
2025-01-23 19:10:43 -05:00
Will Miles
dc317220b3 Debug: Dump web server queue state
This can be helpful for debugging web handler related issues.
2025-01-23 19:10:43 -05:00
Will Miles
981750a48a Enable webserver queue and limits
Enable the new concurrent request and queue size limit features
of AsyncWebServer.  This should improve the handling of burst
traffic or many clients, and significantly reduce the likelihood
of OOM crashes due to HTTP requests.
2025-01-23 19:10:43 -05:00
Will Miles
1df717084b Update to AsyncWebServer v2.4.0
Includes update to use matching newer AsyncTCP on ESP32
2025-01-23 19:10:28 -05:00
Will Tatam
f2caf14d6a Fix missing hideDMXInput and hideNoDMXInput functions 2025-01-22 20:33:15 +00:00
Will Miles
c9672b35ce
Merge pull request #4511 from mlichvar/main
fix reproduction in game of life
2025-01-21 19:56:51 -05:00
Miroslav Lichvar
39512da74e fix reproduction in game of life
A typo caused broken counting of the most common color in neighbouring
cells and blocked reproduction in some directions.
2025-01-21 20:01:04 +01:00
Will Miles
0d44e7ec27 Usermods: Remove libArchive
This is now managed centrally.
2025-01-21 00:12:37 +00:00
Blaž Kristan
24082d169b
Merge branch 'main' into parallel-I2S 2025-01-20 22:19:49 +01:00
Blaž Kristan
3debaf0f41
Merge branch 'main' into use-bssid 2025-01-20 17:46:56 +01:00
netmindz
2448266d7c
Merge pull request #4158 from Aircoookie/blending-styles
Effect blending styles (recreated PR from #3877)
2025-01-20 11:30:57 +00:00
Blaž Kristan
3a426e258b
Merge branch 'main' into blending-styles 2025-01-20 11:19:43 +01:00
Blaž Kristan
b062d1ee3e
Merge branch 'main' into large-ledmap 2025-01-20 09:03:55 +01:00
Blaž Kristan
ebc171d405 Const update
- removed erroneous DEBUGFX
2025-01-20 08:59:35 +01:00
5chubrakete
4951be6999
Added some date and time formatting options to scrolling text effect. (#4195)
Updated to nonbreaking change and auto uppercasing according to review.
2025-01-20 06:24:10 +01:00
Ryan Ross
01a71132d5
connect the seven segment reloaded usermod to BH1750 usermod (#4503) 2025-01-20 06:12:12 +01:00
Damian Schneider
a421a90e0a
replacement for fastled sqrt16() (#4426)
* added bitwise operation based sqrt16

- replacement for fastled, it is about 10% slower for numbers smaller 128 but faster for larger numbers. speed difference is irrelevant to WLED but it saves some flash.

* updated to 32bit, improved for typical WLED use

- making it 32bits allows for larger numbers
- added another initial condition check for medium sized numbers
- increased the "small number" optimization to larger numbers: the function is currently only used to calculate sqrt(x^2+y^2) which even for small segments is larger than the initially used 64, so optimizing for 1024 makes more sense, although the value is arbitrarily chosen
2025-01-20 05:51:04 +01:00
Will Miles
1d558e8391 platformio.ini: Add extra flags for usermod test
Define a couple pins, leave a note where the usermod list comes from.
2025-01-19 22:25:34 +00:00
Will Miles
30a697e708 usermods/PWM_fan: Disable pending cross-mod check
A better solution for cross-module communication is required!
2025-01-19 22:19:30 +00:00
Will Miles
0233daeda2 usermods/sensors_to_mqtt: Fix char type 2025-01-19 22:19:30 +00:00
Will Miles
48372bcd91 platformio: Fix audioreactive usermod for ESP8266 2025-01-19 22:19:30 +00:00
Will Miles
44a1a1ebde usermods: Fix MQTT checks
- Check after including wled.h
- Use WLED_DISABLE_MQTT instead of WLED_ENABLE_MQTT
2025-01-19 22:19:30 +00:00
Will Miles
2b07be1d09 usermod mpu6050: Fix incorrect int type 2025-01-19 22:09:44 +00:00
Blaž Kristan
a98685d89e Remove numBusses, RMT idle bugfix
- experiment with std::unique_ptr
2025-01-19 21:37:34 +01:00
Blaž Kristan
1c4ba20646 Merge branch 'bus-improvements' into parallel-I2S 2025-01-19 12:41:17 +01:00
Blaž Kristan
d3954b94d3 Update NPB to 2.8.3
Remove logs form Git tracking
2025-01-19 12:19:06 +01:00
Blaž Kristan
7daea18907 Merge fixes & updates
- Segment::setName()
- S2 limits
- bus debug macros
- remove cctBlending from strip
2025-01-19 11:37:57 +01:00
Blaž Kristan
0c84235a95 Bus rework
- Implement vector in bus manager
- Memory calculation according to explanation from @Makuna
- Prefer 8 RMT before 8 I2S on ESP32 (fixes #4380)
- speed improvements in ABL
- verbose debugging
- get bus size from NPB (prototype)
- Parallel I2S output bugfix
- automatic selection of appropriate I2S bus (`X1xxxxxxMethod`)
- removed I2S0 on ESP32 (used by AudioReactive)
- renumbered internal bus numbers (iType)
- added buffer size reporting
2025-01-19 10:17:33 +01:00
Damian Schneider
aab29cb0ab consolidated colorwaves and pride into one base function
the two FX are almost identical in code with just a few lines difference.
2025-01-19 09:04:54 +01:00
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
Malachi Soord
c92dbb10ac
Use proper devcontainers schema for vscode customisations 2025-01-18 01:03:39 +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
Will Miles
193926c795 usermods: Remove #pragma once from cpps 2025-01-17 00:50:02 +00: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
ad65856b3d
Merge pull request #4018 from Brandon502/main
Added Cube Mapping Tool
2025-01-16 13:03:22 +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
953e994c88 Add DMX Input support to builds 2025-01-16 12:24:42 +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 7f9cc6751875dd4882f91bf58adcb820d76cab8c.
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
356a0d72c3
proper fix for existing C3 override envs 2025-01-16 12:11:38 +01:00
Damian Schneider
7fcc4a5283
fix for existing C3 overrides 2025-01-16 12:07:52 +01:00
Will Miles
15edfcd088 Fix usermod platformio integration
Should now work for new *and* old versions of PlatformIO!
2025-01-16 01:05:12 +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
8487dd7cfd Disable build of usermods that are broken at the moment 2025-01-15 12:49:40 +00:00
Will Tatam
5d05d7936c Add usermod dependencies 2025-01-15 12:46:48 +00:00
Will Tatam
0afd2fe720 Destructor must be public 2025-01-15 12:46:06 +00:00
Will Tatam
59a79a30da Add deps for usermods/BME280_v2 2025-01-15 11:34:51 +00:00
Will Tatam
5da380e1b0 Update dependencies for sensors_to_mqtt 2025-01-15 11:28:38 +00:00
Will Tatam
2adf745d06 Update env:usermods to use V4 2025-01-15 11:22:33 +00:00
Will Tatam
ef2eb0764c Merge branch 'main' into usermod-libs 2025-01-15 11:00:52 +00:00
netmindz
9e37d7051c
Merge pull request #4492 from Aircoookie/V4
V4
2025-01-15 10:57:24 +00:00
netmindz
05098c3382
Merge pull request #4487 from netmindz/V4-tasmota
Swap to tasmota/platform-espressif32
2025-01-15 10:39:50 +00:00
Will Miles
32607ee74c Revert incorrect testing platformio.ini 2025-01-15 02:26:34 +00:00
Will Miles
30559cd2d3 Fix dependency for EleksTube_IPS usermod 2025-01-14 22:21:41 +00:00
Will Miles
8fd905215f Integrate usermods environment
Move the "all usermods" logic in to the platformio script, so the
'usermods' environment can be built in any checkout without extra setup
commands.
2025-01-14 22:21:26 +00:00
Will Miles
270d75afe2 Update usermod deps earlier
When processing usermods, update their include path properties before
the LDF runs, so it can see through wled.h.
2025-01-14 22:16:55 +00:00
Blaž Kristan
a65f97ac75 Merge branch 'main' into blending-styles 2025-01-14 22:39:20 +01:00
Will Tatam
53c1856038 Enable GIF support for all esp32 builds 2025-01-14 18:47:06 +00: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
Christian Schwinne
7c03f716a8 Include gif library for all esp32 variants 2025-01-14 18:29:30 +00:00
Christian Schwinne
d4ba603cf7 Update pio version 2025-01-14 18:27:30 +00:00
Will Tatam
deb0306347 Merge branch 'main' into gif-fix 2025-01-14 18:26:41 +00:00
Will Tatam
881da25e8c Add local defintion of lolin_s3_mini as missing from Tasmota platform 2025-01-14 18:06:51 +00:00
Will Tatam
a37b953e72 Set flash_mode to qio for esp32c3dev to maintain current behaviour 2025-01-14 12:44:40 +00:00
Will Tatam
bba5188594 Add the safe option of flash_mode for esp32c3dev, qio also possible 2025-01-14 12:43:06 +00:00
Will Tatam
7dc633581d Merge branch 'V4-tasmota' of github.com:netmindz/WLED into V4-tasmota 2025-01-14 12:29:19 +00:00
Will Tatam
bd00d012e2 Remove esp8266_2m_tasmota as not a V4 change and no suitable tasmota build using the currently used Arduino Core version of 3.1.2 2025-01-14 12:29:03 +00:00
Will Tatam
4f4476b79f Set new codename 2025-01-14 11:53:10 +00:00
Will Miles
0b8721c25e Fix usermod libArchive setting
Monkey-patch PlatformIO to intercept the build process after library
dependencies are loaded, but before the build is fully analyzed.  This
lets us enforce libArchive=False for usermods without making that
setting global across all libraries.

The rest of the fixup code is integrated at the same call site for
simplicity.
2025-01-14 02:48:00 +00:00
Will Tatam
869e275e48 typo in usermods/sensors_to_mqtt/library.json 2025-01-14 00:43:59 +00:00
Will Tatam
e4714870a4 typo in usermods/sensors_to_mqtt/library.json 2025-01-14 00:39:04 +00:00
Will Tatam
1dbd7066de Revert LOROL_LITTLEFS hack 2025-01-14 00:27:54 +00:00
Will Tatam
022e4986ee Revert "Update to Tasmota Arduino Core 2.0.18" - Frank says to stay on
2.0.9

This reverts commit b421f7ae87aa0c76da34b12ba49dd6fc493e26b1.
2025-01-14 00:24:37 +00:00
Will Tatam
2c9c413e79 Merge branch 'usermod-libs' into usermod-libs-migration 2025-01-14 00:22:07 +00:00
Will Tatam
b380d5e2c7 reinstate libArchive:false 2025-01-14 00:10:55 +00:00
Will Tatam
650853c177 Use flash_mode = dio 2025-01-13 21:09:05 +00:00
Will Tatam
ae698f988a Merge branch 'V4' into V4-tasmota 2025-01-13 21:04:11 +00:00
Will Tatam
f920fdecfe Add esp32dev back to default_envs 2025-01-13 21:02:28 +00:00
Will Tatam
4e4f823141 Update comment 2025-01-13 20:57:49 +00:00
Will Tatam
b421f7ae87 Update to Tasmota Arduino Core 2.0.18 2025-01-13 20:56:48 +00:00
Will Tatam
ca80d0489b Add env:esp8266_2m_tasmota 2025-01-13 20:30:10 +00:00
Will Tatam
1ed82426a1 Add esp32dev back to default_envs 2025-01-13 19:30:35 +00:00
Will Tatam
7e9f7d4101 set board_build.flash_mode to fix missing sdkconfig.h 2025-01-13 18:39:21 +00:00
Will Tatam
f240a33935 Remove platform_package override 2025-01-13 18:33:30 +00:00
Will Tatam
5bd0a26126 Remove platform_package override 2025-01-13 16:39:58 +00:00
Blaž Kristan
cc011e39ce Bus creation bugfix
- speed improvements in ABL
- verbose debugging
2025-01-13 17:27:33 +01:00
Will Tatam
29ee551b06 Swap to tasmota/platform-espressif32 2025-01-13 15:38:25 +00:00
Will Tatam
5b5e4157e3 Add esp32dev_v4 env 2025-01-13 11:12:14 +00:00
Will Tatam
3c19692312 Cleanup copy-paste of platform and platform_packages - use the proper common esp32_idf_V4 2025-01-13 10:58:32 +00:00
Will Tatam
24accf96a8 Remove now redundant build section from library.json 2025-01-13 10:53:24 +00:00
Will Miles
f2626b0fc0 Remove now-obsolete AR_build_flags 2025-01-12 17:09:33 +00:00
Will Miles
cc9e9b109c Fix usermod library builds
Manage include folders via a second platformio script, fixing builds and
removing all the extra boilerplate from usermod library.json files.
2025-01-12 17:07:36 +00: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 Miles
8527d231e1 audioreactive: Move flags to library
Use a PlatformIO script to move the last of AR_buildflags in to the
module itself.
2025-01-12 13:12:12 +00:00
Will Tatam
4c19341279 Merge branch 'usermod-libs-migration' of github.com:netmindz/WLED into usermod-libs-migration 2025-01-12 01:40:45 +00:00
Will Tatam
075fd4da2d Defining more usermod dependencies 2025-01-12 01:38:48 +00:00
Will Tatam
52bee88ad2 fix word_clock_matrix naming 2025-01-12 00:36:08 +00:00
Will Tatam
52b784e0e5 fix env:usermods 2025-01-12 00:22:54 +00:00
Will Tatam
3521732597 fix env:userods 2025-01-12 00:22:22 +00:00
Will Tatam
d3eec72e45 Defining more usermod dependencies 2025-01-12 00:09:31 +00:00
Will Tatam
79bac912aa use bigger partitions for usermods env 2025-01-11 23:25:05 +00:00
Will Tatam
2381e323c1 Define dependencies for ADS1115 usermod 2025-01-11 22:54:28 +00:00
Will Tatam
d64cedd3fc Build custom_usermods = audioreactive auto_save animartrix 2025-01-11 22:38:57 +00:00
Will Tatam
c16d83fab0 Build custom_usermods = audioreactive auto_save animartrix 2025-01-11 22:36:06 +00:00
Will Tatam
cbed841414 Include basic usermods in CI 2025-01-11 22:12:36 +00:00
Will Tatam
67022beca0 Build all usermods 2025-01-11 22:07:03 +00:00
Will Tatam
6e76a72d78 Convert usermods from header to library 2025-01-11 21:42:41 +00:00
Will Tatam
a5575bc3a0 Fix naming of usermod files to match library name 2025-01-11 21:41:21 +00:00
Will Tatam
90b18158fc Convert usermods from header to library 2025-01-11 21:14:20 +00:00
Will Miles
71b0e8e937 Convert AnimARTrix usermod to library
Borrowed library definition from @netmindz's work on #4476.
2025-01-11 13:32:28 -05:00
Will Miles
4d5e0ca7a3 load_usermods: Expand name search
Look for 'usermod_v2_x' as well.  This could be removed later if we
clean up the folder names.
2025-01-11 13:31:20 -05: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
Will Tatam
c4e697d797 Revert "Reapply "Set build version during nightly build" - doesn't work as source"
This reverts commit 2aab617c2e2d3f49ba786532b0e44508659f1fae.
2025-01-10 17:09:25 +00:00
Will Tatam
3502a39181 Revert "Set build version during nightly build"
This reverts commit 4a56c92e7b87703166e0ef6dfa3b54f68ffeb237.
2025-01-10 17:09:11 +00:00
Will Tatam
4a56c92e7b Set build version during nightly build 2025-01-10 16:59:08 +00:00
Will Tatam
2aab617c2e Reapply "Set build version during nightly build" - doesn't work as source
This reverts commit 471bd83eb2dd9fa3636d89b884378cb6a65e62ad.
2025-01-10 16:56:07 +00:00
Will Tatam
471bd83eb2 Revert "Set build version during nightly build" - doesn't work as source
files not yet checked out

This reverts commit ec7a7f4c2522f9958636ceca802b9f6ed24ff64a.
2025-01-10 16:53:20 +00:00
Will Tatam
ec7a7f4c25 Set build version during nightly build 2025-01-10 16:49:15 +00: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
netmindz
7208282431
Merge pull request #4424 from inverse/consistent-node
Use consistent node version for local, CI, and devcontainer setup
2025-01-09 10:58:36 +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
Will Tatam
f626dfb7b7 Nightly release - add changelog since last release 2025-01-08 10:00:39 +00:00
Will Tatam
08b263bf4e Nightly release - add changelog 2025-01-08 09:55:52 +00:00
Will Tatam
d0e99923fd Nightly release - add changelog 2025-01-08 09:55:41 +00:00
Will Tatam
1750512477 Nightly release - add changelog 2025-01-08 09:50:54 +00:00
Will Tatam
5e3b4c3a11 Nightly release - swap action 2025-01-08 09:32:12 +00:00
Will Tatam
0c431d9746 Nightly release - fix release 2025-01-08 09:22:00 +00:00
Will Tatam
438c5d9909 Nightly release - fix filename 2025-01-08 09:05:28 +00:00
Will Tatam
7d29edf6f4 Nightly release - fix filename 2025-01-08 09:01:15 +00:00
Will Tatam
50d505b896 Nightly release 2025-01-08 08:50:33 +00: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
netmindz
27e98147ef
Swap from dev to alpha for our current work in progress builds whilst working towards the next version 2025-01-05 18:49:51 +00:00
Frank
48958cc638
Merge pull request #4439 from dosipod/Upstream_PRs
Update readme.md for rgb-rotary-encoder usermod
2025-01-04 17:49:15 +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
AlDIY
3fc8c7d560
Update readme.md
Updated the readme to use lennarthennigs/ESP Rotary@^2.1.1 as the old lib fail to compile
2024-12-29 15:46:49 +03: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
Malachi Soord
1a82a3bf7b
Fix devcontainer 2024-12-24 20:30:54 +00:00
Malachi Soord
a2d84886c0
Update .nvmrc 2024-12-24 13:55:10 +01:00
Malachi Soord
97e8382a41
Use consistent node version 2024-12-24 11:05:35 +01:00
Damian Schneider
88738327fd
Merge pull request #4419 from DedeHai/PWM_brightness_fix
BUGFIX PWM brightness discontinuity (fixes #4396)
2024-12-23 15:24:23 +01:00
Damian Schneider
0ad65f4748 fixed CIE brightness calculation for PWM outputs 2024-12-23 14:57:22 +01:00
Frank
9dad436f72
Merge pull request #4414 from shafingazi/main
fixing a typo in LED Preferences
2024-12-22 11:23:16 +01:00
shafingazi
ebdc38fff2
Merge pull request #1 from shafingazi/led-typo-fix
fixed typo in LED Preferences
2024-12-21 21:19:35 -08: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
Frank
2f0dbef1e5
Merge pull request #4413 from wled-install/patch-2
Update usermods_list.cpp:  usermod_BH1750.h --> usermod_bh1750.h
2024-12-21 23:21:53 +01: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
ff26f54bfd
Merge pull request #4138 from DedeHai/0_15__speed_improvements
Speed improvements in many core functions
2024-12-20 09:45:56 +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
217d2aeb7f
Merge pull request #4407 from DedeHai/fairy_FX_fix
BUGFIX for Fairy & Fairytwinkle FX
2024-12-19 09:24:27 +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
Frank
d4976ac47a
Merge pull request #4398 from Aircoookie/4395-platformio_override
update platformio override example file (solves #4395)
2024-12-16 17:52:33 +01:00
Frank
b8a96d9a77 workaround for elekstube_ips compile error
the trick is to pin TFT_eSPI version 2.5.33
2024-12-16 15:46:59 +01:00
Frank
f75d582eee Merge branch 'main' into 4395-platformio_override 2024-12-16 15:27:12 +01:00
netmindz
18e0ec9a55
PRs to main now 2024-12-16 13:21:07 +00:00
Will Tatam
68b80cdadc Merge branch '0_15' 2024-12-16 13:12:38 +00:00
Frank
3d3c475d1b define board_build.partitions and build_unflags in standard envs
to ensure that build_unflags and board_build.partitions are always having a useful default value. Values can be overridden in custom buildenvs.

saves us a few lines lin platformio_override.sample.ini.
2024-12-15 22:20:52 +01:00
Frank
6668e72351 fix typo 2024-12-15 21:35:13 +01:00
Frank
b72695f01a added example environment for pico-D4 boards
this one is actually for https://github.com/srg74/WLED-ESP32-pico

Its a simple example how to configure WLED for a custom board with build-in microphone and special purpose pins.
2024-12-15 21:22:19 +01:00
Frank
65f98c1f30 esp32: use "extends"
directly inherits default platform from esp32
2024-12-15 21:07:01 +01:00
Frank
c6fd4c51cf fix outdated build options
* DEFAULT_LED_PIN --> DATA_PINS
* DEFAULT_LED_COUNT --> PIXEL_COUNTS
* DEFAULT_LED_TYPE --> LED_TYPES
* USERMOD_AUDIOREACTIVE --> ${esp32.AR_build_flags}
2024-12-15 21:02:45 +01:00
Frank
3c11c8441f fix errors in pltformio_override.ini (solves #4395)
* WLED_tasmota_1M not existing
* always use ${esp32.default_partitions}
* fix build error in wemos_shield_esp32
2024-12-15 20:54:16 +01: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
Soeren Willrodt
c8625c70dd
Merge pull request #4397 from lost-hope/fix_internal_temp_usermod_main 2024-12-14 20:22:56 +01:00
Soeren Willrodt
396e9d0c39
Fix "preset not found issue"
this comit fixes the issue reported by user orbitinstasis
2024-12-14 19:58:30 +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
netmindz
a426e93011
Merge pull request #4359 from blazoncek/reconnect
WiFi reconnect bugfix
2024-12-09 23:05:12 +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
a0f99393f5
Merge pull request #4341 from Aircoookie/hotfix_4335
Hotfix for #4335 - solves missed pixel problem in blends effect
2024-12-02 21:42:21 +01: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
92e59af4d8
Merge pull request #4181 from DedeHai/0_15_trig_math
Added integer based `sin()/cos()` functions, changed all trig functions to wled_math
2024-11-27 22:27:56 +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
Will Tatam
6cbdd825eb Revert "Cache always misses for tags, so save space and do not save back"
This reverts commit cc55f6015dfff436cb4ff3f595ae53695393f8b3.
2024-11-27 10:59:23 +00:00
Will Tatam
cc55f6015d Cache always misses for tags, so save space and do not save back 2024-11-27 10:56:53 +00:00
Will Tatam
95718ab6ec Dedicated release workflow 2024-11-27 10:36:18 +00:00
Will Tatam
feab27295d workflow refactor to used shared build file 2024-11-27 10:36:18 +00:00
Will Tatam
ca176c7549 rename workflow ready for workflow refactor 2024-11-27 10:36:18 +00: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
77967731d5
Merge pull request #4227 from ingDIY/pr_branch
fixed refs to removed usermod USERMOD_FOUR_LINE_DISPLAY
2024-11-26 09:15:31 +00: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 Tatam
0c77dbb7ea cleanup WLED_RELEASE_NAME only if present 2024-11-24 13:55:23 +00:00
netmindz
2448e2ae3b
Merge pull request #4312 from willmmiles/mixed-led-crash
Defer calling begin() on buses
2024-11-24 13:45:26 +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
0be1df7ee8 Stip \" from WLED_RELEASE_NAME 2024-11-23 16:46:41 +00: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 49fb16e2c6528ddc98cccc352cc8f0d4a5f62a13.
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
Frank
545bfa6ef9
Merge pull request #4289 from willmmiles/exploding_fireworks_overrun
Fix array overflow in exploding_fireworks
2024-11-18 22:18:19 +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
Blaž Kristan
25ab381916
Merge pull request #46 from w00000dy/search-keep-mod
Move selected to the bottom in search result
2024-11-16 22:54:11 +01: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
netmindz
4cd4c13b2d
Merge pull request #4267 from w00000dy/space
Fix problem with spaces
2024-11-16 07:14:34 +00: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
netmindz
a9b0b8adc8
Merge pull request #4229 from maxi4329/snodejsversion
specified required nodejs version
2024-11-13 09:20:27 +00: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
Frank
9a564ee204
readme.md - link to multi-strip KB page 2024-11-10 14:45:55 +01:00
Will Miles
d37ee89e84 ESP8266PWM: Fix phase shift glitches
In some cases it was possible for the computed phase shift to skip
a cycle.  Update the shift calculation logic to prevent this.
2024-11-09 21:33:58 -05:00
Woody
5de86d3d91
fix problem with spaces 2024-11-09 23:55:09 +01:00
Woody
4b6041302e
fix #4166 2024-11-09 21:59:52 +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
001e2ad287 adjust audioreactive for the new FRAME_DELAY logic
minor
2024-11-08 19:35:42 +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
netmindz
6ff5c88ebf
List ESP32 first 2024-11-07 08:17:08 +00: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
Damian Schneider
271a07a7d6
Merge pull request #4250 from DedeHai/FPS_calc_averaging
Fixed & improved FPS calculation
2024-11-05 08:52:42 +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
891ea48e11 Merge remote-tracking branch 'upstream/0_15' into framerate_ac015 2024-11-02 17:56:24 +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
7d0951a08a
Merge pull request #4243 from MoonModules/AC_0_15_S3-WROOM2
Add support for ESP32-S3 WROOM-2 (solves #4099)
2024-11-01 22:04:21 +01:00
Frank
d98ca9a202 show correct flash mode in WLED_DEBUG 2024-11-01 21:51:46 +01:00
Frank
3c2c5bedc5 LEDPIN --> DATA_PINS 2024-11-01 21:42:54 +01:00
Frank
749d34cd30 pinmanager support for S3 WROOM-2 (pin 33-37 reserved for flash) 2024-11-01 21:31:57 +01:00
Frank
1898be2fe1 S3 WROOM-2 buildenv
this chip has 16MB or 32MB flash, and requires .memory_type = opi_opi
2024-11-01 21:13:43 +01:00
Blaž Kristan
af34da4160
Merge pull request #4231 from Aircoookie/b7
WLED 0.15.0-b7 release
2024-10-30 20:59:00 +01:00
ingDIY
fa053b7e60
Update platformio_override.sample.ini
fixed back U8g2 version
2024-10-29 01:14:02 +01:00
Blaž Kristan
4588219e31 Update changelog 2024-10-28 12:42:53 +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
maxi4329
d05c358fd2 version changed to 20 2024-10-27 11:13:56 +01:00
maxi4329
7c6bc5c421 indened formating 2024-10-26 21:07:17 +02:00
maxi4329
798c398f23 specified required nodejs ver 2024-10-26 20:33:38 +02: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
ingDIY
dcfdca6351 cleaned up old references to USE_ALT_DISPlAY that aren't used anymore in the code/source files; fixed readme.md documents and updated instructions; removed referencies to old usermods; fixed invalid filenames; removed referencies to old usermods; checked cycle options; splitted and fixed platformio_override.sample.ini; 2024-10-25 12:14:37 +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
c81ef2669e
Merge pull request #4223 from willmmiles/f-string-hygiene
Usermod F-string hygiene
2024-10-24 15:23:11 -04: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
4f48ddfaec Replace SET_F with F in usermods
Since oappend() is now strongly typed, pass the correct type.  This is a
step towards removing the extra shim logic on ESP8266.
2024-10-23 21:35:30 -04:00
Will Miles
2e01fe0b5b Revert "Replace SET_F with F in usermods"
This reverts commit 7d067d8c305c3c6f397b6863f6849659a0aadd24.
2024-10-23 21:34:35 -04:00
Will Miles
7d067d8c30 Replace SET_F with F in usermods
Since oappend() is now strongly typed, pass the correct type.  This is a
step towards removing the extra shim logic on ESP8266.
2024-10-23 21:28:21 -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
2bb2caf2d2 Enable NON32XFER_HANDLER on ESP8266
This is a platform feature that asks forgiveness for PROGMEM misuse:
it adds a handler such that incorrectly used PROGMEM will work without
crashing, just really, *really* inefficiently.

Given that most of our real-world use cases for PROGMEM strings are
relatively infrequent text calls, we can err on the side of developer
convenience and address performance problems if and when they arise.
2024-10-23 20:01:42 -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
Frank
6d1126b8aa
Update audioreactive readme.md
added `-D sqrt_internal=sqrtf` -> needed for good performance
2024-10-22 16:19:46 +02:00
Frank
26a47537f9 AR memory optimization - part 2
shorten strings in UI script - saves a few hundred bytes on RAM
2024-10-22 15:15:14 +02:00
Frank
01d43c69fb AR memory optimization - part 1
allocating FFT buffers late makes up to 16Kb heap available when audioreactive is not enabled.

Already tested in MM fork.
2024-10-22 14:45:32 +02:00
Frank
7db1989093 fix major performance regression in ArduinoFFT
since v2.0.0, we cannot override the internal sqrt function by #define --> moved to build_flags.

Average FFT time on esp32 : 4.5ms --> 1.8ms
2024-10-22 14:42:48 +02: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
Will Miles
85a7c3c60d
Merge pull request #4189 from dosipod/0_15
Extra comma in the network password fix
2024-10-13 14:41:01 -04: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
Blaž Kristan
2a07eb84f6
Merge pull request #4174 from Xevel/0_15
Fixed Improv rejecting all properly formatted packets
2024-10-03 16:07:17 +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
7fa25ca7ae pio update - flash size of non-standard boards
* adding missing flash size flags that were lost between 0.14 and 0.15
   (necessary if you don't flash using esptool)
* adding env:esp32dev_16M for 16MB flash (serg74 esp32-16M, twilightlord esp32 16M)
2024-09-30 11:25:58 +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
3c7f83407b Save a little RAM 2024-09-28 23:16:26 -04: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
Frank
6f221852a2 partition file for 512Kb Filesystem, 1.7MB Program
the missing link between 256KB (very small FS) and 700KB (only 100KB extra program)
2024-09-28 18:25:16 +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
Frank
6dc2c680c5
Merge pull request #4163 from willmmiles/fix-oappend-merge
Fix oappend merge on 8266 (SET_F to F)
2024-09-28 12:45:37 +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
Christian Schwinne
8180f2c742 Bump build tool dependencies 2024-09-27 13:46:01 +02:00
Damian Schneider
a76a895f1d bugfix 2024-09-27 06:17:26 +02:00
Damian Schneider
b404458369 fixed one forgotten replacement of rgb2hsv_approximate 2024-09-26 18:29:31 +02:00
Damian Schneider
c44b9f8659 Merge remote-tracking branch 'upstream/0_15' into 0_15__speed_improvements 2024-09-26 18:07:33 +02:00
Damian Schneider
bef1ac2668 Added HSV2RGB and RGB2HSV functions for higher accuracy conversions
- also added a struct to handle HSV with 16bit hue better (including some conversions, can be extended easily)
- the functions are optimized for speed and flash use. They are faster and more accurate than what fastled offers (and use much less flash).
- replaced colorHStoRGB() with a call to the new hsv2rgb() function, saving even more flash (new function is untested!)
- the 16bit hue calculations result in an almost perfect conversion from RGB to HSV and back, the maximum error was 1/255 in the cases I tested.
2024-09-26 18:06:41 +02:00
Blaz Kristan
906f8fc2e7 Fix C3 compiler issue. 2024-09-25 18:49:10 +02:00
Blaž Kristan
c600c6da63 Bus length fix 2024-09-25 09:33:16 +02:00
Will Miles
e789a18553
Merge pull request #4152 from willmmiles/end_oappend_v2
End oappend v2
2024-09-24 16:56:51 -04:00
Blaz Kristan
3f3c986932 Merge branch '0_15' into end_oappend_v2 2024-09-24 21:43:47 +02:00
Blaz Kristan
3ccc5babc1 Remov superfluous #if 2024-09-23 20:39:16 +02:00
Blaz Kristan
fafb2eba69 Merge branch '0_15' into blending-styles 2024-09-23 20:36:08 +02:00
Blaz Kristan
33cf82a982 Indentations and a few optimisations
Restore addPixelColor() behaviour.
2024-09-23 18:03:17 +02:00
Blaz Kristan
bd7cd32f91 Add mandatory refresh capability to remove type dependency. 2024-09-22 13:56:14 +02:00
Damian Schneider
0a5400263b removed IRAM_ATTR from inlined function
when the function is inlined into a IRAM_ATTR function, it will also reside in IRAM. Forced inlining is recommended by Espressif if I understand this correctly: https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-guides/hardware-abstraction.html
2024-09-22 13:52:56 +02:00
Damian Schneider
17d59d3337 adding initialization to vStrip, added comment on padding bytes 2024-09-22 09:02:42 +02:00
Blaz Kristan
9cb3531e2d Remove erroneous file
Fix constant dependancy
2024-09-21 22:24:36 +02:00
Blaz Kristan
b50e6e0d90 Static PinManager & UsermodManager
- saves a few bytes of flash
2024-09-19 21:44:11 +02:00
Damian Schneider
a88436c620 revert removal of adding with saturation, renamed 'fast' to 'saturate'
- blurring now uses desaturated adding: it is faster most of the times and blurring adds scaled colors so should rarely (ever?) saturate, I saw no visual difference in tests.
- formatting
2024-09-19 08:49:18 +02:00
Will Miles
45cf90094a Rename destination for getSettingsJS
Use a name that makes it a bit clearer what the output is.  The new name
is applied consistently through most uses.
Usermods are not yet updated.
2024-09-18 23:35:36 -04:00
Blaz Kristan
ae1df20893 New names 2024-09-18 23:32:15 -04:00
Will Miles
71148740d4 Replace sappend and sappends
Use named functions to describe what's being printed.
2024-09-18 23:31:19 -04:00
Will Miles
4ef583c844 xml: Print optimization
Reduce the total number of calls by using printf_P and skipping atoi().
2024-09-18 23:27:42 -04:00
Will Miles
16f61ea96d Usermod: Implement shim for oappend
Use a static Print* to transform old oappend calls to print calls.
2024-09-18 23:18:52 -04:00
Will Miles
32f9616b6e Remove oappend
Remove the large stack buffer as we're just going to copy it in to a
heap buffer anyways.  Later we can refine the length estimation or use a
rope-style dynamic data structure like DynamicBufferList.
2024-09-18 23:18:51 -04:00
Will Miles
1346eb4f76 tools: Add all_xml fetch script
Useful for checking that I haven't broken anything.
2024-09-18 19:47:52 -04:00
Will Miles
d4268ba070 handleFileRead: Skip duplicate FS check
Since we validate the file existence ourselves, no need to have
AsyncWebServer do it again.
2024-09-18 19:47:51 -04:00
Damian Schneider
696290527a cleanup and improved color_add()
- optimized color_add() again: now it is as fast with preserved ratio scaling than the "fast" variant was before (if no scaling is needed, it is even faster). plus it saves 250 bytes of flash
- bugfix in `color_fade()`
- removed a lot of whitespaces
2024-09-18 22:10:27 +02:00
Damian Schneider
686866c6f9 Merge remote-tracking branch 'upstream/0_15' into 0_15__speed_improvements 2024-09-18 08:10:45 +02:00
Blaz Kristan
72455ccde1 Missing "not" 2024-09-17 19:47:24 +02:00
Blaz Kristan
88fb860568 SAVE_RAM bugfix introduced by #4137 2024-09-17 16:34:38 +02:00
Blaz Kristan
ceed494cf7 Introduce common.js in settings pages 2024-09-17 16:26:11 +02:00
Blaz Kristan
ac8f919304 Serial improvements (can RX, canTX)
PinManager bugfix for unsigned long long
2024-09-17 16:21:52 +02:00
Blaž Kristan
7f1ec4802d
Merge pull request #4137 from felddy/feature/toggle_pallet_sync
Add the ability to toggle the reception of palette synchronizations
2024-09-16 16:19:19 +02:00
Blaz Kristan
d5777b7bce Fix for missing WLED_NUM_PINS check 2024-09-15 20:34:05 +02:00
PaoloTK
e34f179a82 fix pin conflict check logic 2024-09-15 20:27:44 +02:00
Blaz Kristan
6a90b9a512 FX Temperature better ranges 2024-09-15 19:31:14 +02:00
Blaz Kristan
ce5ee65d60 Merge branch '0_15' into blending-styles 2024-09-15 11:05:16 +02:00
Blaz Kristan
65a8dbfe41 FX: Usermod Temperature effect 2024-09-15 11:04:02 +02:00
Blaz Kristan
1ff667b7ef AWS library fix 2024-09-15 10:59:50 +02:00
Blaž Kristan
0806c7fbdb
Merge pull request #4142 from willmmiles/fix-webserver-pin
Fix AsyncWebServer version pin
2024-09-14 22:51:19 +02:00
Blaz Kristan
5708d7a6b8 Build bump, changelog update 2024-09-14 22:30:56 +02:00
Will Miles
2264cc5d10 Use tag to pin AsyncWebServer version 2024-09-14 16:11:46 -04:00
Blaž Kristan
28cb3f9d0c
Merge pull request #4107 from PaoloTK/compile_different_busses
Configure different kinds of busses at compile
2024-09-14 22:02:56 +02:00
PaoloTK
f16ed4697f fix isReadOnlyPin() logic 2024-09-14 18:58:53 +02:00
Blaz Kristan
81e412fe5b Use refernece to avoid ctor/dtor
Use PinManager to determine reserved pins
2024-09-14 14:54:42 +02:00
Damian Schneider
f3137eb0a9 updated Segment::color_from_palette
- gamma correction only where needed
- paletteIndex should be uint8_t (it is only used as that)
note: integrating the new `ColorFromPaletteWLED()` into this would require  a whole lot of code rewrite and would result in more color conversions from 32bit to CRGB. It would be really useful only if CRGB is replaced with native 32bit colors.
2024-09-14 14:49:36 +02:00
Damian Schneider
0e5bd4ed74 remove test printout 2024-09-14 14:11:29 +02:00
Damian Schneider
6a37f25c5d memory improvement: dropped static gamma table
- there already is a method to calculate the table on the fly, there is no need to store it in flash, it can just be calculated at bootup (or cfg change)
2024-09-14 14:10:46 +02:00
Damian Schneider
2afff05014 minor tweak (break instead of continue in setPixelColorXY) 2024-09-14 11:45:27 +02:00
Blaz Kristan
e3d9417b84 Minor fixes
- rely on HAL for RO pins and max pins
- remove isPinDefined() and do clash check inline
- JS fix to use HAL max pins
2024-09-14 11:39:56 +02:00
Blaz Kristan
6a188033c6 Merge branch '0_15' into compile_different_busses 2024-09-14 09:27:37 +02:00
Blaž Kristan
df24fd7bf2
Merge pull request #4129 from Aircoookie/bus-config
Fetch LED types from Bus classes (dynamic UI)
2024-09-13 23:23:08 +02:00
Damian Schneider
d45b4ad134 fixes and consistency 2024-09-13 19:01:54 +02:00
Damian Schneider
ec938f254c removed old code 2024-09-12 21:25:08 +02:00
PaoloTK
fa82e759bd bug fix 2024-09-12 18:27:51 +02:00
PaoloTK
daf0bcfac3 bug fix on pin already defined check 2024-09-12 18:12:38 +02:00
Damian Schneider
09428dcade inlined getMappedPixelIndex, improved color_add, bugfix in colorFromPalette
inlining getMappedPixelIndex gets rid of function entry instructions (hopefully) so it should be faster.
also added the 'multi color math' trick to color_add function (it will not make much difference but code shrinks by a few bytes)
2024-09-12 16:34:55 +02:00
Blaz Kristan
49d51c5af8 Hot 2024-09-12 15:26:26 +02:00
Blaz Kristan
ec7f69d559 Merge branch '0_15' into bus-config 2024-09-12 15:22:56 +02:00
Blaz Kristan
a8c5bf2573 Ease IRAM 2024-09-12 15:22:37 +02:00
Blaz Kristan
f12de61d7f Merge branch '0_15' into bus-config 2024-09-12 15:08:10 +02:00
Blaz Kristan
71fcd6482d Fix CRLF in boblight 2024-09-12 15:07:49 +02:00
Blaz Kristan
e59b38a5d2 Fix unsigned long in debug printf 2024-09-12 15:04:10 +02:00
Damian Schneider
b07658b460 improved Segment::setPixelColorXY a tiny bit
uses less flash so it should be faster (did not notice any FPS difference though)
also cleaned code in ColorFromPaletteWLED (it is not faster, same amount of code)
2024-09-12 14:09:09 +02:00
Blaž Kristan
5b8d9d1510 Merge branch '0_15' into bus-config 2024-09-12 08:49:04 +02:00
Blaž Kristan
6169c458bf Remove void 2024-09-12 08:48:31 +02:00
Blaž Kristan
23400d0449 Conditional IRAM for gamma 2024-09-12 08:30:46 +02:00
Damian Schneider
992d11be10 Improvements in get/set PixelColor()
-calculations for virtual strips are done on each call, which is unnecessary. moved them into the if statement.
2024-09-12 08:28:30 +02:00
Damian Schneider
feac45fd0a improvement in color_add
its not faster but cleaner (and uses less flash)
2024-09-12 07:45:49 +02:00
Damian Schneider
934176818f more improvements to color_scale() now even faster.
tested and working, also tested video
2024-09-12 06:43:20 +02:00
PaoloTK
c5435ec1fa Merge remote-tracking branch 'AC/bus-config' into compile_different_busses 2024-09-11 23:04:37 +02:00
Damian Schneider
c3f472fbcb some improvements to consider
no real difference in FPS but code is faster.
also 160bytes smaller, meaning it is actually faster
2024-09-11 21:41:42 +02:00
Blaz Kristan
1cee1c3562 Merge branch '0_15' into blending-styles 2024-09-11 17:28:48 +02:00
Blaz Kristan
eae5a74a11 color_fade bugfix
impure void remove
optimisations: hot
2024-09-11 17:14:59 +02:00
Blaz Kristan
5df1a223c2 Pre-allocate COM vector 2024-09-11 16:45:39 +02:00
Blaž Kristan
81382a4bc0
Merge pull request #4131 from iammattcoleman/update-temperature-dependency
Temperature usermod: update OneWire to 2.3.8
2024-09-11 16:24:25 +02:00
Matt Coleman
750a429bd4 Temperature usermod: update OneWire to 2.3.8
OneWire 2.3.8 includes stickbreaker's and garyd9's ESP32 fixes:
blazoncek's fork is no longer needed
2024-09-11 06:35:09 -04:00
Matt Coleman
dbe78dff93 Temperature usermod: fix changelog formatting
This change ensures that the dates are displayed on their own lines.
Without the blank lines, many Markdown renderers will append the dates
to the previous bullet point.
2024-09-11 06:35:09 -04:00
PaoloTK
5869627b32 - More optimization on bus configuration logic.
- Renamed LEDPIN to DEFAULT_LED_PIN.
- Removed ability to override DEFAULT_LED_PIN, DEFAULT_LED_TYPE and DEFAULT_LED_COUNT. Use DATA_PINS, LED_TYPES and PIXEL_COUNTS instead.
2024-09-11 01:27:19 +02:00
Frank
5bc5ef0ae8 Update CONTRIBUTING.md - typo 2024-09-10 20:36:48 +02:00
Frank
2cfd2e1410
Update CONTRIBUTING.md - typo 2024-09-10 20:36:18 +02:00
Frank
cce5e8f811 Update CONTRIBUTING.md - adding a hint to avoid force-pushing 2024-09-10 20:34:43 +02:00
Frank
058e66c7fc
Update CONTRIBUTING.md - adding a hint to avoid force-pushing 2024-09-10 20:32:40 +02:00
Felddy
8ae09c3d02
Fix comment alignment 2024-09-10 18:16:00 +00:00
Felddy
83699bc5c3
Add support for toggle of palette sync 2024-09-10 18:02:29 +00:00
Blaz Kristan
3a5eb8c5d2 WLED 0.15.0-b5 release
- Audioreactive usermod always included
2024-09-10 16:07:37 +02:00
Blaz Kristan
fd00e5eaae LED settings text update 2024-09-10 15:23:27 +02:00
Blaz Kristan
20444ee7d5 Debug optimisations 2024-09-10 15:20:34 +02:00
PaoloTK
eb06e575c2 add check for pin reassigned conflict with pin defined for current bus 2024-09-10 01:03:19 +02:00
Blaz Kristan
b4315152e2 Add numPins() 2024-09-08 11:07:53 +02:00
Frank
340a9f8b76 better bugfix for seven-seg-reloaded
* only reject invalid ranges when array access will be actually performed
* fixed another stupid pointer arithmetic error

Hint: I AM NOT THE MAINTAINER of this usermod. I'm just fixing an obvious coding error without knowing what the usermod really does.
2024-09-06 20:09:25 +02:00
Frank
81cec6a25a
Update usermod_seven_segment_reloaded.h - prevent array bounds violation (solves #4121)
I'm not the maintainer of this usermod, but its obvious that the code might overrun array bounds, so fixing this.
2024-09-06 19:36:24 +02:00
Blaz Kristan
c5b31e2f63 Bugfix 2024-09-06 17:56:36 +02:00
Blaz Kristan
0642b17ab0 Bugfix 2024-09-06 17:54:36 +02:00
Blaz Kristan
ac689a9a2e Remove array, un-inline calculateCCT 2024-09-06 12:19:04 +02:00
Blaz Kristan
43cc4ec009 Increase oappend buffer on ESP8266 2024-09-05 22:18:50 +02:00
Blaz Kristan
9cc333b2bd Move LED types to individual bus type
- (credit @netmindz & @willmmiles)
Tuning.
2024-09-05 21:49:27 +02:00
Blaž Kristan
55d98ff935
Merge pull request #4126 from DedeHai/PWM-fixes
fixed offsets and inverted signal plus dead time
2024-09-05 17:26:28 +02:00
Blaz Kristan
dc90a4ed42 Mirroring bugfix. 2024-09-04 23:43:13 +02:00
Frank
ef80abd885 8266 compatibility builds for older chips (another attempt t o solve #3690 and #3685)
some users have reported that releases after 0.14.0 are not working reliably. So we add a few "compat" for 8266 that try to reproduce the buildenv of 0.14.0 as much as possible.

* platform and platform_packages from 0.14.0
* not using PIO_FRAMEWORK_ARDUINO_MMU_CACHE16_IRAM48
* due to smaller IRAM, we had to move some functions back from IRAM to normal flash (may cause slowdown)
2024-09-04 23:42:58 +02:00
Blaz Kristan
b9080f9479 Mirroring bugfix. 2024-09-04 21:17:21 +02:00
Blaz Kristan
092a5a1ca3 Unsigned fix 2024-09-04 20:54:44 +02:00
Damian Schneider
d3c31c52a2 found a better way of deadTime subtraction, fixed inverted signals 2024-09-04 18:03:52 +02:00
PaoloTK
329173e145 added complete validation logic for pins and types 2024-09-04 13:28:43 +02:00
PaoloTK
8e4f8fcbc8 fix bug in reassignment logic 2024-09-04 13:27:04 +02:00
Frank
c1c707c77a 8266 compatibility builds for older chips (another attempt t o solve #3690 and #3685)
some users have reported that releases after 0.14.0 are not working reliably. So we add a few "compat" for 8266 that try to reproduce the buildenv of 0.14.0 as much as possible.

* platform and platform_packages from 0.14.0
* not using PIO_FRAMEWORK_ARDUINO_MMU_CACHE16_IRAM48
* due to smaller IRAM, we had to move some functions back from IRAM to normal flash (may cause slowdown)
2024-09-04 11:38:03 +02:00
Blaz Kristan
b1e58dd10d Optimisations
- renamed variables
- some tuning
2024-09-03 22:28:21 +02:00
Damian Schneider
2cc0aceac7 Bugfixes
- fixed maxBri value
- fixed overflow in dead time subtraction
- deadtime and offset now also work if signals are inverted (_reversed)
2024-09-03 19:14:50 +02:00
PaoloTK
d79d5dbadd remove getReadOnlyPins() function 2024-09-03 17:29:38 +02:00
Blaz Kristan
ebd8a10cef Prevent styles on 1px segments 2024-09-03 17:20:16 +02:00
Damian Schneider
be7475fe66 bugfixes, removed debug printout 2024-09-02 22:06:46 +02:00
Damian Schneider
85e2f7eb34 fixed offsets and inverted signal plus dead time 2024-09-02 17:53:15 +02:00
PaoloTK
9bb979f2e8 bug fix 2024-09-01 21:46:30 +02:00
PaoloTK
c942345453 bug fix 2024-09-01 21:35:09 +02:00
PaoloTK
fcc344ba99 add read/only pin logic and check 2024-09-01 21:31:19 +02:00
Blaz Kristan
a3b28871c6 Dirty fix for newer framework 2024-09-01 12:27:41 +02:00
Blaz Kristan
2ca034bfa8 Remove ledc_set_duty_and_update
Add semaphoring
Determine CCT overlap
2024-09-01 11:43:22 +02:00
Blaz Kristan
0d035a08d6 Dithering support & bugfix in UI
Thanks to @dedehai & @zalatnaicsongor
2024-08-30 15:21:16 +02:00
PaoloTK
6655e2664e rebase to bus-config 2024-08-29 13:18:48 +02:00
Blaz Kristan
c51ce2eec7 Fix C/P error
Clarifications
2024-08-27 21:57:00 +02:00
Blaz Kristan
b2e00eb868 Introduce network type (previous virtual)
- phase shifting correction (limit to PWM CCT)
2024-08-27 14:11:56 +02:00
Blaz Kristan
820df0c596 PinManager update
- LEDC: allocate same timer for CCT PWM
- use SOC constants
BusManager update
- use allocateMultiplePins for BusPwm
2024-08-27 00:21:24 +02:00
Blaz Kristan
865e3dcd0c getNumberOfPins 2024-08-25 12:53:23 +02:00
Blaz Kristan
f55e2fc7b8 Merge branch '0_15' into bus-config 2024-08-25 12:41:16 +02:00
Blaž Kristan
cb22e1933e
Merge pull request #4111 from DedeHai/0_15_PWM_CIEbrightnesscalc
replaced PWM LUT with calculation
2024-08-25 12:36:23 +02:00
Blaz Kristan
8818a9e82a Remove erroneous debug 2024-08-24 11:41:23 +02:00
Blaz Kristan
dbb47d506c Bus manager rework
- move macros to constexpr methods
- introduce type capabilities for UI
- add phase shifting (POC) to PWM
- replace PWM CIE LUT with calculated curve
CIE & phase shifting credit @dedehai
2024-08-24 11:35:32 +02:00
Blaž Kristan
e4d5d77347
Merge pull request #4114 from ChuckMash/struct-def
Demystified some byte definitions of WiZmote ESP-NOW message
2024-08-23 07:13:48 +02:00
ChuckMash
dd52124765
Added some byte definitions to WiZmote ESP-NOW message 2024-08-22 20:24:03 -07:00
Blaz Kristan
6f3267aee9 Dynamic bus config
- provide LED types from BusManager for settings
Credit: @netmindz for the idea.
2024-08-22 17:15:12 +02:00
Blaz Kristan
0bbd6b7c4b Minor optimisation
- disable JSON live
- WS error string
- button irelevant check
2024-08-22 17:08:51 +02:00
Damian Schneider
1cc47b02cf use CIE brightness also for ESP8266 2024-08-21 08:06:32 +02:00
Damian Schneider
e7babc071d replaced PWM LUT with calculation 2024-08-20 20:15:17 +02:00
Blaž Kristan
d11ca2e159
Merge pull request #4110 from itCarl/usermod_battery_mqtt_update
Update usermod "Battery" improved MQTT support
2024-08-20 12:51:02 +02:00
Maximilian Mewes
2d6365dc6a Add HA-discovery as config option 2024-08-20 12:37:01 +02:00
Maximilian Mewes
cc24119a59 remove unnecessary comments 2024-08-19 22:22:46 +02:00
Maximilian Mewes
b8f15333d8 update readme.md 2024-08-19 22:12:21 +02:00
Maximilian Mewes
e5a426419c Improve mqtt support, add battery percentage and voltage 2024-08-19 22:07:08 +02:00
Blaž Kristan
8a1df1e700
Merge pull request #4093 from axlan/pixel-dice-usermod
Added a usermod for interacting with BLE Pixels Dice.
2024-08-19 05:39:35 +02:00
Blaž Kristan
cc298f56e2
Merge pull request #4081 from RobinMeis/0_15
Allow lower values for touch threshold
2024-08-18 13:49:03 +02:00
Robin Meis
665693a513 Remove minimum threshold according to https://github.com/Aircoookie/WLED/pull/4081#issuecomment-2295198219 2024-08-18 13:31:14 +02:00
Blaž Kristan
c35e82e59f
Merge branch '0_15' into pixel-dice-usermod 2024-08-18 13:20:45 +02:00
Blaž Kristan
72d38f4cff
Merge pull request #3539 from Liliputech/pov_display
Added POV image effect
2024-08-18 13:15:34 +02:00
Blaz Kristan
f6c47ac19c Fix some compiler warnings 2024-08-18 10:45:16 +02:00
Blaz Kristan
0430dc5a1f Merge branch '0_15' into blending-styles 2024-08-17 20:55:56 +02:00
Blaž Kristan
27bec89386
Merge pull request #4106 from srg74/patch-1
correct spelling error xml.cpp
2024-08-17 20:54:58 +02:00
srg74
79b3ce141c
correct spelling error xml.cpp 2024-08-17 14:42:44 -04:00
Blaz Kristan
011afd0910 Merge branch '0_15' into blending-styles 2024-08-17 15:24:20 +02:00
Blaz Kristan
8d00e4d31d Save some tiny amounts of RAM
- use `-D WLED_SAVE_RAM`
2024-08-17 15:09:41 +02:00
Blaž Kristan
8688777ae1
Merge pull request #4103 from netmindz/FX-cleanup
Remove repeating code to fetch audio data
2024-08-16 17:39:49 +02:00
Frank
198aceee07
Merge pull request #4104 from FreakyJ/Fix-Bug-#3809
Fixes #3809 Loxone JSON parser doesn't handle lx=0 correctly
2024-08-16 02:04:00 +02:00
FreakyJ
ee1bf1c221
#3809 Loxone JSON parser doesn't handle lx=0 correctly 2024-08-15 20:18:06 +02:00
Will Tatam
24ecf1a166 Move getAudioData to static 2024-08-15 17:58:19 +01:00
Frank
5cb49c86a0
Merge pull request #4090 from willmmiles/ino-to-cpp
Rename wled00.ino to wled_main.cpp
2024-08-15 18:23:53 +02:00
Blaz Kristan
9940d2590b Arc expansion getPixelColor fix. 2024-08-15 17:22:59 +02:00
Blaz Kristan
577fce69e2 MQTT unification and cleanup 2024-08-15 16:18:34 +02:00
Will Tatam
e68375a71e Remove repeating code to fetch audio data 2024-08-15 09:08:57 +01:00
Blaž Kristan
fe7fb6c7a9
Merge pull request #4092 from Aircoookie/sm16825
SM16825 support
2024-08-14 22:21:01 +02:00
Blaz Kristan
cec67d8eff Const and 2D box blur
- added 2D blur
2024-08-14 22:15:48 +02:00
Frank
2443e2ec7c wled00 -> wled_main 2024-08-14 11:16:46 +02:00
Frank
bcf862044a Update wled00.cpp
* added #include <Arduino.h> - this is basically what the preprocessing tool (wled.ino -> wled00.ino.cpp) does
* added a comment that Arduino IDE is not supported, use platformIO.
2024-08-13 22:21:21 +02:00
jdiamond
b73f049484 Clean up addEffect() changes. 2024-08-13 04:40:59 +00:00
jdiamond
cde5314d41 Add "dice" to environment names, and add more information about fitting in a 4MB partition. 2024-08-11 01:23:41 +00:00
Arthur Suzuki
ed5eb28228
Added POV image effect
Setup is really easy, after first boot and WiFi/LEDs setup:
go to wled.local/edit and upload a couple image to WLed's filesystem.
Only PNG is supported right now, further support for GIF is planned.
The image should be as wide as the 1D segment you want to apply to.

When done, go to the Effect page on the UI, select "POV Image" effect.

You could also update the image with a post to the JSON-API like this:
curl -X POST http://[wled]/json/state -d '{"seg":{"id":0,"fx":114,"f":"/axel.png"}}'

The segment should move at around 120RPM (that's 2revolutions per seconds) for an image to showup.
More informations and pictures here : https://lumina.toys
2024-08-10 00:03:55 +02:00
Frank
db5e66a9b0 playing with Fire2012
* speedup: add functions to only blur rows or columns (50% faster)

* fire2012: tinkering with bur options. Vertical blur only when slider < 64 (faster); extra blur for  slider values >192 (bush burn)
2024-08-09 12:53:41 +02:00
Blaz Kristan
77723b615f Fix compiler warning 2024-08-08 21:10:27 +02:00
jdiamond
96c7716d3e Added a usermod for interacting with BLE Pixels Dice. 2024-08-08 03:13:33 +00:00
Blaz Kristan
ea80c1ed83 Swap WW & CW 2024-08-07 22:39:31 +02:00
Blaž Kristan
7d7b7c1e25
Merge pull request #4088 from willmmiles/stress-testing-scripts
Add stress testing scripts
2024-08-05 21:05:42 +02:00
Blaž Kristan
9d860c265c
Merge pull request #4089 from willmmiles/improved-locking
Improve jsonBufferLock management
2024-08-05 21:04:24 +02:00
Blaz Kristan
d234b4b0f1 SM16825 support
- add WW & CW swapping
2024-08-05 20:56:12 +02:00
Blaz Kristan
e1598a9966 Merge branch '0_15' into blending-styles 2024-08-05 16:47:25 +02:00
Blaz Kristan
e82f38e277 Tuning 2024-08-05 16:42:21 +02:00
Will Miles
1d27aa2f18 Move .ino to .cpp
This fixes platformio continually recompiling this file.
2024-08-04 15:47:02 -04:00
Will Miles
113dbbdf94 Use DEBUG_PRINTF_P for jsonBufferLock
Tiny code space usage reduction.
2024-08-04 15:27:23 -04:00
Will Miles
e701b5b5eb util: Print locking module when JSON lock fails
For debugging, also log who was trying to lock when it was contended.
2024-08-04 15:27:23 -04:00
Will Miles
6f01896d04 requestJSONBufferLock: Fix locking implementation
On ESP8266, it isn't permissible to call delay() in system context;
ensure this is legal before waiting.

On ESP32, use an operating system mutex to ensure consistent variable
state in a multicore environment, and manage the wait without needing
to loop.
2024-08-04 15:27:18 -04:00
Will Miles
5582bbac60 stress_test: Add code for logging responses 2024-08-04 13:47:37 -04:00
Blaž Kristan
d2401a212a
Merge pull request #4082 from PaoloTK/fix_esp32c3_pwm_bit_depth
Fix incorrect PWM bit depth on Esp32 with XTAL clock
2024-08-04 17:10:21 +02:00
Blaz Kristan
52548542d2 Remove clock/max bit overrides
Move contants into bus manager
2024-08-04 17:05:47 +02:00
Will Miles
509cbdf476 Add UDP test code
Courtesy of @_tvk_ on Discord
2024-08-04 09:57:01 -04:00
Will Miles
5a6ebd6657 stress_test: Allow replication argument 2024-08-04 09:57:01 -04:00
Will Miles
541d3f286a stress_test: Make it worse
Read 40 copies!
2024-08-04 09:57:01 -04:00
Will Miles
0191af412b stress_test: Add small JSON target
Good for measuring quick response performance
2024-08-04 09:57:01 -04:00
Will Miles
abcd2a2d01 tools/stress_test: Allow command line target spec 2024-08-04 09:57:01 -04:00
Will Miles
91efcb910b stress_test: Add a larger JSON target 2024-08-04 09:57:01 -04:00
Will Miles
e9b7320d1c Add preliminary web stress test script 2024-08-04 09:57:01 -04:00
PaoloTK
779744bd8e typo in comment 2024-08-03 15:56:29 +02:00
PaoloTK
1123d85fd2 removed float math and log(), added max bit width 2024-08-03 15:54:39 +02:00
PaoloTK
5c247d2833 first implementation 2024-08-01 20:25:18 +02:00
Robin Meis
17fdb4f5c9 Allow lower values for touch threshold 2024-08-01 19:49:47 +02:00
Blaž Kristan
365c1987ed Missing clipping fix
- small speed optimisations
2024-08-01 10:24:40 +02:00
Blaz Kristan
c03422ee37 Push variants 2024-07-30 17:26:50 +02:00
Frank
ef8f23ce90
Merge pull request #4073 from axlan/devcountainer-runargs
Add example runArgs to devcountainer to access serial port (for firmware upload) directly from the devcontainer.
2024-07-30 12:45:16 +02:00
jdiamond
050f7ebddf Add note for Windows. 2024-07-29 18:00:46 +00:00
jdiamond
10fdf46410 Clarify security implicatations. 2024-07-29 17:34:10 +00:00
Blaž Kristan
49976ae35a
Merge pull request #4078 from apanteleev/fire-blur-control
Add a parameter for blur amount in the Fire 2012 effect
2024-07-29 07:31:33 +02:00
Frank
21afb05409
Merge pull request #4077 from adrianschroeter/0_15
2DGEQ: Getting same sized bar width on 32x32 display, and better distribution of bar width in general.
2024-07-28 17:35:08 +02:00
Alexey Panteleev
0af1ec3bde Added a parameter for blur amount in the Fire 2012 effect. 2024-07-27 12:33:59 -07:00
Adrian Schröter
343d766ddd
2DGEQ: Getting same sized bar width on 32x32 display
before a x=32 (n times of 16) had not equal sized bars, but first was
a single pixel and later a bar had 3 pixel width. This solves it to
have always 2 pixel sized bars.

I have to admit that I did not test with other pixel dimensions.
2024-07-27 12:44:16 +02:00
jdiamond
02cae2e61e Add example runArgs to devcountainer to access serial port. 2024-07-25 04:47:44 +00:00
Blaz Kristan
1975c9c34a Merge branch '0_15' into blending-styles 2024-07-24 14:18:16 +02:00
Frank
42decbddd9
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-22 11:25:00 +02:00
Blaz Kristan
d88bb3c668 Merge branch '0_15' into blending-styles 2024-07-18 20:26:51 +02:00
Blaz Kristan
b71467b9be LED settings remove output bugfix 2024-07-17 22:24:08 +02:00
Damian Schneider
ac503ef72e adding boot-up delay define
use
-D WLED_BOOTUPDELAY=500
in platformio env definition to add 500ms of delay before hardware init.
2024-07-17 18:54:33 +02:00
Frank
ea608cecb0
Merge pull request #3962 from gaaat98/esp8266-audioreactive-sync
ESP8266 audioreactive UDP sound sync ported from MoonModules/WLED - receive only
2024-07-13 10:16:07 +02:00
Frank
2e266ec945 use fixes-size stack buffer
... protected against array overflow due to previous "if (packetSize <= UDPSOUND_MAX_PACKET)"
2024-07-13 09:55:59 +02:00
Blaž Kristan
bec1adf7ad
Merge pull request #4035 from willmmiles/esp8266_pwm_fix 2024-07-13 07:13:09 +02:00
Will Miles
2fc2f47d06 ESP8266PWM: Annotate sources
Add additional clarification as to the original source URL and the
specific local patches.
2024-07-12 19:16:31 -04:00
Frank
3a8e19d1b4 audiosync receive improvements (maintainer edit)
* fixed a few typo's in comments
* fixed 8266 specific warning about 'comparison of integer expressions of different signedness'

based on recommendations made by @willmmiles:
* make sure that audioSyncPacket is the same size  (44bytes) on all platforms
* use static buffer for receiving (avoids heap fragmentation)
* copy receive buffer to local audioSyncPacket struct - avoids alignment problems
* esp32 only: to stay in sync with UDP, Udp.flush() is needed when Udp.parsePacket() is _not_ followed by Udp.read()
2024-07-12 22:09:52 +02:00
gaaat98
cc9db0220c
removed audioreactive usermod build flag 2024-07-12 16:59:08 +02:00
Blaz Kristan
13ed78be96 Merge branch '0_15' into blending-styles 2024-07-11 21:30:10 +02:00
Blaz Kristan
cd1ede38a7 Size & speed optimisations 2024-07-11 21:22:58 +02:00
Blaž Kristan
1ec68c428a
Merge pull request #4051 from Nickbert7/patch-1
Fix typo in "Battery" usermod (Build Failed)
2024-07-11 18:52:30 +02:00
Niklas Fäth
f6ed3bc9db
Fix typo in "Battery" usermod (Build Failed) 2024-07-11 13:56:33 +02:00
Blaz Kristan
34cdda2e28 Merge branch '0_15' of https://github.com/aircoookie/WLED into 0_15 2024-07-10 15:08:34 +02:00
Blaž Kristan
4ab2c907f5
Merge pull request #4048 from willmmiles/mpu6050-crash-fix
Mpu6050 usermod crash fix
2024-07-10 06:31:41 +02:00
Will Miles
8632d99341 MPU6050: Fix crash when enabling
Avoid reconfiguring the device during web server context, which can
trigger a yield().  Instead defer the device initialization to loop().
2024-07-09 18:49:53 -04:00
Blaz Kristan
efa32ed4f6 Size optimisations 2024-07-09 21:50:27 +02:00
Blaz Kristan
551b8af76d Hide 2D effects on 1D segments 2024-07-09 19:00:32 +02:00
Blaz Kristan
887254f5da Bugfixes
- LED memory calculation (not UI)
- potential fix for #4040
- compiler warning in FX
2024-07-07 14:18:51 +02:00
Blaz Kristan
0275bd1d45 On/Off blending respected 2024-07-05 21:23:59 +02:00
Blaz Kristan
f3891c305d Merge branch '0_15' into blending-styles 2024-07-05 21:22:29 +02:00
Blaz Kristan
5874b78349 Bugfixes
- FX: Breathe, Meteor
- IR: use Segment
- UI: palette search, LED settings
2024-07-05 21:22:05 +02:00
Blaž Kristan
a812fc07f2
Merge pull request #4033 from adamsthws/0_15_internal_temp_usermod_improvement_new
Usermod Updated: Internal Temperature V2
2024-07-03 07:12:52 +02:00
Adam Matthews
78e7312adf Update usermod internal temperature
Enabled the storing the currently active preset or playlist for it to be restored later
2024-07-01 00:26:03 +01:00
Blaz Kristan
593970ed6d Merge branch '0_15' into blending-styles 2024-06-30 10:45:54 +02:00
Blaz Kristan
693bf4816b Minor tweaks. 2024-06-30 10:44:25 +02:00
Blaz Kristan
b8b11880b0 Merge branch 'main' into 0_15 2024-06-29 20:27:37 +02:00
Blaz Kristan
0ff4016250 WLED 0.15.0-b4 release
- LED settings update (limit to available outputs)
- minor fixes
2024-06-29 20:22:47 +02:00
Blaz Kristan
e753f3849e Revert "WLED 0.15.0-b4 release"
Messed FX_fcn.cpp CRLF conversion
2024-06-29 20:18:30 +02:00
Blaz Kristan
7b248c8fb2 WLED 0.15.0-b4 release
- LED settings update (limit to available outputs)
- minor fixes
2024-06-29 16:36:27 +02:00
Blaž Kristan
f0e4dd90ee
Merge pull request #4013 from wesleygas/0_15
Add LD2410 sensor usermod
2024-06-29 16:21:21 +02:00
Blaž Kristan
c540ec5417
Update readme.md 2024-06-29 16:17:46 +02:00
Blaž Kristan
3615ab535b
Merge pull request #4028 from Aircoookie/dependabot/pip/urllib3-1.26.19
Bump urllib3 from 1.26.18 to 1.26.19
2024-06-29 16:11:39 +02:00
Blaž Kristan
b8d6ebe882
Merge pull request #4023 from Aircoookie/dependabot/npm_and_yarn/braces-3.0.3
Bump braces from 3.0.2 to 3.0.3
2024-06-29 16:11:26 +02:00
Blaž Kristan
1f27872294
Merge pull request #3995 from Aircoookie/dependabot/pip/requests-2.32.0
Bump requests from 2.31.0 to 2.32.0
2024-06-29 16:10:58 +02:00
Adam Matthews
3815516022 Fixes to feature update for Internal Temperature usermod
Simplified the code by removing an unnecessary function definition and instead using direct assignment in the place where the function was previously called.
2024-06-28 16:12:56 +01:00
Adam Matthews
a1dfdced31 Fixes to feature update for Internal Temperature usermod
- Updated all doubles to floating-point literals by adding explicit `f` suffix

- Removed all remaining html from readme markdown documentation.
2024-06-28 15:47:54 +01:00
Will Miles
ff39a8db3f Fix PWM crashes on ESP8266
Vendor in the ESP8266 Arduino core PWM library, with a fix for a nasty
NMI crash bug.  Sometimes the NMI return instruction seems to fail,
resulting in an infinite loop as the PC gets stuck.  Work around this
by backing up and restoring the PC if needed.
2024-06-27 21:30:05 -04:00
Adam Matthews
9877e899e0 Fixed images in readme
Github flavoured markdown didn't work as expected.
2024-06-27 17:52:41 +01:00
Adam Matthews
bc4a6138b1 Fixes to feature update for Internal Temperature usermod
Applied various fixes as advised by @blazoncek

Thankyou for the advice!

- Updated float: 95.0 > 95.0f

- Updated type: const > constexpr

- Comments clarified

- Preset setting: `-1` > `0`
2024-06-27 17:33:37 +01:00
Adam Matthews
f825cab54a Usermod Updated: Internal Temperature V2
# Added high temperature indicator/action...

- A configurable preset is activated when the internal temperature raises above a configurable threshold temperature.

- When the internal temperature falls back below the threshold, the previously active preset is re-activated.

- To prevent frequent toggling between states when the temperature is close to the threshold, the reset threshold is slightly lower than the activation threshold to provide a small buffer.

- Reset threshold is automatically calculated to be two degrees lower than whatever the activation threshold is set to.

- To prevent the user setting the loop interval too low, a minimum allowable interval has been added.
2024-06-26 20:27:53 +01:00
Blaž Kristan
57b01c2711
Merge pull request #4030 from rorosaurus/0_15
add ETH support for LILYGO-POE-Pro
2024-06-26 12:01:36 +02:00
Blaž Kristan
5f3e3d7796
Merge pull request #4017 from xkvmoto/patch-2
Update usermod_sn_photoresistor.h
2024-06-26 11:56:15 +02:00
Blaz Kristan
bee75a4508 Hide 2D blending styles on non-2D set-up 2024-06-23 14:14:26 +02:00
Blaz Kristan
a4ac444bda Merge branch '0_15' into blending-styles 2024-06-23 14:10:43 +02:00
Blaz Kristan
d13b8c8421 Move LED_BUILTIN handling to BusManager class
- reduce max panels
2024-06-23 14:09:18 +02:00
Blaz Kristan
0af3063127 Enhancements
- edit WiFi TX power (ESP32)
- keep current ledmap ID in UI
- limit outputs in UI based on length
- wifi.ap addition to JSON Info
- relay pin init bugfix
- file editor button in UI
2024-06-23 14:08:18 +02:00
Rory Hayes
17e1975dd8 add ETH support for LILYGO-POE-Pro
Also includes minor spelling corrections for CONTRIBUTING.md
2024-06-18 16:07:46 -07:00
dependabot[bot]
166eeacab9
Bump urllib3 from 1.26.18 to 1.26.19
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.18 to 1.26.19.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/1.26.19/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.26.18...1.26.19)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-18 01:26:00 +00:00
Blaz Kristan
296df2660a Merge branch '0_15' into blending-styles 2024-06-16 18:22:21 +02:00
dependabot[bot]
017169f1a1
Bump braces from 3.0.2 to 3.0.3
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-16 12:12:05 +00:00
Blaz Kristan
ed0e73803f Minor tweaks for ESP8266
- update was restarting device on some occasions
- a bit of throttling in UI
2024-06-14 22:12:09 +02:00
Blaz Kristan
f4475b9d2a Dynamic parallel I2S output
- update NeoPixelBus to v2.8.0
- use single/mono I2S + 4x RMT for 5 outputs or less
- use parallel x8 I2S + 8x RMT for >5 outputs (limit of 300 LEDs per output)
2024-06-12 18:00:00 +02:00
Brandon502
b9849da66e Added Cube Mapping tool 2024-06-08 13:16:56 -04:00
xkvmoto
8a1df9afee
Update usermod_sn_photoresistor.h
Allow to configure the analog input pin for the Photoresistor.
2024-06-07 19:50:45 +02:00
wesleygas
9cfb56d9c6 Add LD2410 sensor usermod 2024-06-04 21:39:31 -03:00
Blaz Kristan
25ade86994 Filter/sort bugfix 2024-06-04 17:05:11 +02:00
Blaz Kristan
da484b07f5 Use transition style for palette and color change
- as requested by @willmmiles & @tkadauke
2024-06-02 21:30:44 +02:00
Blaz Kristan
20c0916adc Merge branch '0_15' into blending-styles 2024-06-02 21:25:24 +02:00
Blaz Kristan
c10ec2962b Fix custom palette reorder on search 2024-06-02 21:25:05 +02:00
Blaz Kristan
de5632b1cf Merge branch '0_15' into blending-styles 2024-06-01 17:54:57 +02:00
Blaž Kristan
1bb06106fd
Merge pull request #4001 from DevilPro1/smartnest
Fixed code of Smartnest and updated documentation
2024-06-01 17:52:55 +02:00
Blaž Kristan
bc18cdbeea
Merge pull request #4010 from cstruck/fix_esp32_s3_zero_wifi_not_working
fix: esp32 s3 zero rev v0.2 wifi not working
2024-06-01 14:43:33 +02:00
Christian Struck
67df5d6dcc
fix: ESP32-S3 rev v0.2 seems to need the wifi fix 2024-06-01 09:09:01 +02:00
Blaz Kristan
68a7282b27 Speed and size optimisations in FX.cpp
- replace uint8_t and uint16_t with unsigned
- replace in8_t and int16_t with int
- reduces code by 1kB
- WARNING may break effects that rely on overflow/narrow width (most fixed)
2024-05-31 15:58:18 +02:00
Blaz Kristan
5732b66c5a Add UI error description. 2024-05-31 15:50:10 +02:00
devilpro1
f1cce8ef46
Update readme.md 2024-05-29 20:14:12 +02:00
devilpro1
e47932c9aa
Update usermod_smartnest.h 2024-05-29 20:13:37 +02:00
Blaž Kristan
3a70fb0e15
Merge pull request #3897 from muebau/fix_usermod_tetisai
reset usermod TetrisAI back to initial version
2024-05-27 20:22:26 +02:00
muebau
d5da84dcb2 add more information of the partition table to readme 2024-05-27 18:36:48 +02:00
muebau
1bd051d703 fixed link to partition table 2024-05-27 18:15:39 +02:00
muebau
abb55f8e4b center the canvas if the segment exceeds the maximum width or height 2024-05-27 13:29:03 +02:00
muebau
46f6a257d0 fixed another throw statement 2024-05-26 22:08:01 +02:00
muebau
97e4eec5be avoid exceptions to stay compatible with ESP8266
add limitaion information to readme
2024-05-26 21:00:13 +02:00
muebau
69b99abb7d improved readme 2024-05-26 15:46:23 +02:00
devilpro1
08f6d5a683
Add files via upload 2024-05-26 12:46:45 +02:00
devilpro1
627bea30ed
Delete usermods/smartnest directory 2024-05-26 12:46:34 +02:00
muebau
caf0a5bbe8 changed the last double variables and values to float and add more hints to readme 2024-05-26 11:01:57 +02:00
Blaz Kristan
501f988b0f ESP-NOW usermod hook 2024-05-25 20:01:38 +02:00
muebau
5f0c6fce74 fixed static or global variables
use of strip.now instead of millis()
use float instead of double
respond to changes in segment size
make effect usable with multible segments
2024-05-23 18:51:55 +02:00
muebau
78089107b7 Merge remote-tracking branch 'upstream/0_15' into fix_usermod_tetisai 2024-05-23 16:15:35 +02:00
Blaž Kristan
f3b0906cea
Merge pull request #3993 from gsieben/0_15
Update wled.h regarding OTA Password
2024-05-21 21:22:35 +02:00
Blaž Kristan
9f581c6181
Merge pull request #3994 from gsieben/0_15-Usermod-BME68X-Pull-Request
Usermod BME68X Sensor Implementation rebased for WLED 0.15
2024-05-21 21:20:47 +02:00
Blaž Kristan
31b232d3f3
Merge pull request #3977 from LordMike/feature/aht10_usermod
Add a usermod for AHT10, AHT15 and AHT20 temperature/humidity sensors
2024-05-21 21:20:03 +02:00
Blaž Kristan
77e6a6de61
Revert .gitignore 2024-05-21 18:23:25 +02:00
Blaž Kristan
85702a8142
Merge branch '0_15' into feature/aht10_usermod 2024-05-21 18:21:16 +02:00
Blaž Kristan
0bcdc9641d
Merge pull request #3968 from adamsthws/0_15_battery_usermod_readme
Update Battery usermod documentation
2024-05-21 18:17:08 +02:00
Blaž Kristan
bfd1bdfc64
Merge branch '0_15' into 0_15-Usermod-BME68X-Pull-Request 2024-05-21 18:14:23 +02:00
Blaž Kristan
c1fed6d469
Merge pull request #3986 from LordMike/feature/ina226_usermod
Add INA226 usermod for reading current and power over i2c
2024-05-21 18:12:03 +02:00
Gabriel Sieben
79ffe021e4
Update usermod_bme68x.h
One error message was in German
2024-05-21 11:41:57 +02:00
dependabot[bot]
a1c348b365
---
updated-dependencies:
- dependency-name: requests
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-21 05:40:22 +00:00
Gabriel Sieben
904b1f114b
Merge branch 'Aircoookie:0_15' into 0_15 2024-05-20 22:30:28 +02:00
Gabriel Sieben
63f481d498
Update wled.h
Accidentally included changes removed.
2024-05-20 22:09:20 +02:00
Gabriel Sieben
fc5c19788e
Update usermod_bme68x.h 2024-05-20 14:49:05 +02:00
Gabriel Sieben
56e0bde8ab Rebase of the user mode BME68X sensor in WLED 0.15 2024-05-20 14:45:01 +02:00
Gabriel Sieben
db2cdca71b Revert "First implementation of the user mods for the BME68X sensor in WLED 0.15"
This reverts commit faa2fba6b94ba86a48cd374a4090112f39b3bb6d.
2024-05-20 14:25:08 +02:00
Gabriel Sieben
faa2fba6b9 First implementation of the user mods for the BME68X sensor in WLED 0.15 2024-05-20 14:10:25 +02:00
Gabriel Sieben
f727ea2874 Update wled.h
OTA_PASS
2024-05-20 13:13:40 +02:00
Blaž Kristan
4a7ef07089 Fix for #3991 2024-05-20 12:24:26 +02:00
Michael Bisbjerg
0df726cdab Add note to platformio override sample 2024-05-18 15:52:01 +02:00
Blaz Kristan
2f6f0d2f3e WLED 0.14.4 2024-05-18 15:17:08 +02:00
Blaz Kristan
fae5938b0a Build bump, changelog update 2024-05-18 13:01:28 +02:00
Blaz Kristan
2ec3639900 Merge branch 'main' into 0_15 2024-05-18 11:24:18 +02:00
Blaz Kristan
4513404629 Fix for #3987 2024-05-18 11:15:16 +02:00
Blaz Kristan
13bfda56ef Auto segment creation bugfix
- additional debug
- minor optimisation
2024-05-18 11:11:40 +02:00
Michael Bisbjerg
075c164407 Fix bug in triggered measurements 2024-05-17 15:03:56 +02:00
Michael Bisbjerg
dcb5049f97 Move to individual settings for samples and conversion time 2024-05-17 14:36:27 +02:00
Michael Bisbjerg
d24cf14009 Triggered & continuous modes 2024-05-17 14:36:27 +02:00
Michael Bisbjerg
3d34802ab2 Initial ina226 2024-05-17 14:36:27 +02:00
Blaz Kristan
2aec21a6d0 Palette loading optimisation
- fixes #3978
- FX: Firenoise can use selected palette
2024-05-16 06:23:15 +02:00
Adam Matthews
19ccff9ff1
Merge branch '0_15' into 0_15_battery_usermod_readme 2024-05-15 22:15:18 +01:00
Michael Bisbjerg
1dd9c6754c Cleanup unecessary struct 2024-05-15 21:32:08 +02:00
Michael Bisbjerg
f9467ceaf1 Fix state issue on change reporting, add override sample ini 2024-05-15 21:26:30 +02:00
Blaz Kristan
ccce0f2d3b Merge branch '0_15' into blending-styles 2024-05-15 20:59:41 +02:00
Michael Bisbjerg
f51da4f0c4 Change reporting to be on significant changes 2024-05-15 18:56:45 +02:00
Michael Bisbjerg
2eff389fff Handle feedback
- Reduce some strings
- Use an unnamed struct to pack the bitfield instead
2024-05-15 18:44:36 +02:00
Blaz Kristan
77ca2ec0e9 Compiler warning fix 2024-05-15 15:35:14 +02:00
Blaz Kristan
77e6ea8a6f Palette loading optimisation
- fixes #3978
- FX: Firenoise can use selected palette
2024-05-15 15:34:53 +02:00
Frank
e33299bbd7
Merge pull request #3961 from Brandon502/0_15
Added Pinwheel Expand 1D ->2D effect mapping mode
2024-05-15 14:22:10 +02:00
Michael Bisbjerg
74e273274c Replace 5 booleans with 1 byte flags field 2024-05-14 23:15:59 +02:00
Michael Bisbjerg
02bf5902f0 Add MQTT and HASS support for AHT10 2024-05-14 22:57:19 +02:00
Blaž Kristan
5f41de8938
Merge pull request #3966 from LordMike/feature/bme280_changeable_i2c
Add changeable i2c address to BME280 usermod
2024-05-14 19:39:42 +02:00
Michael Bisbjerg
f71d839009 Address comments 2024-05-14 18:02:39 +02:00
Brandon502
3cb6b17316 Pinwheel fix 2024-05-14 11:46:52 -04:00
Brandon502
c0cb677a4c Pinwheel cleanup 2024-05-14 11:30:33 -04:00
Frank
a5a6a8eaee pinwheel : fix holes on large matrix, minor code cleanup
there were still two holes in my 52x52 setup --> added "XL" size for bigger than 50x50 - achieves 18fps on 52x52
2024-05-14 11:30:25 +02:00
Frank
ecb861de56 pinwheel code cleanup
reducing code duplication between sPC and gPC
2024-05-14 10:36:50 +02:00
Brandon502
1d20f18d3f Pinwheel bugfix
Fixed getPixelColor.
2024-05-13 17:43:31 -04:00
Michael Bisbjerg
68f6b3452e Initial implementation of the AHT10/AHT15/AHT20 sensors 2024-05-13 23:12:57 +02:00
Michael Bisbjerg
60075f6e8c Avoid storing the settings of bme280 globally 2024-05-13 20:22:31 +02:00
Frank
1d7789f544 pinwheel bugfixing
* setPixelColor: ensure that 0/0 is used
* getPixelColor: accuracy improvements

unfortunately, "scrolling" audioreactive effects are still not working properly - they end after 1/4 of the circle. Could be due to limited resolution of getPixelColor.
2024-05-13 19:27:41 +02:00
Michael Bisbjerg
bd10a9aa26 Change BME280I2C to be reused between configs 2024-05-13 18:35:13 +02:00
Blaz Kristan
1ceeed38bc Another fix for fix :rolleyes: 2024-05-13 14:30:30 +02:00
Brandon502
2e1e917952 Merge branch '0_15' of https://github.com/Brandon502/WLED into 0_15 2024-05-12 17:46:52 -04:00
Brandon502
9e0b91ac17 Pinwheel changes.
Jump distance for odd rays fixed. Removed holes on rectangular matrices.
2024-05-12 17:46:42 -04:00
Frank
ea83ec496b pinwheel - parameter tuning to fix some holes
fixing holes that appeared during testing
* at 52x52 (big 296 -> 304)
* at 24x32 (medium 192 -> 208)
* at 12x16 (small 72 -> 82)

... there is still one hole at 14x16 ... well wtf
2024-05-12 23:05:58 +02:00
Frank
f26bb26ffa Update FX_fcn.cpp
* minor cleanup, moved prevRay into setPixelColor
* removed experimental code (too slow)
* comments cleanup
2024-05-12 22:35:33 +02:00
Frank
28348f919b Merge branch '0_15' into pr/3961 2024-05-12 21:30:59 +02:00
Brandon502
c84d4c637d Pinwheel Expand 1D Optimization
Changed method for drawing odd numbered rays.
2024-05-12 11:52:31 -04:00
Blaz Kristan
04706cfa9c JS fix & warning 2024-05-12 16:34:07 +02:00
Frank
3078bea7cc Pinwheel optimization: do nor repaint "same" pixels in a line
avoids back to back duplicates within the same line
2024-05-12 13:29:04 +02:00
Frank
c91e0fc988 Merge branch '0_15' into pr/3961 2024-05-12 13:25:46 +02:00
Blaž Kristan
5183af4e8a Typo. 2024-05-12 11:30:57 +02:00
Blaž Kristan
1ff5cb0596 Experimental parallel I2S support for ESP32
- increased outputs to 17
- increased max possible color order overrides
- use WLED_USE_PARALLEL_I2S during compile

WARNING: Do not set up more than 256 LEDs per output when using parallel I2S with NeoPixelBus less than 2.9.0
2024-05-12 11:12:13 +02:00
Blaž Kristan
f441ce9c17 Merge branch '0_15' into blending-styles 2024-05-12 08:12:58 +02:00
Blaž Kristan
522e5e7957
Merge pull request #3964 from adamsthws/0_15_battery_usermod_init_improvement
Update Usermod: Battery
2024-05-11 21:11:26 +02:00
Brandon502
9e468bd059 Pinwheel Expand 1D Optimizations
Added small pinwheel size. Adjusts medium and large values.
2024-05-11 13:57:21 -04:00
Frank
ecc9443677 (0_14 branch only) adding compatibility for building with upstream arduinoFFT 2.xx
support compilation with new arduinoFFT versions 2.x
2024-05-11 14:45:42 +02:00
Adam Matthews
6b8d8bf735 Update Battery usermod documentation
Improved wiring, installation and calibration instructions.

Example screenshots added.

Minor grammar improvements.

Heading visual consistency improved.

Improved vertical separation between sections
(separator lines added).

Thankyou!
2024-05-11 13:34:35 +01:00
Michael Bisbjerg
43d024fe42 Make BME280 usermod i2c address changeable 2024-05-11 12:23:53 +02:00
Blaž Kristan
c016dedea4
Merge pull request #3965 from LordMike/bugfix/usermod_bme280 2024-05-11 07:42:09 +02:00
Michael Bisbjerg
b9ca2cfe90 Fix missing conversions of bme280 values
The BME280 usermod uses a multiply-round-divide approach to cap the temperature/humidity/pressure values to some number of decimals. But the divide-part was missing in a few instances.
2024-05-10 22:44:46 +02:00
Brandon502
d3492b5b6c Pinwheel Expand 1D Bug Fix
Removed holes on 31x31 and 32x32 grids.
2024-05-10 16:06:37 -04:00
Blaž Kristan
3682cd6a5e
Merge pull request #3913 from Aircoookie/tm1914
Tm1914 chip support
2024-05-10 21:44:40 +02:00
Blaz Kristan
b209b1e481 Peek on/off fix 2024-05-10 16:01:47 +02:00
Blaz Kristan
4afed48f58 Use libc trigonometric functions on ESP32 by default
- use custom (space saving) functions on ESP8266
2024-05-10 15:59:11 +02:00
Brandon502
6a18ce078e Pinwheel Expand1D changes
cosf/sinf changed to cos_t/sin_t. int_fast32_t and int_fast_16_t changed to int.
2024-05-09 20:38:41 -04:00
Adam Matthews
bc5aadff7d Update Usermod: Battery
Issue:
When taking the initial voltage reading after first powering on, voltage hasn't had chance to stabilize so the reading can be inaccurate, which in turn may incorrectly trigger the low-power preset. (Manifests when the user has selected a low read interval and/or is using a capacitor).

Resolution:
A non-blocking, fixed 10 second delay has been added to the initial voltage reading to give the voltage time to stabilize.

This is a reworked version of the (now closed) PR here:
https://github.com/Aircoookie/WLED/pull/3959

- Rebased the update for 0_15.

- Added a constant so the delay can be modified via my_config.h.

- Small adjustments to make the PR compatible again after the recent restructuring in this PR: (https://github.com/Aircoookie/WLED/pull/3003).

Thankyou!
2024-05-09 23:09:45 +01:00
Blaz Kristan
de89b516dc Merge branch '0_15' of https://github.com/aircoookie/WLED into 0_15 2024-05-10 00:04:43 +02:00
Blaz Kristan
4dbe9a7015 Antialiased line & circle 2024-05-10 00:02:28 +02:00
Blaz Kristan
a320f16404 Real math fix 2024-05-09 23:58:58 +02:00
gaaat
cec7241986 removed commented variables 2024-05-08 15:42:41 +02:00
gaaat
6de77293ad Merge branch '0_15' of https://github.com/Aircoookie/WLED into esp8266-audioreactive-sync 2024-05-08 15:36:10 +02:00
gaaat
0ac53d8353 initial port of MoonModules/WLED/pull/60 and related commit 2024-05-08 15:33:51 +02:00
Brandon502
da79b93387 Added Pinwheel Expand 1D Effect 2024-05-07 18:04:29 -04:00
Frank
b88c300d04 audioreactive: workaround for ArduinoFFT bug 93
This fix works around a problem that was solved in upstream ArduinoFFT 2.0.2
2024-05-07 23:38:19 +02:00
Blaz Kristan
88372cd516 Brighter peek (ignore strip brightness) 2024-05-07 16:34:15 +02:00
Blaž Kristan
b3206121cc
Merge pull request #3942 from gaaat98/audioreactive-analog
Enabled some audioreactive effects for single pixel strips/segments
2024-05-07 07:35:46 +02:00
gaaat98
5bccb5fc42
removed commented checks 2024-05-07 00:31:37 +02:00
Blaž Kristan
47e1cbdaff
Merge pull request #3003 from itCarl/usermod-battery-update2023
Usermod Battery 🔋 Added Support for different battery types, Optimized file structure
2024-05-06 20:41:00 +02:00
Maximilian Mewes
52020cbe26 CP fix 2024-05-06 17:46:26 +02:00
Maximilian Mewes
d33651c25b Update setup method 2024-05-06 17:45:02 +02:00
Maximilian Mewes
18e9f9c304 Rename Battery classes 2024-05-06 17:39:40 +02:00
Frank
2607c44fbb make objdump work
Script update based on latest version from Tasmota
* add support for all esp32 variants
* add "-C" : Decode (demangle) low-level symbol names into user-level C++ names.
2024-05-06 11:00:41 +02:00
gaaat
c8a7d44f55 Merge branch '0_15' of https://github.com/Aircoookie/WLED into audioreactive-analog 2024-05-06 00:09:43 +02:00
Frank
a6e536189c output_bin.py : fix for mapfile copy
The build script was not looking into the right place, so there was never a .map file dropped into build_output/map/

Builds with the newer arduino-esp32 v2.0.x framework actually generate a .map file that is placed directly next to firmware.bin
2024-05-05 21:56:01 +02:00
Frank
3f9a6cae53 AR: fix for arduinoFFT 2.x API
in contrast to previous 'dev' versions, the storage for windowWeighingFactors is now managed internally by the arduinoFFT object.
2024-05-04 14:34:23 +02:00
Frank
cd5494fdd2 AR pin config: SCK == 1 --> PDM microphone 2024-05-04 14:12:44 +02:00
Blaž Kristan
5ab1b14d6b
Merge pull request #3946 from freakintoddles2/0_15
Adds an API parameter to allow the user to skip to the next preset in a playlist at any time
2024-05-03 23:25:36 +02:00
Todd Meyer
379f181362 Further simplification 2024-05-03 11:51:47 -07:00
Todd Meyer
dd19aa63d0 Forgot F[], added it 2024-05-03 08:47:14 -07:00
Todd Meyer
6df3b417a9 Updated based on more feedback 2024-05-03 08:30:37 -07:00
Blaz Kristan
fa76431dd6 Changelog update 2024-05-03 16:08:20 +02:00
Blaz Kristan
6504fb68b6 Minor MQTT optimisation. 2024-05-03 15:46:16 +02:00
Blaz Kristan
2ff49cf657 Fix for #3952
- included IR optimisations & code rearrangement
2024-05-03 15:45:15 +02:00
Blaž Kristan
fa1aa1fe80
Merge pull request #3944 from paspiz85/pas4
Using brightness in analog clock overlay
2024-05-03 09:56:14 +02:00
Blaž Kristan
85b95a2940
Merge pull request #3945 from w00000dy/Webpage-shortcuts
Add Webpage shortcuts and Fix resizing bug
2024-05-03 09:53:00 +02:00
Todd Meyer
5e38039c4d Updated based on more feedback 2024-05-02 14:36:18 -07:00
Blaz Kristan
4df936a437 Fix for unfortunate prior CRLF coversion. 2024-05-02 10:33:10 +02:00
Blaz Kristan
736a8b1b80 Fix for rotating tablet into PC mode. 2024-05-02 10:31:50 +02:00
Pasquale Pizzuti
22f6128bc4 using global brightness 2024-05-02 09:05:37 +02:00
freakintoddles2
db475b6998
Update playlist.cpp 2024-05-01 10:09:17 -07:00
freakintoddles2
6daf7f6322
Update wled.cpp
reworked based on PR feedback
2024-05-01 10:07:52 -07:00
freakintoddles2
16086c0961
Update wled.h
reworked based on feedback from original PR
2024-05-01 10:05:26 -07:00
freakintoddles2
e88c81ad0d
Update set.cpp
reworked based on feedback
2024-05-01 10:04:02 -07:00
freakintoddles2
a2b9aed40d
Update playlist.cpp
reworked approach based on feedback
2024-05-01 10:03:16 -07:00
freakintoddles2
caa4fe1ec4
Update json.cpp
reworked approach based on feedback
2024-05-01 10:02:27 -07:00
freakintoddles2
25fb878e54
Update fcn_declare.h
reworked approach based on feedback
2024-05-01 10:01:30 -07:00
freakintoddles2
a1d6ffadad
Update json.cpp
adds support for np boolean parameter to skip to next preset
2024-04-30 16:49:52 -07:00
freakintoddles2
3b89814b69
Update set.cpp
added new NP command to API to allow user to skip to next preset in a playlist. Example use is win&NP in a preset.
2024-04-30 16:33:30 -07:00
freakintoddles2
071e0be445
Update fcn_declare.h
Updated to add the optional skipNext bool to handlePlaylist() which allows people to skip to the next preset when desired
2024-04-30 16:23:43 -07:00
freakintoddles2
bed364d75e
Update playlist.cpp
Updated to allow a user to optionally skip to the next preset in the playlist anytime they desire.
2024-04-30 16:21:40 -07:00
Woody
d2984e9e16
add Webpage shortcuts, resolves #2362 2024-04-30 18:57:53 +02:00
Maximilian Mewes
05a8c692f2 read initial voltage correctly 2024-04-30 18:11:18 +02:00
Pasquale Pizzuti
fd9570e782 using color_fade 2024-04-30 17:52:35 +02:00
Maximilian Mewes
35d26afcb4 Merge remote-tracking branch 'upstream/0_15' into usermod-battery-update2023 2024-04-30 17:12:08 +02:00
Maximilian Mewes
2245ee6fce bugfixes 2024-04-30 17:02:57 +02:00
Woody
ff10130176
Fix resizing bug
The bug was that when resizing the window, it always jumped to the Colors tab instead of staying on the currently selected tab.
2024-04-30 16:53:47 +02:00
Maximilian Mewes
a13f1a9bee bug fixes 2024-04-30 15:24:02 +02:00
Maximilian Mewes
3cc60fa4d4 Merge branch 'main' into usermod-battery-update2023 2024-04-30 15:01:23 +02:00
Maximilian Mewes
bd69c24231 intermediate update 2024-04-30 14:54:53 +02:00
Pasquale Pizzuti
c7d292a716 using brightness in analog clock overlay 2024-04-30 14:09:12 +02:00
gaaat
74bc159a52 enabled some audioreactive effects for single pixel strips/segments 2024-04-29 20:19:10 +02:00
Frank
9f99a1896d presets.json PSRAM caching: consider cacheInvalidate
* trying to make the caching mechanism bulletproof.
`cacheInvalidate` is changed when
- autosave usermod updates presets
- a file was upload
* (coding style) fixed some unitialized variables
2024-04-29 16:51:27 +02:00
Blaž Kristan
8110259d1c
Merge pull request #3892 from askask/pollreply 2024-04-28 09:32:04 +02:00
Frank
1048bf993a
use lolin_s3_mini for esp32-S3 4MB buildenv 2024-04-27 23:34:35 +02:00
Blaž Kristan
3eba0f4e0d
Merge pull request #3933 from gaaat98/0_15
Improved brightness change via long button presses
2024-04-27 12:53:56 +02:00
gaaat98
d7e0b364d1
fixed wrong comment 2024-04-27 12:25:34 +02:00
Blaz Kristan
25dd43b949 Bugfix for bugfix
- thanks @softhack007
2024-04-26 23:49:34 +02:00
Blaz Kristan
8e8ffa30a6 Merge branch '0_15' into blending-styles 2024-04-26 20:45:26 +02:00
Blaz Kristan
69da2f4b23 Merge branch '0_15' into tm1914 2024-04-26 20:41:56 +02:00
Blaz Kristan
d48bab02a1 Speed & size optimisations using native sized variables 2024-04-26 20:11:46 +02:00
Blaz Kristan
886120fe9f Bugfix
- getPixelColor() for analog
- RMT channel (#3922)
2024-04-26 20:07:27 +02:00
gaaat98
bdd4d9f3ff
set buttonBriDirection as local static 2024-04-26 18:23:34 +02:00
gaaat
6276c2f1f5 improved brightness change via long button presses 2024-04-26 16:39:32 +02:00
Blaž Kristan
b3acc97d03
Merge pull request #3920 from Suxsem/relay-3-states
Relay open drain output (allow esp32 to drive 5v relay modules)
2024-04-26 07:06:03 +02:00
Suxsem
24bd1db4fc "X" span near to the number input field 2024-04-26 00:29:48 +02:00
Blaz Kristan
e83d3cb4a3 Fix for #3878 2024-04-24 16:04:54 +02:00
Blaz Kristan
674481f0d1 Multiple fixes
- several compile warning fixes
- multipin LED compile config
- release info (update page, JSON "info")
- WiFi scan fix if no networks found
- UI glitch when no presets are found fix

With multipin LED config it is now possible to assign GPIO to PWM RGB outputs.
Achieved by having length of DATA_PINS be divisble by lengt of PIXEL_COUNTS.
2024-04-23 19:05:49 +02:00
Blaz Kristan
5d271d21bc INI cleanup
added 8M ESP32 and 16M ESP32-S3
2024-04-23 18:55:36 +02:00
Frank
4e4493e627
Merge pull request #3902 from Aircoookie/arduino_2_0_9
update esp32 platform to arduino-esp32 v2.0.9
2024-04-23 15:56:08 +02:00
Frank
1154905818 upgrading WROVER to use new platform 2024-04-23 15:49:39 +02:00
Frank
0d3ea848c2 "big partition" added - 300KB FS and coredump support(from WLEDMM) 2024-04-23 15:27:44 +02:00
Frank
8ffe1e65fd
audioreactive: arduino-esp32 up to 2.0.14 still has the swapped-channel-bug 2024-04-23 15:07:08 +02:00
Blaž Kristan
127ea7e351 Fix for #3926 2024-04-23 13:04:17 +02:00
Suxsem
34b16f1919 optimizations 2024-04-21 20:02:00 +02:00
Suxsem
fa32faf759 feat(new): relay open drain output 2024-04-21 13:37:07 +02:00
Blaz Kristan
6f3d7e76c9 Fix for #3919 2024-04-19 22:54:25 +02:00
Frank
57665e8964
audioreactive readme - removed UM_AUDIOREACTIVE_USE_NEW_FFT
The customized library is not needed / supported any more in 0_15.
2024-04-18 12:16:04 +02:00
Blaz Kristan
5c502b1fe4 Bump arduinoFFT, organise partitions 2024-04-17 22:49:33 +02:00
Blaz Kristan
6d1410741d Fix 8266 compile 2024-04-17 19:00:16 +02:00
Blaz Kristan
3e20724058 ArduinoFFT update
shadow variables
2024-04-17 18:52:35 +02:00
Blaž Kristan
197f47befe
Merge pull request #3905 from w00000dy/main
Set stale lable to 'stale' and increase operations-per-run in stale.yml
2024-04-16 20:31:16 +02:00
Blaž Kristan
d126611e87
Merge pull request #3904 from DedeHai/FX_fcn_improvements
added improvements to color scaling and blurring
2024-04-16 17:41:20 +02:00
Blaž Kristan
1b75be5710
Update FX_2Dfcn.cpp
Undo indent
2024-04-16 17:37:48 +02:00
Woody
6272969983
Set stale-pr-label & stale-issue-label to 'stale' in stale.yml
Hopefully this fixes the error messages that were thrown the last time the action was executed
2024-04-16 15:07:12 +02:00
Damian Schneider
084fc2fcd1 bugfix & code formatting, removed color_scale
also replaced scale8_video with 32bit calculation in color_fade for consistency and speed.
2024-04-16 10:43:06 +02:00
Woody
b2e68db380
Increase operations-per-run in stale.yml again 2024-04-15 22:56:38 +02:00
Damian Schneider
459156fe57 added improvements to color scaling and blurring
-changes save roughly 600bytes of flash
-made blurring faster by not writing the color and then reading it back but keeping it as a variable: on a C3, FX black hole goes from 55FPS to 71FPS
-added optional parameter to blur (smear) that can be used in combination with SEGMENT.clear(), blurring the frame without dimming the current frame (repeated calls without clearing will result in white). this is useful to blur without 'motion blurring' being added
-scale8 is inlined and repeated calls uses flash, plus it is slower than native 32bit, so I added 'color_scale' function which is native 32bit and scales 32bit colors (RGBW).
2024-04-15 21:20:45 +02:00
Blaz Kristan
7abfe68458 Add support for TM1914 chip 2024-04-15 16:13:13 +02:00
Frank
442d7a7226 arduino-esp32 v2.0.9 2024-04-15 14:08:28 +02:00
Blaž Kristan
80ebcb2c28
Merge pull request #3901 from w00000dy/main
Increase operations-per-run in stale.yml
2024-04-14 15:47:31 +02:00
Blaz Kristan
9735d1c6f3 Merge branch '0_15' into blending-styles 2024-04-14 15:41:08 +02:00
Blaz Kristan
ef017fd343 Revert FX.cpp 2024-04-14 15:34:59 +02:00
Woody
cd928bc586
Increase operations-per-run in stale.yml
Because of this we don't need to run this action 3 times a day
2024-04-14 13:14:03 +02:00
dependabot[bot]
d2b4d25317
Bump idna from 3.4 to 3.7 (#3895)
Bumps [idna](https://github.com/kjd/idna) from 3.4 to 3.7.
- [Release notes](https://github.com/kjd/idna/releases)
- [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.rst)
- [Commits](https://github.com/kjd/idna/compare/v3.4...v3.7)

---
updated-dependencies:
- dependency-name: idna
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-13 19:38:03 +02:00
Woody
a418cd2a2a
Activate stale (#3898)
* Update stale.yml

Update pr text
Schedule action 3 times a day

* Delete old .github/stale.yml

* Set exempt-all-milestones to true in stale.yml
2024-04-13 19:37:49 +02:00
Blaz Kristan
94cdd88474 Version bump B3
- fix for #3896
- fix WS2815 current
- conditional AA setPixelColor()
2024-04-13 18:25:25 +02:00
muebau
1bdf3876fc reset usermod TetrisAI back to initial version 2024-04-12 12:00:15 +02:00
Blaz Kristan
30435e6406 2D compile fix 2024-04-11 20:11:29 +02:00
Blaz Kristan
bd1c06a7a7 Changelog update 2024-04-10 20:06:46 +02:00
Blaž Kristan
8358272b9a
Merge pull request #3876 from w00000dy/main
Create new stale.yml
2024-04-10 19:42:52 +02:00
Blaž Kristan
ff3cce0ed2
Merge pull request #3763 from Aircoookie/new-KITT
Effect: modified KITT (Scanner)
2024-04-10 19:40:37 +02:00
Andreas Kling
c3787af29d Send ArtnetPollReply for Art-Net proxy universe 2024-04-09 20:00:00 +02:00
Blaz Kristan
b3810a16cc Merge branch '0_15' into blending-styles 2024-04-09 16:39:29 +02:00
Blaz Kristan
38539aac74 Merge branch '0_15' into new-KITT 2024-04-09 16:36:18 +02:00
Blaz Kristan
58e8346209 Fix for #3889 2024-04-09 08:25:07 +02:00
Blaz Kristan
ba9ce4adf2 PIO env. PSRAM fix for S3 & S3 with 4M flash
- audioreactive always included for S3 & S2
2024-04-08 16:32:21 +02:00
Blaz Kristan
a3a8fa1cef Remove conditional fade/blend
- transitions always enabled (use delay 0 to disable)
- optimisation in on/off fade
- fix for palette/color blend when blending style is not fade
- various tweaks and optimisations
2024-04-08 16:24:27 +02:00
Blaz Kristan
c6805271e9 Merge branch '0_15' into blending-styles 2024-04-08 15:28:57 +02:00
Blaž Kristan
bd60fe5a13
Merge pull request #3798 from DedeHai/ESP32_S3_TouchFix
Esp32 s3 touch fix
2024-04-07 22:24:32 +02:00
Blaž Kristan
b72f3baab7
Update set.cpp
Compile fix
2024-04-07 22:21:41 +02:00
Blaž Kristan
d1d54ce9c8
Update cfg.cpp
Indentation fix
2024-04-07 22:15:58 +02:00
Blaž Kristan
954f26308b
Update button.cpp
Indentation fix
2024-04-07 22:12:01 +02:00
Blaž Kristan
1cafa0b33f
Merge pull request #3880 from DedeHai/harmonic-random-palette-generator
Added fix for #3870
2024-04-07 22:03:59 +02:00
Damian Schneider
18c17168e1 replaced &0xFFFF with explicit casts 2024-04-07 16:07:37 +02:00
Damian Schneider
d3a97f1062 removed detachinterrupt from pin manager, added it to set.cpp instead 2024-04-07 13:49:17 +02:00
Blaž Kristan
d18f078b1e
Merge pull request #3887 from gaaat98/0_15
fix for #3884
2024-04-06 16:47:18 +02:00
gaaat98
9ffcde878a
fix for #3884 2024-04-06 15:40:32 +02:00
Blaz Kristan
aa970d6ca5 Extend JSON API info object
- add "clock" - CPU clock in MHz
- add "flash" - flash size in MB
Fix for #3879
2024-04-05 19:26:09 +02:00
Damian Schneider
503c68320a Bugfix: millis rollover (fix for #3870)
millis()/1000 rollover after 18h was not handled, truncating to 16bits after division fixes it.
2024-04-05 07:23:28 +02:00
Blaz Kristan
a106342439 PICO & WROVER runtime support
return of GPIO16
2024-04-04 23:09:59 +02:00
Blaz Kristan
00f5471270 Build bump, changelog udate 2024-04-04 21:59:41 +02:00
Blaž Kristan
3b0e6ec65c
Merge pull request #3667 from ccruz09/main
usermod support for Adafruit MAX17048 module
2024-04-04 20:25:14 +02:00
Blaž Kristan
8691ddc081
Merge pull request #3875 from w00000dy/cdata
Update cdata.js to rebuild if package.json changes
2024-04-04 20:21:27 +02:00
Blaz Kristan
f5199d2b73 Fix compile. 2024-04-03 20:55:59 +02:00
Blaz Kristan
0c8d9d5614 Mode blending styles
- alternative to #3669
2024-04-03 18:38:06 +02:00
Blaz Kristan
24c5935661 Fix for missing firmware build
updated changelog (missing credit)
2024-04-03 18:31:17 +02:00
Will Miles
bff6697690 Update to AsyncWebServer v2.2.1 2024-04-03 18:23:50 +02:00
Woody
02405b4856
Create stale.yml 2024-04-03 12:32:18 +02:00
Woody
78b37b592e
backup & restore package.json in cdata tests 2024-04-02 20:59:31 +02:00
Woody
4db88cf86b
update cdata.js to rebuild if package.json changes 2024-04-02 20:38:56 +02:00
Woody
a7e17eabff
add cdata test for package.json & fix a small bug 2024-04-02 20:12:14 +02:00
Blaž Kristan
93d9ce18b2
Merge pull request #3873 from willmmiles/aws-v2.2.1
Update to AsyncWebServer v2.2.1
2024-04-02 07:13:00 +02:00
Will Miles
6f7ac93d84 Update to AsyncWebServer v2.2.1
Fix use-after-free issue and slightly improve code size.  Note that the
version is changed to a hard pin, so future updates can be validated
before getting picked up by new clones, and old version builds
are reproducible.
2024-04-01 11:25:31 -04:00
Carlos Cruz
fa5d60ca26
Merge branch '0_15' into main 2024-04-01 11:02:02 -04:00
Blaz Kristan
20ed81cd86 Prefer I2S1 over RMT on ESP32
- remove Audioreactive limitation
2024-03-30 11:02:28 +01:00
Blaž Kristan
6f38874096
Merge pull request #3862 from willmmiles/fix-esp8266-platform-selection
Fix ESP8266 framework version selection
2024-03-29 21:01:21 +01:00
Blaž Kristan
b7db5be4df
Merge pull request #3859 from w00000dy/serg
Only create bin.gz files for esp8266
2024-03-29 21:00:43 +01:00
Blaz Kristan
6d278994ec WLED 0.14.3 release
- Fix for transition 0 (#3854, #3832, #3720)
- copyright year update
- updated AsyncWebServer to v2.2.0
2024-03-29 20:05:56 +01:00
Blaz Kristan
157dbffc59 Changelog update 2024-03-29 18:56:43 +01:00
Blaz Kristan
f21ab3588d Individual color channel control for JSON API
- fixes #3860
- debug verbose
- PSRAM detection
2024-03-29 16:43:37 +01:00
Will Miles
2900bda8f9 Select ESP8266 framework version via platform
By explicitly listing an unversioned framework dependency in
'platform_packages', we were overriding the selection via the 'platform'
specification, allowing PlatformIO to select any random version.
Remove this line to allow 'platform' to add the framework dependency
with the expected version.
2024-03-29 09:33:12 -04:00
Blaz Kristan
5f37c19d42 PSRAM fix & CCT IC
- prevent PSRAM use on ESP32 rev.1 without compile fix
- add runtime selection for CCT IC (Athom 15W bulb)
2024-03-28 16:03:06 +01:00
Woody
6f6356e617
fix print output for bin.gz file 2024-03-27 21:34:51 +01:00
Woody
5d152baac0
Do not create release_gz folder 2024-03-27 21:19:03 +01:00
Woody
d7739f9764
Revert "Change path for ESP02-binary"
This reverts commit e3271b8082e6fa776c659e22f1f2987011cf48b8.
2024-03-26 17:41:28 +01:00
Woody
d6e73fde50
only create bin.gz files for esp8266 2024-03-26 17:34:01 +01:00
Blaz Kristan
fd149b3f46 fileDoc removal (optimisation) 2024-03-26 17:18:52 +01:00
Blaž Kristan
d1d45e7166
Merge pull request #3850 from w00000dy/GitHub-Actions
Use npm ci instead of npm install & Remove zlib dependency from package.json
2024-03-25 08:46:40 +01:00
Blaz Kristan
4b19759dd6 Rotary encoder palette count bugfix 2024-03-24 20:34:22 +01:00
Blaz Kristan
47f44680a3 Multi-update
- 0.15.0-b2
- WS2805 support (NeoPixelBus 2.7.9)
- generic PSRAM support (ESP32 rev.1 still needs compile fix)
- BREAKING: default LEDPIN 2 (due to PSRAM)
- PinManager optimisations
2024-03-24 17:37:11 +01:00
Woody
0a344ada97
Add bin.gz binaries for 160mhz builds 2024-03-24 15:23:33 +01:00
Woody
3b98d01f71
Merge branch '0_15' into serg 2024-03-24 14:42:06 +01:00
Woody
23d8000239
Remove accidental space in cdata.js 2024-03-24 14:34:17 +01:00
Woody
c32ee40ca0
add node: prefix to Core modules
The node: prefix makes it clear that you’re importing a built-in module, not a user-defined or third-party module. This can help avoid confusion.
2024-03-24 14:19:49 +01:00
Woody
213f45494f
Merge branch '0_15' into GitHub-Actions 2024-03-24 13:38:36 +01:00
Frank
85a51e6c42
Update requirements.txt to solve CI build errors
use latest platformIO package, to avoid build errors due to missing 'scons'

> Tool Manager: Installing platformio/tool-scons @ ~4.40400.0 
> Error: Could not find the package with 'platformio/tool-scons @ ~4.40400.0' requirements for your system 'linux_x86_64' 

> Error: Process completed with exit code 1.
2024-03-24 12:27:32 +01:00
Blaz Kristan
ecfdc6f0a8 Bugfixes:
- #3843
- #3844
- network scan on new install
- misc optimization
2024-03-22 20:49:13 +01:00
Woody
1c1c3fd832
Use npm ci instead of npm install 2024-03-21 12:03:35 +01:00
Woody
7bafe995e5
Remove zlib dependency from package.json 2024-03-21 12:00:18 +01:00
Blaž Kristan
3c23672347
Merge pull request #3836 from THATDONFC/0_15
Add SSD1309_64 I2C Support for FLD Usermod
2024-03-21 05:48:42 +01:00
thatdonfc
33fe68d7eb
Revert breaking change 2024-03-20 13:48:15 -07:00
Blaz Kristan
b031fa1531 Palette cycling fix.
Updated getPaletteCount() to return count of all available palettes, including custom ones.
2024-03-20 20:12:21 +01:00
Blaž Kristan
dab4dc3f41
Merge pull request #3810 from deece/fw1906_0_15
Fw1906 Support (based on 0-15)
2024-03-20 19:57:10 +01:00
Blaž Kristan
78096803ea
Merge branch '0_15' into fw1906_0_15 2024-03-20 19:51:32 +01:00
Blaž Kristan
f1987b9544
Merge pull request #3828 from willmmiles/0_15-asyncwebserver-2.2.0-features
ESPAsyncWebServer 2.2.0 + features
2024-03-20 19:50:06 +01:00
Will Miles
8b6bf08a23 serveLiveLeds: Use variable buffer size
Allocate the serialization buffer size at the required length, rather
than always allocating the maximum size.
2024-03-19 23:50:32 -04:00
Will Miles
2640203c88 wled_server: Remove local content type variables
Use the CONTENT_TYPEs exported by AsyncWebServer directly.
2024-03-19 23:46:55 -04:00
thatdonfc
2dafa9644f
Update Readme for Rotary Encoder Usermod
Add example platformio_override.sample.ini
2024-03-19 14:48:51 -07:00
thatdonfc
92ebeddcb0
Update Readme for Four Line Display Usermod 2024-03-19 14:48:04 -07:00
thatdonfc
ecee073e08
Fix palette names when palette ID > 58 and not custom 2024-03-19 14:04:24 -07:00
thatdonfc
6d1b9ffad2
Add SSD1309_64 I2C Support to FDL Usermod 2024-03-19 14:04:09 -07:00
Woody
7ee4b54154
optimize output_bins.py 2024-03-19 20:06:09 +01:00
Woody
e3271b8082
Change path for ESP02-binary 2024-03-19 18:15:18 +01:00
Woody
c6ff45f959
Merge branch '0_15' into serg 2024-03-19 17:49:56 +01:00
Blaz Kristan
5d3f22e06a Changelog update and build bump. 2024-03-19 15:18:17 +01:00
Blaž Kristan
c77f6c5f7b
Merge pull request #3711 from muebau/tetris-ai
Tetris AI usermod
2024-03-19 14:44:51 +01:00
Blaž Kristan
6d03c3a54c
Merge pull request #3834 from willmmiles/ddp-no-push
Support DDP sources that don't PUSH
2024-03-19 07:30:58 +01:00
Blaž Kristan
92dc63e5c9
Merge pull request #3833 from willmmiles/fix-avgloopmillis
Fix avgLoopMillis
2024-03-19 06:20:29 +01:00
Will Miles
505d319e01 Fix avgLoopMillis 2024-03-18 19:50:54 -04:00
Will Miles
62f845a94e DDP: Support sources that don't push
If the source never sends the push flag, WLED buffers the update but
never publishes it to the LEDs.  This causes the confusing case where
the peek display shows one thing but the LEDs themselves something else.

Add a static flag that tracks if we've seen a push from the source;
until we do, apply every update as soon as it's received, per the DDP
specification.
2024-03-18 19:49:26 -04:00
Blaz Kristan
7a9eff7f35 Fix. 2024-03-18 20:23:30 +01:00
Blaz Kristan
b849ea8eaa Fix for #3827 2024-03-18 20:01:32 +01:00
muebau
f1635fa302
Merge branch '0_15' into tetris-ai 2024-03-18 13:21:35 +01:00
Blaž Kristan
6110b72b87
Merge pull request #3831 from willmmiles/missing-ir-disable
getSettingsJS: Fix missing DISABLE_INFRARED guard
2024-03-18 08:00:44 +01:00
Christian Schwinne
247de600af Fix missing GIF enable macros 2024-03-17 22:57:15 +01:00
Christian Schwinne
3e60d3d96e Working GIF support 2024-03-17 22:24:55 +01:00
Will Miles
6de617ecd5 getSettingsJS: Fix missing DISABLE_INFRARED guard 2024-03-17 16:28:09 -04:00
Blaz Kristan
7c8df97968 Merge branch 'main' into 0_15 2024-03-17 12:21:35 +01:00
Blaz Kristan
acf6736afd WLED 0.14.2 release 2024-03-17 11:52:09 +01:00
Will Miles
5f2480c3d9 serveLiveLeds: Use dynamic buffer
There were three problems here:
- AsyncWebServer is going to copy to a heap buffer anyways, so we might
   as well just pass it one it can use
- The buffer size estimate was wrong -- we need 9 bytes per pixel
   ("RRGGBB",), so the buffer could overflow, and it was not
   considering the extra 2D requirements
- On ESP8266, the stack allocation was overflowing the stack, causing
  corruption and crashes.
2024-03-16 12:16:36 -04:00
Will Miles
0593a078c6 handleFileRead: Leverage AWS code
No need to filter or look up content type, just pitch it over the wall.
Also fixes .gz'd content processing.
2024-03-16 12:12:48 -04:00
Will Miles
323c70dcdf Update for new AsyncWebSocketBuffer
Eliminate the extra indirection and allocate shared buffers directly.
2024-03-16 12:12:48 -04:00
Will Miles
a1b0f84444 Pass PROGMEM type to server.on()
Rather than relying on the exception handler, indicate the
__FlashStringHelper type so the correct String constructor is
used.
2024-03-16 12:12:48 -04:00
Will Miles
df6c271830 Use web server ContentType symbols
These were mostly PROGMEM already, but every little bit helps.
2024-03-16 12:12:48 -04:00
Will Miles
12bf04826a Update ESPAsyncWebServer to v2.2.0 2024-03-16 12:12:48 -04:00
Blaz Kristan
52a1b0453c MQTT cleanup & reduction 2024-03-16 15:26:52 +01:00
Blaz Kristan
0dcb56eab5 Modify Bus & BusManager to accommodate digital CCT
- additional fix in hasWhite() & setCCT() & hasCCT()
2024-03-16 12:36:05 +01:00
Frank
a42f78b08b
Update CONTRIBUTING.md
Trying to explain why any PR should have a`description`
2024-03-14 20:27:03 +01:00
Blaž Kristan
505768db04 Some fixes & implement recommendation from @Aircoookie
https://github.com/Aircoookie/WLED/pull/3298#issuecomment-1651910418
2024-03-13 20:44:34 +11:00
Robert
c74db95c14 Add FW1906 support 2024-03-13 20:44:33 +11:00
Robert
af3f27feae Move CTT calculation from BusPwm to Bus class.
This enable it to other bus types.
2024-03-13 20:26:58 +11:00
Blaz Kristan
7b366d49d2 Effect: 2D Drift gets original twin option 2024-03-12 21:23:09 +01:00
Blaž Kristan
88b30e7e28
Merge pull request #3816 from BaptisteHudyma/3813-fix-the-drift-animation-0_15
fix the 2d drift animation
2024-03-12 20:59:19 +01:00
BaptisteHudyma
05c0febd04 fix the 2d drift animation 2024-03-12 12:01:25 +01:00
Blaz Kristan
9d70ec56f2 Distinguish 160MHz binaries 2024-03-11 23:22:14 +01:00
Blaz Kristan
7f8ec59939 Changelog update 2024-03-11 23:08:50 +01:00
Blaz Kristan
0398ec40b7 Merge branch 'main' into v0142-beta2 2024-03-11 23:00:17 +01:00
Blaz Kristan
f55465f8b8 Fix AsyncWebServer library 2024-03-11 18:02:03 +01:00
Blaz Kristan
a4384bd340 Simpler boot preset save
- fixes #3806
2024-03-11 17:59:13 +01:00
Blaz Kristan
a2368a75f7 Fix AsynWebServer lib
Add 160MHz builds for ESP8266
2024-03-11 17:41:17 +01:00
Christian Schwinne
68e5e74882 Fix expanded preset low width
Fix spaces missing in HTML somehow
Update copyright year
2024-03-10 21:52:54 +01:00
Christian Schwinne
b2afac8914 GIFs work again in principle 2024-03-10 21:36:13 +01:00
Damian Schneider
0637c1c9d4 bugfixes
-added minimum threshold, had some crashes when setting threshold to zero before
-moved interrupt detach to GPIO deallocation where it belongs
-added check for touchbutton before detaching interrupt
-moved thochThreshold readout up so it gets updated before passing it to the system call
2024-03-10 19:44:27 +01:00
Damian Schneider
0453a5fb3d added interrupt detach to cfg.cpp 2024-03-10 16:54:25 +01:00
Christian Schwinne
3ad56ea103 GIF testing 2024-03-10 14:34:15 +01:00
Christian Schwinne
6322ab9f07 . 2024-03-09 22:00:18 +01:00
Christian Schwinne
21d0f10dd7 Fix AR compilation 2024-03-09 21:59:45 +01:00
Christian Schwinne
51b9e81c3d Fix missing spaces in info page 2024-03-09 21:48:48 +01:00
Christian Schwinne
7723011594 Update CONTRIBUTING.md 2024-03-09 21:32:10 +01:00
Christian Schwinne
91c11a18e0 Update CONTRIBUTING.md 2024-03-09 21:31:53 +01:00
Christian Schwinne
215ba35fe1 Make ASCII art in build script more like WLED logo 2024-03-09 20:56:14 +01:00
Christian Schwinne
7e17011ebc Revert "Merge branch 'gif' into 0_15"
This reverts commit cb5eb9edc7f5a9a316c9f5c9f5b35c846aa51fd1, reversing
changes made to da5c12f46609ededa7d536b4c90f7519e6eee8fa.
2024-03-09 20:00:41 +01:00
Christian Schwinne
1f25edc737
Merge pull request #3805 from Aircoookie/0_15
update gif with new changes
2024-03-09 19:44:42 +01:00
Carlos Cruz
ab13db73e7
Added files to usermod directory and changes to platform.ini to support Adafruit MAX17048 module. (#2)
Co-authored-by: Azots <78281612+Azots@users.noreply.github.com>
2024-03-09 13:06:30 -05:00
Christian Schwinne
cb5eb9edc7
Merge branch 'gif' into 0_15 2024-03-09 18:23:59 +01:00
Damian Schneider
509675fe66 added touch interrupt activation to set.cpp for S2/S3 2024-03-09 16:03:01 +01:00
Blaz Kristan
da5c12f466 Segment UI bugfix. 2024-03-09 12:37:35 +01:00
Blaz Kristan
f2ad10bbce Limit max frequency to 64k 2024-03-08 18:11:40 +01:00
Blaz Kristan
99a7bece2e Build bump & changlog update 2024-03-07 21:43:41 +01:00
Blaz Kristan
b305fd8865 Fix for ArduinoFFT 2024-03-07 20:52:18 +01:00
Blaz Kristan
c0beb621e2 Better low brightness level PWM handling
Additional string optimisation
2024-03-07 20:21:56 +01:00
Blaz Kristan
da6d64e581 Multiple fixes
- compile time button configuration #3792
- remove IR config if not compiled
- additional string optimisations
2024-03-05 16:27:28 +01:00
Blaž Kristan
a6d58ee360
Merge pull request #3790 from WoodyLetsCode/fix-preset-sorting
Fix preset sorting
2024-03-05 11:38:26 +01:00
Woody
2a480ab7db
Revert "fix preset sorting reordering bug"
This reverts commit f25fadafd8489e85541d9b89dac70deddf094b81.
2024-03-05 11:30:11 +01:00
Damian Schneider
5c09ee29db removed notes 2024-03-04 14:42:50 +01:00
Damian Schneider
15526bd6e8 some tuning for touch buttons on S2/S3
now better fits the default threshold value of 32
2024-03-04 14:38:51 +01:00
Damian Schneider
c8f48168b4 fixed touch buttons for ESP32 S2 and S3
touch is implemented differently on S2 and S3, these changes make touch buttons work on S2 and S3
2024-03-04 14:38:37 +01:00
Blaž Kristan
d937d473f9
Merge pull request #3737 from WoodyLetsCode/GitHub-Actions
Update setup-node and cache usermods in wled-ci.yml
2024-03-04 07:00:49 +01:00
Woody
66f14c6343
restore default preset sorting if no search term is entered 2024-03-03 15:58:30 +01:00
Woody
f25fadafd8
fix preset sorting reordering bug 2024-03-03 15:16:10 +01:00
Will Miles
d9b0df94e2 LockedJsonResponse: Release early if possible
Release the json buffer lock as soon as we've finished serializing.
This should slightly reduce the number of lock collisions as the
response class isn't destructed until after the last packet is ack'd.
2024-03-03 10:58:40 +01:00
Woody
200d11ca99
Revert "Fix preset sorting"
This reverts commit 00038453e1fd15c8b8a3063badb8e00577737375.
2024-03-02 21:56:25 +01:00
Blaž Kristan
f8c48ef60a
Merge pull request #3760 from willmmiles/json-response-early-unlock
LockedJsonResponse: Release early if possible
2024-03-02 14:29:34 +01:00
Blaz Kristan
1fc0680c71 160MHz clock & alternate AWS 2024-03-02 14:12:57 +01:00
Blaž Kristan
ec4afb2cbc
Merge pull request #3616 from demophoon/dmx-segment-options-expanded
Add additional segment options when controlling over e1.31
2024-03-01 16:28:19 +01:00
Blaz Kristan
a2a632c415 Variable PWM duty cycle resolution 2024-03-01 14:36:17 +01:00
Blaz Kristan
962e64106c A few more PROGMEM optimisations 2024-03-01 14:36:07 +01:00
Blaž Kristan
c40b6088ee
Merge pull request #3783 from shammy642/virtual-artnet-rgbw
Add virtual Art-Net RGBW option
2024-02-29 14:57:42 +01:00
shammy642
0d1a254ca8 Changed values to 89 2024-02-29 12:47:45 +00:00
shammy642
fdbcb61a12 Rebased to 0.15 2024-02-29 08:27:11 +00:00
Blaz Kristan
6435cb1466 Fix for missing string in OTA 2024-02-28 20:25:59 +01:00
Blaz Kristan
4739cfab9a JS ABL optimisation 2024-02-28 18:14:42 +01:00
Blaz Kristan
00a73e9cc8 ABL display bugfix 2024-02-27 21:21:53 +01:00
Blaz Kristan
0ff5dec004 Reposition upload warning message.
Fixes #3778
2024-02-27 15:59:41 +01:00
Blaz Kristan
41129cf379 Sqeeze every byte 2024-02-25 17:08:01 +01:00
Will Miles
c8c394b4e9 TZ_TABLE: Add missing const 2024-02-20 18:33:18 +01:00
Will Miles
59886a1528 Move timezone table to PROGMEM 2024-02-20 18:33:09 +01:00
Frank
a28d2c869f
Merge pull request #3766 from willmmiles/tztable-progmem
Move timezone table to PROGMEM, saving ~200 bytes of RAM on 8266.
2024-02-20 17:09:47 +01:00
Will Miles
6f1fff44fa TZ_TABLE: Add missing const 2024-02-19 09:48:34 -05:00
Will Miles
108978d1a5 Move timezone table to PROGMEM 2024-02-18 21:23:53 -05:00
Blaz Kristan
a4733b4d91 Move strings into flash 2024-02-18 14:25:07 +01:00
Blaz Kristan
66f4671ec0 Move strings into flash 2024-02-18 14:09:38 +01:00
Blaz Kristan
c932621b5d string fix 2024-02-17 15:00:47 +01:00
Frank
21173dc907 Fixing a potential array bounds violation in ESPDMX
DMXESPSerial::write and DMXESPSerial::read could access DMXDataStore[512] -   one more than the allocated number of elements (i.e. 0...511].
2024-02-17 13:05:04 +01:00
Blaz Kristan
f2c30ba3f7 Effect: modified KITT (Scanner)
- add delay
- add dual checkmark
- rename Fade rate to Trail (inverse)
- makes Scanner Dual obsolete
2024-02-17 12:58:04 +01:00
Blaz Kristan
989bdfb0d5 Reduce string RAM usage for ESP8266 debug builds 2024-02-17 11:33:42 +01:00
Blaz Kristan
5761dce957 JSON buffer lock error messages
Reduce wait time for lock to 100ms
2024-02-17 11:30:29 +01:00
Blaz Kristan
95e2e574b8 ESP-NOW packet modification
- include up to 5 segments in 1st packet
- header contains total number of packets (instead of segments)

web server code reorganise
2024-02-15 20:40:55 +01:00
Will Miles
c789d80ce5 LockedJsonResponse: Release early if possible
Release the json buffer lock as soon as we've finished serializing.
This should slightly reduce the number of lock collisions as the
response class isn't destructed until after the last packet is ack'd.
2024-02-14 19:37:34 -05:00
Frank
8422ffcd19
Fixing a potential array bounds violation in ESPDMX
DMXESPSerial::write and DMXESPSerial::read could access DMXDataStore[512] -   one more than the allocated number of elements (i.e. 0...511].
2024-02-15 00:53:00 +01:00
lost-hope
2d30535b69 Fixing stairway usermod and adding buildflags 2024-02-14 09:56:57 +01:00
Blaž Kristan
0a815179a2
Merge pull request #3758 from lost-hope/main
Fixing stairway usermod and adding buildflags
2024-02-14 09:45:52 +01:00
Blaz Kristan
aa24e5d284 Preset caching on chips with PSRAM
- credit @akaricchi
2024-02-13 11:12:04 +01:00
lost-hope
23aad24027
Fixing stairway usermod and adding buildflags
Fixing Stairway:
missing setup function

Adding builflags:
USERMOD_STAIRCASE_WIPE to install the usermod
2024-02-12 22:41:13 +01:00
Blaz Kristan
7ae5459fe7 0.14.2-b1 2024-02-12 13:29:08 +01:00
Blaz Kristan
0a8a88421e Possible fix for #3589 & partial fix for #3605 2024-02-12 13:20:47 +01:00
Blaz Kristan
4f42a176ef Prevent JSON buffer clear after failed lock attempt
(alternative to #3743)
2024-02-11 20:12:54 +01:00
Blaz Kristan
4457067045 Multiple analog button fix for #3549 2024-02-10 11:47:40 +01:00
Blaz Kristan
e7dc2048ad Multiple analog button fix for #3549 2024-02-10 11:45:33 +01:00
Blaz Kristan
af6094bb06 Bump 2024-02-09 22:58:11 +01:00
Blaž Kristan
0ab139cb24
Merge pull request #3560 from roelbroersma/usermod_v2_HttpPullLightControl_0.0.5
Usermod:  httpPullLightControl v0.0.5 (supersede v0.0.4)
2024-02-09 22:42:40 +01:00
Blaz Kristan
500a7301f2 Fix merge error 2024-02-09 22:37:52 +01:00
Blaz Kristan
c92cef1780 Merge branch '0_15' into usermod_v2_HttpPullLightControl_0.0.5 2024-02-09 22:34:38 +01:00
Blaz Kristan
49ceac1ac7 Add "RGB2Go Tetra" Ethernet 2024-02-09 22:21:14 +01:00
Blaz Kristan
276a93605d Multiupdate
- allow DMX for S2 & C3 (ESPDMX, needs testing)
- (debug) string cleanup & optimisation
- WLED_BRAND for AP SSID
2024-02-09 22:15:29 +01:00
Blaz Kristan
0150c3fe23 Undo flash string in DMX 2024-02-08 23:35:00 +01:00
Blaz Kristan
34674501c3 Remove throttling from UI 2024-02-08 19:33:08 +01:00
Blaz Kristan
f6206d4c30 Web server string optimisation
(saves 140B of RAM on ESP8266)
ETag bugfix
2024-02-08 19:32:23 +01:00
Blaz Kristan
6dcd9596a2 Prevent JSON buffer clear after failed lock attempt
(alternative to #3743)
2024-02-07 18:58:56 +01:00
Blaz Kristan
e165838e54 PIR readme update. 2024-02-07 18:03:58 +01:00
Blaž Kristan
eae1707e97
Merge pull request #3750 from Moustachauve/product-data-0_15
Allow product information to be specified at build time
2024-02-07 13:20:35 +01:00
Christophe Gagnier
ed2950f73b Allow product information to be specified at build time 2024-02-07 02:09:03 -05:00
Blaz Kristan
7eae8f68d8 Merge branch 'main' into 0_15 2024-02-06 14:47:20 +01:00
Blaž Kristan
0ab2d18b52
Merge pull request #3729 from DedeHai/harmonic-random-palette-generator
added function to generate random palette based on harmonic color theory
2024-02-06 13:16:05 +01:00
Blaz Kristan
8ab621bc91 Another unsigned 2024-02-06 11:43:57 +01:00
Blaz Kristan
41e51bbeb5 Configuration item for harmonic palettes
Comment cleanup
2024-02-06 11:06:23 +01:00
Blaz Kristan
66d9e8c038 Merge branch '0_15' into harmonic-random-palette-generator 2024-02-06 10:53:44 +01:00
Blaz Kristan
f5e47b2b74 Fix compiler warning 2024-02-06 10:17:53 +01:00
Blaz Kristan
678a823e8b PULLDOWN fix 2024-02-05 22:21:12 +01:00
Blaz Kristan
246746a82e Multi PIR usermod 2024-02-05 22:13:32 +01:00
Blaz Kristan
00038453e1 Fix preset sorting 2024-02-03 19:24:08 +01:00
Blaz Kristan
9ce485eade Ignore missing remote.json 2024-02-03 14:40:45 +01:00
Blaz Kristan
8a6ff5a42b UI fixes and refinements 2024-02-03 14:40:28 +01:00
Woody
1eaac0072d
Add a separate folder for .gz release files 2024-02-03 00:44:38 +01:00
Woody
35716a7e4c
Cache usermods in wled-ci.yml 2024-02-01 20:44:46 +01:00
Damian Schneider
e0f89beebb slight change to color parameters
added more white, changed function return value of fully random palette function
2024-02-01 20:06:48 +01:00
Blaz Kristan
b8bf2a707c Remove obsolete usermods
- mode sort
- 4LD (non ALT)
- Rotary encoder (non ALT)
2024-02-01 18:53:55 +01:00
Woody
7d616be8f4
Update setup-node in wled-ci.yml 2024-02-01 18:41:21 +01:00
Blaz Kristan
0a7e9f9f8f Build bump and ghanglog update 2024-02-01 18:36:10 +01:00
Blaz Kristan
226e188903 Merge branch '0_15' of https://github.com/aircoookie/WLED into 0_15 2024-02-01 18:33:23 +01:00
Blaž Kristan
590d454119
Merge pull request #3718 from WoodyLetsCode/GitHub-Actions
Update GitHub Actions workflow
2024-02-01 18:26:13 +01:00
Blaž Kristan
06d5bd799f Merge pull request #3732 from wled-install/patch-1
UM Audioreactive: add two compiler options
2024-02-01 18:24:39 +01:00
Woody
7fe6541b7c
Merge branch '0_15' into GitHub-Actions 2024-02-01 18:05:39 +01:00
Blaž Kristan
0f30fa5fb9
Merge pull request #3702 from Aircoookie/trim-platformio_ini
Trim platformio.ini & add info to sample
2024-02-01 17:17:46 +01:00
Blaz Kristan
2c362315ad Rename sample 2024-02-01 17:09:55 +01:00
Blaž Kristan
7dd79edc52
Merge pull request #3734 from WoodyLetsCode/tooltip
Improvements for tooltips
2024-02-01 17:07:52 +01:00
Blaž Kristan
3d6f25a9d3
Merge pull request #3732 from wled-install/patch-1
UM Audioreactive: add two compiler options
2024-02-01 17:07:00 +01:00
Blaž Kristan
b3c21feba3
Merge pull request #3699 from WoodyLetsCode/cdata
Update dependencies for cdata.js and make some improvements
2024-02-01 17:05:19 +01:00
Blaž Kristan
fe54fadbf8
Merge pull request #3709 from Aircoookie/multiwifi
Implement multiple WiFi
2024-02-01 17:04:18 +01:00
Blaž Kristan
caa0722d49
Merge pull request #3715 from WoodyLetsCode/nodelist
Allow nodes buttons to be opened in new target or copy ip address
2024-02-01 17:00:21 +01:00
Blaž Kristan
fee32622f1
Merge pull request #3489 from WoodyLetsCode/clock-overlay
Show clock overlay only if all LEDs are solid black
2024-02-01 16:54:26 +01:00
Blaz Kristan
d1910e4274 Merge branch '0_15' into multiwifi 2024-02-01 16:49:55 +01:00
Blaž Kristan
45eb11d7f4
Merge pull request #3721 from Aircoookie/temporary-AP
Temporary AP
2024-02-01 16:44:41 +01:00
Blaž Kristan
874179fa75
Merge pull request #3625 from m-wachter/ESP32-POE-WROVER
Add support for Olimex ESP32-POE-WROVER.
2024-02-01 16:41:40 +01:00
Blaž Kristan
8b16cb4bae
Merge pull request #3580 from itstefanjanos/feature/add-APA106-led
Add APA106 support
2024-02-01 16:41:02 +01:00
Woody
777ed55c21
Add tooltip for toggle freeze & label 2024-01-31 22:36:09 +01:00
Woody
fcafd8b05e
Improved tooltips 2024-01-31 22:35:10 +01:00
Blaz Kristan
5f1cadfea4 Merge branch '0_15' into feature/add-APA106-led 2024-01-31 17:21:55 +01:00
wled-install
917a981096
Update audio_reactive.h 2024-01-31 06:34:15 +01:00
wled-install
89f8b6060f
Update readme.md 2024-01-31 06:33:48 +01:00
wled-install
345346315a
Update readme.md 2024-01-30 22:59:29 +01:00
wled-install
f1c27e1798
Update readme.md 2024-01-30 22:56:09 +01:00
wled-install
4316024dc7
Update audio_reactive.h 2024-01-30 22:51:18 +01:00
Damian Schneider
ca05aa84ff changed randomness and added optimizations
-added fully random palette function ('the old way', currently just used for initialization)
-changed randomness values to make it a little less random
-added 10% chance for pastel color palette
-now using swap() from std library for shuffeling
-changed function name
-moved update check from loadPalette() to handleRandomPalette() saving CPU cycles
2024-01-30 22:28:40 +01:00
Blaz Kristan
d10d7dc298 upload speed and clarifications 2024-01-30 19:44:10 +01:00
Blaz Kristan
063af1dbc7 core description fix 2024-01-30 19:26:37 +01:00
Damian Schneider
ef6fe43251 random palette transitions with set transition time 2024-01-29 22:14:26 +01:00
Damian Schneider
2659055c31 fixed typos 2024-01-29 20:47:09 +01:00
Damian Schneider
f5ed757780 added some minor fixes
-fastled flags
-gamma correction
-pass by reference instead of pointer
2024-01-29 20:47:09 +01:00
Damian Schneider
e114b842ba fixed initialisation or random palette 2024-01-29 20:47:08 +01:00
Damian Schneider
12e2116acb bugfix, need to initialize the random palette to something useful 2024-01-29 20:47:08 +01:00
Damian Schneider
bccc97d25f fixed include, bugfix in random palette handling 2024-01-29 20:47:08 +01:00
Damian Schneider
a9bcc75733 added function to generate random palette based on harmonic color theory 2024-01-29 20:47:08 +01:00
Blaz Kristan
7b87475af8 Fix random palette transitions. 2024-01-29 19:06:41 +01:00
Michael Wachter
2ac218886a Add support for Olimex ESP32-POE-WROVER.
There is a version of the Olimex ESP32-POE board with an ESP32-WROVER
module which has a the ethernet clock connected to a different IO than
the version with an ESP32-WROOM module.

This commit adds a new runtime selectable variant for the WROVER version.
2024-01-28 17:54:19 +01:00
Blaz Kristan
97503897f0 New effect: 2D Rotozoomer 2024-01-28 15:09:40 +01:00
lost-hope
7e06e32cb6 Usermod Klipper Percentage: fix error with slashes on non windows devices 2024-01-27 23:26:30 +01:00
Blaz Kristan
15b813c6af Build bump & changelog update 2024-01-27 21:22:25 +01:00
Blaž Kristan
a71c9107bd
Merge pull request #3683 from TripleWhy/rotatingPalletteEffect
Rotating 2D Palette effect
2024-01-27 20:04:36 +01:00
Blaž Kristan
4c2110189b
Merge pull request #3682 from Aircoookie/supersync
Use strip.now instead of millis() in effects
2024-01-27 14:06:26 +01:00
Blaz Kristan
df750c2a71 Fix for single wifi 2024-01-27 08:39:54 +01:00
Blaz Kristan
3eb412b750 Add rescan & selection on disconnect 2024-01-26 18:38:56 +01:00
Blaz Kristan
5c7b7e4182 Constant & override 2024-01-26 15:31:09 +01:00
Frank
2b0fad87d2
Merge pull request #3722 from lost-hope/main
Usermod Klipper Percentage: Fix for include paths (windows backslash vs. linux slash)
2024-01-26 11:41:02 +01:00
Blaz Kristan
8817d41275 Wrong return value 2024-01-25 19:57:04 +01:00
Blaž Kristan
04ef3f9496
Merge pull request #3723 from Derek4aty1/dnaSpiralFix
DNA Spiral Effect Speed Fix
2024-01-25 19:52:14 +01:00
Blaz Kristan
fbe26e13ae Remove erroneous wifi selection 2024-01-25 19:46:47 +01:00
Blaz Kristan
4408dffa87 Better invalid password handling
Changed function return value
2024-01-25 19:42:23 +01:00
Derek4aty1
546192865c DNA Spiral Effect Speed Fix 2024-01-25 11:21:16 -06:00
lost-hope
7afa550ba4
Usermod Klipper Percentage: fix error with slashes on non windows devices 2024-01-25 17:55:41 +01:00
Woody
21a9372320
fix clock overlay display 2024-01-25 12:14:44 +01:00
Woody
f4a2eec984
Use a reference instead of segment object copy 2024-01-25 11:33:40 +01:00
Woody
94b9455c9c
closes Aircoookie/WLED#984
Implements option to show clock overlay only if all LEDs are solid black
2024-01-25 11:33:36 +01:00
Woody
c41c71c8c1
add bin.gz firmware for ESP02 to artifacs (#4) 2024-01-24 21:22:54 +01:00
Blaz Kristan
dde647c570 Required fix 2024-01-24 20:53:17 +01:00
Blaz Kristan
445a89ba6e Try hard to release memory 2024-01-24 20:49:22 +01:00
Blaz Kristan
07495f6621 Merge branch '0_15' into temporary-AP 2024-01-24 20:22:50 +01:00
Blaz Kristan
5952edc550 Some fixes 2024-01-24 19:52:41 +01:00
Woody
b66a038a2f
Change path separator 2024-01-24 17:15:06 +01:00
Woody
df1c8a64e5
Update GitHub Actions workflow
This also adds a WLED_RELEASE_NAME for esp32s3dev_8MB_PSRAM_opi
2024-01-24 16:11:51 +01:00
Blaz Kristan
3e2aebcd10 Remove regression
Init wifi for scan
Always save WiFi name
2024-01-24 15:43:59 +01:00
TripleWhy
0d279cb4dd Add some comments 2024-01-24 15:38:50 +01:00
Woody
3942a76d15
Fix #3708 2024-01-23 21:00:44 +01:00
Blaz Kristan
1bebf3d3d6 Optimise wifi scan
- prioritize strongest signal
- prune removed networks
- fill present networks
2024-01-23 20:44:43 +01:00
Blaz Kristan
d5f54c240a Debug pin fix 2024-01-22 21:01:57 +01:00
Blaz Kristan
8868ecd11a Cleanup 2 2024-01-22 20:48:03 +01:00
Blaz Kristan
8a31c57bfa Fix getActiveSegmentsNum
Limit rotation to +-90 deg (swapping sin/cos & limit angle)
Shift palette shift
2024-01-22 19:38:13 +01:00
muebau
7e2cce4a8d Tetris AI usermod 2024-01-21 17:28:10 +01:00
Blaz Kristan
bfb217c203 Implement multiple WiFi
- similar to #3705
- solves #2845, #2974, #852, #1228
2024-01-21 00:30:15 +01:00
Blaz Kristan
593e55af95 Cleanup. 2024-01-20 23:29:45 +01:00
Blaz Kristan
29af62f956 Fix for 1D & remove segment ID 2024-01-20 14:55:22 +01:00
Blaž Kristan
2b022e1871
Update platformio.ini
Added WROVER model and removed flash options for ESP32-S2
2024-01-19 14:18:54 +01:00
Woody
783a4d3996
old line break style 2024-01-18 21:23:29 +01:00
Woody
ddfe925f8c
rename test 2024-01-18 21:23:29 +01:00
Woody
1735bcab21
fix wled banner color in cdata.js 2024-01-18 21:23:29 +01:00
Woody
ff6cacf766
npm update 2024-01-18 21:23:28 +01:00
Woody
2a72eae77f
cdata.js: Better console print messages 2024-01-18 21:23:28 +01:00
Woody
39fb7fdfe3
Add test for -f and --force argument 2024-01-18 21:23:28 +01:00
Woody
e0facf35c8
refactored tests 2024-01-18 21:23:28 +01:00
Woody
73d48c8ac4
remove html-minify-ui option 2024-01-18 21:23:28 +01:00
Woody
5080059143
Rebuild if a cdata.js has been modified 2024-01-18 21:23:28 +01:00
Woody
90d5b77d74
more minifying 2024-01-18 21:23:28 +01:00
Woody
e0f987328b
add new test 2024-01-18 21:23:28 +01:00
Woody
04c3a925cc
Fix test on Github Actions
This needed more time on Github
2024-01-18 21:23:27 +01:00
Woody
219b29991b
Update wled-ci.yml 2024-01-18 21:23:27 +01:00
Woody
5120045459
refactor cdata.js 2024-01-18 21:23:27 +01:00
Woody
3bca4a73f4
More tests for cdata 2024-01-18 21:23:27 +01:00
Woody
b4857ab036
Automatically test cdata.js 2024-01-18 21:23:27 +01:00
Woody
f3ae041691
Add first unit tests for cdata.js 2024-01-18 21:23:27 +01:00
Woody
a84627a465
Update dependencies for cdata.js 2024-01-18 21:23:27 +01:00
Blaz Kristan
78aeca6399 Trim platformio.ini & add info to sample 2024-01-18 18:28:01 +01:00
Blaz Kristan
5dd8f0a0b7 typo 2024-01-17 23:39:33 +01:00
Christian Schwinne
9378fc7276 Merge remote-tracking branch 'origin/0_15' into gif 2024-01-16 21:53:08 +01:00
Blaz Kristan
3a0d8069b6 Bus type clarifications
- expansion of digital types
- updated macros
- mem calc function
2024-01-16 21:02:08 +01:00
Blaz Kristan
bab42014a4 Fix for #3693 2024-01-16 19:35:18 +01:00
Blaz Kristan
74fed5695f Fix for #3693 2024-01-16 19:34:23 +01:00
Blaz Kristan
3be368c333 A few more overrides 2024-01-14 21:04:18 +01:00
Blaz Kristan
a4a8e2614e Release WLED 0.14.1 2024-01-14 18:33:27 +01:00
Blaz Kristan
58eb151ba1 Use strip.now instead of millis() in effects
AKA "supersync" from WLED MM fork
2024-01-14 17:51:48 +01:00
Blaz Kristan
21d21ea7f0 Orange flash fix (#3196) for transitions 2024-01-14 17:40:04 +01:00
Blaz Kristan
45dc5e236d Override identifier 2024-01-14 17:38:29 +01:00
dependabot[bot]
0597eeed6b
Bump urllib3 from 1.26.15 to 1.26.18 (#3455)
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.15 to 1.26.18.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.26.15...1.26.18)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-14 15:58:51 +01:00
Christian Schwinne
0a66fe196a Merge remote-tracking branch 'origin/0_15' into pr/3580 2024-01-14 15:08:13 +01:00
Woody
3f21b4aa7d
Add own background image upload (#3596)
* Add own bg image upload

* Fix undefined issue in settings UI
2024-01-14 14:16:32 +01:00
TripleWhy
b97186c5bf Rotating palette effect 2024-01-13 18:49:17 +01:00
Blaz Kristan
874b24fb32 WLED time overrides 2024-01-13 13:06:00 +01:00
Blaz Kristan
97889b5e55 Fix for audio palettes 2024-01-12 20:45:04 +01:00
Woody
4b134194cf Better sorting and naming of static palettes 2024-01-12 19:44:25 +01:00
Blaž Kristan
24b60a25d5
Merge pull request #3674 from WoodyLetsCode/cpal
Better sorting and naming of static palettes in the Custom Palette Editor
2024-01-12 18:57:01 +01:00
Blaž Kristan
3e069376a7
Merge pull request #3666 from WoodyLetsCode/pio
Ignore autogenerated files with binary array for the Web UI and fix caching bug
2024-01-12 16:52:33 +01:00
Woody
5bdb2c9e86
Fix bug where some changes were not recognized 2024-01-12 00:02:53 +01:00
Woody
71b0c5f805
Update wled-ci.yml 2024-01-12 00:02:53 +01:00
Woody
a1f62e7a1f
Add result file check to isCached function 2024-01-12 00:02:53 +01:00
Woody
186c40801a
Delete html_*.h files 2024-01-12 00:02:52 +01:00
Woody
bf867e84d6
Update .gitignore 2024-01-12 00:02:44 +01:00
Woody
27035a8e1d
Better sorting and naming of static palettes 2024-01-11 23:13:26 +01:00
Blaž Kristan
db3770c3e5
Merge pull request #3673 from netmindz/animartrix
Add ANIMartRIX usermod
2024-01-11 22:06:31 +01:00
Will Tatam
46337ca554 Add ANIMartRIX usermod 2024-01-11 20:20:53 +00:00
Blaž Kristan
4f0f288000
Merge pull request #3621 from zanhecht/patch-2
Use canvas instead of CSS gradient for liveview
2024-01-11 20:41:35 +01:00
Blaz Kristan
8060bae1b8 Width fix 2024-01-11 20:37:51 +01:00
Blaz Kristan
ea32c97b82 Fix for #3672 2024-01-11 20:24:59 +01:00
Blaz Kristan
99efbd30f1 ColoOrderMap W channel swap
& cleanup
2024-01-11 20:22:42 +01:00
Frank
a9eb7cb4fd
udp realtime - improve robustness against short packets (fix for #3672)
when only two bytes were received in a packet, the "for" condition `packetsize -3` would underflow, leading to an infinite loop.
2024-01-11 18:07:23 +01:00
Blaz Kristan
a11cab0f88 Fix for #3665 2024-01-10 19:41:51 +01:00
Blaz Kristan
447324b59f Fix for #3665 2024-01-10 19:40:59 +01:00
Blaz Kristan
e580e815f0 Fix .gitignore 2024-01-10 18:52:46 +01:00
Blaž Kristan
5fc00840f2
Merge pull request #3554 from ezcGman/ledmaps-realtime
En-/disable LED maps when receiving realtime data
2024-01-10 18:25:41 +01:00
ezcGman
ff59dcd66e Merge branch '0_15' of https://github.com/Aircoookie/WLED into ledmaps-realtime 2024-01-10 05:11:44 +01:00
zanhecht
0a1d82de2a
Remove legacy CSS gradient code from liveview.htm
Reduce file size by removing legacy CSS gradient code and moving drawing operations to a separate function
2024-01-09 19:27:45 -05:00
Blaz Kristan
26837645ac Add PWM frequency selection in settings 2024-01-09 21:54:21 +01:00
Janos Stefan
c318699d6a Merge branch 'feature/add-APA106-led' of https://github.com/itstefanjanos/WLED into feature/add-APA106-led 2024-01-09 21:32:40 +01:00
Janos Stefan
e5caab635a Remove compiled html headers. 2024-01-09 21:31:25 +01:00
Janos Stefan
d5f96295ff Add APA106 support 2024-01-09 21:30:41 +01:00
Blaz Kristan
4a6c78aaf3 npm 2024-01-09 19:11:45 +01:00
Blaž Kristan
c4d214f5c0
Merge pull request #3598 from WoodyLetsCode/pio
Automatically build UI before compiling
2024-01-09 19:05:04 +01:00
Blaž Kristan
1ed7e6cb1c
Merge pull request #3611 from Aircoookie/suspend
Suspend strip during operations
2024-01-09 18:33:44 +01:00
Blaz Kristan
6b7f80f24a Merge branch '0_15' into suspend 2024-01-09 18:30:27 +01:00
Blaz Kristan
220217561a Possible fix for #3589 & partial fix for #3605 2024-01-09 18:20:20 +01:00
Frank
75e857a510 npm run build 2024-01-09 11:57:34 +01:00
Frank
052bdd8eb0 fix for #3655
make WS2814 explicit in LED driver drop-down menu
2024-01-09 11:54:46 +01:00
Britt Gresham
9e54de8a8a Set 2 values between each segment option
Due to the midi interface being difficult/impossible to increment on
values of 1 because it has 7-bits of granularity, this commit moves all
the bitfields for configuring segment options left by one which
guarantees that every option has 2 values next to each other.

This allows midi controllers to more easily select an individual segment
option for 2D arrays.
2024-01-08 11:16:55 -08:00
Britt Gresham
fd2809e367 Replace bitshifts with masks and division 2024-01-08 11:16:55 -08:00
Britt Gresham
18874c2069 Remove unneeded floor call on segment option channel 2024-01-08 11:16:55 -08:00
Britt Gresham
115eb0ddef Add additional segment options when controlling over e1.31
Before this commit it was only possible to control mirror and reverse on
a 1d segment. All of the other options for 2d effects could not be set
and thus they would be kept disabled.

This commit replaces the Effect Option dmx channel with a bitfield which
allows for each segment option to be individually toggled depending on
which bit is set in the field. Backwards compatibility has been
maintained with existing 1d segment options.
2024-01-08 11:16:55 -08:00
Blaž Kristan
9940258725
Merge pull request #3654 from willmmiles/mpu6050-upgrade
Upgrade the MPU6050 usermod
2024-01-08 19:32:36 +01:00
Blaž Kristan
74e14a4fc3
Merge pull request #3656 from WoodyLetsCode/documentation
Make loadBg() more readable
2024-01-08 19:28:18 +01:00
Blaž Kristan
90ea386c62
Merge pull request #3658 from WoodyLetsCode/colorPicker
Fix that color picker is not centered on screens with width between 1024px and 1249px
2024-01-08 19:24:53 +01:00
Woody
a5b132dfd7
Fix that color picker is not centered
Color Picker was not centerd on screens with width between 1024px and 1249px
2024-01-08 14:20:02 +01:00
Woody
157debf8e4
Make loadBg() more readable 2024-01-07 23:51:38 +01:00
Woody
74a5528f17
Small refactor of isCached function in cdata.js 2024-01-07 23:14:24 +01:00
Woody
21de9e938a
Rebuild if command line argument is set 2024-01-07 22:06:20 +01:00
Will Miles
9c4d3cd6e2 platformio.ini: Add MPU6050 library dep 2024-01-07 15:50:15 -05:00
Will Miles
0616d184e0 Add GyroSurge usermod
This usermod applies the IMU data to create a "surge" effect when
the device is moved.
2024-01-07 15:44:11 -05:00
Will Miles
6f8b3a6242 usermod_list: Add IMU usermod 2024-01-07 15:44:11 -05:00
Will Miles
9a006dc84a usermod_mpu6050: Add options and outputs
Upgrade the MPU6050 usermod to provide configuration settings for
interrupt pin selection and calibration, a polled mode, and data
output for consumption by other usermods.
2024-01-07 15:44:11 -05:00
Will Miles
d2dbaf52a1 usermod_mpu6050: Fix debug prints
The MPU6050 library happens to choose the same defines as WLED, which
collide and result in nothing printing.   Un- and re-define the macros
to work around this.
2024-01-07 13:48:41 -05:00
Woody
0a9145cd3c
add caching for cdata.js 2024-01-07 01:06:52 +01:00
Woody
e778b02c0c
Automatically build UI before compiling 2024-01-07 01:06:52 +01:00
Blaz Kristan
8fb5f0ef3c Changelog update v0.14.1-b3 2024-01-06 20:34:31 +01:00
Blaz Kristan
43f5e4360d Changelog update
Remove obsolete semaphore
2024-01-06 20:28:05 +01:00
Blaž Kristan
cdc8640218 Merge pull request #3648 from willmmiles/json-response-locking
Expand JSON buffer lock scope to entire web reply
2024-01-06 17:16:33 +01:00
Blaz Kristan
21f8d7a967 Bump 2024-01-06 17:04:56 +01:00
Blaž Kristan
801d92bbba
Merge pull request #3648 from willmmiles/json-response-locking
Expand JSON buffer lock scope to entire web reply
2024-01-06 17:01:34 +01:00
Will Miles
77116172e4 serveJson: Fix possible memory leak
Ensure we delete the response if it's not locked
2024-01-06 10:24:05 -05:00
Will Miles
9d3c0f4ff0 serveJson: Ensure semaphore scope lasts until reply is done
Extend the JSON response class to hold the global JSON buffer lock
until the transaction is completed.

Fixes #3641
2024-01-06 10:09:07 -05:00
Will Miles
6382d2b730 Add C++-style guard class for JSON Buffer lock
Add JSONBufferGuard, an RAII lock guard class for JSONBufferLock
analogous to std::lock_guard.  This permits binding the guard to a scope,
such as an object life cycle or function body, guaranteeing that the
lock will be released when the scope exits.
2024-01-06 10:05:18 -05:00
Blaž Kristan
6ad4493a91
Merge pull request #3639 from WoodyLetsCode/caching
Improve ETag Caching
2024-01-04 19:16:56 +01:00
Blaz Kristan
f070dc5527 Cosmetic & needsUpdate() 2024-01-04 17:40:23 +01:00
Blaz Kristan
fc6e7c81d3 Merge branch '0_15' into suspend 2024-01-04 17:33:07 +01:00
Woody
59a725c52c
Use uint16_t eTagSuffix instead of String 2024-01-03 23:39:45 +01:00
Frank
51b3d7cb4a
Merge pull request #3569 from raymondhardy/ESP32-S3-WROOM-1-N16R8
new buildenv for esp32s3dev_16MB_PSRAM_opi dev board (LilyGo T7-S3)
2024-01-03 22:20:01 +01:00
Frank
3baff4e675
Merge pull request #3572 from drasch/fix/esp32c3-2mb-flash-size
fix(esp32c3-2mb): correct flash size for c3 board with only 2MB
2024-01-03 22:18:24 +01:00
Blaž Kristan
06911e7ad0
Merge pull request #3642 from peterpociask/patch-1
Update README.md
2024-01-03 21:16:38 +01:00
PeterP
4e0f3e35db
Update README.md
Pointed link to current directions for compiling WLED
2024-01-03 15:08:02 -05:00
Woody
fd6ce57003
Improve ETag Caching
This also adds support for ETag caching for the settings pages
Also fixed some issues with the previous caching not being RFC 7232 compliant.
2024-01-03 18:53:54 +01:00
Blaz Kristan
4f55be4f19 Bugfix #3632 2024-01-01 23:21:22 +01:00
Blaz Kristan
bd20c83919 Bugfix #3632 2024-01-01 23:14:45 +01:00
Blaz Kristan
48f8a45031 Last minute adjustments & fixes 2023-12-31 18:05:21 +01:00
Istvan Meszaros
680cec5abb Make palette editor mobile friendly. 2023-12-30 19:49:08 +01:00
Blaž Kristan
e8b3c66c21
Merge pull request #3617 from imeszaros/cpal-mobile
Make palette editor more mobile friendly
2023-12-30 18:43:49 +01:00
Blaz Kristan
ecdc3be52e Changlog update 2023-12-30 11:56:21 +01:00
Blaž Kristan
301bdf2186
Merge pull request #3610 from Aircoookie/psram-4-json
Allow PSRAM (SPI RAM) to be used for JSON buffer
2023-12-30 11:00:53 +01:00
Blaz Kristan
1c1b67e000 Full per-port ABL implementation and bugfix.
Update of BusManager class (static)
2023-12-29 23:07:29 +01:00
Blaz Kristan
662870baf4 Changlog update, b2 release 2023-12-29 10:35:44 +01:00
Blaz Kristan
bc85520f5e Merge branch '0_15' into suspend 2023-12-28 23:38:42 +01:00
Blaz Kristan
d3be7a3edf Merge branch '0_15' into psram-4-json 2023-12-28 23:38:27 +01:00
Blaz Kristan
6cd0da821a Reduce heap fragmentation when switching ledmaps 2023-12-28 23:32:47 +01:00
Blaz Kristan
1333c41811 Slight tweak to reduce footprint 2023-12-28 20:05:02 +01:00
zanhecht
55eceb4080
Fix Firefox loading order, more resilient fallback to gradient method 2023-12-28 13:06:13 -05:00
Blaz Kristan
e95629f827 Remote preset cancles playlist 2023-12-27 20:14:51 +01:00
Blaz Kristan
6332ee6edb Effect buffer optimisations
setMode() fix for selecting gap
UI error messages
2023-12-27 19:36:25 +01:00
zanhecht
901d56f898
Use canvas instead of CSS gradient for liveview
Allows for "pixel perfect" liveview instead of diffused view, to better match what's shown at https://kno.wled.ge/features/effects/. This will make it easier to see what the LEDs are doing, although it may not be as accurate a representation for installations with diffused LEDs. Includes fallback to CSS gradient method for browsers that don't support canvas.
2023-12-27 13:20:22 -05:00
Istvan Meszaros
010c3494fd Make palette editor mobile friendly. 2023-12-26 11:09:20 +01:00
Blaz Kristan
5ebc345e95 Possible bugfix for #3609 #3616 2023-12-25 17:47:39 +01:00
Blaz Kristan
b3a768a04b Remove check for strip 2023-12-25 12:29:12 +01:00
Blaz Kristan
f414af4d82 Fix incorrect compare 2023-12-25 12:27:27 +01:00
Frank
b743ca8eb1
Merge pull request #3615 from srg74/patch-2
Update readme.md
2023-12-24 20:51:43 +01:00
srg74
a3a5bffce4
Update readme.md
Fixed typo
2023-12-24 12:10:51 -05:00
Blaz Kristan
7971f3cbd8 Fix for saving config. 2023-12-23 22:56:07 +01:00
Blaz Kristan
d1b80aa4d4 Beta2 2023-12-23 21:13:01 +01:00
Blaz Kristan
08d9f7d967 Fix for #2922 2023-12-23 21:05:01 +01:00
Blaz Kristan
5f62b4a89d Fix for #2922 2023-12-23 20:58:55 +01:00
Blaž Kristan
776502e6db
Merge pull request #3606 from WoodyLetsCode/welcome
Fix bug that welcome page was not shown
2023-12-23 20:27:20 +01:00
Frank
39e0a1fb9e
Merge pull request #3612 from Aircoookie/sunset-fix
workaround for invalid sunrise/sunset times (#3601)
2023-12-23 20:26:02 +01:00
Broersma
5ed02d2f0d Merge branch 'upstream/0_14_2' into usermod_v2_HttpPullLightControl_0.0.5 2023-12-23 13:47:42 +01:00
Frank
72e864b013 sunrise/sunset: fix for ambiguous error value
sunset = 0 is a valid result, as the function result is in UTC and not local time .
Example: local time is UTC-8, local sunrise = 08:00am => getSunriseUTC()  = 0.

So we cannot use "0" for "invalid". Using UINT16_MAX resolves the problem, and even allows to simplify calculateSunriseAndSunset() a bit.
2023-12-23 13:13:10 +01:00
Frank
5ab012163e workaround for #3601
if case of invalid or impossible sunset/sunrise results, retry with the previous day. max 3 days back, to prevent infinite loops and far-away results.
2023-12-22 23:28:58 +01:00
Blaz Kristan
1900686bc4 Bump 2023-12-22 15:49:51 +01:00
Blaz Kristan
809a294f9d Fix Pixel Magic button. 2023-12-22 15:43:31 +01:00
Blaz Kristan
cf3f6ede72 Suspend strip during operations 2023-12-22 15:39:07 +01:00
ezcGman
b76a90304d Merge branch '0_15' of https://github.com/Aircoookie/WLED into ledmaps-realtime 2023-12-22 13:19:44 +01:00
Woody
7af5b24b03
Fix bug that welcome page was not shown 2023-12-21 22:17:43 +01:00
Blaz Kristan
1f81fb9284 Implement JSON buffer in PSRAM to free up DRAM. 2023-12-21 21:30:17 +01:00
Blaz Kristan
4e105492ca Retry on failed JSON load.
Throttle for ESP8266
This is a band-aid for ESP8266 JSON corruption and not a proper fix.
2023-12-21 21:02:53 +01:00
Blaž Kristan
abf7dd5fa8
Merge pull request #3587 from WoodyLetsCode/search-scroll-top
Scroll to first search result on search
2023-12-21 20:49:44 +01:00
Blaž Kristan
6c877b6d44
Merge pull request #3597 from WoodyLetsCode/inline
Inline iro.js and rangetouch.js
2023-12-21 20:43:29 +01:00
Xaver
86d2998dc0
Add reference to old loading of iro.js and rangetouch.js 2023-12-20 11:30:28 +01:00
Woody
201daf8ff3
Remove /iro.js and /rangetouch.js 2023-12-19 22:40:24 +01:00
Woody
1140f5f6cb
Update version to 2312190 2023-12-19 21:18:33 +01:00
Woody
0a91d60677
add onload event to body 2023-12-19 21:12:07 +01:00
Woody
5cd8f5681e
Remove unused feedback function
This was probably forgotten to remove in commit d6c0642a02ab2c43391ebb7db3ef353f21cbe5fb
2023-12-19 20:41:56 +01:00
Xaver
b2babd9502
inline iro.js and rangetouch.js 2023-12-19 16:52:15 +01:00
Blaz Kristan
10faaaf531 Build bump & changelog 2023-12-18 21:52:22 +01:00
Blaž Kristan
7642c5a50d
Merge pull request #3529 from Aircoookie/0_14_1
0.14.1-beta
2023-12-18 21:20:12 +01:00
Blaz Kristan
42dba3170d Fix for #3593 2023-12-17 22:16:57 +01:00
Blaz Kristan
5c90a742ba Fix for #3593 2023-12-17 22:15:28 +01:00
Blaz Kristan
9e57ef074d Simplify PIR usermod
- remove periodic updates
- immediately trigger MQTT
- call mode chang to CALL_MODE_BUTTON
2023-12-17 12:56:30 +01:00
Blaz Kristan
9e9b1c3c98 Fix for incorrect move of MQTT publish 2023-12-17 12:14:44 +01:00
Blaz Kristan
13d5deddec Fix buffer overwrite in PIR MQTT 2023-12-17 11:34:44 +01:00
Blaž Kristan
8522760c70
Merge pull request #3591 from WoodyLetsCode/caching
Fix ETag caching
2023-12-16 13:31:07 +01:00
Blaž Kristan
5bc2282ac5
Merge branch '0_15' into caching 2023-12-16 13:27:50 +01:00
Blaz Kristan
2944b2a8f6 Merge branch '0_15' into temporary-AP 2023-12-16 13:07:40 +01:00
Blaž Kristan
264480b9bc
Merge pull request #3586 from WoodyLetsCode/aircoookie-link
Add link to Aircoookie in Info
2023-12-16 13:04:54 +01:00
Blaž Kristan
7d52cc46dc
Merge pull request #3590 from WoodyLetsCode/style
Send empty page if skin.css does not exist
2023-12-16 13:03:39 +01:00
Blaž Kristan
37c9fd278c
Merge pull request #3511 from WoodyLetsCode/simple-mode
New implementation of the simplified UI
2023-12-16 13:02:18 +01:00
Blaz Kristan
3d6fe0a565 Reduce memory fragmentation 2023-12-16 12:38:15 +01:00
Frank
da488f76d2 LDR_Dusk_Dawn: use pinManager, check ldrPin before use (quick-fix for #3490) 2023-12-15 21:58:05 +01:00
Frank
6d28de77d1 npm run build
refreshing all UI files
2023-12-14 20:47:58 +01:00
Frank
a8bd46c521 bugfix - unusable pins on pico32 boards (#3573)
According to the technical manual, GPIO 16 + 17 are used for onboard flash, so cannot be used by WLED.

example buildenv:

[env:esp32_pico]
extends = env:esp32dev_qio80
board = pico32
2023-12-14 20:36:05 +01:00
Frank
1ec3a74d4c Manila Time is the same as CST (solves #3517)
PHST abbreviation added for clarity.
2023-12-14 19:44:36 +01:00
Blaz Kristan
076449a33d Strings in flash 2023-12-14 18:34:00 +01:00
Blaz Kristan
1b5cc2abf1 Button handling
- debug messages
- verify touch GPIO
2023-12-14 18:32:54 +01:00
Blaz Kristan
b176225910 Add Domoticz MQTT API
- to PIR sensor
- to Dallas temperature
2023-12-14 18:30:24 +01:00
Frank
082d1eea48
oappend robustness improvement
obuf is reset to nullptr in some cases
2023-12-14 15:58:45 +01:00
Woody
e99dfbae0d
Fix ETag caching 2023-12-14 14:41:08 +01:00
Frank
d6735bed4f
comment clean-up (cosmetic) 2023-12-14 13:53:56 +01:00
Woody
b024d93fa0
Send empty page if skin.css does not exist
This has the advantage that we do not need to send the 404 error page every time
2023-12-14 13:21:09 +01:00
Frank
dbe8554724 code spell checking - part3 (usermods)
if you can spell Fahrenheit, you can't spell Celsius. And vice versa :-)
2023-12-14 03:52:06 +01:00
Frank
9f79e64678 code spell checking - part2 (dependencies) 2023-12-14 03:50:22 +01:00
Frank
f513cae66e code spell checking - part1 (core)
I've found a code spellchecker, so this is what can be corrected easily. Changes are only affecting comments, readme and a few user-visible strings. So no functional impact expected.
2023-12-14 03:49:54 +01:00
Woody
37b807210e
Scroll to first search result on search 2023-12-13 21:42:24 +01:00
Xaver
15e26ba929
Add link to Aircoookie in Info 2023-12-13 11:34:25 +01:00
Woody
db1795981f
Fix dialog backdrop blur on Safari 2023-12-13 00:38:13 +01:00
Woody
2a40baf509
Update backdrop-filter blur value in index.css 2023-12-13 00:24:56 +01:00
Woody
2dbf72e452
Better implementation of dialog 2023-12-12 23:57:20 +01:00
Blaz Kristan
67ae716c60 JSON HTTP error handling 2023-12-12 15:45:57 +01:00
Janos Stefan
8dfb130d19 Remove compiled html headers. 2023-12-11 12:23:45 +01:00
Janos Stefan
2a42fea32a Add APA106 support 2023-12-11 09:26:20 +01:00
Blaz Kristan
f69edefddf Segment syncing debug info 2023-12-10 10:12:58 +01:00
Blaz Kristan
6f3b5fc559 Add JSON API for AP toggle 2023-12-10 09:59:36 +01:00
Blaz Kristan
7275a34e1f Partial fix for #3578 2023-12-09 22:39:26 +01:00
Blaz Kristan
687e2ecaaa Merge branch '0_15' into simple-mode 2023-12-09 19:41:36 +01:00
Blaz Kristan
64312aedae npm and minor tweak 2023-12-09 19:29:32 +01:00
Blaz Kristan
391876e557 Autowhite cleanup
Fix for USC8904 hasWhite()
2023-12-09 19:03:33 +01:00
Blaz Kristan
cb95a7d418 Autowhite cleanup
Fix for UCS8904 hasWhite().
2023-12-09 18:58:45 +01:00
Woody
830f806dee
Fix segments not be displayed in simplified ui 2023-12-08 12:17:28 +01:00
Woody
21c2316f6b
Minor optimizations 2023-12-08 11:41:00 +01:00
Woody
930a1ae450
Fix dialog scrollbar on Firefox 2023-12-07 17:09:56 +01:00
Woody
aec331b5a6
Add selected palette and effect names to dropdown 2023-12-07 14:58:33 +01:00
Woody
1db6c281b1
Hide buttons for pixel art and custom palettes 2023-12-07 13:11:34 +01:00
ezcGman
5b70ca81a7 Dropped RLM again from HTTP API 2023-12-06 21:42:17 +01:00
ezcGman
d00df785a5 Merge branch '0_15' of https://github.com/Aircoookie/WLED into ledmaps-realtime 2023-12-06 21:41:34 +01:00
Woody
d0c6e7a285
Add check if UI was already simplified 2023-12-06 19:20:58 +01:00
Woody
058995a0b6
fix selected effect position 2023-12-06 18:57:34 +01:00
Woody
fd3be887b4
Add dropdown for effects 2023-12-06 17:48:14 +01:00
skinnyquiver
84802d9065 [fix] Uses extends as per softhack007 comment 2023-12-05 10:36:31 -06:00
David Rasch
90d696d826 fix(esp32c3-2mb): correct flash size for c3 board with only 2MB 2023-12-05 10:54:32 -05:00
skinnyquiver
aeb9e2ad9f [fix] Removes additional default envs line 2023-12-04 19:24:35 -06:00
skinnyquiver
26ab1bfd4f [Feat] Adds new esp32s3dev_16MB_PSRAM_opi dev board to work with LilyGo T7_s3 ESP32-S3-WROOM-1-N16R8 2023-12-04 19:17:15 -06:00
Woody
23d44cb28b
Update top position in .dialog CSS
for better mobile appearance
2023-12-04 20:42:33 +01:00
Broersma
de4b352495 Fix AsyncClient hangs 2023-12-02 16:23:21 +01:00
Blaz Kristan
d635117194 Bugfix ledtype 2023-12-02 12:15:57 +01:00
Blaz Kristan
c0412d368e SEGLEN bugfix if default map1D2D not defined
- comments
2023-12-02 00:48:49 +01:00
Blaz Kristan
7ec30f0796 FX:
- Matrix bugfix
- Lissajous metadata fix
2023-12-02 00:47:16 +01:00
Blaz Kristan
9815a55221 Bugfix #3561 2023-12-02 00:45:35 +01:00
Blaz Kristan
7c108e5128 Bugfix for SEGENV if defult map1D2D not defined 2023-12-02 00:44:30 +01:00
Blaz Kristan
4873031c37 Bugfix #3561 2023-12-02 00:39:43 +01:00
Blaz Kristan
15d23870c1 Tootip bugfix 2023-12-01 16:29:05 +01:00
Woody
2abbf7e762
Hide palette dialog if not available 2023-12-01 15:31:28 +01:00
Woody
1578aa7cb6
Finalize rebase 2023-12-01 14:09:02 +01:00
Woody
f2230751e7
Update padding of palette dialog 2023-12-01 11:57:38 +01:00
Woody
8fc0dda26d
Reset scrolling when opening pallet dialog 2023-12-01 11:57:38 +01:00
Woody
0ab71badfa
Clear palette search when dialog is opened 2023-12-01 11:57:38 +01:00
Woody
0f24d924f9
Update background color of palette dialog 2023-12-01 11:57:38 +01:00
Woody
518a0de95f
minor tweak 2023-12-01 11:57:38 +01:00
Woody
fa5648c0c3
Remove hideD class to use hide class instead 2023-12-01 11:57:38 +01:00
Christophe Gagnier
bd620a764d
Fix width issue with simplified UI due to desktop mode leftovers 2023-12-01 11:53:46 +01:00
Christophe Gagnier
cff42b5d27
Improve palette list resizing a bit 2023-12-01 11:53:46 +01:00
Christophe Gagnier
25eef2a40e
Show palette selection in a dialog 2023-12-01 11:51:50 +01:00
Woody
db276d5f1f
moved segcont simplification to simplifyUI() 2023-12-01 11:51:50 +01:00
Blaz Kristan
ce0d906c35
Dev mode fix. 2023-12-01 11:51:49 +01:00
Blaz Kristan
520826abc0
Minor tewaks. 2023-12-01 11:51:49 +01:00
Woody
5e1d6014d5
Fix color picker 2023-12-01 11:51:49 +01:00
Woody
32af17317c
minor improvements 2023-12-01 11:51:49 +01:00
Woody
3e7cc8a0a0
add comment for simplifyUI() 2023-12-01 11:51:49 +01:00
Woody
f717ce52fa
Display effect mode text on small screens 2023-12-01 11:50:07 +01:00
Woody
d880f3c628
Add palette list dropdown 2023-12-01 11:50:07 +01:00
Woody
0a97717b35
Add simplified segments 2023-12-01 11:50:07 +01:00
Woody
029403ea10
Only Effect Search should stay on top 2023-12-01 11:50:07 +01:00
Woody
e4ec65622f
Enable simplifiedUI by default 2023-12-01 11:50:07 +01:00
Woody
3ee3b97255
Remove old simplifiedUI code and update cdata.js 2023-12-01 11:09:42 +01:00
Woody
a3dd6ce891
simplifiedUI moved to index.js 2023-12-01 11:09:11 +01:00
Woody
0c97d7701e
Remove no longer needed code for simplifiedUI 2023-12-01 10:55:14 +01:00
Woody
b852b6f55c
Add simplifiedUI to info object 2023-12-01 10:55:14 +01:00
Woody
d3b7b857a4
Fix palette list shadow of selected option
Fix padding and margin in pallist element

Fix palette list shadow of selected option
2023-12-01 10:55:13 +01:00
Woody
63ad3f9290
Show brightness slider 2023-12-01 10:55:13 +01:00
Woody
40cc30e054
Remove unnecessary comment in simple.js 2023-12-01 10:55:13 +01:00
Woody
23374e98ae
Added preset quick load before palette list 2023-12-01 10:55:13 +01:00
Woody
40f544fffc
Reimplemented simplified UI 2023-12-01 10:52:45 +01:00
ezcGman
4fc69c9a2c Merge branch '0_15' of https://github.com/Aircoookie/WLED into ledmaps-realtime 2023-11-29 20:14:51 +01:00
ezcGman
2e5a485804 Realtime LED Maps: Feedback applied 2023-11-29 20:12:31 +01:00
Blaz Kristan
2d10b5be90 from #3555 2023-11-29 13:46:35 +01:00
Blaž Kristan
b0d0bb7953
Merge pull request #3555 from srg74/patch-1
Update readme.md
2023-11-29 13:42:43 +01:00
Blaž Kristan
8c69b85280
Merge pull request #3540 from WoodyLetsCode/search
Improve search and filter functionality
2023-11-29 13:41:38 +01:00
Blaz Kristan
9d6d1e4ff8 npm 2023-11-29 13:37:37 +01:00
Blaz Kristan
e71c72b4a2 Remove re-seeding FastLED random8/random16 in FX 2023-11-29 13:33:10 +01:00
Blaž Kristan
bf4b29b3e3
Merge pull request #3552 from TripleWhy/seedRandom16
Seed FastLED's RNG
2023-11-29 13:30:06 +01:00
Blaz Kristan
8e0809ceba Code size reduction 2023-11-29 11:56:47 +01:00
Broersma
230af48899 Fixing parsing only VALID JSON, in the past, when invalid JSON, the WLED runtime would crash 2023-11-28 12:04:41 +01:00
ezcGman
9dc459192e Merge branch '0_15' of https://github.com/Aircoookie/WLED into ledmaps-realtime 2023-11-28 11:49:53 +01:00
Blaz Kristan
8de2301c6b Usermod transition change 2023-11-28 10:46:04 +01:00
Blaz Kristan
f66b343edd Possible fix for #3541 2023-11-28 10:42:18 +01:00
srg74
ff82d36e94
Update readme.md
Fix typo
2023-11-27 22:47:07 -05:00
Blaz Kristan
c3e937f5e0 Fix for #3514 2023-11-27 20:58:21 +01:00
TripleWhy
25c5e823d9 Seed FastLED's random functions during startup
This allows effects or color palettes that use FastLED's RNG to be
different each time the device is powered on.
2023-11-27 18:44:09 +01:00
TripleWhy
528b8b1271 Use FastLED's random functions instead of arduino's for all effects 2023-11-27 18:18:47 +01:00
Blaz Kristan
b88344a6c0 Second attempt at #3541 2023-11-27 14:24:07 +01:00
Blaz Kristan
9e135cc81d Hide transitions if not enabled. 2023-11-27 13:39:52 +01:00
Blaz Kristan
72ef288357 Fix for #3514 2023-11-27 13:34:35 +01:00
Blaz Kristan
426ac29ca5 Possible fix for #3541 2023-11-27 13:27:52 +01:00
Woody
ceb330e3e4
Do not hide filter menu if filter is active 2023-11-26 18:15:00 +01:00
Woody
7ea8f741f2
Make code more readable 2023-11-26 17:35:29 +01:00
Woody
443c9fba03
Fix search input focus issue 2023-11-26 17:07:42 +01:00
Blaž Kristan
0227f79bd7
Merge pull request #3547 from micw/feature/wiz-smart-button-0.15
Support for wiz smart button
2023-11-25 19:17:36 +01:00
Michael Wyraz
2812eaa13d Support for wiz smart button 2023-11-25 16:42:39 +01:00
Woody
cb293fcdb3
Fix filter hiding on chrome 2023-11-24 13:48:12 +01:00
Woody
706428fe98
Fix filterFx function calls 2023-11-24 13:21:03 +01:00
Woody
698f5f951e
Fix search function behavior when filter is active 2023-11-24 13:04:29 +01:00
Woody
155c12f657
Improve search and filter functionality 2023-11-24 11:24:34 +01:00
ezcGman
a36c731d15 En-/disable LED maps when receiving realtime data 2023-11-23 17:13:13 +01:00
Blaz Kristan
6a793536dd Add button type: Touch (switch) #3537 2023-11-22 15:35:11 +01:00
Blaz Kristan
27532a4237 Add new AP type to prevent user frustration. 2023-11-22 15:30:04 +01:00
Blaz Kristan
467f69f50e Switch off AP after 5min
- when no clients are connected in "No connection after boot" mode
2023-11-21 17:23:51 +01:00
Frank
32e724e744
Merge pull request #3536 from Aircoookie/ntp_errorchecking
NTP validation, and rejecting malformed responses (related to #3515)
2023-11-20 21:13:35 +01:00
Frank
5fb891c495 indentation fix2 2023-11-20 19:24:04 +01:00
Frank
d56cefdc7a indentation fix 2023-11-20 19:20:18 +01:00
Frank
80c67d37c0 bufix: ntp query when NTP gets enabled from UI
when NTP got enabled via UI, WLED would wait up to 12 hours before issuing the first NTP request.
2023-11-20 15:13:39 +01:00
Frank
1e29d9463e validate NTP responses (fixes #3515)
* purge old (not yet processes) NTP responses
* validate server responses before updating WLED time
* purge receive buffer when package is rejected (avoids mem leak on esp32)
2023-11-20 12:24:34 +01:00
Blaz Kristan
75f6a53269 Fix (#3522) 2023-11-18 18:50:19 +01:00
Blaz Kristan
b5a8f3156c Bugfix (#3522) 2023-11-18 18:49:29 +01:00
Blaž Kristan
de245c08ce
Merge pull request #3483 from ajotanc/pxm_update
Update Pixel Magic Tool
2023-11-18 18:34:55 +01:00
Blaž Kristan
76a7f25083
Merge pull request #3522 from martinez20m/fix_ir_repeat
Fix repeatable action for ir json
2023-11-18 18:29:46 +01:00
Blaz Kristan
d9a96fbb29 Bugfix (#3533) 2023-11-18 18:24:22 +01:00
Blaz Kristan
16617660c3 Bugfix (#3533) 2023-11-18 18:22:47 +01:00
Blaž Kristan
a83d9a075f
Merge pull request #3508 from Moustachauve/fix-settings-cache
Fix settings caching on some browsers
2023-11-17 08:48:21 +01:00
Christophe Gagnier
eca3fb1e19 Revert "Implement front-end strategy to prevent caching"
This reverts commit 51dfa9a247e1627923949bea1e713bf09c6c78db.
2023-11-16 21:21:09 -05:00
Blaz Kristan
41bc799c3f 0.14.1 changelog 2023-11-16 20:37:03 +01:00
Blaz Kristan
44726c7411 Changelog 0.14.1-b1 2023-11-16 19:34:53 +01:00
Blaz Kristan
8f7f9ec367 Feature: Per-port ABL 2023-11-15 19:37:07 +01:00
Blaz Kristan
21de8f2284 Effect: 2D Matrix gap fix 2023-11-15 18:05:44 +01:00
Blaz Kristan
15797a89e7 Bugfix (#3526) 2023-11-15 18:04:54 +01:00
Blaz Kristan
c340a1d47f Bugfix (#3526) 2023-11-15 18:04:14 +01:00
Broersma
71cec39bc4 update to 0.0.4 includes SHA1 hash instead of old 10digit hash 2023-11-15 17:24:05 +01:00
Broersma
882542318c Update to v0.0.3, allowing all WLED JSON giving much more possibilities 2023-11-13 22:05:15 +01:00
Marcin Skiba
7238ef4f55 Fix repeatable action for ir json 2023-11-13 12:28:05 +01:00
Blaz Kristan
1049d65621 Changelog update 2023-11-12 14:21:50 +01:00
Blaž Kristan
552ae836e9
Merge pull request #3501 from TripleWhy/spookierEyes
A spookier version of Halloween Eyes
2023-11-12 14:01:56 +01:00
Blaz Kristan
1852c0a88c Merge branch '0_15' into spookierEyes 2023-11-12 12:49:02 +01:00
Blaz Kristan
d0d399bdfc Revert to comparing _data for double buffering
- warning: test for potential FPS drop (regression)
2023-11-12 12:45:28 +01:00
Blaz Kristan
3975fe0f02 Unload playlist on Wiz remote preset button press 2023-11-12 12:41:14 +01:00
Blaž Kristan
0739cfc240
Merge pull request #3498 from chrisburrows/multi-relay-settings
Allow more compile time settings for multi-relay
2023-11-10 19:54:41 +01:00
Chris Burrows
f31bf4f7c9 Updated readme 2023-11-10 17:36:48 +00:00
Blaz Kristan
f413671915 Focus fix. 2023-11-09 17:14:40 +01:00
Christophe Gagnier
e67a210e95 Implement back-end strategy to prevent caching
By setting the response header "Cache-Control" to "no-store" and setting "Expires" to 0, we make sure the browsers and place calling this never store it in cache.
2023-11-08 23:46:31 -05:00
Christophe Gagnier
51dfa9a247 Implement front-end strategy to prevent caching
By adding a random string to the path of the js file every time, we make sure to never hit the browser cache.
2023-11-08 23:45:48 -05:00
Blaz Kristan
7c121b8ba6 Dissolve fix (#3502) 2023-11-08 18:42:43 +01:00
Blaz Kristan
ae92a5c25e Dissolve fix (#3502) 2023-11-08 18:41:46 +01:00
Blaz Kristan
fabd3b8421 Better reverse proxy support. 2023-11-08 18:40:52 +01:00
Chris Burrows
94d754e63a Allow more compile time settings 2023-11-07 16:06:03 +00:00
Blaz Kristan
f869542a47 Changelog update. 2023-11-06 20:39:58 +01:00
Blaz Kristan
2b616b688d Implement global JSON API boolean toggle. 2023-11-06 20:08:45 +01:00
TripleWhy
0925ea6f9c Add some comments 2023-11-04 16:12:22 +01:00
TripleWhy
87b5565679 Minor simplification 2023-11-04 16:12:10 +01:00
TripleWhy
adcecf969a Simplify casting a bit, where possible 2023-11-04 15:54:21 +01:00
TripleWhy
f3831665d4 Fix type name 2023-11-04 15:48:22 +01:00
Blaz Kristan
9db8d44654 Sort presets by ID 2023-11-04 09:51:25 +01:00
Blaz Kristan
e1075a3bbf Sort presets by ID 2023-11-04 09:39:08 +01:00
TripleWhy
3b6f499fc5 Reduce EyeData size by a few bytes 2023-11-02 18:31:58 +01:00
TripleWhy
2c1fbe103b Spookier version of Halloween Eyes 2023-11-02 18:12:18 +01:00
Blaž Kristan
1543862f3b
Merge pull request #3490 from JeffWDH/main
Add LDR sensor dusk/dawn preset control Usermod
2023-11-02 16:47:00 +01:00
JeffWDH
5b7b34a9f0 Add LDR sensor dusk/dawn preset control Usermod 2023-11-02 11:20:08 -04:00
Blaž Kristan
fb6271eecf
Merge pull request #3496 from WoodyLetsCode/power-supply
Fix wrong power supply info
2023-11-01 10:35:57 +01:00
Blaz Kristan
031526b619 Correction 2023-11-01 10:29:52 +01:00
Blaz Kristan
e42ca2dbf2 Fix #3496 2023-11-01 10:28:57 +01:00
Blaz Kristan
4f5816f42e Merge branch '0_14_1' into power-supply 2023-11-01 10:26:42 +01:00
Blaz Kristan
555d0d3378 Npm & version comment 2023-11-01 10:23:57 +01:00
Blaž Kristan
1495b756d3
Merge pull request #3481 from WoodyLetsCode/random-bg-img
Improved random bg image and added random bg image options
2023-10-31 10:27:47 +01:00
Blaz Kristan
7f78d00b97 Tweaks 2023-10-31 10:21:00 +01:00
Blaz Kristan
bfd58b3cdf Merge branch '0_15' into random-bg-img 2023-10-31 09:24:08 +01:00
Blaz Kristan
e260b9473a Bump build 2023-10-31 09:20:54 +01:00
Blaž Kristan
ccc56d446f
Merge pull request #3484 from WoodyLetsCode/settings-page
Show 2D Configuration button by default
2023-10-31 09:17:50 +01:00
Blaz Kristan
31a4e38bc0 Shave a few bytes. 2023-10-30 13:43:50 +01:00
Woody
284366e6bb
fixed wrong power supply info 2023-10-29 19:04:54 +01:00
Blaz Kristan
9c6dda9bd2 Segment copy bugfix
Audio palette modification
2023-10-29 11:27:17 +01:00
Blaz Kristan
e5f6f8dfa7 Twinklefox & Twinklecat fix 2023-10-28 21:04:19 +02:00
Blaz Kristan
0232117de5 Twinklefox fix
Tooltip tuning
2023-10-28 21:02:49 +02:00
Blaz Kristan
96700fe3d1 Fix for udp sync (#3487) 2023-10-27 17:49:48 +02:00
Blaz Kristan
367a4e17a2 Fix udp sync (fix for #3487) 2023-10-27 17:48:19 +02:00
Blaz Kristan
eba0d7c1e0 Remove loggong. 2023-10-27 16:53:08 +02:00
Blaz Kristan
341a4a0d60 Fix sticky top. 2023-10-27 16:35:03 +02:00
Blaz Kristan
d116424241 Filter dropdown. 2023-10-26 22:09:46 +02:00
Blaz Kristan
db881ee011 Small optimisations.
2D liveView (non-WS) core
soundSim fix
2023-10-25 20:27:01 +02:00
Woody
34bed44a9b
Hide 2D Configuration if 2D is not compiled in 2023-10-25 18:33:31 +02:00
Xaver
d431aa4b59
Show 2D Config button by default 2023-10-25 08:33:07 +02:00
Alerson Jorge
2512bebc62 Corrections
- CSS adjustments
- Removal of some html
- Correction of CORS error when using the file locally, it was unable to generate the images that are saved in WLED
- Among others that I don't remember now
2023-10-24 18:56:12 -03:00
Alerson Jorge
309dbd7585 Fixies
- Correction in animation generation that was actually breaking
- Button to return to WLED if pxmagic.htm is accessed via url (http://), if accessed via external (file://) the button will not show
- Adjustments to CSS and some features
2023-10-24 13:28:33 -03:00
Alerson Jorge
a1f28caa8e Update Pixel Magic Tool
Reducing the size of HTML/CSS/Javascript
2023-10-24 12:52:06 -03:00
Woody
4204393337
Merge branch '0_15' into random-bg-img 2023-10-23 22:21:01 +02:00
Blaz Kristan
789e34702b Pixel Magic logo 2023-10-23 21:06:53 +02:00
Blaz Kristan
47bc1bf88d Merge branch '0_14_1' into 0_15 2023-10-23 20:18:55 +02:00
Blaz Kristan
9867227ccd Increase IRAM at the expense of cache for ESP8266 2023-10-23 19:30:44 +02:00
Blaz Kristan
26302d478e Shave a few bytes. 2023-10-23 19:26:02 +02:00
Blaž Kristan
0decf94c9c
Merge pull request #3480 from knarfd/0_14_1
Add #HH and #MM time options for ScrollingText effect
2023-10-23 19:20:17 +02:00
knarfd
0ae78efd43
Update FX.cpp 2023-10-23 18:28:47 +02:00
Woody
b5af6b0bf9
added options for random bg image 2023-10-23 17:30:15 +02:00
Blaž Kristan
3eabefd3d6
Merge pull request #3466 from WoodyLetsCode/fix-effect-jumping
Fix jumping of selected effect on refresh
2023-10-22 19:12:49 +02:00
Woody
7ff6a6e0e7
updated html_ui.h via npm run build 2023-10-22 18:26:52 +02:00
Woody
94dc611024
Merge pull request #1 from WoodyLetsCode/0_14_1
update to 0.14.1
2023-10-22 18:20:24 +02:00
Woody
0b28107432
Merge branch 'fix-effect-jumping' into 0_14_1 2023-10-22 18:19:15 +02:00
Blaz Kristan
fe717dad7f Possible fix for:
- #3382
- #3312
2023-10-22 17:54:00 +02:00
Blaz Kristan
fb3816e2e5 Possible fix for:
- #3382
- #3312
2023-10-22 17:53:16 +02:00
Blaz Kristan
535bf4c848 npm 2023-10-22 12:37:27 +02:00
Blaž Kristan
1fc60b0682
Merge pull request #3460 from mountainash/fix/broken-asset-links
Fixed broken Alphacoders hosted assest asset links
2023-10-22 11:41:15 +02:00
Mountain/\Ash
302f1ee8e3 removed: past Easter event 2023-10-22 11:02:26 +02:00
Mountain/\Ash
42aec56b8e refactor: removed trailing whitespace 2023-10-22 11:02:26 +02:00
Mountain/\Ash
199c00c59b fix: image URLs moved on alphacoders 2023-10-22 11:02:26 +02:00
Blaž Kristan
107bb14555
Merge pull request #3296 from ajotanc/pxmagic
Updating pxmagic and WLED UI
2023-10-21 20:22:06 +02:00
Blaz Kristan
5820792013 Revert changes. 2023-10-21 20:12:22 +02:00
Blaz Kristan
0e20248494 Fix gitignore. 2023-10-21 20:01:12 +02:00
Blaz Kristan
c4f4b247bc Merge branch 'main' into 0_15 2023-10-21 19:52:49 +02:00
Blaz Kristan
0d66bc49c2 Merge branch 'main' into 0_14_1 2023-10-21 19:52:29 +02:00
Blaž Kristan
bdc78a826f
Merge pull request #3464 from ajotanc/new_feature
UI tooltips (interface improvements)
2023-10-21 19:27:01 +02:00
Blaz Kristan
6570062e61 Slight tweaks. 2023-10-21 19:18:45 +02:00
Woody
820facb833
Removed unnecessary text 2023-10-21 18:13:01 +02:00
Alerson Jorge
a933fcf7e2 Optimisations, and fix variable multiplier in tooltip() 2023-10-20 19:13:45 -03:00
Alerson Jorge
2d3039c6a2 Fix 2023-10-20 18:22:13 -03:00
Alerson Jorge
aca01044f4 Add brand
Since PXM will not open internally but on another page from the button, I decided to add the logo again if it's not a problem of course.. Just so I don't run out of information
2023-10-20 18:20:28 -03:00
Blaz Kristan
dffd1b1d69 Optimisations.
- tooltip everywhere
- smaller footprint
- fix brightness div
2023-10-20 21:32:39 +02:00
Alerson Jorge
14fc64f2f1 Fix
Checkbox fixes added
2023-10-20 12:20:49 -03:00
Woody
04791d06d0
hide URL field when Random BG image is checked 2023-10-20 15:58:25 +02:00
Alerson Jorge
a485451328 Fix tooltip
Messages showing correctly according to their respective effect.
2023-10-20 09:27:00 -03:00
Woody
c7d399c122
fix effect jumping on refresh
fix effect jumping on refresh

fix jumping of selected effect on refresh
2023-10-20 12:08:11 +02:00
Alerson Jorge
df155bed89 Merge branch 'new_feature' of https://github.com/ajotanc/WLED into new_feature 2023-10-19 16:39:17 -03:00
Alerson Jorge
3ee3630d22 Correction
Correction of the sliders in the `setEffectParameters()` function to eliminate the need to update the old tooltip span.
2023-10-19 16:39:00 -03:00
Alerson Jorge
6b2911b8c8
Merge branch '0_15' into new_feature 2023-10-19 15:20:32 -03:00
Blaz Kristan
d474200d7f Power button override (solves #3431)
Simple CSS optimisation.
2023-10-19 18:54:54 +02:00
Alerson Jorge
cc6f6277f6 Squashed commit of the following:
commit 1dab26bcbcac051f2b7be47a2d5c757a9938bf1f
Author: Christian Schwinne <dev.aircoookie@gmail.com>
Date:   Thu Oct 19 13:29:46 2023 +0200

    Update Discord invite links to point to guidelines channel
2023-10-19 13:49:52 -03:00
Alerson Jorge
0521e988bc UI interface improvements 2023-10-19 12:47:37 -03:00
Alerson Jorge
832ff39eb6 Revert "UI interface improvements"
This reverts commit 134798e82f2d646c7ddeb17799b3eed3d87fe015.
2023-10-19 12:45:41 -03:00
Alerson Jorge
134798e82f UI interface improvements
Improvements in tooltip creation
2023-10-19 12:41:08 -03:00
Alerson Jorge
b6f43966ea Some functionality improvements 2023-10-19 09:30:28 -03:00
Christian Schwinne
1dab26bcbc
Update Discord invite links to point to guidelines channel 2023-10-19 13:29:46 +02:00
Blaz Kristan
afa7be6fdc CSS optimisation 2023-10-17 20:55:10 +02:00
Blaž Kristan
36290c20aa
Merge pull request #3445 from Moustachauve/ota-lock-post-fix
Update response code when access is denied
2023-10-17 06:29:43 +02:00
Alerson Jorge
c33c7eb68e Correction related to enabling and disabling PXM in the User Interface 2023-10-16 19:27:11 -03:00
Alerson Jorge
5da33afecd Corrections made, added in a very accessible place
I added the possibility of using the tooltip on buttons (.btn) with the span inside the button;
Adjusted the tooltip css to center 100% in the middle
Some cleaning and correction of sele
2023-10-16 19:09:43 -03:00
Blaz Kristan
a49b49aaa9 Request throttling
UI/UX improvements
2023-10-16 18:34:51 +02:00
Christophe Gagnier
225fd0d05b Update response code when access is denied
Having the wrong pin would result in a server error (500). The more appropriate error code for that would be 401.
This also changes the page that asks for users to login from 200 to 401.
2023-10-16 03:19:14 -04:00
Alerson Jorge
c43b4f9cf0
Merge branch 'main' into pxmagic 2023-10-16 01:22:41 -03:00
Alerson Jorge
3581f4c87e Modifications 2023-10-16 01:18:00 -03:00
Alerson Jorge
7a4e0cc850 Revert "Modifications"
This reverts commit ba49da75de56946f54febba3f6141c53a7062892.
2023-10-16 01:15:21 -03:00
Alerson Jorge
ba49da75de Modifications 2023-10-16 01:10:40 -03:00
Blaz Kristan
f329a5950e Speed optimisations. 2023-10-15 13:06:40 +02:00
Blaž Kristan
d95158003c
Merge pull request #3368 from tetele/usermod-ssdr-leading-zero
Usermod SSDR - allow configurable leading zero
2023-10-14 20:50:53 +02:00
Blaz Kristan
1be6223a31 Pixelmagic optimisation
Filter tooltips
2023-10-14 20:44:11 +02:00
Blaz Kristan
76178b423e Fix pixel magic 2023-10-14 18:10:37 +02:00
Blaz Kristan
195e537499 Merge branch '0_14_1' into 0_15 2023-10-14 17:39:20 +02:00
Blaž Kristan
418abc2b0a
Merge pull request #3414 from DanCaveman/max-fan-pct-to-pwm-fan-usermod
added the max fan pct to the PWM-Fan usermod.
2023-10-14 17:31:38 +02:00
Blaz Kristan
277f0346f2 0.14.1 alpha 1 2023-10-13 20:42:19 +02:00
Blaz Kristan
6148cbb122 Merge branch 'main' into 0_14_1 2023-10-13 20:40:42 +02:00
Frank
3847bfc41a npm run build
plus fixing a small typo in VERSION
2023-10-13 13:55:13 +02:00
Frank
783424dd26 version bump 0.14.0 (release) 2023-10-13 13:45:25 +02:00
Blaz Kristan
4c1861dd27 Merge branch 'main' into 0_15 2023-10-12 23:08:32 +02:00
Blaz Kristan
7f6486c77d Custom palette gamma
Mode blending option
Optimisations
2023-10-12 23:06:39 +02:00
Blaz Kristan
1b2a50f9a3 Minor optimisation 2023-10-12 16:15:16 +02:00
Frank
5dadf92a62
also change second discord link in readme
seems this was missing in the previous PR.
2023-10-11 21:09:56 +02:00
Frank
76821addd7
Merge pull request #3437 from chrishultin/fix_discord_invite
Updating "Discord" invite to point to #general
2023-10-11 21:07:22 +02:00
Christopher
a769c55c72 Updating "Discord" invite to point to #general 2023-10-11 09:58:58 -06:00
Blaz Kristan
347ec91bfc notify() bugfix 2023-10-08 22:44:30 +02:00
Frank
4245767357
fix for partly uninitialized sound sync packets (audioreactive)
audioSyncPacket contains four "invisible" padding bytes added by the compiler. These need to be initialized to zero, as future versions of the protocol will make use of these fields.
2023-10-08 19:54:14 +02:00
Frank
74d196ad50 npm run build
chores
2023-10-06 16:37:12 +02:00
Frank
3c4649748d
Merge pull request #3420 from mountainash/fix/duplicate-viewport-declaration
Remove duplicate `viewport` declaration, put lang=en into the right place
2023-10-06 16:27:25 +02:00
Frank
22985900a8
Merge pull request #3425 from mountainash/fix/git-ignore
.gitignore Reordered & grouped
2023-10-06 16:26:04 +02:00
Daniel Kaufman
86300a8e3c code review suggestions to make the code more efficient and cleaner 2023-10-05 09:49:00 -05:00
Mountain/\Ash
32ab2ae201 Allow /wled00/html_*.h files 2023-10-05 11:55:48 +02:00
Mountain/\Ash
23e4a2e28e Reordered & grouped 2023-10-05 10:26:51 +02:00
Mountain/\Ash
40515e62ac Ignoring HTML build output 2023-10-05 10:21:24 +02:00
Daniel Kaufman
b56490650c fix for maxPWMValuePct being ignored 2023-10-05 00:37:51 -05:00
Mountain/\Ash
b5751795b5 Fix: lang moved to the correct HTML element 2023-10-04 21:42:15 +02:00
Mountain/\Ash
43d6151506 Fix: removing duplicate viewport declaration
- removed unneeded self-closing slash
2023-10-04 21:37:10 +02:00
Daniel Kaufman
8ccfb606c0 added the max fan pct to the PWM-Fan usermod. This allows high speed (loud fans) like delta fans to cap at a maximum percentage to keep noise down. 2023-10-03 12:42:51 -05:00
Blaz Kristan
3b74cd5676 Merge branch 'main' into 0_15 2023-10-02 21:20:20 +02:00
Frank
26e766ee19
Merge pull request #3406 from Aircoookie/sunset_accuracy_fix
fix for #3400 - wrong sunset time 00:00
2023-10-02 19:58:06 +02:00
Blaz Kristan
6f96dc8f23 Gamma correction for custom palettes (#3399).
Bugfix for audio palettes.
2023-10-01 21:15:14 +02:00
Frank
1c3fdb73fb optimization: only use "float" math functions
- saves 5KB flash and some RAM
-allow to build with -D WLED_USE_UNREAL_MATH, to restore old behaviour and save another 6KB flash
2023-10-01 19:04:30 +02:00
Blaz Kristan
332be7edd6 Build bump. 2023-10-01 13:38:10 +02:00
Blaz Kristan
76e0e935f0 Merge branch 'bugfix' into 0_15 2023-10-01 13:27:18 +02:00
Blaz Kristan
7e6eb65950 Fix for #3403 2023-10-01 13:26:31 +02:00
Blaz Kristan
b0a56a431b Fix for #3405 2023-10-01 13:04:05 +02:00
Frank
166316e0c5 fix for #3400
replace low_accuracy math functions (sint_t, cos_t, atan_t, ...) with standard libm functions that have higher accuracy.
2023-09-30 23:34:02 +02:00
Alerson Jorge
4194e66d81 Corrections
It was missing to upload this file in the commit.

- PXMagic is enabled by default in the Preset tab, and can be disabled in Settings, UI session
2023-09-28 12:41:52 -03:00
Alerson Jorge
c9b9d86892 Corrections
Topic 1, 2
I made the change, took it off the website and put it in the Preset section under the +Preset, +Playlist buttons, it was in a good location.

Topic 3, 4
It reloads because it needs the updated information so that it can create the preset correctly with all the information generated from the selected image.

Topic 5
The change has already been made, it just hasn't gone up yet, it's default upload

Topic 6, 7
Fixed
2023-09-28 09:41:48 -03:00
Alerson Jorge
f2d00e6e42 Merge remote-tracking branch 'upstream/main' into pxmagic 2023-09-28 09:10:47 -03:00
Alerson Jorge
acfc166a11 Corrections 2023-09-28 09:09:42 -03:00
Blaz Kristan
3255382132 Add JSON override for ESP-NOW remote. 2023-09-27 20:39:26 +02:00
Blaz Kristan
25831bfb60 Codename "Ray of light" 2023-09-26 20:34:52 +02:00
Blaz Kristan
d011ca0626 Merge branch 'main' into 0_15 2023-09-24 16:59:27 +02:00
Blaz Kristan
5eadbe7ecd FX update
- Meteor: trail & 0.13 behaviour
- Meteor Smooth: train & 0.13 behaviour
- Scrolling Text: rotation
2023-09-24 16:48:59 +02:00
Frank
ea7e0c6204 npm run build
regenerate UI files from latest sources.
2023-09-23 21:22:14 +02:00
Frank
2dcb126e6d version bump 0.14.0-b6
beta release preparation.
2023-09-23 21:08:11 +02:00
Frank
438525e8ec
AR: use bandpass filter for analog input
Many bad quality analog mics are not centered properly at 1.6V, but stuck at 0V or stuck at 3.3V in silence. The bandpass filter removes DC offsets and improve signal quality.
2023-09-23 16:48:45 +02:00
Frank
eb66a403d9
Merge pull request #3377 from christianpatterson/audioreactive-initialize-i2ssource-bugfix
Fix ES8388Source & ES7243 initialization.
2023-09-19 16:32:10 +02:00
Frank
26ac612474 fix wrong signature of SPH0654::initialize()
* debug messages added to different initializers
* SPH0654::initialize() was having a wrong signature: uint8 instead of int8.

C++ can be a real bastard ;-)
2023-09-19 15:27:41 +02:00
Blaz Kristan
2e28df3e8a Merge 'main' to 0_15 2023-09-18 21:28:43 +02:00
Frank
43613e3b10
Matrix effect speedup
Typically, more than 50% of pixels are black. 
This optimization avoids to fade and rewrite already black pixels.
2023-09-18 15:56:50 +02:00
Frank
555dd2e726
matrix: fix for a corner case (e.g. gapmaps)
workaround for a corner case; if the reference pixels falls into a "gap" then gPC returns BLACK. Solutions is to reject BLACK.
2023-09-18 15:34:53 +02:00
Frank
3260f46543 bugfix for #3375
* improves robustness of the Matrix effect, by dynamically adjusting the "reference color" used to identify "falling code" head pixels.
* a bit faster, as I've removed the need to scan all pixels a second time for "black screen" detection.

Its still not perfect, and the main loop could be simplified a lot by leveraging on the fact that all changes actually happen in the top row, and "falling" is actually just moving everything down by one pixel.
2023-09-18 14:57:15 +02:00
Christian Patterson
f9de23402a Remove obsolete I2C parameters from AudioSource::initialize and all overriding methods. 2023-09-17 19:10:18 -05:00
Christian Patterson
9e155cf94a Fix ES8388Source & ES7243 initialization.
Update ES8388Source::initialize and ES7243::initialize method signatures to match I2SSource::initialize so that when initialize is called on a AudioSource pointer the child class's method is used.
2023-09-17 14:12:20 -05:00
Blaz Kristan
dcace43ce2 Merge branch 'main' into 0_15 2023-09-17 20:39:13 +02:00
Frank
527e3d6cd0
Merge pull request #3373 from Aircoookie/ripple-tweak
2D Ripple and Meteor effect tweak
2023-09-17 18:48:43 +02:00
Blaz Kristan
befce5b887 Typo fix and preset reload after restore 2023-09-16 20:29:32 +02:00
Blaz Kristan
9929c96650 Restore corrupt presets from backup 2023-09-16 14:41:47 +02:00
Blaz Kristan
c7d45c28cf Meteor effect change
- remedy for #3374
2023-09-16 12:30:57 +02:00
Blaz Kristan
87cc3fd714 2D Ripple effect tweak
for #3370
2023-09-16 00:21:10 +02:00
Frank
282d58a6fe
audioreactive: stack size tuning
This gives ~3KB extra free heap on -S2.
2023-09-14 18:26:57 +02:00
Blaz Kristan
b4aec91d67 Bugfix 2023-09-12 23:44:18 +02:00
Blaz Kristan
d2a149ee23 Version 2023-09-12 17:07:31 +02:00
Blaz Kristan
8a72f94b3d Merge branch 'main' into 0_15 2023-09-12 17:02:40 +02:00
Blaz Kristan
fc4ed1c50b Fix for #3369 2023-09-12 16:48:32 +02:00
Blaz Kristan
ae1d0a18f3 Separate mode blending option 2023-09-12 06:17:06 +02:00
tetele
9709ca331e Backwards compatible default value 2023-09-11 16:25:36 +03:00
tetele
b4a9641c31 Add option for leading zero 2023-09-11 15:59:04 +03:00
Blaz Kristan
cc68e6b6e6 Squashed commit of the following:
Remove sync receive
Disallow 2D effects on non-2D segments
Optimisations
Sync clarification
AR palettes
Return of 2 audio simulations
Bugfix in sync #3344
    - remove excessive segments
    - ignore inactive segments if not syncing bounds
    - send UDP/WS on segment change
    - pop_back() when removing last segment
Add pairing support for ESP-NOW sync
Reduce string RAM footprint
UDP parse optimisation
Make WizMote work with sync.
ESP-NOW wireless sync POC.
    - caveat: devices have to be on the same channel
    - clashes with WizMote handling ATM
2023-09-10 18:52:14 +02:00
Frank
60c47cfca1 npm run build
regenerated UI files
2023-09-10 16:59:31 +02:00
Frank
720abd4e04 version bump 0.14.0-b5
preparations for releasing -beta5
2023-09-10 16:54:59 +02:00
Frank
b4fe694d1b esp32 buildenv with audioreactive
To make it better readable and prevent copy&paste errors, all needed flags can be referenced from the "esp32" buildenv:
  ${esp32.AR_build_flags}
  ${esp32.AR_lib_deps}
2023-09-10 16:30:04 +02:00
Frank
c117785554 8266 optional build flags to increase IRAM
related to #3364
2023-09-10 02:00:09 +02:00
Maximilian Mewes
a9d6a15924 Update Classes 2023-09-09 21:50:30 +02:00
Frank
e9723de6c3 minor updates for audioreactive
* remove "not supported" warning on -S2
* minor tweaking of beat detector
* optimized parameters for arduinoFFT
* fixed a few implicit "double" promotions
* minor UDP protocol optimizations
* small optimization for fft task create / suspend
* completely remove analogmic settings for -S3/-S2/-C3 where analog is not supported

changes were already tested extensively in the MM fork.
2023-09-09 21:07:20 +02:00
Maximilian Mewes
b8c61b5236 Move battery types to a separate folder 📁 2023-09-09 21:01:55 +02:00
Frank
da0cf01eee fixing a few implicit promotions to double
any expression with at least on "double" is evaluated as double, which is slow.
2023-09-09 20:48:17 +02:00
Maximilian Mewes
b77e1eb94b Merge remote-tracking branch 'origin/main' into usermod-battery-update2023 2023-09-08 23:17:23 +02:00
Blaz Kristan
e40f266042 Better bugfix in mode blending when _t is unallocated 2023-09-08 16:01:11 +02:00
Frank
69fb15d3cb debug message optimizations for 8266
as discussed in previous commit.
2023-09-08 14:06:57 +02:00
Frank
188956a4af bugfix for random crash when switching between presets
this is a band-aid fix for random crashes when switching between presets with multiple segments - crossfade disabled.

!! adding type initializers fixed it for me on -S3, however I still see (less frequent) crashes on esp32, due to heap corruption.

It took me hours to get a meaningful stackdump:

assert failed: heap_caps_free heap_caps.c:360 (heap != NULL && "free() target pointer is outside heap areas")

Backtrace: 0x40084ee1:0x3ffb2570 0x4008e341:0x3ffb2590 0x40094709:0x3ffb25b0 0x4008534a:0x3ffb26e0 0x40094739:0x3ffb2700 0x400e9037:0x3ffb2720 0x400e917c:0x3ffb2740 0x400eaeeb:0x3ffb2760 0x40117ec5:0x3ffb27c0 0x401184ea:0x3ffb2800 0x4013509d:0x3ffb2820

  #0  0x40084ee1:0x3ffb2570 in panic_abort at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_system/panic.c:402
  #1  0x4008e341:0x3ffb2590 in esp_system_abort at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_system/esp_system.c:128
  #2  0x40094709:0x3ffb25b0 in __assert_func at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/newlib/assert.c:85
  #3  0x4008534a:0x3ffb26e0 in heap_caps_free at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/heap/heap_caps.c:360
      (inlined by) heap_caps_free at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/heap/heap_caps.c:345
  #4  0x40094739:0x3ffb2700 in free at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/newlib/heap.c:39
  #5  0x400e9037:0x3ffb2720 in Segment::deallocateData() at wled00/FX_fcn.cpp:189
  #6  0x400e917c:0x3ffb2740 in Segment::resetIfRequired() at wled00/FX_fcn.cpp:206
      (inlined by) Segment::resetIfRequired() at wled00/FX_fcn.cpp:203
  #7  0x400eaeeb:0x3ffb2760 in WS2812FX::service() at wled00/FX_fcn.cpp:1216 (discriminator 2)
  #8  0x40117ec5:0x3ffb27c0 in WLED::loop() at wled00/wled.cpp:115 (discriminator 3)
  #9  0x401184ea:0x3ffb2800 in loop() at C:/src/wled00/wled00.ino:20
  #10 0x4013509d:0x3ffb2820 in loopTask(void*) at C:/Users/user/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:50

ELF file SHA256: 18c20b536f4c6ef4
2023-09-08 12:06:23 +02:00
Frank
c7dd4a7f2b potentiometer: check that pin supports ananlogread
newer esp32 frameworks will throw lots of warnings when trying to read from a non-analog pin.
2023-09-07 18:55:13 +02:00
Frank
111f1729c9
Update CHANGELOG.md
small correction
2023-09-07 17:51:28 +02:00
Blaz Kristan
164372b46a Update changelog 2023-09-07 16:32:59 +02:00
Frank
1af3794fed
Merge pull request #1039 from pjhatch/PJH_ADD_Linearbounce
Pjh add linearbounce
2023-09-06 11:14:43 +02:00
Blaz Kristan
885f4ded0c Merge branch 'main' into PJH_ADD_Linearbounce 2023-09-05 21:20:55 +02:00
Frank
9bb018d8d9 bump to build 2309050 2023-09-05 19:15:22 +02:00
Frank
58187e00e6 optional ball trails (rolling balls) 2023-09-05 19:11:44 +02:00
Frank
5110a8c636 Squashed commit of the following:
commit 84148ad07a7ac94993dc9dfd0bdc6d7a8d9e47ac
Author: Blaz Kristan <blaz@kristan-sp.si>
Date:   Sun Sep 3 12:34:17 2023 +0200

    Implement palette colors

commit af3c8f66f7e77dd6306ceadf2cea26a41336e439
Author: Blaz Kristan <blaz@kristan-sp.si>
Date:   Tue Aug 1 18:18:41 2023 +0200

    revert wled00.ino

commit 3097a1b17efa06b78d52611b3a9d3c519a15ed17
Author: Blaz Kristan <blaz@kristan-sp.si>
Date:   Tue Aug 1 18:13:37 2023 +0200

    minor aesthetic fixes

commit 54b80f74b2dc8766951d55438c6bc560b33e505b
Author: Blaz Kristan <blaz@kristan-sp.si>
Date:   Tue Aug 1 18:09:32 2023 +0200

    remove unused variable

commit 9a78d28cd71da998cdd76ba826946f54ee2044bd
Merge: 56a74bc5 1ed81793
Author: Blaz Kristan <blaz@kristan-sp.si>
Date:   Tue Aug 1 18:08:29 2023 +0200

    Merge branch 'main' into PJH_ADD_Linearbounce

commit 56a74bc54c5bbf189b1f98c6cd216956b4f6bd6c
Author: pjhatch <66844564+pjhatch@users.noreply.github.com>
Date:   Sat Aug 15 12:34:13 2020 -0500

    Update FX.cpp

    Added the improvements suggested by Gregor Hartmann

commit a20358b61bf0c38356438c87e5c59663524e038e
Author: pjhatch <66844564+pjhatch@users.noreply.github.com>
Date:   Sun Jul 12 08:33:48 2020 -0500

    Adding 2 ball track modes

    With and without collisions

commit 341d9d1697e9af4fdf2fbd5b4c1de935d0b5a229
Author: pjhatch <66844564+pjhatch@users.noreply.github.com>
Date:   Sun Jul 5 14:55:14 2020 -0500

    Update FX.cpp

    Still 1 bug to fix - this was a test.

commit 9cee4243837f35431302814cc7ace13a72ab5fed
Author: pjhatch <66844564+pjhatch@users.noreply.github.com>
Date:   Sun Jul 5 14:53:14 2020 -0500

    Update FX.cpp

commit 37cb51cfd6991f6041d663de72debfdcf349c1da
Author: pjhatch <66844564+pjhatch@users.noreply.github.com>
Date:   Thu Jul 2 14:16:25 2020 -0500

    Adding Collision

    A couple of bugs still need sorting

commit 84b7bfb989e662e37a47d78e381105b3951311a6
Author: pjhatch <66844564+pjhatch@users.noreply.github.com>
Date:   Sun Jun 28 19:59:46 2020 -0500

    update for lost balls

    Added some protection - so that when intensity is lowered and raised some time later balls that have moved way off the track are recovered.

commit 04d17e483956b74754002da4cb4dfcddaf932f7b
Author: pjhatch <66844564+pjhatch@users.noreply.github.com>
Date:   Sun Jun 28 19:43:56 2020 -0500

    Added Ball Track V1

    In this version the balls bounce of the edges and do not interact with one another.
2023-09-05 18:39:51 +02:00
Frank
ddbe883d47 Merge branch 'fx-blending' 2023-09-05 18:37:55 +02:00
Frank
945ac82b6a
fix small typo in MQTT override code
bracket was on wrong position, resulting in this warning:

wled00/set.cpp:357:79: warning: value computed is not used [-Wunused-value]
     strlcpy(mqttGroupTopic, request->arg(F("MG")).c_str(), MQTT_MAX_TOPIC_LEN)+1;
2023-09-05 17:15:12 +02:00
Blaz Kristan
84148ad07a Implement palette colors 2023-09-03 12:34:17 +02:00
Blaž Kristan
25553a28a1
Merge pull request #3351 from PSandro/pr_info_time
show current local time in info page ⏲️
2023-09-02 20:52:33 +02:00
Blaz Kristan
c2f5846a8e Add optional compile flag 2023-09-02 20:20:51 +02:00
Blaž Kristan
3f98e9451a
Merge pull request #3348 from djasonic/staircase-toggle-pr 2023-09-02 18:52:16 +02:00
Blaž Kristan
6c72194346
Add compile time MQTT override (#3354)
- for max server name length
- for max topic length

Fix for #3353
2023-09-02 01:05:45 +02:00
Dimitry
822dd24756
Add Internal Temperature usermod (#3246)
* Add Internal Temperature usermod

* Fix line endings

* Update readme

* Format readme
2023-09-01 19:43:21 +02:00
Blaz Kristan
262ed38429 Fix for #3352 2023-08-31 19:10:22 +02:00
Sandro Pischinger
5ff66ce4dd recreate html_ui.h & html_simple.h 2023-08-30 20:58:32 +02:00
Sandro Pischinger
ca73b8e0b8 rename 'Current local time' -> 'Time' 2023-08-30 20:57:54 +02:00
Sandro Pischinger
2d49ace0e3 recreate html_ui.h & html_simple.h 2023-08-30 20:45:05 +02:00
Sandro Pischinger
d52f22044e Revert "recreate web ui files"
This reverts commit 2bf052aac90924f0f6291d5dadf07400631a064c.
2023-08-30 20:43:22 +02:00
Sandro Pischinger
2bf052aac9 recreate web ui files 2023-08-29 23:52:32 +02:00
Sandro Pischinger
a79c9d5f4f info page: add time 2023-08-29 23:44:08 +02:00
Blaz Kristan
6f9bcf1858 Merge branch 'main' into fx-blending 2023-08-28 17:59:02 +02:00
Blaz Kristan
d1b00ba95d Bugfix.
- feed WDT even if strip is updating
- provide custom palette names
- handle interface cooldown properly
- rotary encoder ALT fix for custom palettes
2023-08-28 17:58:30 +02:00
Frank
bb45bee7f8 oappend() debug message when buffer is full
oappend() silently discards strings when the buffer is full, leading to strange effects like half-working UI pages.

The new debug message will help developers to understand what could be wrong.
2023-08-27 23:01:55 +02:00
Jason Cobb
246f0b21fd staircase toggle power on/off option bool 2023-08-26 22:19:52 -05:00
Blaz Kristan
394443b6d1 Merge branch 'main' into fx-blending 2023-08-25 18:34:56 +02:00
Blaz Kristan
fc1dd2daac Fix for #3346 2023-08-25 18:34:11 +02:00
Blaz Kristan
ba1b6f321e Button bugfix. 2023-08-23 14:50:46 +02:00
Blaz Kristan
06402cf1c6 Making buffer fix easy to maintain and portable.
Thanks to @softhack007
2023-08-17 17:10:29 +02:00
Blaz Kristan
dfc33389d8 Optimisation. 2023-08-17 16:46:31 +02:00
Blaz Kristan
4e83752655 Merge branch 'main' into fx-blending 2023-08-17 16:24:47 +02:00
Blaz Kristan
7e28718681 Too long metadata string bugfix. 2023-08-17 16:24:16 +02:00
Blaz Kristan
bf452e922a Playlist saving bugfix.
Fixes #3324
2023-08-16 22:11:16 +02:00
Blaz Kristan
4911a74cac Scrolling text enhancement.
- breaking change
- remove leading 0 checkmark
- add reverse scroll checkmark
- add vertical scroll if text fits into segment (intensity ==0 or ==255)
- rotated characters
- leading 0 check added to short texts (i.e. #DDMM0)
Fixes #3322
2023-08-16 21:02:00 +02:00
Blaž Kristan
a2bda5a4db
Merge pull request #3317 from chroma-tech/group-masks-api
Add send and receive groups to json api
2023-08-14 13:01:16 +02:00
Shlomo Zippel
800abc605f Add send and receive groups to json api 2023-08-13 11:44:02 -07:00
Blaz Kristan
ac83b67632 Cleaner transition code.
Fixed skipped pixel flashing.
2023-08-12 12:45:11 +02:00
Blaz Kristan
00bc7dccb9 Merge branch 'main' into fx-blending 2023-08-12 11:36:40 +02:00
cschwinne
04aa9f0e61 Release of WLED beta 0.14.0-b4 2023-08-11 23:11:08 +02:00
Blaz Kristan
353e97a4c1 Clear status pixels 2023-08-11 00:48:32 +02:00
Blaz Kristan
7b28387bb4 Comments from Aircoookie addressed 2023-08-09 17:23:21 +02:00
Christian Schwinne
1889fe23c5
Merge branch 'main' into fx-blending 2023-08-09 16:58:21 +02:00
Blaz Kristan
9832fbe042 Segment reset 2023-08-08 20:40:19 +02:00
Blaz Kristan
084070475d Chasing memory corruption/leaks. 2023-08-07 16:50:18 +02:00
Blaz Kristan
cb42ca8765 FX optimisation 2023-08-06 19:11:44 +02:00
Frank
45d7e66488 effects bugfix: prevent crash when SEGLEN==1
* Blurz and a few other effects would crash (or behave unexpectedly) for single pixel segments
* replaced a few "MAX" by "max", because MAX will evaluate its arguments twice so its very inefficient.
2023-08-05 23:33:50 +02:00
Blaz Kristan
93a1616933 Blend tweaking. 2023-08-05 21:01:06 +02:00
Blaz Kristan
9a87a2ff0d Blending 2023-08-05 17:35:14 +02:00
Blaz Kristan
bdff05feaf Palette blending optimisation. 2023-08-05 13:53:12 +02:00
Blaz Kristan
937e3d0b94 FX blending POC 2023-08-05 13:50:08 +02:00
Blaz Kristan
8503aba583 Better random palette handling.
Remove unnecessary debug timing.
2023-08-03 22:28:53 +02:00
Blaz Kristan
bb8223d4ff Soap bugfix. 2023-08-02 22:01:15 +02:00
Blaz Kristan
af3c8f66f7 revert wled00.ino 2023-08-01 18:18:41 +02:00
Blaz Kristan
3097a1b17e minor aesthetic fixes 2023-08-01 18:13:37 +02:00
Blaz Kristan
54b80f74b2 remove unused variable 2023-08-01 18:09:32 +02:00
Blaz Kristan
9a78d28cd7 Merge branch 'main' into PJH_ADD_Linearbounce 2023-08-01 18:08:29 +02:00
Frank
5df197e814
disable ESP-NOW remotes in ethernet build (will crash without wifi) 2023-08-01 13:11:06 +02:00
Frank
5fe09e9787
esp-now remote: fix crash with AP = Always
initialize ESPNOW only when Wifi (STA or AP) is running
2023-08-01 11:53:32 +02:00
cschwinne
6be5360bdd Remove temp workaround 2023-08-01 00:48:18 +02:00
cschwinne
2b9007958b Merge branch 'main' into gif 2023-07-31 18:26:35 +02:00
Aircoookie
2f9c126d34 GIF Error codes 2023-07-31 18:13:03 +02:00
Frank
1ed817932b esp-now remote: reduce number of exported functions
too many global variables and functions ... this makes stuff 'static' that can remain at file scope
2023-07-30 21:47:18 +02:00
Aiden
0ccadb246f
Add WireGuard VPN usermod (#3270)
* added wireguard VPN usermod

* add example PIO override & edit readme

* add contact information and improve usermod performance
2023-07-27 11:35:52 +02:00
dependabot[bot]
b67235a7e5
Bump certifi from 2022.12.7 to 2023.7.22 (#3301)
Bumps [certifi](https://github.com/certifi/python-certifi) from 2022.12.7 to 2023.7.22.
- [Commits](https://github.com/certifi/python-certifi/compare/2022.12.07...2023.07.22)

---
updated-dependencies:
- dependency-name: certifi
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-26 16:29:21 +02:00
Christian Schwinne
93853613bd
Merge pull request #3280 from Aircoookie/alt-buffer
Bus-level global buffering
2023-07-25 17:01:49 +02:00
Frank
1ecb4fedcc
2D Drift: minor optimization
moving "t/20" out of the main loop gives some speedup.
2023-07-21 16:09:01 +02:00
Frank
c8fdf3731a upgrade to FastLED 3.6.0
changes from 3.50 to 3.6.0:
* bugfixes
* removed "register" keyword
* some speedups
* explicit bool() and uint32_t() operators, see https://github.com/FastLED/FastLED/issues/819

FX.cpp:  bugfix for "wled00/FX.cpp:4906:36:
error: cannot convert 'CRGB' to 'uint32_t' {aka 'unsigned int'} in initialization"
2023-07-20 22:36:47 +02:00
Frank
f8e766ffc0 add -S3 PSRAM (qio_opi) to nightly builds 2023-07-20 22:21:02 +02:00
Frank
050489dd80 allow Lolin Wifi Fix on -S3 2023-07-20 22:09:48 +02:00
Frank
2db966ba47 Improvements for -S3 with PSRAM
qio_opi:   PSRAM  8MB or 16MB
qio_qspi:  PSRAM  2MB or 4MB

fun fact: _opi and _qspi modes both require a special bootloader.
2023-07-20 22:09:14 +02:00
Frank
aa54d65f63 upgrade -S3/-S2/-C3 to platform 5.3.0
platform 5.3.0 = arduino-esp32 v2.0.6 + esp-idf v4.4.3

--> you will need new bootloader files for arduino-esp32 v2.0.6

--> coredumps are supported now, if you leave 64Kb of flash at the end of your partitions file (see example in wled_esp32_8MB.csv)
2023-07-20 21:39:25 +02:00
Alerson Jorge
37dc17ae15 Correction 2023-07-20 13:50:32 -03:00
Alerson Jorge
cd6b3d7dee Merge remote-tracking branch 'upstream/main' into pxmagic 2023-07-20 13:32:35 -03:00
Alerson Jorge
aec0bc5029 Updating pxmagic and WLED UI 2023-07-20 13:20:13 -03:00
Alerson Jorge
e010e67717 Revert "Updating pxmagic and inserting it in the WLED UI with option to enable and disable."
This reverts commit 44197d91c6ea43d9e7923f4e50ae7cdcc0776a18.
2023-07-20 12:30:02 -03:00
Alerson Jorge
44197d91c6 Updating pxmagic and inserting it in the WLED UI with option to enable and disable. 2023-07-20 12:25:16 -03:00
cschwinne
e3ee48b52e Deallocate relay, button and IR pins prior to reallocation in JSON config parser (#3294) 2023-07-19 18:02:57 +02:00
cschwinne
8ccf349458 Always repaint NPB buffer on brightness change
Fix bus re-init causing full brightness (every show() now attempts to set the brightness, bus will ignore this if it stays the same)
2023-07-19 17:25:25 +02:00
cschwinne
2fce15db94 Restore brightness immediately after show() 2023-07-19 16:22:34 +02:00
Blaz Kristan
0cf50e8000 FX Fireworks optimisation 2023-07-19 16:06:41 +02:00
cschwinne
5b9630cf46 Repaint NPB buffer on brightness updates 2023-07-19 13:50:09 +02:00
Blaz Kristan
7dcbb409a9 Trying to solve ABL bug.
(no more pulsing)
2023-07-18 23:33:28 +02:00
Blaž Kristan
286e057fae
Merge pull request #3216 from netmindz/AC-ES8388
ES8388 Support
2023-07-18 18:48:40 +02:00
Will Tatam
7d4fe341f1 Remove direct setup for I2C from ES8388 driver 2023-07-18 17:21:45 +01:00
Will Tatam
76acb7bb58 Merge branch 'main' into AC-ES8388 2023-07-18 16:36:42 +01:00
Frank
5ef7cd7bdd blur bugfix
turns out that fastLED 3.6.0 has an explicit uint32_t operator that returns RGBA, however  3.5.0 does not have this and the conversion returned only the "red" component".
2023-07-18 13:12:52 +02:00
Frank
ebb4628e66 Minor correction (slider names)
"Time delay" is actually "speed" - bigger values make the effect run faster.
2023-07-18 13:12:52 +02:00
Frank
0928060c75 blur bugfix
turns out that fastLED 3.6.0 has an explicit uint32_t operator that returns RGBA, however  3.5.0 does not have this and the conversion returned only the "red" component".
2023-07-18 11:29:08 +02:00
Frank
d8f9a9a03c
Minor correction (slider names)
"Time delay" is actually "speed" - bigger values make the effect run faster.
2023-07-17 20:38:34 +02:00
Blaz Kristan
abfb8bbc34 Fix (almost good) for unbuffered ABL calculations. 2023-07-17 17:06:04 +02:00
Blaz Kristan
82e01f7b17 Fixed ABL calculation. 2023-07-17 16:15:17 +02:00
dependabot[bot]
a97609e920
Bump semver from 5.7.1 to 5.7.2 (#3289)
Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v5.7.1...v5.7.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-15 20:10:32 +02:00
Blaz Kristan
f1e1bd41b9 Slight optimisation in BusDigial::getPixelColor() 2023-07-14 15:58:03 +02:00
Blaz Kristan
57d35858d8 Merge branch 'main' into alt-buffer 2023-07-14 15:39:18 +02:00
Blaz Kristan
0b956c66c1 changelog update 2023-07-14 13:07:33 +02:00
Blaž Kristan
b1dfa1db61
Merge pull request #3291 from Aircoookie/onoff-nodes
Add ability to toggle devices from nodes view.
2023-07-14 12:41:15 +02:00
Blaz Kristan
cb579ecc62 Broadcast change. 2023-07-14 11:07:35 +02:00
cschwinne
ae235aa58c Fix UI handling of in-between inactive segments 2023-07-14 01:12:19 +02:00
Blaz Kristan
6302056182 Add ability to toggle devices from nodes view. 2023-07-13 22:21:15 +02:00
cschwinne
5e20abd7f1 Move segment bounds queuing to WS2812FX 2023-07-13 13:08:36 +02:00
Frank
72a72dbc88
proper rounding of FPS 2023-07-13 12:49:19 +02:00
cschwinne
4766666913 Static queued segment bounds
(saves 180 bytes of RAM)
Fixed segment index not increasing on inactive segments
2023-07-13 03:09:42 +02:00
Blaz Kristan
fa6070c680 Multiple updates:
- additional debug timings
- removed local leds[] buffer
- async segment bounds change (crashes seen otherwise)
- added isActive() check to Segment drawing methods
- ABL simplification
- palette option for Black hole (FX)
- (possible) crash mitigation is Segment handling (rapid preset changes)
2023-07-12 20:52:34 +02:00
cschwinne
6267d11e51 Fix compilation and ABL scaling 2023-07-09 12:32:28 +02:00
Christian Schwinne
822298ab66
Merge branch 'main' into alt-buffer 2023-07-09 11:31:02 +02:00
Blaz Kristan
2ad3ab7f0d Correct scaling for peek. 2023-07-06 22:48:13 +02:00
Blaz Kristan
f437fd6cd6 Code readability.
Fix for peek.
Loop timing.
2023-07-06 21:16:29 +02:00
Frank
42b247756a blur speedup
it seems that SEGMENT.blur() is the main bottleneck for many 2D effects.

This change optimizes performance of the function:
* avoid to re-write unchanged pixels
* early exit when blur_amount == 0 (=nothing to do)
* use _fast_ types where possible

I've seen up to 20% speedup with this change.
2023-07-06 19:51:37 +02:00
Frank
fbbf2d5eb3 2DPlasmaball - optimize out float 2023-07-06 19:07:09 +02:00
Frank
788a276616 fix power calculation for NeoPixelBusLg
power estimation results from estimateCurrentAndLimitBri() were too low (example: estimated 1.3Amp, measured 1.6Amp). This change corrects the power calculation. Due to the changed behavior of getPixelColor, powerSum must be used as-is, not scaled down again by brightness.
2023-07-06 19:06:31 +02:00
Frank
196779ffb6
XY: minor bugfix
properly handle width=0 OR height=0
2023-07-06 09:54:12 +02:00
Blaz Kristan
59a144baed Disable global buffer on ESP8266 by default
Remove global dependency from Bus class and subclasses
Remove timings
2023-07-05 23:57:46 +02:00
Blaz Kristan
ad825b80b0 Added a few debug timings. 2023-07-05 17:16:54 +02:00
Frank
45a0061660
reverting _restaurationBri change
see previous discussion
2023-07-05 14:26:09 +02:00
Frank
8831c76fb4 restoreColorLossy small optimization
minor optimizations that give up to 10% speedup in my tests
* use "fast" integer types (where possible)
* replaced _bri with _restaurationBri (no use of globals)
2023-07-04 16:22:19 +02:00
Blaz Kristan
66616e1cab Some timings added. 2023-07-03 21:13:01 +02:00
Frank
fa281a0df0 ABL optimization
this optimization avoids to apply brightness two times .

NeoPixelBusLg has already applied global brightness at sPC. Due to internal working of the Lg bus, its sufficient to only post-apply scaling, and set the new (scaled) brightness for the next frame.
2023-07-03 19:23:57 +02:00
Frank
d48a96599f prevent races on leds buffer (looptask vs. async_tcp)
I still see strange crashes in setPixelColor/GetpixelColor, which ssem to come from race conditions between async_tcp (change presets) and looptask (strip.service).
To make the situation better, its important that any global pointers are reset to NULL immediately after free().
2023-07-03 19:15:50 +02:00
Frank
7de7ef8e8c fix some crashes when changing presets
This fixes some of the crashes I had when changing presets.

still not a full solution ...
2023-07-03 17:00:43 +02:00
Frank
406a254523 inactive segments robustness improvement
* Avoid uint16 underflow in width() and height(): stop > start is possible, and means "inactive segment".

Without these checks, it was possible that width() and height() produce VERY large values due to underflow.
2023-07-03 15:43:47 +02:00
Frank
eabd6f60ef soudsim bugfix
FFT_MajorPeak was just going from 0..255.
Now it simulates the full range from 21hz ... 8Khz
2023-07-03 15:07:14 +02:00
Frank
e416d06aa9
Merge pull request #3274 from Aircoookie/ABL_hotfixPlus
some optimizations for ABL hotfix
2023-07-03 14:36:46 +02:00
Frank
65e073e6b8 de-optimization
first version still cased some flickering.
This de-optimization makes LEDs more stable.
2023-07-03 14:01:45 +02:00
Frank
45ac0d5dc6 fix for #3276
due to `if (strip.isUpdating()) return;` reading the encoder did not happen in time if the strip was active - with high number of LEDs, this means "always updating". Similar observation that we had with the audioreactive usermod, and similar solution.
2023-07-02 19:14:32 +02:00
Blaz Kristan
c9ef034ab8 Build bump/fix 2023-07-02 13:43:29 +02:00
Titanium177
c89f38f4f8
Edited Metadata for effect 5 & 8 to be availible on just 1 Pixel (PWM) (#3275) 2023-07-01 23:18:02 +02:00
Blaz Kristan
858b57d77a Return of local leds[] 2023-07-01 21:48:30 +02:00
Frank
9b87892036 optimization for ABL hotfix
* adding an optional parameter to setBrightness(). ApplyPostAdjustments() will only be called if `immediate=true`. Only ABL will use immediate=true, to ensure electrical safety of equipment.

This allows some optimizations of performance, as ApplyPostAdjustments() is time consuming.

* busses.setBrightness(bri) --> applied to all future pixels (fast, lossless)
* busses.setBrightness(bri, true) --> applied directly to all previously set pixels (slower, lossy)
2023-07-01 20:09:52 +02:00
cschwinne
ed69692f08 Dynamic 2023-07-01 15:36:41 +02:00
cschwinne
7119999df8 Gamma and speed control 2023-07-01 13:20:10 +02:00
cschwinne
c16462a0ce Experimental GIF support 2023-06-30 23:59:29 +02:00
Blaz Kristan
272f96b405 Double buffering at bus level. 2023-06-30 21:12:59 +02:00
Andre Lackmann
3e519001a3
Removed current cycle assignment that clears current value (#3262) 2023-06-30 15:03:32 +02:00
Blaz Kristan
f442aad962 Misc.
- larger stack buffer for oappend
- increase max segment name for ESP32
2023-06-27 16:01:20 +02:00
Christian Schwinne
fa9b151c36 Slightly more efficient buffer copy to busses 2023-06-27 01:57:05 +02:00
Christian Schwinne
481bd6f57a
Add WiFi network scan RPC command to Improv Serial (#3271) 2023-06-27 01:51:44 +02:00
Blaž Kristan
f015227fc8
Missing WS connection fallback for liveview (#3267)
* Missing WS connection fallback for liveview
- fix for #3250

Remove (conditional WLED_ENABLE_LEGACY) legacy URI

Replace /sliders with /?sliders

* Merge liveview and liveviewws pages

Remove /url string subpage
Enable /json/live by default

* WS retry count
Removed appended ws from URL

* Also reset WS retries on successful WS connection

---------

Co-authored-by: Christian Schwinne <cschwinne@gmail.com>
2023-06-27 01:51:24 +02:00
Christian Schwinne
61ba16b779 Global buffer and ABL fixes 2023-06-27 00:38:30 +02:00
Christian Schwinne
f6e86bfcf8 First global buffer iteration 2023-06-26 22:12:32 +02:00
Christian Schwinne
498dd76730 Decouple segment led buffer from global led buffer 2023-06-26 18:16:38 +02:00
Christian Schwinne
ebd909dfe7 Remove obsolete Visual Studio files 2023-06-26 00:17:34 +02:00
Blaz Kristan
067ed1258b Temporary bugfix for #3264 2023-06-24 21:04:46 +02:00
Blaz Kristan
ef3c72a24f Fix for #3265 2023-06-23 23:49:54 +02:00
Blaz Kristan
b257f476c9 Bugfix for #3259 2023-06-22 19:06:07 +02:00
Alerson Jorge
d3af2be79a
Adding Pixel Magic Tool to WLED (#3249)
* Adding Pixel Magic Tool to WLED

* Revert "Adding Pixel Magic Tool to WLED"

This reverts commit b4f08fa8d5e75893d1a76ac0ec82ed1503d24460.

* Adding Pixel Magic Tool to WLED

* Corrections and performance improvements

* Remove IE compatibility tag

(saves a few bytes and IE10 is over 10 years old and unsupported)
Correct HTML language attribute
(Chrome would show a popup asking to translate from Portugese)

* Corrections and performance improvements

* Enable pxmagic by default

---------

Co-authored-by: Aircoookie <21045690+Aircoookie@users.noreply.github.com>
Co-authored-by: Christian Schwinne <cschwinne@gmail.com>
2023-06-22 11:26:24 +02:00
Christian Schwinne
94aeb19245 Enable pxmagic by default 2023-06-22 11:18:58 +02:00
Clayton Sims
e4ee392c27
Support for ESP-NOW Wireless Remote Control (#3237)
* Initial checkin for ESP-NOW remote feature

* cleanup irrelevant comment

* don't bring in espnow package includes when feature disabled

* Formatting and removing inaccurate call mode hardcoding

* Fork ESP Now code by platform (8266 v. esp32)

* compiled html update

* Disable ESP-NOW remote by default on ESP32 until tested

* Enable ESP-NOW remote for ESP32

* Rename ESP NOW define

---------

Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
2023-06-22 10:06:19 +02:00
Blaz Kristan
cf48ad06ed New SPI display SSD1309 for 4LD.
Fixed global I2C usage (no pin allocation in usermods).
Enabled option dor Multi relay.
2023-06-21 23:31:15 +02:00
Will Tatam
63df85f7f9 AC lacks i2sMaster param to I2SSource 2023-06-19 13:33:46 +01:00
Will Tatam
b29611509e AC lacks ERRORSR_PRINTLN 2023-06-19 13:33:16 +01:00
Will Tatam
dd1cf0ec56 AC lacks ERRORSR_PRINTF 2023-06-19 13:27:54 +01:00
cschwinne
c04c73bbd7 WS logic: No resending, improved ESP8266 stability
Update ESP8266 core to 3.1.2
2023-06-18 01:07:50 +02:00
Alerson Jorge
0d287283d4 Corrections and performance improvements 2023-06-16 20:21:59 -03:00
Blaz Kristan
4ea5723b7f Enhance pin dropdowns.
- add pins for PCF8574 (POC)
- bugfix for saving
Reduced maximum relays to 8.
Changed MultiRelay config parameter name.
2023-06-16 22:06:26 +02:00
Aircoookie
ea964124d6 Remove IE compatibility tag
(saves a few bytes and IE10 is over 10 years old and unsupported)
Correct HTML language attribute
(Chrome would show a popup asking to translate from Portugese)
2023-06-16 12:02:09 +02:00
Blaz Kristan
75244853c1 Fix for #3251 2023-06-16 10:24:56 +02:00
Alerson Jorge
c361c34b16 Corrections and performance improvements 2023-06-15 22:10:54 -03:00
Aircoookie
264b3a785b Code style: define constants for settings subpage IDs 2023-06-15 23:58:22 +02:00
Frank
bb15e1d8ac
minor comment update
Small corrections in Lissajous comments
2023-06-15 09:30:44 +02:00
Alerson Jorge
68860ae866 Adding Pixel Magic Tool to WLED 2023-06-14 19:38:11 -03:00
Alerson Jorge
61637f12c7 Revert "Adding Pixel Magic Tool to WLED"
This reverts commit b4f08fa8d5e75893d1a76ac0ec82ed1503d24460.
2023-06-14 19:34:12 -03:00
Blaz Kristan
7538649e81 Add optional leading 0 on time and date for Scrolling Text
- replaces #2994
2023-06-14 21:58:32 +02:00
Blaz Kristan
31efbe915e Minor string optimisation. 2023-06-14 20:45:00 +02:00
Frank
9e69627626
2D Lissajous improvements
* allow user to control rotation speed (c3 slider)
* preserve accuracy by performing division _after_ multiplication: " (i * speed) / 32", instead of " i * (speed / 32)"
* proper rounding of "map" results, for better visual appearance
* avoid division by zero in map() function
2023-06-14 20:21:43 +02:00
Aircoookie
dd9da2853a Support settings pin unlock via JSON
Also supports locking by providing any incorrect pin
2023-06-14 11:53:39 +02:00
Alerson Jorge
b4f08fa8d5 Adding Pixel Magic Tool to WLED 2023-06-13 19:42:16 -03:00
Blaž Kristan
670461c66f
Merge pull request #3238 from Aircoookie/beta-3
Beta 3
2023-06-13 21:38:10 +02:00
Blaz Kristan
f6092b9128 Build bump & updated changelog 2023-06-13 21:10:11 +02:00
Blaz Kristan
a690cb36ff changelog 2023-06-12 22:29:55 +02:00
Blaz Kristan
5ca8f4a3aa Merge branch 'pin-dropdown' into beta-3 2023-06-12 22:22:47 +02:00
Blaz Kristan
ba6e2f0a54 Pin dropdown updates for LED pins.
Updated pxmagic
2023-06-12 19:21:14 +02:00
Blaz Kristan
149f4e38a0 Merge branch 'main' into dev-2 2023-06-11 09:54:44 +02:00
Blaz Kristan
b5ee170726 Merge branch 'main' into beta-3 2023-06-11 09:53:39 +02:00
Blaž Kristan
04961880fe
Merge pull request #3242 from jkoelker/mitigate_xss
fix(settings): mitigate xss
2023-06-11 09:52:19 +02:00
Blaz Kristan
e22e8ffa0e npm 2023-06-11 09:44:15 +02:00
Jason Kölker
d18d800947
fix(settings): mitigate xss
Mitigate XSS on wifi scanning from injecting arbitrary code by using
`textConent` instead of `innerHTML`.

Partially Fixes #3233
2023-06-10 23:40:02 +00:00
Blaz Kristan
3ca58ee65f Pin dropdowns POC.
NeoPixelBusGammaMethod POC.
PixelMagic POC.
Button reassign POC.
2023-06-10 20:43:27 +02:00
Blaz Kristan
21387b9a83 Bugfix download backup json 2023-06-08 09:41:38 +02:00
Blaz Kristan
ccb0d491ed Port bugfix. 2023-06-08 07:14:03 +02:00
Blaz Kristan
daa3200713 Sync page bugfix 2023-06-08 07:06:23 +02:00
Blaz Kristan
fec2d1f7ee Bugfix
- respect Settings PIN lock in /json/cfg
2023-06-07 21:43:32 +02:00
Blaz Kristan
eb8e95723c Bugfix reverse proxy path detection 2023-06-07 21:37:54 +02:00
Blaž Kristan
999bec19f1
Merge pull request #3232 from david-sawatzke/ws2801_eth_fix
Fix WS2801 output on boards with ethrnet
2023-06-06 21:18:17 +02:00
Blaz Kristan
dfb8de2349 Fix for #3204 2023-06-06 20:56:33 +02:00
David Sawatzke
59f1cdcc82 Fix WS2801 output on boards with ethrnet (similar to #2542)
and the corresponding fix d1fed11d0d
2023-06-06 16:34:22 +02:00
Blaz Kristan
3eb8be6239 Bump version and update changelog 2023-06-04 20:14:10 +02:00
Blaz Kristan
7dfc4a651d Merge branch 'main' into beta-3 2023-06-04 20:11:27 +02:00
Blaz Kristan
189d145393 Merge branch 'main' into beta-3 2023-06-04 18:43:28 +02:00
Blaz Kristan
26bec11d76 Reverse proxy support. 2023-06-04 18:40:29 +02:00
Blaz Kristan
1e7071bff3 Transition bugfix. 2023-06-04 18:36:46 +02:00
Blaz Kristan
92390d1d59 Bugfix in DDP handling. 2023-06-04 17:55:29 +02:00
Blaz Kristan
b9b072119b Add pin mode. 2023-06-03 22:46:17 +02:00
Blaz Kristan
b6d9fd8030 Usermod fixes
- 4LD: prevent corruption on fast Rotary changes
- Rotary: implement ISR for I2C reading
2023-06-03 17:01:29 +02:00
Aircoookie
d383bc93c7 Changelog update
Reduce width of ethernet mode dropdown
2023-06-02 10:51:37 +02:00
Sebastian
af88c68fca
Buttons: Trigger on button press (instead of release) if all configured presets are the same (#3226)
* Buttons: Trigger when pressing if all configured presets are the same

* Add debounce for immediate rising-edge short press

---------

Co-authored-by: Aircoookie <21045690+Aircoookie@users.noreply.github.com>
2023-06-02 10:51:16 +02:00
Blaz Kristan
24537c4fdc Debug data for rotary. 2023-06-01 22:19:09 +02:00
Blaz Kristan
130f495fb6 Bugfix multi relay. 2023-06-01 22:17:41 +02:00
Sebastian
9d22a06969
Changes for allowing Alexa to change light color to White when auto-calculating from RGB (#3211)
* Changes for allowing Alexa to change light color to White when auto-calculating from RGB

* Update alexa.cpp

Indention

* Do not rely on global auto white override

(gets white mode from segment light capabilities)

* alexa.cpp: Removed unnecessary whitespaces

---------

Co-authored-by: Aircoookie <21045690+Aircoookie@users.noreply.github.com>
2023-05-31 20:12:17 +02:00
dvdavide
e3783e0236
Fix for displaying 1bpp bmp files (usermod EleksTube IPS) (#2988)
* Fix for displaying 1bpp bmp files

* EleksTubeIPS optimizations

* Fixed incorrect paletteSize

* stray tab

---------

Co-authored-by: Aircoookie <21045690+Aircoookie@users.noreply.github.com>
2023-05-31 20:11:30 +02:00
Justin Mutter
a5161eb7f1
Use constant for mDNS name to allow setting from my_config.h (#3145) 2023-05-31 17:35:43 +02:00
Blaz Kristan
82e448de7c Beta-3 changes
- remove I2C init  from usermods
- PCF8574 (&co) port expander support
- refactor PIR &  Rotary encoder & 4LD
- reboot race condition
- optimisations
2023-05-30 19:36:14 +02:00
Blaž Kristan
680afe972e
Merge pull request #3220 from Aircoookie/feature
Feature implementation
2023-05-30 16:52:13 +02:00
Blaž Kristan
69ab2ce402
Merge branch 'main' into feature 2023-05-30 16:20:20 +02:00
Blaz Kristan
4374930065 npm build 2023-05-30 16:18:11 +02:00
Blaz Kristan
9f3520cba5 Update comments. 2023-05-30 16:09:51 +02:00
Blaz Kristan
d20cdc099d Merge branch 'main' into feature 2023-05-30 15:55:39 +02:00
Blaž Kristan
926e9ff3de
Merge pull request #3171 from Aircoookie/seg-groups
Add support for segment sets (groups of segments)
2023-05-30 15:53:39 +02:00
Frank
70c277d8a1
bugfix: don't hide sound sim options for "double note" effects
There was is a typo in this line - apparently the "\u" was missing, so the search string was interpreted as octal char instead of unicode.
2023-05-30 13:23:26 +02:00
Blaz Kristan
0a5aac724a Merge branch 'main' into seg-groups 2023-05-29 21:35:52 +02:00
Christian Schwinne
bb91d5495f
Merge branch 'main' into feature 2023-05-29 21:31:40 +02:00
Blaz Kristan
995d94c124 Repeat segment button fix 2023-05-29 21:23:11 +02:00
Aircoookie
ee7036f13d CSS tweaks
Fix repeat segment button remaining hidden
Fix third segment row (offset) alignment in 1D mode
Keep disabled sound simulation modes as comment for reference
New local var for 2D seg UI, improves code legibility
2023-05-29 21:06:10 +02:00
Blaz Kristan
5a8a8dc292 Feature implementation
- #2236
  - #1984
Better PSRAM handling
platformio.ini update
On/Off bus handling
2023-05-28 22:50:19 +02:00
coral
7d84de6690
Fix errors in DDP implementation (#3193)
* fix DDP spec

* Adjust DDP type byte to latest spec

Allow receiving of RGBW DDP with either old or new bits per channel value

---------

Co-authored-by: Aircoookie <21045690+Aircoookie@users.noreply.github.com>
2023-05-26 14:58:40 +02:00
dependabot[bot]
3520f9e9c2
Bump requests from 2.28.2 to 2.31.0 (#3213)
Bumps [requests](https://github.com/psf/requests) from 2.28.2 to 2.31.0.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.28.2...v2.31.0)

---
updated-dependencies:
- dependency-name: requests
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-26 12:32:59 +02:00
Blaz Kristan
b2df7981a9 Add support for PCF8574 I2C port expander
- for Multi Relay usermod.
2023-05-24 23:40:23 +02:00
TroyHacks
9831e7bc3b Warnings about AudioKit rubbish 2023-05-23 23:49:57 +01:00
TroyHacks
90e37439e5 Better ES8388 init and mic support 2023-05-23 23:49:40 +01:00
TroyHacks
65f2490e89 It's offically the LyraT, not Lyra-T. 2023-05-23 23:49:29 +01:00
TroyHacks
c14a921e5a Mic settings for ES8388. Also ALC, pass-thru, etc. 2023-05-23 23:49:14 +01:00
TroyHacks
2bc8ffefce Some fixes for LyraT and also better inits/docs 2023-05-23 23:46:37 +01:00
TroyHacks
b88d8c85cb ES8388 init optimizations and fixes 2023-05-23 23:42:01 +01:00
Ewoud
693f52d984 Merge pull request #5 from netmindz/ES8388
WiP - ES8388
2023-05-23 23:41:46 +01:00
Blaz Kristan
56a3bff42e Multi-packet MQTT fix.
Solves #3205
2023-05-23 18:37:24 +02:00
Blaz Kristan
bffeec1615 Remove PSRAM use from global LED buffer. 2023-05-21 18:37:18 +02:00
Frank
e4a9f115cb fx functions: avoid memory corruption
* PSRAM_Allocator was missing the "reallocate" method, which lead to undefined behaviour when dynamic JSON doc needed to grow/shrink
* Segment::setUpLeds() quickfix for length() == 0 (should not happen, but it did happen for me once)
* leds in PSRAM causes major slowdown on wrover boards - disabled.
2023-05-21 14:33:25 +02:00
Frank
a717238f76 espalexa robustness improvements
* prevent string buffer overflows (stack corruption)
* avoid division by zero (program might crash)
* avoid log(0) which is undefined, too
* use faster math routines for float (logf, powf)
2023-05-21 13:21:38 +02:00
Blaz Kristan
4a567ab97c Merge branch 'main' into seg-groups 2023-05-15 17:06:38 +02:00
Blaz Kristan
90431b662b Rename "group" to "set" 2023-05-15 17:06:29 +02:00
Blaz Kristan
1c8f349a62 Bugfix.
- prevent LED flash on realtime end
2023-05-14 20:30:57 +02:00
Blaz Kristan
217004c70c Bugfix.
- disbled transitions/crossfade prevented segment off
2023-05-14 18:18:09 +02:00
Blaž Kristan
a75608628e
Merge pull request #3199 from Aircoookie/serg-eth
Serg74 ethernet board.
2023-05-13 15:29:13 +02:00
Blaž Kristan
33130f39ee
Merge pull request #3190 from Aircoookie/octopus
Octopus & Waving Cell 2D effects
2023-05-13 15:27:16 +02:00
Blaz Kristan
cae43e97cd Corner fix 2023-05-13 15:17:49 +02:00
Blaz Kristan
cdfc0f6b71 Temperature usermod rewrite 2023-05-11 17:33:09 +02:00
Blaz Kristan
bf6a18a414 Bugfix
- SHT enable/disable crash
2023-05-10 21:09:28 +02:00
Blaz Kristan
16b66afa7a Octopus offset 2023-05-10 21:06:48 +02:00
Frank
9e446210fb
refresh build number 2023-05-09 17:57:17 +02:00
Frank
b0118d2d57 use size_t as file index type (might prevent corruption)
* use size_t instead of uint16_t -> prevents random behaviour (corruption) in case that JSON files get larger than 64Kbytes.
* use a constant for max large file space (was UINT16_MAX)
* reduced the scope of some functions and variables to "static" - avoids name clashes and may support better optimization by the compiler
2023-05-09 17:44:26 +02:00
Frank
bc90309dd6 fix error message in latest platformio
fix for "Error: Invalid environment name 'codm-controller-0.6-rev2'. The name can contain alphanumeric, underscore, and hyphen characters (a-z, 0-9, -, _)"
2023-05-09 17:34:30 +02:00
Frank
52c4093fb0
minor bugfix for usermod_v2_Battery.h
missing semicolon - caused compile errorsin debug mode.
2023-05-08 20:59:57 +02:00
Blaz Kristan
b47c12cbee Serg74 ethernet board. 2023-05-08 08:48:52 +02:00
Blaž Kristan
fb14bc6016
Merge pull request #3116 from Erwin-Repolust/main
Changing voltage calculation to a weighted running average
2023-05-07 10:20:26 +02:00
Blaz Kristan
cd6862b1a7 Merge branch 'main' into octopus 2023-05-06 12:56:35 +02:00
Blaz Kristan
3d9160f2fa Merge branch 'main' into seg-groups 2023-05-05 23:01:17 +02:00
Blaž Kristan
157a5d9902
Merge pull request #3164 from werkstrom/cpal
Custom Palette Editor
2023-05-05 22:44:52 +02:00
Blaz Kristan
f4972e2be2 Code size reduction.
Save in hex notation.
2023-05-05 22:37:47 +02:00
Blaz Kristan
85c8e6ba42 Merge branch 'main' into cpal 2023-05-05 21:35:18 +02:00
Blaž Kristan
8e79bd8785
Merge pull request #3162 from wled-install/main
Add LAN8720 reset and new ethernet board
2023-05-05 21:32:06 +02:00
Frank
1ace7ce254
Merge pull request #3194 from billythekid/patch-1
Update palettes.h (typo in a comment)
2023-05-05 20:08:09 +02:00
Blaz Kristan
a00be5b60c Improved Tartan FX 2023-05-03 21:43:21 +02:00
Billy
aabe8d1d5e
Update palettes.h
just a typo-fix
2023-05-02 21:52:39 +01:00
Blaz Kristan
3da086438b Add rotating to Octopus
Soap optimization
2023-05-02 11:16:24 +02:00
Blaz Kristan
c257c86387 Fix for mirroring 2023-05-01 20:43:03 +02:00
Blaz Kristan
ff3ae14c29 Merge branch 'main' into octopus 2023-05-01 19:23:12 +02:00
Frank
cd82a34392 fixing github CI builds for -S3/-S2/-C3
explicitly adding `toolchain-riscv32-esp @ 8.4.0+2021r2-patch5` seems to do the trick.

Suggested here:
* https://github.com/platformio/platform-espressif32/issues/1081#issuecomment-1518601054
2023-05-01 16:54:30 +02:00
Blaz Kristan
baacd55910 Minor UI fix 2023-05-01 14:17:52 +02:00
Blaž Kristan
511b7c4d92
Merge pull request #3142 from xxv/xxv/dancing-shadows-default-color
Set Dancing Shadows default palette to Party
2023-04-30 18:43:04 +02:00
Blaz Kristan
f38851b7c6 Merge branch 'main' into cpal 2023-04-30 17:52:28 +02:00
Blaz Kristan
432c5837f0 Bugfix
- WiFi power for Lolin S2 & C3 (use -DLOLIN_WIFI_FIX)
- web response buffer size (corruption when websockets not used)
2023-04-30 17:30:36 +02:00
Blaz Kristan
cc599f544a Tweak in Soap. 2023-04-30 13:28:04 +02:00
Blaz Kristan
e886c85134 Tweaks. 2023-04-30 13:25:08 +02:00
Blaz Kristan
05eb716b85 Noise array bugfix.
Fire2012 tweak.
2023-04-30 13:22:42 +02:00
Blaz Kristan
61eb7b0a6a Waving Cell FX 2023-04-29 17:04:16 +02:00
Blaz Kristan
f0dade5856 Uneven matrix fix. 2023-04-29 15:51:25 +02:00
Henrik
8567f6b13c Ability to use static palettes as templates 2023-04-29 13:28:45 +02:00
Blaz Kristan
b740316918 Soap fix 2023-04-29 11:11:03 +02:00
Blaz Kristan
2119d08543 Octopus 2D effect
- by Stepko
2023-04-28 22:00:35 +02:00
wled-install
599ff66522
Add files via upload 2023-04-28 17:15:31 +02:00
wled-install
6d2eb04ada
Add files via upload 2023-04-28 17:13:50 +02:00
Blaz Kristan
0aea75edb7 NeoPixelBus 2.7.5
UI bugfix
2023-04-28 16:52:48 +02:00
Mattstir
2ca8231ab4
Improve indent (#3118)
* Improve indent

Improve indent, so its more allignend and correctly indented according to logic groups

* Spaces to tabs

---------

Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
2023-04-28 01:40:51 +02:00
Blaž Kristan
e00116551c
Add Ucs890x support and swaps NeoPixelBrightnessBus with NeoPixelBusLg (#3091)
* Add UCS890x support.

* Fixes

* Update NeoPixelBus to 2.7.3 for UCS8904 support.
Update ESP8266 core to 4.1.0

* ESP8266 compile fixes.
- use PlatformIO framework and toolchain
- add compiler warning suppression
- remove IRAM_ATTR to fit in IRAM

* Replace NeoPixelBrightnessBus with NeoPixelBusLg
Resolves #3087

* Update to NPB 2.7.4

* Internal NPB color conversions.

* Fix errors due to merge with SPI Hz methods

Regenerate settings page HTML

---------

Co-authored-by: Christian Schwinne <dev.aircoookie@gmail.com>
2023-04-28 01:28:57 +02:00
cschwinne
4d55e05b07 Fix CI properly
Small 2D Soap FX optimizations
2023-04-28 00:51:34 +02:00
Blaž Kristan
9ff3f85432
Allow SPI clock speed selection. (#3173)
* Allow SPI clock speed selection.

* Bump NPB to 2.7.4
2023-04-28 00:27:19 +02:00
Blaz Kristan
65c584aeda 2D enhancement (internal)
- move() wrapping
- dual addPixelColorXY()
2023-04-27 17:31:55 +02:00
Blaž Kristan
2540a2dfd9
Soap, new 2D effect (#3184)
* Soap, new 2D effect

* Fix Soap FX on matrices with edges < 8 LEDs

* Add palette support to Soap FX

---------

Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
2023-04-27 01:22:33 +02:00
Blaz Kristan
70e9187bcb Merge branch 'main' into seg-groups 2023-04-26 19:50:22 +02:00
Blaz Kristan
5e2fa13471 Bugfix.
- allow saving of reboot preset
- return Spread slider
2023-04-26 19:47:12 +02:00
Blaž Kristan
4f8610f895
Merge pull request #3134 from strikeout/DMX_MODE_PRESET_FIX
Fixes DMX_MODE_PRESET preset and brightness selection via DMX controller
2023-04-26 19:30:14 +02:00
Blaz Kristan
95f9e97af8 typeOf bugfix 2023-04-26 14:45:39 +02:00
Marcos Castro
695b073080
Apply correct iOS scroll to all tabcontent (#3182) 2023-04-26 10:53:49 +02:00
Stefan Riese
3a28935bfe
Wordclock - Issue with "Norddeutsch" (#3161)
* - fix word clock for "viertel vor" and "viertel nach"
- adjust wording of parameters

* - revert changes for parameter names

* enclose JSON property strings in F() macro to reduce RAM usage.

* add parameter info for "norddeutsch" and "LedOffset"
2023-04-26 10:53:18 +02:00
Christian Schwinne
468ed1a9ce
Restore Github actions CI build (#3187)
* Update dependencies

* Do not fail fast

* Disable ESP32 variant CI builds
2023-04-26 10:52:54 +02:00
Blaz Kristan
a6052d7900 Update info text. 2023-04-25 14:27:33 +02:00
Blaz Kristan
e42836b07f Allow hex strings for palette 2023-04-25 13:02:09 +02:00
Henrik
16373919d4 Removed as requested 2023-04-23 21:36:19 +02:00
Henrik
92f9c908f6 Custom palettes now editable 2023-04-23 21:32:52 +02:00
Henrik
480e1e17c8 Error on missing css file 2023-04-23 11:40:07 +02:00
Blaz Kristan
274f5f2f1f Bugfix. 2023-04-22 16:06:13 +02:00
Blaz Kristan
02d4f9cbba Merge branch 'main' into seg-groups 2023-04-20 17:21:20 +02:00
Blaz Kristan
d10daf0991 Bugfix
- skip regular button handling while waiting for analog read
2023-04-17 16:25:05 +02:00
Blaz Kristan
8c9656b799 Cleanup. Return after upload. 2023-04-14 18:33:03 +02:00
Blaz Kristan
396ea3d0ee Add webserver cpal support 2023-04-14 17:21:07 +02:00
Blaz Kristan
3efee4a855 Merge branch 'main' into cpal 2023-04-14 17:16:20 +02:00
Blaz Kristan
ece6759fa7 UI update. 2023-04-14 17:15:02 +02:00
Frank
246d945f39 another "inner var shadows outer var"
Seems this is not causing bugs, however its still bad style to re-define existing vars in an inner loop. Solved to improve code readability.
2023-04-14 14:13:45 +02:00
Frank
4a3bc486d0 two more "shadowed locals"
In these case, there seem to be no bug, but  simply renaming the "inner" variables improves code readability.
2023-04-14 13:09:25 +02:00
Frank
996d041581 bugfix for art-net transmit
art-net transmit was not sending out LEDs, but only transmitted headers repeatedly (thanks @troyhacks for noticing).

Actually such problems can be found by newer compilers, so i've added the warning option to [esp32_idf_V4].

wled00/udp.cpp: In function 'uint8_t realtimeBroadcast(uint8_t, IPAddress, uint16_t, uint8_t*, uint8_t, bool)':
wled00/udp.cpp:824:40: warning: declaration of 'byte buffer [12]' shadows a parameter [-Wshadow=compatible-local]
         byte buffer[ART_NET_HEADER_SIZE];
                                        ^
wled00/udp.cpp:720:85: note: shadowed declaration is here
 uint8_t realtimeBroadcast(uint8_t type, IPAddress client, uint16_t length, uint8_t *buffer, uint8_t bri, bool isRGBW)  {
2023-04-14 11:39:12 +02:00
Frank
d48e4adcd4 CI build fix
seems that NPB 2.7.4 introduces new incompatibilities that break our gh build action.
2023-04-13 12:16:32 +02:00
Blaz Kristan
7f84b7ab83 Merge branch 'main' into seg-groups 2023-04-12 15:37:56 +02:00
Blaz Kristan
3e26bd6a17 Quick compile fix.
- ESP32 DMA HSPI method in NeoPixelBus requires IDF 4.4.1
2023-04-12 15:35:27 +02:00
Henrik
e964c62907 Fixes 2023-04-12 09:15:38 +02:00
Blaz Kristan
fbb4965263 Merge branch 'main' into seg-groups 2023-04-11 21:40:29 +02:00
Blaz Kristan
88139d95a7 Build bump. 2023-04-11 21:35:44 +02:00
Blaz Kristan
5875b1988b Change log update 2023-04-11 21:34:43 +02:00
Blaž Kristan
2a2091595b
Merge pull request #3153 from Aircoookie/ipad-pcmode
iPad/tablet with 1024 pixel UI PC mode.
2023-04-11 21:11:19 +02:00
Blaz Kristan
d77883dd7a Merge branch 'main' into ipad-pcmode 2023-04-11 21:03:09 +02:00
Blaz Kristan
adea7dadec Bugfix.
- top buttons not working on mobile
2023-04-09 23:58:24 +02:00
Blaz Kristan
cf4ce2dc08 Revert float none. 2023-04-09 23:55:53 +02:00
Henrik
e74dfb2ba6 Small adjustments to UI mainly 2023-04-09 16:49:41 +02:00
Henrik
aaea9ff018 Added info on usage of IDs 2023-04-09 14:18:22 +02:00
Blaz Kristan
206b88eba2 Bugfix.
- top buttons not working on mobile
2023-04-09 11:06:42 +02:00
Henrik
8f5373f034 Custom Palette Creator 2023-04-08 20:02:49 +02:00
Blaz Kristan
dfa0a16487 Reduce sound sim options to increase 2D mapping. 2023-04-04 17:16:50 +02:00
Blaz Kristan
8b9f6f49ef Minor CSS tweaks 2023-04-04 15:53:03 +02:00
Blaz Kristan
bcac978810 Merge branch 'main' into seg-groups 2023-04-02 18:17:47 +02:00
Blaž Kristan
d17a41f7f1
Merge pull request #3155 from werkstrom/patch-1
Adjustments to Pixel Art Converter
2023-04-02 18:13:22 +02:00
Blaz Kristan
503f71f004 Npm run build 2023-04-02 18:07:48 +02:00
Blaz Kristan
4543288ea7 Merge branch 'ipad-pcmode' into seg-groups 2023-04-02 18:05:59 +02:00
Henrik
9307105b3f Redone in Patch-1 2023-04-02 13:52:20 +02:00
Henrik
567daf9946
Merge branch 'Aircoookie:main' into patch-1 2023-04-02 13:35:31 +02:00
Blaz Kristan
558b22c36a POC: Implemented segment groups (4).
Sacrificed 1 bit on sound simulation and 1D to 2D mapping each.
2023-04-01 23:40:43 +02:00
Blaz Kristan
f076dddfe3 Filter updates. 2023-04-01 11:02:49 +02:00
Frank
af44730418 platformio.ini minor cleanups
- fixed a few typos, trailing spaces and bad alignments
- added the previous 8266 platform packages as a comment, just in case
- [env:esp32dev_V4_qio80] is actually "dio" --> renamed to [env:esp32dev_V4_dio80]
- all esp32dev targets use the same ${esp32.platform} now (3.2.0 would not compile any more)
2023-03-31 15:44:21 +02:00
Blaz Kristan
4ec1140cb4 Optimizations & bugfix. 2023-03-31 13:26:03 +02:00
Blaz Kristan
2a5d20058f iPad/tablet with 1024 pixel UI PC mode.
Optimizations.
2023-03-30 21:35:23 +02:00
Frank
51f38e0a76
Merge pull request #3144 from Aircoookie/esp8266-core
ESP8266 core 4.1.0, ESP32 core 5.2.0 (S2,S3,C3)
2023-03-30 00:24:43 +02:00
Frank
54eb42d658 build env for -C3 with only 2MB flash
based on proposal from  in PR #2951 by @andyshinn.
2MB does not allow to have an OTA partition, so this feature is disabled.
2023-03-30 00:20:01 +02:00
Frank
a7a6f4cec6 small re-organization of build flags
* -Wno-attributes added to common flags
* USB_MSC and USB_DFU flags moved to common board sections (does not make sense with WLED to ernable these)
2023-03-30 00:03:04 +02:00
Christian Schwinne
3968a8e0dc
Attempt fixing GitHub actions ESP8266 build (#3151)
(explicit toolchain version)
2023-03-28 23:19:00 +02:00
Blaz Kristan
9e8ff27a7f Change log update 2023-03-27 15:49:02 +02:00
Blaz Kristan
7dd3d2b040 Merge branch 'main' into esp8266-core 2023-03-26 10:20:09 +02:00
Blaz Kristan
13678cb8d5 Add adjustable Random Cycle time.
- solves #3147
2023-03-25 21:28:30 +01:00
Frank
890aa6f9ac experimental esp32 buildenv with platform = espressif32@5.2.0
experimental ESP32 buildenv using ESP-IDF V4.4.x / arduino-esp32 v2.0.5
Warning: this build environment is not stable!!
2023-03-22 00:46:27 +01:00
Frank
646cf44b83 moved register override into 8266 section,
so it cannot destroy builds for ESP32 devices
2023-03-22 00:06:25 +01:00
Frank
bf789ca97b minor cleanup 2023-03-21 23:36:50 +01:00
Frank
9b90ff10f4 buildenv improvements for -S3/-S2/-C3
- corrected some broken references
- added `platform_package =` --> use default packages
- renamed env:esp32c3 to env:esp32c3dev to avoid confusion
- added lolin_s2_mini to CI builds
2023-03-21 23:15:08 +01:00
Blaz Kristan
0cc719a823 Remove "register" override 2023-03-21 20:01:16 +01:00
Blaz Kristan
4cd026dfe9 ESP8266 core 4.1.0, ESP32 core 5.2.0 (S2,S3,C3)
NeoPixelBus 2.7.3 (adding UCS890x support)
2023-03-21 17:28:04 +01:00
Aiden
3120b49dba
Add some Athom devices (#3114)
Add some compile configurations for Athom's devices
2023-03-20 23:44:12 +01:00
Christian Schwinne
fb1999c474
Merge pull request #3107 from Aircoookie/onepx-segment
Tweaks & bugfixes.
2023-03-20 23:42:30 +01:00
Steve Pomeroy
2c37961f7b Set Dancing Shadows default palette to Party 2023-03-19 17:37:29 -04:00
Frank
1abc863f82
comment updated
Also "Serial JSON" is not possible when reading from RX pin is disabled.
2023-03-19 15:51:39 +01:00
Frank
c9be03c0bc
typo 2023-03-19 14:48:47 +01:00
Frank
fd89209233 adding WLED_DISABLE_ADALIGHT (issue #3128
This flag disables reading commands from serial interface (RX = gpio 3)

Add -D WLED_DISABLE_ADALIGHT to your custom pio build environment.
2023-03-19 14:42:01 +01:00
Blaz Kristan
2e362fbb64 Fix for #3074 2023-03-19 14:26:54 +01:00
Blaz Kristan
11b687cdc2 Float vs. double. 2023-03-19 11:24:59 +01:00
Blaz Kristan
747c920420 Bugfix.
- white overrides & CCT
2023-03-19 11:23:59 +01:00
Blaž Kristan
cac51737cb
Merge pull request #3138 from codekane/mpu6050_imu 2023-03-19 07:38:44 +01:00
Ryan Horricks
7789379914 Fix typing to resolve build errors after installing the mpu6050_imu usermod. 2023-03-18 18:29:19 -06:00
Blaz Kristan
08e2bfe9a2 Scale 2D peek for large matrices. 2023-03-18 18:22:31 +01:00
strikeout
56a854ec88 limit max. selectable preset ID to 250, according to WLED capabilities 2023-03-17 13:40:21 +01:00
strikeout
de4ff4e58d Fixes preset and brightness selection via DMX controller to DoS WLED, now same packets are discarded 2023-03-16 17:56:29 +01:00
Frank
991c2afedb adding wled00.ino.cpp to gitignore
to avoid future accidents in GH Desktop
2023-03-16 13:10:33 +01:00
Frank
cded92662f workaround for issue #3128 2023-03-16 13:08:34 +01:00
Erwin Repolust
2c3fa0fd8f added function for voltage reads 2023-03-16 01:33:57 +01:00
Erwin Repolust
ec08432f92 added voltage multiplier to gui and set defaults 2023-03-14 01:44:41 +01:00
Blaz Kristan
1bab4d6937 Merge branch 'main' into onepx-segment 2023-03-12 13:14:22 +01:00
Blaz Kristan
d1fed11d0d Fix for #2542.
UI rebuild.
2023-03-12 13:10:40 +01:00
Blaž Kristan
e96053e268
Merge pull request #3121 from troyhacks/2023-03-10-Art-Net_Transmit
Art-Net transmit support for network LEDs
2023-03-11 22:50:07 +01:00
Blaž Kristan
9b98cbb894
PROGMEM for header 2023-03-11 22:35:22 +01:00
Blaž Kristan
349578fb6e
whitespace cleanup 2023-03-11 22:33:06 +01:00
Blaz Kristan
7c186e4fcc Fix for smaller number of pixeld than matrix size. 2023-03-11 15:03:28 +01:00
TroyHacks
a4fcbb9f67 Art-Net transmit support for network LEDs
Like DDP, this allows WLED to address network systems using the Art-Net protocol.

Universe starts at zero, because that's the first universe in Art-Net.

Works with RGB. It's coded to also work with RGBW, but I couldn't find a great place to enable it without mucking with things I don't understand.
2023-03-10 13:29:00 -05:00
Blaz Kristan
763b64cc57 Combat low memory condition on ESP8266. 2023-03-10 15:20:50 +01:00
Blaž Kristan
d57e6c5bf2
Merge pull request #3106 from lost-hope/klipper
Usermod: Klipper percentage
2023-03-10 14:14:31 +01:00
Blaz Kristan
80711cc00a Whitespace. 2023-03-10 14:08:52 +01:00
Erwin Repolust
8b61b9ebfe Added code for esp8266 2023-03-10 01:28:04 +01:00
Erwin Repolust
e00e778bce Less operations and better readable 2023-03-08 03:54:48 +01:00
Erwin Repolust
81e70925c4 Changed to running average to improve accuracy 2023-03-08 03:24:16 +01:00
Blaz Kristan
ddd32bd600 Multiple fixes.
- compiler warning fixes (gcc17)
- revert min heap size to 8k
- fix form submitting in 2D settings
- remove IRAM_ATTR for ESP8266 core 4.1.0
2023-03-05 22:56:14 +01:00
Frank
2713573b9b
Delete wled00.ino.cpp
accident
2023-03-05 22:38:36 +01:00
Frank
cf2e8bbc0b update build nr
and npm run build
2023-03-05 22:35:59 +01:00
Frank
bc56c1a0e1 bugfixes
* xml.cpp: correct type for checkbox global led buffer" (was not shown correctly)
* fx.cpp: 2D floating blobs - correct swapped x/y coordinates (did not render correctly on non-square matrix)
2023-03-05 22:30:08 +01:00
Blaz Kristan
bfbf7af411 Revert palette conditional load.
Playlist load bugfix.
2023-03-03 19:57:09 +01:00
Blaz Kristan
c151221d12 UI fixes & revert forcing ULTRAWHITE for on/off bus
Reduce min heap for 8266
2023-03-02 18:21:55 +01:00
Blaz Kristan
b8489724ef Slider BG fix. 2023-02-28 23:04:12 +01:00
Blaz Kristan
7a2f556682 Bugfix for 1 pixel segment capabilities. 2023-02-28 19:08:41 +01:00
Blaz Kristan
92d883db87 Bugfix for 1D setup.
- incorrcet max segment length calc
2023-02-28 15:25:11 +01:00
lost-hope
cb931d7af0 Merge branch 'main' of https://github.com/Aircoookie/WLED into klipper 2023-02-27 21:21:45 +01:00
Soeren Willrodt
6b54b57cb9
fixing the PR conflict 2023-02-27 21:01:32 +01:00
Blaz Kristan
1ca4348ca0 Add Segment functions hasRGB() and hasWhite()
Makes code cleaner.
2023-02-25 17:58:51 +01:00
Blaz Kristan
3ca7006e3a Tweaks & bugfixes.
One pixel segment handling.
- added 0D FX metadata (1 pixel effects)
- ignore palettes for White only segment
- ignore color for non-RGB & non-White segment (on/off)

Bugfix
- proper auto segment creation
- hide palettes for non RGB segments
- some tweaks for #2984
- force Solid for some FX (causing crash) on 1 pixel segment

UI Optimisations
- slider tooltips
- tiny bit smaller tooltips
- hide segment power if only one segment
- gap between sliders
2023-02-25 09:41:15 +01:00
lost-hope
339d2a7bf3 Added spreading from center and fixed the enable 2023-02-23 19:47:27 +01:00
mx
0d3debf9b9
sACN/E1.31 Port Priority (#3052)
* Added E1.31 port priority handling #768

* Ignore E1.31 data when priority doesn't match #768

* Enable E1.31 priority handling for WLED_ENABLE_DMX

* Only handle e131Priority for P_E131 protocol

* Corrected comments

* Highest priority package first handling

* Removed obsolete code & comments

* Improved comments

* Reduce priority timeout to be uint8_t

* Optimized code & comments

* E1.31: Ignore non-zero start code and preview data
These are not level data, they have other purposes

* Style change cca41508 preview & ignore non-zero start code

---------

Co-authored-by: RichardTea <31507749+RichardTea@users.noreply.github.com>
2023-02-21 17:13:15 +01:00
underritoSR
7f74a4f4b5
removing DLS for CST_TimeZone_GMT-6 (#3082)
* removing DLS for CST_TimeZone_GMT-6

* Adjust Mexico timezone name

---------

Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
2023-02-21 17:09:04 +01:00
Christian Schwinne
220718cb58
Remove Blynk support (#3102)
Change default palette for Railway to Colors 1 and 2
2023-02-21 17:07:32 +01:00
dependabot[bot]
be2acbd3eb
Bump cacheable-request and nodemon (#3089)
Removes [cacheable-request](https://github.com/jaredwray/cacheable-request). It's no longer used after updating ancestor dependency [nodemon](https://github.com/remy/nodemon). These dependencies need to be updated together.


Removes `cacheable-request`

Updates `nodemon` from 2.0.4 to 2.0.20
- [Release notes](https://github.com/remy/nodemon/releases)
- [Commits](https://github.com/remy/nodemon/compare/v2.0.4...v2.0.20)

---
updated-dependencies:
- dependency-name: cacheable-request
  dependency-type: indirect
- dependency-name: nodemon
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-21 16:48:00 +01:00
Christian Schwinne
9249c74b7b
Merge pull request #3088 from Aircoookie/led-gaps
LED matrix gaps
2023-02-21 16:46:58 +01:00
lost-hope
2b87817ba2 enabled IP Change and updated the Readme 2023-02-19 09:08:40 +01:00
Blaz Kristan
883c0f9dfe Bugfix
- gamma value not showing
2023-02-17 20:36:35 +01:00
Blaz Kristan
3ffc58d442 Bugfix
- segment capabilities on 2D segments and ledmaps
- UI segment update
- auto segment creation 2D + 1D
2023-02-15 20:36:54 +01:00
Blaz Kristan
1bb4b0156f Bugfix 2023-02-14 20:25:26 +01:00
Blaz Kristan
92d2be3f5e Add ledmap names
Bugfix
- reset segments upon 2D ledmap allocation error
- fix invlid 2D segments
2023-02-14 17:11:58 +01:00
Blaž Kristan
a7cded21f7 Merge branch 'main' into led-gaps 2023-02-14 14:28:10 +01:00
Christian Schwinne
74156b7ed8
Support white addressable LED strips (#3073)
* Support white addressable LED strips

* Various white handling tweaks

Allow RGB controls for white-only busses depending on AWM (makes palette-only FX work on non-RGB addressable busses)
Fixed RGB controls hidden if segment contained any non-RGB bus (even though there is also an RGB bus in that segment)
New Max auto white mode
Added hasCCT() bus method
Rename methods to be clearer
WS2811 White getPixelColor fix()

* Fix merge conflict (bus manager cpp)
2023-02-14 01:33:06 +01:00
Blaz Kristan
821f320347 Add user selectable Gamma
Add panel visualisation (@ewoudwijma, #3090)

Bugfix:
- PIR onStateChange() ignored until inited
- remove matrix orientation
- ignore removing ledmap 0 if 2D
- _globalLeds size
2023-02-12 13:18:30 +01:00
Blaz Kristan
eee9274098 Bugfix.
- compiler warnings
- loading nonexistent default ledmap in 2D will revert to built ledmap
- making autosements after 2D set up change
2023-02-11 18:41:30 +01:00
Blaz Kristan
8dd1f89225 Update.
- allow ledmap selection in UI
- upload gap file
- expand matrix generator
2023-02-10 19:49:43 +01:00
Blaž Kristan
f2459ea904 Add ability to use SHT temp. sensor in PWM fan 2023-02-10 09:33:27 +01:00
Blaz Kristan
e51f7bfbff LED matrix gaps. 2023-02-09 20:15:55 +01:00
Ulrich Baumann
e2215ced34
allow alternative northern style ("viertel vor ..." instead of (#3085)
"dreiviertel ..")

Co-authored-by: Uli Baumann <github@uli-baumann.de>
2023-02-09 00:23:53 +01:00
Blaz Kristan
b14c8e82a0 Bugfix.
- correct WLED_DEBUG_PORT override
2023-02-08 10:25:59 +01:00
Blaz Kristan
e7d50d2614 Bugfix.
- respect net debug on/off state
2023-02-08 10:18:41 +01:00
Blaž Kristan
bca92883d2
Merge pull request #3081 from Aircoookie/usermod-enhance
Usermod enhancements
2023-02-06 07:25:24 +01:00
dependabot[bot]
ed865e38de
Bump http-cache-semantics from 4.1.0 to 4.1.1 (#3076)
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/kornelski/http-cache-semantics/releases)
- [Commits](https://github.com/kornelski/http-cache-semantics/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-05 23:52:48 +01:00
Blaž Kristan
dec45109d3
Refactor busmgr (#3079)
* Refactor bus manager.

* Fix for net debug

* Fix 8266 compile

* Move bus static members to proper cpp

---------

Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
2023-02-05 23:48:43 +01:00
Blaz Kristan
48c267c5c1 Bugfix. 2023-02-05 17:57:22 +01:00
Blaz Kristan
c041d39cab Usermod enhancements
- added onStateChange() callback
- added examples & comments to usermod_v2_example.h
- PIR sensor cancels countdown on state change
2023-02-05 12:23:05 +01:00
Blaz Kristan
52c18e77ae Compile fix for net_debug 2023-02-04 23:59:28 +01:00
Blaz Kristan
52a189cdd2 Playlist bugfix.
- another attempt at #3058
2023-02-04 10:56:07 +01:00
Blaž Kristan
dca8a47da8
Dual mode 2D + 1D with auto segment creation. (#3060)
* Dual mode 2D + 1D with auto segment creation.

* Bugfix.
- stop when seglen
2023-02-01 19:30:56 +01:00
Christian Schwinne
6be9317fd7
Merge pull request #3037 from Aircoookie/indentation
Whitespace/indentation cleanup.
2023-02-01 16:07:30 +01:00
Christian Schwinne
bee99ca8d0
Merge branch 'main' into indentation 2023-02-01 15:57:58 +01:00
cschwinne
48dc89cf13 Fix merge conflict (apply changes from 901ce23) 2023-02-01 15:55:44 +01:00
Blaž Kristan
fc7f609234 Disable 1D/2D mapping for individual pixel control 2023-01-31 12:49:36 +01:00
Blaz Kristan
0bed9b3c2e FX tweak.
- Fireworks 1D
2023-01-30 23:10:45 +01:00
Blaz Kristan
31fa73518b Bugfix. #3064 2023-01-30 17:11:14 +01:00
Blaz Kristan
c6fd11157a Bugfix.
- incorrect palette blending in Palette effect (#3055)
2023-01-29 11:58:47 +01:00
Blaz Kristan
ca73a57de7 Bugfix.
- reduce playlist repetition count on save #3058
2023-01-29 11:27:14 +01:00
Henrik
38a545af92 Fix regen on out format change 2023-01-26 16:11:54 +01:00
Blaž Kristan
b91b340afd Update changelog. 2023-01-25 13:18:54 +01:00
Blaz Kristan
8e7b1c97df Merge branch 'fx-upd' 2023-01-24 21:13:12 +01:00
Blaz Kristan
c9c55fe0c9 Bump version to 0.14.0-b2 2023-01-24 21:08:26 +01:00
Blaz Kristan
d553160d65 Update to changelog 2023-01-24 20:41:10 +01:00
Blaž Kristan
b8a4df2f50
Merge pull request #3042 from werkstrom/patch-1
WLED PixelArtCreator
2023-01-24 18:56:05 +01:00
Blaz Kristan
36edbf6ea9 Merge branch 'main' into patch-1 2023-01-24 18:49:49 +01:00
Blaz Kristan
f966535ea9 Fix resize input on segment load. 2023-01-24 17:15:38 +01:00
Blaz Kristan
07cc26a144 Merge branch 'main' into fx-upd 2023-01-24 16:39:49 +01:00
Blaz Kristan
178c4d15b7 Bugfix.
- missing Transpose (seglen)
- reduce flickering for static text (ScrollingText FX #3050)
2023-01-24 16:35:31 +01:00
Henrik
b0b68c695c Size optimizations and cleanup 2023-01-23 21:30:55 +01:00
Blaž Kristan
219a3658d6 Code compression. 2023-01-23 11:41:41 +01:00
Henrik
d2310fc2ea Revert changes 2023-01-22 21:12:03 +01:00
Henrik
3fe0ccd934 Added ability 2 output minified htm file 4 testing 2023-01-22 20:28:23 +01:00
Henrik
f902ebadcc UI, simpler process, get more data from device 2023-01-22 18:47:34 +01:00
Blaz Kristan
57323af167 Reset segments on 2D set-up change. #3028
Bugfix for 2D segment creation.
2023-01-22 11:29:31 +01:00
Blaz Kristan
20b0b5fc8e Boost tweaking. 2023-01-21 22:38:04 +01:00
Henrik
bb72b8cc93 Segment selection and touch ups 2023-01-21 16:33:59 +01:00
Blaz Kristan
fec5516da9 Fire 2012 boost. 2023-01-21 15:39:59 +01:00
Henrik
ec9a092751 - Removed unused code
- Changed rendering of large preview image
2023-01-21 12:10:22 +01:00
Maximilian Mewes
f78f8b6b12 Exposing the Battery state to JSON API - Part 2 2023-01-21 01:44:50 +01:00
Maximilian Mewes
f97b79bc16 Exposing the Battery state to JSON API - Part 1 2023-01-21 00:39:51 +01:00
Maximilian Mewes
42c8a77755 Merge branch 'main' into usermod-battery-update2023 2023-01-20 23:25:13 +01:00
Blaz Kristan
c692cc6a70 Inline fixes. 2023-01-20 22:33:30 +01:00
Blaz Kristan
2b8d8d4e9c Merge branch 'main' into pixart 2023-01-20 16:23:51 +01:00
Blaz Kristan
2ae8032ace Compile fix. 2023-01-20 16:22:19 +01:00
Blaz Kristan
c4416584de Merge branch 'patch-1' into pixart 2023-01-20 15:53:56 +01:00
Blaž Kristan
86d8b49113 Pixelart
- full implementation
2023-01-20 14:40:45 +01:00
Blaz Kristan
7a5d870f67 DJ Light optimisation.
GoL mutations.
cleanup.
2023-01-19 22:22:24 +01:00
Henrik
b43459232a
Create file for PixelArtCreator 2023-01-19 22:09:47 +01:00
Frank
e2b4e60c9e pulser bugfix and minor optimizations
* pulser bugfix: " % cols" was missing so the effect would simply run out of visible range
* float math: use optimized functions: sqrtf, fabsf
* two more comments where code could be optimized, but I'm not sure what is thecorrect solution
2023-01-19 12:26:14 +01:00
Blaz Kristan
17543535e3 FX update
- Dynamic & Dynamic Smooth
- Dissolve & Dissolve Rnd
- Juggles
- Game of Life
- Colorful
- Fireworks & Rain
2023-01-18 22:56:49 +01:00
Blaz Kristan
901ce23cd2 Bugfix.
- incorrect ro_pins in settings
2023-01-18 22:23:34 +01:00
Blaz Kristan
1b52d8065e Ecternal MOSFET for parasite DS18B20 2023-01-18 17:36:04 +01:00
Blaz Kristan
c6db901051 Added gradient to drawCharacter()
Ability to select gradient text on Scrolling Text FX.
2023-01-17 19:54:44 +01:00
Blaž Kristan
39edb1ad37
Merge pull request #2891 from mxklb/pr_fxsegs
Refactored DMX effect mode + new segment controls
2023-01-16 22:38:02 +01:00
Blaz Kristan
a397aa188c Whitespace/indentation cleanup. 2023-01-16 22:12:02 +01:00
Blaz Kristan
dd08751f3f Hide 2D if not compiled. 2023-01-16 22:09:43 +01:00
Blaz Kristan
ef6a9184ba A few more flash bytes saved. 2023-01-16 21:55:12 +01:00
Blaž Kristan
575fb6fc60
Merge pull request #3022 from Aircoookie/disable-more
Disable MQTT more.
2023-01-16 21:44:00 +01:00
Blaz Kristan
4147d6c67e FX: GameOfLife
- better glider detection
- correct behaviour during transition
- optimisations
2023-01-16 18:53:52 +01:00
mxklb
115c17ab90 Corrected wrong comments 2023-01-16 17:30:55 +01:00
mx
d892c7290c
Merge branch 'Aircoookie:main' into pr_fxsegs 2023-01-16 17:28:44 +01:00
Blaz Kristan
63d8a902d5 Loading defaults on "fxdef". 2023-01-15 15:21:39 +01:00
Blaz Kristan
43152fcf19 Bugfix.
- d.max_gpio in usermod settings.
2023-01-15 15:19:48 +01:00
Blaz Kristan
1f135f1fa5 "i" start index bugfix #3024 2023-01-14 16:01:46 +01:00
Blaz Kristan
c71d378eab New FX Distortion Waves
Updated FX Lissajous
2023-01-12 21:58:54 +01:00
Maximilian Mewes
bb82bf762f Update Readme, my_config type config options with examples 2023-01-12 21:50:46 +01:00
Blaz Kristan
6fa5689aaf Bugfix.
- segment off
2023-01-12 20:36:50 +01:00
Blaz Kristan
d78bef72ea Disable MQTT more.
Disable Alexa more.
2023-01-12 20:35:34 +01:00
Blaz Kristan
e410de9552 Bugfix.
- fadePixelColorXY()
- clearing 2D segment on mirror or reverse change
- FX update (DNA Spiral, Colored bursts)
2023-01-12 19:13:07 +01:00
Blaz Kristan
8dc262b415 Bugfixes.
- faster random palette blends
- remove UI ledmap selection for 2D
- FX updates (DNA Spiral, Colored bursts, Metaballs)
2023-01-11 23:08:08 +01:00
Abhi Gulati
7fa494815f
Fix a typo (#3014) 2023-01-11 11:21:45 +01:00
Blaž Kristan
929bb70e5a
Merge pull request #3012 from spdustin/fix-tooltip-pointer-events
Fixes tooltip interfering with pointer events
2023-01-10 06:11:53 +01:00
Dustin Miller
36fb262fa0 Fixes tooltip interfering with pointer events 2023-01-09 18:38:00 -06:00
Frank
b8cc783583 pio: minor update for -C3
adding optional platform version that seems to help in some special cases.
2023-01-09 13:20:02 +01:00
Blaž Kristan
67b3d383e4 Minor fix for (obsolete) Solid Glitter 2023-01-09 13:17:08 +01:00
Frank
9144ccac6b
Merge pull request #3006 from Aircoookie/fx-update
FX updates, 2nd try.
2023-01-08 23:44:42 +01:00
Blaz Kristan
04020d5ae2 Universal glitter. 2023-01-08 21:58:55 +01:00
Blaž Kristan
de4f1d09af
Merge pull request #3005 from Aircoookie/whitespace 2023-01-07 08:13:17 +01:00
Maximilian Mewes
d16f9efeec Added forgotten file 😥 2023-01-06 19:09:12 +01:00
Maximilian Mewes
8ba5dfe447 Another Bugfx 🧑‍🔧 2023-01-06 19:07:39 +01:00
Blaz Kristan
27d7f5f190 Fixes.
Prevent flickering if segment off.
2023-01-06 18:11:52 +01:00
Blaz Kristan
c43c4c42c8 Renamed No Bg to Overlay 2023-01-06 17:23:24 +01:00
Maximilian Mewes
3759071449 Fix previous bug again 🐛, Add Type Dropdown to config page 2023-01-06 17:00:29 +01:00
Blaž Kristan
613283f656 typo fix 2023-01-06 09:44:26 +01:00
Blaž Kristan
506b6b51ce whitespace cleanup 2023-01-06 09:24:29 +01:00
Blaž Kristan
c7eccfb714 FX updates:
- Ripple (2D & no Bg)
- Glitter (no Bg)
- Sparkle (no Bg)
- Scan (no Bg)
- Two dots (no Bg)
- ICU (no Bg)
- Lightning (no Bg)
- Halloween eyes (no Bg)
- Spots (no Bg)
- Bouncing Balls (no BG)
- Popcorn (no Bg)
- Starburst (no Bg)
- Drip (no Bg)
- Whitespace cleanup
- draw_circle()

"no Bg" will allow overlapping segments if checked.
2023-01-06 09:10:39 +01:00
Maximilian Mewes
85d59945a0 runtime exception fix 🐛 2023-01-06 00:19:16 +01:00
Blaz Kristan
98be19b29f Fix switching off for PIR usermod. 2023-01-05 22:46:30 +01:00
Maximilian Mewes
4c8b490c89 minor changes 2023-01-05 20:38:55 +01:00
Maximilian Mewes
8dd1745149 Add base battery 🔋 class, Add Lipo, Lion class 2023-01-05 19:48:53 +01:00
dekay
66406d86c1
Update comment for 44-key remote (#2999)
Defs for this remote appear to be complete and are not "to be done later".
2023-01-05 16:49:53 +01:00
Frank
35832b07b9 UM Battery: basic support for LiPo cells
* Lipo cells (1S) should not be discharged below 3V
* LiPo cells have a different voltage/discharge rate curve
2023-01-04 19:57:33 +01:00
Frank
357683cbb9 UM Battery: more bugfixing, and improvements for esp32
- improved support for esp32 (read calibrated voltage)
- corrected config saving (measurement pin, and battery min/max were lost)
2023-01-04 17:30:08 +01:00
Frank
15bc6159f9 UM Battery: fix for deprecated function call
wled00/../usermods/Battery/usermod_v2_Battery.h:446:48: warning: 'void PinManagerClass::deallocatePin(byte)' is deprecated: Replaced by two-parameter deallocatePin(gpio, ownerTag)
2023-01-04 12:54:02 +01:00
Frank
7cdafa76a5 UM Battery - improvements for esp32
* added missing pinMode(.., INPUT) on esp32
* do not try reading from pin = -1 (ESP32-S2 shows very allergic reactions to this)
* Info page - show "n/a" when pin = -1
* readme: esp32 default pin = 35
2023-01-04 12:32:31 +01:00
cschwinne
e84b0c91f8 Update year 2023-01-03 17:36:24 +01:00
cschwinne
cecffee3d3 Merge branch 'main' of https://github.com/Aircoookie/WLED 2023-01-03 17:16:14 +01:00
cschwinne
d039a40d7c Invert pull up config value, fixes #2996
Cronixie usermod format change fix
2023-01-03 17:15:55 +01:00
Blaz Kristan
90463d8613 Battery UM fix for MQTT voltage topic. 2023-01-03 17:14:24 +01:00
Blaz Kristan
90c965a6ba Bugfix editing 2D set-up. 2023-01-03 17:12:35 +01:00
Frank
e961691645
Battery, second try 2023-01-03 15:36:35 +01:00
Frank
6270d2408f
UM Battery: fix build error on linux
Fixes build error on linux:
wled00/usermods_list.cpp:15:54: fatal error: ../usermods/battery/usermod_v2_battery.h: No such file or directory
compilation terminated.
2023-01-03 15:29:15 +01:00
Frank
7ef1842237 comments updated
see discussion in faf616cbea
2023-01-03 15:16:45 +01:00
Frank
faf616cbea fixing a potential stack corruption
.. overlooked this one when reviewing the PR.
@blazoncek, @ctjet : three questions on the new code remain, because its not clear to me if its correct. Please check.
2023-01-03 14:17:42 +01:00
Frank
4a09e18d9a
UM Battery: fix compilation error + bad snprintf 2023-01-02 22:52:37 +01:00
Blaz Kristan
983aca515d Compile fix for disabled 2D. 2023-01-02 21:24:02 +01:00
Frank
eb184d3c68 build number, npm run build 2023-01-02 21:01:39 +01:00
Caleb Marting
187ecf511f
2d Mapping with Matrix Gaps (#2892)
* New 2d mapping
* panel matrix generator
* add todos, fix vert/horz swap
* Fix 2d mapping to matrix in settings 2D
* add correct index mapping to pixels per panel
* fix panel bug in led layout
* formatting and change max panels
* add per panel width and height
* fix using length instead of custom mapping size
* fix: panel dimensions location

* panel[] implemented as a vector.
Removed matrixWidth & matrixHeight.
Panel structure update.
* Fixes.

Co-authored-by: Blaz Kristan <blaz@kristan-sp.si>
2023-01-02 20:56:00 +01:00
lost-hope
0ab35a3ca3 added klipper usermod 2023-01-01 15:13:57 +01:00
Blaž Kristan
8e208bc76d
Merge pull request #2993 from spdustin/fix-analog-clock-hours
fixes typo in Analog_Clock.h
2023-01-01 00:35:14 +01:00
Dustin Miller
1b4d92007e
updates strings to use F() 2022-12-31 15:24:35 -06:00
Dustin Miller
4101d7664d
fixes typo in Analog_Clock.h
Retrieving the config in `readFromConfig()` results in defaults being set to both `hourMarksEnabled` (`false`) and `hourMarkColor` (`#0000FF`) due to differences in capitalization compared to how they're saved in `addToConfig()`
2022-12-31 13:47:48 -06:00
Blaz Kristan
e128c3094a Typo fix. 2022-12-31 18:58:52 +01:00
Blaz Kristan
95869eeb70 Allow more virtual buses. 2022-12-31 17:06:18 +01:00
Blaž Kristan
d977bbd61c
Merge pull request #2990 from relax81/main
added #DDMM & #HHMM to scrolling text
2022-12-31 14:10:51 +01:00
Leif
a16a6211e2 added #MMDD view to the scrolling text effect 2022-12-31 03:30:26 +01:00
Leif
a75013e43e Merge remote-tracking branch 'upstream/main' into main 2022-12-31 03:25:21 +01:00
Mark Breen
1e157e95b6
minor spelling fix (#2991) 2022-12-30 12:29:02 +01:00
Leif
04dbfcd0e6 added #DDMM & #HHMM to scrolling text 2022-12-30 00:04:22 +01:00
Maximilian Mewes
73440e2287
Update Usermod Battery (#2975)
* auto-off feature and usermod rename
* low-power-indicator, voltage fine tuning, clean-up

* corrected small mistakes
* Bugfixes, added usermod logo, update readme
* minor changes, implemented change requests, optimizationz
2022-12-28 22:40:13 +01:00
Blaž Kristan
ee4459691f
Merge pull request #2982 from itCarl/task-fixing-comments-in-pin_manager-header
Fix Hex values in comments in pin_manager.h
2022-12-28 22:36:55 +01:00
Maximilian Mewes
379c6045b9
Merge branch 'Aircoookie:main' into task-fixing-comments-in-pin_manager-header 2022-12-28 01:53:12 +01:00
Maximilian Mewes
00d0ddb4b5 fixed pinowner comments (hex is not correct and the order is wrong) 2022-12-28 01:50:04 +01:00
Blaz Kristan
be08c01be6 Fix for #2979 2022-12-28 01:01:31 +01:00
Blaž Kristan
fb6abe34df
Merge pull request #2966 from Aircoookie/hex-palette
Hex custom palettes and smooth random palette change
2022-12-28 00:53:01 +01:00
Blaz Kristan
b0d107f916 Merge branch 'main' into hex-palette 2022-12-26 10:26:01 +01:00
Blaz Kristan
6d1ff7c3f3 Railway FX
- slower minimum speed
- allow color 1 & 2 in UI
2022-12-26 10:25:26 +01:00
Blaz Kristan
6f67132f4b PROGMEM string optimisation. 2022-12-26 10:20:45 +01:00
Blaž Kristan
859d21162c
Merge pull request #2963 from ezcGman/um-sht
SHT Usermod: Fixed MQTT discovery using correct unit; Added getters and isEnabled() check
2022-12-25 22:49:24 +01:00
Blaz Kristan
c739a7ea2f Erroneous ) 2022-12-25 11:05:25 +01:00
Blaz Kristan
7e48875fd4 Minor optimisation. 2022-12-25 11:02:50 +01:00
Blaz Kristan
474e86306f Bugfix: incorrect maxWidth after switching from 2D 2022-12-24 22:00:35 +01:00
Blaz Kristan
b436a660f1 Merge branch 'main' into hex-palette 2022-12-23 21:35:52 +01:00
Blaz Kristan
d36460e30b Minor optimisation.
Fix for #2969
2022-12-23 16:37:13 +01:00
cschwinne
0e236f9d88 0.14.0-b1 2022-12-23 04:38:30 +01:00
cschwinne
72eb61951b Dynamically show hidden color slots for * palettes
Disable Blynk by default in release builds
Single quote strings everywhere for classList
2022-12-23 02:59:24 +01:00
Blaz Kristan
22b2503839 Bugfix & code optimisation. 2022-12-22 18:13:32 +01:00
Frank
d7b5719dfd add mandatory build flags for -S2 and -C3 (virtual USB)
I was wondering why sometimes the new MCUs still work better in Arduino IDE, so compared our build flags to what is used in Arduino IDE:

-S2 always has -DARDUINO_USB_MODE=0
-C3 always has -DARDUINO_USB_MODE=1
-S3 supports all possible modes
2022-12-21 22:07:15 +01:00
Blaz Kristan
4322d195d3 Smooth random palette changes
Bugfix loading string palettes
JS optimization.
2022-12-21 21:00:28 +01:00
ezcGman
4ecad65926 UM SHT: Codestyle 2022-12-21 00:34:22 +01:00
ezcGman
f12025b86e UM SHT: Added getters and isEnabled check 2022-12-21 00:05:26 +01:00
ezcGman
5cfea54b06 UM SHT: Apply PR feedback 2022-12-20 23:58:11 +01:00
mxklb
c24b75953a Merge branch 'main' into pr_fxsegs 2022-12-20 01:06:46 +01:00
ezcGman
f3d52f4932 UM SHT: MQTT re-publish values on unit change 2022-12-19 22:30:11 +01:00
ezcGman
ea6d339b9c UM SHT: Fixed MQTT discovery using correct unit 2022-12-19 22:15:39 +01:00
Blaž Kristan
284a9999b3
Merge pull request #2960 from mrbubble62/main
Fixed typo when WLED_ENABLE_FS_EDITOR disabled
2022-12-19 14:07:19 +01:00
Blaž Kristan
b241872a00
Merge pull request #2942 from ezcGman/um-sht
New Usermod: SHT temperature & humidity sensors
2022-12-19 07:11:10 +01:00
ezcGman
b7034d3213 UM SHT: Check for IOs gt zero 2022-12-18 21:33:25 +01:00
Blaz Kristan
0a0ced3e8e Hex string custom palette option 2022-12-18 21:02:19 +01:00
Blaž Kristan
e7449b4d56
Merge pull request #2959 from Aircoookie/selall-bugfix
maximum segments reached and Select all bugfix
2022-12-18 19:24:14 +01:00
mrbubble62
fab34c9e49
Merge branch 'Aircoookie:main' into main 2022-12-18 12:38:45 -05:00
mrbubble62
7df08c2120 Fixed typo when WLED_ENABLE_FS_EDITOR disabled 2022-12-18 12:37:05 -05:00
Frank
b94e0ef797
Merge pull request #2955 from ezcGman/i2c-build-flags
Add build flags for global i2c & SPI pins
2022-12-18 12:33:33 +01:00
Blaz Kristan
00fed4f995 Carifications and implicit HW_PIN... definition 2022-12-18 11:33:13 +01:00
Blaz Kristan
e8a7802e94 Loxone bugfix. 2022-12-18 11:07:32 +01:00
Blaz Kristan
bfbc1ebb13 Fix all segments checkbox 2022-12-16 23:20:49 +01:00
Blaz Kristan
a802bb2736 Merge branch 'main' into selall-bugfix 2022-12-16 22:32:15 +01:00
Blaz Kristan
3c5838cafd Remove "strip" dependency in Segment class 2022-12-16 22:31:07 +01:00
ezcGman
9217e8336d Merge branch 'um-sht' of github.com:ezcGman/WLED into um-sht 2022-12-16 02:22:44 +01:00
ezcGman
13cfc2d7bc UM SHT: Improved pin de/allocation 2022-12-16 02:22:13 +01:00
ezcGman
171cebed1c Add build flags for global i2c & SPI pins 2022-12-15 15:50:44 +01:00
Andy Hofmann
1dcef87e1c
UM SHT: Fixed typo in readme 2022-12-15 11:27:35 +01:00
ezcGman
23fb602a33 Merge branch 'main' of https://github.com/Aircoookie/WLED into um-sht 2022-12-15 01:38:54 +01:00
ezcGman
a8a549e8fc UM SHT: Lots of documentation added 2022-12-15 01:38:41 +01:00
ezcGman
44790e99ea UM SHT: use snprintf_P instead of sprintf_P 2022-12-15 00:52:21 +01:00
ezcGman
a3f6717c59 UM SHT: Avoid inline methods 2022-12-15 00:42:27 +01:00
ezcGman
9587480e29 UM SHT: Updated ReadMe 2022-12-15 00:41:08 +01:00
mxklb
c51dbae8b6 Removed bad code comments 2022-12-14 22:55:42 +01:00
Blaž Kristan
8619e8fc0b
Merge pull request #2947 from eibanez/main
Update wizlights user mod so it compiles
2022-12-14 06:30:16 +01:00
Eduardo Ibanez
10dace6de6
Merge pull request #1 from Aircoookie/main
Pull upstream changes
2022-12-13 16:02:47 -06:00
Blaz Kristan
f6e843b5e2 No simple UI detection. 2022-12-13 22:25:12 +01:00
Blaz Kristan
a7bad5df61 Bugfix. #2945 2022-12-13 14:40:41 +01:00
Christian Schwinne
f50c9e855c
Use "pd" JSON API call for direct preset apply (#2946) 2022-12-13 14:27:44 +01:00
Eduardo Ibanez
3653666ffe Update wizlights user mod so it compiles 2022-12-12 22:04:25 -06:00
ezcGman
2123e43490 UM SHT: Added Fahrenheit support 2022-12-12 02:33:31 +01:00
ezcGman
19146d8012 UM SHT: Made type a setting instead of buildflag 2022-12-12 02:05:02 +01:00
ezcGman
987dd36401 UM SHT: Using F() helper on some strings 2022-12-11 22:32:03 +01:00
Blaz Kristan
6bb158786b Fix for switching WLED off when in nighttime only mode. 2022-12-11 20:10:24 +01:00
Bill Thomson
f66d091717
Update README.md (#2943)
This change corrects of one of my earlier edits. (removes an extra word in the sentence)
2022-12-11 18:03:35 +01:00
Blaz Kristan
0a3d911602 UM settings page update.
- capitalize every word in parameters
- replace - and _ to space for legibility

Swapped includes in FX.cpp
2022-12-11 10:43:16 +01:00
ezcGman
e8edb99bb0 UM SHT: Added SHT usermod 2022-12-11 01:16:14 +01:00
Frank
917cd96a3d don't complain about button pin = -1 2022-12-10 21:03:58 +01:00
Frank
20ad6d239d minor cleanup
removing a misleading comment
2022-12-10 19:23:00 +01:00
Frank
eea3968bfb delete accidentially created wled.ino.cpp
github desktop sucks
2022-12-10 19:19:02 +01:00
Frank
7ac8f6dd19 improvements for new MCU support (-S3/-S2/-C3)
- switch off debug messages to USBCDC, if WLED_DEBUG is not set
- ensure that analogread pins are valid - invalid pins cause lots of error messages and finally lead to watchdog reset on some MCUs.
2022-12-10 19:16:02 +01:00
Frank
cafa78c3f3 fixing CI build. really now.
-check IDF target after including arduino.h
-add missing build flags in [env:esp32s2_saola]
2022-12-10 19:00:48 +01:00
Frank
e808f7655c fix CI build
make sure SparkFunDMX driver is not compiled on -S2 and -C3
2022-12-10 18:20:00 +01:00
Frank
4f28bf7ab4 missing word in comment 2022-12-10 18:00:48 +01:00
Frank
9380b2b4e8 SparkFunDMX: fix for issue #2928
* make SparlFunDMX driver more robust:
- made variables static (so they don't overlap with other global variables)
- made sure all valriables are properly initialized
- do not apply pinMode and digitalRead to invalid pins (as this creates problems on -S3, -C3 and -S2)
* disable DMX sending code (unneeded code that may case troubles)
2022-12-10 17:55:14 +01:00
srg74
8caeddde15
Spelling check by @wthomson (#2940)
A lot of spelling corrections. Now repo will sound like educated person :)

Co-authored-by: Bill Thomson <bt@kattt.org>
2022-12-10 16:12:55 +01:00
Blaz Kristan
b637398a9c Optimisations. 2022-12-09 18:37:53 +01:00
dependabot[bot]
2e5b19575f
Bump qs from 6.5.2 to 6.5.3 (#2939)
Bumps [qs](https://github.com/ljharb/qs) from 6.5.2 to 6.5.3.
- [Release notes](https://github.com/ljharb/qs/releases)
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/qs/compare/v6.5.2...v6.5.3)

---
updated-dependencies:
- dependency-name: qs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-09 15:30:35 +01:00
dependabot[bot]
102a69996a
Bump certifi from 2022.6.15 to 2022.12.7 (#2938)
Bumps [certifi](https://github.com/certifi/python-certifi) from 2022.6.15 to 2022.12.7.
- [Release notes](https://github.com/certifi/python-certifi/releases)
- [Commits](https://github.com/certifi/python-certifi/compare/2022.06.15...2022.12.07)

---
updated-dependencies:
- dependency-name: certifi
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-09 15:29:34 +01:00
Blaž Kristan
37af48f3fb Bugfix.
- missing selall with maximum segments reached
2022-12-09 08:15:14 +01:00
mxklb
f38747aa28 Fixed bug: Last segment in universe skipped 2022-12-09 02:11:16 +01:00
Frank
88d05578a8
platformio.ini: do not redefine "register" as it break ASM code and affects methods called "register" as well
unfortunately this breaks build for -C3 and -S3

/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32c3/include/riscv/include/riscv/semihosting.h:75:19: warning: ignoring asm-specifier for non-static local variable 'a0'
     register long a0 asm ("a0") = id;
                   ^~
.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32c3/include/riscv/include/riscv/semihosting.h:76:19: warning: ignoring asm-specifier for non-static local variable 'a1'
     register long a1 asm ("a1") = (long) data;
2022-12-08 22:00:44 +01:00
Blaž Kristan
b24c8b3410
BobLight protocol (#2917)
* BobLight ambilight protocol implementation for WLED

* Added usermod ID

* Add realtime locking
Add port config
Bugfixes

* Minor optimisation.

* Fix WiFiServer start.

* Bugfix

* Working boblight.

* npm run

* Add readme

* Undo PIR sensor modification.
Undo npm run build.

* Fix parentheses.

* Comments.
Cancel realtime when disabled.
2022-12-08 19:41:50 +01:00
Blaz Kristan
2c8dbb94fc Tetix & FX option bugfix.
- mono color with palette option
2022-12-08 17:17:54 +01:00
Frank
3da2ec5112 upps
forgot to remove this.
2022-12-08 13:20:50 +01:00
Frank
c3545ef060 build env update for -S3 without serial-to-USB chip
small -S3 like Adafruit "QT Py ESP32-C3" seems to need USBCDC.
2022-12-08 12:47:34 +01:00
Frank
4308a7cf79
bug.yml: adding new MCUs do boards dropdown. 2022-12-06 18:05:32 +01:00
Blaz Kristan
e629c90a71 Missing UDP sync notifications bugfix. 2022-12-05 22:56:44 +01:00
Frank
e7f07f5bfc pinmanager robustness improvement
make sure that array bounds are not violated in pinManager class.
2022-12-05 17:04:54 +01:00
Frank
da7972c119 use latest NeoPixelBus for -S3
NeoPixelBus 2.7.1 is the first release that has official support for ESP32-S3
2022-12-05 16:20:58 +01:00
cschwinne
efc476e50b Disable register keyword to reduce compiler warnings
Minor formatting improvements
"ps" string optimization
Removed travis envs
2022-12-03 20:55:17 +01:00
Frank
33f4e8cf73 pinmanager bugfix for -S2/-S3
pinmanager ran out out array bounds on -S2 and -S3, as these MCUs have more than 40 GPIO. As consequence, memory was overwriten, and pins > 39 were reported as "allocated" but not "owned".

Thisfixes the problem, by extending internal arrays so that up to 50 pins can be managed.
2022-12-02 20:08:11 +01:00
Blaz Kristan
643f300792 Playlist creation bugfix (preset 0 selected). 2022-11-30 19:34:32 +01:00
Ardi Loot
bd601ad2da
PWM outputs usermod (#2912)
* first commit of PWM outputs

* fix pin deallocation issue

* refactoring

* removed debug prints

* fix compile error

* added readme

* added compile error for ESP8266

* added overloaded SetDuty method

* convert state to separate nested object

* Revert "added overloaded SetDuty method"

This reverts commit e8ea32f577c85cbdc5d5d130cbead66f37c0caca.

* move constant strings to flash

* reworked json info and config

* bugfixes

* more bugfixes

* updated readme

* use C strings instead of String

* added uint8 and uint16 overloads for SetDuty

* removed ambiguous overload
2022-11-30 09:15:07 +01:00
Blaž Kristan
9f1a7a1c20 Swap info. 2022-11-29 15:02:56 +01:00
mx
bd721c1310
Merge branch 'Aircoookie:main' into pr_fxsegs 2022-11-29 00:54:15 +01:00
Frank
98138a02e3
audioreactive usermod update (align with MoonMod code) (#2907)
* audioreactive driver update

- Better handling of PDM and I2S Line-in
- Bugfixes for ES7243 (allocateMultiplePins)
- More error messages for ES7243
- sample scaling (needed for sources that use full scale of samples)

* audiorective update

* align SR_DEBUG with WLED_DEBUG
* optional bandpass filter (needed for PDM mics)
* sample scaling for PDM and Line-In
* small improvements for analog input
* bugfixes and small performance improvements
* code for FFT task refactored, for better readablity. Introduces separate functions for filtering and post-processing
* small improvement for beat detection
* default mic settings can be configured at compile time
* correct mic type if MCU does not support PDM or ADC
* hide analog PIN config if not supported by MCU

* audioreactive updates

- minor updates to source code (see discussion in PR #2907)
- usermod readme improvements

* small readme update

* one think I overlooked

* ok, another edit. Now its final. Hopefully.

* small upps

wrong parameter order in debug message.
2022-11-28 20:52:33 +01:00
Blaz Kristan
f7004e7a7c Allow disable internal pull-up resistors.
Fixes #2896 and #2899
2022-11-26 23:56:55 +01:00
Christian Schwinne
1db25d4b20
FX data optimization (#2908)
* Do not require commas between ! in fxdata

* Updating fxdata: Halfway through the FX list

* fxdata flags and optimizations

* Revert optional commas after !
2022-11-26 21:31:45 +01:00
mxklb
507e198b70 Minor cleanups 2022-11-26 17:22:03 +01:00
mx
5c721ee435
Merge branch 'Aircoookie:main' into pr_fxsegs 2022-11-26 17:15:55 +01:00
Frank
9a44f0c869 small update for env:esp32s3dev_8MB_PSRAM
- corrected board
- added link to workaround
2022-11-26 15:13:54 +01:00
mxklb
8c5f9b4501 Added missing DMX effect options and 3rd color 2022-11-26 14:41:59 +01:00
cschwinne
713bf66a12 Increase QL buffer to allow unicode characters
Fixes #2906
2022-11-26 03:57:17 +01:00
Ewoud
78e9f5bd1a
Clean up UserMod settings: grouping of variables and add preInfo to variables (#2894)
* Grouping um settings, add pre and post Info, update  SR & 4LD settings

Settings_um.htm: 
- modify addField (grouping)
- addInfo (pre and post texts)

Add preInfo to audio reactive and 4ld usermod

Extra:
platformio: wemos_shield: add audio reactive usermod and update to alt display

* um settings: cpp: lowercase, js: initcap

* um settings: txt only pre, txt2 only post and initCap as function

* Fix rotary encoder info string

Co-authored-by: Blaž Kristan <blaz@kristan-sp.si>
2022-11-26 03:44:04 +01:00
Frank
f03abf2600 workaround for broken env esp32s3dev_8MB_PSRAM
- Error: Unknown board ID 'esp32-tinys3'
temporarily use `` until a working solution is found.
2022-11-26 01:33:46 +01:00
JPZV
d5eee5b56c
Fixes platformio.ini for the ESP32 S3 (#2905)
* Update missing package for ESP32-S3
There was a missing package version for env:esp32s3dev_8MB. platformio/framework-arduinoespressif32@3.20004.220825 doesn't exist any more

* Fixes Compiling error for ESP32 S3 with octal (qspi_opi) memory mode
For details: platformio/platform-espressif32#912 and platformio/platform-espressif32#914

* Added env:esp32s3dev_8MB_PSRAM to platformio.ini
Also, reverted back to espressif32@5.1.1 for env:esp32s3dev_8MB

* small maintainer edit
Co-authored-by: Frank <91616163+softhack007@users.noreply.github.com>
2022-11-25 23:49:49 +01:00
Blaz Kristan
8899684092 Select custom palette bugfix. 2022-11-25 17:33:29 +01:00
Blaz Kristan
8e30e4925c BME280 fixes and optimisations
- MQTT not required
- minor string optimisations
- added enable option
2022-11-25 16:45:21 +01:00
Blaz Kristan
906c7a8ea1 Merge branch 'main' of https://github.com/aircoookie/WLED 2022-11-24 17:43:16 +01:00
cschwinne
324fc149b3 Shorter JSON keys for 1d2d map and sound sim
(smaller fxdata, saves 100b flash, slightly shorter json doc)
2022-11-24 04:15:24 +01:00
Jason Kölker
29b1f2afae
feat(json): add wifi scanning (#2895)
* feat(json): add wifi scanning

Adds wifi scanning to the JSON api at `/json/networks`. The initial
request will trigger a scan, subsequent requests will scan or return the
results depending on the state of the `WiFiScan`.

Add a `Scan` button next to the client ssid input, on click, scan for
networks, and change the input to a select with the found ssids.

Fixes: #1964

* Added option to go back to manual SSID input

Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
2022-11-24 02:50:24 +01:00
mxklb
87fa14b281 Use up-to-date fashion for segment dmx control 2022-11-23 23:19:53 +01:00
Blaz Kristan
b6db86da50 Allow matrix bigger than LED count (missing panels) 2022-11-23 16:54:32 +01:00
mxklb
043947fdcb Added missing brightness to preset DMX mode 2022-11-23 00:38:42 +01:00
Blaz Kristan
713509527a Bugfix for missing ledmap. 2022-11-22 22:17:30 +01:00
mx
ae7eedf523
Merge branch 'Aircoookie:main' into pr_fxsegs 2022-11-20 23:48:06 +01:00
Blaz Kristan
0a1bd748d7 Fix loading transitionDelay on boot 2022-11-20 19:40:54 +01:00
Blaz Kristan
1b351b7743 Broadcast presence on WiFi (re)connect immediately 2022-11-20 18:12:01 +01:00
Jason Kölker
e409bd298a
feat(wifi): add compile time configurtation (#2889)
* feat(wifi): add compile time configurtation

Add `WLED_AP_SSID` and `WLED_AP_PASS` defines to allow configuring the
SoftAP SSID and Password at compile time. Default to existing values.

Add `WLED_AP_SSID_UNIQUE` flag to append the device portion of the mac
address to `WLED_AP_SSID`.

Exampleof all flags (note the quoting to preserve
"stringification"):

```
build_flags =
    -D WLED_AP_SSID='"MyAP"'
    -D WLED_AP_PASS='"MyPassword"'
    -D WLED_AP_SSID_UNIQUE
```

* Removed two error defines

Co-authored-by: Christian Schwinne <cschwinne@gmail.com>
2022-11-20 15:55:38 +01:00
Blaz Kristan
caef289b9b Autosave enable/disable UI button 2022-11-20 15:50:42 +01:00
mxklb
84628bd9fc Refactored DMX effect mode + new segement controls (#2325) 2022-11-19 14:10:40 +01:00
Blaz Kristan
43582b6319 Add segment bounds check. 2022-11-19 11:57:38 +01:00
cschwinne
c14c4425a4 Fix minor UI issues
Logo margin in info page
copy to clipboard button text on two lines
noslide on preset API textfield
Preset margins
2022-11-19 01:59:58 +01:00
Blaz Kristan
c47d6cffa8 Missing presets.json on factory reset bugfix.
Clarification on loading ledmaps in UI.
Added manual ledmap loading.
2022-11-16 20:55:21 +01:00
Constantin Wolf
f104fb0586
SD card support: MMC or configurable SPI (#2877)
Co-authored-by: constantin wolf <constantin.wolf@pwc.com>
2022-11-14 02:30:35 +01:00
degraafm76
75e410e4b4
Analog clock time offset bugfix + optional hour mark feature (#2860)
* Implement optional hour marks
Time offset did not work

* removed undefined error int in hexstringtocolor

* revert cosmetic changes

* minor cosmetic changes

Co-authored-by: mdegraaf <mdegraaf@proxsys.nl>
2022-11-14 02:30:18 +01:00
Ewoud
740316ae2b
Effect ID's back to 0.13 numbering (#2856)
* Effect ID's back to 0.13 numbering

Needed for sync between versions and allow 0.13 presets to work in 0.14

* Effect ID's back to 0.13 numbering (part2)
2022-11-14 02:29:59 +01:00
Blaz Kristan
b141ec7ea7 Fix for #2880 (stateChanged on segment on/off)
Added comments.
Added X1, X2, X3, M1, M2, M3 segment options to HTTP API.
Added "on" handling with "ps".
2022-11-13 12:13:49 +01:00
Frank
50875d5759
Sync Interfaces settings: hide sections for disabled features (#2865)
* Add network debug printer

* hide settings for disabled features

If not enabled at compile time, this change hides "Sync interfaces" settings for Alexa, MQTT, Blynk, HueSync.
The html sections are just hidden by a <div> with style display:none.

* Update Animated Staircas for 0.14

* Faster strip updates.

* Add ESP32 variant display in update page.

* Net debug optimizations

Fix ESP8266 (unaligned progmem flash string reads)
Do not send an extra package for \n in println
Only resolve IP/hostname once

* Compile time option for PIR sensor off timer

* Fix Gitpod compiling (#2875)

* Install Platformio not in Gitpod Image

* Install platformio at runtime

remove outdated extensions

* Bugfix for color transitioning.
Return palette option for Candle.
Fix for "* Color..." palette hiding.
Comment out debug output.

* Optimization & bugfix for net debug.
- Inherited from Print class.
- Added UI option to disable net  debug output.

* Reduce fxdata size by about 200 bytes

Removed redundant commas before semicolon delimiter (`,;` -> `;`)
No need to transmit `@` in /json/fxdata

* NetworkDebugPrinter packet optimization.

* Revert NetworkDebugPrinter changes.

* Remove flush() in bus manager.

* Optimizations.

Co-authored-by: Shaheen Gandhi <shaheen@fb.com>
Co-authored-by: Blaz Kristan <blaz@kristan-sp.si>
Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
Co-authored-by: Jason2866 <24528715+Jason2866@users.noreply.github.com>
2022-11-11 20:20:11 +01:00
Blaz Kristan
61b5e5ad7e Remove flush() in bus manager. 2022-11-11 18:42:00 +01:00
Blaz Kristan
6403d18d15 Revert NetworkDebugPrinter changes. 2022-11-11 18:17:12 +01:00
Blaž Kristan
77f04d913a NetworkDebugPrinter packet optimization. 2022-11-11 14:39:47 +01:00
cschwinne
c0a783198e Reduce fxdata size by about 200 bytes
Removed redundant commas before semicolon delimiter (`,;` -> `;`)
No need to transmit `@` in /json/fxdata
2022-11-11 03:10:41 +01:00
Blaz Kristan
d370f67f60 Optimization & bugfix for net debug.
- Inherited from Print class.
- Added UI option to disable net  debug output.
2022-11-10 21:50:21 +01:00
Blaz Kristan
5f4199183c Bugfix for color transitioning.
Return palette option for Candle.
Fix for "* Color..." palette hiding.
Comment out debug output.
2022-11-09 20:09:01 +01:00
Jason2866
d097f8bf1e
Fix Gitpod compiling (#2875)
* Install Platformio not in Gitpod Image

* Install platformio at runtime

remove outdated extensions
2022-11-09 17:59:31 +01:00
Blaz Kristan
1e104bdd9e Compile time option for PIR sensor off timer 2022-11-07 16:56:41 +01:00
Christian Schwinne
8143be29d9
Merge pull request #2870 from Aircoookie/net_debug
UDP Network debugging
2022-11-06 22:50:35 +01:00
cschwinne
1d8c9ac020 Net debug optimizations
Fix ESP8266 (unaligned progmem flash string reads)
Do not send an extra package for \n in println
Only resolve IP/hostname once
2022-11-06 16:50:12 +01:00
Blaz Kristan
7fcc8be73c Merge branch 'netdebug' of https://github.com/visigoth/WLED into net_debug 2022-11-06 10:58:19 +01:00
Blaz Kristan
e5f9cfd5b6 Add ESP32 variant display in update page. 2022-11-05 18:31:38 +01:00
Blaž Kristan
edd487c1f4
Merge pull request #2863 from Aircoookie/staircase-fix
Staircase fix
2022-11-04 22:45:04 +01:00
Blaž Kristan
71d84fecba Bugfix.
Use default nightLightDelay if ND present.
2022-11-04 08:33:55 +01:00
Blaž Kristan
d30e219d7b Faster strip updates. 2022-11-04 08:27:35 +01:00
Benjamin G
0cfda55b3a
Automatically set PC Mode if unset (#2861)
* Automatically set PC Mode if unset

based on the UserAgent

* slight reduction

Reduce flash usage a bit.

Co-authored-by: Blaž Kristan <blaz@kristan-sp.si>
2022-11-03 23:01:32 +01:00
Blaz Kristan
17d1ca82a6 Update Animated Staircas for 0.14 2022-11-03 21:04:40 +01:00
Blaž Kristan
81d2a67948 Minor adjustment in UDP segment options sync.
Added support for node type for S2, S3 and C3.
2022-11-02 14:56:50 +01:00
Blaz Kristan
3bae3aa9aa UDP Sync fix
- sync new sliders
- sync 2D options
2022-10-31 07:13:12 +01:00
Blaž Kristan
7211e6b929
Merge pull request #2853 from Aircoookie/PIR-HA-discovery
Add HA discovery option to PIR sermod
2022-10-26 07:16:25 +02:00
siggel
82af52a0bc
Feature/nine additional alexa devices for presets (#2787)
* add 9 further alexa devices for calling presets 1-9

* use preset names from WLED for Alexa preset device names instead of hardcoded names

* update readme and version

* call alexaInit() at end of savePreset() to keep Alexa in sync with the preset IDs and names

* This reverts commit f8db06c7c5cfe159f9fc03ebc08547fa3c9e9ebd.

* change order to configured Alexa WLED name first, preset names afterwards

* fix status of devices when shown within Alexa, i.e. switching one preset on switches others off (except for alexaInvocationName)

* re-add getPresetName() after merge with master

* restore original readme for pull request

* restore original platformio.ini for pull request

* Logic simplification

* Pass string by reference

* Added number of presets check

* fix alexaInit() in case of alexaNumPresets==0

Co-authored-by: Christian Schwinne <dev.aircoookie@gmail.com>
2022-10-25 23:42:26 +02:00
Blaz Kristan
e88d34ea19 Correct HA discovery topic & minor adjutments.
Publish on MQTT connect.
2022-10-25 21:47:25 +02:00
Christian Schwinne
e1d7d9511f
Save config.json with default values on initial boot (#2854)
* Save config.json with default values on first boot

* Init Ethernet on first boot
2022-10-25 17:11:31 +02:00
cschwinne
22d7d2c1f6 Fix FAQ link 2022-10-25 11:53:24 +02:00
cschwinne
2b10a0c513 No blank issues 2022-10-25 11:49:00 +02:00
cschwinne
6e59cfc66c Updated issue templates 2022-10-25 11:47:34 +02:00
cschwinne
51d8344515 Fixed ESP8266 async preset loading
Improved name label visibility on gray images
2022-10-25 03:27:16 +02:00
Blaz Kristan
535f285287 Add HA discovery option to PIR sermod 2022-10-24 21:25:23 +02:00
Blaž Kristan
779fd78091
Merge pull request #2850 from ahadcove/fix/restoring_cfg_json
fix: restoring cfg.json #2847
2022-10-24 21:08:50 +02:00
Blaž Kristan
69a111ee35
Merge pull request #2851 from albarlow/BH1750-Enabled-Bugfix
Fix Enabled Toggle on BH1750
2022-10-24 19:45:10 +02:00
Alex Barlow
7288e5a8fd Fix Enabled Toggle
Adjusted inherited 'disabled' to fix saving bug.
2022-10-24 18:17:37 +01:00
Christian Schwinne
ac57da8713
No F() and numeric comparison 2022-10-24 19:12:27 +02:00
Blaž Kristan
2000d02768
Strings in flash 2022-10-24 18:49:02 +02:00
Christian Schwinne
5ba1ebd525
equals for /presets.json instead of indexof 2022-10-24 18:44:11 +02:00
ahadcove
92329a8dd0 chore: condense the if statement 2022-10-24 11:34:56 -04:00
ahadcove
21de073784 fix: restoring cfg.json #2847 2022-10-24 11:13:33 -04:00
Dominik Nussbaumer
3d502a41c5
add static_cast<uint8_t> in order to fix warnings (#2843) 2022-10-23 15:57:42 +02:00
Christian Schwinne
8570f9256d
Fix funding.yml 2022-10-23 11:38:52 +02:00
bwente
fe09c417ff
Create v2 usermod_word_clock_matrix.h (#2473)
* Create usermod_word_clock_matrix.h

Tried using the old usermod on the new build, found out a lot has changed since then. My best attempt to update it. Still needs some help, but it is working. I would like to preconfigure some of the default settings. I am also having an issue with  Error 12: Preset Not Found

* Update readme.md
2022-10-22 11:21:46 +02:00
Blaz Kristan
ca891b0e70 Merge branch 'audioreactive-prototype' of https://github.com/blazoncek/WLED into audio-fix 2022-10-22 11:13:02 +02:00
Blaz Kristan
af3ee35c50 Merge branch 'dev' into audioreactive-prototype 2022-10-21 23:47:31 +02:00
Frank
ba0bc31525 UDP sound sync: added decoder for legacy packets
support decoding of sound sync data from SR version > 0.13.0
2022-10-21 12:12:02 +02:00
cschwinne
3905cad68d Ethernet profile for QuinLed-Dig-Octa Brainboard-32-8L and LilyGO-T-ETH-POE
Un-F() a string that already exists in RAM
2022-10-21 03:56:00 +02:00
albarlow
30a029c19f
BH1750 upgrades (#2725)
* BH1750 upgrades

Moved the definitions into the main usermods_list.cpp instead of having a section to copy across.

Added Home Assistant Discovery topic for light sensor.  This is toggleable from the usermod menu.

* Configure pin, other enhancements, readme

Implemented pin manager
Made pins configurable at runtime
Improved info screen outputs
Added F() around strings
Updated readme

* Resolve conflict

* Merge branch 'main'

* Missing comma

Co-authored-by: Christian Schwinne <dev.aircoookie@gmail.com>
Co-authored-by: Christian Schwinne <cschwinne@gmail.com>
2022-10-21 03:32:44 +02:00
Dimitry
7cac609c06
Add ADS1115 usermod (#2752)
Co-authored-by: Christian Schwinne <dev.aircoookie@gmail.com>
2022-10-21 03:25:36 +02:00
c3n
e1365f185c
Add define to set data pins to HIGH when relay is off (#2478)
* Add ESP32_DATA_IDLE_HIGH to enable data pin to go HIGH when relay is off

* forgot to remove Serial.print for ESP32_DATA_IDLE_HIGH

* forgot another ifdef preventing compilation on non-esp32 boards

* Extra checks that the bus is actually an RMT bus

Could still blow on new ESP32 variants, but now in a mergable state.

Co-authored-by: Christian Schwinne <cschwinne@gmail.com>
2022-10-21 03:16:31 +02:00
Sebastian Schmailzl
c2ac215d43
Usermod: Ping Pong Clock (#2746)
* Starting on Ping Pong Clock Usermod, still having to check the led indices and test the stuff out of it

* Adding some attributes to be configured, Added platformio_override

* Fixed LED Numbering, Changed Color to RGB to Work with Settings

* Removing LED Positions from Config

* Some documenting

* Removed example comments to make ping pong clock mod more readable

Co-authored-by: Schmailzl, Sebastian <sebastian.schmailzl@wk-it.com>
Co-authored-by: Christian Schwinne <dev.aircoookie@gmail.com>
Co-authored-by: Christian Schwinne <cschwinne@gmail.com>
2022-10-21 01:47:25 +02:00
Egor
c47972d500
Adapting for the new WLED release: (#2802)
Removed longPressMacro call
  Fix debug calls
  Fix typos
2022-10-21 01:31:43 +02:00
Ahad
3c36030977
fix: filename uploads (#2831)
Co-authored-by: Christian Schwinne <dev.aircoookie@gmail.com>
2022-10-21 01:25:39 +02:00
lordjaxom
7b2836c63c
Usermod: Analog clock (#2736)
* implement analog clock as a usermod

* fix some bugs, use toki for time measurement, implement fading seconds

* added timezone handling to analog clock

* fixed looping second pointer, lower refresh rate

* removed mqtt debug code

* implement seconds effect choice

* adapt to 0_14 branch

Co-authored-by: Christian Schwinne <dev.aircoookie@gmail.com>
2022-10-20 10:12:17 +02:00
Steven Dashevsky
38e2fc6812
Implemented usermod for integration with smartnest.cz (#2800)
Co-authored-by: Christian Schwinne <dev.aircoookie@gmail.com>
2022-10-20 01:07:32 +02:00
Bartłomiej Wiśniewski
b0037c75a3
Upgrade DHT usermod (#2833)
* Implent publishing DHT data to MQTT broker

* Fix naming and add description
2022-10-20 01:02:52 +02:00
Christian Schwinne
d7f6cd944c
Merge pull request #2841 from Aircoookie/0_14
Merge 0.14 to main
2022-10-20 00:51:59 +02:00
Christian Schwinne
0de928a674
Merge branch 'main' into 0_14 2022-10-20 00:44:40 +02:00
Aircoookie
5c542d60e5 Add PKT timezone (see PR #2840) 2022-10-19 11:11:25 +02:00
Squall-DA
b3a29188a2
Add number of UDP retries (#2830)
* Release of WLED v0.13.3

* Fixed a type in the file name (#2781)

* Fixed the dependency (#2782)

* Usermod Wordclock update to use an alternatve wiring pattern (#2757)

* Update

* update readme file

* readme update

* Update readme.md

* Update readme.md

* Update readme.md

* Update readme.md

* Update platformio.ini

* Add number of UDP retries

Add a configurable number of retries to the UDP WLED sync function.

* Add migration from old eeprom settings

* Revert some accidental carry overs

* Correct issues found in pull request

Change default number of retries
Fix migration from old settings

* Make the minimum number of retries 0

* Import notify twice setting

Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
Co-authored-by: Soren Singh Dary <67230851+sorensd@users.noreply.github.com>
Co-authored-by: Patrick <40436536+paeppi88@users.noreply.github.com>
2022-10-19 01:31:23 +02:00
Blaz Kristan
8417589789 Fix fork version. 2022-10-18 20:54:23 +02:00
Christian Schwinne
c982e022fe
Merge pull request #2834 from Aircoookie/async-psave
Async preset saving
2022-10-18 16:21:43 +02:00
Blaz Kristan
a4c3fd4493 Change max number of buses.
Added correct debug on failed digital init.
2022-10-18 12:10:11 +02:00
Blaz Kristan
7de35b4830 Merge branch 'dev' of https://github.com/blazoncek/WLED into async-psave 2022-10-13 17:22:51 +02:00
Blaž Kristan
3841780fe6 Merge branch 'async-psave' into dev 2022-10-13 14:25:01 +02:00
Blaž Kristan
2440d8e3d1 Merge branch '0_14' of https://github.com/Aircoookie/WLED into dev 2022-10-13 07:51:52 +02:00
Blaž Kristan
5012418ed2 Reintroduce color 2 & 3 for Dancing shadows.
Allows palette selection.
2022-10-13 07:33:23 +02:00
Blaž Kristan
a6ab4feca5 Bugfix. Unload playlist on "ps" JSON. 2022-10-13 07:06:49 +02:00
Renaud11232
cd0471386d
Fix SSDR usermod compilation (#2825) 2022-10-12 18:18:43 +02:00
cschwinne
d6749d30ab Fixed AEST and NZST DST change dates (resolves #2820 ) 2022-10-12 17:54:39 +02:00
Blaž Kristan
37a4a4dcdf Fix max bus limits for C3, S2 & S3 2022-10-11 09:46:48 +02:00
cschwinne
cebceb3ec3 Proper RMT channel checks for ESP32-C3 and S3 2022-10-10 17:04:25 +02:00
Blaz Kristan
426635871b Bus corrections for C3, S2 & S3.
Minor hostname tweak.
2022-10-10 16:46:23 +02:00
Blaz Kristan
701c90d18d Another string optimisation. 2022-10-09 13:39:17 +02:00
Blaz Kristan
d00a708177 Minor string optimisations. 2022-10-09 12:09:46 +02:00
Blaz Kristan
1f32f96487 Temporary preset bugfix. 2022-10-08 21:31:59 +02:00
Blaz Kristan
7642f8d702 Async preset saving.
Minor bugfixes.
2022-10-08 18:25:51 +02:00
cschwinne
e78bf240ca ESP32-C3: Do not default LEDPIN to reserved pin 16 2022-10-07 04:22:59 +02:00
Blaz Kristan
4fb44d98db Merge branch '0_14' of https://github.com/aircoookie/WLED into merge-0_14 2022-10-06 18:25:51 +02:00
Blaz Kristan
113ee73609 Newer AsyncWebServer. 2022-10-06 18:25:19 +02:00
Frank
64441b39ac critical bugfix
it's possible that volume samples become negative. In this scenario, our simple noise gate does stupid things, and it looks like "effects temporarily lost the sound".
This fix improves the situation, and makes sure that volume samples are always >= 0.
2022-10-06 15:39:28 +02:00
Blaž Kristan
b4e3cccf4b Remove testing entry. 2022-10-06 12:22:02 +02:00
Blaž Kristan
6a3ef2a2e4
Merge pull request #2809 from ingDIY/0_14
defines improvement
2022-10-06 12:15:30 +02:00
Blaž Kristan
1dd00c2ea9
Merge pull request #2814 from srg74/patch-2
Update usermod_PWM_fan.h
2022-10-05 21:40:08 +02:00
srg74
5038e4396e
Update usermod_PWM_fan.h
Changed values for proper work.
2022-10-05 15:30:09 -04:00
Blaz Kristan
bd025309fb Custom palette name bugfix. 2022-10-04 22:10:20 +02:00
Frank
1ae0dd574d fix for ADC analog
the "wait until I2S buffer fills" trick does not work for ADC sources, as the I2S sampling does not run in background for ADC.
2022-10-04 16:00:36 +02:00
Frank
7d5ce994ab WLED_DEBUG: fix for crash after LittleFS formating
This fixes a "division by zero" in WLED_DEBUG code.

LittleFS init seems to take some time, so we can arrive at "Loops/sec" with 0 loops executed --> crash.
2022-10-04 13:50:01 +02:00
Frank
78e0c3dcca make MIC_LOGGER work again
- EVERY_N_MILLIS somehow does not work. Replaced it,
- make sure that WLED_DEBUG does not report "fake FFT times" whrn FFT code was not running
2022-10-04 13:47:07 +02:00
ingDIY
edbb96bcd9 Update const.h
added #if case to exclude warning in case of ABL=0
2022-10-03 19:34:52 +02:00
ingDIY
bdb1e839ed Update readme.md
added description about the configuration of setting:
-D USERMOD_ROTARY_ENCODER_GPIO
2022-10-03 19:22:52 +02:00
ingDIY
1880740561 Update wled.h
reverted back settings to enable Alexa, Blynk, Huesync, IR.
The user shuld #define -D in platformio_override.ini to disable them
2022-10-03 19:17:28 +02:00
ingDIY
503835d47e submitting PR
Here they are the PR #2776, #2803 and #2804 rebased for 0_14 branch,
I hope that now they are OK!
2022-10-02 23:23:24 +02:00
Blaz Kristan
8d372bee67 Merge branch '0_14' of https://github.com/aircoookie/WLED into merge-0_14 2022-09-29 15:53:51 +02:00
Blaž Kristan
f385af595a Add setMode() and setPalette() methods
- automatically start transition
Implement load FX defaults for HTTP API (FXD)
2022-09-29 12:49:12 +02:00
Blaz Kristan
4cd6bafc15 Merge branch '0_14' of https://github.com/aircoookie/WLED into merge-0_14 2022-09-27 18:34:03 +02:00
Blaz Kristan
dc700c41fb Invalid FX bugfix. 2022-09-26 21:26:00 +02:00
ChuckMash
7cd9e8860d
Update wled_serial.cpp (#2667)
Add Continuous Serial Streaming feature to wled_serial.

Co-authored-by: Christian Schwinne <dev.aircoookie@gmail.com>
2022-09-26 10:08:31 +02:00
Stefan Riese
b6adbc926f
Usermod wordclock: support for upfront LEDs (#2668)
* - add ledOffset to support LEDs that are not effected by the usermode before the wordclock LEDs

* - adjust readme
2022-09-26 09:35:42 +02:00
Blaz Kristan
c253464b2a PinManager::isPinOk() rewrite
Button pullup/pulldown fix for ESP32.
2022-09-24 12:25:06 +02:00
Blaz Kristan
6306cfff96 Remove Octal SPI pins.
Whitespace.
2022-09-24 12:16:53 +02:00
Blaz Kristan
d86d88c7b7 New isPinOk() 2022-09-23 14:35:17 +02:00
Christian Schwinne
5f606bb0b7
DMX improvements (merge #2619) (#2794)
* Art-Net improvements

* Fix brightness level

* Update cfg.cpp

Co-authored-by: 4lloyd <github@lloydpost.nl>
2022-09-23 01:02:49 +02:00
Patrick
1daa97545b
Usermod Wordclock update to use an alternatve wiring pattern (#2757)
* Update

* update readme file

* readme update

* Update readme.md

* Update readme.md

* Update readme.md

* Update readme.md

* Update platformio.ini
2022-09-22 20:43:40 +02:00
4lloyd
d0189b0719
Add ArtPoll support (#2615)
* Add ArtPoll support

* Improved calculations

* Add support for legacy DMX start address 0

* Small efficiency improvement

* ESP8266 doesn't like yield

* Optimized ArtPoll memory use

Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
2022-09-22 20:34:46 +02:00
Blaz Kristan
222b92807e Percent FX use % as index in palette.
FX Checkmark bugfix.
2022-09-21 21:09:52 +02:00
Blaz Kristan
de90e5b753 Percent FX use % as index in palette.
FX Checkmark bugfix.
2022-09-21 21:09:01 +02:00
Blaž Kristan
ad4870a59b PIO environment for ESP32-S3 2022-09-21 08:47:52 +02:00
Blaz Kristan
9a6c387b8e Added Lolin S2 mini dev board environment. 2022-09-20 22:14:18 +02:00
Blaz Kristan
81b4a35076 Corrrect version info.
AC CSS
2022-09-20 22:06:37 +02:00
Blaz Kristan
411b3d0888 Merge branch 'dev' of https://github.com/blazoncek/WLED into merge-dev 2022-09-20 21:53:59 +02:00
Blaz Kristan
fc0dc4472b Merge branch 'esp32-s2' into dev 2022-09-20 21:52:40 +02:00
Blaz Kristan
7824f9ee63 Remove sync preset loading (ugly core check)
WS buffer check for ESP32-S2
Delay for Serial init on CDC USB
2022-09-20 21:17:44 +02:00
Frank
fb00bef05f AR - necessary constants for 166Khz sampling rate
16kHz might be a good compromise on small MCU's:
- GEQ will show frequencies up to ~6Khz
- FFT process may use up to 32millis (-> 100% CPU load). Try to stay below <60% so FreeRTOS can schedule all tasks properly.

- more CPU time is left for other WLED, so it maintains LED FPS and stays responsive on web UI.
2022-09-20 18:29:27 +02:00
Frank
d7bc6b1be7 AR: optimization for small MCUs, part2
Only run FFT when the result will be used.
Please note that this also means that `FFTTime` shown in Info is only meaningful when there is sound input and not silence.

--> To get exact FFT times, the optimization can be disabled by compiling with `-D SR_DEBUG`
2022-09-19 14:09:45 +02:00
Frank
79776ae8bc AR: optimization for smaller MCUs
- this reduces "lagging behind" of I2S sampling on smaller MCU's. The maximum time for FFT is now ~20 millis.
- small improvement for SR_DEBUG
2022-09-19 13:38:52 +02:00
Frank
90b3f009af AR: small improvement for ADC analog mics
ensure that ADC parameters are properly configured.
2022-09-19 13:30:13 +02:00
Frank
6f8deb83e3 some relaxations for S2 and C3
- AR: changed "error" into warning.
- reducing max_busses (for AR) not needed on S2
2022-09-17 22:00:33 +02:00
Frank
da02a68e60 allocatePin() debug message when Pin is not OK.
This debug message should help to understand GPIO config problems.
2022-09-17 20:42:34 +02:00
Frank
85fc8710dd mics that need MCLK should work 2022-09-17 20:39:23 +02:00
Frank
a01f3e4efd presets: disable "crude hack" on single core
This code in handlepresets() does not make much sense.
Especially it does not make any sense on single core MCU's.
2022-09-17 13:41:27 +02:00
Blaz Kristan
cce54f3bb7 Loading cfg.json without wsec.json
Bugfix for BudOnOff.
2022-09-16 23:19:53 +02:00
Blaz Kristan
92037a480d Bugfix for BusOnOff 2022-09-16 23:12:57 +02:00
Blaz Kristan
cf6005ce2f Fix for loading config without wsec.json 2022-09-16 22:00:26 +02:00
Frank
a766ddbebc make I2S microphones work with buggy IDF4.4.x
I2S microphones were not working any more in with the newest framework - only delivers silence.
Ther reason is stupid bug in espressif I2S "compatibility" driver: RIGHT and LEFT channel are swapped, so when only asking for LEFT, we get silence from RIGHT.

Workaround: simply change LEFT to RIGHT, until the problem is fixed in ESP-IDF --> Fix tested on "classic ESP32", but still need to check behavior on -S3.
Code compiles also on -S3, -S2, and -C3.

smaller changes:
- a few changes to use new APIs (MCLK, rouing and sample resolution)
- a few additional debug messages
- put correct value into _pinConfig.mck_io_num
2022-09-16 16:58:04 +02:00
Frank
01acb08c83 minor fix (typo) 2022-09-16 16:38:24 +02:00
Frank
023c259034 show version of arduino-esp32 in WLED_DEBUG 2022-09-16 16:37:07 +02:00
Blaz Kristan
dfe4d70198 Merge branch 'audioreactive-prototype' into esp32-s2 2022-09-16 15:38:44 +02:00
Blaz Kristan
4d939cb778 Merge branch '0_14' of https://github.com/aircoookie/WLED into dev 2022-09-16 15:34:17 +02:00
Blaž Kristan
660a809ec8 Missing isActive() 2022-09-16 14:07:44 +02:00
Blaž Kristan
26825ed60f Missing isActive() 2022-09-16 14:07:04 +02:00
Soren Singh Dary
8bd8975e0a
Fixed the dependency (#2782) 2022-09-14 23:29:35 +02:00
Blaz Kristan
799d4f9465 Playlist load bugfix.
serializeConfig() in loop() (prevent crash/hang in web server callback)
2022-09-14 22:28:06 +02:00
Blaz Kristan
47797bcf4a Playlist loading bugfix. 2022-09-14 20:13:03 +02:00
Soren Singh Dary
2847921e5a
Fixed a type in the file name (#2781) 2022-09-14 13:56:16 +02:00
Blaz Kristan
8402de601f More fixes for GPIOs.
UI fixes.
2022-09-13 21:41:51 +02:00
Blaz Kristan
4dec75c589 Remove constraints when saving interface pins. 2022-09-13 20:26:45 +02:00
Blaz Kristan
ac15b227da isPinOk() for S2 & C3 2022-09-13 19:50:13 +02:00
Blaz Kristan
a1dc7a52e9 Merge branch '0_14' of https://github.com/aircoookie/WLED into dev 2022-09-12 22:39:00 +02:00
Blaz Kristan
6ba3e25d33 Meteor palette bugfix.
Fire2012 cooling adjustment.
Akemi optimisation.
2022-09-12 22:33:30 +02:00
Blaz Kristan
51a2fa47c9 Meteor palette fix.
Akemi optimisation.
Fire2012 remove cooling adjustment.
2022-09-12 22:31:55 +02:00
Blaz Kristan
09bd6dba84 ESP32 GPIO 37 & 38 removed from reserved list. 2022-09-12 21:15:19 +02:00
Frank
925bc3b3dd AR: get rid of annoying "type conversion" warning 2022-09-11 14:32:00 +02:00
Frank
382bf1e94c reserved Pins for S3
- adding USB-OTG to reserved GPIO
- no read-only GPI
- if PSRAM found, add pins for "octal" PSRAM to unusable list (octal PSRAM seems to common on S3)
- ESP32: 37 and 38 are read-only
2022-09-11 13:17:08 +02:00
Frank
575a7531c5 another "TX"
changed in hardwareTX
2022-09-11 01:01:27 +02:00
Frank
dce0c0b47e npm run build
regenerate html files
2022-09-11 00:24:35 +02:00
Frank
dc8230bf2e arch = ESP.getChipModel()
rely on ESP.getChipModel() for new MCUs-
2022-09-11 00:19:32 +02:00
Frank
17428d58d9 extend input ranges to 48 pins
this only extends the range of possible inputs. Sanity check will be performed regardless of the max value.
2022-09-11 00:18:33 +02:00
Frank
6771bd84c6 introduce hardwareTX / hardwareRX
RX/TX is not defined on all boards.
Fall-back to previous behavior on "classic" ESP32 and 8266.
2022-09-11 00:16:48 +02:00
Frank
ac10b3a5c7 compilation support for audioreactive
putting all parts that will not compile between #ifdef .... #endif
Tested on S3, cannot say what will happen on other MCUs
2022-09-11 00:12:51 +02:00
Frank
56f2513aba Basic support for -S3
- bus_wrapper: currently no support for I2S methods
- pin_manager: different number of PWM channels, different isPinOk()
2022-09-11 00:09:59 +02:00
Blaz Kristan
9858a009da Max GPIO fos I2C/SPI pins. 2022-09-10 21:58:51 +02:00
Blaz Kristan
73b818cf78 Fix for S3 pins. 2022-09-10 20:19:13 +02:00
Blaz Kristan
4f8ffaee5b S2, S3 & C3 support for settings. 2022-09-10 19:27:00 +02:00
Blaz Kristan
2cd40c7552 ESP32-S2 support. 2022-09-09 23:21:47 +02:00
Blaz Kristan
c9fd69ceb7 Preset loading tuning.
Multi-relay toggle support.
Fire2012 tuning.
2D functions tuning.
Global SPI comments & tuning.
Bugfix in 4LD usermod.
2022-09-09 17:21:13 +02:00
Blaz Kristan
e4fbf70568 Preset loading tuning.
Multi-relay toggle support.
Fire2012 tuning.
2D functions tuning.
Global SPI comments & tuning.
Bugfix in 4LD usermod.
On & bri support fix.
2022-09-09 17:16:52 +02:00
Frank
cf93d6bb65 more precision for debug info (FFT timing)
keep more detailed timing info for FFT and I2S (WLED_DEBUG)
2022-09-08 22:45:32 +02:00
Frank
228890aa19 Merge remote-tracking branch 'origin/dev' into audioreactive-prototype 2022-09-08 20:47:49 +02:00
Frank
ad8512e246 Revert "Compiling AR usermod on ESP32-S3 (future support)"
This reverts commit 7894389f1de8a8679053a4aab3781b2cc88bb29e.
2022-09-08 20:41:33 +02:00
Blaz Kristan
4480abc646 Better palette blends. 2022-09-06 21:47:50 +02:00
Blaz Kristan
94243ac605 Better palette blending. 2022-09-06 21:44:11 +02:00
Blaz Kristan
e8942c2968 fix for repeating debug message 2022-09-06 15:52:09 +02:00
Blaz Kristan
8e03395b53 New segment bugfix. 2022-09-06 15:47:41 +02:00
Blaz Kristan
4f3de8646a Additional fix for transpose checkbox. 2022-09-06 15:44:41 +02:00
cschwinne
6802f5a802 Fix several small bugs
Fixed no new 2D segments creatable in UI
Fixed brightness not applied if `"on":true` present in the same JSON api call
Fixed CJK text upside down in namelabel (rotate to nicer direction only if no CJK characters)
Gamma correction color enabled by default
2022-09-06 03:06:00 +02:00
Blaz Kristan
3a1ddce13f Return of Supāku. 2022-09-05 19:56:55 +02:00
Blaž Kristan
6c18857109 Fix build. 2022-09-05 19:01:58 +02:00
Blaž Kristan
508b1e76c2 Merge conflict fix. 2022-09-05 18:36:10 +02:00
Blaž Kristan
51d3268eed Merge branch 'dev' of https://github.com/blazoncek/WLED into 0_14
- remove conditional audio compile
- Random Cycle bugfix
- AudioReactive updates
- global gamma flags
2022-09-05 15:13:15 +02:00
cschwinne
a0c90d4ba3 Disable unused characters in fonts
saves 5kB flash
Added 4x6 font
2022-09-05 03:18:59 +02:00
Blaz Kristan
2c27240da6 Remove DISABLE_AUDIO 2022-09-05 00:43:26 +02:00
Blaz Kristan
787f5f06df Global gamma.
Randomcycle palette bugfix.
2022-09-04 20:17:05 +02:00
Frank
7894389f1d Compiling AR usermod on ESP32-S3 (future support)
Encapsulated all parts with #ifdef that will not compile on newer ESP32 variants.
It's still a long way to go before we have a working version on -S3 and -C3, bus this should help to get us started.

From MoonModule/WLED repo.
2022-09-03 19:03:00 +02:00
Frank
da5f6315be fix for repeating debug message 2022-09-03 18:43:28 +02:00
Blaz Kristan
42d1ab8a87 Separator in Info dialog. 2022-09-03 00:01:11 +02:00
Blaz Kristan
cf51892782 Merge branch 'audioreactive-prototype' into dev 2022-09-02 23:36:44 +02:00
Blaž Kristan
cdd4319991
Merge pull request #40 from MoonModules/expand-1DEffects
Drip to virtualStrip
2022-09-02 23:32:45 +02:00
Blaz Kristan
3287eef0f1 Fixed cooling of ignition area. 2022-09-02 23:27:54 +02:00
Blaz Kristan
c4a261f2d2 Minor tweaks. 2022-09-02 21:21:53 +02:00
Ewowi
1867db3c4b VirtualStrip: use indexToVStrip 2022-09-02 20:52:20 +02:00
Ewowi
9e23d52193 Popcorn to virtualStrip 2022-09-02 18:30:23 +02:00
Ewowi
e29be737f7 Drip to virtualstrip correction 2022-09-02 18:14:28 +02:00
Ewowi
3ac4122ec8 fire_2012 to virtualStrip 2022-09-02 17:55:08 +02:00
Ewowi
d56a79e016 Drip to virtualStrip 2022-09-02 17:42:47 +02:00
Frank
77ace76e32 Bugfix: make UDP sound sync work in AP mode
- the connected() method only get called once a Wifi STA connection is established. UDP Sound Sync should also work when sender is in AP Mode.
- added a few comments that should help to understand the code structure.
2022-09-02 13:49:12 +02:00
cschwinne
3270605b4f DDP network bus RGBW support 2022-09-02 03:12:03 +02:00
Blaz Kristan
36e10539e0 Merge branch 'dev' into audioreactive-prototype 2022-09-01 22:20:39 +02:00
Frank
37ba649930 audioreactive effect improvements
- Info Page: add a small horizontal line below usermod specific part. Improves readability.
- updated 2D mapping mode of some  1D soundreactive effects
- alllow some effects to fade slowly, even slower that possible with SEGMENT.fade_out(). Looks nice.

not sure why - most effects only fade when using SEGMENT.fade_out(), while some need SEGMENT.fadeToBlackBy().
2022-09-01 14:56:01 +02:00
Blaz Kristan
586e72e797 Remove pxs/NONUNITY option
Constrains for bitfields.
Bugfixes.
2022-08-31 21:31:59 +02:00
Blaz Kristan
38bd0d6bbb Bugfixes 2022-08-31 21:21:53 +02:00
Blaž Kristan
da0da4c75e Remove NONUNITY
Expand soundSim
Tetrix optimisation
2022-08-31 14:24:02 +02:00
Blaž Kristan
bfe16bb254 Merge branch '0_14' of https://github.com/Aircoookie/WLED into dev 2022-08-31 08:02:11 +02:00
cschwinne
2ada88a266 Small improvements to fx data extraction functions
- Un-F() most segment JSON keys, decreases JSON doc usage by 47 B (increases static RAM usage by 32 B),
makes `extractModeDefaults` work without strstr_P
- Removed String from serializeModeData and serializeModeNames
- Set 0.14 version name "Hoshi"
2022-08-31 04:31:56 +02:00
cschwinne
5b51ce9840 extractModeDefaults(): C strings instead of String 2022-08-31 02:26:26 +02:00
Blaz Kristan
26793c8428 Merge branch 'dev' into audioreactive-prototype 2022-08-30 20:13:25 +02:00
Blaz Kristan
8719adef1e Tetrix vStrip 2D modification.
AA version of Bouncing balls
Better AA
2022-08-30 17:20:58 +02:00
Blaz Kristan
cd7bcb79e5 Tetrix vStrip 2D modification.
AA version of Bouncing balls
Better AA
2022-08-30 17:18:56 +02:00
Blaz Kristan
005419ab9a vStrip calculation
remove Segment copy constructor
2022-08-29 21:51:46 +02:00
Blaz Kristan
d28d2c57e4 Merge 'blazoncek/dev' into 0_14
1-click presets
Bugfix for 1D
virtual strips POC for 1D effects
global SPI MISO pin
2022-08-29 20:45:06 +02:00
Frank
64970772c7 optimization, and moving peak detection into own function
- save 1K of RAM by optimizing out
 fftBin[].
- moved several copies of the peak reset code into a single function
- moved peak detection out of getSample().
 - call peak detection function as last step of FFTcode. More optimal, and we can be sure that fresh FFT result are available.

Peak detection/reset are now called from both tasks, so I had to move some peak-related vars out of AudioReactive class and make them global (static).
2022-08-28 16:26:34 +02:00
Frank
6019b7bda4 GEQ: use full frequency range
also when user wants less than 16 bands.
Previously when users selected fewer bands (like 4 instead of 16), only the lowest freq channels were displayed.
2022-08-28 13:33:48 +02:00
Frank
5c792eb869 some cleanup and re-grouping of variables
- put variables with same context next to each other.
- removed a few vars that are not needed any more.
- replaced "16" by a more descriptive constant
2022-08-28 13:13:25 +02:00
Blaz Kristan
c6126db2a2 Bugfix for 1D setPixelColor
Float vStrips.
Fix misspelled MISOSPI.
2022-08-27 18:25:54 +02:00
Blaz Kristan
030833f942 Global MISO pin.
Virtual strip expansion for 2D.
2022-08-25 21:57:43 +02:00
Blaz Kristan
daf67d9cf7 Whitespace cleanup.
Revert legacy effects to 1D and use mapping instead.
2022-08-24 23:04:51 +02:00
Blaz Kristan
301ed25019 1-Click preset. 2022-08-23 20:57:11 +02:00
Blaz Kristan
a7dbfc4954 Fix for segment on/off transitions.
Fix for missing return.
Slightly smoother Chunchun, added Speed parameter for Hiphotic.
2022-08-23 16:00:50 +02:00
Blaz Kristan
af5e38e5ee Fix for segment on/off transitions.
Fix for missing return.
Slightly smoother Chunchun, added Speed parameter for Hiphotic.
2022-08-23 15:57:05 +02:00
cschwinne
102a28aef4 Release of WLED v0.13.3 2022-08-23 01:26:18 +02:00
Blaz Kristan
d3d8fdff13 Transpose fix. 2022-08-22 22:02:36 +02:00
Blaz Kristan
9cb6f95420 Missing map2D bugfix. 2022-08-22 20:38:23 +02:00
Blaz Kristan
89f334e67b Missing map2D bugfix. 2022-08-22 20:37:47 +02:00
Blaz Kristan
b8b3d17570 Merge remote-tracking branch 'upstream/0_14' into dev 2022-08-22 19:37:17 +02:00
Blaz Kristan
053083f600 Minor optimisation. 2022-08-22 17:06:28 +02:00
Blaz Kristan
cf46564c67 Merge branch 'dev' into audioreactive-prototype 2022-08-22 17:01:51 +02:00
Blaz Kristan
59b038b8c4 Index under- shooting.
Fix for arc 1D to 2D mapping.
UI segment 2D mapping fix.
Watchdog reposition & flicker reduction.
2022-08-22 16:48:19 +02:00
Blaz Kristan
fb6dfcd3fc Index under- shooting.
Fix for arc 1D to 2D mapping.
UI segment 2D mapping fix.
Watchdog reposition & flicker reduction.
2022-08-22 16:47:25 +02:00
Blaž Kristan
1711ac9a88 Fix in is2D()
Horizontal and vertical 1D segment
Index overshoot fix.
2022-08-22 14:35:34 +02:00
Blaž Kristan
e14c5bbd25 Fix in is2D()
Vertical & horizontal 1D segment (on 2D matrix)
Index overshooting fix.
2022-08-22 14:08:45 +02:00
Blaž Kristan
cf0f0d77be Merge branch 'audioreactive-prototype' of https://github.com/blazoncek/WLED into merge-audio 2022-08-22 10:34:10 +02:00
Frank
be7e7ac274 AR: documentation
- clarified a misleading comment in FFTCode
- added a few more comments to describe steps of the processing
- removed some commented-out code
2022-08-22 10:08:22 +02:00
cschwinne
844bef9fda Explicit JSON flag for loading FX defaults
Disable watchdog by default
2022-08-22 01:17:10 +02:00
Blaz Kristan
d56d41a8c2 Merge branch 'dev' into audioreactive-prototype 2022-08-21 20:50:40 +02:00
Blaz Kristan
b722c618bd Fixes in NodeStruct & bus manager. 2022-08-21 20:50:24 +02:00
Blaz Kristan
720fae8720 Code sanitation.
Default analog pin -1
2022-08-21 19:15:42 +02:00
Christian Schwinne
8744b40dc5
Update python dependencies (#2760) 2022-08-21 13:11:35 +02:00
Frank
d053bc562f code cleanup, few optimizations, and fixing more overflows
- code cleanup in audio_reactive.h
- fixing some more under/overflows in fx.cpp
2022-08-21 13:10:16 +02:00
cschwinne
cade1800f4 Update python dependencies 2022-08-21 12:50:52 +02:00
Blaz Kristan
450a0180f8 Merge branch 'dev' into audioreactive-prototype 2022-08-21 09:54:33 +02:00
Blaz Kristan
ea363a8764 Minor cleanup & fix for connected(). 2022-08-21 09:51:15 +02:00
Frank
bbc8049832 The Right Thing to Do (makes GEQ look awesome)
... found that stupid commit messages get more attention ;-)

- use 22050 Hz for sampling, as it is a standard frequency. I think this is the best choise.
- redesigned the GEQ channels (fftResult[]) for 22Khz, based on channels found on old HiFi equalizer equipment. 1Kzh is now at the center; Bass/Trebble channels are using 1/4 on left/right side respectively - similar to real equalizers. Looks nice :-)

- adjusted effects that use FFT_MajorPeak so that the maximum frequency is supported.
2022-08-20 22:14:54 +02:00
Blaz Kristan
66acd60406 PWM Fan usermod UI enhancement. 2022-08-19 21:38:48 +02:00
Blaz Kristan
6fd8a5a084 Replace setOption/getOption 2022-08-19 21:37:26 +02:00
Blaz Kristan
5927332a5f UI enhancement in PWM Fan usermod. 2022-08-19 21:25:44 +02:00
Blaz Kristan
44a4b11d36 Replace setOption/getOption 2022-08-19 21:14:49 +02:00
Frank
b8db47e528 AR: new freq scaling option "square root"
also looks nice. It's a compromise between log() and linear. OK enough tinkering for today :-)
2022-08-19 16:11:50 +02:00
Blaz Kristan
f7652bd2ef Fix audio sync check 2022-08-19 15:17:04 +02:00
Blaz Kristan
e9f6509cb0 Merge branch 'segment-api' into dev 2022-08-19 15:14:56 +02:00
Frank
3c57e2e2b9 AR: special gain for GEO, some bugfixes andparameter tinkering
- new feature: "Input Level" (info page) can be used as global "GEQ gain" - only when AGC is ON (was already possible when AGC=off)

- some parameter tweaking in FFT function
- hidden feature: FFT decay  is slower when setting a high "dynamics Limiter Fall time" (steps: <1000, <2000, <3000, >3000)

- FFT_MajorPeak default 1.0f (as log(0.0) is invalid)
- FX.cppp: ensure that fftResult[] is always used inside array bounds
2022-08-19 14:36:47 +02:00
Blaz Kristan
753ae51dd5 Stop & restart UDP on pause/update. 2022-08-18 20:42:58 +02:00
Christian Schwinne
638178556f
Merge pull request #2737 from blazoncek/segment-api
Full blazoncek fork merge, including 2D support
2022-08-18 20:13:43 +02:00
Christian Schwinne
b44ed70112
Merge branch 'main' into segment-api 2022-08-18 20:13:02 +02:00
Frank
3e494cc551 removed broken frequency squelch, added frequency scaling options
- removed broken FFTResult "squelch" feature. It was completely broken, and caused flashes in GEQ.
- added Frequency scaling options: linear and logarithmic
- fixed a few numerical accidents in FX.cpp (bouncing_balls,  ripplepeak, freqmap, gravfreq, waterfall)
2022-08-18 19:07:37 +02:00
Blaz Kristan
fa55896722 Const functions. 2022-08-17 20:45:30 +02:00
Blaz Kristan
67a51be9ee Merge branch 'audioreactive-prototype' into merge-audio 2022-08-17 20:14:11 +02:00
Blaz Kristan
2149bbb8ea Remove CS from global interface pins.
Fixes.
2022-08-17 19:44:32 +02:00
Frank
d92a93f1d5 AR: added dynamics limiter usermod cfg options
- On/Off controls the complete feature
- Rise Time and Fall Time are the minimum times (in milliseconds) for "volume" to go from 0% to 80% and back.
- when "On" we also use some filtering to smooth FFTResults[]. Rise and Fall Times do not affect Frequency reactive effects otherwise.
2022-08-17 13:40:54 +02:00
Frank
991fad02d7 fixed look of some 1D effects
- fade_out() appears to finally do something meaning. Old fade_out values were too high. Adjusted so effects in 1D look similar "classic" SR WLED
- frequency reactive effects: max FFT frequency of 5120 Hz is hard-coded in most effects. Updated ranges to 10240 Hz
2022-08-17 13:17:00 +02:00
Blaž Kristan
7497e43fb9 Merge branch 'master' into dev 2022-08-17 07:20:18 +02:00
Frank
1336de12a0 Info Page: added status info for audioreactive
- Current sound source - including "failed to initialize"
- Current AGC or Manual Gain
- Sound Sync Status
2022-08-17 00:15:06 +02:00
Blaz Kristan
0f78bd3785 PWM fan manual speed override. 2022-08-16 20:57:24 +02:00
Blaz Kristan
90b567c721 Merge branch 'lpd6803' into segment-api 2022-08-16 20:48:51 +02:00
Blaz Kristan
8176f1141e Merge branch 'Sousanator-master'
Added LPD6803 chip support.
2022-08-16 20:35:57 +02:00
Blaz Kristan
515827c745 Merge branch 'master' of https://github.com/Sousanator/WLED into Sousanator-master 2022-08-16 20:35:17 +02:00
Frank
1a2701561b AR: bugfix for audio sync receive, and a few robustness improvements
* Header checking for sound sync receiver: removed wrong "!"
* make sure all member vars have initial values
* some robustness improvements in case of receiving bad UDP data.
2022-08-16 12:02:22 +02:00
Blaž Kristan
c7d3ee0612 Fix "washed out" noise FX. 2022-08-16 10:08:19 +02:00
Blaž Kristan
4be3cb4b0d Merge branch 'TM1829' of https://github.com/h3ndrik/WLED into lpd6803 2022-08-16 08:42:47 +02:00
Blaž Kristan
db759bef46 Merge branch 'master' of https://github.com/Sousanator/WLED into lpd6803 2022-08-16 08:14:56 +02:00
Blaž Kristan
3d47a8e9c0 Merge branch 'master' into dev 2022-08-16 07:52:33 +02:00
Frank
91fe80334b Merge remote-tracking branch 'origin/segment-api' into audioreactive-prototype 2022-08-15 21:33:30 +02:00
Blaz Kristan
7125d19af1 Bugfix for saving usermod settings.
Modification of global interface pin allocation.
Code relocation in 4LD.
2022-08-15 20:23:47 +02:00
Frank
873e41dcfb AR: change smoothing of FFTResult
FFTResult smoothing changed; rising edges will be very quick, falling down is slower.
2022-08-15 14:28:51 +02:00
cschwinne
420f858d9b Release of WLED v0.13.2 2022-08-15 02:08:48 +02:00
Blaz Kristan
e6f74751d4 Missing presets bugfix. 2022-08-14 22:16:42 +02:00
Frank
5a4713950c improved ADCsample processing (from SR WLED)
improved ADCsample processing,  including replacement of "rogue" samples from other channels (this happens at least once in 5 seconds !!).

It compiles, don't ship it yet - needs more testing.
2022-08-14 16:17:34 +02:00
Frank
c6691564a5 removing dead code from getSamples() 2022-08-14 14:47:03 +02:00
Frank
8acb44b202 small improvement for limitSampleDynamics
support the case when only attackTime XOR decayTime is defined
2022-08-14 14:38:27 +02:00
Frank
72770e5809 Merge remote-tracking branch 'origin/segment-api' into audioreactive-prototype 2022-08-14 14:19:57 +02:00
Frank
968721a515 some audio processing improvements and bugfixes from SR WLED
- smoothing FFTResult (don't have a matrix to test)
- UDP sound sync improvements
- some bugfixes from SR WLED
- button.cpp: avoid starvation: strip.isUpdating() can be true for a long time.

work in progress - still needs testing!!
2022-08-14 13:58:07 +02:00
Blaz Kristan
1de009a80d I2C & SPI fixes. Global interface. 2022-08-14 13:05:59 +02:00
Blaz Kristan
74b6a78a9b Effect fixes. 2022-08-13 00:58:27 +02:00
Blaz Kristan
32fc6d4b7f Binary effect parameters. 2022-08-12 17:58:20 +02:00
Blaž Kristan
d05b49496c Merge branch 'segment-api' into audioreactive-prototype 2022-08-11 13:24:01 +02:00
Blaž Kristan
52e5f467b0 Added two more fonts to Scrolling text. 2022-08-11 11:46:30 +02:00
Blaž Kristan
4e0cf380be Fix for 0 duration/reset runtime. 2022-08-11 11:23:39 +02:00
Blaz Kristan
ebe9499e97 Deallocate interface pins. 2022-08-10 21:23:00 +02:00
Blaz Kristan
1cb3ab82c2 Reduction of flicering on web access (info) 2022-08-10 20:53:11 +02:00
Blaz Kristan
e0a954caa2 4LD refresh task.
Scrolling text improvement.
LED settings bugfix.
Audioreactive disabled by default.
2022-08-10 20:20:36 +02:00
Frank
ecce3243de save 1KB of RAM
save one KB (4*256 bytes) by not storing the "upper half" of FFT results. Only the lower half has interesting results.
2022-08-10 18:14:28 +02:00
Frank
5e6532959b AudioSource improvements (work in progress)
-new methods: getType(), isInitailized(), postProcessSample()
- allow users to compile for RIGHT audio channel (-D I2S_USE_RIGHT_CHANNEL)
- better handling in case audio input driver failed to initialize
- removed some unneeded code and unneeded parameters
2022-08-10 17:18:43 +02:00
Blaž Kristan
d8b7cfb36b Display task (background refresh) in 4LD 2022-08-10 14:00:04 +02:00
Blaž Kristan
b2837563c4 Merge branch 'segment-api' into global-interface 2022-08-10 09:32:43 +02:00
Blaz Kristan
957948f906 Code optimisations in effects.
Remove Wire initialisation from RTC.
Peek fix.
2022-08-09 21:14:37 +02:00
cschwinne
7befafe7b7 Enable numbers and symbols in text FX
Shorten `Reserved` to `RSVD`
2022-08-09 18:09:43 +02:00
cschwinne
436ce63e30 FX list duplicate cleanup
Minor optimizations
2022-08-09 15:20:00 +02:00
Blaz Kristan
0268beb9c2 Merge branch 'segment-api' into global-interface 2022-08-08 20:22:11 +02:00
Blaz Kristan
6a42e477aa Empty name Scrolling tex bugfix. 2022-08-08 19:56:09 +02:00
Blaz Kristan
22bc3dac2d Tetrix with fade-out. 2022-08-08 17:52:20 +02:00
Blaz Kristan
4db4329ce3 Proper fix for {"on":"t","bri":100} 2022-08-08 15:56:15 +02:00
Frank
924073424f AR FFT task optimization - wait so I2S can fill its buffers
It seems that waiting first (before reading I2S) is much better than waiting after FFT is completed.
2022-08-08 13:53:46 +02:00
Blaž Kristan
9e828eccf6 Fix for {on:"t",bri:100} 2022-08-08 13:36:13 +02:00
Frank
3a8c99d43c AR: removed two unneeded variables
some cleanup - no functional impact.
2022-08-08 10:51:46 +02:00
Blaž Kristan
acb17dc575 Fix addEffect() 2022-08-08 10:21:11 +02:00
Frank
58987989da experimetal: limit rate at which the FFT task runs
this should do the trick.
Needs some more testing.
2022-08-07 22:19:38 +02:00
Frank
86e8ee334f future support: reading a single sample on 8266
audioreactive will still not work on 8266. This is just experimental code that allows to read a single sample from ADC every 20 millis.
2022-08-07 22:04:26 +02:00
Blaz Kristan
998f2f9421 Global I2C & SPI pin allocation. 2022-08-07 16:43:29 +02:00
Frank
8694e7a6bf AR: loop hickup protection (from SR WLED)
same "hickup protection" as implemented in SR WLED.
2022-08-06 18:17:45 +02:00
Frank
b46a6ed094 AR: samples dynamics limiter (experimental)
to enable, compile with -D SOUND_DYNAMICS_LIMITER.
still missing UI integration, and more testing.
2022-08-06 17:53:35 +02:00
Frank
d0f53cb14a AR: removing some old debug code
Align with SR WLED code:
- removed old debug code that did not work any more
- removed experimental MAJORPEAK_SUPPRESS_NOISE code
2022-08-06 17:24:39 +02:00
Frank
96d497a5cd AR: optimize sound sync, and code improvements
UDP audio sync: introduced new header version, because the new struct (without myvals[]) is not compatible with the previous struct. Also optimized structure size.
UDP audio sync: sender decides is AGC or non-AGC samples are transmitted.
getsamples: move volumeSmth/volumeRaw code out of AGC core function.
2022-08-06 16:48:26 +02:00
Blaz Kristan
a8785570df Memory allocation fixes.
Whitespace.
Cleanup.
2022-08-06 12:39:12 +02:00
Ewowi
aa36e04250 Deoptimize lv2D a bit to keep resize working ;-) 2022-08-06 11:53:01 +02:00
Ewowi
821b7ed9af Optimize liveviewsws2D 2022-08-06 11:37:48 +02:00
Blaz Kristan
9270f80af2 Merge branch 'integration' into merge-audio 2022-08-05 23:03:38 +02:00
Blaz Kristan
eb8710df81 Merge branch 'audioreactive-prototype' into segment-api 2022-08-05 16:29:32 +02:00
Blaz Kristan
095099a085 Rename WLED_NO_AUDIO 2022-08-05 15:54:48 +02:00
cschwinne
ad424cac18 Preset and config backups include server description 2022-08-05 12:09:13 +02:00
Blaz Kristan
4e11806d00 Code optimisations. 2022-08-04 16:15:49 +02:00
Blaz Kristan
f45082b764 Crash fix for ESP8266 if mode contains ! 2022-08-03 22:27:45 +02:00
Blaz Kristan
cdca715afc Effect change at end of transition.
Compile bugfix.
2022-08-03 22:09:27 +02:00
Blaz Kristan
d0a08a55d1 Memory management! 2022-08-03 21:36:47 +02:00
Blaž Kristan
c5f3e76b21 Compile optimisations, code reduction.
2D peek resize.
2022-08-03 14:23:24 +02:00
Blaz Kristan
f58ff68f3c Center liveview2D, code size reduction. 2022-08-02 22:50:01 +02:00
ewowi
a098aa0a89 leds array from CRGB to uint32_t 2022-08-02 22:06:13 +02:00
ewowi
7b3fc206f7 Merge leftovers 2022-08-02 21:52:10 +02:00
Blaz Kristan
8f5d2a7f00 Merge branch 'mapping12soundsim' into segment-api 2022-08-02 21:47:24 +02:00
ewowi
44c585e8c8 Merge branch 'ledsArrayToSGPC' into integration 2022-08-02 21:12:59 +02:00
ewowi
640f45f57d Remove leds array from utility functions + small things
- Remove CRGB* leds from utility functions
- GameOfLife: fill_solid for prevLeds to for loop
- Remove if !fftResult
- Funky Plank: toggle src and dst
- Comment drawLine as not used
- Duplicate FadeToBlack, call one FadeToBlackOld
2022-08-02 19:44:27 +02:00
Blaz Kristan
0ba8bace0d 2D optimisations. 2022-08-02 18:27:32 +02:00
ewowi
4202fb8cdc Small things
- Remove leds[] in comments
- freqmatrix default mapping to circle
- t_bri compile error
2022-08-02 18:05:55 +02:00
ewowi
5f8b8835e1 Leds removal leftovers
- Remove leds from 1D SEGMENT.data effects
- Noisefire: re-establish own palette
- FreqMatrix to circle mapping
2022-08-02 12:58:35 +02:00
ewowi
78edcfe5cf Merge branch 'ledsArrayToSGPC' into integration 2022-08-02 12:21:46 +02:00
ewowi
2ca5e0c8b8 Remove leds from FX.cpp
- add addPixelColor overloads
- remove setPixels function
- sPC/gPC move leds check to beginning
- refactor wu_pixel work without leds
- remove leds out of effects and replace by sPC/gPC/aPC/nullptr
- workaround %=
- refactor game of life (but need to check patterns / history, see SR)
- refactor fill_circle to work without leds
2022-08-02 12:19:04 +02:00
Blaz Kristan
7ca1d99412 Multiple additions:
- transparent leds[] for getPixelColor()
- sample 2D Black Hole for trnasparent leds[]
- conditional audio compile (WLED_NO_AUDIO)

Bugfix:
- effect filtering
2022-08-01 22:01:24 +02:00
Blaz Kristan
118bcbd6a6 Effect filter patterns. 2022-08-01 17:32:40 +02:00
ewowi
987b442796 Merge branch 'ledsArrayToSGPC' into integrationMergeOnly 2022-08-01 16:25:51 +02:00
ewowi
8ea77ccd04 Merge branch 'segment-api' into integrationMergeOnly 2022-08-01 16:17:16 +02:00
ewowi
004c2920f5 All effects use strip.leds, refactor XY
- remove leds out of SEGMENT.data (remove if no other use of data)
- use strip.leds
- refactor XY to make segment relative to the whole matrix
- use RGBW32
- in case of 1D also use XY in leds[]: XY(i%width, i/width)]
- add ps_malloc
2022-08-01 16:11:59 +02:00
Blaz Kristan
f02616acd1 Some fixes. 2022-07-31 19:52:07 +02:00
ewowi
69f9a484ca strip.leds array fully fastLed and segment compatible
- leds array from uint32_t to CRGB for fastled compatibility
- reading and writing leds from strip to segment sPC/gPC so it has logical instead of physical indexes so it can be used in effects
- change mode_2DBlackHole as showcase how it can both work with leds or with sPC/gPC
2022-07-31 14:48:00 +02:00
Blaz Kristan
dde5367560 Default palette gamma fix.
Reverted to leds[] in SR effects.
Code optimisations.
2022-07-31 13:28:12 +02:00
ewowi
66da57f375 POC to use leds array in strip.set/getPixelColor 2022-07-31 12:38:10 +02:00
Blaz Kristan
d328db543e Bugfixes.
- gamma on *Color palettes
- gamma moved out of WS2812FX
- palette fade (JSON) fix
2022-07-30 23:58:29 +02:00
ewowi
c2c46f2843 Merge remote-tracking branch 'origin/segment-api' into LatestAndGreatest 2022-07-30 21:28:38 +02:00
Blaz Kristan
96da48ae82 1D mapping bugfix. 2022-07-30 15:03:06 +02:00
Blaz Kristan
eb9eda1f6d Transition struct (reduced RAM footprint). 2022-07-30 14:50:11 +02:00
Blaz Kristan
f16558c126 Optimisations. 2022-07-30 14:20:36 +02:00
Blaz Kristan
1abf0fc134 Deprecate EEPROM support (compile time option). 2022-07-30 11:04:04 +02:00
Blaz Kristan
b0ba1b2ecc Bugfix.
- defult transitions
- conditional 2D compile
2022-07-30 10:49:54 +02:00
ewowi
a70717f2f7 ssim2=ssim1 and ssim1=ssim0 (because off=0 is removed) 2022-07-29 23:30:23 +02:00
Blaz Kristan
5dec73f27c Merge branch 'mapping12soundsim' into live-merge 2022-07-29 22:59:00 +02:00
Blaz Kristan
92ac87fa3f Correction for conflict resolution. 2022-07-29 22:38:08 +02:00
Blaz Kristan
267239e3f2 Merge branch 'segment-api' into audioreactive-prototype 2022-07-29 22:29:15 +02:00
Blaz Kristan
52b863fe36 Memory allocation bugfix. 2022-07-29 20:24:29 +02:00
Blaz Kristan
79337a4568 Bugfix for palette transitions. 2022-07-29 16:26:15 +02:00
ewowi
84750e2605 Refactor um_data: remove fftBin 2022-07-29 15:50:09 +02:00
ewowi
dfa1a3ad90 Refactor um_data: remove inputLevel 2022-07-29 15:43:27 +02:00
ewowi
c1f9445e9d Refactor um_data variables for audio reactive
- change sample to sampleRaw
- add volumeSmth, volumeRaw, my_magnitude and calculate in agcAvg
- remove sampleAvg, soundAgc, sampleAgc, sampleRaw, rawSampleAgc, FFT_Magnitude, multAgc, sampleReal, sampleGain, (myVals), soundSquelch from um_data interface
- refactor all effects using above variables
2022-07-29 15:24:04 +02:00
Blaž Kristan
191db46c4f Code optimisation & cleanup.
Minor fixes.
2022-07-29 12:15:56 +02:00
ewowi
bc67bf6826 Replace myVals from audio_reactive.h to SEGMENT.data
(position in um_data reserved as free, could be cleaned up later)
2022-07-29 10:04:10 +02:00
Blaz Kristan
df534d30bf Custom palettes. 2022-07-28 23:19:58 +02:00
ewowi
ce99dbe40c liveview2D: only if isMatrix 2022-07-28 16:35:57 +02:00
ewowi
affcca8034 Improve liveview2D: add width and height > 256 leds 2022-07-28 16:13:31 +02:00
Blaz Kristan
a6f31a577a Merge branch 'segment-api' into audioreactive-prototype 2022-07-27 21:35:29 +02:00
Blaz Kristan
9b814f4ed8 Shadows and hides. 2022-07-27 21:12:27 +02:00
Blaz Kristan
3091440162 Reposition Scanner Dual FX. 2022-07-27 17:04:09 +02:00
Blaz Kristan
3b2573afed More filtering options.
Palette loading bugfix.
2022-07-27 17:00:55 +02:00
Blaz Kristan
1b64747c2b Quick effect filter. 2022-07-27 00:11:24 +02:00
ewowi
863212915c Revert "Merge branch 'segment-api' into origin/mapping12soundsim"
This reverts commit 8ef82ebdd792ff53902cb0eed0b6fa3c89e5da04.
2022-07-26 11:23:51 +02:00
ewowi
8ef82ebdd7 Merge branch 'segment-api' into origin/mapping12soundsim 2022-07-26 11:08:26 +02:00
Blaz Kristan
78aad924c5 Bugfixes.
- moved simulateSound() to util
- effect fixes (name changes)
- mapping fixes
- default values fixes
- UI fixes
2022-07-25 21:31:50 +02:00
Blaž Kristan
24fda89665 Defaults cleanup. 2022-07-25 14:36:54 +02:00
Blaž Kristan
59cb9ba344 Revert 2D peek 2022-07-25 11:47:19 +02:00
ewowi
d511eb19ef Update with latest html_ui.h 2022-07-24 17:20:38 +02:00
ewowi
d3e9f51d6b Merge remote-tracking branch 'origin/segment-api' into segment-api 2022-07-24 17:13:13 +02:00
ewowi
e3499e5a70 Add 2D liveview (Peek 2D) - Beta version 2022-07-24 17:10:29 +02:00
Blaz Kristan
026425407e Adde more default options.
UI bugfix.
2022-07-24 16:21:29 +02:00
Blaz Kristan
18884111a6 Scrolling text center & letter M 2022-07-23 22:56:33 +02:00
Blaz Kristan
3e5b152718 Fix for palette defaults. 2022-07-23 22:38:35 +02:00
Blaz Kristan
8e9637f6d4 Default effect values. 2022-07-23 22:00:19 +02:00
Blaz Kristan
d11ad39048 Starburst fix. 2022-07-22 15:27:48 +02:00
Blaz Kristan
cb44d45eeb Merge branch 'dev' into segment-api 2022-07-22 14:41:39 +02:00
Blaz Kristan
c15ffca48c Merge branch 'master' into master-merge 2022-07-22 14:34:02 +02:00
Blaž Kristan
902c11d074
Merge pull request #2657 from poelzi/watchdog
Enable ESP watchdog by default
2022-07-22 09:26:46 +02:00
Blaž Kristan
35250677b9 Prevent I2S use for LEDs w/ Audioreactive on ESP32 2022-07-22 08:59:04 +02:00
Blaz Kristan
1f3a1a0a95 Stuck effect fix. 2022-07-21 20:18:48 +02:00
Blaž Kristan
38330b735c
Merge pull request #2723 from albarlow/BME280-Enhancements
BME280 Usermod Enhancements
2022-07-21 18:42:19 +02:00
Blaz Kristan
bda3c4ab7a Minor optimisations. 2022-07-21 18:38:07 +02:00
Blaz Kristan
d8d01ac353 Merge branch 'BME280-Enhancements' of https://github.com/albarlow/WLED into BME280-Enhancements 2022-07-21 18:37:17 +02:00
dependabot[bot]
51d935f419
Bump terser from 4.8.0 to 4.8.1 (#2726)
Bumps [terser](https://github.com/terser/terser) from 4.8.0 to 4.8.1.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/commits)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-21 11:24:54 +02:00
albarlow
c96f83b076 Registered Usermod and Pins
Implemented PinManager and rerun setup of usermod after updating pins/

Registered in const.h and pin_manager.h   I tried to follow the existing formatting/numbering in these files.

Wrapped any strings I could in F()
2022-07-21 09:48:37 +01:00
Blaž Kristan
2fe4edb6df Segment clear bugfix.
getPixelColor fix.
2022-07-21 07:24:03 +02:00
albarlow
7308f5993c Added changelog 2022-07-20 22:53:45 +01:00
Blaz Kristan
1e4f8be74b Merge branch 'mapping12soundsim' into segment-api 2022-07-20 21:22:23 +02:00
albarlow
22ac12dc36 Remove compile-time variables and revamp readme.md 2022-07-20 13:06:27 +01:00
albarlow
866296fefd Update usermod bme280 rounding
Apply rounding per usermod settings
2022-07-19 22:15:26 +01:00
albarlow
9d574397bc usermod bme280
Added public variables to the BME280 usermod based on those in the Temperature usermod.  Only complication is that this usermod utilises different function calls depending on whether user defines celsius or not.  I have handled this for the temperature, but the Dew Point and Heat Index are relative to the temperature.

I've also addressed some areas where I'd previously assumed Celsius for reporting purposes as my test case is using Farenheit.
2022-07-19 21:47:56 +01:00
Blaz Kristan
b6e53b1a0c Minor bugfix and for loop optimization. 2022-07-19 22:14:46 +02:00
Blaz Kristan
a46894f395 Bugfixes. 2022-07-19 16:16:43 +02:00
albarlow
bee48dae7e Update readme 2022-07-19 14:52:39 +01:00
albarlow
e12f7b67e5 Usermod BME280 Enhancements
I added a Usermod interface for key settings.  I used a PinArray for the SDA/SCL pins, but you can't name these individually.

I have also made a display to show the temperature/humidity values in the web interface's Info screen.

I had to change the definition of those items in order to allow these new functions to work.  I have not noticed any negative side effects to this change.

At the moment, I've not figured out how to make Celsius/Farenheit toggleable due to the way the #define setup works.

Finally, I have added a routine to publish MQTT Discovery Topics for Home Assistant (toggleable in the Usermod screen).

I've been testing this on the only suitable device I have for a few months and haven't noticed any problems.
2022-07-19 14:52:10 +01:00
ewowi
c7ceeb1833 Tuning leftovers 2022-07-17 17:38:20 +02:00
ewowi
12f6ed621e Tuning of soundsim and mapping12 2022-07-17 17:17:51 +02:00
Blaz Kristan
d7daada42e Merge branch 'master' into dev 2022-07-17 16:18:44 +02:00
Blaz Kristan
6c6849d8d7 Vectors & dynamic loadJS.
- Segments
- Modes

NOTE: crashes ESP if effect is running while deleting segment.
2022-07-17 15:58:41 +02:00
ewowi
e82336f355 Small bugfixes 2022-07-14 17:22:37 +02:00
Blaž Kristan
1151b615a0 Fix for SEGLEN 2022-07-14 13:47:30 +02:00
Blaž Kristan
0cf891b9d9 Optimisations 2022-07-14 13:22:34 +02:00
ewowi
aeb8fd6fda make getPixelColor matrix (mapping) aware
And change some mapping defaults of effects useing getPixelColor
2022-07-13 15:40:40 +02:00
ewowi
615f807909 Regenerate html_ui.h 2022-07-13 12:45:23 +02:00
ewowi
985255afed Merge remote-tracking branch 'origin/segment-api' into mapping12soundsim 2022-07-13 12:44:43 +02:00
ewowi
9bec394d7f Add mapping12 and soundsim defaults to effects and apply in segment ui
index.js: rename setSliderAndColorControl to setEffectParameters, rename extras to effectPars, add segment variable update code
FX.cpp: add map12 and ssim defaults to data_FX_MODE variables (WIP)
FX_fcn.cpp: add return in setPixelColor for 2D
2022-07-13 12:41:33 +02:00
Blaz Kristan
8f72e0ab83 Reload presets on save. 2022-07-12 21:09:10 +02:00
ewowi
6799a3bd35 Merge remote-tracking branch 'origin/segment-api' into mapping12soundsim 2022-07-12 20:04:44 +02:00
Blaz Kristan
588c7a81fc Fix for transitions. 2022-07-12 18:10:07 +02:00
Frank
ce32ac19dd AR: better default values
gain =1 does not make much senses, at it means "0.0825"; 40 internally translates to "1". 60 seems to be a good start.
- Don't use ADC analog microphone as default, to avoid well-known conflicts with other stuff hooked up onto ADC1,
- re-enabled a forgotten delay (overlooked that in my last commit)
2022-07-11 14:30:03 +02:00
ewowi
16aa0e4dba Resolve compile fail 2022-07-11 11:39:56 +02:00
ewowi
81cb765b7a Finish merge by adding the mapping12 code to setPixelColor 2022-07-11 11:20:30 +02:00
ewowi
d5523615ef Merge branch 'refactor-ws2812fx' into mapping12soundsim 2022-07-11 11:05:49 +02:00
Frank
ff5d899a92 AR: gracefull suspend when under external control
- same fix as in SR-WLED upstream
- if strip.isupdating() is true for more than 12ms, run audio filter loop regardlessly. The userloop is very fast, so I'm expect no bad side-effects from this.
2022-07-10 22:47:42 +02:00
Blaz Kristan
d9f2c2b968 Segment API
- moved all drawing logic to segment
- moved transitions to segment
Conditional 2D compile.
Rearranged effect IDs.
Implemented dynamic effect arrays.
2022-07-10 22:23:25 +02:00
ewowi
2f6adbd07c Add Mapping 1D to 2D. Mapping12 and sound simulation effect independent
- add to segment: mapping 1D2D and Sound Simulation (WIP!)
- Add sound simulation WeWillRockYou
- All audio effects use segment soundSim
- Redefine SEGLEN: strip.getMappingLength (depending on mapping12)
- make setPixelColor aware of mapping12
2022-07-10 14:30:10 +02:00
Blaz Kristan
f0992d56c1 Added global I2C & SPI HW pin defines
Fixed default values fo custom sliders.
Fix for color selector.
Changed fading for 2D GEQ
Audioreactive fix send/receive option
2022-07-07 23:07:20 +02:00
Frank
67bcf42125
audioreactive: typo
oops.
2022-07-07 19:29:36 +02:00
Frank
935ddd12ec audioreactive: allow compiling with newer IDF versions
same as my last patch in original WLED-SR
2022-07-07 19:27:22 +02:00
ewowi
5a772f5410 add simulateSound to sound effects (wip) 2022-07-07 12:48:41 +02:00
Blaz Kristan
698a32f364 Cleanup effects. 2022-07-06 20:41:12 +02:00
Blaz Kristan
bdea2acf67 Correctly position #defines 2022-07-06 19:49:55 +02:00
Blaz Kristan
377a11b160 Fix for enable/disable FFT task. 2022-07-06 19:46:32 +02:00
Blaz Kristan
9519c8edbd Fix disbling AudioReactive usermod
Reduce IRAM pressure for ESP8266
2022-07-06 19:42:48 +02:00
Blaz Kristan
64fd207533 Refactoring WS2812FX class.
- effect functions no longer part of class
- methods to access private members
- separate Segment, Segment_runtime, ColorTransition from WS2812FX
2022-07-06 13:13:54 +02:00
Frank
96e04f1c54 AR: option to use new (template-based) ArduinoFFT
Additonal build_flags: -D UM_AUDIOREACTIVE_USE_NEW_FFT
Additional lib_deps: https://github.com/kosme/arduinoFFT#develop @ 1.9.2
2022-07-04 17:09:20 +02:00
Blaz Kristan
348c4b4431 Fix for 2D peek. 2022-07-04 14:13:17 +02:00
Frank
bfbff723ac AR: use more accurate timer for benchmarking
use  esp_timer_get_time() because it is more accurate. Actually I don't trust millis() so much ;-)
2022-07-04 13:58:25 +02:00
Frank
03dba4d7d0 restoring a few doubles
a few doubles are currently necessary, due to high speed of the control loops (see discord discussion).
2022-07-04 12:34:32 +02:00
Blaz Kristan
febd7cbca8 Enable Peek for 2D. 2022-07-04 11:12:55 +02:00
Blaz Kristan
e2b7b228c5 Compile fix.
Use virtualLength() in getPixelColor()
2022-07-04 10:30:49 +02:00
Blaz Kristan
8b58d96aea Float variables instead of double. 2022-07-03 23:00:32 +02:00
Blaz Kristan
0a2e01a616 Multiple changes:
- change arduinoFFT to float (custom)
- update audioreactive to use float
- update effects to use float
- info slider (usermod)
- hide Peek in 2D
- minor bugfixes
2022-07-03 22:55:37 +02:00
Blaz Kristan
a8908238d5 Prevent race condition when saving bus config.
(loop() is executed on different core than handleSet())
2022-07-02 14:28:09 +02:00
Blaz Kristan
569138ac80 Bugfix saving LED config (race condition) 2022-07-01 14:10:32 +02:00
Blaz Kristan
cf3faa1170 Merge branch 'audioreactive-prototype' into 2D-support 2022-06-29 16:30:50 +02:00
Blaz Kristan
ae50374d55 Prevent analog button from working.
If analog input selected.
2022-06-29 14:12:07 +02:00
Blaz Kristan
d2705f033d Enhance API
- addPixelColorXY()
- fadeToBlackBy()
2022-06-28 23:32:29 +02:00
Blaz Kristan
5d12e2291c Bugfix in getPixelColorXY() 2022-06-28 23:01:52 +02:00
Blaz Kristan
cd46d84dcb Shuffle tooltips. 2022-06-28 12:36:23 +02:00
Blaz Kristan
a3b0b8b3d0 Change on/off button for Sataicase usermod. 2022-06-28 12:33:00 +02:00
Blaz Kristan
4c60a70c6f Slider div change.
Effect data bugfix.
2022-06-27 22:46:36 +02:00
Blaz Kristan
a75b3a53aa Use getModeCount() instead of MODE_COUNT
Clear strip if spacing changes.
Rewrite 2DGEQ.
2022-06-26 23:01:22 +02:00
Blaz Kristan
94a79b57e9 Tooltips for effect sliders. 2022-06-26 22:47:16 +02:00
Blaz Kristan
dbe90eb3f5 Minor UI fixes. 2022-06-23 21:00:12 +02:00
Blaz Kristan
3891348c26 Multiple fixes.
- anti-aliasing fix
- minor UI CSS fix
- dynamic JS loading (2D & UM)
- 2D Lissajous fix
2022-06-23 17:42:02 +02:00
Blaz Kristan
84106d6282 Merge branch 'dev' into audioreactive-prototype 2022-06-22 18:04:40 +02:00
Blaz Kristan
37395931bf Merge branch 'master' into master-merge 2022-06-22 16:11:09 +02:00
Blaz Kristan
88e487be8e Fix for Colortwinkles. 2022-06-22 16:08:14 +02:00
Blaž Kristan
fd4c0e795a
Merge pull request #2693 from softhack007/analogread_smoothing_fix_2587
noise filter for potentiometer reading - fix for issue #2587
2022-06-22 13:20:16 +02:00
Frank
c79eb43347 disabled second check for strip.isUpdating()
commented out the second `strip.isUpdating()` check, because it should not be neccesary; Strip.service() is called after handleIO()/handleButton().
2022-06-22 12:36:47 +02:00
Blaž Kristan
860e74bffa Comment & float constant. 2022-06-22 09:58:21 +02:00
Blaz Kristan
4c759083be Multiple changes.
Added:
- introduced addEffect() and setupEffectData()
- conditional compile for audio effects
- introduced getModeData() and getModeDataSrc() instead of public var
- changed _modeData[] to private non-static

Fixes:
- DMTYPE use
- add reboot info to DMTYPE
- transpose & reverse with mirroring
2022-06-21 22:49:45 +02:00
Blaz Kristan
d3bb079be4 Muliple enhancements:
- Smarter on/off buttons in Info panel (usermods)
- On/Off bus in bus_manager
- 2D GEQ fix (2D CenterBars obsolete)
- hide unused palettes & modes
2022-06-20 22:17:01 +02:00
Frank
ed374684a6 Update button.cpp
overlooked one
2022-06-20 22:00:23 +02:00
Frank
169a46c38c button.cpp: marked literal constant as "float! 2022-06-20 21:56:16 +02:00
Frank
1dbea434a3 fix for issue #2587 2022-06-20 16:04:43 +02:00
Hendrik Langer
a5b4d7a244 add TM1829 support 2022-06-20 15:03:17 +02:00
Blaz Kristan
7ebb58b1fa Code shuffling (making bugs) 2022-06-19 19:15:34 +02:00
Blaz Kristan
ac5b3110f2 Code cleanup (reduced globals). 2022-06-18 12:57:54 +02:00
Blaz Kristan
48259b4ffe Reorganised exchange array.
Updated effects to reflect reorganisation.
Provide feedback to UI for maxVol and binNum.
2022-06-18 12:36:10 +02:00
Blaz Kristan
041426fecb Scrolling text selectable font. 2022-06-17 21:19:12 +02:00
Blaz Kristan
2caf7efdc6 Added date & time support for scrolling text. 2022-06-17 19:09:44 +02:00
Blaz Kristan
b00e038b33 Enhancement in effect functions.
- added color_add()
- fixed AA setPixelColor()
- added fadeToBlackBy() (FastLED)
- added hiding of * palettes if not all color selectors shown
2022-06-17 18:57:32 +02:00
Blaz Kristan
36503f0417 Fix CRLF 2022-06-17 16:24:25 +02:00
Blaz Kristan
0daddf9896 Some fixes.
Remove (*) palettes if not all 3 color selectors shown
Updated comments
2022-06-17 16:18:35 +02:00
Blaz Kristan
f3364e1327 Scrolling text #DATETIME bugfix.
Cosmetic changes.
2022-06-16 21:52:14 +02:00
Blaz Kristan
cf54115077 Sync bug fixes.
Analog input fix.
Code cleanup.
2022-06-16 19:20:04 +02:00
Blaz Kristan
12a94c50b8 Various fixes.
Added support for no audio to some effects.
2022-06-16 16:10:38 +02:00
dependabot[bot]
0dd12cf0a6
Bump bottle from 0.12.19 to 0.12.20 (#2683)
Bumps [bottle](https://github.com/bottlepy/bottle) from 0.12.19 to 0.12.20.
- [Release notes](https://github.com/bottlepy/bottle/releases)
- [Changelog](https://github.com/bottlepy/bottle/blob/master/docs/changelog.rst)
- [Commits](https://github.com/bottlepy/bottle/compare/0.12.19...0.12.20)

---
updated-dependencies:
- dependency-name: bottle
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-16 10:31:14 +02:00
Blaž Kristan
f92c336ae4 Fix for fftCalc 2022-06-16 07:47:58 +02:00
Blaz Kristan
477c9ef577 Cosmetic fixes. 2022-06-15 22:17:34 +02:00
Blaz Kristan
e146a476bd Effect ID compatibility with WLED-SR
Updated some SR effects.
2022-06-15 17:21:32 +02:00
Blaz Kristan
45e74126da Non-2D audio effects. 2022-06-14 18:16:18 +02:00
Blaž Kristan
f32a39e79f Finalised used variables in effects 2022-06-14 14:48:13 +02:00
Blaž Kristan
489b144085 Overload temporary fix.
Non-audio SR effects.
2022-06-14 12:06:51 +02:00
Blaž Kristan
e7d311d23c I2S SD pin output type fix 2022-06-14 11:26:52 +02:00
Blaž Kristan
4cc2dea2fe color_add() that preserves color ratio
AA version of setPixelColor(float)
Fix in AA ratio calculation.
2022-06-14 09:11:56 +02:00
Blaz Kristan
1e2cae7087 W fix. 2022-06-13 22:13:04 +02:00
Blaz Kristan
2b259f3704 Usermod API enhancements
- data exchage getUMData()
- usermod configuration helper appendConfigData()
- notification on updates onUpdateBegin()
2022-06-13 22:11:55 +02:00
Blaz Kristan
0df5221784 Normalised/antialiased setPixelColorXY() 2022-06-13 21:55:51 +02:00
Blaz Kristan
4c78d35680 Fix CRLF. 2022-06-13 21:29:08 +02:00
Blaz Kristan
cdef8472e3 Gav... efects to test audio
Anti-aliased setPixelColor() with support for normalized x & y
2022-06-13 21:28:10 +02:00
Blaz Kristan
f9c933bf3b AudioSource classes cleanup 2022-06-13 17:34:49 +02:00
Blaz Kristan
cc995ecef8 2D Waverly audio reactive. 2022-06-12 22:17:17 +02:00
Blaz Kristan
922a3631ae Fixed order of loading. 2022-06-12 15:09:15 +02:00
Blaz Kristan
0903078618 Execute GetV() after cfg.json is loaded. 2022-06-12 14:02:49 +02:00
Blaz Kristan
8c759cb65a Usermod config info & data. 2022-06-11 18:55:23 +02:00
Blaz Kristan
bd45c67528 Virtual fixes.
Pins.
2022-06-11 12:35:29 +02:00
Blaz Kristan
562a206508 It compiles!
Cleaned (and possibly broken) AudioSource
Added:
- usermod notification about update
- strip.getMinShowDelay()
- pin manager updates
Changed:
- data exchange
2022-06-11 00:50:29 +02:00
Blaz Kristan
dd584e929f Added audioreactive to usermod_list
Formatting in usermod
2022-06-10 16:37:55 +02:00
Blaz Kristan
1828a2a81c Addec config save/load.
Changed double to float.
2022-06-09 18:55:35 +02:00
Blaž Kristan
a6746f77f0 Var fixes. 2022-06-09 14:44:48 +02:00
Blaz Kristan
184ff7a3b3 Audioreactive usermod. 2022-06-08 21:14:01 +02:00
Blaz Kristan
9db872db56 Fixes:
- mirroring
- FX memory allocations
- preset loading if WS request too big

Changes:
- remove "pt" in favor of "ps" in JSON
- fading in Ghost rider
2022-06-05 10:16:56 +02:00
Blaz Kristan
f1a1b89d13 Fixes.
- correct preset cycling
- updated rotary encoder preset selection
2022-06-03 22:22:18 +02:00
Blaz Kristan
14e0e96596 Send complet preset API from UI.
Cycling value correction (optimisation and preset hack removal).
2022-06-03 18:38:46 +02:00
Blaz Kristan
793c878c66 Added display information for hue/sat/preset/cct 2022-06-02 18:30:23 +02:00
Blaz Kristan
14887d5e88 Multiple fixes.
- non matrix bugs in legacy effects
- preset loading (cycling)
- segment length in UI
- possible WS heap corruption prevention
2022-06-01 22:11:25 +02:00
Blaz Kristan
366006273d Watchdog timer (@poelzi).
Transpose optimisations.
Rain effect updated.
2022-05-30 22:21:13 +02:00
Blaz Kristan
6a69a726f2 Build bump. 2022-05-29 18:34:59 +02:00
Blaz Kristan
e9cd4d95a7 Merge branch 'master' into master-merge 2022-05-29 18:22:33 +02:00
Blaz Kristan
d7e1dc1f95 Revert speed for Fire.
Segment brightnes +/- fix.
2022-05-29 18:20:30 +02:00
Blaž Kristan
19c8b4fe2d
Merge pull request #2665 from Stoom/segment_bri_fix
🐛 fix(json): allow for using `~-16` or `~16` when setting a segments brightness though the JSON api
2022-05-29 11:02:59 +02:00
Blaz Kristan
8b73a7375a Fix for transpose.
blur1d() using weighted box blur.
2022-05-28 19:23:16 +02:00
Blaž Kristan
974798f79c
Merge pull request #27 from srg74/patch-1 2022-05-28 07:43:21 +02:00
srg74
43c5de074f
Update usermod_temperature.h
Typo in line 149
2022-05-27 15:42:03 -04:00
Blaz Kristan
461cc1d5a8 Fix for stalled scrolling text.
Minor other fixes.
2022-05-27 15:29:34 +02:00
Blaz Kristan
3d6df07335 Bugfixes in 2D.
PIR stops countdown if preset changed.
2022-05-27 13:39:22 +02:00
Blaz Kristan
7689587879 New 2D Drift Rose effect.
Fix for segment name.
Updated blurRow & blurCol to work on non-leds[].
Updated several legacy effects to be 2D aware.
Code cleanup.
2022-05-26 21:36:48 +02:00
Blaz Kristan
e248b989e1 2D Scrolling text
Updated Glitter & Sparkle
2022-05-25 21:15:08 +02:00
Blaz Kristan
9920424a31 Polar Lights fix.
Cleanup.
2022-05-24 16:43:21 +02:00
Blaz Kristan
17be0a2c12 Enhance rotary encoder with custom sliders.
Soft watchdog timer (by poelzi)
2022-05-24 13:45:35 +02:00
Daniel Poelzleithner
26fa38d052 Watchdog: disable watchdog while OTA is running 2022-05-23 22:30:13 +00:00
Blaz Kristan
34a4382920 Effect fixes. 2022-05-23 21:04:16 +02:00
Blaz Kristan
e7c9b5a4f0 2D Fireworks (enhanced 1D version).
Transposed Fire 2012 on matrix.
2022-05-22 17:20:06 +02:00
Blaz Kristan
8c31904838 Updated rotary encoder ALT to support modes array. 2022-05-22 12:56:01 +02:00
Blaz Kristan
d522b608d3 Finally fix for Crazy Bees. 2022-05-22 12:32:38 +02:00
Blaz Kristan
3e7303c15c Possible fix for Crazy Bees.
Code cleanup.
2022-05-22 12:00:27 +02:00
Blaz Kristan
6e342983f9 It did not like PROGMEM. 2022-05-22 00:41:45 +02:00
Blaz Kristan
a6d7ed3824 Moved mode names (& slider data) to a static array
-- may break some things --
2022-05-21 18:37:09 +02:00
Blaz Kristan
e003ec39fb Transpose fix for XY()
Slight internal API change.
Renamed c1x,c2x,c3x to custom1, custom2, custom3 to be in line with SR.
2022-05-21 13:19:11 +02:00
Blaz Kristan
62abc63f7a Removed static vars to support segments. 2022-05-20 22:29:47 +02:00
Blaz Kristan
0955480f5b Build bump. 2022-05-20 19:51:46 +02:00
Blaz Kristan
bf76affd06 Fix for missing palettes. 2022-05-20 19:44:06 +02:00
Blaz Kristan
b4d6525899 Added new 2D effects:
- 2D Floating Blobs
- 2D Ghost Rider
Crash fix for 2D Game of Life.
Added support function fill_circle() & wu_pixel().
Removed obsolete debug strings.
2022-05-20 19:35:22 +02:00
Blaz Kristan
ba3555a66f 2D Game of Life update.
Added crc16().
Reduced errorToast popup time.
Fixed drawLine() incorrect uint16_t use and added leds[] support.
2022-05-20 14:48:40 +02:00
Blaž Kristan
d8be286831
Merge pull request #24 from lost-hope/2D-support 2022-05-20 07:15:45 +02:00
lost-hope
65f5bc531c Added line drawing function based on Bresenham 2022-05-19 22:49:04 +02:00
Blaz Kristan
3ba4702181 2D crazy bees. 2022-05-19 18:57:23 +02:00
Blaz Kristan
ad9c42e832 2D Spaceships. 2022-05-19 18:27:04 +02:00
Blaz Kristan
0368d3be59 Some fixes.
Tried removing leds[] for some effects.
2022-05-19 17:01:52 +02:00
Blaz Kristan
598549b5fb Additional 2D effects. 2022-05-19 11:29:04 +02:00
Blaz Kristan
49086a3ae0 2D heartbeat/ECG. 2022-05-18 21:47:48 +02:00
Blaz Kristan
4676a7aa62 Merge branch 'dev' into 2D-support 2022-05-18 19:50:19 +02:00
Blaz Kristan
7d25b234d5 Temperature usermod HA autodicovery. 2022-05-18 19:49:49 +02:00
Blaz Kristan
c6578870f0 PWM fan JSON API control. 2022-05-18 19:46:31 +02:00
Blaz Kristan
4e8030bd81 Bugfix.
- centered Settings buttons
- disallow preset ID >250
2022-05-18 14:38:22 +02:00
Blaz Kristan
094e130544 slight mod for 2Ddrift 2022-05-11 18:25:19 +02:00
Blaz Kristan
879fd5a13d Hide 2D modes in UI if not a matrix set up. 2022-05-11 12:29:46 +02:00
Blaz Kristan
c2bb49aca0 Messed up again. 2022-05-11 09:55:23 +02:00
Blaz Kristan
9ed14b6e8c Incorrect mode params fix.
Variable eye width in Halloween Eyes.
2022-05-11 09:53:40 +02:00
Blaz Kristan
4484721a9f 2D Haloween eyes
Misc fix.
2022-05-11 09:37:38 +02:00
Blaz Kristan
4963a5797b Corrected slider names & options for 2D effects. 2022-05-10 21:41:20 +02:00
Blaz Kristan
13f5798ed4 blur2D & other bugfixes 2022-05-10 10:37:27 +02:00
Jamie Stoom
db8e1dec3e 🐛 fix(json): allow for using ~-16 or ~16 when setting a segments brightness though the JSON api 2022-05-09 18:06:45 -07:00
Blaz Kristan
c9bdecdb69 API change.
New SR effects.
Bugfixes.
2022-05-10 00:35:26 +02:00
Blaz Kristan
adb7726974 Bugfixes.
- removed IS_ macors
- replaced .options with getOptions()
- Fire2012 matrix fix
2022-05-09 16:15:07 +02:00
Blaz Kristan
d6883d0c1c Added CRGB variant for setPixelColor() 2022-05-09 11:11:25 +02:00
Blaz Kristan
b2409ac708 Bugfix in vertical panel ledmap generation.
2D implementation of Fire 2012
2022-05-09 11:04:11 +02:00
Blaz Kristan
cf189663a7 Segment width & height fix.
Auto 2D segment.
2022-05-08 14:28:02 +02:00
Blaz Kristan
f0d36fd769 WLED 2D matrix support.
- Added 2 sample effects to UI.
- 2D segment details.
- 1D effect upscaling to 2D.
- 2D setPixelColorXY() and other utility functions
- Arbitrary panel position & oritentation.
- 2D settings with physical to logical mapping.
- Bump version.
2022-05-08 10:50:48 +02:00
Daniel Poelzleithner
213e3e998a Enable ESP watchdog by default
Use the ESP watchdog to detect hanging ESP and reset the firmware.
Can be disable by defining WLED_WATCHDOG_TIMOUT 0
Default timeout is 3 seconds on ESP32 and 8 seconds on ESP2688
2022-05-05 11:33:00 +00:00
Luke Plassman
bef9c68f81
Working DMX Libraries (#2652)
* added SparkFunDMX library dependencies

* changed variable names to avoid conflicts with SparkFunDMX library

* board version checks

* minor changes to DMX

* fix brightness when no shutter DMX channel is set

* fix compile issue on newer ESP32 variants
2022-05-05 02:28:09 +02:00
ChuckMash
099d2fd03d
WiZ Lights usermod - Adding more options and features (#2638)
* Update wizlights.h

adds new features and options for wizlights usermod

* Update wizlights.h

Change how IPs are numbered.
Non-programmers incorrectly start counting at 1

* Update wizlights.h

updated default cold white enhanced white setting to a lower value.

* Update wizlights.h

added logic for connection check before UDP sending.
Seems more important for ESP32

* Update readme.md
2022-05-03 12:18:21 +02:00
Blaz Kristan
9f71a6ab18 Arduino OTA lock fix. 2022-05-01 22:09:40 +02:00
Blaz Kristan
e088f7a552 PIN code field focus on load. 2022-05-01 10:27:26 +02:00
Blaz Kristan
2e6ce0481c Allow swapping of W channel for RGBW LEDs.
Backporting fix.
2022-04-30 12:45:38 +02:00
Blaz Kristan
23d39e5366 Compile time options for Multi Relay & PWM Fan 2022-04-29 09:56:48 +02:00
Blaz Kristan
279664a578 Added compile time PWM fan pins.
Updated readme
2022-04-29 09:52:45 +02:00
Blaz Kristan
2a3d128f3c Default pins for Multi-Relay.
Update page fix.
2022-04-28 22:31:09 +02:00
Blaz Kristan
9667365d9e Optional HSV sliders instead of color wheel.
PIN code optimizations & fixes.
2022-04-27 12:31:47 +02:00
Blaz Kristan
d4ef26e0f3 HSV sliders option instead of color picker. 2022-04-26 22:16:08 +02:00
Blaz Kristan
a053e81797 Minor fixes. 2022-04-24 19:47:55 +02:00
Blaz Kristan
1494bfe855 Fix for non-websockets build.
Cleanup.
2022-04-24 19:30:14 +02:00
Blaz Kristan
f1a4ba4e76 Restore preset upon playlist end option. 2022-04-20 18:05:59 +02:00
Blaz Kristan
385c526414 Added new holidays. 2022-04-19 17:16:07 +02:00
Blaz Kristan
5e95e02429 Missing segpwr configuration. 2022-04-18 22:59:32 +02:00
Blaz Kristan
3081802b1c Minor UI fix.
- keep .staytop/.staybot sticky
- .fnd inheritance
2022-04-17 12:01:44 +02:00
Blaz Kristan
1663601dcb UI fixes.
- correct load sequence
- incorrect power on repeated segments
- update button
- fix for find icon
- connection icon colors
2022-04-17 11:13:13 +02:00
Thomas
1a513c7bbf
wled.cpp: Wrap Serial calls in #ifdef WLED_ENABLE_ADALIGHT. (#2630)
handleImprovPacket() unconditionally gobbles serial data which a problem
if we want another feature to consume it. This patch uses the same guard
as the existing call in `handleSerial()`.

Co-authored-by: Thomas Fubar <FUB4R@users.noreply.github.com>
2022-04-17 00:08:27 +02:00
Blaz Kristan
92cbdde429 Cleanup. 2022-04-16 16:31:00 +02:00
Blaz Kristan
0f6b1e4ae1 Synchronus applyPreset() from HTTP JSON API call.
Bugfix for HTTP API preset.
WS multiple broadcast fix.
Turning segment on/off will not reset currentPreset/cause stateChanged.
2022-04-16 16:28:43 +02:00
Blaz Kristan
f915201a27 Cleanup. 2022-04-12 16:08:17 +02:00
ChuckMash
d1f76042e1
bugfix for outgoing serial TPM2 message length (#2628)
bugfix for outgoing serial TPM2 message length
2022-04-12 10:20:08 +02:00
Blaz Kristan
845aa733b7 Bugfixes.
- auto segments selected
- slider data aded to data-opt
2022-04-11 22:18:44 +02:00
Blaz Kristan
a0e318827d Hide custom sliders by default. 2022-04-11 15:14:47 +02:00
Blaz Kristan
39720a11dc Fix empty space at the bottom. 2022-04-10 20:58:41 +02:00
Blaz Kristan
da33bf3438 Revert namelabel. 2022-04-10 20:05:14 +02:00
Blaz Kristan
eda6f134a9 Moved effect sliders to bottom.
Implemented custom effect parameters.
2022-04-10 11:02:57 +02:00
Blaz Kristan
46e1c8ef73 Update WS on exit of live mode. 2022-04-08 20:11:34 +02:00
Blaz Kristan
f247139f1c Bugfixes.
- prevent changing main segment during live
- PIN code entry validation
- UI CSS fixes
2022-04-07 21:54:55 +02:00
Blaz Kristan
566985cf72 Add preset (name) UI bugfix.
Close modal button.
2022-04-06 05:45:39 +02:00
Blaz Kristan
70b4cdf520 Merge branch 'master' into merge-master 2022-04-04 21:16:18 +02:00
Blaz Kristan
081f211231 Merge branch 'master' into merge-master 2022-04-04 20:52:42 +02:00
Christian Bartsch
9cd8acab43
Usermod: Add support for Si7021 temperature and humidity sensors (#2617)
* added first version (work in progress)

* added some sensors to publish

* typo

* added dependency

* mqtt si7021_* names + don't  retain

* timer to 60 s

* some changes to HA auto discovery

* added config entries (no function yet)

* renaming

* made configs work

* added getId()

* refactoring + wrong mqtt topics fixed

* retain HA auto discovery

* do not spam serial console on each sensor update

* added readme

* add update interval info

Co-authored-by: Christian Schwinne <dev.aircoookie@gmail.com>
2022-04-03 22:30:37 +02:00
4lloyd
8b79a9708b
Next universe overflow and Art-Net DMX start address (#2607)
* Improve calculation LEDs in next universe

* Fix Art-Net DMX start address
2022-04-03 17:52:36 +02:00
Blaz Kristan
969acbd47f UI & CSS bugfix. 2022-04-02 19:18:54 +02:00
Blaz Kristan
31012671c5 UI sliding bugfix. 2022-04-02 07:42:04 +02:00
cschwinne
e362b3b6aa Fixed sunset time off by an hour on DST change day (fixes #2603) 2022-04-01 02:07:50 +02:00
Christian Schwinne
d2ced93e58
Merge pull request #2601 from Aircoookie/minseg-udp
UDP on main segment only.
2022-04-01 01:24:13 +02:00
cschwinne
958cd35e21 Live mainseg improvements
Make override work in mainseg mode
Move unfreeze on turn on from UI to JSON parser
Fix mainseg not unfreezing on timeout
2022-04-01 00:59:19 +02:00
Blaz Kristan
73e898773b Minor fixes.
- reversed condition for simplified UI
- removed duplicate code
2022-03-31 21:44:11 +02:00
Spectre
46eae410c3
add My9291 light bulb driver (#2599)
Co-authored-by: Christian Schwinne <dev.aircoookie@gmail.com>
2022-03-31 20:49:00 +02:00
Stefan Riese
73a9e1c316
V2 usermod for wordclock with 11x10 LEDs and 4 minute dots (#2608)
* - implement V2 Usermod to handle wordclocks with 11x10 pixels and 4 additional dots for the minutes

* - fix wording issue for "six"
-

* - add some more comments

* - fix issue with "zwölf"
2022-03-31 20:31:37 +02:00
cschwinne
03862d4b6c Add icon font 2022-03-28 23:23:38 +02:00
Blaz Kristan
557a2f08f7 Power off. 2022-03-28 23:08:29 +02:00
Blaz Kristan
ae90aa4ccc Power off. 2022-03-28 23:07:37 +02:00
Blaz Kristan
6eff2e6e74 Missing .h 2022-03-28 22:43:51 +02:00
Blaz Kristan
955bb51f11 Freeze/unfreeze for mainseg UDP. 2022-03-28 22:36:58 +02:00
Blaz Kristan
b583def913 Using freeze instead of power for segment.
Fix for missing udp.cpp
2022-03-28 20:44:49 +02:00
dependabot[bot]
dd85da053f
Bump minimist from 1.2.5 to 1.2.6 (#2602)
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-28 09:44:17 +02:00
Blaz Kristan
ba6a01408d UI tweaks & optimizations. 2022-03-26 23:22:18 +01:00
Blaz Kristan
81d880fb4e Global Auto-calculate white override. 2022-03-26 23:20:14 +01:00
Blaz Kristan
bdbce67473 Movable segment power.
UI CSS fixes.
2022-03-25 20:30:29 +01:00
Blaz Kristan
6079effae3 UDP on main segment only. 2022-03-25 17:20:41 +01:00
Blaz Kristan
41aa1ee318 Use UDP live/realtime data on main segment only.
Includes Adalight revert, CSS optimizations and setPixelColor() refactoring.
2022-03-25 16:36:05 +01:00
Woody
8d2fe315db
Fix cross-origin error in File Mode (#2585)
* fixed cross-origin error

* removed unnecessary code

* try/catch for parent WS

Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
2022-03-24 12:17:10 +01:00
Eduardo Ibanez
22c3ac5be3
Add usermode to control Wiz lights (#2595)
* Add usermode to control Wiz lights (#1)

* Fix inclusion in usermods list

Co-authored-by: Christian Schwinne <dev.aircoookie@gmail.com>
2022-03-23 16:20:18 +01:00
cschwinne
a517f0df1d Add ESP32-ETHERNET-KIT-VE type 2022-03-20 22:12:18 +01:00
Blaz Kristan
c14f16bdf1 Merge branch 'master' into master-merge 2022-03-19 21:05:28 +01:00
cschwinne
9c9854b6bf Fixed sunrise/set calculation 2022-03-19 19:27:32 +01:00
cschwinne
d280e16723 Fixed /json/cfg unable to set busses (fixes #2589) 2022-03-19 14:21:14 +01:00
cschwinne
b93a9cb8bc FIxed liveview 2022-03-18 14:24:10 +01:00
cschwinne
8601052179 Fixed liveview buffer over-write (fixes #2586 )
(with odd LED counts > 256)
2022-03-18 14:08:37 +01:00
cschwinne
eaa20ff4bf Add handleOverlayDraw() to example v2 usermod 2022-03-16 19:32:11 +01:00
Blaž Kristan
e4c6e4bc48
Merge pull request #2584 from tonyn0/master
DDP in AP mode.
2022-03-16 17:31:09 +01:00
Blaž Kristan
c52597205e
Merge branch 'master' into master 2022-03-16 17:29:12 +01:00
Blaz Kristan
eee9de8271 Bumped build. 2022-03-16 17:14:37 +01:00
tonyn0
c73033c0b4 udp.cpp update
added ap check for ddp in L657
2022-03-16 11:00:29 -05:00
Blaž Kristan
aecfa3ff0f Merge branch 'master' into master-merge 2022-03-16 08:52:48 +01:00
Blaž Kristan
18f575bee4 Merge branch 'dev' into master-merge 2022-03-16 07:13:27 +01:00
cschwinne
522e752582 Add ability to skip up to 255 LEDs (#2342) 2022-03-16 01:45:07 +01:00
SpeakingOfBrad
854ed8cfa9
ABL milliamps no longer hardcoded to 850 at runtime (#2581) 2022-03-16 00:35:49 +01:00
SpeakingOfBrad
4642205768
Optionally set led strip color order at runtime. (#2582) 2022-03-16 00:17:49 +01:00
André Klitzing
40dbfbe092
Update IRremoteESP8266 to 2.8.2 (#2579)
This fixes some C3 issues
2022-03-16 00:16:49 +01:00
Blaz Kristan
7882519c0e Bugfix.
- expand preset
- button factory reset
- PIO library
2022-03-15 22:16:48 +01:00
Blaž Kristan
0234017ca1 Merge branch 'master' into master-merge 2022-03-15 09:55:23 +01:00
cschwinne
6c315e5a9c 0.13.1
Fix persistent preset bug
2022-03-15 03:45:20 +01:00
cschwinne
ef0f91d8d0 Release of WLED v0.13.0 2022-03-15 02:28:26 +01:00
cschwinne
9552784e72 Remove persistent argument from savePreset()
(fixes temp preset not applicable by APIs)
Default to 5Mhz hardware SPI driving (#2558)
2022-03-14 20:53:00 +01:00
Blaz Kristan
ac20d7f302 UI updates.
- optional show/hide segment power
- skinnable sliders
- changed some CSS to be more to @aircoookie's liking
2022-03-14 20:22:20 +01:00
SpeakingOfBrad
f068327307
Add option to set module name at runtime, and add extra examples in platformio_overrides.ini (#2578)
* Added option to set the name of the module at runtime.

* added example how to set number of LEDs at runtime

* Example to enable/set IR remote type at runtime

* Clarification on how to use platformio_overrides

* Example for setting abl milliamp limit at runtime

* Corrected example set LED count
2022-03-14 18:23:53 +01:00
cschwinne
1bc698ae78 Button 0 long press factory reset
JS simplification
2022-03-14 12:26:45 +01:00
Blaz Kristan
3f6691dcd5 Easter egg added. 2022-03-13 14:04:29 +01:00
Blaz Kristan
31981b9080 Fix compile for ST7789 display usermod. 2022-03-13 09:30:51 +01:00
Blaz Kristan
167d29c39f RGB selector bugfix. 2022-03-12 21:25:39 +01:00
Blaz Kristan
28b78c2b27 Select/unselect all segments chekmark.
CSS fixes.
2022-03-12 18:03:00 +01:00
Blaz Kristan
b3d691fff6 Select/deselect all segments.
CSS optimisations & fixes.
2022-03-11 23:38:50 +01:00
Blaž Kristan
8e5f2d91e8 Added hasRGB() and hasWhite() methods to Bus class 2022-03-11 12:20:48 +01:00
Blaž Kristan
cfa7f60e5f Merge branch 'master' into master-merge 2022-03-11 11:33:35 +01:00
Blaž Kristan
e0fcaa6103 Merge branch 'master' into master-merge 2022-03-11 11:28:02 +01:00
cschwinne
1b2134d7a8 Add old blinds usermod 2022-03-11 09:20:01 +01:00
cschwinne
f922268af7 Remove unneeded brightness set in live Serial 2022-03-11 08:41:01 +01:00
Blaz Kristan
841a9f8082 Searchable presets.
Inline sin_gap().
Prevent live timeout.
2022-03-10 22:36:09 +01:00
cschwinne
4865ddb377 Fix realtime mode disabled by brightness change
Fix realtime mode not working immediately at turn on
Fix individual segment control not working immediately at turn on
2022-03-10 20:40:48 +01:00
cschwinne
a556732e4f Add ability to set presets from DMX
(effect mode with single channel)
2022-03-10 12:13:12 +01:00
cschwinne
0ea31cb088 Fix indefinite realtime terminated by new packet (fixes #2356 )
Add custom Aircoookie fork of ESP32 core (reduces bin size by >100kB)
2022-03-10 11:20:39 +01:00
Blaz Kristan
06fe7323eb Fix for palettes. 2022-03-09 19:03:39 +01:00
Blaz Kristan
d8d9259c36 Comment fix. 2022-03-09 18:21:52 +01:00
Blaz Kristan
261260b232 Fix for non-W segment. 2022-03-09 15:31:31 +01:00
Blaž Kristan
5b88894638 Reintroduction of per bus auto white calculation.
JS/CSS UI optimizations.
2022-03-09 13:39:51 +01:00
Blaz Kristan
ddadaa828a Merge branch 'master' into master-merge 2022-03-08 22:46:50 +01:00
Blaz Kristan
a3cd10d83b Reverse proxy WSS support. 2022-03-08 16:16:07 +01:00
cschwinne
b626c7620e Disabled auto white mode in segments with no RGB bus 2022-03-08 02:16:33 +01:00
cschwinne
5d90d8930e Fix non-0 terminated hostname str 2022-03-07 20:37:48 +01:00
PLCHome
b01309c3bf
Mixed content exception in web browser in websocket communication on peek behind an https backproxy. (#2571)
"ws://" must be the change to the "wss://" for encryption
2022-03-07 18:26:53 +01:00
Blaž Kristan
2d1511b5dd Fix incorrect isRgbw use 2022-03-07 09:50:33 +01:00
Blaž Kristan
e561304645 Merge branch 'master' into master-merge 2022-03-07 09:44:35 +01:00
cschwinne
961d5591bd Fixed Popcorn mode not lighting first LED on pop 2022-03-07 00:53:20 +01:00
cschwinne
eca3f12fed Fixed analog overlay not settable 2022-03-07 00:11:43 +01:00
cschwinne
a2c8796e04 Replaced native Cronixie support with usermod 2022-03-06 23:47:36 +01:00
cschwinne
ad301fd087 Elekstube usermod enhancements
Coloring of grayscale images
Dimming control from configurable segment
2022-03-06 22:24:24 +01:00
cschwinne
02b08939cd No color order select on PWM busses (fixes #2569) 2022-03-06 11:48:17 +01:00
cschwinne
9b0d583f1b EleksTube usermod 1, 4, 8 BPP BMP support 2022-03-05 21:48:11 +01:00
RedNax67
4a0a07f158
Added digit dimming and support for .clk format (see https://github.c… (#2555)
* Added digit dimming and support for .clk format (see https://github.com/aly-fly/EleksTubeHAX)

* Small fixes and improvements, dimming optional

Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
2022-03-05 03:10:32 +01:00
Christian Schwinne
9c864c9759
UI: show color controls based on segment light capabilities (#2567)
* Dynamic hiding of unused color controls in UI

(e.g. a PWM white bus with no auto white mode will not display the color wheel or palette list)

* Store segment capabilities

Don't use palettes if no RGB supported
Make it safe to update busses using `/json/cfg`
2022-03-05 01:05:26 +01:00
Blaz Kristan
f1dd1bd6bd Relative value wrapping and operator fix.
Slot selector changes.
2022-03-04 21:49:07 +01:00
cschwinne
85b1c309d1 Relative value wrapping and operator fix (fixes #2566 ) 2022-03-04 14:42:35 +01:00
cschwinne
6fe43b7b5c Separate color memory from slot selectors
Slot selector dynamic text color black/white
Selected slot selector JS simplification
2022-03-03 20:54:54 +01:00
Blaz Kristan
62fc986d96 Segment corner fix. 2022-03-03 20:19:26 +01:00
Blaz Kristan
03710f1fd2 Prevent brute force PIN guessing. 2022-03-03 18:49:32 +01:00
Blaz Kristan
2283c7a926 Fix for dark buttons in info. 2022-03-03 11:24:21 +01:00
Blaz Kristan
fb19ca8bf4 Regression fix. 2022-03-03 11:14:28 +01:00
Blaz Kristan
4ebfc1516c Merge branch 'settings-pin' into dev 2022-03-03 11:06:11 +01:00
Blaz Kristan
cc713e6c89 Merge branch 'sensor-info' into dev 2022-03-03 11:04:42 +01:00
Blaz Kristan
1be65adf02 Fix:
- disbled timed preset expanding
- incorrect calendar icon on Mac/Firefox
2022-03-03 10:59:29 +01:00
Blaz Kristan
25427ee60d Fix:
- disbled timed preset expanding
- incorrect calendar icon on Mac/Firefox
2022-03-03 10:57:07 +01:00
Blaz Kristan
c8eefbaa2e CSS/JS fixes. 2022-03-03 01:02:23 +01:00
Blaz Kristan
b339f426f2 Added:
- generic settings.js handler
- update info
- numeric (not really) hidden PIN
2022-03-02 15:41:31 +01:00
Blaz Kristan
9fd26fa574 Settings PIN protection. 2022-03-01 23:37:28 +01:00
cschwinne
be90bf0188 Minor CSS simplifications 2022-03-01 18:22:54 +01:00
cschwinne
adcdaba199 Indentation: Consistent use of Tab
Added style guide
Updated changelog
2022-03-01 12:14:41 +01:00
cschwinne
17907589cc Indentation: Consistent use of Tab for CSS 2022-03-01 11:20:10 +01:00
cschwinne
f333df181f Small CSS alignment adjustments
mainseg is not highlighted by default, but can be enabled by CSS only
Simplify some CSS (new segment box, segment brightness slider)
Started labeling CSS classes
2022-03-01 11:13:56 +01:00
Blaz Kristan
61a01cb163 JS/CSS optimisations 2022-02-28 23:32:24 +01:00
Blaz Kristan
4ce557a829 Multiple fixes:
- ability so select mainseg (UI)
- changed preset sort (UI)
- IR40 white +/- fix
- IR repeatable actions fix
- minor UI CSS change
- removed unnecessary color functions
2022-02-27 22:19:05 +01:00
Blaz Kristan
4d10c9de95 Removed unnecessary set call.
Fixed incorrect colorUpdated call.
Fixed white +/- in IR40 remote.
2022-02-27 16:18:37 +01:00
Blaz Kristan
5b84acebbc Minor JS optimisation. 2022-02-27 11:31:30 +01:00
Christian Schwinne
fc845dc936
Add locate button for easy lat/lon auto-fill (#2559) 2022-02-26 01:37:30 +01:00
Blaž Kristan
7beae93441
IR rewrite. (#2561)
* IR rewrite.
- added CCT (WW/CW) support
- support for applying change to main segment or all selected segments

* Remove extra setValuesFromFirstSelectedSeg()

Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
2022-02-26 01:37:09 +01:00
Blaž Kristan
c8f1297adb Fixed main/first selected segments in IR.
Code optimization.
2022-02-25 10:24:00 +01:00
Blaz Kristan
053a1d34e5 Fix for main segment. 2022-02-24 20:49:53 +01:00
Blaz Kristan
110a75ba0b Merge branch 'merge-master' of github.com:blazoncek/WLED into merge-master 2022-02-24 16:57:36 +01:00
Blaz Kristan
826a31e57d UI fixes and optimizations. 2022-02-24 16:52:16 +01:00
Blaž Kristan
23d7c3d0fe Merge branch 'master' into merge-master 2022-02-24 13:43:12 +01:00
cschwinne
4d4a20e05e 0.13.0-b7
Mitigate Pixel 6 UI issue
2022-02-24 01:16:24 +01:00
cschwinne
c03d4f115f Fixed presets not triggering interface update 2022-02-23 19:42:34 +01:00
cschwinne
ed90b638a9 Main seg replaced by first selected in internal interfaces
Version bump to 0.13.0-b7
Various small improvements
2022-02-23 19:20:07 +01:00
Blaz Kristan
c5252e06a7 Main segment UI identification. 2022-02-22 22:10:26 +01:00
Blaž Kristan
8af445e72b Merge branch 'master' into merge-master 2022-02-22 10:42:00 +01:00
cschwinne
94a0199955 Readme cleanup 2022-02-21 22:26:35 +01:00
cschwinne
44739c5198 Merge effectChanged and colorChanged to stateChanged 2022-02-21 22:12:13 +01:00
cschwinne
5f871bc01f HTTP API: Set segments directly in set.cpp 2022-02-21 20:48:11 +01:00
Blaz Kristan
b382dd6fc0 Incorrect variables fix. 2022-02-21 19:55:30 +01:00
Blaz Kristan
2e84f82ed6 Fix for incorrect application of color in set.cpp 2022-02-21 19:44:12 +01:00
cschwinne
1f5971f15a Another HTTP API segment improvement 2022-02-21 18:31:19 +01:00
cschwinne
694466a196 Apply segment by Enter key on input field 2022-02-21 17:58:18 +01:00
cschwinne
03311d3776 Do not set main seg before apply
Setting mainseg before applyValuesToSelectedSegs() causes the updated value to not be set to other selected segments
2022-02-21 16:57:18 +01:00
cschwinne
ae0eba866a Improve Stream and fix HTTP segment application 2022-02-21 16:19:11 +01:00
Blaz Kristan
05f92b74e7 Bump to 0.13-bl7. 2022-02-20 22:36:37 +01:00
Blaz Kristan
41b6f3ffa7 Merge branch 'master' into merge-master 2022-02-20 22:24:11 +01:00
Blaz Kristan
c895b76864 unneeded WS request 2022-02-20 09:41:56 +01:00
cschwinne
906737bedb Changelog update 2022-02-20 02:15:34 +01:00
Christian Schwinne
7138e891be
Add per-segment light capability info (#2552)
* Add per-segment light capability info

* Fix duplication

* Change to more lightweight seglc array

* Added segment capabilities.

* Differs and capabilities refactoring

* Add back selection differs option

Co-authored-by: Blaz Kristan <blaz@kristan-sp.si>
2022-02-20 00:20:22 +01:00
Christian Schwinne
53abe36b83
Merge pull request #2547 from Aircoookie/sync-segbounds2
Sync segment bounds
2022-02-19 23:00:31 +01:00
cschwinne
efbb7a034c Slight websocket reconnection tweaks 2022-02-19 22:47:17 +01:00
Blaz Kristan
d7dac57a07 Save a bit of RAM and flash. 2022-02-19 20:34:37 +01:00
Blaz Kristan
05bc81bf4e Add default preset name if none specified. 2022-02-19 11:42:59 +01:00
Blaz Kristan
59ce88f044 Add default preset name if no name specified 2022-02-19 11:37:48 +01:00
Blaz Kristan
f8bc0bd2b5 Removed unnecessary if. 2022-02-18 19:23:55 +01:00
Blaz Kristan
7ebb184c8a Clear JSON buffer. 2022-02-18 19:21:22 +01:00
Blaz Kristan
bd44205b4e Allow saving preset from IR 2022-02-18 18:52:44 +01:00
Blaz Kristan
cf94cb1092 Allow saving preset from IR
Removed double clolorUpdated() call
2022-02-18 18:35:51 +01:00
Blaz Kristan
02d92e32c7 Parsing IR JSON cmd fix. 2022-02-18 17:01:34 +01:00
Blaz Kristan
68087cdea5 Parsing JSON cmd fix for IR
Latest NeoPixelBus lib.
2022-02-18 16:58:57 +01:00
Blaž Kristan
7f92607b85 Added WS reconnect on error toast. 2022-02-17 12:51:37 +01:00
Blaž Kristan
3be4b69b44 WS reconnect logic & WS memory leak protection 2022-02-17 12:45:50 +01:00
Tom D'Roza
bb9afcb304
Added: CSS hover effect on buttons within modal dialogs, e.g. Info, Nodes (#2545)
* Added: CSS hover effect on buttons within modal dialogs, e.g. Info,
Nodes

* Update index.css

Co-authored-by: Tom D'Roza <Tom.D'Roza>
Co-authored-by: Christian Schwinne <cschwinne@gmail.com>
2022-02-17 00:38:47 +01:00
cschwinne
e9a05890a5 Return to core 2.7.4 for higher stability 2022-02-17 00:17:00 +01:00
cschwinne
613809c2af Do not turn rpt segments off 2022-02-16 23:54:14 +01:00
cschwinne
7b969bb8c2 Various state changed logic simplifications
Changed main segment, must be selected
2022-02-16 21:12:33 +01:00
cschwinne
7aef551292 Segment bounds sync option 2022-02-16 14:55:35 +01:00
cschwinne
447b811fa0 Remove build flag leading to wdt reset on some boards 2022-02-14 18:49:13 +01:00
Blaz Kristan
5151aa677f Added ID for segment options syncing. 2022-02-14 16:16:38 +01:00
Blaz Kristan
a5ff34d423 Platformio.ini fix for ESP01 and newer libraries. 2022-02-14 16:15:49 +01:00
dependabot[bot]
435040814d
Bump ajv from 6.12.2 to 6.12.6 (#2543)
Bumps [ajv](https://github.com/ajv-validator/ajv) from 6.12.2 to 6.12.6.
- [Release notes](https://github.com/ajv-validator/ajv/releases)
- [Commits](https://github.com/ajv-validator/ajv/compare/v6.12.2...v6.12.6)

---
updated-dependencies:
- dependency-name: ajv
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-14 15:35:13 +01:00
Blaž Kristan
9987416a4a Allow float array values in usermod config. 2022-02-14 12:19:33 +01:00
Blaž Kristan
31e33e0a8b Fix for creating segments if config set to length. 2022-02-14 08:15:35 +01:00
Blaz Kristan
03cfae45f8 Allow float in usermod array elements. 2022-02-12 23:14:00 +01:00
Blaz Kristan
4f83325e3c Fix for expanding saved preset. 2022-02-12 11:32:49 +01:00
Blaz Kristan
cd1765a0f3 Added permanent ledmap 0. 2022-02-11 14:43:15 +01:00
Blaz Kristan
5c744ad9aa Ledamp dropdown. 2022-02-10 23:14:48 +01:00
cschwinne
b211d8b085 Fix SSDR usermod if SN_Photoresistor mod is not included 2022-02-10 19:48:13 +01:00
Blaz Kristan
f8eece362f Compile fix.
Adjusted function names.
2022-02-10 16:09:16 +01:00
Blaz Kristan
d4ea30e081 Merge branch 'master' into merge-master 2022-02-10 14:16:55 +01:00
Blaž Kristan
83416ee2e0
Merge pull request #2530 from Proto-molecule/patch-api
bugs, json remote repeat, cmd &R=
2022-02-10 14:06:34 +01:00
Blaz Kristan
fa981a389f Add transitions to other segments. 2022-02-10 13:59:59 +01:00
Blaz Kristan
25915b5521 Missing main seg. 2022-02-10 13:59:31 +01:00
Blaz Kristan
ed0dcb5c3d Use transitions on other segments. 2022-02-10 13:56:07 +01:00
Blaz Kristan
55817f31f9 Merge branch 'master' into patch-api 2022-02-10 13:48:48 +01:00
Blaz Kristan
a5b19bbc83 Multiple changes:
- added segment capabilities utility
- removed colorFromUinXX functions
- rewritten IR color handling (changeColor())
2022-02-10 13:24:51 +01:00
Blaz Kristan
f6b44e03ac Removed unused code in rotary encoder. 2022-02-10 13:09:22 +01:00
Blaž Kristan
6d2ef4e0bf
Merge pull request #2539 from dylan09/multirelay-discovery
Fixed buffer overflow in HA autodiscovery. #2538
2022-02-10 00:33:16 +01:00
ulrich
4d714cf9a4 Fixed buffer overflow in HA autodiscovery. #2538 2022-02-09 23:08:42 +01:00
cschwinne
930ded6767 Fix touch pin 2022-02-09 19:59:17 +01:00
Blaz Kristan
4cdb18907f Fix for Four Line Display usermod. 2022-02-09 19:27:52 +01:00
Blaz Kristan
93bccb96b6 Minor fixes
- prevent setValuesFromMainSegment affecting segments
- add ability to define default IR remote at compile time
2022-02-09 17:16:22 +01:00
Henry Gabryjelski
38bc618ee5
Float and better 3rd party library compatibility (#2534)
* define as float (not double)

* Avoid #define of 1 or 2 char symbols

Having this file define 'A' and 'C' pollutes
the global namespace, and causes conflicts
with other libraries that also pollute the
global namespace with short #defines.
It's easier to fix this header.

* unused variable warning
2022-02-09 09:46:54 +01:00
Christian Schwinne
00b0193a43
Fix re-init segment data leak (fixes #2535 ) (#2536) 2022-02-09 08:43:35 +01:00
Blaz Kristan
e2db37d28a Merge branch 'master' into master-merge 2022-02-08 19:35:12 +01:00
bole5
f9bce54104
Change Default Relay Pin to -1 (#2531) 2022-02-08 00:15:24 +01:00
bole5
7ee14724fc
Improve Pin Manager Debugging (#2532) 2022-02-08 00:03:20 +01:00
Blaz Kristan
5988c2ac78 repeat actions cleanup & fix 2022-02-07 11:24:57 +01:00
Blaz Kristan
4eb0dbb5a4 repeat actions cleanup & fix 2022-02-07 11:13:12 +01:00
Proto-molecule
8c5b3fe23e bugs, json remote repeat, cmd &R= 2022-02-06 19:00:03 -08:00
Blaz Kristan
e35ad7551b Apply IR to main or selected segments.
Refactored IR code.
2022-02-07 00:40:45 +01:00
Blaz Kristan
6c943a7158 IR button & W color fix. 2022-02-06 13:15:35 +01:00
Blaz Kristan
2da14e5b2a Merge branch 'master' into merge-master 2022-02-04 16:29:39 +01:00
cschwinne
97f8eea302 Refactored isRgbw to hasWhiteChannel() 2022-02-04 13:28:00 +01:00
cschwinne
04d5932252 Un-F()-ed some strings
(that were either occuring at least 4 times, or were F()-ed in some places and not in others)
2022-02-04 10:10:37 +01:00
Blaž Kristan
84e38f765d Fix for incorrect buffer size when LED count = 256 2022-02-04 07:59:17 +01:00
cschwinne
b33c5798ee Changelog update 2022-02-03 23:37:30 +01:00
Blaz Kristan
81012e60ff Fix for overallocated LiveView buffer. 2022-02-03 20:24:52 +01:00
Blaz Kristan
6180c2f948 Fix for overallocated LiveView buffer. 2022-02-03 20:21:09 +01:00
Blaz Kristan
52f0ae9350 Merge branch 'master' into master-merge
Few UI fixes.
2022-02-03 17:40:44 +01:00
Blaz Kristan
fa0936da3c Fix for ESP8266 bootloop.
Reordered preset sorting.
2022-02-02 22:00:31 +01:00
Blaz Kristan
8a30c6347e Remove error Toast after 10s. 2022-02-02 21:03:26 +01:00
Blaz Kristan
09bcf34050 Non-effect preset should not unload playlist. 2022-02-02 20:53:16 +01:00
Christian Schwinne
795c515999
Merge pull request #2517 from ChuckMash/serial+
Extend Serial functions. Baudrate changeable during runtime and fast LED data retrieval
2022-02-01 20:07:30 +01:00
cschwinne
00dbdc2267 Baud rate setting 2022-02-01 20:02:46 +01:00
cschwinne
32286888e5 PinManager, cleanup and tmp2 out 2022-02-01 18:21:30 +01:00
Christian Schwinne
565d8d8f04
Binary Websockets for Peek (#2516)
* Binary Websockets for Peek

* No IRAM_ATTR here

* Use builtin LittleFS for all ESP32 builds

* Attempt LittleFS compilation fix

* Use tasmota zip for all ESP32 builds

* Revert to Arduino Core 1 for the time being
2022-02-01 12:02:04 +01:00
Blaž Kristan
0a5a0bef48
Enhanced usermods. (#2522) 2022-02-01 09:33:57 +01:00
Blaz Kristan
6e0e5c102e Added extractModeName() utility function. 2022-01-31 20:43:35 +01:00
Blaz Kristan
d31271fee3 Minor fixes:
- optimized setPixelSegment()
- moved extractModeName() to util.cpp
- optimized extractModeName()
- removed SR extensions from /json/effects endpoint (compatibility estabished)
2022-01-31 20:35:11 +01:00
Blaz Kristan
be8a9ae73b setPixelSegment() optimization 2022-01-31 17:56:21 +01:00
Sousanator
afaa001738
Merge branch 'master' into master 2022-01-30 10:51:51 -05:00
ChuckMash
22fbb0e35b
Update wled_serial.cpp
Adds serial functionality

Can now change baud rate during runtime to be faster
Retrieve LED strip data as JSON blob
Retrieve LED strip data as BYTES (fast!)
2022-01-28 23:35:40 -08:00
Blaz Kristan
026a53f3ff Bugfix for expanding timed presets.
Removed AsyncWebServer callbacks (string replace).
2022-01-28 16:31:28 +01:00
Blaž Kristan
e17203ca1b Fix for expand timed presets. 2022-01-28 13:51:52 +01:00
Blaz Kristan
599c7919ce Merge branch 'master' into dev 2022-01-27 21:15:35 +01:00
Blaz Kristan
778b601cd5 Playlist bugfix. 2022-01-27 21:01:03 +01:00
Blaz Kristan
3170fa2208 Playlist bugfix. 2022-01-27 21:00:43 +01:00
Blaz Kristan
07216db864 Merge branch 'master' of https://github.com/aircoookie/WLED 2022-01-27 19:26:56 +01:00
Blaz Kristan
fec870f264 Fix for default action not triggering colorUpdated 2022-01-27 19:26:53 +01:00
Blaz Kristan
4518f089cc Missing settings page. 2022-01-27 16:37:49 +01:00
cschwinne
2c5eba335f Added white channel to Peek (closes #1716) 2022-01-26 13:26:57 +01:00
Mike Ryan
fb19f1ecbc
Allow overriding of color order by LED pixel range. (#2463)
* Overridable color order

- Use `ColorOrderMap` to hold optional color order overrides for ranges
  of LEDs.
- Serialization of config to/from filesystem is complete.
- Back-end configuration is complete.
- TODO: front-end changes to the LED settings page.

* Add Color order override settings

- Adds color order override section to settings page.

* PR Feedback

- Limit max number of color order overrides to 5 on ESP8266
- Only append color overrides if they were provided in the POST of LED
  settings.
2022-01-26 00:42:04 +01:00
Blaz Kristan
91dd03ba67 Merge fix.
Increased JSON buffer for ESP32
2022-01-25 21:24:17 +01:00
Blaz Kristan
86092541ed Merge branch 'master' into dev 2022-01-25 17:53:22 +01:00
Blaž Kristan
e879fe5843
Remove obsolete usermods. (#2510) 2022-01-25 16:42:35 +01:00
Blaž Kristan
0ca7699fe5
Merge pull request #2427 from Aircoookie/sync-seg
Sync segment options.
2022-01-25 12:54:24 +01:00
Blaž Kristan
7f6adfa331 Converted indentation tabs to spaces. 2022-01-25 12:47:14 +01:00
cschwinne
5f0b102671 Send segment ID, start, stop, and cct 2022-01-24 18:31:05 +01:00
Blaz Kristan
70a59daa6f Fix for incorrect repeatable segment. 2022-01-24 17:18:57 +01:00
cschwinne
d28eb6ae21 Repeat other seg than 0 bugfix 2022-01-24 16:44:47 +01:00
Blaž Kristan
34865f797f Factory reset on very long press. 2022-01-24 14:20:21 +01:00
André Klitzing
eca980dfca
Add initial support for ESP32-C3 (#2454)
* WIP Add support for ESP32-C3

* Add esp32c3 to default_envs

* Use new platform from tasmota

* Switch back to 2.8.1 as it seems by fixed
2022-01-24 11:34:02 +01:00
Jason2866
742c792ec7
Use latest Arduino ESP32 (#2502)
build with IDF44-rc1 and Arduino from 21.01.2022. Toolchains updated to 8.4.0 2021r2-patch2
The platform can be used for ESP32, ESP32-S2 and ESP32-C3
2022-01-24 11:28:49 +01:00
Blaž Kristan
24a5f7a38e Fix for colorUpdated() on button 1 press. 2022-01-24 07:41:35 +01:00
Blaz Kristan
554949102b Build bump. 2022-01-23 11:45:18 +01:00
Blaz Kristan
0f3b95802d UI tweaks. 2022-01-23 11:43:39 +01:00
Blaz Kristan
868910fddf Merge branch '4ld-font' into color-order-mapping 2022-01-23 11:14:19 +01:00
Blaz Kristan
436542eff8 Slidercontrol fix. 2022-01-23 11:13:50 +01:00
Blaz Kristan
f4c05c67a2 Minor tweak. 2022-01-22 23:35:00 +01:00
Blaz Kristan
6f7f67df5a Merge branch '4ld-font' into color-order-mapping 2022-01-22 23:20:47 +01:00
Blaz Kristan
50b6163e73 Merge branch 'color-order-mapping' of https://github.com/justfalter/WLED into color-order-mapping 2022-01-22 23:19:59 +01:00
Blaž Kristan
9b062f33c5
Merge pull request #2450 from frankalicious/patch-1
fix name of image for ST7789 usermod
2022-01-22 23:07:15 +01:00
Blaž Kristan
ea15c2245e
Merge pull request #2497 from herm/usermod_multirelay
Add Home Assisant MQTT autodiscovery for usermod multi_relay.
2022-01-22 22:57:24 +01:00
Blaz Kristan
beb539abaf Resizing window fix. 2022-01-22 21:45:47 +01:00
Blaz Kristan
6dd1d45a02 Added config option for HA autodiscovery. 2022-01-22 20:59:51 +01:00
Blaz Kristan
26ae6d3691 Added config option for HA autodiscovery. 2022-01-22 20:49:43 +01:00
Blaz Kristan
90ea01aa46 Possible fix for UI not loading on returning from Settings. 2022-01-22 13:54:17 +01:00
Blaz Kristan
6c52105ac7 Restore original behavior for button 0. 2022-01-21 21:24:49 +01:00
cschwinne
f97bc9dba8 Fix DMX menu settings item 2022-01-21 20:35:30 +01:00
Blaz Kristan
3332375d7c A few fixes.
Added HA autodiscovery to Multi relay usermod.
2022-01-21 17:30:52 +01:00
Blaz Kristan
fe6b1c13c4 Periodic broadcasts. 2022-01-21 16:08:02 +01:00
Blaz Kristan
5608425a12 Added comments.
Fix for incorrect boot state.
2022-01-21 15:55:25 +01:00
cschwinne
f784b01d20 Update year 2022-01-21 01:48:50 +01:00
Hermann Kraus
2648eba5bf
Deprecate usermod mqtt_switch. (#2499) 2022-01-20 23:31:28 +01:00
Blaz Kristan
255347ab77 Minor clenup. 2022-01-20 17:38:18 +01:00
Hermann Kraus
52c36ef6a4 Add Home Assisant MQTT autodiscovery for usermod multi_relay. 2022-01-20 00:30:17 +01:00
Blaz Kristan
ed2e083d13 Added button 0 doubleclick for net info. 2022-01-19 22:15:08 +01:00
Blaz Kristan
80f7c5ed9d Added CCT to rotary encoder. 2022-01-19 20:39:00 +01:00
Blaz Kristan
8d33cbeaca Fix for effect not being applied using rotary encoder. 2022-01-19 16:53:21 +01:00
Blaz Kristan
b0b8bc7385 Dynamic vcomh fix.
New parameter autosave.
2022-01-18 20:29:41 +01:00
Blaž Kristan
edbc8b28d5
Merge pull request #18 from Proto-molecule/blaz-4ld
add VCOMH fix
2022-01-18 10:45:45 +01:00
Proto-molecule
da9bab16e1 add VCOMH fix 2022-01-17 23:26:36 -08:00
Blaz Kristan
75098d8b3e Optimizations 2022-01-17 20:29:14 +01:00
Blaz Kristan
65bb7fd533 Delay for ESP8266 to keep up. 2022-01-16 22:08:57 +01:00
Blaz Kristan
0259e78b2f Minor changes 2022-01-16 22:07:08 +01:00
Blaz Kristan
99b8888a1b Merge branch 'full-seg-sync' into 4ld-font 2022-01-16 15:23:32 +01:00
Proto-molecule
689f4ef606 add glyphs for 32x128 2022-01-15 19:01:09 -08:00
Blaz Kristan
b0c40e1e37 Color change tracking. Minor fixes. 2022-01-15 21:15:37 +01:00
Blaz Kristan
e54819e7e5 Merge branch 'master' into sync-seg 2022-01-15 14:08:08 +01:00
Blaz Kristan
7eb029dcb6 Complete segment syncing.
Reduced complexity of colorUpdated regarding effect/color change.
Minor optimizations.
2022-01-15 14:04:16 +01:00
Blaz Kristan
3da70c3e8b Full segment syncing.
- removed setEffectConfig()
- rate limit handleNightlight()
- fixes in colorUpdated()
- segment color fix in UDP routine
2022-01-15 00:06:06 +01:00
André Klitzing
f8c80283e4
Use arduino-esp32 2.0.2 for ESP32-S2 (#2452)
* Use arduino-esp32 2.0.2 for ESP32-S2

LittleFS is merged into it.

* Fix filesystem error for ESP32-S2

Use platform of tasmota until upstream released it and
use board_build.flash_mode = qio

* Fix empty disk usage

* Add esp32s2_saola to default_envs

* Remove lorol LITTLEFS for esp32dev, too

* Revert "Remove lorol LITTLEFS for esp32dev, too"

This reverts commit 3586d5eef7affa3390bd057232600f6189145706.
2022-01-14 17:19:33 +01:00
Blaz Kristan
72a6681ac1 Merge branch 'full-seg-sync' of github.com:blazoncek/WLED into full-seg-sync 2022-01-14 15:01:34 +01:00
Blaž Kristan
1ab555b590 Cleaning colorUpdated() & UDP segment syncing.
Added selected segments only save.
2022-01-14 14:27:11 +01:00
Blaz Kristan
4602ec7688 Merge branch 'dev' into full-seg-sync 2022-01-13 20:07:08 +01:00
Mike Ryan
5c39d8d12e PR Feedback
- Limit max number of color order overrides to 5 on ESP8266
- Only append color overrides if they were provided in the POST of LED
  settings.
2022-01-13 09:06:01 -06:00
Blaz Kristan
97284fcf87 Prevent continuous polling on error. 2022-01-13 15:27:15 +01:00
Blaz Kristan
c8b1654e0a Some fixes and new slider values. 2022-01-12 21:48:34 +01:00
Blaz Kristan
0400d0e0f0 Additional sliders. 2022-01-12 21:35:10 +01:00
Blaz Kristan
4040f6bec6 Merge branch 'dev' into full-seg-sync 2022-01-12 16:31:44 +01:00
Blaz Kristan
a4a3aa045b A few more slider values added. 2022-01-12 15:45:32 +01:00
Blaz Kristan
a5a18903c7 Merge branch 'dev' into full-seg-sync 2022-01-12 15:15:34 +01:00
Blaz Kristan
6990986d9f Bootloop fix for ALT 4LD. 2022-01-11 21:58:05 +01:00
Blaz Kristan
06ded0098c Aurora speed change.
Fix for Palette title.
2022-01-10 19:00:44 +01:00
Blaz Kristan
f1fbea30f1 Some slider values & defaults. 2022-01-10 18:42:09 +01:00
Blaž Kristan
04f5bdb843 Fix for NTP sync on millis() rollover.
AP mode delay on boot (#2242).
2022-01-10 13:53:11 +01:00
Blaž Kristan
d29283ff21 WIP: segment size in UDP 2022-01-10 09:03:36 +01:00
Blaz Kristan
35779dad8b Merge branch 'dev' into sensor-info 2022-01-09 22:00:09 +01:00
Blaz Kristan
ee0d6420a0 Re-read temperature on error. 2022-01-09 21:43:49 +01:00
Blaz Kristan
f66d847032 Fix for missing character in slider name. 2022-01-09 21:03:57 +01:00
Blaz Kristan
aba4dc7c50 Bugfix for analog button read limitation. 2022-01-09 15:13:58 +01:00
Blaz Kristan
99d0c5e2c6 Fix for bugfix. :)
Reduced millis() calls.
2022-01-09 15:13:33 +01:00
Blaz Kristan
fa55b94528 Bugfix for analog button read limitation. 2022-01-09 15:01:16 +01:00
cschwinne
7fb46cf982 WIP: Segment loop size byte 2022-01-09 14:16:07 +01:00
Blaz Kristan
523752b263 Merge branch 'dev' into full-seg-sync 2022-01-09 00:03:41 +01:00
Blaz Kristan
7df4b8e8cc Sync bugfix (preset, playlist)
PIR sensor bugfix.
2022-01-08 23:53:55 +01:00
Blaz Kristan
7a4ed5a337 UI bugfix. 2022-01-08 12:45:32 +01:00
Blaz Kristan
ec37085e39 Bugfix for nodes button. 2022-01-08 00:04:56 +01:00
Blaz Kristan
61e1e2729d Fix uspIn and mode 2022-01-08 00:04:02 +01:00
Blaz Kristan
ae8281f835 error in udpIn 2022-01-07 21:16:14 +01:00
Blaž Kristan
2efa68dd60 Merge branch 'master' into dev 2022-01-07 19:25:01 +01:00
Blaž Kristan
d2c92781c8 Full segment UDP syncing. 2022-01-07 19:18:16 +01:00
Blaž Kristan
fa35293618 Full segment syncing. 2022-01-07 19:12:06 +01:00
Blaž Kristan
20ccca0aec Swapped grouping and spacing in UDP packet. 2022-01-07 17:53:07 +01:00
Blaž Kristan
10e216da6b Fix for missing middle segment. 2022-01-07 17:48:46 +01:00
Blaž Kristan
6491353a57 Missing rptSeg() 2022-01-07 17:31:28 +01:00
Blaz Kristan
1906523489 Akemi & WLED logo for 4 Line Display usermod.
Commented out unused fonts.
2022-01-07 10:10:34 +01:00
Blaž Kristan
24beaa0d18
Merge pull request #16 from Proto-molecule/patch-1
add logos and Akemi icon to all font libraries
2022-01-07 08:44:36 +01:00
Blaz Kristan
e1deb48121 Optimizing simple UI
- no longer hiding brightness
- cleaner look
2022-01-06 22:21:38 +01:00
Benji
b3891bacaa
add logos and Akemi icon to all font libraries 2022-01-05 23:29:46 -08:00
Blaz Kristan
7939904ee3 4Line & 8Line optimizations and fixes. 2022-01-05 20:58:34 +01:00
Blaz Kristan
7dcd69a2df Fix boot logo.
Comment out unused fonts.
2022-01-05 17:20:50 +01:00
IgorMarkovic
9f44f989e5
Fix staircase mode segment 1 animation (#2469) 2022-01-05 16:09:25 +01:00
Blaž Kristan
002b2d0134 Boot logo. 2022-01-05 10:40:26 +01:00
Blaž Kristan
8b10ec93c2
Merge pull request #15 from Proto-molecule/patch-4
Update usermod_v2_four_line_display_ALT.h
2022-01-05 09:54:36 +01:00
Blaž Kristan
cf9ecd1564
Merge pull request #14 from Proto-molecule/patch-2
Create 4LD_wled_fonts.c
2022-01-05 09:48:16 +01:00
Benji
f31147248b
Update usermod_v2_four_line_display_ALT.h
added draft for logo
2022-01-05 00:08:51 -08:00
Benji
2f9c540660
Update 4LD_wled_fonts.c 2022-01-05 00:06:19 -08:00
Benji
09489feff9
Update 4LD_wled_fonts.c 2022-01-04 23:21:38 -08:00
Benji
0d17a69ee4
Update usermod_v2_four_line_display_ALT.h 2022-01-04 23:09:48 -08:00
Benji
c5755a4ec4
Create 4LD_wled_fonts.c 2022-01-04 23:05:45 -08:00
Blaz Kristan
20bc3719a4 Rotary encoder enhancements:
- Added double press action.
- Rewritten button handling.
2022-01-04 22:25:57 +01:00
Blaz Kristan
7dc41ab205 Merge branch 'dev' into test-4ld 2022-01-04 20:06:00 +01:00
Blaz Kristan
acc21e3b43 Minor simple UI fix and cleanup. 2022-01-04 19:33:27 +01:00
Blaz Kristan
41a6726beb Polish simpified UI 2022-01-04 17:58:36 +01:00
Blaž Kristan
2f8ba75970 Custom font 2022-01-04 12:10:11 +01:00
Proto-molecule
eb08129226
Update usermod_v2_four_line_display_ALT.h
Add icon fonts
2022-01-03 22:07:40 -08:00
Blaz Kristan
816823b115 Simple UI update. 2022-01-03 22:37:21 +01:00
Blaz Kristan
b6059939b4 Bugfix for applying WIN API in JSON request.
Added preset cycling in rotary encoder.
Removed custom font from 4LD in favor of built-in.
2022-01-03 22:23:03 +01:00
Mike Ryan
b8e23b2d7e Add Color order override settings
- Adds color order override section to settings page.
2022-01-02 18:51:00 -06:00
Mike Ryan
a06846fa74 Overridable color order
- Use `ColorOrderMap` to hold optional color order overrides for ranges
  of LEDs.
- Serialization of config to/from filesystem is complete.
- Back-end configuration is complete.
- TODO: front-end changes to the LED settings page.
2022-01-02 18:24:12 -06:00
cschwinne
33f72e40da Replace icon unavailable on some mobile browsers 2022-01-02 18:06:42 +01:00
Blaz Kristan
e8b2d80037 Minor code optimizations. 2022-01-02 14:27:24 +01:00
Blaz Kristan
853463b7cd Bugfixes. 2022-01-02 14:26:09 +01:00
Blaž Kristan
518e1a6405
Merge pull request #12 from Proto-molecule/patch-1
Patch 1
2022-01-02 11:37:30 +01:00
Blaž Kristan
afd376ddbc
Merge branch 'display-enh' into patch-1 2022-01-02 11:34:45 +01:00
Blaz Kristan
1ce325ee8a Modifications to 4LD 2022-01-02 11:28:44 +01:00
Blaz Kristan
1e947a34a8 Merge branch 'master' into dev 2022-01-01 16:36:06 +01:00
Blaz Kristan
fe1e5aeebf Merge branch 'dev' into sensor-info
Conflicts:
	usermods/Temperature/usermod_temperature.h
2022-01-01 12:57:36 +01:00
Blaz Kristan
8386b9a0b4 Removed dynamic JSON buffer entirely.
Temporary presets in RAM (ESP32)
Async loading of presets (stability).
Other minor fixes.
Bumped version to 0.13.1-bl6
2022-01-01 12:52:50 +01:00
Blaz Kristan
40323e3afe UM optimizations. 2021-12-31 18:25:27 +01:00
Blaž Kristan
18868a5bd6
Date controlled timed presets. (#2447)
* Date controlled timed presets.

* C/P fix for sunset.

* Fixed % escape character

* Date range support

* Date logic fix

Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
2021-12-31 14:09:48 +01:00
Christian Schwinne
754682577c
Configurable framerate (#2444)
Updated arduino core versions
Better performance on esp32 core 3.x due to IRAM_ATTR
Fixed analog busses init to full white/on
2021-12-30 01:48:27 +01:00
Blaz Kristan
603dee7661 Apply FX defaults fix.
ALT 4LD optimizations.
2021-12-29 19:12:30 +01:00
Blaz Kristan
2a27cc46e2 Added forcing NTP update on Time&macro save. 2021-12-29 17:03:03 +01:00
Blaz Kristan
a9a06a1e4e Fix for NTP sync on millis() rollover. 2021-12-29 15:09:33 +01:00
Blaz Kristan
5f73725b8f Yet naother fix. 2021-12-28 22:14:47 +01:00
Blaz Kristan
324983024a Temporary fix for incorrect temperature reading. 2021-12-28 21:53:29 +01:00
Blaz Kristan
7cb63b1da0 Fix for default values loaded even with preset. 2021-12-28 21:38:28 +01:00
Blaz Kristan
31603380c1 Bugfix autosegments & solid pattern 2021-12-28 18:53:30 +01:00
Blaz Kristan
5a3d3b0324 Default values for effects.
Moved mode names to FX_fcn.cpp
2021-12-28 18:09:52 +01:00
Blaž Kristan
78006855ee Fix for 8266 default core. 2021-12-28 07:30:05 +01:00
Sousanator
71520f6709
Update const.h
Added option for LDP6803
2021-12-27 18:06:58 -05:00
Sousanator
3f5a09229d
Update settings_leds.htm
Added option for LPD6803
2021-12-27 18:04:14 -05:00
Sousanator
5609771993
Update html_settings.h 2021-12-27 18:01:42 -05:00
Sousanator
79b01cdc3c
Update bus_wrapper.h
Added support for LPD6803
2021-12-27 17:54:37 -05:00
Blaz Kristan
73f99b5e22 Bugfix for restoring previous LED state. 2021-12-27 16:13:59 +01:00
Blaz Kristan
7d6f8eb495 WS notifications on PIR state change. 2021-12-27 15:40:29 +01:00
Blaz Kristan
eac5340b03 Merge branch 'configurable-fps' of https://github.com/aircoookie/WLED into dev 2021-12-26 11:59:22 +01:00
frankalicious
aef0243b73
fix name of image for ST7789 usermod 2021-12-26 11:06:20 +01:00
akshay rajput
736053e24e
Patch to remove preceding zero of hour digit for 7segment usermod (#2445)
* Update usermod_seven_segment_reloaded.h

* Update usermod_seven_segment_reloaded.h
2021-12-26 02:29:56 +01:00
Blaz Kristan
36b196dd93 Date controlled timed presets. 2021-12-25 18:46:43 +01:00
cschwinne
549dcd32ca Configurable framerate
Updated arduino core versions
Better performance on esp32 core 3.x due to IRAM_ATTR
Fixed analog busses init to full white/on
2021-12-25 01:30:27 +01:00
Blaz Kristan
a59f56d852 LAT/LON helper for Samsung devices. 2021-12-23 20:37:22 +01:00
Blaz Kristan
2c14181051 LAT/LON helper for Samsung devices. 2021-12-23 20:32:45 +01:00
Blaz Kristan
c2b9e06a4a Color slot selection glitch fix. 2021-12-22 23:04:58 +01:00
Blaz Kristan
964978d45b Optimizations. 2021-12-22 18:37:14 +01:00
Proto-molecule
599490bb6e
bugs
line 436: perhaps this needs to be 256?
2021-12-22 01:18:29 -08:00
Proto-molecule
a841e1fb2e
bugs
Line 526: "now - lastRedraw" equates to a negative number and forces the screen into sleep mode
Line 646, 660: if the array size isn't at least the length of the longest name of an effect or palette, then it will not fully print. "Fireworks Starburst" is the longest one at 19 characters. this it kinda a bandaid fix because a longer name may come in the future.
2021-12-22 00:43:14 -08:00
Blaz Kristan
296fe4b62e Unload playlist on timed presets. 2021-12-21 22:46:06 +01:00
Blaz Kristan
cb4c736fab Bugfix galore. 2021-12-21 20:43:49 +01:00
Blaz Kristan
118f02fd11 Unload playlist on timed presets. 2021-12-21 18:47:21 +01:00
Blaz Kristan
990d0f6e3e Fix for skipping reset of segments when changing spacing. 2021-12-21 18:26:51 +01:00
Blaz Kristan
84624666ce Incorrect delete fix. 2021-12-21 18:16:25 +01:00
Blaž Kristan
42474e551f Added check for newest parameter and bus frequency 2021-12-21 12:38:19 +01:00
Blaž Kristan
061e055d1b Optimizations in ALT rotary encoder & display usermods. 2021-12-21 11:20:11 +01:00
Blaz Kristan
12f2caa8d6 Alt Rotary Encoder & Alt 4LD enhancements. 2021-12-20 20:44:06 +01:00
Blaz Kristan
8bd716c056 Prevent undefind FX behaviour on millis() rollover 2021-12-20 16:43:47 +01:00
Blaž Kristan
b890b5f0dc millis() rollover fix for effects 2021-12-20 11:29:03 +01:00
Andy Hofmann
cd95abb2a1
Usermod quinled-an-penta: Updated IOs for v1r1 release (#2429)
* UM QuinLED-An-Penta: First version

* UM QuinLED-An-Penta: Made OLED seconds a setting; small improvements

* UM QuinLED-An-Penta: Fixed unique ID

* Merge branch 'master' of https://github.com/Aircoookie/WLED

* UM QuinLED-An-Penta: Fixed config loading

* UM QuinLED-An-Penta: Replaced ledcRead() with calculating the percentage

* UM QuinLED-An-Penta: Fixed temp sensor readings

* UM QuinLED-An-Penta: Removing OLED bus clk setting

* UM QuinLED-An-Penta: ETH support, lots of OLED improvements

* UM quinled-an-penta: v1r1 adjustments
2021-12-20 01:41:37 +01:00
Blaz Kristan
c3df9e6270 Increased time before reading temperature.
4LD modifications.
2021-12-19 21:14:54 +01:00
Blaz Kristan
6463fbee32 Fix for usermod sornt& rotary encoder. 2021-12-19 16:50:55 +01:00
Blaz Kristan
e43cdc6674 Slight optimization in Temperature usermod. 2021-12-19 12:05:28 +01:00
Blaz Kristan
59216a9ae1 UI refinements.
Disconnect all WS clients on low mem.
2021-12-18 17:13:15 +01:00
Blaz Kristan
47a620bd36 Merge branch 'dev' into sync-seg 2021-12-18 10:26:20 +01:00
Blaz Kristan
37dbf4d8ec Prevent memory exceptions using WS. 2021-12-18 10:25:58 +01:00
Blaz Kristan
1270f2d577 Sync segment options.
Freeze effect.
Repeat last segment until end.
2021-12-17 20:33:48 +01:00
Blaz Kristan
80a067806d Spacing & grouping notification. 2021-12-17 17:36:12 +01:00
Blaz Kristan
f20065f546 Notification & UI fix 2021-12-17 17:29:39 +01:00
Blaž Kristan
43d50e270a Syncing segment options. 2021-12-17 11:22:20 +01:00
Blaž Kristan
c27117e99e
Merge pull request #2415 from Aircoookie/i2c-sharing
Pin manager support for sharing multipin buses.
2021-12-16 19:57:08 +01:00
Blaž Kristan
9c84f13425 Add debug output in case of CRC error reading temp 2021-12-16 10:47:56 +01:00
Blaz Kristan
b2cf7a16f2 Added different reading for DS18S20 sensor 2021-12-15 19:34:06 +01:00
Blaž Kristan
28556790d6 Removed loadInfo() in animated staircase. 2021-12-14 10:35:50 +01:00
Blaž Kristan
41c9bb63a0 Pin manager support for sharing multipin buses. 2021-12-14 09:38:38 +01:00
Blaž Kristan
c2b2fafc9c Bugfix in 4LD. 2021-12-14 06:32:08 +01:00
Blaz Kristan
5b88ba6d1d fix when hiding color slots 2021-12-13 17:57:18 +01:00
Blaz Kristan
d036021a78 Build bump. 2021-12-12 10:03:11 +01:00
Roman Reitschmied
7d5e2466f0
add ability get LDR value from other usermods (#2408) 2021-12-12 00:31:54 +01:00
Roman Reitschmied
d3f35955d6
New flexible usermod for seven segment displays (#2409)
* add first version

* added max/min brightness to autoldr functionality

* added more information to the readme
2021-12-12 00:31:21 +01:00
cschwinne
fb338c0728 Button preset call mode
(stops main segment values from being applied to all presets)
2021-12-11 23:44:21 +01:00
Blaz Kristan
5462d1e9f8 Bugfix
- incorrect bus length
- invalid relay state
- preset JSON corruption on network call
- iro & rangetouch serving
2021-12-11 23:17:47 +01:00
cschwinne
2ce8f1ee5d Skip first and apply preset fixes 2021-12-11 19:30:11 +01:00
Blaz Kristan
3f0258e215 Playlist corrupting JSON buffer bugfix. 2021-12-10 20:45:37 +01:00
Christian Schwinne
e72a8d999f
Merge pull request #2393 from guardmedia/blends-effect
Improved speed and reduced memory usage for Blends effect
2021-12-10 18:42:46 +01:00
Blaž Kristan
fed16fd14e Fix for disconnects on ESP8266 with static JSON buffer 2021-12-10 17:30:57 +01:00
Blaž Kristan
5dbc45ecb9 Fix for incorrectly placed release JSON buffer. 2021-12-10 17:06:04 +01:00
Blaž Kristan
2f411dfc9c Added compile time default for 4LD usermod. 2021-12-10 16:59:56 +01:00
Blaž Kristan
d6cff870e5 Incorrect JSON buffer release fix. 2021-12-10 13:29:42 +01:00
Blaž Kristan
e1cd45c57e Bugfix for heap low disconnect. 2021-12-10 12:51:44 +01:00
Blaz Kristan
7572b6f66b Remove volatile. 2021-12-09 15:08:19 +01:00
Blaž Kristan
e489b08bc1 Possible double JSON use bugfix. 2021-12-09 13:01:22 +01:00
Blaz Kristan
094bdb29b6 Fix for >10 buttons. 2021-12-08 22:41:16 +01:00
Blaz Kristan
712e05479b Cleanup.
Bugfixes.
Changed links to point to kno.wled.ge
2021-12-08 22:05:51 +01:00
Blaž Kristan
7c6c9eed36 Prevent autozoom on input fields. 2021-12-08 14:38:21 +01:00
Blaž Kristan
63eee28a82 Slow down loading rangetouch.js 2021-12-08 10:09:45 +01:00
Blaž Kristan
0777eaad10 Minor styling changes. 2021-12-08 10:00:31 +01:00
cschwinne
9e6866c160 0.13.0-b6 2021-12-08 01:22:48 +01:00
Blaz Kristan
974dd8ce57 Recusive palette update fix. 2021-12-07 19:17:26 +01:00
Blaz Kristan
957d08f4c6 Merge branch 'dev' into gzip
Minor fixes.
Enhanced SR UI handling for palettes.
2021-12-07 18:53:38 +01:00
Blaz Kristan
156b499f93 Merge branch 'master' of https://github.com/aircoookie/WLED into dev 2021-12-07 17:18:38 +01:00
Blaz Kristan
f31100326b Fixes. 2021-12-07 16:31:45 +01:00
Blaž Kristan
9b7b1d6a61 Minor cleaning. 2021-12-07 13:49:36 +01:00
cschwinne
7101ad81c4 No auto white for RGB DDP bus 2021-12-07 13:37:28 +01:00
cschwinne
8643263227 Add two new Fairy FX modes 2021-12-07 11:03:41 +01:00
Blaž Kristan
409c1b7584 Added comments. 2021-12-07 08:26:01 +01:00
Tyler Walters
eab132ed32 Improved speed and reduced memory usage for Blends effect
color_blend() function only generates 256 colors from the palette before repeating. Improved the function to use either 256 max or the segment length if shorter.
2021-12-06 22:17:35 -05:00
Blaz Kristan
f45b5da71a GZIPped UI & settings pages.
settings.js for pasting data into HTML.
Reduced simple & classic flash footprint.
Split iro.js and rangetouch.js into separate requests (instead of embedding)
2021-12-06 20:53:09 +01:00
Blaz Kristan
f57b606f72 Added info.sensor properties for motion and temperature
(HA integration)
2021-12-06 20:13:18 +01:00
Christian Schwinne
66bad2b6f8
Single json buffer (#2336)
* Single/static JSON buffer for all requests.

* Missing json.cpp changes.

* Async fix.

* Added conditional compile (WLED_USE_DYNAMIC_JSON).

* Advanced locking with time-out.

* Missing releaseJSONBufferLock() on error response.

* Fix for config saving.

* Fixes and optimisations.
Dadded debugging information.

* Fix for ledmaps.

* No unsolicited serial sending if GPIO1 allocated

* Stray semicolons

* Fix JSON ledmap

Co-authored-by: Blaz Kristan <blaz@kristan-sp.si>
2021-12-04 01:05:01 +01:00
Blaz Kristan
44f9bc5f0e Revert hiding UI elements. 2021-12-03 21:17:59 +01:00
Blaz Kristan
5c7e3c6bab Bugfixes. 2021-12-03 21:09:53 +01:00
cschwinne
46ec504743 Various fixes
Fixed ESP32 crash on Colortwinkles brightness change
Fixed setting picker to black resetting hue and saturation
Fixed auto white mode not saved to config
2021-12-03 20:36:37 +01:00
Blaž Kristan
737151ba09 UI optimization. 2021-12-03 14:26:26 +01:00
Blaz Kristan
2eef39d64a UI fix. 2021-12-02 22:57:32 +01:00
Blaž Kristan
821f76bcd6 Additional merge conflict. 2021-12-02 13:24:14 +01:00
Blaž Kristan
37ec058572 Merge conflict resolvement. 2021-12-02 13:09:53 +01:00
cschwinne
cadda12371 Fixed spacing LEDs not blanked if offset is changed 2021-12-02 00:52:36 +01:00
cschwinne
a643b56555 Fixed no color updated on full JSON state request 2021-12-01 23:03:30 +01:00
Blaž Kristan
aa34df7a4c Merge branch 'master' of https://github.com/Aircoookie/WLED into new-CCT 2021-12-01 14:51:45 +01:00
cschwinne
f7404085de Unload playlist on PL= 2021-12-01 00:20:33 +01:00
cschwinne
33036e7599 Fix sliders on page load if black is set 2021-12-01 00:16:43 +01:00
Christian Schwinne
f6e5b67f0d
Merge pull request #2285 from Aircoookie/CCT-support
CCT (color white balance support)
2021-11-30 23:41:13 +01:00
Jeff Cooper
9547ac353d
Save and load the e131 Proxy Universe setting in the DMX menu (#2365) 2021-11-30 23:10:23 +01:00
cschwinne
48339b19d4 Status LED support in Bus manager 2021-11-30 22:52:17 +01:00
Blaz Kristan
0f8d464706 Use sacrificial pixel as a STATUSLED 2021-11-30 16:28:26 +01:00
Blaz Kristan
d6be7b4cae cdata.js and simple UI optimization. 2021-11-30 16:27:55 +01:00
Blaž Kristan
70aa01b261 Bugfix to allow more than 10 buttons. 2021-11-28 11:24:58 +01:00
cschwinne
11c7ffad4e Alexa and UDP sync CCT support 2021-11-28 04:01:58 +01:00
cschwinne
1973424e05 Remove JSON ledmap
(to be implemented in #2336 )
2021-11-28 01:27:51 +01:00
Christian Schwinne
16d97d3c63
Merge branch 'master' into CCT-support 2021-11-28 01:21:57 +01:00
cschwinne
3e6728fedb Only do auto white calc for busses with white channel
Revert auto white to global setting
Rounded /settings buttons by blazoncek
Removed obsolete script from /settings
2021-11-28 01:21:17 +01:00
cschwinne
3e9aea072d CCT blending setting 2021-11-27 16:49:42 +01:00
Blaz Kristan
fcfb73c755 Merge branch 'master' into dev 2021-11-27 15:05:32 +01:00
Blaz Kristan
12ce3282ff Dynamic position of repeat button. 2021-11-27 14:31:23 +01:00
Blaz Kristan
9f3e66fff0 Cleaning up indentations (sorry but my OCD is strong). 2021-11-27 11:50:18 +01:00
cschwinne
624993fc89 CCT transitions 2021-11-27 01:33:48 +01:00
cschwinne
ba8a00764a cctFromRgb option 2021-11-26 20:18:38 +01:00
Blaž Kristan
49f79a331c Allow different 1st segment. 2021-11-26 09:39:49 +01:00
cschwinne
3dec4a6651 UI slider and CCT adjustments 2021-11-26 02:06:05 +01:00
Blaz Kristan
ac0a853030 Optimised autosegments. 2021-11-25 22:17:40 +01:00
Blaz Kristan
e8ae4e76a3 CRLF fix. 2021-11-25 22:05:16 +01:00
Blaz Kristan
c73b098f30 Autocreate identical segments. 2021-11-25 22:04:05 +01:00
Blaz Kristan
4292e26135 More lehible links.
Fixed AP xreation on boot with wifi enabled.
2021-11-25 06:41:37 +01:00
cschwinne
02fb2550d0 Shorter link color 2021-11-24 12:38:54 +01:00
cschwinne
37bd525638 Improve link contrast 2021-11-24 11:04:50 +01:00
cschwinne
ea0f37f5b9 CCT bus manager logic simplification
CCT from RGB if none set (-1)
2021-11-24 11:02:25 +01:00
Blaz Kristan
d09d7521d6 Collapsing expanded dialogs in UI. 2021-11-23 20:21:22 +01:00
Blaz Kristan
20d03cb817 Incrementing & random effect, palette via JSON API
Moved utility functions to util.cpp
2021-11-23 20:20:19 +01:00
Blaz Kristan
97b3c3db7b Incrementing & random effects, palettes via JSON. 2021-11-23 20:05:51 +01:00
cschwinne
b97b6dc144 Remove F macro for "ps" 2021-11-23 13:17:33 +01:00
Blaz Kristan
b07bbab069 Merge branch 'master' into dev
Retained GPIO16 as default on ESP32.
2021-11-22 22:50:26 +01:00
cschwinne
c8d5218c65 Updated outdated wiki links in readme 2021-11-22 22:23:51 +01:00
cschwinne
80a657965e Fixed preset cycle not working from preset called by UI 2021-11-22 21:41:04 +01:00
cschwinne
b3324d22f5 allowCCT performance improvement 2021-11-21 23:46:44 +01:00
Blaz Kristan
295663f6a6 Removed loadInfo().
Fixed UI when no WS available.
2021-11-21 14:14:39 +01:00
Blaz Kristan
47caa2c3a0 Missing releaseJSONBufferLock() in IR code 2021-11-21 09:33:54 +01:00
Blaz Kristan
4ddc422cfa More bugfixes. 2021-11-20 19:31:28 +01:00
Blaz Kristan
856c8aa611 Bugfix for effect names. 2021-11-20 18:28:59 +01:00
Blaz Kristan
6f600f74af A few additional descriptions. 2021-11-20 14:35:44 +01:00
Blaz Kristan
be8db602b8 New endpoint for UI slider control (WLED-SR ext.)
Minor UX optimizations.
2021-11-20 12:26:04 +01:00
Blaz Kristan
7871e868a9 Stupid bugfix. 2021-11-19 22:16:08 +01:00
Blaz Kristan
44467971f2 Minor fix. 2021-11-19 22:01:37 +01:00
Blaz Kristan
108fc4a0d8 Pin manager enhancements (sharing I2C pins).
Effect helpers in UI.
2021-11-19 21:49:23 +01:00
cschwinne
31b7cdff9b Change effect names to be more consistent 2021-11-19 12:34:14 +01:00
Christian Schwinne
0465298507
Merge branch 'master' into CCT-support 2021-11-18 16:50:24 +01:00
Blaz Kristan
65ac8d4b2b Merge branch 'master' into dev 2021-11-17 21:42:27 +01:00
Blaz Kristan
dd59e3a831 Rounded buttons. 2021-11-17 17:28:52 +01:00
Blaz Kristan
1e98d56bb6 Removed conditional compile. 2021-11-17 16:34:08 +01:00
cschwinne
d31e4c7815 Added getPinOwner
Only disable builtin LED if bus to avoid breaking other things on the pin
2021-11-17 11:13:07 +01:00
cschwinne
4af1f62aab Revert testing PIO changes 2021-11-17 01:19:04 +01:00
cschwinne
bc403440ba 0.13.0-b5 2021-11-17 01:18:19 +01:00
Christian Schwinne
38d8dfe5ab
Improv support (#2334)
* Working Improv device identification

* Improv functional

* Cast fix

* Minor fix for two back-to-back Improv packets

* Improv checksum update and logic simplification

* Improved improv failed connection behavior
2021-11-16 23:20:26 +01:00
Blaž Kristan
bee93f4743 Merge branch 'dev' of https://github.com/blazoncek/WLED into dev 2021-11-16 08:25:21 +01:00
Blaž Kristan
9888510158 Updated readme.md for usermods. 2021-11-16 08:25:01 +01:00
Blaz Kristan
5fd4ed91d8 Fix for unselected effect on UI load. 2021-11-15 18:40:17 +01:00
Blaž Kristan
2a949cd8f1 added notification option for PIR usermod. 2021-11-15 14:49:41 +01:00
Blaz Kristan
312cbc86e9 Bugfix.
Debugging info added.
2021-11-14 16:56:34 +01:00
Blaz Kristan
85ded6e500 Advanced locking with time-out.
Bugfixes.
2021-11-12 23:33:10 +01:00
Blaz Kristan
ce5a81d83c Minor UI fix. 2021-11-11 22:48:50 +01:00
Blaz Kristan
eb92c0bbf5 Fix for ACCURATE auto-white mode. 2021-11-11 17:34:38 +01:00
Blaž Kristan
5453ae81a6 Fix for white calculation in ACCURATE mode. 2021-11-11 07:20:17 +01:00
Blaz Kristan
ff84f2b2f7 Merge branch 'master' into dev 2021-11-10 16:50:39 +01:00
Jeff Cooper
6df64d0d31
Fix a bug which prevents DMX channel mappings from loading correctly. (#1525) (#2328) 2021-11-10 00:29:04 +01:00
Blaz Kristan
e9ac20a149 Merge branch 'master' into dev 2021-11-09 21:27:58 +01:00
cschwinne
83753a5f81 Fixed no gamma correction for JSON individual LED control 2021-11-09 17:50:29 +01:00
Blaz Kristan
7a228cac43 Bugfix for network 'pin' conflict. 2021-11-09 17:49:05 +01:00
Blaz Kristan
3161f5fa47 Fix for network 'pin' conflicts. 2021-11-09 17:46:05 +01:00
Blaž Kristan
442741d246 Merge branch 'master' into dev 2021-11-09 14:07:46 +01:00
Christian Schwinne
5784092c1b
Fix settings JS buffer too small (#2323) 2021-11-09 09:56:02 +01:00
Blaž Kristan
d6ad089c60
Merge pull request #2324 from yoeywire/DMXdefine
Corrected WLED_USE_DMX to WLED_ENABLE_DMX
2021-11-09 07:57:41 +01:00
Blaz Kristan
89ff8b3fcb Merge branch 'single-doc' into dev 2021-11-08 21:51:26 +01:00
Blaz Kristan
5773f141b8 Minor changes.
Added compile-time WS2801 bus speed option WLED_WS2801_SPEED_KHZ.
2021-11-08 21:51:15 +01:00
yoeywire
446b4b084c Changed WLED_USE_DMX to WLED_ENABLE_DMX 2021-11-08 17:05:47 +01:00
Blaz Kristan
f8da8f6929 Added conditional compile for dynamic JSON buffer.
- WLED_USE_DYNAMIC_JSON
Minor fixes.
2021-11-07 11:58:16 +01:00
Blaz Kristan
f7de055f67 Minor tweaks. 2021-11-06 10:35:00 +01:00
Blaz Kristan
07d09aea85 Make WS onLoad(). 2021-11-05 23:25:11 +01:00
Blaz Kristan
f63ceed1ae LoadInfo WS. 2021-11-05 23:01:23 +01:00
Blaz Kristan
b93d72296c Async response bugfix. 2021-11-05 23:00:38 +01:00
Blaz Kristan
d590e01a58 Merge branch 'master' into CCT-support 2021-11-05 21:27:52 +01:00
Blaz Kristan
1bc15a8507 Increased JSON buffer on 8266.
Minor tweaks.
2021-11-04 21:19:16 +01:00
Shaun Eccles-Smith
adeb9bccb1
Use New Issue Forms for Bug Reports (#2312)
* Convert to Github Issue Forms

* Remove pre-filled title

* Change bug report from textarea to input
2021-11-04 12:23:53 +01:00
Blaž Kristan
5cf26af9f0 Merge branch 'dev' into single-doc 2021-11-04 10:05:02 +01:00
Blaž Kristan
04c9646e05 Merge branch 'master' into dev 2021-11-04 10:04:21 +01:00
Blaz Kristan
67bf1a93e4 Removed dynamic dependency. 2021-11-03 22:47:34 +01:00
Blaz Kristan
c263f11170 Merge branch 'dev' into single-doc 2021-11-03 19:57:52 +01:00
Blaz Kristan
bb4c646714 Bugfix.
Added Enabled option to 4LD usermod.
2021-11-03 18:01:13 +01:00
cschwinne
b44ffffed8 Fixed DDP override 2021-11-03 16:14:01 +01:00
Blaž Kristan
bd521f858e Single JSON buffer. 2021-11-03 14:52:22 +01:00
Blaž Kristan
f66fcfbe6d Minor change in handling mode names. 2021-11-03 12:08:29 +01:00
Christian Schwinne
2bdaf53ecf
Merge pull request #2311 from underritoSR/master
Add MX-CST/CDT Time Zone
2021-11-03 09:14:22 +01:00
Rod Minor
46e7db6d94 Add MX-CST/CDT Time Zone
Add the Mexico City CST/CDT timezone.
The start and finish date for DLS differs with the US-CST/CDT rules.
2021-11-02 21:26:11 -06:00
Blaž Kristan
10fc9fe268 Updated usermods for WLED-SR FX mode names. 2021-11-02 13:12:14 +01:00
Blaz Kristan
73c75635b1 Update simple page.
Code simplification.
2021-10-31 22:23:26 +01:00
Blaz Kristan
cc7d745ce6 Adopted WLED-SR slider, color & palette control.
Added "freeze" toggle to a stopwatch icon.
2021-10-31 15:52:41 +01:00
Christian Schwinne
7e1920dc4b
Remove ledCount (#2300)
Bus initialization on reading from eeprom
2021-10-31 11:57:41 +01:00
Blaž Kristan
a93f05c047
Multirelay button support. (#2284)
* Multirelay button support.
Added button hook for usermods.

* Added MultiRelay relay states to JSON state object

* Move button timings to constants

No delay waiting for double press on button 0 if no macro set

Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
2021-10-31 11:57:03 +01:00
Christian Schwinne
00238247cd
JSON in/decrementing (#2258)
* Initial JSON in/decrementing

* Segment brightness in/decrement

* Update json-increment (#2290)

* Add Basic Overlay support to Usermods.

* Add seven segment overlay usermod

* Add seven_seg debug build

* Add scrolling message to seven seg um

* Fixed red color on IP address

* bh1750

* Add msg scroll. Add MQTT and Config support

* Add readme

* Restore platformio.inii

* Edit comments

* Add strip off refresh option in LED settings. (#2259)

* Add strip off refresh option in LED settings.
New strip initialization logic.
Minor code clen-up.

* Dev code removal.

* Missing ethernet include

* Renamed mainseg to selseg

* Fix for preset cycling bounds.

* "Preset 0" bugfix.

* Auto segments only if segments were not modified

Co-authored-by: cschwinne <dev.aircoookie@gmail.com>

* Exclude virtual busses from current calculation (#2262)

* Refactor string usage

* 0.13.0-b4

* Fix MQTT Null publish

* Additional Flash string concat

* Add AKST/AKDT

* UM RGB-Rotary-Encoder: Properly used PinOwner

* Cycling bugfix.

Co-authored-by: Gregory Schmidt <gregory.b.schmidt@hotmail.com>
Co-authored-by: Blaž Kristan <blaz@kristan-sp.si>
Co-authored-by: Caleb Mah <calebmah@gmail.com>
Co-authored-by: ezcGman <ich@andy-hofmann.com>

* Working JSON preset cycle

* Fix some Codacy style issues

Co-authored-by: Gregory Schmidt <gregory.b.schmidt@hotmail.com>
Co-authored-by: Blaž Kristan <blaz@kristan-sp.si>
Co-authored-by: Caleb Mah <calebmah@gmail.com>
Co-authored-by: ezcGman <ich@andy-hofmann.com>
2021-10-30 14:42:17 +02:00
Andy Hofmann
b33e28835d
New Usermod: QuinLED-An-Penta (#2296)
* UM QuinLED-An-Penta: First version

* UM QuinLED-An-Penta: Made OLED seconds a setting; small improvements

* UM QuinLED-An-Penta: Fixed unique ID

* Merge branch 'master' of https://github.com/Aircoookie/WLED

* UM QuinLED-An-Penta: Fixed config loading

* UM QuinLED-An-Penta: Replaced ledcRead() with calculating the percentage

* UM QuinLED-An-Penta: Fixed temp sensor readings

* UM QuinLED-An-Penta: Removing OLED bus clk setting

* UM QuinLED-An-Penta: ETH support, lots of OLED improvements
2021-10-30 11:38:09 +02:00
Blaz Kristan
044d830b64 Removing palettes on Solid effect.
Bubbling bugfix for effect selection.
Re-introduced 'tt'.
2021-10-29 23:55:42 +02:00
Blaz Kristan
38c84bb1f6 Minor tweak. 2021-10-29 22:30:20 +02:00
Blaz Kristan
b50e066dee Reintroduction of STATUSLED 2021-10-27 17:49:35 +02:00
Blaž Kristan
f55f803531
Updated aut-white calculation. 2021-10-27 14:02:48 +02:00
Blaž Kristan
757e8eb57c Bugfix in auto-white calculation. 2021-10-27 08:17:51 +02:00
Blaz Kristan
a696afaeb8 Color mangling macros.
Removed legacy Auto White caclulation.
2021-10-26 20:35:45 +02:00
Blaz Kristan
8ca298b299 Removed legacy auto-white calculation.
Introduced color mangling macros.
Minor optimizations/fixes.
2021-10-26 19:17:42 +02:00
Blaz Kristan
cde497c94e Fixing conflict merge errors. 2021-10-26 06:29:49 +02:00
Blaz Kristan
090e29effd Moved auto white calculation to bus manager.
Other minor fixes.
2021-10-25 20:15:42 +02:00
Blaž Kristan
94cf6424f5 Added MultiRelay relay states to JSON state object 2021-10-25 14:09:51 +02:00
Blaz Kristan
b8013a57e2 Moved auto white calcualtion into bus manager. 2021-10-24 21:07:05 +02:00
Blaz Kristan
1b23210902 Bus manager changes for easier CCT & auto white.
Attempted per-strip auto white calculation (odd bug encountered).
2021-10-23 15:41:35 +02:00
Blaz Kristan
0acca2e313 Cycling bugfix. 2021-10-22 23:24:41 +02:00
Blaz Kristan
4bb30deca6 Gap bugfix. 2021-10-22 21:36:54 +02:00
Blaz Kristan
31bf615fe8 Playlist bugfix. 2021-10-22 21:31:03 +02:00
Blaz Kristan
0d77027f60 Bugfix for white value. 2021-10-22 07:21:47 +02:00
Blaz Kristan
bbf46358fa Fix for simple page. 2021-10-21 22:59:47 +02:00
Blaz Kristan
1cf793233f Removed experimental v2 segment API.
Bugfix for white value.
2021-10-21 21:33:26 +02:00
Blaz Kristan
39b7b3ad53 CCT (color white balance support) 2021-10-20 20:29:13 +02:00
Blaz Kristan
7acc537c7a Added JSON info to doc and multiple relay control. 2021-10-20 18:12:24 +02:00
Blaz Kristan
97c1a2245b Too much yield()ing hutrs. 2021-10-18 20:00:11 +02:00
Blaz Kristan
8e9269fdf9 Button support for multi-relay usermod. 2021-10-18 17:37:51 +02:00
Blaz Kristan
d9b2037b50 Multi relay fixes. 2021-10-17 20:56:24 +02:00
Blaz Kristan
95827c3ada White slider bugfix.
Increased multi-relay update frequency.
2021-10-17 19:18:56 +02:00
Blaz Kristan
4e2bbc04fa Button handling hook for usermods. 2021-10-17 17:14:55 +02:00
Blaz Kristan
61eff6e7e8 Update build. 2021-10-17 16:26:43 +02:00
Blaz Kristan
1d4d5f0c93 Minor fixes & optimizations. 2021-10-17 14:38:19 +02:00
Blaž Kristan
00f1b483eb
Merge pull request #2279 from ezcGman/um-rgb-rotary-encoder
UM RGB Rotary Encoder: Now properly using the PinOwner class and unique ID
2021-10-17 14:16:18 +02:00
Blaz Kristan
939de6b177 Merge branch 'master' into dev 2021-10-17 10:09:22 +02:00
ezcGman
c3d48acb4c UM RGB-Rotary-Encoder: Properly used PinOwner 2021-10-17 01:24:23 +02:00
Blaz Kristan
ad4bc206ab Configuration templates. 2021-10-16 21:44:53 +02:00
Blaz Kristan
8cfa5ba39e Fix simple CSS.
Add WELD community link.
2021-10-16 15:45:04 +02:00
Blaz Kristan
c2e6d1c6bf Squashed commit of the white-balance branch.
Updated simple UI.
Minor change in ST7789 display.
2021-10-16 15:13:30 +02:00
Blaž Kristan
392bda7d8c
Merge pull request #2261 from AK5nowman/overlayum
Basic Usermod Overlay support & Seven Segment UM
2021-10-13 06:14:32 +02:00
Blaž Kristan
5a658b7080 Merge branch 'dev' of https://github.com/blazoncek/WLED into dev 2021-10-12 17:41:42 +02:00
Blaz Kristan
a6adb314ec Clean up settings CSS. 2021-10-11 17:55:26 +02:00
Blaž Kristan
5714578783 Refactoring & code clean-up.
- utility functions
- network functions
- math functions
2021-10-11 14:13:34 +02:00
Blaž Kristan
539125ff47 Merge branch 'master' into dev 2021-10-11 10:56:25 +02:00
Blaž Kristan
10cfcdab8c
Merge pull request #2264 from AK5nowman/Alaskatime
Add AKST/AKDT Time Zone
2021-10-11 07:37:52 +02:00
Gregory Schmidt
3f71d3b250 Add AKST/AKDT 2021-10-10 19:09:48 -08:00
Gregory Schmidt
1b50fbab22 Additional Flash string concat 2021-10-10 17:24:36 -08:00
Gregory Schmidt
303fc65a6a Merge branch 'master' of https://github.com/Aircoookie/WLED into overlayum 2021-10-10 17:06:12 -08:00
Gregory Schmidt
445b6ee13f Fix MQTT Null publish 2021-10-10 17:05:55 -08:00
cschwinne
8afaac1e30 0.13.0-b4 2021-10-11 02:42:58 +02:00
Gregory Schmidt
0327f9428e Merge branch 'master' of https://github.com/Aircoookie/WLED into overlayum 2021-10-10 16:27:47 -08:00
Gregory Schmidt
a5de66bbd5 Merge branch 'overlayum' of https://github.com/AK5nowman/WLED into overlayum 2021-10-10 16:26:42 -08:00
Gregory Schmidt
d47157eec3 Refactor string usage 2021-10-10 16:26:14 -08:00
Christian Schwinne
f4b47ed399
Exclude virtual busses from current calculation (#2262) 2021-10-11 02:19:53 +02:00
Blaž Kristan
8b2145bd88
Add strip off refresh option in LED settings. (#2259)
* Add strip off refresh option in LED settings.
New strip initialization logic.
Minor code clen-up.

* Dev code removal.

* Missing ethernet include

* Renamed mainseg to selseg

* Fix for preset cycling bounds.

* "Preset 0" bugfix.

* Auto segments only if segments were not modified

Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
2021-10-11 02:19:33 +02:00
Christian Schwinne
de454e8b78
Edit comments 2021-10-11 01:29:13 +02:00
Gregory Schmidt
6cd770b4c7 Restore platformio.inii 2021-10-09 11:29:41 -08:00
Gregory Schmidt
355525c248 Add readme 2021-10-09 11:14:52 -08:00
Blaz Kristan
53237c297f "Preset 0" bugfix. 2021-10-09 10:42:49 +02:00
Gregory Schmidt
47d4e7381f Merge 'master' of Aircoookie/WLED into overlayum 2021-10-08 00:00:09 -08:00
Gregory Schmidt
5dac6690d7 Add msg scroll. Add MQTT and Config support 2021-10-07 23:56:57 -08:00
Blaž Kristan
2d8885cb0c Bus manager cleanup & fixes. 2021-10-08 08:30:06 +02:00
Christian Schwinne
b89f7180db
Merge pull request #2257 from calebmah/bh1750-usermod
Add BH1750 usermod
2021-10-07 23:52:48 +02:00
Blaz Kristan
4fdf85bbdb Add off override. 2021-10-07 22:57:07 +02:00
Caleb Mah
2ebb837a15 bh1750 2021-10-08 02:11:39 +08:00
Blaz Kristan
728d57d955 Skipped 'npm run build' fix. 2021-10-07 16:03:55 +02:00
Blaz Kristan
e53a2e7b43 Conflict merge (warning) fix. 2021-10-07 15:43:36 +02:00
Blaz Kristan
e682fd07cb Reverted currentPlaylist. 2021-10-07 15:41:30 +02:00
Blaž Kristan
849aa64678 Fixed red color on IP address 2021-10-07 14:11:47 +02:00
Blaž Kristan
bddd22cfab Merge branch 'master' into dev 2021-10-07 13:47:36 +02:00
cschwinne
cbb12e1b7c Updated vid and changelog 2021-10-06 20:46:49 +02:00
Christian Schwinne
cc87ba4962
Merge pull request #2245 from Aircoookie/network-bus
Network bus/virtual WLED instances
2021-10-06 20:05:32 +02:00
Blaz Kristan
19310470b6 Nonsense fix. 2021-10-06 19:52:21 +02:00
Blaz Kristan
02fcccc8c7 Allow playlist as end preset in playlist.
Playlist chaining.
2021-10-06 19:12:30 +02:00
Blaz Kristan
fb2e556726 Allow playlist as end preset in playlist.
Playlist chaining.
2021-10-06 19:01:56 +02:00
Blaz Kristan
9f230ae339 RAM optimizations:
- changed int16_t to byte for currentPreset and currentPlaylist
- removed presetCycXxxxx variables
2021-10-06 18:43:12 +02:00
Blaz Kristan
3f0eb0a046 Code optimization, updated URL links. 2021-10-06 16:29:04 +02:00
cschwinne
7d6d9eddc4 Change virtual bus type range 2021-10-06 14:30:41 +02:00
Blaž Kristan
cf87da0ef3 Minor UI fixes. 2021-10-06 08:37:27 +02:00
Blaž Kristan
0775acedc0
Merge pull request #2250 from Proto-molecule/master
Fix Glyphs for 4 line display
2021-10-04 21:15:19 +02:00
Blaz Kristan
7b21c1bcbe Added option to preserve old state in PIR usermod 2021-10-04 20:24:33 +02:00
Blaz Kristan
9c295d1884 Implemented temporary presets. 2021-10-04 20:22:04 +02:00
Blaz Kristan
8f1cee2e61 Fixed mem calculation. 2021-10-04 19:44:46 +02:00
Blaz Kristan
caa9cc32d7 Removed double buffer.
Moved bri scaling into UDP function.
Prevent double DDP port allocation.
2021-10-04 19:41:20 +02:00
Blaž Kristan
b750f827c5
Merge pull request #2168 from itCarl/usermod_battery_status
Updated Usermod Battery Status Basic
2021-10-04 14:56:33 +02:00
Blaž Kristan
aef53a8753 Network bus changes:
- moved brightness scaling to broadcast fn
- removed double buffer
- fixed getPixelColor()
2021-10-04 13:44:44 +02:00
Blaž Kristan
5d147163e5
Merge pull request #2251 from blazoncek/pwm-fan-usermod
Pwm fan usermod enhancement
2021-10-04 13:12:22 +02:00
Blaž Kristan
75fe1a19eb Merge master 2021-10-04 13:01:06 +02:00
Blaž Kristan
5149078f6a
Merge pull request #9 from pbolduc/cleanup-add-remove-classes
use classList add/remove instead of edit className with string functions
2021-10-04 11:55:22 +02:00
Blaž Kristan
4d95248f16 PWM fan startup speed bugfix. 2021-10-04 11:49:47 +02:00
Blaž Kristan
5c9405fffc Added configurable PWM fan parameters:
- min PWM value (%)
- IRQs per rotation
2021-10-04 11:48:03 +02:00
Blaž Kristan
368f52ade6 Added configurable PWM fan parameters:
- min PWM value (%)
- IRQs per rotation
2021-10-04 11:32:56 +02:00
Proto-molecule
6457314794 Glyph fix for 4 line 2021-10-03 21:23:52 -07:00
Proto-molecule
84f4e3eedc
Merge branch 'Aircoookie:master' into master 2021-10-03 18:13:01 -07:00
Phil Bolduc
8cc2ba4770 use classList add/remove instead of edit className with string functions 2021-10-03 15:41:50 -07:00
Blaž Kristan
b003ed3f03
PWM fan with temperature control usermod (#2246)
* PWM fan with temperature control usermod

* Fix for incorrect RPM reported.
2021-10-03 23:34:21 +02:00
cschwinne
330da137db Fixed virtual getPixelColor() returning scaled values 2021-10-03 22:01:50 +02:00
cschwinne
9e5d45d0de Optional custom start indices 2021-10-03 20:48:08 +02:00
Blaz Kristan
f40398bf42 Removed double function definition in index.js. 2021-10-03 20:05:32 +02:00
Blaz Kristan
b5c15d97fa Fix for incorrect RPM reported. 2021-10-03 14:01:05 +02:00
Blaz Kristan
783a21d88d Fix for incorrect RPM reported. 2021-10-03 14:00:29 +02:00
cschwinne
6ddcba8917 Change currentPreset to byte
JSON API still returns -1 for no preset
2021-10-03 13:53:37 +02:00
cschwinne
91598cbbbf Remove Total LEDs field 2021-10-03 12:23:24 +02:00
Blaz Kristan
772c80aa85 PWM fan with temperature control usermod 2021-10-03 10:33:17 +02:00
Blaz Kristan
62e7c861bd Added readme for PWM fan usermod. 2021-10-03 10:27:01 +02:00
Blaz Kristan
9d5b6eac55 PWM fan usermod. 2021-10-02 22:45:42 +02:00
Blaz Kristan
72c5de6eae Minor optimization in Temperature UM. 2021-10-02 22:32:33 +02:00
Proto-molecule
a28345d858
Merge branch 'Aircoookie:master' into master 2021-10-02 12:33:02 -07:00
Proto-molecule
05b532b9eb
Add new Usermod (#2244) 2021-10-02 20:19:12 +02:00
cschwinne
0b0d18f182 Fix preset variable 2021-10-02 20:10:52 +02:00
Blaz Kristan
1d833419aa Merge branch 'master' into dev 2021-10-02 15:41:13 +02:00
Blaz Kristan
c1b0877956 Bus implementation.
Added separate DDP listener.
LED settings overhaul.
Minor fixes:
- reduced LED memory
- boot brightness fix
- reduced debug frequency
- added usermod time spent debug
- mDNS glitch fix
2021-10-02 15:07:02 +02:00
Blaz Kristan
46b66c76ef Merge pbolduc/WLED/feature/upd-ddp-send into network-bus 2021-10-02 10:48:48 +02:00
Gregory Schmidt
d00b4335b5 Add scrolling message to seven seg um 2021-10-01 21:34:20 -08:00
Proto-molecule
7a129e6de1 Add new Usermod 2021-10-01 20:46:58 -07:00
Blaz Kristan
e17e2a636b Added permanent DDP UDP listener. 2021-10-01 21:56:54 +02:00
cschwinne
17c20276a9 Make sbuff local
This should save 4 bytes per ESPAsyncE131 instance
2021-10-01 20:26:23 +02:00
Blaž Kristan
dc9dedf220
Fixed pin reservations. (#2214)
* Fixed pin reservations.
Added ethernet pin reservations.
Minor tweaks in usermods.

* Optional ADA compile (not default, free GPIO3 use)

* Move ethernet definitions

Remove pin 3 used check

Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
2021-09-30 16:30:44 +02:00
Gregory Schmidt
3ac772badc Add seven_seg debug build 2021-09-29 20:59:02 -08:00
Gregory Schmidt
22fc58d93b Add seven segment overlay usermod 2021-09-29 20:01:26 -08:00
Gregory Schmidt
ccd3152b24 Add Basic Overlay support to Usermods. 2021-09-29 19:23:32 -08:00
Blaž Kristan
7d929dcde6
Merge pull request #2236 from scottrbailey/ir_bri_fix
Add colorUpdated call
2021-09-29 17:44:20 +02:00
Blaz Kristan
45e0cbdb25 Brightness change also needs colorUpdated() 2021-09-29 17:43:54 +02:00
Blaz Kristan
dc9d48850f Added PIR sensor night time presets.
Added PIR sensor Disable/Enable button.
UI refinements.
Added colorUpdated() on HTTP API in IR JSON.
2021-09-28 23:27:40 +02:00
Scott Bailey
3a874bc8c7 Add colorUpdated call 2021-09-28 09:56:00 -07:00
cschwinne
8453cd82e9 Fixed DMXmap 2021-09-27 22:51:40 +02:00
Blaz Kristan
9092549f07 Fix for mamory requirement calculation.
- network bus using double buffer
2021-09-27 17:14:31 +02:00
Blaz Kristan
a94b5ba0c0 Merge branch 'master' into dev 2021-09-27 16:31:28 +02:00
Blaz Kristan
5d1efd84a4 Permanent double buffer. 2021-09-27 16:29:38 +02:00
cschwinne
f62e56b7ec Merge branch 'master' of https://github.com/Aircoookie/WLED 2021-09-27 14:20:41 +02:00
cschwinne
2ac90bbb96 Fixed sunrise/set UTC offset 2021-09-27 14:20:21 +02:00
Blaž Kristan
f85f2d5d22
Merge pull request #2203 from protoplasma-mx/master
Updated links in files generated by cdata.js
2021-09-26 20:20:23 +02:00
Blaz Kristan
8af953e20d Fix getPixelColor. 2021-09-26 20:01:04 +02:00
Blaz Kristan
66132a912a Brightnes bugfix in BusNetwork class. 2021-09-26 19:51:40 +02:00
Blaz Kristan
a94269ceb9 Novosibirsk time-zone. 2021-09-26 17:21:32 +02:00
Blaz Kristan
b852cbdc80 Novosibirsk time-zone. 2021-09-26 17:12:13 +02:00
Blaz Kristan
350caee808 Revert platform update.
Minor code optimisation.
2021-09-26 12:13:18 +02:00
Blaž Kristan
476ac263fb
Merge pull request #2227 from blazoncek/master
Add "on":true to playlist JSON
2021-09-24 16:07:01 +02:00
Blaž Kristan
51a4f61a8f Add "on":true to playlist JSON 2021-09-24 12:20:20 +02:00
Blaž Kristan
7d05236514 Add "on":true to playlist JSON. 2021-09-24 12:15:03 +02:00
Blaž Kristan
465b43be6a
Added paypal.me 2021-09-24 06:56:54 +02:00
Blaz Kristan
006edacd55 Virtual WLED spanning multiple instances.
- added BusNetwork class to BusManager
- added DDP realtime data broadcast
Added SW= option to HTTP API.
Fixed z-index on nodes list.
2021-09-23 21:44:24 +02:00
Blaz Kristan
a9666a9f6e Merge branch 'virtual-bus' into dev 2021-09-23 21:16:59 +02:00
Blaz Kristan
7de492caa7 Compiling for ESP8266. 2021-09-23 21:13:44 +02:00
Blaz Kristan
93ee4716cc Wled math bugfix. 2021-09-23 20:45:53 +02:00
Blaz Kristan
267f5159a3 Wled math bugfix. 2021-09-23 20:38:50 +02:00
Blaz Kristan
8a60d4cf2f Upgrade platforms.
Wled math fix.
2021-09-23 20:33:44 +02:00
Blaž Kristan
6489444158 Additional fix. 2021-09-23 06:55:08 +02:00
Blaž Kristan
59a66a3ea5 Buffer filling bugfix. 2021-09-23 06:52:48 +02:00
Blaz Kristan
e17550e23e Debug cleanup. Minor tweks. 2021-09-22 21:52:06 +02:00
Blaz Kristan
0f8d6daf99 Bus creation bugfix. Removed debug code. 2021-09-22 19:13:52 +02:00
Blaž Kristan
08925a72c6 Renamed BusVirtual to BusNetwork
- added options for E1.31 and ArtNet
- added check for initialised network
2021-09-22 13:20:36 +02:00
Blaž Kristan
1101299168 Fixing conflict merge. 2021-09-22 07:09:01 +02:00
Blaž Kristan
22be8e2e9d Merge branch 'dev' into virtual-bus 2021-09-22 07:06:18 +02:00
Blaž Kristan
6db2240f8a Merge branch 'master' into dev
(mostly ignored index.js)
2021-09-22 06:58:49 +02:00
cschwinne
96422de031 0.13.0-b3 2021-09-21 23:37:35 +02:00
Blaz Kristan
54eac18eea Bugfixes for saving and loading IP address.
Debug info for UDP.
2021-09-21 22:18:55 +02:00
Blaž Kristan
f2043dc181
Merge pull request #2219 from blazoncek/analog-invert
Fix for missing inverted analog.
2021-09-21 12:19:15 +02:00
Blaž Kristan
e416ec9279 Removed dev types. 2021-09-21 12:05:28 +02:00
Blaž Kristan
5eb4ffb1cc Fix for missing inverted analog. 2021-09-21 11:59:23 +02:00
Blaž Kristan
284e748449 Merge remote-tracking branch 'pbolduc/feature/upd-ddp-send' into virtual-bus 2021-09-21 07:29:26 +02:00
Blaž Kristan
3111718eb1 Fix for pin conflicts on save. 2021-09-21 06:25:36 +02:00
Phil Bolduc
fd8d17c5e5 Removed local buffer as WiFiUDP loops over input array anyways 2021-09-20 20:47:48 -07:00
Phil Bolduc
109bb62209 fix corrupt heap when writing upd 2021-09-20 19:01:54 -07:00
Phil Bolduc
cc661b26fa fix spelling error, be smarter how we write data to udp 2021-09-20 16:57:54 -07:00
Phil Bolduc
ea69957ed1 Fix spelling error 2021-09-20 15:53:20 -07:00
Phil Bolduc
700f641e29 Change signature of realtimeBoroadcast to match blazoncek 2021-09-20 15:51:12 -07:00
Phil Bolduc
83f4eeb3b5 Add support for RGB and RGBW, fix bug where not enough data written 2021-09-20 15:21:19 -07:00
Phil Bolduc
d1f4cdebf3 Move new ddp/udp functions into udp.cpp 2021-09-20 15:04:16 -07:00
Blaz Kristan
d95ba43fd1 Virtual bus implementation.
Base for virtual WLED set-up (multiple instances acting as one).
UDP broadcast not yet implemented.
2021-09-20 22:24:58 +02:00
Christian Schwinne
8fae964ee8
Allocate segment data based on currently active segments (#2217) 2021-09-20 21:22:50 +02:00
cschwinne
baf49b88f4 Semi-working segment on/off transition 2021-09-20 21:22:04 +02:00
Phil Bolduc
7dc07f6d21 Change parameter order for better stack alignment 2021-09-19 15:30:17 -07:00
Phil Bolduc
6472d35d91 optimze copyRgbwToRgb, do not copy too much data into buffer 2021-09-19 15:20:06 -07:00
Phil Bolduc
95c87919a8 return ok status code and free buffer 2021-09-19 12:11:57 -07:00
Phil Bolduc
077b4d5c89 Add initial DDP UDP output 2021-09-19 12:08:05 -07:00
Phil Bolduc
3577da05ac
Avoid redundant localIP calls, each call takes 0.700 us on ESP32 240Mhz (#2206)
* Avoid redundant localIP calls, each call takes 0.700 us on ESP32 240Mhz

* Fall through to check Wifi local ip if not connected to ETH

* Changed local var from ipAddress to localIP to better reflect content
2021-09-19 19:51:54 +02:00
Christian Schwinne
b8e8028eb9
Merge pull request #2184 from Aircoookie/fx-mods
FX optimisations and segment names
2021-09-19 15:16:23 +02:00
Blaz Kristan
a2105de402 Nesting bug fix. 2021-09-19 14:56:14 +02:00
Blaz Kristan
d049e0a149 Fix for missing inverse for analog bus.
Fix for usermod pin settings not being accounted for.
2021-09-19 14:28:27 +02:00
Blaz Kristan
7463be862f Merge branch 'master' into dev 2021-09-18 22:43:26 +02:00
Gabriel
a899666e68 Merge branch 'master' of https://github.com/protoplasma-mx/WLED 2021-09-18 09:04:54 -05:00
Gabriel
10a52f8cf9 Updated cdata.js so generated files point to knoWLEDge 2021-09-18 09:02:37 -05:00
Blaz Kristan
bc6652f443 Segment names fixes.
Minor UI changes:
 - new font
 - removed transition
2021-09-18 13:15:19 +02:00
Gabriel
72d04a0120 Updated reference to docs on readme to knoWLEDge 2021-09-18 00:23:51 -05:00
Gabriel
6dbed30008 Updated Web UI dev docs reference 2021-09-18 00:03:59 -05:00
cschwinne
c5eac298e6 Do not delete name if segment bounds are unchanged 2021-09-18 01:20:17 +02:00
cschwinne
bc18eda336 Segment name UI changes
Text field accessible by edit icon
Replaced magnifier with iconfont
Use woff2 font format
Fix scaled checkboxes visible in UI settings header
2021-09-18 00:31:39 +02:00
Blaž Kristan
3cefb14297
Merge pull request #2195 from scottrbailey/sp511
add env for sp511
2021-09-16 08:53:47 +02:00
Scott Bailey
4bc401278e add env for sp511 2021-09-15 18:44:09 -07:00
Blaz Kristan
56167f84ad Added I2C clock frequency parameter for 4LD. 2021-09-15 23:51:49 +02:00
cschwinne
d7e3765efe Fix segment creation 2021-09-14 23:35:04 +02:00
Christian Schwinne
3d51d1e345
Merge pull request #2175 from henrygab/revert_pr1902
Revert changes from PR1902
2021-09-14 00:29:59 +02:00
Blaz Kristan
db4ecce20b Reduced values of parameters for 8266:
- max segments to 16
- effect buffer to 3.5k
- max number of LEDs to 1200
2021-09-12 13:31:47 +02:00
Blaz Kristan
95518f1948 Fix for incorrect memory de-allocation. 2021-09-12 12:33:23 +02:00
cschwinne
bd23942893 Fixed IR JSON cmd string (closes #2187 ) 2021-09-12 01:37:41 +02:00
cschwinne
c8610b8ad2 Small improvements to segment names 2021-09-12 01:15:51 +02:00
Blaz Kristan
d0440122b9 Bugfix for AutoSave & 4LD. 2021-09-12 01:08:19 +02:00
Blaz Kristan
d4beb2f79b Merge branch 'master' into dev
Excluded modifications to ir.cpp
Changed default segment creation logic.
2021-09-12 01:00:54 +02:00
Blaz Kristan
9be995bb08 4LD & AutoSave usermod fixes.
Debugging usermod time.
2021-09-11 23:32:36 +02:00
Christian Schwinne
8d4636bbab
Merge pull request #2170 from scottrbailey/error-12-fix
Fix error 12 issues
2021-09-11 14:32:06 +02:00
cschwinne
f59c6e7a7c Replace wiki link in readme to knoWLEDge 2021-09-11 11:18:39 +02:00
Christian Schwinne
c24ab1b21d
Auto create segments setting (#2183) 2021-09-11 01:17:42 +02:00
cschwinne
6a01658355 Use pbolduc fork of AsyncTCP
(fixing flicker with upstream AsyncTCP v1.1.1)
2021-09-09 17:50:59 +02:00
cschwinne
f1e2439e66 Slight IR JSON simplefication
Check for missing file
No duplicate cmd object
2021-09-09 12:05:02 +02:00
Blaz Kristan
c1d47290b1 police_base optimisations. 2021-09-08 23:26:41 +02:00
Blaz Kristan
4d6116ed40 Minor usermod optimisations. 2021-09-08 23:25:05 +02:00
Blaz Kristan
4d89ed701d FX optimisations.
Added segment names.
2021-09-08 23:10:54 +02:00
Blaž Kristan
18ba394901 Changed behaviour of effects.
- Police (col1 for bg)
- Two areas (changable width, col1 for bg)
- Two dots (changable width)
2021-09-08 07:54:40 +02:00
Blaz Kristan
3a83753611 Rewritten police_base effect.
Optimisation in 4LD.
2021-09-07 22:59:31 +02:00
Blaz Kristan
e80594d61d Bugfix (sclPin, sdaPin).
Removed unnecessary static_cast.
2021-09-07 17:03:46 +02:00
Blaž Kristan
c436b586d2 Merge branch 'master' into dev 2021-09-06 13:36:26 +02:00
cschwinne
83c6f72eb0 Fix segment runtime not reset on FX change via HTTP API 2021-09-05 01:28:00 +02:00
cschwinne
e26299b998 Revert some small syntactical changes 2021-09-05 00:39:47 +02:00
Blaz Kristan
f84e2c2ac7 Debug conditional compile in pin manager. 2021-09-04 16:45:08 +02:00
Blaz Kristan
4e8c94fd2d Fix for unknown IR codes in IR JSON.
Fix for T=2 not updating lights in IR JSON.
Correct handling of missing ir.json file.
2021-09-03 22:00:47 +02:00
Blaž Kristan
8f3fd37d47 Updated fallback random FX limit. 2021-09-03 10:10:47 +02:00
Scott Bailey
a839809eb8 change random mode choice on presetFallback 2021-09-03 00:14:07 -07:00
Blaž Kristan
7960e9b309 Bugfix for missing IR.json error code. 2021-09-03 08:25:18 +02:00
Scott Bailey
88ceba59cf Fix error 12 issues 2021-09-02 22:56:49 -07:00
itCarl
f368bbec32 added MQTT support, Battery voltage to Info, circuit diagram to readme, minor fixes 2021-09-02 15:41:19 +02:00
Henry Gabryjelski
021c4ba68a Revert changes from PR1902 2021-08-29 11:49:06 -07:00
Blaz Kristan
4875544888 Enhanced ST7789 display usermod. 2021-08-28 21:59:52 +02:00
Blaz Kristan
849bdc52f6 Ethernet modifications.
Added fixed Ethernet pins to cfg.json and settings page
2021-08-27 19:48:55 +02:00
Christian Schwinne
54f4658dae
Added JSON API over serial support (#2156)
* Added JSON API over serial support

* Disable Serial API if pin 3 is used

Disable serial response if pin 1 is used
2021-08-26 11:04:27 +02:00
Blaž Kristan
63bb05b2d4 Fix compile for ethernet. 2021-08-26 09:32:06 +02:00
Blaž Kristan
916ad0a58e Merge branch 'master' into dev 2021-08-26 09:09:41 +02:00
Blaž Kristan
dbc67e077d
Merge pull request #2134 from scottrbailey/sr_palettes
Add new palettes from SR branch
2021-08-26 06:52:56 +02:00
Shaheen Gandhi
15055fa509 Add network debug printer 2021-08-25 17:59:48 -07:00
Blaz Kristan
8ee704e123 Added toast confirmation for clearing LS. 2021-08-25 22:37:16 +02:00
Blaz Kristan
0d552cd880 Button rewrite.
Buttons >0 behave differently than 0.
2021-08-25 21:24:56 +02:00
Scott Bailey
e968917dbc rename palette arrays 2021-08-25 10:16:30 -07:00
Scott Bailey
d8240bb683 Changing some palette names 2021-08-25 09:17:03 -07:00
Blaž Kristan
b481c13829
Sync groups (#2150)
* Added UDP sync groups.

* Shortened string.

* Changed sync default to group 1 only.

* Make packets with version < 9 group 1

* Send sync group options as bytes, parse in JS

Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
2021-08-25 16:39:12 +02:00
Blaž Kristan
60ce5c67de Merge branch 'sync-groups' into dev 2021-08-25 06:26:50 +02:00
cschwinne
421f932053 Send sync group options as bytes, parse in JS 2021-08-25 00:36:31 +02:00
cschwinne
542d6361f2 Make packets with version < 9 group 1 2021-08-24 23:59:09 +02:00
Blaz Kristan
81bafa00ac Minor tweaks. 2021-08-24 23:33:41 +02:00
Blaz Kristan
84d0c17c4b Compile warnings eliminated.
Minor typo.
DEBUG_PRINTF fix for 8266
2021-08-24 21:35:47 +02:00
Blaž Kristan
77c0ba990d Bugfix for calling FX=~ from within playlist preset. 2021-08-24 06:10:59 +02:00
Blaz Kristan
be7e2bed6f Bugfix for edge case of FX=~ within playlist. 2021-08-23 21:51:36 +02:00
Henry Gabryjelski
1d4487b6cd
Ethernet configuration fix, improve PinManager (#2123)
* Improved pin manager, ethernet config

* Ethernet is configured prior even to LED pins
* Pin Manager allocation / deallocation functions
   now take an "ownership" tag parameter, helping
   avoid accidentally free'ing pins that were allocated
   by other code
* Pin Manager now has ability to allocate multiple
  pins at once; Simplifies error handling

* Fix operator precedence error

Bitwise AND has lower precedence than the
relational "greater than" operator.

* PinManager update for some user modules

* don't build everything...

* Final step to reduce RAM overhead

* update comment

* remove macros

* Remove leftover allocated

* Init ethernet after settings saved

Co-authored-by: Christian Schwinne <dev.aircoookie@gmail.com>
2021-08-23 14:14:48 +02:00
Blaž Kristan
a7bfd0af41 Changed sync default to group 1 only. 2021-08-23 07:37:34 +02:00
Blaz Kristan
55ef547a85 Memory allocation fixes for effects. 2021-08-22 22:16:25 +02:00
Blaz Kristan
19129c8786 Simple page CSS & JS update.
Added simple UI as a separate page (/simple.htm).
2021-08-21 18:12:38 +02:00
Blaz Kristan
b5737ce9c1 Shortened string. 2021-08-21 12:30:40 +02:00
Blaz Kristan
f921d9a1f8 Added UDP sync groups. 2021-08-21 12:28:22 +02:00
Blaz Kristan
9609b48f2f Added UDP sync groups. 2021-08-21 12:22:26 +02:00
Blaž Kristan
ff8145b745
Merge pull request #2101 from blazoncek/fix-mqtt-pir
Fix for missing off-only MQTT messages.
2021-08-21 11:10:41 +02:00
Blaz Kristan
530e8b39e5 Added SSD1306 SPI display option to 4 Line Display 2021-08-20 23:58:09 +02:00
Blaz Kristan
5926d396f9 Merge branch 'master' of https://github.com/aircoookie/WLED into dev 2021-08-20 23:32:28 +02:00
Blaz Kristan
50aeee288b Merge branch 'master' of https://github.com/aircoookie/WLED 2021-08-20 23:22:53 +02:00
Blaz Kristan
72e001b0d5 Bash and Wnindows CMD scripts for updating multiple WLEDs. 2021-08-20 23:20:04 +02:00
Maximilian Mewes
f04c9d101e
Added usermod "battery status basic" (#2127)
* added usermod battery_status_basic

* test.. something is wrong

* Squashed commit of the following:

commit 0f845527c53f838e2c68d50ec3e9d6c68c4cee46
Author: itCarl <mewes.maximilian@gmx.de>
Date:   Tue Aug 10 18:35:15 2021 +0200

    updated readme and added image showing info modal

commit 055579fcf71796519d00566452030f31798121d0
Author: itCarl <mewes.maximilian@gmx.de>
Date:   Mon Aug 9 20:53:07 2021 +0200

    small map function fix

commit 811614cf9e73f4731acb234d0d210a7b19565e9a
Author: itCarl <mewes.maximilian@gmx.de>
Date:   Mon Aug 9 19:35:21 2021 +0200

    updated ui

commit cadf2e23b70d9ea6c862878b5f50075d7b247c08
Author: itCarl <mewes.maximilian@gmx.de>
Date:   Mon Aug 9 16:07:32 2021 +0200

    added usermod battery_status_basic

* updated readme, changed USERMOD_BATTERY_MIN_VOLTAGE default to 2.6 volt

* fixed readme image file naming

* added usermod settings for runtime changes

* fixed copy and paste mistake

* undo ui changes

* reworked addToJsonInfo() to make it compatible with the standard Info page.

* removed images from readme

* added ESP32 support

* updated readme
2021-08-20 20:42:46 +02:00
Blaz Kristan
7cf16766c4 Clear local storage button.
Removed skin.css from settings pages.
2021-08-20 19:38:24 +02:00
Blaz Kristan
0e200e0c34 Center text on display. 2021-08-20 19:37:05 +02:00
Blaž Kristan
771a544d0f Removed reference to tdd. 2021-08-20 09:54:54 +02:00
Blaz Kristan
fba707f6a8 Merge branch 'spi-display' into dev 2021-08-19 21:57:18 +02:00
Blaz Kristan
4e28e2cb59 Merge branch 'master' into dev 2021-08-19 21:57:04 +02:00
Ahmed Shehata
2ecc53ba56
UDP Signal color correction (#1902)
* added ui changes for saturation in sync

* added setters/getters for hsv settings

* added color correction logic

* faster algorithm for color conversion

* added save/load config to fs

* adjusted value scale

* move color functions to colors.cpp

* remove unchecked file

* Various small changes

Moved settings location in sync settings
Changed wording from hyperion to live
Moved code into setRealtimePixel(), reducing duplication and enabling the functionality for DMX streams

Co-authored-by: Christian Schwinne <dev.aircoookie@gmail.com>
2021-08-19 18:24:41 +02:00
Blaz Kristan
5c3c8b7b8a SPI display option for 4 Line Display usermod. 2021-08-19 16:13:30 +02:00
Christian Schwinne
3eb1fe0eb2
Merge pull request #2144 from coliss86/patch-1
Fix formatting of the first title
2021-08-19 08:44:43 +02:00
coliss86
aec998acc1
Fix formatting of the first title 2021-08-18 22:21:31 +02:00
Blaž Kristan
6a52a1dc63 Add option to load custom CSS and custom holidays.json 2021-08-18 13:41:54 +02:00
cschwinne
91e758f66f Fixed JSON IR remote not working with codes greater than 0xFFFFFF (fixes #2135) 2021-08-18 02:10:40 +02:00
cschwinne
441416b241 Fixed edge case with transition 0 2021-08-18 01:59:01 +02:00
Christian Schwinne
e541d8697e
Merge pull request #2140 from Aircoookie/ws-ping
Added application level pong websockets reply (#2139)
2021-08-17 17:56:29 +02:00
Blaz Kristan
445825df44 Merge branch 'dev' of github.com:blazoncek/WLED into dev 2021-08-17 16:28:16 +02:00
Blaz Kristan
b93c47fa60 Option to disable Loxone. 2021-08-17 16:28:12 +02:00
cschwinne
4b817208aa Added application level pong websockets reply (#2139) 2021-08-17 12:47:01 +02:00
Blaž Kristan
90b831600f Removed developmnet/debugging code. 2021-08-17 09:06:37 +02:00
Blaz Kristan
b3dd368920 JS optimisation.
Namelabel clarity.
2021-08-16 18:24:06 +02:00
Blaz Kristan
c8db90b644 Bugfix pin check. 2021-08-16 16:20:46 +02:00
Blaz Kristan
7ed65529df Minor button CSS optimisations. 2021-08-15 22:05:36 +02:00
Blaz Kristan
a8b59f5f59 Replaced fixed color values in CSS & JS w/ --c-?. 2021-08-13 11:43:17 +02:00
Blaz Kristan
eb966ec041 Typo fix. 2021-08-13 10:55:32 +02:00
Scott Bailey
7fea0c3244 Add new palettes from SR branch 2021-08-12 12:58:51 -07:00
Blaz Kristan
588789cb77 Random color background.
Few tweaks.
2021-08-12 15:47:22 +02:00
Blaz Kristan
3640f977c8 Simple CSS bugfix. 2021-08-12 12:12:45 +02:00
Blaz Kristan
28f12a4874 More CSS & JS optimisations. 2021-08-12 11:14:53 +02:00
Blaz Kristan
93378406c3 Additional CSS optimisations. 2021-08-11 21:28:31 +02:00
Blaz Kristan
602d04af82 Invaliating browser cache after UI selection change 2021-08-10 21:52:07 +02:00
Blaz Kristan
dcfbf2b154 Simplified UI and general UI polishing (CSS, HTML & JS).
Boot transition fix.
Local storage invalidation when uploading presets.json.
2021-08-10 17:11:17 +02:00
cschwinne
bd13336256 Fixed undesirable boot color transition 2021-08-06 02:08:36 +02:00
Christian Schwinne
815940913b
Merge pull request #2113 from tschundler/master
Fix ordering in platformio_override.ini.sample
2021-08-03 22:17:43 +02:00
Ted Schundler
f7191c0381 Fix ordering platformio_override.ini.sample
The flag examples must be after the build_flags line to be usable.
2021-08-01 20:23:05 -07:00
Blaz Kristan
5c6d755750 Added title to node button. 2021-08-01 12:19:44 +02:00
Blaz Kristan
3c545d488d Remove local storage for presets on presets.json restore. 2021-07-30 17:45:47 +02:00
Blaz Kristan
bd0f84605f UI JS optimisations/code reduction. 2021-07-29 22:55:20 +02:00
Blaz Kristan
07d11c845c Fix for missing off-only MQTT messages. 2021-07-28 22:50:29 +02:00
Blaz Kristan
6e9a69be5c Fix for missing off-only MQTT messages.
Automatic WS reconnect.
2021-07-28 22:45:11 +02:00
Blaž Kristan
2e9bd477d9
Upload files & skinning (#2084)
* Skinning WLED & uploading files.
Backup & restore configuration & presets.
External holidays.json

* Option for segment count instead of stop.

* Small fixes and improvements

* Further improvements

* Enable custom CSS by default

Co-authored-by: Christian Schwinne <dev.aircoookie@gmail.com>
2021-07-26 00:10:36 +02:00
Blaz Kristan
392df6ba72 Added missing ir.json error type.
Hopefully fix for WS virtual disconnects.
WS debugging info.
2021-07-25 22:44:26 +02:00
Blaz Kristan
c66cffd6a6 Playlist implicitly turns WLED on. 2021-07-23 23:40:38 +02:00
Blaz Kristan
b3b3e3ea20 God damn CRLF conversion. (I want to keep it clean) 2021-07-23 21:48:38 +02:00
Christian Schwinne
b058fb8db4
Merge pull request #2093 from blazoncek/PIR-sensor-update
Added PIR  option to trigger only if WLED is off.
2021-07-23 19:35:57 +02:00
Blaz Kristan
9f0f6181a1 Added PIR option to trigger only if WLED is off. 2021-07-23 18:43:51 +02:00
Blaz Kristan
067a88b3e7 UI maintaining playlist preset selected. 2021-07-23 18:39:00 +02:00
Blaz Kristan
251d5f4135 Added PIR option to trigger only if WLED is off. 2021-07-23 18:37:34 +02:00
Christian Schwinne
f702e1a80d
Merge pull request #2091 from blazoncek/white-slider-fix
White slider fix.
2021-07-22 23:55:12 +02:00
Blaz Kristan
44e574f440 Added WS send debug logging. 2021-07-22 19:08:25 +02:00
Blaz Kristan
e1527fcbb9 White slider fix. 2021-07-22 15:36:33 +02:00
Blaz Kristan
9e583f9ff0 Minor UI optimisations. 2021-07-22 15:34:43 +02:00
Blaž Kristan
9ba7e5d567
Fix for not honouring enabled state for PIR usermod. (#2090) 2021-07-22 14:41:11 +02:00
Blaž Kristan
02b6d53544
Rotary Encoder Compilation fix. (#2085)
* Compilation fix.

* Make rotary encoder usermod runtime configurable.
2021-07-20 13:41:30 +02:00
Blaž Kristan
611816c8e3 Rotary encoder runtime configuration. 2021-07-20 08:14:47 +02:00
Blaz Kristan
0511a62ca1 Optimised requestJson()
CSS fix.
2021-07-19 19:00:21 +02:00
Blaz Kristan
31e34d6f19 Rotary encoder compile fix. 2021-07-18 20:50:43 +02:00
Blaz Kristan
5360fe49d4 Minor holiday background image loading tweak. 2021-07-15 20:08:00 +02:00
Blaz Kristan
bf94febb11 Added configuration backup/restore.
Fixed save dialog compile error.
2021-07-15 18:38:42 +02:00
Blaž Kristan
dbd3bd50df Attempt at forcing Save dialog on preset backup.
Random BG image replaced by holiday BG.
2021-07-15 09:24:10 +02:00
Blaz Kristan
c1a1fb8d87 Backup/restore presets & holiday array upload.
Reduced number of segments on 8266.
2021-07-14 23:10:19 +02:00
Blaz Kristan
b10568e917 Merge branch 'dev' of github.com:blazoncek/WLED into dev 2021-07-14 16:20:16 +02:00
Blaž Kristan
0e1ad39ede Merge branch 'master' into dev 2021-07-14 13:43:42 +02:00
cschwinne
123bd0bb92 v0.13.0-b2
Reduced unneeded websockets pushes
2021-07-11 02:38:31 +02:00
Blaz Kristan
c8ce06d110 Minor UI fix. 2021-07-11 00:26:21 +02:00
Blaz Kristan
b0cfcb1999 Merge branch 'master' into dev 2021-07-10 17:01:20 +02:00
cschwinne
6a8ed1192f Accept hex color strings in individual LED API
Version bump to 0.13.0-b2 "Toki"
Fixed transition property not applying unless power/bri/color changed next
Moved transition field below segments (temporarily)
2021-07-10 16:14:17 +02:00
Andy Hofmann
0862859f93
New usermod: Support for RGB Rotary Encoder Board (#2068)
* Added RGB Rotary Encoder usermod v1

* RGB rotary encoder UM: Readme; Added example video

* RGB rotary encoder UM: Readme; Added example video

* RGB rotary encoder UM: Fixed getJsonValue usage

* RGB rotary encoder UM: Removed spaces in JSON keys

* RGB rotary encoder UM: Cleanup readFromConfig

* RGB rotary encoder UM: Cleaned up type usages

* RGB rotary encoder UM: Fixed crash on re-enable
2021-07-09 20:25:35 +02:00
Henry Gabryjelski
3ad336a1eb
Bug 2064, 2063 - PinManager usage (#2066)
* Fix 2063 - Do not free pins unless allocated

* Fix 2064: Allocate pins used for Ethernet

* Fix obvious compilation errors.

* Fix multiple bugs...

* pinsAllocated[2] set twice due to copy/paste bug.
* wrong pin allocated for ETH_CLOCK_GPIO17_OUT due to copy/paste bug

* Stylistic change per PR review

* Stylistic change per PR review

* attempt to allocate pin for "default" button

* remove extra local variable

* check return value from ETH.begin()

Co-authored-by: Christian Schwinne <dev.aircoookie@gmail.com>
2021-07-09 20:06:48 +02:00
cschwinne
a17f83cedd Renamed NOTIFIER_CALL_MODE_ to CALL_MODE_ 2021-07-09 18:54:28 +02:00
cschwinne
2c6850f6e4 Fixed presets using wrong call mode (e.g. causing buttons to send UDP under direct change type)
Increased hue buffer
2021-07-09 18:42:52 +02:00
cschwinne
5da47636cf Busses extend total configured LEDs if required (closes #2056 )
Fixed extra button pins defaulting to 0 on first boot
2021-07-09 16:25:23 +02:00
Blaž Kristan
944b857825 Merge branch 'master' into dev 2021-07-08 13:39:22 +02:00
cschwinne
e04b965659 Peek uses the main websocket connection 2021-07-08 02:01:17 +02:00
Aircoookie
17d2fb80f2 More robust initial resource loading in UI 2021-07-07 23:45:53 +02:00
Blaz Kristan
34c8f33c3c Bugfix WS saving preset. 2021-07-07 16:55:22 +02:00
Blaž Kristan
07d74ee692 Default button pin allocation on 1st boot. 2021-07-07 10:18:00 +02:00
Blaž Kristan
d28158bc74 ESP32 S2 fix for RMT channels.
Ethernet pins stored in cfg.json for usermod checks.
2021-07-07 08:12:03 +02:00
Blaž Kristan
14b7ec2a80
Added support for ESP32 S2. (#2067)
Updated Wemos Shield parameters.
2021-07-07 01:56:07 +02:00
Blaz Kristan
8c9fb956ff Bugfix for #2066 2021-07-06 22:08:04 +02:00
Blaz Kristan
db632ae847 Merge branch 'master' into dev 2021-07-06 16:38:13 +02:00
srg74
f27b31b581
Quick fix fro paltformio.ini (#2060)
* Added support for H803FW controller

* Create usermod_bme280.cpp

* Create usermod_bme280.cpp

* Added BME280 sensor

* Update readme.md

* Update usermod_bme280.cpp

* Update platformio.ini

* Update for lightweight sensor

* Added travis build badge

* Update readme.md

* Update readme.md

* Update .gitignore

* Changed ldscript for a file system

* Update NpbWrapper.h

* Update .gitignore

* Delete wled-ci.yml

* Added usermod for ST7789 display

Functionality tested with ESP32. Works with main WLED and @blazoncek fork.

* fixes

* Update .gitignore

* Firmware updates!!!

Updated official @Aircoookie firmware to v0.12.0-b4 build 2103290 and developer @blazoncek firmware to latest v0.12.0-b3 build 2103282.

* Updated platformio.ini for Universal Wemos Shield board

* Fixed errors in env:wemos_shield_esp32

- lib_deps must be for esp32;
- Commented global lib_deps for Dallas sensor.
2021-07-06 09:51:20 +02:00
Louis Beaudoin
8c44147a45
Usermod Settings polishing/documentation (#2061)
* Testing new wrapper functions to read Usermod config

* Usermod Settings polishing
- remove getBoolFromJsonKey() (no longer needed), fix getValueFromJsonKey(element, destination, defaultvalue)
- Update Usermod Settings html "number" field to use step="any", and make wider to make maximum values fully visible
  - step="any" allows viewing/submitting full 7/8-digit float values, and the arrow buttons step by 1 now, instead of .00001 (which wasn't good for integers or floats)
  - html wasn't generated/compressed yet

* Update usermod_v2_example.h with more complete example and documentation for Usermod Settings
- readFromConfig() has three options for how to load values from the config JSON, we need to pick one

* Update/rename usermode_rotary_brightness_color, to be used as an example of more robust parsing Usermod Settings values

* Update Usermod example, rename getValueFromJsonKey() to getJsonValue()
- chose single readFromConfig() pattern
- demonstrating 3-argument getJsonValue()
- remove leftover printf in getJsonValue()

Co-authored-by: Louis Beaudoin <louis@embedded-creations.com>
2021-07-05 23:14:57 +02:00
Blaz Kristan
3bef4284e3 Fix for ESP8266 compile. 2021-07-04 22:46:17 +02:00
cschwinne
ec05215a5e Update ArduinoJSON to 6.18.1 2021-07-04 18:52:05 +02:00
Blaz Kristan
5229b2959e Fix to use upstream NeoPixelBus on ESP32. 2021-07-04 16:25:33 +02:00
Blaz Kristan
8769234e28 Merge branch 'master' into dev 2021-07-04 15:29:46 +02:00
Blaz Kristan
bbdd1915eb Fix for odd Dallas sensor "not found" behaviour.
Minor flash use reduction.
2021-07-04 14:23:53 +02:00
cschwinne
5903e8256f Fixed preset immediately deselecting when set via HTTP API PL= 2021-07-04 13:29:59 +02:00
cschwinne
c879351063 JSON IR improvements
Restored support for "PL=~" mistakenly removed in 2106300
2021-07-04 13:23:45 +02:00
Blaz Kristan
de8a244500 Minor UI tweaks.
Added WS reconnects.
2021-07-04 12:09:19 +02:00
cschwinne
1bb7e36a65 More compact playlist entries 2021-07-04 00:55:32 +02:00
Blaz Kristan
3066a142b8 Merge branch 'master' into dev
Minor tweaks.
2021-07-03 21:27:06 +02:00
Christian Schwinne
793a01f7ca
Bus wrapper simplification (#2054)
* Use RMTN method

* Simplify BusWrapper

* Update PlatformIO configuration

* Fix non-included dependencies
2021-07-03 13:52:23 +02:00
Blaz Kristan
ccf047b1ab Playlist editor UI changes & fixes. 2021-07-02 17:22:47 +02:00
cschwinne
40c8fdbf64 Added WebSockets support to UI 2021-07-02 01:46:42 +02:00
cschwinne
dc01c907f1 Send websockets on every state change 2021-07-02 00:24:14 +02:00
cschwinne
801df94446 Update libraries 2021-07-01 21:20:52 +02:00
cschwinne
0197d89976 Added MQTT button option 2021-07-01 20:51:52 +02:00
Blaz Kristan
ce725252cc Minor fixes. 2021-07-01 16:40:55 +02:00
Christian Schwinne
e16a67242e
Merge pull request #2011 from blazoncek/multi-button-update
Added MQTT support for buttons and simplified switch.
2021-07-01 14:57:12 +02:00
cschwinne
4c678a5010 Fixed a minor visual issue with slider trail not reaching thumb on low values 2021-07-01 14:56:18 +02:00
Blaž Kristan
73f07b2939 Update html_settings.h 2021-07-01 13:42:22 +02:00
Blaž Kristan
b58efa3df0 Merge branch 'master' into dev 2021-07-01 13:41:23 +02:00
Blaž Kristan
9f885407f5 Merge branch 'master' into dev 2021-07-01 13:24:48 +02:00
srg74
3754088a44
Updated [env] for Universal Wemos Shield board (#2049)
* Added support for H803FW controller

* Create usermod_bme280.cpp

* Create usermod_bme280.cpp

* Added BME280 sensor

* Update readme.md

* Update usermod_bme280.cpp

* Update platformio.ini

* Update for lightweight sensor

* Added travis build badge

* Update readme.md

* Update readme.md

* Update .gitignore

* Changed ldscript for a file system

* Update NpbWrapper.h

* Update .gitignore

* Delete wled-ci.yml

* Added usermod for ST7789 display

Functionality tested with ESP32. Works with main WLED and @blazoncek fork.

* fixes

* Update .gitignore

* Firmware updates!!!

Updated official @Aircoookie firmware to v0.12.0-b4 build 2103290 and developer @blazoncek firmware to latest v0.12.0-b3 build 2103282.

* Updated platformio.ini for Universal Wemos Shield board
2021-07-01 12:05:02 +02:00
Christian Schwinne
c4f084a991
Merge JSON ircodes (#2048)
* add decodeIRJson and JSON remote option

* handle JSON API commands also

* removed code that forced IR codes in a certain range to be decoded by decodeIR24. Generate default ir.json files for currently supported remotes.

* comment out printing API commands in IR handling

* refactor decodeIRJson to change how ir.json is loaded add support for calling several c functions

* Handle setting palette when effect is still on default solid and will not display it

* remove colorUpdated notifier that was pasted in accidentally

* Update to handle both 24-key and 24-key old remotes (#1969)

* Update readme.md

* Update ir.cpp

Handle both 24-key and 24-key old in decodeIR switch statement

* Re-add JSON remote option

Co-authored-by: Scott Bailey <scottrbailey@gmail.com>
Co-authored-by: Artacus <40248830+scottrbailey@users.noreply.github.com>
2021-07-01 00:17:07 +02:00
cschwinne
4c73df4ba6 Shorten input size class names 2021-07-01 00:01:27 +02:00
cschwinne
4aa53aa5a5 Adjust input field widths 2021-06-30 21:53:22 +02:00
cschwinne
7483d3b229 Fixed settings page broken by using "%" in input fields (fixes #1516 ) 2021-06-30 18:21:56 +02:00
cschwinne
8b6cc708e7 Fixed a problem with disabled buttons reverting to pin 0 causing conflict 2021-06-30 12:33:51 +02:00
cschwinne
200960899e Removed preset cycle 2021-06-30 01:48:38 +02:00
cschwinne
599a456c81 Version bump to 0.13.0-b0 "Toki"
-   Added playlist editor UI
-   Reordered segment UI and added offset field
-   Raised maximum MQTT password length to 64 (closes #1373)
2021-06-30 01:23:35 +02:00
Christian Schwinne
4b46502d22
Playlist UI (#2046)
* Test 1

* State 2

* Playlist UI progress

* Playlist saving

* Playlist saving

* Playlist object array

* Added Offset to segment options

* Positioning

* Playlist UI complete
2021-06-30 01:01:15 +02:00
cschwinne
7233c55428 Segment Offset 2021-06-30 00:45:36 +02:00
Christian Schwinne
a58c5cce78
Merge pull request #1967 from poelzi/max_segments
Allow to override the max segments setting when compiling
2021-06-29 23:43:20 +02:00
Christian Schwinne
0b23bf65b3
Merge pull request #2045 from blazoncek/better-num-handling
Better number handling in Usermod settings.
2021-06-29 23:39:33 +02:00
Blaz Kristan
bc0a3f8a47 Better number handling in Usermod settings. 2021-06-29 18:36:55 +02:00
Blaz Kristan
ef59fd4b6f Better number handling in Usermod settings.
Added loading /holiday.json for backround image in UI.
Minor style changes.
2021-06-29 18:18:28 +02:00
Christian Schwinne
9b2a0102be
Merge pull request #2043 from blazoncek/v2-usermod-settings
Usermod settings v2
2021-06-27 22:22:32 +02:00
Aircoookie
04b4ef6d85 Regenerate html_settings.h 2021-06-27 22:19:03 +02:00
Blaz Kristan
9e8aadb750 Usermod settings v2
- added POST field parsing
- simpler handling in readFromConfig()
2021-06-27 15:32:33 +02:00
Blaz Kristan
36e7c2467e Merge branch 'master' into dev 2021-06-27 12:36:04 +02:00
Blaz Kristan
f7ce83ea34 V2 of usermod configuration settings
- added parsing of POST fields to use proper type
- updated readFromConfig() to reflect parsing
- added a possibility to use nested object in UM settings
- internal changes and fixes
2021-06-27 12:15:35 +02:00
cschwinne
0ae0f40628 Fixed four line display usermod compilation
Thanks @Serg74!
2021-06-25 23:42:53 +02:00
Blaz Kristan
81182bb125 Added parsing usermod settings parameters.
Added nested object handling in usermod settings parameters.
2021-06-25 23:20:01 +02:00
Blaz Kristan
2424df0d18 Merge branch 'master' into dev 2021-06-25 15:52:59 +02:00
cschwinne
af9aa7d201 Do not compile in example usermod 2021-06-25 12:15:23 +02:00
cschwinne
4cd3a614de Fixed preset only disabling on second effect/color change (fixes #2038 ) 2021-06-25 10:12:21 +02:00
cschwinne
1e5420e6a7 readFromConfig() update 2021-06-25 01:26:15 +02:00
cschwinne
660de0b4e5 Auto-create segments based on configured busses 2021-06-24 02:29:14 +02:00
cschwinne
b73aaecd22 Fix 4MB 1MB FS partition table 2021-06-21 13:22:14 +02:00
Blaz Kristan
e9d07eadaa Additional traces of v2 API removed in WS.
JS cleanup.
2021-06-20 21:56:25 +02:00
Blaz Kristan
6f0e944c7e 4 Line Display new type fix. 2021-06-20 16:10:27 +02:00
Blaz Kristan
cd8d2c141e Merge branch 'master' into dev
Added pin reservation for Ethernet.
Added SSD1305 I2C display type.
2021-06-20 15:13:38 +02:00
cschwinne
c831d62bc3 Added 2 Ethernet boards and split Ethernet configs into separate file 2021-06-20 00:14:09 +02:00
Blaz Kristan
14ac66ff4e Minor optimisations.
Removed all traces of v2 JSON API.
2021-06-19 23:16:40 +02:00
Blaz Kristan
75bf758042 Incerased max segments.
Removed v2 JSON API.
Replaced col[] array handling.
Settings UI optimisations.
Increased DEBUG output period to 60s.
2021-06-19 18:06:30 +02:00
cschwinne
1539e703e9 Use sprintf_P for color array generation 2021-06-19 11:13:05 +02:00
Christian Schwinne
f43bf03768
Merge pull request #2031 from DickSwart/dickdev
made sn_photorisistor configarable
2021-06-18 19:30:43 +02:00
cschwinne
495f7f190f Fixed DOS on Chrome tab restore causing reboot 2021-06-18 13:50:22 +02:00
Blaz Kristan
3acc521741 Bugfix for ESP8266 saving segments. 2021-06-18 12:16:04 +02:00
Dick Swart
16216b9eb9 made sn_photorisistor configarable 2021-06-18 13:07:41 +12:00
cschwinne
dfdb22f584 Optimized JSON buffer usage (pre-serialized color arrays) 2021-06-17 19:46:18 +02:00
Blaz Kristan
b7fb9e182b WLED_USE_PSRAM fix 2021-06-16 12:19:16 +02:00
Blaz Kristan
8574bf9d98 Fix for short IP in 4LD. 2021-06-16 09:25:10 +02:00
Blaz Kristan
1a80439825 Merge branch 'master' into dev 2021-06-15 23:36:12 +02:00
Christian Schwinne
0b264176bc
Merge pull request #2024 from Aircoookie/dependabot/npm_and_yarn/normalize-url-4.5.1
Bump normalize-url from 4.5.0 to 4.5.1
2021-06-15 23:20:46 +02:00
Christian Schwinne
bde70a27f0
Merge pull request #2025 from Aircoookie/dependabot/npm_and_yarn/glob-parent-5.1.2
Bump glob-parent from 5.1.1 to 5.1.2
2021-06-15 23:19:57 +02:00
cschwinne
7d2f5f0799 Fixed div by 0 when using palette on single LED segment 2021-06-15 20:12:20 +02:00
Blaz Kristan
28bc07da2f Optimised 4 Line Display.
Added option to display Ethernet IP.
2021-06-15 16:57:02 +02:00
cschwinne
7610ab7a8d Update logo 2021-06-14 01:58:12 +02:00
Blaz Kristan
8517cc8211 Alternating IP address and device name on 4 Line Display. 2021-06-13 18:05:30 +02:00
dependabot[bot]
51db653b1a
Bump glob-parent from 5.1.1 to 5.1.2
Bumps [glob-parent](https://github.com/gulpjs/glob-parent) from 5.1.1 to 5.1.2.
- [Release notes](https://github.com/gulpjs/glob-parent/releases)
- [Changelog](https://github.com/gulpjs/glob-parent/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gulpjs/glob-parent/compare/v5.1.1...v5.1.2)

---
updated-dependencies:
- dependency-name: glob-parent
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-11 20:27:21 +00:00
Blaz Kristan
8aa8ae239a PlatformIO.ini Wemos Shield all features.
Removed custom Touchpin build.
2021-06-11 17:09:39 +02:00
dependabot[bot]
dc4e4395a9
Bump normalize-url from 4.5.0 to 4.5.1
Bumps [normalize-url](https://github.com/sindresorhus/normalize-url) from 4.5.0 to 4.5.1.
- [Release notes](https://github.com/sindresorhus/normalize-url/releases)
- [Commits](https://github.com/sindresorhus/normalize-url/commits)

---
updated-dependencies:
- dependency-name: normalize-url
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-11 12:49:20 +00:00
cschwinne
623694ab73 Playlist additions 2021-06-10 02:52:20 +02:00
cschwinne
374457df70 A few small fixes 2021-06-09 12:57:16 +02:00
Christian Schwinne
7885dddef2
Create FUNDING.yml 2021-06-09 12:43:29 +02:00
Blaz Kristan
024ec86dc5 Unloading playlist on effect change. 2021-06-07 23:45:11 +02:00
Christian Schwinne
73d6cc1e54
Merge pull request #2020 from blazoncek/endless-playlist-fix
Endless playlist fix.
2021-06-07 22:29:17 +02:00
Blaz Kristan
f632ef0de8 Default dur from presetCycleTime. 2021-06-07 21:07:15 +02:00
Blaz Kristan
8fdf84068d Optimisations. 2021-06-07 21:05:31 +02:00
Blaz Kristan
c58ad64a28 Bugfix.
- unloading playlist on playlist apply
- optimisations in handlePlaylist()
2021-06-07 20:44:20 +02:00
Blaž Kristan
131625bb53 Endless playlist fix. 2021-06-07 14:16:29 +02:00
Blaž Kristan
cbf3ae4db4 Bugfix.
- unshuffled endless playlist fix.
2021-06-07 14:13:21 +02:00
Blaz Kristan
9ac7acf8b3 Added skinning capability. 2021-06-06 20:36:19 +02:00
Blaz Kristan
9dadb6da4c Added UI feedback for file upload. 2021-06-04 23:08:30 +02:00
Blaz Kristan
b6bbbeb9d3 Merge branch 'dev' of github.com:blazoncek/WLED into dev 2021-06-04 18:25:36 +02:00
Blaz Kristan
517e9f92ba Added uploading IR.json from settings page. 2021-06-04 18:25:33 +02:00
Christian Schwinne
29c9e5cb17
Merge pull request #2015 from RedNax67/master
Added support for raw 16bpp RGB565 images, and added elekstube env to examples in platformio.ini
2021-06-04 13:11:23 +02:00
Xander X
52b60fd6a6 Added elekstube env to examples in platformio.ini
Added support for raw 16bpp RGB565 images. Upload /0.bin etc.
See https://github.com/neptune2/EleksTube-IPS-Retro-Nixie-Digits for
how to get the original digits.
2021-06-04 10:39:31 +02:00
Blaž Kristan
7ec09c80a5 Changed boot preset apply logic. 2021-06-04 06:54:27 +02:00
Blaž Kristan
b0bfe341df Fixed typo. 2021-06-03 13:58:17 +02:00
Blaž Kristan
d6337f7500 Added MQTT support for buttons and simplified switch.
Added PIR sensor option.
2021-06-03 12:18:11 +02:00
Blaz Kristan
70cf6546ca Switch rewrite. 2021-06-03 05:50:55 +02:00
Blaz Kristan
0cdab52418 Added.
- PIS sensor switch option for button
Bugfix.
- proper switch high/low handling
2021-06-02 17:13:09 +02:00
Christian Schwinne
625e04d208
Merge pull request #2007 from Aircoookie/dependabot/pip/urllib3-1.26.5
Bump urllib3 from 1.26.4 to 1.26.5
2021-06-02 14:25:13 +02:00
Christian Schwinne
6da657d3e2
Merge pull request #2008 from DickSwart/dickDev
added SN_Photoresistor usermod
2021-06-02 14:24:01 +02:00
Blaž Kristan
777a95d23c Bugfix.
- parentheses fix
2021-06-02 08:46:29 +02:00
Blaž Kristan
06caace827 Bugfix.
- incorrect use of PSTR() on 8266
2021-06-02 08:24:49 +02:00
Blaž Kristan
0a0a766c0d Bugfix.
- pushbutton inverted not saving
- mqtt on/off message
2021-06-02 06:21:43 +02:00
Dick Swart
344c9e9238 added SN_Photoresistor usermod 2021-06-02 12:01:06 +12:00
Christian Schwinne
89b2b066ef
Merge pull request #2004 from HyperAtlas/master
CRONIXIE check in json.cpp
2021-06-02 00:25:04 +02:00
dependabot[bot]
894e084c7f
Bump urllib3 from 1.26.4 to 1.26.5
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.4 to 1.26.5.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.26.4...1.26.5)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-01 22:24:59 +00:00
Aircoookie
2ba064b2a5 Merge branch 'master' of https://github.com/Aircoookie/WLED 2021-06-02 00:23:12 +02:00
Aircoookie
dfe065ef82 Fixed Pushbutton inverted not selectable 2021-06-02 00:22:57 +02:00
Christian Schwinne
7bd4b78470
Merge pull request #2006 from juanesf/master
Add diyHue repo to readme.md
2021-06-02 00:17:38 +02:00
juanesf
d7991a247d
Add diyHue repo to readme.md
Wled has been supported by diyHue for some time, now it also supports Hue Sync (Entertainment) under UDP in the flask branch which will be the new master branch. 

https://github.com/diyhue/diyHue/pull/628
2021-06-01 12:31:52 -04:00
Blaž Kristan
2f9eacdf66 Added MQTT message on button press. 2021-06-01 11:03:18 +02:00
SpikeyHelmet
2178fd6ee9
CRONIXIE check in json.cpp 2021-06-01 06:37:35 +05:30
Christian Schwinne
7019ddb165
Merge pull request #1997 from Aircoookie/toki
More precise NTP timekeeping
2021-05-30 13:27:35 +02:00
Christian Schwinne
9f13763637
Merge branch 'master' into toki 2021-05-30 13:22:42 +02:00
Christian Schwinne
beeba27f46
Merge pull request #1977 from blazoncek/multi-button
Multi-button support.
2021-05-30 13:16:52 +02:00
Blaz Kristan
79ac85e048 Small UI improvements.
Added hue selection for analog.
2021-05-30 12:11:34 +02:00
cschwinne
315d4f225a Added analog button hue control 2021-05-30 02:03:32 +02:00
cschwinne
85489458d8 Small improvements
Settings cosmetic changes (spaces, smaller pin inputs, moved analog legend to wiki)
Uncommented STATUSPIN code (still defined out by default)
Removed adalight pin 3 lock
Added define for PSRAM
2021-05-30 01:31:04 +02:00
cschwinne
bfc7f56c4d Accurate UDP sync for NTP enabled instances 2021-05-30 00:08:24 +02:00
Blaz Kristan
23c5ddce83 Added inverted analog button. 2021-05-28 18:21:16 +02:00
Blaz Kristan
7685f9b73d Ignore analogue pin -1 on ESP8266 2021-05-28 17:45:14 +02:00
Blaž Kristan
3bb9d220bb Bugfix:
- rewrite error-prone use of shifting
- allow -1 for analog pin on ESP8266
2021-05-28 14:22:54 +02:00
Blaž Kristan
664fad96fa Fixed error-prone use of shifting. 2021-05-28 14:14:50 +02:00
Christian Schwinne
669a610e36
Merge branch 'master' into multi-button 2021-05-28 10:03:27 +02:00
Blaž Kristan
7e0d9cb48c Added:
- analogue FX speed
- analogue FX intensity
- analogue palette selection
- UI legend
2021-05-28 08:47:15 +02:00
cschwinne
7cbc9d21b5 Fixed difference calculation 2021-05-27 23:29:11 +02:00
Blaz Kristan
62cb8358cc Added.
- analog for speed, intensity & palette
- legend in settings page
Fixed UI & UX.
- change of effect stops playlist
- new preset UI glitch
2021-05-27 17:57:04 +02:00
cschwinne
55b26751ae Cache CORS preflight request 2021-05-27 11:09:57 +02:00
cschwinne
c2892d7887 Add UDP sync of system time 2021-05-27 02:02:02 +02:00
cschwinne
6c8bf090fe Small optimizations 2021-05-27 00:09:52 +02:00
Blaz Kristan
ada5fd53e7 Removed obsolete usermods. 2021-05-26 22:01:12 +02:00
Blaz Kristan
2f30451067 Bugfix.
- temperature default values
- IR warnings
2021-05-26 21:33:40 +02:00
Blaz Kristan
6b5c2be701 Bugfix.
- preventing strip blinking due to usermod running
- temeperature reading with 0.5°C precision
2021-05-26 16:11:48 +02:00
Blaz Kristan
13bc378069 Fixes for analog. 2021-05-25 23:59:43 +02:00
Blaz Kristan
1ba70706c2 Bugfixes.
- multi-relay brightness check
- temperature no reading delay
- analog button fix & noise reduction
- IR removed custom
2021-05-25 23:00:21 +02:00
cschwinne
8431d0bd5c Replace Time with Toki 2021-05-25 09:59:19 +02:00
cschwinne
852f758be3 Subsecond accuracy NTP 2021-05-24 19:05:34 +02:00
cschwinne
b455f432d5 Toki 1st experiment 2021-05-24 14:34:03 +02:00
Blaz Kristan
6760744249 Minor tweak. 2021-05-23 21:31:47 +02:00
stevelup
306cea60a1
Update usermod_v2_rotary_encoder_ui.h (#1988)
Typo DISLAY -vs- DISPLAY
2021-05-23 21:22:15 +02:00
stevelup
ba2e07c4b9
Update readme.md (#1987)
Typo DISLAY -vs- DISPLAY
2021-05-23 21:22:01 +02:00
cschwinne
9b796531b2 Fixed Sunrise calculation (atan_t approx. used outside of value range) 2021-05-23 18:49:23 +02:00
Blaz Kristan
11c7d586d9 Bugfix.
- atan_t(x) for x>1
- incorrect switch type and missing analog
2021-05-23 18:22:26 +02:00
Blaz Kristan
39cd83b171 Temporary fix for inappropriate atan_t(). 2021-05-23 15:51:53 +02:00
Blaz Kristan
2fdbc88d8c Bugfixes.
- PWM bus not loading on boot
- analog 0 not turning Off
- conditional compile for Blynk
- segment name
2021-05-23 01:11:35 +02:00
Blaz Kristan
cc0f1be5d2 Bugfix saving PWM & button pins. 2021-05-22 00:13:49 +02:00
cschwinne
08d7a1c123 Set Nixie contents via JSON API
Elekstube mod support a subset of the cronixie display patterns
2021-05-21 22:23:12 +02:00
Christian Schwinne
1f70a735c7
Merge pull request #1980 from stevelup/patch-1
Update platformio_override.ini.sample
2021-05-21 20:38:00 +02:00
stevelup
6713fcfeb1
Update platformio_override.ini.sample
Typo on lines 12 and 31 (DISLAY -vs- DISPLAY)
2021-05-21 19:01:42 +01:00
Christian Schwinne
c3107d213a
Merge pull request #1979 from Aircoookie/elekstube_usermod
Elekstube IPS and RTC usermods
2021-05-21 15:34:14 +02:00
cschwinne
adf5c8c278 Center smaller images 2021-05-21 15:19:18 +02:00
Blaž Kristan
5f86a8a15b
Merge branch 'master' into multi-button 2021-05-21 13:59:33 +02:00
Blaž Kristan
042c756be8 Added analog button support.
Inverted switch fix.
2021-05-21 13:33:22 +02:00
Blaž Kristan
1952505e52 Squashed commit of the following:
commit 7893cb9ebc66faa39d430148e6dd66894cd2fc90
Merge: c4086b9 4e139d7
Author: Blaž Kristan <blaz@kristan-sp.si>
Date:   Fri May 21 12:57:43 2021 +0200

    Merge branch 'master' of https://github.com/scottrbailey/WLED into scottrbailey-master

commit 4e139d7c0ab1ff7a82a9c386626a0461af27025c
Author: Artacus <40248830+scottrbailey@users.noreply.github.com>
Date:   Tue May 18 12:57:20 2021 -0700

    Update ir.cpp

    Handle both 24-key and 24-key old in decodeIR switch statement

commit 9a405d374bd40e14acc45f4ae52e2a8cf1eac171
Author: Artacus <40248830+scottrbailey@users.noreply.github.com>
Date:   Tue May 18 11:05:42 2021 -0700

    Update readme.md

commit 94af6d0561a2a0e6b3c1106996c264e59402dedf
Merge: 1ed687a bfb27c4
Author: Artacus <40248830+scottrbailey@users.noreply.github.com>
Date:   Sun May 16 22:00:15 2021 -0700

    Merge branch 'Aircoookie:master' into master

commit 1ed687a51a971d53abc980ba29416b3bb1b9a5e1
Author: Scott Bailey <scottrbailey@gmail.com>
Date:   Sun May 2 21:27:33 2021 -0700

    remove colorUpdated notifier that was pasted in accidentally

commit 845dcabe0c6500e37038af71bef9b90cdd366609
Author: Scott Bailey <scottrbailey@gmail.com>
Date:   Sat May 1 12:53:34 2021 -0700

    Handle setting palette when effect is still on default solid and will not display it

commit 90e8ae1457c4423dda22a3b59cafa0c263875495
Author: Scott Bailey <scottrbailey@gmail.com>
Date:   Sat May 1 02:07:47 2021 -0700

    refactor decodeIRJson to change how ir.json is loaded add support for calling several c functions

commit e4f9fa311702505c8036abcfcc217a072f178a2c
Author: Scott Bailey <scottrbailey@gmail.com>
Date:   Thu Apr 29 23:33:01 2021 -0700

    comment out printing API commands in IR handling

commit 26247b247eb6f555b46c2f7cb67dd6a9813552f4
Author: Scott Bailey <scottrbailey@gmail.com>
Date:   Thu Apr 29 23:31:30 2021 -0700

    removed code that forced IR codes in a certain range to be decoded by decodeIR24. Generate default ir.json files for currently supported remotes.

commit 5acecda6a0ad863c6eb5c5e622bd74e0573950b0
Author: Scott Bailey <scottrbailey@gmail.com>
Date:   Thu Apr 29 11:25:24 2021 -0700

    handle JSON API commands also

commit 754e3e092a4b5e2fba4a5a0090c9d42ca7546d0d
Author: Scott Bailey <scottrbailey@gmail.com>
Date:   Wed Apr 28 22:53:27 2021 -0700

    add decodeIRJson and JSON remote option
2021-05-21 13:07:55 +02:00
Blaž Kristan
c4086b9127 Corrected 10bit ADC read for 8266 2021-05-21 12:40:38 +02:00
Blaž Kristan
0ada09891c Added analog button/potentiometer support (partial) 2021-05-21 12:08:47 +02:00
cschwinne
2d586406da First working Elekstube IPS and RTC mod 2021-05-21 10:10:29 +02:00
Blaž Kristan
651b4d2461 Fixed XML API <wv> containing -1 on Manual only RGBW mode (see #888, #1783) 2021-05-21 10:04:22 +02:00
Blaž Kristan
01b2468fea Changed getI() parameter name to reflect actual meaning. 2021-05-21 08:11:04 +02:00
cschwinne
371c4e0051 Fixed WS281x output on ESP32
Fixed potential out-of-bounds write in MQTT
Fixed IR pin not changeable if IR disabled
Fixed XML API <wv> containing -1 on Manual only RGBW mode (see #888, #1783)
2021-05-20 21:41:39 +02:00
Blaz Kristan
69099fcdd7 Multi button support. 2021-05-20 19:54:07 +02:00
Blaz Kristan
28e714db1e Multi button implementation.
Inverted button support.
Added configurable touch button and touch threshold.
2021-05-20 15:49:26 +02:00
Daniel Poelzleithner
57e50d0c33 Allow to override the max segments setting when compiling 2021-05-20 11:46:12 +02:00
Blaž Kristan
a0fd02e0c0 Inverted button support.
Config save/load fix.
2021-05-20 06:45:02 +02:00
Blaz Kristan
c925b3d218 Setting touch threshold string fix. 2021-05-19 22:32:50 +02:00
Blaz Kristan
5da4386f31 Shortened string. 2021-05-19 20:26:14 +02:00
Blaz Kristan
4104dec87f Addet touch button and touch threshold.
Fixed some errors.
2021-05-19 20:23:35 +02:00
Blaz Kristan
d40a555531 Button 0 not saving macros fix. 2021-05-19 18:52:20 +02:00
Blaz Kristan
95df91a03b Multi button implementation. 2021-05-19 18:39:16 +02:00
Blaž Kristan
3a8caa15b9 Reverted retained MQTT messages. 2021-05-19 08:22:41 +02:00
Blaz Kristan
a5a25f02e3 Merge JSON IR code into master changes. 2021-05-18 22:04:51 +02:00
Blaz Kristan
bfd7be543a Merge branch 'master' of https://github.com/aircoookie/WLED into dev
Conflicts:
	tools/cdata.js
	usermods/PIR_sensor_switch/readme.md
	usermods/Temperature/readme.md
	wled00/FX.h
	wled00/FX_fcn.cpp
	wled00/bus_manager.h
	wled00/bus_wrapper.h
	wled00/cfg.cpp
	wled00/const.h
	wled00/data/settings.htm
	wled00/data/settings_leds.htm
	wled00/data/settings_um.htm
	wled00/html_settings.h
	wled00/json.cpp
	wled00/mqtt.cpp
	wled00/set.cpp
	wled00/wled.cpp
	wled00/wled.h
	wled00/wled_eeprom.cpp
	wled00/wled_server.cpp
	wled00/xml.cpp
2021-05-18 15:45:34 +02:00
Blaž Kristan
778e790e82 Added attributtion for JSON IR codes. 2021-05-18 10:27:34 +02:00
Blaž Kristan
17eeb22971 JSON IR remote 2021-05-18 09:48:58 +02:00
Blaž Kristan
1617658bfe
Per strip skip first LED implementation (#1871)
* Per strip "skip first LED".
Moved skip first led into bus manager.

* Update cfg.cpp

* Do not display Skip 1st on analog types

Rename skipFirstLed() to clarify what it does
Remove RGBW override

Co-authored-by: Aircoookie <dev.aircoookie@gmail.com>
Co-authored-by: Aircoookie <cschwinne@gmail.com>
2021-05-17 16:23:46 +02:00
Blaz Kristan
991fe31569 Reverted status MQTT message. 2021-05-17 16:12:34 +02:00
Christian Schwinne
4bcfff780a
Merge pull request #1965 from blazoncek/usermod-update
Updated usermod readme and usability enhancements.
2021-05-17 13:05:11 +02:00
Blaž Kristan
12f9ad8f7f Updated usermod readme and usability enhancements. 2021-05-17 12:52:27 +02:00
cschwinne
6f843fcb27 Added experimental {"on":"t"} (resolves #1952 ) 2021-05-17 12:29:30 +02:00
cschwinne
e0f17e1778 Always copy MQTT payload 2021-05-17 10:38:07 +02:00
Blaz Kristan
4a5a9b73b1 UI fixes & small changes. 2021-05-16 19:06:00 +02:00
Blaz Kristan
7652336c84 Added information regarding state of PIR sensor. 2021-05-16 17:25:32 +02:00
Blaz Kristan
94113827a7 Exposing segment power and intensity button/slider 2021-05-16 17:19:35 +02:00
Blaz Kristan
cc10ee0134 Added on/off MQTT command for anbling/disabling usermod. 2021-05-16 10:34:39 +02:00
Blaz Kristan
5ad0fdf39c Added on/off button for Staircas usermod on Info page. 2021-05-15 22:36:40 +02:00
Blaz Kristan
7201a8d634 Updated Animated Staircase readme.md 2021-05-15 13:51:24 +02:00
Blaz Kristan
3fde7365f9 Enhanced Animated Staircase usermod. 2021-05-15 13:37:27 +02:00
Blaz Kristan
f6a5bc9b40 Removed "retain" from MQTT messages. 2021-05-14 20:57:56 +02:00
Blaz Kristan
9a5917a331 Added PSRAM support for effect data. 2021-05-13 17:35:20 +02:00
Blaz Kristan
94c0324e8a Fix for display overflow. 2021-05-13 17:11:54 +02:00
Blaz Kristan
d3b5594092 Added reserverd pins for UI. 2021-05-13 16:46:29 +02:00
Blaz Kristan
742d580eae Removed Usermod child/parent relationship. 2021-05-13 16:19:53 +02:00
Blaz Kristan
d4a3cadd09 Removed unnecessary ISR from PIR sensor switch UM. 2021-05-13 16:18:22 +02:00
Blaz Kristan
ec0feb68f4 Added (partial) PSRAM support for WROVER chips.
Minor fixes.
2021-05-13 16:05:52 +02:00
cschwinne
bfb27c49a2 Fixed possibility of non-0-terminated MQTT payloads 2021-05-13 01:04:33 +02:00
cschwinne
cb7b7f1dca Add notice if no usermod installed 2021-05-11 23:21:57 +02:00
Blaz Kristan
38c032b79e Readme API additions. 2021-05-11 21:43:38 +02:00
Blaz Kristan
2b7f2d4744 MQTT null termination fix.
Nigtttime detection for PIR fix.
2021-05-11 16:20:43 +02:00
cschwinne
5ca8bc3f2a Fixed various Codacy code style and logic issues 2021-05-11 14:54:03 +02:00
Aircoookie
1ccc8eec0a
Merge pull request #1922 from esev/tm1814
TM1814 requires refreshes to remain powered off and a slightly faster refresh speed
2021-05-11 12:10:52 +02:00
Aircoookie
9c5afda83a
Merge branch 'master' into tm1814 2021-05-11 11:59:35 +02:00
Blaž Kristan
05b86a71fd Sunrise/sunset debugging for PIR sensor. 2021-05-11 09:36:30 +02:00
cschwinne
d94d3d4bc5 Added experimental /json/cfg endpoint for changing settings from JSON 2021-05-11 01:11:16 +02:00
Blaz Kristan
e0c0f29fc6 Added nigttime only and MQTT only options to PIR sensor switch usermod.
Clarified empty UM settings a bit.
2021-05-10 22:41:27 +02:00
Aircoookie
119826cb9b
Merge pull request #1951 from blazoncek/user-configurable-usermods
User configurable usermods.
2021-05-09 23:10:37 +02:00
cschwinne
6ab95ed4ef Remove Usermod inheritance from UsermodManager 2021-05-09 22:54:04 +02:00
cschwinne
4f1eb64ac6 Added changes to set.cpp and wled_server.cpp 2021-05-08 18:04:44 +02:00
Blaz Kristan
3e3dc3a6ab PIR usermod fixes. 2021-05-08 17:02:37 +02:00
Blaz Kristan
3f8dc76f84 Added missing config info. 2021-05-08 12:13:39 +02:00
Blaz Kristan
8a6945ff3b Added PIR sensor switch on/off presets.
Added empty config info.
Minor fixes.
2021-05-08 12:11:12 +02:00
cschwinne
f60579fd21 Remove outdated Visual Studio files (please make PR to re-add if still required) 2021-05-07 16:51:41 +02:00
Blaz Kristan
e6111c0d48 Moved WROVER partition table. 2021-05-07 12:57:58 +02:00
Blaz Kristan
136a00a301 User configurable usermods.
- Utilizing addToConfig() & readFromConfig()
- UM configuration Settings page
- MQTT support for usermods
- A few sample usermods including rewritten Temparature and new Multi-Relay
2021-05-07 12:41:39 +02:00
Blaz Kristan
b2f5bee20d Conditional compile for disabled features. 2021-05-07 11:51:48 +02:00
cschwinne
fa075f6800 Revert TV reversion 2021-05-07 11:42:12 +02:00
cschwinne
277f395595 Merge branch 'master' of https://github.com/Aircoookie/WLED 2021-05-07 11:32:13 +02:00
cschwinne
e2061464a5 Fixed not turning on after pressing "Off" on IR remote twice (fixes #1950)
Fixed OTA update file selection from Android app (TODO: file type verification in JS, since android can't deal with accept='.bin' attribute)
2021-05-07 11:32:08 +02:00
Blaz Kristan
04c4451f7d Usermods MQTT processing.
Multi-relay usermod with MQTT/HTML control.
Minor bugfixes.
2021-05-06 22:58:03 +02:00
Aircoookie
fcf5cd4655
Merge pull request #1946 from jaredgisin/br-remove-unused-configs
remove unused flags
2021-05-05 10:04:45 +02:00
Jared Gisin
3816f0b68b remove unused flags 2021-05-04 18:45:05 -07:00
Blaz Kristan
ccab1844ce Parameterised max. usermods 2021-05-04 22:48:18 +02:00
Blaz Kristan
5a6be54970 Max 6 usermods on ESP32, fixed ESP32S2 number of busses. 2021-05-04 22:35:36 +02:00
Blaz Kristan
ce6b5105c6 Fix for MQTT topic for temperature F. 2021-05-03 22:50:55 +02:00
Blaz Kristan
de7da8b26e Removed PIR instance methods, added AutoSave enable/disable. 2021-05-03 21:22:03 +02:00
Blaz Kristan
24932d6ba3 Updated readme, removed obsolete usermods. 2021-05-03 13:32:11 +02:00
Blaz Kristan
d5fd5954d1 Added SW I2C support for ESP8266. 2021-05-03 13:11:42 +02:00
Blaz Kristan
977075763d Removed console logging. 2021-05-01 22:12:40 +02:00
Blaz Kristan
757172934e MultiRelay usermod.
beta 2
2021-05-01 19:38:13 +02:00
Aircoookie
1a2543ddde Added FPS test utility 2021-04-30 00:00:46 +02:00
Blaz Kristan
1a520f8782 Minor usermod optimisations. 2021-04-29 22:39:08 +02:00
Blaz Kristan
b56c1b956c Display seconds only if not AM/PM. 2021-04-29 17:52:47 +02:00
Blaz Kristan
1a279d14c4 Dallas sensor detection.
Minor clenaup & fixes.
2021-04-29 17:44:31 +02:00
Blaz Kristan
0d8e763a5f Code clean-up. 2021-04-28 17:40:10 +02:00
Blaz Kristan
bf6d3649a4 "Out of memory" fix when no presets are created. 2021-04-27 17:01:15 +02:00
Eric Severance
7c9db7edeb
Add comment about the TYWE3S controller (#1924)
The `codm-controller-0.6` env also works for the [`TYWE3S` controller](https://github.com/Aircoookie/WLED/issues/1519#issuecomment-826126116). This PR just adds a note so that folks who search for `TYWE3S` will find the proper env to use.
2021-04-27 09:05:40 +02:00
Blaz Kristan
65fd705d9a ESP32-S2 NPB methods filtered.
Default IR pin removed (set to -1).
Minor fixes.
2021-04-26 20:11:36 +02:00
Blaz Kristan
311e54451b Minor bug fixes. 2021-04-25 21:15:57 +02:00
Eric Severance
8b759bc5d9 TM1814 requires refreshes to remain powered off and a slightly faster refresh speed. 2021-04-25 09:08:02 -07:00
acshef
9a0aac4745
Add IP Address to JsonInfo (#1912)
* Add IP Address to JsonInfo

The value is added to the JSON only if the device is connected to the network, and uses the JSON key `"sip"` to match [wled00/xml.cpp](wled00/xml.cpp#L249). The overarching goal of this is to expose the IP Address to the Home Assistant WLED Integration, so that Home Assistant can provide a link to the WLED device (either directly through the Integration/Device page 🤞 or *ad hoc* in Lovelace).

* IP in JSON info

Empty string if not connected

Co-authored-by: Aircoookie <cschwinne@gmail.com>
2021-04-25 01:37:16 +02:00
Blaz Kristan
cb6607a169 Added new partition scheme for ESP32 WROVER (code size >1.3M)
Updated bus_wrapper for ESP32-S2 (use   #define ARDUINO_ARCH_ESP32S2)
Removed DallasTemperature.h from Temperature usermod.
2021-04-24 22:24:14 +02:00
Blaz Kristan
8caa4e9cb6 Fix for blinking colon. 2021-04-24 00:00:20 +02:00
Blaz Kristan
d6338d7b11 Changed codename to Ryujin.
Added blinking colon on display usermod.
2021-04-23 17:21:45 +02:00
Blaž Kristan
f96a5ec774 Changed version to 0.12.2-bl1
Optimised strings in Animated Staircase usermod.
Minor typos.
2021-04-23 14:32:18 +02:00
Blaz Kristan
1be8e7e216 Added 128x64 SSD1306 display. 2021-04-23 00:08:53 +02:00
Blaz Kristan
cf9cf9d7bb Merge branch 'master' into dev
Conflicts:
	package.json
	wled00/html_other.h
	wled00/html_settings.h
	wled00/wled.h
2021-04-22 22:48:08 +02:00
Blaz Kristan
6ba1795ded Flash optimizations & class texts. 2021-04-22 22:34:43 +02:00
cschwinne
ced0cc1bac 0.12.1-b1 2021-04-22 01:12:31 +02:00
cschwinne
3c49f22266 Merge branch 'master' of https://github.com/Aircoookie/WLED 2021-04-22 00:47:58 +02:00
cschwinne
13ae99edec Reduce TV simulator flash usage 2021-04-22 00:47:50 +02:00
Andy Shinn
0f82730a78
Release engineering improvements (#1844)
* version set from package.json and release bin names

* support direnv virtualenv

* versioned PlatformIO environment

* matrix support for parralel CI

* gather artifacts

* release on tagging

* minor scripts formatting
2021-04-22 00:41:36 +02:00
Blaz Kristan
8608c45309 Merge branch 'master' into dev
Conflicts:
	CHANGELOG.md
	wled00/FX.cpp
	wled00/FX_fcn.cpp
	wled00/ntp.cpp
	wled00/wled.h
	wled00/wled_math.h
2021-04-21 21:16:08 +02:00
Blaz Kristan
90516217e0 Minor changes in PIR usermod. 2021-04-21 20:57:58 +02:00
cschwinne
ff083daf31 Merge branch 'master' of https://github.com/Aircoookie/WLED 2021-04-21 17:22:00 +02:00
cschwinne
7f6a554e1b Small adjustments 2021-04-21 17:21:55 +02:00
Eric Severance
eb99271120
Use 22.5 for the TM1814 max current (#1905)
* Configure TM1814 max current

* Use 22.5 mA as this seems to be a common value for the LEDs
2021-04-20 21:36:52 +02:00
Blaz Kristan
04aa22b510 Removed debug output in Animated Staircase.
Added PIR sensor switch usermod.
2021-04-19 22:24:55 +02:00
Eric Severance
13e5c695c3
Initialize PixelSettings for TM1814 strips (#1847)
* Better handling for TM1814 strips

* Call SetPixelSettings after Begin as described on the NeoPixelBus wiki

* Use NeoTm1814Settings::MaxCurrent constant
2021-04-18 19:14:12 +02:00
Blaz Kristan
1cd56decab Rewritten usermod config saving/reloading.
Changed temperature reading (to work on ESP32 more reliably).
Added Animated staircase usermod to the collection.
2021-04-17 17:04:36 +02:00
Blaz Kristan
585f8f4683 WLED math optimisations. 2021-04-16 20:07:54 +02:00
Def3nder
12de47c923
Fix TV-Simmulator Effect flash usage (#1621)
* Add alternative TV-Sim version without tv_colors.h

...and safe 18k flash this way

* ...remove the define
2021-04-16 10:22:22 +02:00
cschwinne
afde7940d8 NUM_STRIPS no longer required with compile-time strip defaults 2021-04-16 01:01:24 +02:00
Blaz Kristan
1070d8d3fa Fix for AutoSave checkbox not saving. 2021-04-15 22:29:26 +02:00
Blaz Kristan
dcc7ba8f93 Changed ability to add multiple busses as compile time defaults,
using the esp32_multistrip usermod define syntax.
2021-04-15 22:19:58 +02:00
cschwinne
01dd41bdbf Added ability to add multiple busses as compile time defaults using the esp32_multistrip usermod define syntax 2021-04-15 10:55:22 +02:00
Blaz Kristan
7d5b20314c Ahhhh. 2021-04-14 18:22:00 +02:00
Blaz Kristan
29e048af7b Merge branch 'master' into dev
Conflicts:
	CHANGELOG.md
	package.json
	platformio.ini
	usermods/Temperature/usermod_temperature.h
	wled00/FX.cpp
	wled00/FX.h
	wled00/FX_fcn.cpp
	wled00/cfg.cpp
	wled00/data/index.js
	wled00/data/settings_leds.htm
	wled00/data/settings_time.htm
	wled00/data/style.css
	wled00/html_other.h
	wled00/html_settings.h
	wled00/html_ui.h
	wled00/ntp.cpp
	wled00/usermods_list.cpp
	wled00/wled.cpp
	wled00/wled.h
2021-04-14 18:19:51 +02:00
cschwinne
f3b84f1365 Switch trigonometric implementation, saves 460b memory 2021-04-14 16:49:47 +02:00
cschwinne
5751d5c1b0 Fixed Button, IR, Relay pin not assigned by default (resolves #1891)
Fixed instance discovery not working if MQTT not compiled in
2021-04-14 01:16:32 +02:00
Aircoookie
3d2336aac1
Merge pull request #1890 from blazoncek/holiday-list
Easier holiday/special events handling for background images.
2021-04-14 00:56:41 +02:00
cschwinne
afe5f19464 Update holiday BG durations
Fix semicolons
2021-04-14 00:44:07 +02:00
Aircoookie
4091a3c238
Merge pull request #1889 from blazoncek/sunrise-sunset-012
Sunrise and sunset calculation and sunrise/sunset triggered presets.
2021-04-13 23:41:03 +02:00
Blaž Kristan
c38f0d751b Cleanup & typo fix. 2021-04-13 08:11:51 +02:00
Blaz Kristan
3623afa721 Minor tweaks. 2021-04-12 23:32:54 +02:00
Blaz Kristan
f411e07fb4 Easier holiday/special events handling for background images. 2021-04-12 23:00:22 +02:00
Blaz Kristan
9bfe27dd5e Sunrise and sunset calculation and sunrise/sunset triggered presets. 2021-04-12 21:53:22 +02:00
Blaz Kristan
6a096fbb27 Fixed #define typo.
Made usermod Auto Save runtime configurable.
String optimisations.
2021-04-12 21:10:47 +02:00
Aircoookie
c4201d9a2a
Merge pull request #1886 from betaphi/BME280_Patch
Usermod BME280_v2 refinement
2021-04-12 11:07:22 +02:00
Bastian Rössler
58e9817a6d Add PublishAlways to BME280_v2 Usermod 2021-04-12 10:31:59 +02:00
cschwinne
48d5584491 Add switch support 2021-04-12 00:45:33 +02:00
Blaz Kristan
6404071a01 Holidy wallpapers. 2021-04-11 21:11:43 +02:00
Blaz Kristan
735205492e 4LineDisplay enhancements.
Boot loop (preset apply) fix.
2021-04-11 16:47:53 +02:00
Aircoookie
5786f1d057
Merge pull request #1863 from fishbone-git/running_dual
Running dual
2021-04-11 00:59:56 +02:00
cschwinne
87c6f3c757 Add gap for Running Dual 2021-04-11 00:50:14 +02:00
Blaz Kristan
a6feb77e52 4LineDisplay rewrite for dynamic configuration.
Added handling for multiple pins in usermod.
Fixed minor bugs.
2021-04-11 00:38:13 +02:00
cschwinne
0e99c948d6 Merge branch 'master' of https://github.com/Aircoookie/WLED 2021-04-10 12:22:12 +02:00
cschwinne
0f5e0f640b Updated codm environments
Added custom 8MB ESP32 partition csv
2021-04-10 12:22:09 +02:00
Aircoookie
3d2c6388de
Merge pull request #1875 from zoide/patch-1
updated bottom/top sensor
2021-04-10 12:19:49 +02:00
Blaz Kristan
13b3b2fd23 1st working usermod settings (Temperature).
Added color on pin conflicts in LEDs setting page.
2021-04-10 00:17:15 +02:00
Udo Waechter
ad8e614ae8
updated bottom/top sensor
bottomsensor and topsensor were incorrect: bottom-sensor / top-sensor according to API
2021-04-09 17:50:26 +02:00
Blaz Kristan
9a6d709082 Reduced rev:2 API use.
Changed version to 0.12.1-a0
2021-04-08 15:46:18 +02:00
Aircoookie
48c0360877
Merge pull request #1850 from eg321/VL53L0X-gestures
Support of simple gestures for VL53L0X laser sensor
2021-04-08 15:31:37 +02:00
Blaz Kristan
6eafab8286 Per strip "skip first led".
Removed RGBW override from UI.
Saving presets uses rev:1 API if possible.
2021-04-07 21:04:54 +02:00
Aircoookie
d230be3e1c
Merge pull request #1851 from kolcun/patch-1
Increase buffer size
2021-04-07 01:15:42 +02:00
Aircoookie
daa77d40a3
Merge pull request #1862 from fishbone-git/drip
Drip: use constrain to keep in segment limits
2021-04-07 00:59:38 +02:00
Blaz Kristan
c901512db0 Removed STATUSLED
Fix for possible Drip effect ESP reboot.
2021-04-06 22:30:23 +02:00
Aircoookie
6ae743684f
Merge pull request #1864 from blazoncek/ledmap-multisegment-fix
Ledmap multisegment fix.
2021-04-06 12:03:45 +02:00
cschwinne
789c00dde1 Change indexSet to signed 32 bit 2021-04-06 11:42:21 +02:00
Blaž Kristan
90da471084 Fix for mirrored segments. 2021-04-06 07:48:12 +02:00
Blaž Kristan
2d55056015
Merge branch 'master' into ledmap-multisegment-fix 2021-04-05 21:19:19 +02:00
Blaz Kristan
ffab9bb893 Ledmap multisegment fix. 2021-04-05 21:14:36 +02:00
fishbone-git
1192d04391 sync and merge master 2021-04-05 20:49:31 +02:00
fishbone-git
f18dced2f3 use constrain to keep in segment limits 2021-04-05 16:08:35 +02:00
Blaz Kristan
31ea032054 Added segment names. 2021-04-04 21:10:44 +02:00
Blaz Kristan
89543e927a Added multiple ledmaps, selectable via JSON API. 2021-04-04 13:54:34 +02:00
Blaz Kristan
a52386e6ad 0.12 release
- removed AUX
- fix for negative values in LED settings
- fix for iOS app
2021-04-03 19:43:08 +02:00
cschwinne
ecdc0a3800 Fixed ESP32 crash on Drip effect with reversed segment (#1854) 2021-04-03 17:18:29 +02:00
Mike Kolcun
a69dcfc49d
Increase buffer size
Avoid buffer overflows with longer mqtt topics
mqtDeviceTopic in wled.h is defined with a size of 33, so this should be set to 45 to accommodate the additional 12 characters - /temperature
2021-04-02 14:04:27 -04:00
Egor Chernodarov
601005f837 Support of simple gestures for VL53L0X laser sensor 2021-04-02 23:04:10 +07:00
Blaz Kristan
70546cd2ec UI code optimisations. 2021-04-01 22:13:44 +02:00
Blaz Kristan
a7c99cbbd2 Option to use segment length instead of stop. 2021-04-01 17:12:45 +02:00
Blaž Kristan
40780ccec7 Settings cleanup for pins. 2021-04-01 14:03:43 +02:00
Blaž Kristan
7078c91f7d Skip first led cleanup. 2021-04-01 12:53:01 +02:00
Blaz Kristan
0e2168392c Checkboxes for pins. 2021-03-31 21:36:19 +02:00
Blaz Kristan
380006c9d8 UI sync button refresh fix. 2021-03-31 20:07:37 +02:00
Blaz Kristan
4127882e5f Increased JSON buffer to 9k.
Removed daytime symbol from info page.
2021-03-31 16:41:20 +02:00
Blaz Kristan
5f17d30973 Getting on par with master. 2021-03-30 20:43:46 +02:00
Blaz Kristan
6ace46eece Merge branch 'master' into dev.
Few other modifications.

Conflicts:
	package.json
	platformio.ini
	wled00/FX.h
	wled00/FX_fcn.cpp
	wled00/bus_wrapper.h
	wled00/cfg.cpp
	wled00/data/index.css
	wled00/data/index.htm
	wled00/data/settings_leds.htm
	wled00/html_other.h
	wled00/html_settings.h
	wled00/html_ui.h
	wled00/json.cpp
	wled00/set.cpp
	wled00/wled.cpp
	wled00/wled.h
	wled00/wled_eeprom.cpp
	wled00/wled_server.cpp
	wled00/xml.cpp
2021-03-29 23:12:19 +02:00
Blaž Kristan
37cab07295 Reverting HSPI use on ESP32. 2021-03-29 09:00:41 +02:00
Blaz Kristan
cfeb88f649 Version bump. :( 2021-03-28 22:50:09 +02:00
Blaz Kristan
7ce197e0c8 Adding skinning capabilities to WLED. 2021-03-28 22:49:41 +02:00
Blaz Kristan
f93b1167f1 Reduced SPI speed for WS2801 to 2MHz.
Added HW SPI for busses 0 and 1.
2021-03-28 21:00:07 +02:00
Blaz Kristan
152ca63529 Possible fix for HW SPI on ESP32. 2021-03-28 17:33:53 +02:00
Blaz Kristan
2e8d5311a5 New font. UI fixes.
Skinning with CSS.
2021-03-28 17:15:26 +02:00
Blaž Kristan
23b5fd1c12 BusManager static method. 2021-03-26 11:52:04 +01:00
Blaz Kristan
7a8ba7d47d Still some fixes for UI. 2021-03-25 21:49:11 +01:00
Blaz Kristan
1a509cf3e0 Palette preview fix. 2021-03-25 21:13:47 +01:00
Blaz Kristan
9848f9613c UI bugfixes. 2021-03-25 20:34:39 +01:00
Blaz Kristan
93cefb88f5 CRLF madness. :( 2021-03-25 20:00:08 +01:00
Blaz Kristan
7132e1fee1 Further compatibility enhancement. 2021-03-25 17:20:07 +01:00
Blaz Kristan
e70e1b8ad7 Adding backwards compatibility. 2021-03-25 17:07:03 +01:00
Blaz Kristan
77d8a8e43d Reducing JSON buffer size requirements.
Increasing maximum number of segments.
2021-03-24 23:55:39 +01:00
Blaz Kristan
0b75a7d0d3 Fix current calculation. 2021-03-23 15:34:46 +01:00
Blaž Kristan
f6772eaf59 FPS drop workaround. 2021-03-23 07:05:40 +01:00
Blaz Kristan
7ac5abe7f8 Missing include. 2021-03-22 23:27:40 +01:00
Blaz Kristan
157e6b2a33 Sticky default & solid. 2021-03-22 23:19:39 +01:00
Blaz Kristan
a385ea7c52 UI tweaks. 2021-03-21 22:33:04 +01:00
Blaz Kristan
c58a3c41d8 Version bump. 2021-03-21 10:35:29 +01:00
Blaz Kristan
0a7df86f3f Better ADALights pin 3 handling. 2021-03-21 10:34:47 +01:00
Blaz Kristan
f8df7ebb7c UI optimisation. 2021-03-21 00:08:42 +01:00
Blaz Kristan
60503c31fb IR pin saving. 2021-03-20 23:59:17 +01:00
Blaz Kristan
77220e24dd Reserved pins management.
Disabling ADALight by default.
2021-03-20 23:52:38 +01:00
Blaz Kristan
3c25e11c5f Moved from alpha to beta. 2021-03-20 23:20:03 +01:00
Blaz Kristan
be2ffc31b2 Reduction of buffer size.
Caching tweak.
2021-03-20 23:04:24 +01:00
Blaz Kristan
adfb24ce02 Removed mobile Nodes button.
Tapping on node name triigers the same.
2021-03-20 16:03:59 +01:00
Blaz Kristan
e6d50f94ee Merge branch 'dev' of https://github.com/aircoookie/WLED into dev
Conflicts:
	wled00/data/index.css
	wled00/data/index.htm
	wled00/data/index.js
	wled00/html_ui.h
	wled00/json.cpp
2021-03-20 14:48:49 +01:00
Blaz Kristan
520798bfa6 Fixing include. 2021-03-20 13:12:11 +01:00
Blaz Kristan
e539a36ae7 Fix for empty WS reponse.
Scroll selected preset into view.
2021-03-20 13:11:10 +01:00
Blaz Kristan
bfab2d405b Removed unnecessary vars. 2021-03-19 16:23:16 +01:00
Blaz Kristan
df38f00cf2 Optimised websockets UI refresh. 2021-03-19 16:09:24 +01:00
Blaž Kristan
a30ce1c44d Websockets handling of JSON response. 2021-03-19 10:28:41 +01:00
Blaž Kristan
baf4a241a2 Remove toggleOnOff() and use setBrightness().
Return state to Off if it was Off when realtime mode started.
2021-03-19 08:24:45 +01:00
Blaz Kristan
c59e792178 Reduced JSON buffer by 1k.
Increased max RAM FX usage on ESP32 to 20k.
Added relay On handling on realtime data if Off (@JDTSmith).
Added UI refreshing via websockets (@korkbaum).
2021-03-18 23:19:17 +01:00
Blaz Kristan
e6a99c1d33 UI Info page fix. 2021-03-18 17:31:34 +01:00
Blaz Kristan
3548628c2c Mobile Nodes button is back! 2021-03-17 17:11:05 +01:00
Blaž Kristan
bb84157a21 Cosmetic fixes & size optimisation. 2021-03-17 09:30:23 +01:00
Blaz Kristan
eb10aa8c97 Semicolon. 2021-03-15 22:47:04 +01:00
Blaz Kristan
07428922c3 Auto refreshing UI every 15secons. 2021-03-14 22:34:27 +01:00
Blaz Kristan
0f7e22d8b7 Merge branch 'dev' of https://github.com/aircoookie/WLED into dev
Conflicts:
	wled00/cfg.cpp
	wled00/data/index.js
	wled00/fcn_declare.h
	wled00/html_ui.h
	wled00/json.cpp
	wled00/playlist.cpp
	wled00/wled.h
2021-03-14 11:41:55 +01:00
Blaz Kristan
caae57d960 Adding multiple compile time pins. 2021-03-12 23:56:29 +01:00
Blaz Kristan
f91384596c PIR sensor usermod pin reservation.
Time settings UI tweaks.
2021-03-10 18:46:13 +01:00
Blaz Kristan
cb38976162 Merge branch 'dev' of https://github.com/aircoookie/WLED into dev
Conflicts:
	wled00/NodeStruct.h
	wled00/data/index.htm
	wled00/data/index.js
	wled00/fcn_declare.h
	wled00/html_ui.h
	wled00/json.cpp
	wled00/udp.cpp
	wled00/wled.cpp
	wled00/wled.h
2021-03-10 13:23:03 +01:00
Blaz Kristan
4c5c4d1700 Minor UI tweak. 2021-03-09 14:01:18 +01:00
Blaz Kristan
e3fabe92bd Fixed slow NTP respone for calculating sunrise.
Fixed saving/loading only sunset trigger.
2021-03-09 13:24:20 +01:00
Blaz Kristan
142740f080 Sunrise/sunset re-calculated after saving time settings. 2021-03-08 19:52:43 +01:00
Blaz Kristan
09e51c2399 Sunrise/sunset info added to settings..
Sunrise/sunset calculated every minute (debug).
2021-03-08 19:40:06 +01:00
Blaz Kristan
0892eb271d Minor F() fixes. 2021-03-08 07:53:27 +01:00
Blaz Kristan
536be76ecb Switched lat/lon. 2021-03-08 06:27:00 +01:00
Blaz Kristan
6bfdf0eb4d Whitespace fix (dtostrf) for lat/lon. 2021-03-07 20:50:54 +01:00
Blaz Kristan
8320ed5a92 Bugfixes. 2021-03-07 18:34:06 +01:00
Blaz Kristan
43677685bb Merge branch 'dev' of https://github.com/aircoookie/WLED into dev
Conflicts:
	wled00/cfg.cpp
	wled00/const.h
	wled00/data/settings_leds.htm
	wled00/html_settings.h
	wled00/set.cpp
	wled00/wled.h
	wled00/xml.cpp
2021-03-07 17:53:15 +01:00
Blaz Kristan
61e0aa9845 Fixed missing ellipsis. 2021-03-07 15:33:08 +01:00
Blaz Kristan
34eee005a8 Add comment & update fcn_declare. 2021-03-07 12:43:13 +01:00
Blaz Kristan
6fa136da0c Minor tweaks & optimisations. 2021-03-07 11:14:16 +01:00
Blaz Kristan
b5abc6c724 Added sunrise/sunset triggered presets. 2021-03-07 00:04:46 +01:00
Blaz Kristan
f74a45a33e Sunris/sunset detection. 2021-03-05 23:05:09 +01:00
Blaz Kristan
0a1d04495d Version bump 2021-03-05 13:10:59 +01:00
Blaz Kristan
49dee560fd Sticky save & back buttons. 2021-03-05 09:50:59 +01:00
Blaz Kristan
dfb3dfb74d platformio.ini cleanup 2021-03-04 23:08:06 +01:00
Blaz Kristan
c4689c3bcc Added version info in autodiscovery packet. 2021-03-04 14:24:25 +01:00
Blaz Kristan
83452d73bc Code clean-up. 2021-03-04 11:17:17 +01:00
Blaz Kristan
e5417d12ca General cleanup & optimisations.
Pushing memory to (safe-ish) limits.
2021-03-03 22:04:24 +01:00
Blaz Kristan
6e19e6f0a0 Add reserved pins for ESP32 too. 2021-03-02 11:46:25 +01:00
Blaz Kristan
071281c13a Merge branch 'dev' of https://github.com/aircoookie/WLED into dev
Minor warning suppressions.

Conflicts:
	wled00/FX.cpp
	wled00/FX_fcn.cpp
	wled00/cfg.cpp
	wled00/wled.h
	wled00/xml.cpp
2021-03-02 11:00:07 +01:00
Blaz Kristan
61101987f9 Minor tweaks to Chunchun & Plasma FX. 2021-03-01 19:50:14 +01:00
Blaz Kristan
a057e50684 Forgotten .h file. 2021-03-01 12:41:14 +01:00
Blaz Kristan
5f3dc660c8 Fix for index count in settings.
Pin conflict on submit.
2021-03-01 11:56:02 +01:00
Blaz Kristan
51ead2f6bd Version bump. 2021-03-01 10:28:43 +01:00
Blaz Kristan
d433b25627 Fix for deallocation of PWM pins (missing destructor). 2021-03-01 10:27:55 +01:00
Blaz Kristan
bd7671c07e Debug for analog pin.
Minor tweaks.
2021-02-28 22:54:30 +01:00
Blaz Kristan
847178b7be Move node discovery in separate page. 2021-02-28 18:16:24 +01:00
Blaž Kristan
a899ea8b4d Prevent RGBW checkbox modification for analog LEDs 2021-02-27 18:46:35 +01:00
Blaz Kristan
7b83b99ac9 Fix for resetting segments. 2021-02-27 12:06:14 +01:00
Blaz Kristan
c11acb6308 Minor UI tweaks. 2021-02-26 22:43:57 +01:00
Blaz Kristan
d76103eb76 Minor UI tweak. 2021-02-26 18:46:16 +01:00
Blaz Kristan
779f984a30 Minor UI fix. 2021-02-26 16:46:46 +01:00
Blaz Kristan
9c55017191 Stray } fix. 2021-02-26 16:21:49 +01:00
Blaz Kristan
c6f575d8d3 Preprocessor fix. 2021-02-26 16:05:05 +01:00
Blaž Kristan
2c0c22dbf3 RGBW override cleanup, UI fix. 2021-02-26 08:34:38 +01:00
Blaz Kristan
73a99a7dea Merge branch 'dev' of https://github.com/aircoookie/WLED into dev 2021-02-25 23:02:37 +01:00
Blaz Kristan
3c81337630 PWM pins saving (hack bug) fix. UI changes. 2021-02-25 22:55:49 +01:00
Blaž Kristan
3f41ba6bdf Pin clash fix, minimization. 2021-02-25 13:22:29 +01:00
Blaž Kristan
2812f61957 Debug pin fix. 2021-02-25 09:56:09 +01:00
Blaž Kristan
f23cee17eb Minor fixes and optimisations.
Temperature usermod update for pin saving.
2021-02-25 09:54:10 +01:00
Blaz Kristan
f24fcfca69 Merge branch 'dev' of https://github.com/aircoookie/WLED into dev
Conflicts:
	wled00/set.cpp
	wled00/xml.cpp
2021-02-24 22:11:27 +01:00
Blaz Kristan
d60506a75d Skip 1st fix, save LED count, removed reverse. 2021-02-24 21:33:44 +01:00
Blaz Kristan
77dee439e6 1st attempt at 'blazoncek' 0.12 2021-02-24 20:23:32 +01:00
pjhatch
56a74bc54c Update FX.cpp
Added the improvements suggested by Gregor Hartmann
2020-08-15 12:34:13 -05:00
pjhatch
a20358b61b Adding 2 ball track modes
With and without collisions
2020-07-12 08:33:48 -05:00
pjhatch
341d9d1697 Update FX.cpp
Still 1 bug to fix - this was a test.
2020-07-05 14:55:14 -05:00
pjhatch
9cee424383 Update FX.cpp 2020-07-05 14:53:14 -05:00
pjhatch
37cb51cfd6 Adding Collision
A couple of bugs still need sorting
2020-07-02 14:16:25 -05:00
pjhatch
84b7bfb989 update for lost balls
Added some protection - so that when intensity is lowered and raised some time later balls that have moved way off the track are recovered.
2020-06-28 19:59:46 -05:00
pjhatch
04d17e4839 Added Ball Track V1
In this version the balls bounce of the edges and do not interact with one another.
2020-06-28 19:43:56 -05:00
fishbone-git
cb0452964e bidirectional running lights effect 2020-02-18 21:28:46 +01:00
548 changed files with 99044 additions and 33198 deletions

View File

@ -2,12 +2,7 @@
# [Choice] Python version: 3, 3.9, 3.8, 3.7, 3.6
ARG VARIANT="3"
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT}
# [Option] Install Node.js
ARG INSTALL_NODE="true"
ARG NODE_VERSION="lts/*"
RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
FROM mcr.microsoft.com/devcontainers/python:0-${VARIANT}
# [Optional] If your pip requirements rarely change, uncomment this section to add them to the image.
# COPY requirements.txt /tmp/pip-tmp/

View File

@ -5,41 +5,54 @@
"context": "..",
"args": {
// Update 'VARIANT' to pick a Python version: 3, 3.6, 3.7, 3.8, 3.9
"VARIANT": "3",
// Options
"INSTALL_NODE": "true",
"NODE_VERSION": "lts/*"
"VARIANT": "3"
}
},
// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash",
"python.pythonPath": "/usr/local/bin/python",
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint"
},
// To give the container access to a device serial port, you can uncomment one of the following lines.
// Note: If running on Windows, you will have to do some additional steps:
// https://stackoverflow.com/questions/68527888/how-can-i-use-a-usb-com-port-inside-of-a-vscode-development-container
//
// You can explicitly just forward the port you want to connect to. Replace `/dev/ttyACM0` with the serial port for
// your device. This will only work if the device is plugged in from the start without reconnecting. Adding the
// `dialout` group is needed if read/write permisions for the port are limitted to the dialout user.
// "runArgs": ["--device=/dev/ttyACM0", "--group-add", "dialout"],
//
// Alternatively, you can give more comprehensive access to the host system. This will expose all the host devices to
// the container. Adding the `dialout` group is needed if read/write permisions for the port are limitted to the
// dialout user. This could allow the container to modify unrelated serial devices, which would be a similar level of
// risk to running the build directly on the host.
// "runArgs": ["--privileged", "-v", "/dev/bus/usb:/dev/bus/usb", "--group-add", "dialout"],
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-python.python",
"platformio.platformio-ide"
],
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.shell.linux": "/bin/bash",
"python.pythonPath": "/usr/local/bin/python",
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint"
},
"extensions": [
"ms-python.python",
"platformio.platformio-ide"
]
}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "npm install",
"postCreateCommand": "bash -i -c 'nvm install && npm ci'",
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"

1
.envrc Normal file
View File

@ -0,0 +1 @@
layout python-venv python3

2
.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1,2 @@
github: [Aircoookie,blazoncek]
custom: ['https://paypal.me/Aircoookie','https://paypal.me/blazoncek']

View File

@ -1,27 +0,0 @@
---
name: Bug
about: Noticed an issue with your lights?
title: ''
labels: bug
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is. Please quickly search existing issues first!
**To Reproduce**
Steps to reproduce the behavior, if consistently possible
**Expected behavior**
A clear and concise description of what you expected to happen.
**WLED version**
- Board: [e.g. Wemos D1, ESP32 dev]
- Version [e.g. 0.10.0, dev200603]
- Format [e.g. Binary, self-compiled]
**Additional context**
Anything else you'd like to say about the problem?
Thank you for your help!

86
.github/ISSUE_TEMPLATE/bug.yml vendored Normal file
View File

@ -0,0 +1,86 @@
name: Bug Report
description: File a bug report
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Please quickly search existing issues first before submitting a bug.
- type: textarea
id: what-happened
attributes:
label: What happened?
description: A clear and concise description of what the bug is.
placeholder: Tell us what the problem is.
validations:
required: true
- type: textarea
id: how-to-reproduce
attributes:
label: To Reproduce Bug
description: Steps to reproduce the behavior, if consistently possible.
placeholder: Tell us how to make the bug appear.
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: Expected Behavior
description: A clear and concise description of what you expected to happen.
placeholder: Tell us what you expected to happen.
validations:
required: true
- type: dropdown
id: install_format
attributes:
label: Install Method
description: How did you install WLED?
options:
- Binary from WLED.me
- Self-Compiled
validations:
required: true
- type: input
id: version
attributes:
label: What version of WLED?
description: You can find this in by going to Config -> Security & Updates -> Scroll to Bottom. Copy and paste the entire line after "Server message"
placeholder: "e.g. WLED 0.13.1 (build 2203150)"
validations:
required: true
- type: dropdown
id: Board
attributes:
label: Which microcontroller/board are you seeing the problem on?
multiple: true
options:
- ESP8266
- ESP32
- ESP32-S3
- ESP32-S2
- ESP32-C3
- Other
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant log/trace output
description: Please copy and paste any relevant log output if you have it. This will be automatically formatted into code, so no need for backticks.
render: shell
- type: textarea
attributes:
label: Anything else?
description: |
Links? References? Anything that will give us more context about the issue you are encountering!
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
validations:
required: false
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/wled-dev/WLED/blob/main/CODE_OF_CONDUCT.md)
options:
- label: I agree to follow this project's Code of Conduct
required: true

11
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: WLED Discord community
url: https://discord.gg/KuqP7NE
about: Please ask and answer questions and discuss setup issues here!
- name: WLED community forum
url: https://wled.discourse.group/
about: For issues and ideas that might need longer discussion.
- name: kno.wled.ge base
url: https://kno.wled.ge/basics/faq/
about: Take a look at the frequently asked questions and documentation, perhaps your question is already answered!

View File

@ -1,19 +0,0 @@
---
name: Question
about: Have a question about using WLED?
title: ''
labels: question
assignees: ''
---
**Take a look at the wiki and FAQ, perhaps your question is already answered!**
[FAQ](https://github.com/Aircoookie/WLED/wiki/FAQ)
**Please consider asking your question on the WLED forum or Discord**
[Forum](https://wled.discourse.group/)
[Discord](https://discord.gg/KuqP7NE)
[What to post where?](https://github.com/Aircoookie/WLED/issues/658)
**If you do not like to use these platforms, delete this template and ask away!**
Please keep in mind though that the issue section is generally not the preferred place for general questions.

20
.github/stale.yml vendored
View File

@ -1,20 +0,0 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 120
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- keep
- enhancement
- confirmed
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
Hey! This issue has been open for quite some time without any new comments now.
It will be closed automatically in a week if no further activity occurs.
Thank you for using WLED!
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false

82
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,82 @@
name: WLED Build
# Only included into other workflows
on:
workflow_call:
jobs:
get_default_envs:
name: Gather Environments
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- name: Install PlatformIO
run: pip install -r requirements.txt
- name: Get default environments
id: envs
run: |
echo "environments=$(pio project config --json-output | jq -cr '.[0][1][0][1]')" >> $GITHUB_OUTPUT
outputs:
environments: ${{ steps.envs.outputs.environments }}
build:
name: Build Environments
runs-on: ubuntu-latest
needs: get_default_envs
strategy:
fail-fast: false
matrix:
environment: ${{ fromJSON(needs.get_default_envs.outputs.environments) }}
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- run: npm ci
- name: Cache PlatformIO
uses: actions/cache@v4
with:
path: |
~/.platformio/.cache
~/.buildcache
build_output
key: pio-${{ runner.os }}-${{ matrix.environment }}-${{ hashFiles('platformio.ini', 'pio-scripts/output_bins.py') }}-${{ hashFiles('wled00/**', 'usermods/**') }}
restore-keys: pio-${{ runner.os }}-${{ matrix.environment }}-${{ hashFiles('platformio.ini', 'pio-scripts/output_bins.py') }}-
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- name: Install PlatformIO
run: pip install -r requirements.txt
- name: Build firmware
run: pio run -e ${{ matrix.environment }}
- uses: actions/upload-artifact@v4
with:
name: firmware-${{ matrix.environment }}
path: |
build_output/release/*.bin
build_output/release/*_ESP02*.bin.gz
testCdata:
name: Test cdata.js
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- run: npm ci
- run: npm test

47
.github/workflows/nightly.yml vendored Normal file
View File

@ -0,0 +1,47 @@
name: Deploy Nightly
on:
# This can be used to automatically publish nightlies at UTC nighttime
schedule:
- cron: '0 2 * * *' # run at 2 AM UTC
# This can be used to allow manually triggering nightlies from the web interface
workflow_dispatch:
jobs:
wled_build:
uses: ./.github/workflows/build.yml
nightly:
name: Deploy nightly
runs-on: ubuntu-latest
needs: wled_build
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
merge-multiple: true
- name: Show Files
run: ls -la
- name: "✏️ Generate release changelog"
id: changelog
uses: janheinrichmerker/action-github-changelog-generator@v2.3
with:
token: ${{ secrets.GITHUB_TOKEN }}
sinceTag: v0.15.0
- name: Update Nightly Release
uses: andelf/nightly-release@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: nightly
name: 'Nightly Release $$'
prerelease: true
body: ${{ steps.changelog.outputs.changelog }}
files: |
*.bin
*.bin.gz
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v3
with:
repository: wled/WLED-WebInstaller
event-type: release-nightly
token: ${{ secrets.PAT_PUBLIC }}

16
.github/workflows/pr-merge.yaml vendored Normal file
View File

@ -0,0 +1,16 @@
name: Notify Discord on PR Merge
on:
pull_request:
types: [closed]
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Send Discord notification
shell: bash
env:
DISCORD_WEBHOOK_BETA_TESTERS: ${{ secrets.DISCORD_WEBHOOK_BETA_TESTERS }}
if: github.event.pull_request.merged == true
run: |
curl -H "Content-Type: application/json" -d '{"content": "Pull Request #{{ github.event.pull_request.number }} merged by {{ github.actor }}"}' $DISCORD_WEBHOOK_BETA_TESTERS

35
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,35 @@
name: WLED Release CI
on:
push:
tags:
- '*'
jobs:
wled_build:
uses: ./.github/workflows/build.yml
release:
name: Create Release
runs-on: ubuntu-latest
needs: wled_build
steps:
- uses: actions/download-artifact@v4
with:
merge-multiple: true
- name: "✏️ Generate release changelog"
id: changelog
uses: janheinrichmerker/action-github-changelog-generator@v2.3
with:
token: ${{ secrets.GITHUB_TOKEN }}
sinceTag: v0.15.0
- name: Create draft release
uses: softprops/action-gh-release@v1
with:
body: ${{ steps.changelog.outputs.changelog }}
draft: True
files: |
*.bin
*.bin.gz

30
.github/workflows/stale.yml vendored Normal file
View File

@ -0,0 +1,30 @@
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '0 12 * * *'
workflow_dispatch:
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
days-before-stale: 120
days-before-close: 7
stale-issue-label: 'stale'
stale-pr-label: 'stale'
exempt-issue-labels: 'pinned,keep,enhancement,confirmed'
exempt-pr-labels: 'pinned,keep,enhancement,confirmed'
exempt-all-milestones: true
operations-per-run: 1000
stale-issue-message: >
Hey! This issue has been open for quite some time without any new comments now.
It will be closed automatically in a week if no further activity occurs.
Thank you for using WLED! ✨
stale-pr-message: >
Hey! This pull request has been open for quite some time without any new comments now.
It will be closed automatically in a week if no further activity occurs.
Thank you for contributing to WLED! ❤️

13
.github/workflows/test.yaml vendored Normal file
View File

@ -0,0 +1,13 @@
on:
workflow_dispatch:
jobs:
dispatch:
runs-on: ubuntu-latest
steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v3
with:
repository: wled/WLED-WebInstaller
event-type: release-nightly
token: ${{ secrets.PAT_PUBLIC }}

View File

@ -1,31 +1,11 @@
name: PlatformIO CI
name: WLED CI
on: [push, pull_request]
on:
push:
branches:
- '*'
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v2
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Set up Python
uses: actions/setup-python@v2
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: Run PlatformIO
run: pio run
wled_build:
uses: ./.github/workflows/build.yml

29
.gitignore vendored
View File

@ -1,16 +1,25 @@
.pio
.cache
.clang-format
.direnv
.DS_Store
.idea
.pio
.pioenvs
.piolibdeps
.vscode
!.vscode/extensions.json
/wled00/Release
esp01-update.sh
platformio_override.ini
replace_fs.py
wled-update.sh
/build_output/
/node_modules/
/logs/
/wled00/extLibs
/platformio_override.ini
/wled00/LittleFS
/wled00/my_config.h
/build_output
.DS_Store
.gitignore
.clang-format
node_modules
.idea
/wled00/Release
/wled00/wled00.ino.cpp
/wled00/html_*.h

4
.gitpod.Dockerfile vendored
View File

@ -1,5 +1,3 @@
FROM gitpod/workspace-full
USER gitpod
RUN pip3 install -U platformio
USER gitpod

View File

@ -1,12 +1,11 @@
tasks:
- command: platformio run
- command: pip3 install -U platformio && platformio run
image:
file: .gitpod.Dockerfile
vscode:
extensions:
- ms-vscode.cpptools@0.26.3:u3GsZ5PK12Ddr79vh4TWgQ==
- eamodio.gitlens@10.2.1:e0IYyp0efFqVsrZwsIe8CA==
- Atishay-Jain.All-Autocomplete@0.0.23:fbZNfSpnd8XkAHGfAPS2rA==
- 2gua.rainbow-brackets@0.0.6:Tbu8dTz0i+/bgcKQTQ5b8g==
- Atishay-Jain.All-Autocomplete
- esbenp.prettier-vscode
- shardulm94.trailing-spaces

1
.nvmrc Normal file
View File

@ -0,0 +1 @@
20.18

View File

@ -1,7 +1,10 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"platformio.platformio-ide"
]
}
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"platformio.platformio-ide"
],
"unwantedRecommendations": [
"ms-vscode.cpptools-extension-pack"
]
}

6
.vscode/tasks.json vendored
View File

@ -9,8 +9,8 @@
],
"dependsOrder": "sequence",
"problemMatcher": [
"$platformio",
],
"$platformio"
]
},
{
"type": "PlatformIO",
@ -18,7 +18,7 @@
"task": "Build",
"group": {
"kind": "build",
"isDefault": true,
"isDefault": true
},
"problemMatcher": [
"$platformio"

File diff suppressed because it is too large Load Diff

108
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,108 @@
## Thank you for making WLED better!
Here are a few suggestions to make it easier for you to contribute!
### Describe your PR
Please add a description of your proposed code changes. It does not need to be an exhaustive essay, however a PR with no description or just a few words might not get accepted, simply because very basic information is missing.
A good description helps us to review and understand your proposed changes. For example, you could say a few words about
* what you try to achieve (new feature, fixing a bug, refactoring, security enhancements, etc.)
* how your code works (short technical summary - focus on important aspects that might not be obvious when reading the code)
* testing you performed, known limitations, open ends you possibly could not solve.
* any areas where you like to get help from an experienced maintainer (yes WLED has become big 😉)
### Target branch for pull requests
Please make all PRs against the `main` branch.
### Updating your code
While the PR is open - and under review by maintainers - you may be asked to modify your PR source code.
You can simply update your own branch, and push changes in response to reviewer recommendations.
Github will pick up the changes so your PR stays up-to-date.
> [!CAUTION]
> Do not use "force-push" while your PR is open!
> It has many subtle and unexpected consequences on our github reposistory.
> For example, we regularly lost review comments when the PR author force-pushes code changes. So, pretty please, do not force-push.
You can find a collection of very useful tips and tricks here: https://github.com/wled-dev/WLED/wiki/How-to-properly-submit-a-PR
### Code style
When in doubt, it is easiest to replicate the code style you find in the files you want to edit :)
Below are the guidelines we use in the WLED repository.
#### Indentation
We use tabs for Indentation in Web files (.html/.css/.js) and spaces (2 per indentation level) for all other files.
You are all set if you have enabled `Editor: Detect Indentation` in VS Code.
#### Blocks
Whether the opening bracket of e.g. an `if` block is in the same line as the condition or in a separate line is up to your discretion. If there is only one statement, leaving out block brackets is acceptable.
Good:
```cpp
if (a == b) {
doStuff(a);
}
```
```cpp
if (a == b) doStuff(a);
```
Acceptable - however the first variant is usually easier to read:
```cpp
if (a == b)
{
doStuff(a);
}
```
There should always be a space between a keyword and its condition and between the condition and brace.
Within the condition, no space should be between the parenthesis and variables.
Spaces between variables and operators are up to the authors discretion.
There should be no space between function names and their argument parenthesis.
Good:
```cpp
if (a == b) {
doStuff(a);
}
```
Not good:
```cpp
if( a==b ){
doStuff ( a);
}
```
#### Comments
Comments should have a space between the delimiting characters (e.g. `//`) and the comment text.
Note: This is a recent change, the majority of the codebase still has comments without spaces.
Good:
```
// This is a comment.
/* This is a CSS inline comment */
/*
* This is a comment
* wrapping over multiple lines,
* used in WLED for file headers and function explanations
*/
<!-- This is an HTML comment -->
```
There is no hard character limit for a comment within a line,
though as a rule of thumb consider wrapping after 120 characters.
Inline comments are OK if they describe that line only and are not exceedingly wide.

307
LICENSE
View File

@ -1,21 +1,294 @@
MIT License
Copyright (c) 2016-present Christian Schwinne and individual WLED contributors
Licensed under the EUPL v. 1.2 or later
Copyright (c) 2016 Christian Schwinne
EUROPEAN UNION PUBLIC LICENCE v. 1.2
EUPL © the European Union 2007, 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
This European Union Public Licence (the EUPL) applies to the Work (as
defined below) which is provided under the terms of this Licence. Any use of
the Work, other than as authorised under this Licence is prohibited (to the
extent such use is covered by a right of the copyright holder of the Work).
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The Work is provided under the terms of this Licence when the Licensor (as
defined below) has placed the following notice immediately following the
copyright notice for the Work:
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Licensed under the EUPL
or has expressed by any other means his willingness to license under the EUPL.
1. Definitions
In this Licence, the following terms have the following meaning:
- The Licence: this Licence.
- The Original Work: the work or software distributed or communicated by the
Licensor under this Licence, available as Source Code and also as Executable
Code as the case may be.
- Derivative Works: the works or software that could be created by the
Licensee, based upon the Original Work or modifications thereof. This
Licence does not define the extent of modification or dependence on the
Original Work required in order to classify a work as a Derivative Work;
this extent is determined by copyright law applicable in the country
mentioned in Article 15.
- The Work: the Original Work or its Derivative Works.
- The Source Code: the human-readable form of the Work which is the most
convenient for people to study and modify.
- The Executable Code: any code which has generally been compiled and which
is meant to be interpreted by a computer as a program.
- The Licensor: the natural or legal person that distributes or communicates
the Work under the Licence.
- Contributor(s): any natural or legal person who modifies the Work under
the Licence, or otherwise contributes to the creation of a Derivative Work.
- The Licensee or You: any natural or legal person who makes any usage of
the Work under the terms of the Licence.
- Distribution or Communication: any act of selling, giving, lending,
renting, distributing, communicating, transmitting, or otherwise making
available, online or offline, copies of the Work or providing access to its
essential functionalities at the disposal of any other natural or legal
person.
2. Scope of the rights granted by the Licence
The Licensor hereby grants You a worldwide, royalty-free, non-exclusive,
sublicensable licence to do the following, for the duration of copyright
vested in the Original Work:
- use the Work in any circumstance and for all usage,
- reproduce the Work,
- modify the Work, and make Derivative Works based upon the Work,
- communicate to the public, including the right to make available or display
the Work or copies thereof to the public and perform publicly, as the case
may be, the Work,
- distribute the Work or copies thereof,
- lend and rent the Work or copies thereof,
- sublicense rights in the Work or copies thereof.
Those rights can be exercised on any media, supports and formats, whether now
known or later invented, as far as the applicable law permits so.
In the countries where moral rights apply, the Licensor waives his right to
exercise his moral right to the extent allowed by law in order to make
effective the licence of the economic rights here above listed.
The Licensor grants to the Licensee royalty-free, non-exclusive usage rights
to any patents held by the Licensor, to the extent necessary to make use of
the rights granted on the Work under this Licence.
3. Communication of the Source Code
The Licensor may provide the Work either in its Source Code form, or as
Executable Code. If the Work is provided as Executable Code, the Licensor
provides in addition a machine-readable copy of the Source Code of the Work
along with each copy of the Work that the Licensor distributes or indicates,
in a notice following the copyright notice attached to the Work, a repository
where the Source Code is easily and freely accessible for as long as the
Licensor continues to distribute or communicate the Work.
4. Limitations on copyright
Nothing in this Licence is intended to deprive the Licensee of the benefits
from any exception or limitation to the exclusive rights of the rights owners
in the Work, of the exhaustion of those rights or of other applicable
limitations thereto.
5. Obligations of the Licensee
The grant of the rights mentioned above is subject to some restrictions and
obligations imposed on the Licensee. Those obligations are the following:
Attribution right: The Licensee shall keep intact all copyright, patent or
trademarks notices and all notices that refer to the Licence and to the
disclaimer of warranties. The Licensee must include a copy of such notices and
a copy of the Licence with every copy of the Work he/she distributes or
communicates. The Licensee must cause any Derivative Work to carry prominent
notices stating that the Work has been modified and the date of modification.
Copyleft clause: If the Licensee distributes or communicates copies of the
Original Works or Derivative Works, this Distribution or Communication will be
done under the terms of this Licence or of a later version of this Licence
unless the Original Work is expressly distributed only under this version of
the Licence — for example by communicating EUPL v. 1.2 only. The Licensee
(becoming Licensor) cannot offer or impose any additional terms or conditions
on the Work or Derivative Work that alter or restrict the terms of the
Licence.
Compatibility clause: If the Licensee Distributes or Communicates Derivative
Works or copies thereof based upon both the Work and another work licensed
under a Compatible Licence, this Distribution or Communication can be done
under the terms of this Compatible Licence. For the sake of this clause,
Compatible Licence refers to the licences listed in the appendix attached to
this Licence. Should the Licensee's obligations under the Compatible Licence
conflict with his/her obligations under this Licence, the obligations of the
Compatible Licence shall prevail.
Provision of Source Code: When distributing or communicating copies of the
Work, the Licensee will provide a machine-readable copy of the Source Code or
indicate a repository where this Source will be easily and freely available
for as long as the Licensee continues to distribute or communicate the Work.
Legal Protection: This Licence does not grant permission to use the trade
names, trademarks, service marks, or names of the Licensor, except as required
for reasonable and customary use in describing the origin of the Work and
reproducing the content of the copyright notice.
6. Chain of Authorship
The original Licensor warrants that the copyright in the Original Work granted
hereunder is owned by him/her or licensed to him/her and that he/she has the
power and authority to grant the Licence.
Each Contributor warrants that the copyright in the modifications he/she
brings to the Work are owned by him/her or licensed to him/her and that he/she
has the power and authority to grant the Licence.
Each time You accept the Licence, the original Licensor and subsequent
Contributors grant You a licence to their contributions to the Work, under the
terms of this Licence.
7. Disclaimer of Warranty
The Work is a work in progress, which is continuously improved by numerous
Contributors. It is not a finished work and may therefore contain defects or
bugs inherent to this type of development.
For the above reason, the Work is provided under the Licence on an as is
basis and without warranties of any kind concerning the Work, including
without limitation merchantability, fitness for a particular purpose, absence
of defects or errors, accuracy, non-infringement of intellectual property
rights other than copyright as stated in Article 6 of this Licence.
This disclaimer of warranty is an essential part of the Licence and a
condition for the grant of any rights to the Work.
8. Disclaimer of Liability
Except in the cases of wilful misconduct or damages directly caused to natural
persons, the Licensor will in no event be liable for any direct or indirect,
material or moral, damages of any kind, arising out of the Licence or of the
use of the Work, including without limitation, damages for loss of goodwill,
work stoppage, computer failure or malfunction, loss of data or any commercial
damage, even if the Licensor has been advised of the possibility of such
damage. However, the Licensor will be liable under statutory product liability
laws as far such laws apply to the Work.
9. Additional agreements
While distributing the Work, You may choose to conclude an additional
agreement, defining obligations or services consistent with this Licence.
However, if accepting obligations, You may act only on your own behalf and on
your sole responsibility, not on behalf of the original Licensor or any other
Contributor, and only if You agree to indemnify, defend, and hold each
Contributor harmless for any liability incurred by, or claims asserted against
such Contributor by the fact You have accepted any warranty or additional
liability.
10. Acceptance of the Licence
The provisions of this Licence can be accepted by clicking on an icon I
agree placed under the bottom of a window displaying the text of this Licence
or by affirming consent in any other similar way, in accordance with the rules
of applicable law. Clicking on that icon indicates your clear and irrevocable
acceptance of this Licence and all of its terms and conditions.
Similarly, you irrevocably accept this Licence and all of its terms and
conditions by exercising any rights granted to You by Article 2 of this
Licence, such as the use of the Work, the creation by You of a Derivative Work
or the Distribution or Communication by You of the Work or copies thereof.
11. Information to the public
In case of any Distribution or Communication of the Work by means of
electronic communication by You (for example, by offering to download the Work
from a remote location) the distribution channel or media (for example, a
website) must at least provide to the public the information requested by the
applicable law regarding the Licensor, the Licence and the way it may be
accessible, concluded, stored and reproduced by the Licensee.
12. Termination of the Licence
The Licence and the rights granted hereunder will terminate automatically upon
any breach by the Licensee of the terms of the Licence.
Such a termination will not terminate the licences of any person who has
received the Work from the Licensee under the Licence, provided such persons
remain in full compliance with the Licence.
13. Miscellaneous
Without prejudice of Article 9 above, the Licence represents the complete
agreement between the Parties as to the Work.
If any provision of the Licence is invalid or unenforceable under applicable
law, this will not affect the validity or enforceability of the Licence as a
whole. Such provision will be construed or reformed so as necessary to make it
valid and enforceable.
The European Commission may publish other linguistic versions or new versions
of this Licence or updated versions of the Appendix, so far this is required
and reasonable, without reducing the scope of the rights granted by the
Licence. New versions of the Licence will be published with a unique version
number.
All linguistic versions of this Licence, approved by the European Commission,
have identical value. Parties can take advantage of the linguistic version of
their choice.
14. Jurisdiction
Without prejudice to specific agreement between parties,
- any litigation resulting from the interpretation of this License, arising
between the European Union institutions, bodies, offices or agencies, as a
Licensor, and any Licensee, will be subject to the jurisdiction of the Court
of Justice of the European Union, as laid down in article 272 of the Treaty
on the Functioning of the European Union,
- any litigation arising between other parties and resulting from the
interpretation of this License, will be subject to the exclusive
jurisdiction of the competent court where the Licensor resides or conducts
its primary business.
15. Applicable Law
Without prejudice to specific agreement between parties,
- this Licence shall be governed by the law of the European Union Member State
where the Licensor has his seat, resides or has his registered office,
- this licence shall be governed by Belgian law if the Licensor has no seat,
residence or registered office inside a European Union Member State.
Appendix
Compatible Licences according to Article 5 EUPL are:
- GNU General Public License (GPL) v. 2, v. 3
- GNU Affero General Public License (AGPL) v. 3
- Open Software License (OSL) v. 2.1, v. 3.0
- Eclipse Public License (EPL) v. 1.0
- CeCILL v. 2.0, v. 2.1
- Mozilla Public Licence (MPL) v. 2
- GNU Lesser General Public Licence (LGPL) v. 2.1, v. 3
- Creative Commons Attribution-ShareAlike v. 3.0 Unported (CC BY-SA 3.0) for
works other than software
- European Union Public Licence (EUPL) v. 1.1, v. 1.2
- Québec Free and Open-Source Licence — Reciprocity (LiLiQ-R) or Strong
Reciprocity (LiLiQ-R+).
The European Commission may update this Appendix to later versions of the
above licences without producing a new version of the EUPL, as long as they
provide the rights granted in Article 2 of this Licence and protect the
covered Source Code from exclusive appropriation.
All other changes or additions to this Appendix require the production of a
new EUPL version.

47
boards/lolin_s3_mini.json Normal file
View File

@ -0,0 +1,47 @@
{
"build": {
"arduino": {
"ldscript": "esp32s3_out.ld",
"memory_type": "qio_qspi"
},
"core": "esp32",
"extra_flags": [
"-DBOARD_HAS_PSRAM",
"-DARDUINO_LOLIN_S3_MINI",
"-DARDUINO_USB_MODE=1"
],
"f_cpu": "240000000L",
"f_flash": "80000000L",
"flash_mode": "qio",
"hwids": [
[
"0x303A",
"0x8167"
]
],
"mcu": "esp32s3",
"variant": "lolin_s3_mini"
},
"connectivity": [
"bluetooth",
"wifi"
],
"debug": {
"openocd_target": "esp32s3.cfg"
},
"frameworks": [
"arduino",
"espidf"
],
"name": "WEMOS LOLIN S3 Mini",
"upload": {
"flash_size": "4MB",
"maximum_ram_size": 327680,
"maximum_size": 4194304,
"require_upload_port": true,
"speed": 460800
},
"url": "https://www.wemos.cc/en/latest/s3/index.html",
"vendor": "WEMOS"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 602 B

View File

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

View File

@ -0,0 +1,504 @@
/* esp8266_waveform imported from platform source code
Modified for WLED to work around a fault in the NMI handling,
which can result in the system locking up and hard WDT crashes.
Imported from https://github.com/esp8266/Arduino/blob/7e0d20e2b9034994f573a236364e0aef17fd66de/cores/esp8266/core_esp8266_waveform_phase.cpp
*/
/*
esp8266_waveform - General purpose waveform generation and control,
supporting outputs on all pins in parallel.
Copyright (c) 2018 Earle F. Philhower, III. All rights reserved.
Copyright (c) 2020 Dirk O. Kaar.
The core idea is to have a programmable waveform generator with a unique
high and low period (defined in microseconds or CPU clock cycles). TIMER1 is
set to 1-shot mode and is always loaded with the time until the next edge
of any live waveforms.
Up to one waveform generator per pin supported.
Each waveform generator is synchronized to the ESP clock cycle counter, not the
timer. This allows for removing interrupt jitter and delay as the counter
always increments once per 80MHz clock. Changes to a waveform are
contiguous and only take effect on the next waveform transition,
allowing for smooth transitions.
This replaces older tone(), analogWrite(), and the Servo classes.
Everywhere in the code where "ccy" or "ccys" is used, it means ESP.getCycleCount()
clock cycle time, or an interval measured in clock cycles, but not TIMER1
cycles (which may be 2 CPU clock cycles @ 160MHz).
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "core_esp8266_waveform.h"
#include <Arduino.h>
#include "debug.h"
#include "ets_sys.h"
#include <atomic>
// ----- @willmmiles begin patch -----
// Linker magic
extern "C" void usePWMFixedNMI(void) {};
// NMI crash workaround
// Sometimes the NMI fails to return, stalling the CPU. When this happens,
// the next NMI gets a return address /inside the NMI handler function/.
// We work around this by caching the last NMI return address, and restoring
// the epc3 and eps3 registers to the previous values if the observed epc3
// happens to be pointing to the _NMILevelVector function.
extern "C" void _NMILevelVector();
extern "C" void _UserExceptionVector_1(); // the next function after _NMILevelVector
static inline IRAM_ATTR void nmiCrashWorkaround() {
static uintptr_t epc3_backup, eps3_backup;
uintptr_t epc3, eps3;
__asm__ __volatile__("rsr %0,epc3; rsr %1,eps3":"=a"(epc3),"=a" (eps3));
if ((epc3 < (uintptr_t) &_NMILevelVector) || (epc3 >= (uintptr_t) &_UserExceptionVector_1)) {
// Address is good; save backup
epc3_backup = epc3;
eps3_backup = eps3;
} else {
// Address is inside the NMI handler -- restore from backup
__asm__ __volatile__("wsr %0,epc3; wsr %1,eps3"::"a"(epc3_backup),"a"(eps3_backup));
}
}
// ----- @willmmiles end patch -----
// No-op calls to override the PWM implementation
extern "C" void _setPWMFreq_weak(uint32_t freq) { (void) freq; }
extern "C" IRAM_ATTR bool _stopPWM_weak(int pin) { (void) pin; return false; }
extern "C" bool _setPWM_weak(int pin, uint32_t val, uint32_t range) { (void) pin; (void) val; (void) range; return false; }
// Timer is 80MHz fixed. 160MHz CPU frequency need scaling.
constexpr bool ISCPUFREQ160MHZ = clockCyclesPerMicrosecond() == 160;
// Maximum delay between IRQs, Timer1, <= 2^23 / 80MHz
constexpr int32_t MAXIRQTICKSCCYS = microsecondsToClockCycles(10000);
// Maximum servicing time for any single IRQ
constexpr uint32_t ISRTIMEOUTCCYS = microsecondsToClockCycles(18);
// The latency between in-ISR rearming of the timer and the earliest firing
constexpr int32_t IRQLATENCYCCYS = microsecondsToClockCycles(2);
// The SDK and hardware take some time to actually get to our NMI code
constexpr int32_t DELTAIRQCCYS = ISCPUFREQ160MHZ ?
microsecondsToClockCycles(2) >> 1 : microsecondsToClockCycles(2);
// for INFINITE, the NMI proceeds on the waveform without expiry deadline.
// for EXPIRES, the NMI expires the waveform automatically on the expiry ccy.
// for UPDATEEXPIRY, the NMI recomputes the exact expiry ccy and transitions to EXPIRES.
// for UPDATEPHASE, the NMI recomputes the target timings
// for INIT, the NMI initializes nextPeriodCcy, and if expiryCcy != 0 includes UPDATEEXPIRY.
enum class WaveformMode : uint8_t {INFINITE = 0, EXPIRES = 1, UPDATEEXPIRY = 2, UPDATEPHASE = 3, INIT = 4};
// Waveform generator can create tones, PWM, and servos
typedef struct {
uint32_t nextPeriodCcy; // ESP clock cycle when a period begins.
uint32_t endDutyCcy; // ESP clock cycle when going from duty to off
int32_t dutyCcys; // Set next off cycle at low->high to maintain phase
int32_t adjDutyCcys; // Temporary correction for next period
int32_t periodCcys; // Set next phase cycle at low->high to maintain phase
uint32_t expiryCcy; // For time-limited waveform, the CPU clock cycle when this waveform must stop. If WaveformMode::UPDATE, temporarily holds relative ccy count
WaveformMode mode;
bool autoPwm; // perform PWM duty to idle cycle ratio correction under high load at the expense of precise timings
} Waveform;
namespace {
static struct {
Waveform pins[17]; // State of all possible pins
uint32_t states = 0; // Is the pin high or low, updated in NMI so no access outside the NMI code
uint32_t enabled = 0; // Is it actively running, updated in NMI so no access outside the NMI code
// Enable lock-free by only allowing updates to waveform.states and waveform.enabled from IRQ service routine
int32_t toSetBits = 0; // Message to the NMI handler to start/modify exactly one waveform
int32_t toDisableBits = 0; // Message to the NMI handler to disable exactly one pin from waveform generation
// toSetBits temporaries
// cheaper than packing them in every Waveform, since we permit only one use at a time
uint32_t phaseCcy; // positive phase offset ccy count
int8_t alignPhase; // < 0 no phase alignment, otherwise starts waveform in relative phase offset to given pin
uint32_t(*timer1CB)() = nullptr;
bool timer1Running = false;
uint32_t nextEventCcy;
} waveform;
}
// Interrupt on/off control
static IRAM_ATTR void timer1Interrupt();
// Non-speed critical bits
#pragma GCC optimize ("Os")
static void initTimer() {
timer1_disable();
ETS_FRC_TIMER1_INTR_ATTACH(NULL, NULL);
ETS_FRC_TIMER1_NMI_INTR_ATTACH(timer1Interrupt);
timer1_enable(TIM_DIV1, TIM_EDGE, TIM_SINGLE);
waveform.timer1Running = true;
timer1_write(IRQLATENCYCCYS); // Cause an interrupt post-haste
}
static void IRAM_ATTR deinitTimer() {
ETS_FRC_TIMER1_NMI_INTR_ATTACH(NULL);
timer1_disable();
timer1_isr_init();
waveform.timer1Running = false;
}
extern "C" {
// Set a callback. Pass in NULL to stop it
void setTimer1Callback_weak(uint32_t (*fn)()) {
waveform.timer1CB = fn;
std::atomic_thread_fence(std::memory_order_acq_rel);
if (!waveform.timer1Running && fn) {
initTimer();
} else if (waveform.timer1Running && !fn && !waveform.enabled) {
deinitTimer();
}
}
// Start up a waveform on a pin, or change the current one. Will change to the new
// waveform smoothly on next low->high transition. For immediate change, stopWaveform()
// first, then it will immediately begin.
int startWaveformClockCycles_weak(uint8_t pin, uint32_t highCcys, uint32_t lowCcys,
uint32_t runTimeCcys, int8_t alignPhase, uint32_t phaseOffsetCcys, bool autoPwm) {
uint32_t periodCcys = highCcys + lowCcys;
if (periodCcys < MAXIRQTICKSCCYS) {
if (!highCcys) {
periodCcys = (MAXIRQTICKSCCYS / periodCcys) * periodCcys;
}
else if (!lowCcys) {
highCcys = periodCcys = (MAXIRQTICKSCCYS / periodCcys) * periodCcys;
}
}
// sanity checks, including mixed signed/unsigned arithmetic safety
if ((pin > 16) || isFlashInterfacePin(pin) || (alignPhase > 16) ||
static_cast<int32_t>(periodCcys) <= 0 ||
static_cast<int32_t>(highCcys) < 0 || static_cast<int32_t>(lowCcys) < 0) {
return false;
}
Waveform& wave = waveform.pins[pin];
wave.dutyCcys = highCcys;
wave.adjDutyCcys = 0;
wave.periodCcys = periodCcys;
wave.autoPwm = autoPwm;
waveform.alignPhase = (alignPhase < 0) ? -1 : alignPhase;
waveform.phaseCcy = phaseOffsetCcys;
std::atomic_thread_fence(std::memory_order_acquire);
const uint32_t pinBit = 1UL << pin;
if (!(waveform.enabled & pinBit)) {
// wave.nextPeriodCcy and wave.endDutyCcy are initialized by the ISR
wave.expiryCcy = runTimeCcys; // in WaveformMode::INIT, temporarily hold relative cycle count
wave.mode = WaveformMode::INIT;
if (!wave.dutyCcys) {
// If initially at zero duty cycle, force GPIO off
if (pin == 16) {
GP16O = 0;
}
else {
GPOC = pinBit;
}
}
std::atomic_thread_fence(std::memory_order_release);
waveform.toSetBits = 1UL << pin;
std::atomic_thread_fence(std::memory_order_release);
if (!waveform.timer1Running) {
initTimer();
}
else if (T1V > IRQLATENCYCCYS) {
// Must not interfere if Timer is due shortly
timer1_write(IRQLATENCYCCYS);
}
}
else {
wave.mode = WaveformMode::INFINITE; // turn off possible expiry to make update atomic from NMI
std::atomic_thread_fence(std::memory_order_release);
if (runTimeCcys) {
wave.expiryCcy = runTimeCcys; // in WaveformMode::UPDATEEXPIRY, temporarily hold relative cycle count
wave.mode = WaveformMode::UPDATEEXPIRY;
std::atomic_thread_fence(std::memory_order_release);
waveform.toSetBits = 1UL << pin;
} else if (alignPhase >= 0) {
// @willmmiles new feature
wave.mode = WaveformMode::UPDATEPHASE; // recalculate start
std::atomic_thread_fence(std::memory_order_release);
waveform.toSetBits = 1UL << pin;
}
}
std::atomic_thread_fence(std::memory_order_acq_rel);
while (waveform.toSetBits) {
esp_yield(); // Wait for waveform to update
std::atomic_thread_fence(std::memory_order_acquire);
}
return true;
}
// Stops a waveform on a pin
IRAM_ATTR int stopWaveform_weak(uint8_t pin) {
// Can't possibly need to stop anything if there is no timer active
if (!waveform.timer1Running) {
return false;
}
// If user sends in a pin >16 but <32, this will always point to a 0 bit
// If they send >=32, then the shift will result in 0 and it will also return false
std::atomic_thread_fence(std::memory_order_acquire);
const uint32_t pinBit = 1UL << pin;
if (waveform.enabled & pinBit) {
waveform.toDisableBits = 1UL << pin;
std::atomic_thread_fence(std::memory_order_release);
// Must not interfere if Timer is due shortly
if (T1V > IRQLATENCYCCYS) {
timer1_write(IRQLATENCYCCYS);
}
while (waveform.toDisableBits) {
/* no-op */ // Can't delay() since stopWaveform may be called from an IRQ
std::atomic_thread_fence(std::memory_order_acquire);
}
}
if (!waveform.enabled && !waveform.timer1CB) {
deinitTimer();
}
return true;
}
};
// Speed critical bits
#pragma GCC optimize ("O2")
// For dynamic CPU clock frequency switch in loop the scaling logic would have to be adapted.
// Using constexpr makes sure that the CPU clock frequency is compile-time fixed.
static inline IRAM_ATTR int32_t scaleCcys(const int32_t ccys, const bool isCPU2X) {
if (ISCPUFREQ160MHZ) {
return isCPU2X ? ccys : (ccys >> 1);
}
else {
return isCPU2X ? (ccys << 1) : ccys;
}
}
static IRAM_ATTR void timer1Interrupt() {
const uint32_t isrStartCcy = ESP.getCycleCount();
//int32_t clockDrift = isrStartCcy - waveform.nextEventCcy;
// ----- @willmmiles begin patch -----
nmiCrashWorkaround();
// ----- @willmmiles end patch -----
const bool isCPU2X = CPU2X & 1;
if ((waveform.toSetBits && !(waveform.enabled & waveform.toSetBits)) || waveform.toDisableBits) {
// Handle enable/disable requests from main app.
waveform.enabled = (waveform.enabled & ~waveform.toDisableBits) | waveform.toSetBits; // Set the requested waveforms on/off
// Find the first GPIO being generated by checking GCC's find-first-set (returns 1 + the bit of the first 1 in an int32_t)
waveform.toDisableBits = 0;
}
if (waveform.toSetBits) {
const int toSetPin = __builtin_ffs(waveform.toSetBits) - 1;
Waveform& wave = waveform.pins[toSetPin];
switch (wave.mode) {
case WaveformMode::INIT:
waveform.states &= ~waveform.toSetBits; // Clear the state of any just started
if (waveform.alignPhase >= 0 && waveform.enabled & (1UL << waveform.alignPhase)) {
wave.nextPeriodCcy = waveform.pins[waveform.alignPhase].nextPeriodCcy + scaleCcys(waveform.phaseCcy, isCPU2X);
}
else {
wave.nextPeriodCcy = waveform.nextEventCcy;
}
if (!wave.expiryCcy) {
wave.mode = WaveformMode::INFINITE;
break;
}
// fall through
case WaveformMode::UPDATEEXPIRY:
// in WaveformMode::UPDATEEXPIRY, expiryCcy temporarily holds relative CPU cycle count
wave.expiryCcy = wave.nextPeriodCcy + scaleCcys(wave.expiryCcy, isCPU2X);
wave.mode = WaveformMode::EXPIRES;
break;
// @willmmiles new feature
case WaveformMode::UPDATEPHASE:
// in WaveformMode::UPDATEPHASE, we recalculate the targets
if ((waveform.alignPhase >= 0) && (waveform.enabled & (1UL << waveform.alignPhase))) {
// Compute phase shift to realign with target
auto const newPeriodCcy = waveform.pins[waveform.alignPhase].nextPeriodCcy + scaleCcys(waveform.phaseCcy, isCPU2X);
auto const period = scaleCcys(wave.periodCcys, isCPU2X);
auto shift = ((static_cast<int32_t> (newPeriodCcy - wave.nextPeriodCcy) + period/2) % period) - (period/2);
wave.nextPeriodCcy += static_cast<uint32_t>(shift);
if (static_cast<int32_t>(wave.endDutyCcy - wave.nextPeriodCcy) > 0) {
wave.endDutyCcy = wave.nextPeriodCcy;
}
}
default:
break;
}
waveform.toSetBits = 0;
}
// Exit the loop if the next event, if any, is sufficiently distant.
const uint32_t isrTimeoutCcy = isrStartCcy + ISRTIMEOUTCCYS;
uint32_t busyPins = waveform.enabled;
waveform.nextEventCcy = isrStartCcy + MAXIRQTICKSCCYS;
uint32_t now = ESP.getCycleCount();
uint32_t isrNextEventCcy = now;
while (busyPins) {
if (static_cast<int32_t>(isrNextEventCcy - now) > IRQLATENCYCCYS) {
waveform.nextEventCcy = isrNextEventCcy;
break;
}
isrNextEventCcy = waveform.nextEventCcy;
uint32_t loopPins = busyPins;
while (loopPins) {
const int pin = __builtin_ffsl(loopPins) - 1;
const uint32_t pinBit = 1UL << pin;
loopPins ^= pinBit;
Waveform& wave = waveform.pins[pin];
/* @willmmiles - wtf? We don't want to accumulate drift
if (clockDrift) {
wave.endDutyCcy += clockDrift;
wave.nextPeriodCcy += clockDrift;
wave.expiryCcy += clockDrift;
}
*/
uint32_t waveNextEventCcy = (waveform.states & pinBit) ? wave.endDutyCcy : wave.nextPeriodCcy;
if (WaveformMode::EXPIRES == wave.mode &&
static_cast<int32_t>(waveNextEventCcy - wave.expiryCcy) >= 0 &&
static_cast<int32_t>(now - wave.expiryCcy) >= 0) {
// Disable any waveforms that are done
waveform.enabled ^= pinBit;
busyPins ^= pinBit;
}
else {
const int32_t overshootCcys = now - waveNextEventCcy;
if (overshootCcys >= 0) {
const int32_t periodCcys = scaleCcys(wave.periodCcys, isCPU2X);
if (waveform.states & pinBit) {
// active configuration and forward are 100% duty
if (wave.periodCcys == wave.dutyCcys) {
wave.nextPeriodCcy += periodCcys;
wave.endDutyCcy = wave.nextPeriodCcy;
}
else {
if (wave.autoPwm) {
wave.adjDutyCcys += overshootCcys;
}
waveform.states ^= pinBit;
if (16 == pin) {
GP16O = 0;
}
else {
GPOC = pinBit;
}
}
waveNextEventCcy = wave.nextPeriodCcy;
}
else {
wave.nextPeriodCcy += periodCcys;
if (!wave.dutyCcys) {
wave.endDutyCcy = wave.nextPeriodCcy;
}
else {
int32_t dutyCcys = scaleCcys(wave.dutyCcys, isCPU2X);
if (dutyCcys <= wave.adjDutyCcys) {
dutyCcys >>= 1;
wave.adjDutyCcys -= dutyCcys;
}
else if (wave.adjDutyCcys) {
dutyCcys -= wave.adjDutyCcys;
wave.adjDutyCcys = 0;
}
wave.endDutyCcy = now + dutyCcys;
if (static_cast<int32_t>(wave.endDutyCcy - wave.nextPeriodCcy) > 0) {
wave.endDutyCcy = wave.nextPeriodCcy;
}
waveform.states |= pinBit;
if (16 == pin) {
GP16O = 1;
}
else {
GPOS = pinBit;
}
}
waveNextEventCcy = wave.endDutyCcy;
}
if (WaveformMode::EXPIRES == wave.mode && static_cast<int32_t>(waveNextEventCcy - wave.expiryCcy) > 0) {
waveNextEventCcy = wave.expiryCcy;
}
}
if (static_cast<int32_t>(waveNextEventCcy - isrTimeoutCcy) >= 0) {
busyPins ^= pinBit;
if (static_cast<int32_t>(waveform.nextEventCcy - waveNextEventCcy) > 0) {
waveform.nextEventCcy = waveNextEventCcy;
}
}
else if (static_cast<int32_t>(isrNextEventCcy - waveNextEventCcy) > 0) {
isrNextEventCcy = waveNextEventCcy;
}
}
now = ESP.getCycleCount();
}
//clockDrift = 0;
}
int32_t callbackCcys = 0;
if (waveform.timer1CB) {
callbackCcys = scaleCcys(waveform.timer1CB(), isCPU2X);
}
now = ESP.getCycleCount();
int32_t nextEventCcys = waveform.nextEventCcy - now;
// Account for unknown duration of timer1CB().
if (waveform.timer1CB && nextEventCcys > callbackCcys) {
waveform.nextEventCcy = now + callbackCcys;
nextEventCcys = callbackCcys;
}
// Timer is 80MHz fixed. 160MHz CPU frequency need scaling.
int32_t deltaIrqCcys = DELTAIRQCCYS;
int32_t irqLatencyCcys = IRQLATENCYCCYS;
if (isCPU2X) {
nextEventCcys >>= 1;
deltaIrqCcys >>= 1;
irqLatencyCcys >>= 1;
}
// Firing timer too soon, the NMI occurs before ISR has returned.
if (nextEventCcys < irqLatencyCcys + deltaIrqCcys) {
waveform.nextEventCcy = now + IRQLATENCYCCYS + DELTAIRQCCYS;
nextEventCcys = irqLatencyCcys;
}
else {
nextEventCcys -= deltaIrqCcys;
}
// Register access is fast and edge IRQ was configured before.
T1L = nextEventCcys;
}

2760
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "wled",
"version": "0.12.0",
"version": "0.16.0-alpha",
"description": "Tools for WLED project",
"main": "tools/cdata.js",
"directories": {
@ -9,23 +9,26 @@
},
"scripts": {
"build": "node tools/cdata.js",
"test": "node --test",
"dev": "nodemon -e js,html,htm,css,png,jpg,gif,ico,js -w tools/ -w wled00/data/ -x node tools/cdata.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Aircoookie/WLED.git"
"url": "git+https://github.com/wled-dev/WLED.git"
},
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/Aircoookie/WLED/issues"
"url": "https://github.com/wled-dev/WLED/issues"
},
"homepage": "https://github.com/Aircoookie/WLED#readme",
"homepage": "https://github.com/wled-dev/WLED#readme",
"dependencies": {
"clean-css": "^4.2.3",
"html-minifier-terser": "^5.1.1",
"inliner": "^1.13.1",
"nodemon": "^2.0.4",
"zlib": "^1.0.5"
"clean-css": "^5.3.3",
"html-minifier-terser": "^7.2.0",
"web-resource-inliner": "^7.0.0",
"nodemon": "^3.1.9"
},
"engines": {
"node": ">=20.0.0"
}
}
}

21
pio-scripts/build_ui.py Normal file
View File

@ -0,0 +1,21 @@
Import("env")
import shutil
node_ex = shutil.which("node")
# Check if Node.js is installed and present in PATH if it failed, abort the build
if node_ex is None:
print('\x1b[0;31;43m' + 'Node.js is not installed or missing from PATH html css js will not be processed check https://kno.wled.ge/advanced/compiling-wled/' + '\x1b[0m')
exitCode = env.Execute("null")
exit(exitCode)
else:
# Install the necessary node packages for the pre-build asset bundling script
print('\x1b[6;33;42m' + 'Installing node packages' + '\x1b[0m')
env.Execute("npm ci")
# Call the bundling script
exitCode = env.Execute("npm run build")
# If it failed, abort the build
if (exitCode):
print('\x1b[0;31;43m' + 'npm run build fails check https://kno.wled.ge/advanced/compiling-wled/' + '\x1b[0m')
exit(exitCode)

View File

@ -1,23 +0,0 @@
Import('env')
import os
import shutil
import gzip
OUTPUT_DIR = "build_output{}".format(os.path.sep)
def bin_gzip(source, target, env):
variant = str(target[0]).split(os.path.sep)[2]
# create string with location and file names based on variant
bin_file = "{}firmware{}{}.bin".format(OUTPUT_DIR, os.path.sep, variant)
gzip_file = "{}firmware{}{}.bin.gz".format(OUTPUT_DIR, os.path.sep, variant)
# check if new target files exist and remove if necessary
if os.path.isfile(gzip_file): os.remove(gzip_file)
# write gzip firmware file
with open(bin_file,"rb") as fp:
with gzip.open(gzip_file, "wb", compresslevel = 9) as f:
shutil.copyfileobj(fp, f)
env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", [bin_gzip])

View File

@ -0,0 +1,115 @@
Import('env')
import os.path
from collections import deque
from pathlib import Path # For OS-agnostic path manipulation
from platformio.package.manager.library import LibraryPackageManager
usermod_dir = Path(env["PROJECT_DIR"]) / "usermods"
all_usermods = [f for f in usermod_dir.iterdir() if f.is_dir() and f.joinpath('library.json').exists()]
if env['PIOENV'] == "usermods":
# Add all usermods
env.GetProjectConfig().set(f"env:usermods", 'custom_usermods', " ".join([f.name for f in all_usermods]))
def find_usermod(mod: str):
"""Locate this library in the usermods folder.
We do this to avoid needing to rename a bunch of folders;
this could be removed later
"""
# Check name match
mp = usermod_dir / mod
if mp.exists():
return mp
mp = usermod_dir / f"{mod}_v2"
if mp.exists():
return mp
mp = usermod_dir / f"usermod_v2_{mod}"
if mp.exists():
return mp
raise RuntimeError(f"Couldn't locate module {mod} in usermods directory!")
usermods = env.GetProjectOption("custom_usermods","")
if usermods:
# Inject usermods in to project lib_deps
proj = env.GetProjectConfig()
deps = env.GetProjectOption('lib_deps')
src_dir = proj.get("platformio", "src_dir")
src_dir = src_dir.replace('\\','/')
mod_paths = {mod: find_usermod(mod) for mod in usermods.split()}
usermods = [f"{mod} = symlink://{path}" for mod, path in mod_paths.items()]
proj.set("env:" + env['PIOENV'], 'lib_deps', deps + usermods)
# Force usermods to be installed in to the environment build state before the LDF runs
# Otherwise we won't be able to see them until it's too late to change their paths for LDF
# Logic is largely borrowed from PlaformIO internals
not_found_specs = []
for spec in usermods:
found = False
for storage_dir in env.GetLibSourceDirs():
#print(f"Checking {storage_dir} for {spec}")
lm = LibraryPackageManager(storage_dir)
if lm.get_package(spec):
#print("Found!")
found = True
break
if not found:
#print("Missing!")
not_found_specs.append(spec)
if not_found_specs:
lm = LibraryPackageManager(
env.subst(os.path.join("$PROJECT_LIBDEPS_DIR", "$PIOENV"))
)
for spec in not_found_specs:
#print(f"LU: forcing install of {spec}")
lm.install(spec)
# Utility function for assembling usermod include paths
def cached_add_includes(dep, dep_cache: set, includes: deque):
""" Add dep's include paths to includes if it's not in the cache """
if dep not in dep_cache:
dep_cache.add(dep)
for include in dep.get_include_dirs():
if include not in includes:
includes.appendleft(include)
if usermod_dir not in Path(dep.src_dir).parents:
# Recurse, but only for NON-usermods
for subdep in dep.depbuilders:
cached_add_includes(subdep, dep_cache, includes)
# Monkey-patch ConfigureProjectLibBuilder to mark up the dependencies
# Save the old value
old_ConfigureProjectLibBuilder = env.ConfigureProjectLibBuilder
# Our new wrapper
def wrapped_ConfigureProjectLibBuilder(xenv):
# Update usermod properties
# Set libArchive before build actions are added
for um in (um for um in xenv.GetLibBuilders() if usermod_dir in Path(um.src_dir).parents):
build = um._manifest.get("build", {})
build["libArchive"] = False
um._manifest["build"] = build
# Call the wrapped function
result = old_ConfigureProjectLibBuilder.clone(xenv)()
# Fix up include paths
# In PlatformIO >=6.1.17, this could be done prior to ConfigureProjectLibBuilder
wled_dir = xenv["PROJECT_SRC_DIR"]
# Build a list of dependency include dirs
# TODO: Find out if this is the order that PlatformIO/SCons puts them in??
processed_deps = set()
extra_include_dirs = deque() # Deque used for fast prepend
for dep in result.depbuilders:
cached_add_includes(dep, processed_deps, extra_include_dirs)
for um in [dep for dep in result.depbuilders if usermod_dir in Path(dep.src_dir).parents]:
# Add the wled folder to the include path
um.env.PrependUnique(CPPPATH=wled_dir)
# Add WLED's own dependencies
for dir in extra_include_dirs:
um.env.PrependUnique(CPPPATH=dir)
return result
# Apply the wrapper
env.AddMethod(wrapped_ConfigureProjectLibBuilder, "ConfigureProjectLibBuilder")

View File

@ -1,34 +0,0 @@
Import('env')
import os
import shutil
OUTPUT_DIR = "build_output{}".format(os.path.sep)
def bin_rename_copy(source, target, env):
variant = str(target[0]).split(os.path.sep)[2]
# check if output directories exist and create if necessary
if not os.path.isdir(OUTPUT_DIR):
os.mkdir(OUTPUT_DIR)
for d in ['firmware', 'map']:
if not os.path.isdir("{}{}".format(OUTPUT_DIR, d)):
os.mkdir("{}{}".format(OUTPUT_DIR, d))
# create string with location and file names based on variant
map_file = "{}map{}{}.map".format(OUTPUT_DIR, os.path.sep, variant)
bin_file = "{}firmware{}{}.bin".format(OUTPUT_DIR, os.path.sep, variant)
# check if new target files exist and remove if necessary
for f in [map_file, bin_file]:
if os.path.isfile(f):
os.remove(f)
# copy firmware.bin to firmware/<variant>.bin
shutil.copy(str(target[0]), bin_file)
# copy firmware.map to map/<variant>.map
if os.path.isfile("firmware.map"):
shutil.move("firmware.map", map_file)
env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", [bin_rename_copy])

View File

@ -1,9 +1,24 @@
# Little convenience script to get an object dump
# You may add "-S" to the objdump commandline (i.e. replace "-D -C " with "-d -S -C ")
# to get source code intermixed with disassembly (SLOW !)
Import('env')
def obj_dump_after_elf(source, target, env):
platform = env.PioPlatform()
board = env.BoardConfig()
mcu = board.get("build.mcu", "esp32")
print("Create firmware.asm")
env.Execute("xtensa-lx106-elf-objdump "+ "-D " + str(target[0]) + " > "+ "${PROGNAME}.asm")
if mcu == "esp8266":
env.Execute("xtensa-lx106-elf-objdump "+ "-D -C " + str(target[0]) + " > "+ "$BUILD_DIR/${PROGNAME}.asm")
if mcu == "esp32":
env.Execute("xtensa-esp32-elf-objdump "+ "-D -C " + str(target[0]) + " > "+ "$BUILD_DIR/${PROGNAME}.asm")
if mcu == "esp32s2":
env.Execute("xtensa-esp32s2-elf-objdump "+ "-D -C " + str(target[0]) + " > "+ "$BUILD_DIR/${PROGNAME}.asm")
if mcu == "esp32s3":
env.Execute("xtensa-esp32s3-elf-objdump "+ "-D -C " + str(target[0]) + " > "+ "$BUILD_DIR/${PROGNAME}.asm")
if mcu == "esp32c3":
env.Execute("riscv32-esp-elf-objdump "+ "-D -C " + str(target[0]) + " > "+ "$BUILD_DIR/${PROGNAME}.asm")
env.AddPostAction("$BUILD_DIR/${PROGNAME}.elf", [obj_dump_after_elf])

View File

@ -0,0 +1,66 @@
Import('env')
import os
import shutil
import gzip
OUTPUT_DIR = "build_output{}".format(os.path.sep)
#OUTPUT_DIR = os.path.join("build_output")
def _get_cpp_define_value(env, define):
define_list = [item[-1] for item in env["CPPDEFINES"] if item[0] == define]
if define_list:
return define_list[0]
return None
def _create_dirs(dirs=["map", "release", "firmware"]):
for d in dirs:
os.makedirs(os.path.join(OUTPUT_DIR, d), exist_ok=True)
def create_release(source):
release_name_def = _get_cpp_define_value(env, "WLED_RELEASE_NAME")
if release_name_def:
release_name = release_name_def.replace("\\\"", "")
version = _get_cpp_define_value(env, "WLED_VERSION")
release_file = os.path.join(OUTPUT_DIR, "release", f"WLED_{version}_{release_name}.bin")
release_gz_file = release_file + ".gz"
print(f"Copying {source} to {release_file}")
shutil.copy(source, release_file)
bin_gzip(release_file, release_gz_file)
else:
variant = env["PIOENV"]
bin_file = "{}firmware{}{}.bin".format(OUTPUT_DIR, os.path.sep, variant)
print(f"Copying {source} to {bin_file}")
shutil.copy(source, bin_file)
def bin_rename_copy(source, target, env):
_create_dirs()
variant = env["PIOENV"]
builddir = os.path.join(env["PROJECT_BUILD_DIR"], variant)
source_map = os.path.join(builddir, env["PROGNAME"] + ".map")
# create string with location and file names based on variant
map_file = "{}map{}{}.map".format(OUTPUT_DIR, os.path.sep, variant)
create_release(str(target[0]))
# copy firmware.map to map/<variant>.map
if os.path.isfile("firmware.map"):
print("Found linker mapfile firmware.map")
shutil.copy("firmware.map", map_file)
if os.path.isfile(source_map):
print(f"Found linker mapfile {source_map}")
shutil.copy(source_map, map_file)
def bin_gzip(source, target):
# only create gzip for esp8266
if not env["PIOPLATFORM"] == "espressif8266":
return
print(f"Creating gzip file {target} from {source}")
with open(source,"rb") as fp:
with gzip.open(target, "wb", compresslevel = 9) as f:
shutil.copyfileobj(fp, f)
env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", bin_rename_copy)

View File

@ -0,0 +1,8 @@
Import('env')
import json
PACKAGE_FILE = "package.json"
with open(PACKAGE_FILE, "r") as package:
version = json.load(package)["version"]
env.Append(BUILD_FLAGS=[f"-DWLED_VERSION={version}"])

View File

@ -6,31 +6,11 @@
# ENVIRONMENTS
#
# Please uncomment one of the lines below to select your board(s)
# (use `platformio_override.ini` when building for your own board; see `platformio_override.ini.sample` for an example)
# ------------------------------------------------------------------------------
# Travis CI binaries (comment this out with a ';' when building for your own board)
;default_envs = travis_esp8266, travis_esp32
# Release binaries
default_envs = nodemcuv2, esp01_1m_full, esp32dev, esp32_eth
# Single binaries (uncomment your board)
; default_envs = nodemcuv2
; default_envs = esp01_1m_full
; default_envs = esp07
; default_envs = d1_mini
; default_envs = heltec_wifi_kit_8
; default_envs = h803wf
; default_envs = d1_mini_debug
; default_envs = d1_mini_ota
; default_envs = esp32dev
; default_envs = esp8285_4CH_MagicHome
; default_envs = esp8285_4CH_H801
; default_envs = esp8285_5CH_H801
; default_envs = d1_mini_5CH_Shojo_PCB
; default_envs = wemos_shield_esp32
; default_envs = m5atom
; default_envs = esp32_eth
# CI/release binaries
default_envs = nodemcuv2, esp8266_2m, esp01_1m_full, nodemcuv2_160, esp8266_2m_160, esp01_1m_full_160, nodemcuv2_compat, esp8266_2m_compat, esp01_1m_full_compat, esp32dev, esp32dev_V4, esp32_eth, lolin_s2_mini, esp32c3dev, esp32s3dev_16MB_opi, esp32s3dev_8MB_opi, esp32s3_4M_qspi, esp32_wrover, usermods
src_dir = ./wled00
data_dir = ./wled00/data
@ -48,34 +28,45 @@ extra_configs =
# ------------------------------------------------------------------------------
arduino_core_2_6_3 = espressif8266@2.3.3
arduino_core_2_7_4 = espressif8266@2.6.2
arduino_core_3_0_0 = espressif8266@3.0.0
arduino_core_3_0_2 = espressif8266@3.2.0
arduino_core_3_1_0 = espressif8266@4.1.0
arduino_core_3_1_2 = espressif8266@4.2.1
# Development platforms
arduino_core_develop = https://github.com/platformio/platform-espressif8266#develop
arduino_core_git = https://github.com/platformio/platform-espressif8266#feature/stage
# Platform to use for ESP8266
platform_wled_default = ${common.arduino_core_2_7_4}
platform_wled_default = ${common.arduino_core_3_1_2}
# We use 2.7.4.7 for all, includes PWM flicker fix and Wstring optimization
platform_packages = tasmota/framework-arduinoespressif8266 @ 3.20704.7
platformio/toolchain-xtensa @ ~2.40802.200502
platformio/tool-esptool @ ~1.413.0
platformio/tool-esptoolpy @ ~1.30000.0
#platform_packages = tasmota/framework-arduinoespressif8266 @ 3.20704.7
platform_packages = platformio/toolchain-xtensa @ ~2.100300.220621 #2.40802.200502
platformio/tool-esptool #@ ~1.413.0
platformio/tool-esptoolpy #@ ~1.30000.0
## previous platform for 8266, in case of problems with the new one
## you'll need makuna/NeoPixelBus@ 2.6.9 for arduino_core_3_0_2, which does not support Ucs890x
;; platform_wled_default = ${common.arduino_core_3_0_2}
;; platform_packages = tasmota/framework-arduinoespressif8266 @ 3.20704.7
;; platformio/toolchain-xtensa @ ~2.40802.200502
;; platformio/tool-esptool @ ~1.413.0
;; platformio/tool-esptoolpy @ ~1.30000.0
# ------------------------------------------------------------------------------
# FLAGS: DEBUG
#
# esp8266 : see https://docs.platformio.org/en/latest/platforms/espressif8266.html#debug-level
# esp32 : see https://docs.platformio.org/en/latest/platforms/espressif32.html#debug-level
# ------------------------------------------------------------------------------
debug_flags = -D DEBUG=1 -D WLED_DEBUG -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_TLS_MEM
#if needed (for memleaks etc) also add; -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h"
#-DDEBUG_ESP_CORE is not working right now
debug_flags = -D DEBUG=1 -D WLED_DEBUG
-DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_TLS_MEM ;; for esp8266
# if needed (for memleaks etc) also add; -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h"
# -DDEBUG_ESP_CORE is not working right now
# ------------------------------------------------------------------------------
# FLAGS: ldscript (available ldscripts at https://github.com/esp8266/Arduino/tree/master/tools/sdk/ld)
# ldscript_512k ( 512 KB) = 487 KB sketch, 4 KB eeprom, no spiffs, 16 KB reserved
# ldscript_1m0m (1024 KB) = 999 KB sketch, 4 KB eeprom, no spiffs, 16 KB reserved
# ldscript_2m1m (2048 KB) = 1019 KB sketch, 4 KB eeprom, 1004 KB spiffs, 16 KB reserved
# ldscript_4m1m (4096 KB) = 1019 KB sketch, 4 KB eeprom, 1002 KB spiffs, 16 KB reserved, 2048 KB empty/ota?
# ldscript_4m3m (4096 KB) = 1019 KB sketch, 4 KB eeprom, 3040 KB spiffs, 16 KB reserved
#
# Available lwIP variants (macros):
# -DPIO_FRAMEWORK_ARDUINO_LWIP_HIGHER_BANDWIDTH = v1.4 Higher Bandwidth (default)
@ -100,6 +91,7 @@ build_flags =
-DBEARSSL_SSL_BASIC
-D CORE_DEBUG_LEVEL=0
-D NDEBUG
-Wno-attributes ;; silence warnings about unknown attribute 'maybe_unused' in NeoPixelBus
#build_flags for the IRremoteESP8266 library (enabled decoders have to appear here)
-D _IR_ENABLE_DEFAULT_=false
-D DECODE_HASH=true
@ -108,53 +100,23 @@ build_flags =
-D DECODE_SAMSUNG=true
-D DECODE_LG=true
-DWLED_USE_MY_CONFIG
; -D USERMOD_SENSORSTOMQTT
build_unflags =
# enables all features for travis CI
build_flags_all_features =
-D WLED_USE_ANALOG_LED
-D WLED_USE_H801
-D WLED_ENABLE_5CH_LEDS
-D WLED_ENABLE_ADALIGHT
-D WLED_ENABLE_DMX
-D WLED_ENABLE_MQTT
-D WLED_ENABLE_WEBSOCKETS
build_flags_esp8266 = ${common.build_flags} ${esp8266.build_flags}
build_flags_esp32 = ${common.build_flags} ${esp32.build_flags}
ldscript_1m128k = eagle.flash.1m128.ld
ldscript_2m512k = eagle.flash.2m512.ld
ldscript_2m1m = eagle.flash.2m1m.ld
ldscript_4m1m = eagle.flash.4m1m.ld
[esp8266]
build_flags =
-DESP8266
-DFP_IN_IROM
; NONOSDK22x_190703 = 2.2.2-dev(38a443e)
-DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_190703
; lwIP 2 - Higher Bandwidth no Features
; -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH_LOW_FLASH
; lwIP 1.4 - Higher Bandwidth (Aircoookie has)
-DPIO_FRAMEWORK_ARDUINO_LWIP_HIGHER_BANDWIDTH
; VTABLES in Flash
-DVTABLES_IN_FLASH
; restrict to minimal mime-types
-DMIMETYPE_MINIMAL
[esp32]
build_flags = -g
-DARDUINO_ARCH_ESP32
-DCONFIG_LITTLEFS_FOR_IDF_3_2
[scripts_defaults]
extra_scripts = pio-scripts/name-firmware.py
pio-scripts/gzip-firmware.py
pio-scripts/strip-floats.py
pio-scripts/user_config_copy.py
extra_scripts =
pre:pio-scripts/set_version.py
post:pio-scripts/output_bins.py
post:pio-scripts/strip-floats.py
pre:pio-scripts/user_config_copy.py
pre:pio-scripts/load_usermods.py
pre:pio-scripts/build_ui.py
; post:pio-scripts/obj-dump.py ;; convenience script to create a disassembly dump of the firmware (hardcore debugging)
# ------------------------------------------------------------------------------
# COMMON SETTINGS:
@ -163,45 +125,229 @@ extra_scripts = pio-scripts/name-firmware.py
framework = arduino
board_build.flash_mode = dout
monitor_speed = 115200
# slow upload speed (comment this out with a ';' when building for development use)
# slow upload speed but most compatible (use platformio_override.ini to use faster speed)
upload_speed = 115200
# fast upload speed (remove ';' when building for development use)
; upload_speed = 921600
# ------------------------------------------------------------------------------
# LIBRARIES: required dependencies
# Please note that we don't always use the latest version of a library.
#
# The following libraries have been included (and some of them changd) in the source:
# ArduinoJson@5.13.5, Blynk@0.5.4(changed), E131@1.0.0(changed), Time@1.5, Timezone@1.2.1
# The following libraries have been included (and some of them changed) in the source:
# ArduinoJson@5.13.5, E131@1.0.0(changed), Time@1.5, Timezone@1.2.1
# ------------------------------------------------------------------------------
lib_compat_mode = strict
lib_deps =
fastled/FastLED @ 3.3.2
NeoPixelBus @ 2.6.0
ESPAsyncTCP @ 1.2.0
ESPAsyncUDP
AsyncTCP @ 1.0.3
IRremoteESP8266 @ 2.7.3
https://github.com/lorol/LITTLEFS.git
https://github.com/Aircoookie/ESPAsyncWebServer.git @ ~2.0.2
fastled/FastLED @ 3.6.0
IRremoteESP8266 @ 2.8.2
makuna/NeoPixelBus @ 2.8.3
#https://github.com/makuna/NeoPixelBus.git#CoreShaderBeta
https://github.com/Aircoookie/ESPAsyncWebServer.git#v2.4.0
# for I2C interface
;Wire
# ESP-NOW library
;gmag11/QuickESPNow @ ~0.7.0
https://github.com/blazoncek/QuickESPNow.git#optional-debug
#For use of the TTGO T-Display ESP32 Module with integrated TFT display uncomment the following line
#TFT_eSPI
#For use SSD1306 OLED display uncomment following
#U8g2@~2.27.2
#For Dallas sensor uncomment following 2 lines
#OneWire@~2.3.5
#milesburton/DallasTemperature@^3.9.0
#For compatible OLED display uncomment following
#olikraus/U8g2 #@ ~2.33.15
#For Dallas sensor uncomment following
#paulstoffregen/OneWire @ ~2.3.8
#For BME280 sensor uncomment following
#BME280@~3.0.0
; adafruit/Adafruit BMP280 Library @ 2.1.0
; adafruit/Adafruit CCS811 Library @ 1.0.4
; adafruit/Adafruit Si7021 Library @ 1.4.0
#BME280 @ ~3.0.0
;adafruit/Adafruit BMP280 Library @ 2.1.0
;adafruit/Adafruit CCS811 Library @ 1.0.4
;adafruit/Adafruit Si7021 Library @ 1.4.0
#For MAX1704x Lipo Monitor / Fuel Gauge uncomment following
; https://github.com/adafruit/Adafruit_BusIO @ 1.14.5
; https://github.com/adafruit/Adafruit_MAX1704X @ 1.0.2
#For MPU6050 IMU uncomment follwoing
;electroniccats/MPU6050 @1.0.1
# SHT85
;robtillaart/SHT85@~0.3.3
lib_ignore =
AsyncTCP
extra_scripts = ${scripts_defaults.extra_scripts}
[esp8266]
build_unflags = ${common.build_unflags}
build_flags =
-DESP8266
-DFP_IN_IROM
;-Wno-deprecated-declarations
;-Wno-register ;; leaves some warnings when compiling C files: command-line option '-Wno-register' is valid for C++/ObjC++ but not for C
;-Dregister= # remove warnings in C++17 due to use of deprecated register keyword by the FastLED library ;; warning: this can be dangerous
-Wno-misleading-indentation
; NONOSDK22x_190703 = 2.2.2-dev(38a443e)
-DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_190703
; lwIP 2 - Higher Bandwidth no Features
; -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH_LOW_FLASH
; lwIP 1.4 - Higher Bandwidth (Aircoookie has)
-DPIO_FRAMEWORK_ARDUINO_LWIP_HIGHER_BANDWIDTH
; VTABLES in Flash
-DVTABLES_IN_FLASH
; restrict to minimal mime-types
-DMIMETYPE_MINIMAL
; other special-purpose framework flags (see https://docs.platformio.org/en/latest/platforms/espressif8266.html)
; decrease code cache size and increase IRAM to fit all pixel functions
-D PIO_FRAMEWORK_ARDUINO_MMU_CACHE16_IRAM48 ;; in case of linker errors like "section `.text1' will not fit in region `iram1_0_seg'"
; -D PIO_FRAMEWORK_ARDUINO_MMU_CACHE16_IRAM48_SECHEAP_SHARED ;; (experimental) adds some extra heap, but may cause slowdown
-D NON32XFER_HANDLER ;; ask forgiveness for PROGMEM misuse
lib_deps =
#https://github.com/lorol/LITTLEFS.git
ESPAsyncTCP @ 1.2.2
ESPAsyncUDP
ESP8266PWM
${env.lib_deps}
;; compatibilty flags - same as 0.14.0 which seems to work better on some 8266 boards. Not using PIO_FRAMEWORK_ARDUINO_MMU_CACHE16_IRAM48
build_flags_compat =
-DESP8266
-DFP_IN_IROM
;;-Wno-deprecated-declarations
-Wno-misleading-indentation
;;-Wno-attributes ;; silence warnings about unknown attribute 'maybe_unused' in NeoPixelBus
-DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_190703
-DPIO_FRAMEWORK_ARDUINO_LWIP_HIGHER_BANDWIDTH
-DVTABLES_IN_FLASH
-DMIMETYPE_MINIMAL
-DWLED_SAVE_IRAM ;; needed to prevent linker error
;; this platform version was used for WLED 0.14.0
platform_compat = espressif8266@4.2.0
platform_packages_compat =
platformio/toolchain-xtensa @ ~2.100300.220621 #2.40802.200502
platformio/tool-esptool #@ ~1.413.0
platformio/tool-esptoolpy #@ ~1.30000.0
;; experimental - for using older NeoPixelBus 2.7.9
lib_deps_compat =
ESPAsyncTCP @ 1.2.2
ESPAsyncUDP
ESP8266PWM
fastled/FastLED @ 3.6.0
IRremoteESP8266 @ 2.8.2
makuna/NeoPixelBus @ 2.7.9
https://github.com/blazoncek/QuickESPNow.git#optional-debug
https://github.com/Aircoookie/ESPAsyncWebServer.git#v2.4.0
[esp32_all_variants]
lib_deps =
willmmiles/AsyncTCP @ 1.3.1
bitbank2/AnimatedGIF@^1.4.7
https://github.com/Aircoookie/GifDecoder#bc3af18
build_flags =
-D CONFIG_ASYNC_TCP_USE_WDT=0
-D WLED_ENABLE_GIF
[esp32]
#platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.2.3/platform-espressif32-2.0.2.3.zip
platform = espressif32@3.5.0
platform_packages = framework-arduinoespressif32 @ https://github.com/Aircoookie/arduino-esp32.git#1.0.6.4
build_unflags = ${common.build_unflags}
build_flags = -g
-DARDUINO_ARCH_ESP32
#-DCONFIG_LITTLEFS_FOR_IDF_3_2
#use LITTLEFS library by lorol in ESP32 core 1.x.x instead of built-in in 2.x.x
-D LOROL_LITTLEFS
; -DARDUINO_USB_CDC_ON_BOOT=0 ;; this flag is mandatory for "classic ESP32" when building with arduino-esp32 >=2.0.3
${esp32_all_variants.build_flags}
tiny_partitions = tools/WLED_ESP32_2MB_noOTA.csv
default_partitions = tools/WLED_ESP32_4MB_1MB_FS.csv
extended_partitions = tools/WLED_ESP32_4MB_700k_FS.csv
big_partitions = tools/WLED_ESP32_4MB_256KB_FS.csv ;; 1.8MB firmware, 256KB filesystem, coredump support
large_partitions = tools/WLED_ESP32_8MB.csv
extreme_partitions = tools/WLED_ESP32_16MB_9MB_FS.csv
lib_deps =
https://github.com/lorol/LITTLEFS.git
${esp32_all_variants.lib_deps}
${env.lib_deps}
board_build.partitions = ${esp32.default_partitions} ;; default partioning for 4MB Flash - can be overridden in build envs
# additional build flags for audioreactive - must be applied globally
AR_build_flags = ;; -fsingle-precision-constant ;; forces ArduinoFFT to use float math (2x faster)
AR_lib_deps = ;; for pre-usermod-library platformio_override compatibility
[esp32_idf_V4]
;; experimental build environment for ESP32 using ESP-IDF 4.4.x / arduino-esp32 v2.0.5
;; very similar to the normal ESP32 flags, but omitting Lorol LittleFS, as littlefs is included in the new framework already.
;;
;; please note that you can NOT update existing ESP32 installs with a "V4" build. Also updating by OTA will not work properly.
;; You need to completely erase your device (esptool erase_flash) first, then install the "V4" build from VSCode+platformio.
;; select arduino-esp32 v2.0.9 (arduino-esp32 2.0.10 thru 2.0.14 are buggy so avoid them)
platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.06.02/platform-espressif32.zip ;; Tasmota Arduino Core 2.0.9 with IPv6 support, based on IDF 4.4.4
build_unflags = ${common.build_unflags}
build_flags = -g
-Wshadow=compatible-local ;; emit warning in case a local variable "shadows" another local one
-DARDUINO_ARCH_ESP32 -DESP32
-DARDUINO_USB_CDC_ON_BOOT=0 ;; this flag is mandatory for "classic ESP32" when building with arduino-esp32 >=2.0.3
${esp32_all_variants.build_flags}
-D WLED_ENABLE_DMX_INPUT
lib_deps =
${esp32_all_variants.lib_deps}
https://github.com/someweisguy/esp_dmx.git#47db25d
${env.lib_deps}
board_build.partitions = ${esp32.default_partitions} ;; default partioning for 4MB Flash - can be overridden in build envs
[esp32s2]
;; generic definitions for all ESP32-S2 boards
platform = ${esp32_idf_V4.platform}
build_unflags = ${common.build_unflags}
build_flags = -g
-DARDUINO_ARCH_ESP32
-DARDUINO_ARCH_ESP32S2
-DCONFIG_IDF_TARGET_ESP32S2=1
-DARDUINO_USB_MSC_ON_BOOT=0 -DARDUINO_USB_DFU_ON_BOOT=0
-DCO
-DARDUINO_USB_MODE=0 ;; this flag is mandatory for ESP32-S2 !
;; please make sure that the following flags are properly set (to 0 or 1) by your board.json, or included in your custom platformio_override.ini entry:
;; ARDUINO_USB_CDC_ON_BOOT
${esp32_all_variants.build_flags}
lib_deps =
${esp32_all_variants.lib_deps}
${env.lib_deps}
board_build.partitions = ${esp32.default_partitions} ;; default partioning for 4MB Flash - can be overridden in build envs
[esp32c3]
;; generic definitions for all ESP32-C3 boards
platform = ${esp32_idf_V4.platform}
build_unflags = ${common.build_unflags}
build_flags = -g
-DARDUINO_ARCH_ESP32
-DARDUINO_ARCH_ESP32C3
-DCONFIG_IDF_TARGET_ESP32C3=1
-DCO
-DARDUINO_USB_MODE=1 ;; this flag is mandatory for ESP32-C3
;; please make sure that the following flags are properly set (to 0 or 1) by your board.json, or included in your custom platformio_override.ini entry:
;; ARDUINO_USB_CDC_ON_BOOT
${esp32_all_variants.build_flags}
lib_deps =
${esp32_all_variants.lib_deps}
${env.lib_deps}
board_build.partitions = ${esp32.default_partitions} ;; default partioning for 4MB Flash - can be overridden in build envs
board_build.flash_mode = qio
[esp32s3]
;; generic definitions for all ESP32-S3 boards
platform = ${esp32_idf_V4.platform}
build_unflags = ${common.build_unflags}
build_flags = -g
-DESP32
-DARDUINO_ARCH_ESP32
-DARDUINO_ARCH_ESP32S3
-DCONFIG_IDF_TARGET_ESP32S3=1
-DARDUINO_USB_MSC_ON_BOOT=0 -DARDUINO_DFU_ON_BOOT=0
-DCO
;; please make sure that the following flags are properly set (to 0 or 1) by your board.json, or included in your custom platformio_override.ini entry:
;; ARDUINO_USB_MODE, ARDUINO_USB_CDC_ON_BOOT
${esp32_all_variants.build_flags}
lib_deps =
${esp32_all_variants.lib_deps}
${env.lib_deps}
board_build.partitions = ${esp32.large_partitions} ;; default partioning for 8MB flash - can be overridden in build envs
extra_scripts = ${scripts_defaults.extra_scripts}
# ------------------------------------------------------------------------------
# WLED BUILDS
@ -213,7 +359,54 @@ platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_4m1m}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266}
build_flags = ${common.build_flags} ${esp8266.build_flags} -D WLED_RELEASE_NAME=\"ESP8266\" #-DWLED_DISABLE_2D
-D WLED_DISABLE_PARTICLESYSTEM2D
lib_deps = ${esp8266.lib_deps}
monitor_filters = esp8266_exception_decoder
[env:nodemcuv2_compat]
extends = env:nodemcuv2
;; using platform version and build options from WLED 0.14.0
platform = ${esp8266.platform_compat}
platform_packages = ${esp8266.platform_packages_compat}
build_flags = ${common.build_flags} ${esp8266.build_flags_compat} -D WLED_RELEASE_NAME=\"ESP8266_compat\" #-DWLED_DISABLE_2D
-D WLED_DISABLE_PARTICLESYSTEM2D
;; lib_deps = ${esp8266.lib_deps_compat} ;; experimental - use older NeoPixelBus 2.7.9
[env:nodemcuv2_160]
extends = env:nodemcuv2
board_build.f_cpu = 160000000L
build_flags = ${common.build_flags} ${esp8266.build_flags} -D WLED_RELEASE_NAME=\"ESP8266_160\" #-DWLED_DISABLE_2D
-D WLED_DISABLE_PARTICLESYSTEM2D
custom_usermods = audioreactive
[env:esp8266_2m]
board = esp_wroom_02
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_2m512k}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} ${esp8266.build_flags} -D WLED_RELEASE_NAME=\"ESP02\"
-D WLED_DISABLE_PARTICLESYSTEM2D
-D WLED_DISABLE_PARTICLESYSTEM1D
lib_deps = ${esp8266.lib_deps}
[env:esp8266_2m_compat]
extends = env:esp8266_2m
;; using platform version and build options from WLED 0.14.0
platform = ${esp8266.platform_compat}
platform_packages = ${esp8266.platform_packages_compat}
build_flags = ${common.build_flags} ${esp8266.build_flags_compat} -D WLED_RELEASE_NAME=\"ESP02_compat\" #-DWLED_DISABLE_2D
-D WLED_DISABLE_PARTICLESYSTEM1D
-D WLED_DISABLE_PARTICLESYSTEM2D
[env:esp8266_2m_160]
extends = env:esp8266_2m
board_build.f_cpu = 160000000L
build_flags = ${common.build_flags} ${esp8266.build_flags} -D WLED_RELEASE_NAME=\"ESP02_160\"
-D WLED_DISABLE_PARTICLESYSTEM1D
-D WLED_DISABLE_PARTICLESYSTEM2D
custom_usermods = audioreactive
[env:esp01_1m_full]
board = esp01_1m
@ -221,288 +414,250 @@ platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_1m128k}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266} -D WLED_DISABLE_OTA
build_flags = ${common.build_flags} ${esp8266.build_flags} -D WLED_RELEASE_NAME=\"ESP01\" -D WLED_DISABLE_OTA
; -D WLED_USE_REAL_MATH ;; may fix wrong sunset/sunrise times, at the cost of 7064 bytes FLASH and 975 bytes RAM
-D WLED_DISABLE_PARTICLESYSTEM1D
-D WLED_DISABLE_PARTICLESYSTEM2D
lib_deps = ${esp8266.lib_deps}
[env:esp07]
board = esp07
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_4m1m}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266}
[env:esp01_1m_full_compat]
extends = env:esp01_1m_full
;; using platform version and build options from WLED 0.14.0
platform = ${esp8266.platform_compat}
platform_packages = ${esp8266.platform_packages_compat}
build_flags = ${common.build_flags} ${esp8266.build_flags_compat} -D WLED_RELEASE_NAME=\"ESP01_compat\" -D WLED_DISABLE_OTA #-DWLED_DISABLE_2D
-D WLED_DISABLE_PARTICLESYSTEM1D
-D WLED_DISABLE_PARTICLESYSTEM2D
[env:d1_mini]
board = d1_mini
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
upload_speed = 921600
board_build.ldscript = ${common.ldscript_4m1m}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266}
monitor_filters = esp8266_exception_decoder
[env:heltec_wifi_kit_8]
board = d1_mini
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_4m1m}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266}
[env:h803wf]
board = d1_mini
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_4m1m}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266} -D LEDPIN=1 -D WLED_DISABLE_INFRARED
[env:esp01_1m_full_160]
extends = env:esp01_1m_full
board_build.f_cpu = 160000000L
build_flags = ${common.build_flags} ${esp8266.build_flags} -D WLED_RELEASE_NAME=\"ESP01_160\" -D WLED_DISABLE_OTA
; -D WLED_USE_REAL_MATH ;; may fix wrong sunset/sunrise times, at the cost of 7064 bytes FLASH and 975 bytes RAM
-D WLED_DISABLE_PARTICLESYSTEM1D
-D WLED_DISABLE_PARTICLESYSTEM2D
custom_usermods = audioreactive
[env:esp32dev]
board = esp32dev
platform = espressif32@3.2
platform = ${esp32.platform}
platform_packages = ${esp32.platform_packages}
custom_usermods = audioreactive
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp32}
lib_ignore =
ESPAsyncTCP
ESPAsyncUDP
build_flags = ${common.build_flags} ${esp32.build_flags} -D WLED_RELEASE_NAME=\"ESP32\" #-D WLED_DISABLE_BROWNOUT_DET
lib_deps = ${esp32.lib_deps}
monitor_filters = esp32_exception_decoder
board_build.partitions = ${esp32.default_partitions}
[env:esp32dev_V4]
board = esp32dev
platform = ${esp32_idf_V4.platform}
build_unflags = ${common.build_unflags}
custom_usermods = audioreactive
build_flags = ${common.build_flags} ${esp32_idf_V4.build_flags} -D WLED_RELEASE_NAME=\"ESP32_V4\" #-D WLED_DISABLE_BROWNOUT_DET
lib_deps = ${esp32_idf_V4.lib_deps}
monitor_filters = esp32_exception_decoder
board_build.partitions = ${esp32.default_partitions}
board_build.flash_mode = dio
[env:esp32dev_8M]
board = esp32dev
platform = ${esp32_idf_V4.platform}
custom_usermods = audioreactive
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} ${esp32_idf_V4.build_flags} -D WLED_RELEASE_NAME=\"ESP32_8M\" #-D WLED_DISABLE_BROWNOUT_DET
lib_deps = ${esp32_idf_V4.lib_deps}
monitor_filters = esp32_exception_decoder
board_build.partitions = ${esp32.large_partitions}
board_upload.flash_size = 8MB
board_upload.maximum_size = 8388608
; board_build.f_flash = 80000000L
; board_build.flash_mode = qio
[env:esp32dev_16M]
board = esp32dev
platform = ${esp32_idf_V4.platform}
custom_usermods = audioreactive
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} ${esp32_idf_V4.build_flags} -D WLED_RELEASE_NAME=\"ESP32_16M\" #-D WLED_DISABLE_BROWNOUT_DET
lib_deps = ${esp32_idf_V4.lib_deps}
monitor_filters = esp32_exception_decoder
board_build.partitions = ${esp32.extreme_partitions}
board_upload.flash_size = 16MB
board_upload.maximum_size = 16777216
board_build.f_flash = 80000000L
board_build.flash_mode = dio
;[env:esp32dev_audioreactive]
;board = esp32dev
;platform = ${esp32.platform}
;platform_packages = ${esp32.platform_packages}
;custom_usermods = audioreactive
;build_unflags = ${common.build_unflags}
;build_flags = ${common.build_flags} ${esp32.build_flags} -D WLED_RELEASE_NAME=\"ESP32_audioreactive\" #-D WLED_DISABLE_BROWNOUT_DET
;lib_deps = ${esp32.lib_deps}
;monitor_filters = esp32_exception_decoder
;board_build.partitions = ${esp32.default_partitions}
;; board_build.f_flash = 80000000L
;; board_build.flash_mode = dio
[env:esp32_eth]
board = esp32-poe
platform = espressif32@3.2
platform = ${esp32.platform}
platform_packages = ${esp32.platform_packages}
upload_speed = 921600
custom_usermods = audioreactive
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp32} -D RLYPIN=-1 -D WLED_USE_ETHERNET -D BTNPIN=-1
lib_ignore =
ESPAsyncTCP
ESPAsyncUDP
build_flags = ${common.build_flags} ${esp32.build_flags} -D WLED_RELEASE_NAME=\"ESP32_Ethernet\" -D RLYPIN=-1 -D WLED_USE_ETHERNET -D BTNPIN=-1
; -D WLED_DISABLE_ESPNOW ;; ESP-NOW requires wifi, may crash with ethernet only
lib_deps = ${esp32.lib_deps}
board_build.partitions = ${esp32.default_partitions}
[env:esp8285_4CH_MagicHome]
board = esp8285
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_1m128k}
[env:esp32_wrover]
extends = esp32_idf_V4
platform = ${esp32_idf_V4.platform}
board = ttgo-t7-v14-mini32
board_build.f_flash = 80000000L
board_build.flash_mode = qio
board_build.partitions = ${esp32.extended_partitions}
custom_usermods = audioreactive
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266} -D WLED_DISABLE_OTA -D WLED_USE_ANALOG_LEDS
[env:esp8285_4CH_H801]
board = esp8285
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_1m128k}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266} -D WLED_DISABLE_OTA -D WLED_USE_ANALOG_LEDS -D WLED_USE_H801
[env:esp8285_5CH_H801]
board = esp8285
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_1m128k}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266} -D WLED_DISABLE_OTA -D WLED_USE_ANALOG_LEDS -D WLED_USE_H801 -D WLED_ENABLE_5CH_LEDS
[env:d1_mini_5CH_Shojo_PCB]
board = d1_mini
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_4m1m}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266} -D WLED_USE_ANALOG_LEDS -D WLED_USE_SHOJO_PCB -D WLED_ENABLE_5CH_LEDS
# ------------------------------------------------------------------------------
# DEVELOPMENT BOARDS
# ------------------------------------------------------------------------------
[env:d1_mini_debug]
board = d1_mini
build_type = debug
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_4m1m}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266} ${common.debug_flags}
[env:d1_mini_ota]
board = d1_mini
upload_protocol = espota
# exchange for your WLED IP
upload_port = "10.10.1.27"
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_4m1m}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266}
[env:anavi_miracle_controller]
board = d1_mini
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_4m1m}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266} -D LEDPIN=12 -D IRPIN=-1 -D RLYPIN=2
# ------------------------------------------------------------------------------
# custom board configurations
# ------------------------------------------------------------------------------
[env:custom_LEDPIN_4]
board = d1_mini
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_4m1m}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266} -D LEDPIN=4 -D IRPIN=5
[env:custom_LEDPIN_16]
board = d1_mini
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_4m1m}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266} -D LEDPIN=16
[env:custom_LEDPIN_3]
board = d1_mini
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_4m1m}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266} -D LEDPIN=3
[env:custom_APA102]
board = d1_mini
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_4m1m}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266} -D USE_APA102
[env:custom_WS2801]
board = d1_mini
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_4m1m}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266} -D USE_WS2801
[env:custom32_LEDPIN_16]
board = esp32dev
platform = espressif32@3.2
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp32} -D LEDPIN=16 -D RLYPIN=19
lib_ignore =
ESPAsyncTCP
ESPAsyncUDP
[env:custom32_APA102]
board = esp32dev
platform = espressif32@3.2
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp32} -D USE_APA102
lib_ignore =
ESPAsyncTCP
ESPAsyncUDP
[env:custom32_TOUCHPIN_T0]
board = esp32dev
platform = espressif32@3.2
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp32} -D TOUCHPIN=T0
lib_ignore =
ESPAsyncTCP
ESPAsyncUDP
[env:wemos_shield_esp32]
board = esp32dev
platform = espressif32@3.2
upload_port = /dev/cu.SLAB_USBtoUART
monitor_port = /dev/cu.SLAB_USBtoUART
build_flags = ${common.build_flags} ${esp32_idf_V4.build_flags} -D WLED_RELEASE_NAME=\"ESP32_WROVER\"
-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue ;; Older ESP32 (rev.<3) need a PSRAM fix (increases static RAM used) https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-guides/external-ram.html
-D DATA_PINS=25
lib_deps = ${esp32_idf_V4.lib_deps}
[env:esp32c3dev]
extends = esp32c3
platform = ${esp32c3.platform}
framework = arduino
board = esp32-c3-devkitm-1
board_build.partitions = ${esp32.default_partitions}
build_flags = ${common.build_flags} ${esp32c3.build_flags} -D WLED_RELEASE_NAME=\"ESP32-C3\"
-D WLED_WATCHDOG_TIMEOUT=0
-DLOLIN_WIFI_FIX ; seems to work much better with this
-DARDUINO_USB_CDC_ON_BOOT=1 ;; for virtual CDC USB
;-DARDUINO_USB_CDC_ON_BOOT=0 ;; for serial-to-USB chip
upload_speed = 460800
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp32} -D LEDPIN=16 -D RLYPIN=19 -D BTNPIN=17
lib_ignore =
ESPAsyncTCP
ESPAsyncUDP
lib_deps = ${esp32c3.lib_deps}
[env:m5atom]
[env:esp32s3dev_16MB_opi]
;; ESP32-S3 development board, with 16MB FLASH and >= 8MB PSRAM (memory_type: qio_opi)
board = esp32-s3-devkitc-1 ;; generic dev board; the next line adds PSRAM support
board_build.arduino.memory_type = qio_opi ;; use with PSRAM: 8MB or 16MB
platform = ${esp32s3.platform}
upload_speed = 921600
custom_usermods = audioreactive
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} ${esp32s3.build_flags} -D WLED_RELEASE_NAME=\"ESP32-S3_16MB_opi\"
-D CONFIG_LITTLEFS_FOR_IDF_3_2 -D WLED_WATCHDOG_TIMEOUT=0
;-D ARDUINO_USB_CDC_ON_BOOT=0 ;; -D ARDUINO_USB_MODE=1 ;; for boards with serial-to-USB chip
-D ARDUINO_USB_CDC_ON_BOOT=1 -D ARDUINO_USB_MODE=1 ;; for boards with USB-OTG connector only (USBCDC or "TinyUSB")
-DBOARD_HAS_PSRAM
lib_deps = ${esp32s3.lib_deps}
board_build.partitions = ${esp32.extreme_partitions}
board_upload.flash_size = 16MB
board_upload.maximum_size = 16777216
board_build.f_flash = 80000000L
board_build.flash_mode = qio
monitor_filters = esp32_exception_decoder
[env:esp32s3dev_8MB_opi]
;; ESP32-S3 development board, with 8MB FLASH and >= 8MB PSRAM (memory_type: qio_opi)
board = esp32-s3-devkitc-1 ;; generic dev board; the next line adds PSRAM support
board_build.arduino.memory_type = qio_opi ;; use with PSRAM: 8MB or 16MB
platform = ${esp32s3.platform}
upload_speed = 921600
custom_usermods = audioreactive
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} ${esp32s3.build_flags} -D WLED_RELEASE_NAME=\"ESP32-S3_8MB_opi\"
-D CONFIG_LITTLEFS_FOR_IDF_3_2 -D WLED_WATCHDOG_TIMEOUT=0
;-D ARDUINO_USB_CDC_ON_BOOT=0 ;; -D ARDUINO_USB_MODE=1 ;; for boards with serial-to-USB chip
-D ARDUINO_USB_CDC_ON_BOOT=1 -D ARDUINO_USB_MODE=1 ;; for boards with USB-OTG connector only (USBCDC or "TinyUSB")
-DBOARD_HAS_PSRAM
lib_deps = ${esp32s3.lib_deps}
board_build.partitions = ${esp32.large_partitions}
board_build.f_flash = 80000000L
board_build.flash_mode = qio
monitor_filters = esp32_exception_decoder
[env:esp32S3_wroom2]
;; For ESP32-S3 WROOM-2, a.k.a. ESP32-S3 DevKitC-1 v1.1
;; with >= 16MB FLASH and >= 8MB PSRAM (memory_type: opi_opi)
platform = ${esp32s3.platform}
board = esp32s3camlcd ;; this is the only standard board with "opi_opi"
board_build.arduino.memory_type = opi_opi
upload_speed = 921600
custom_usermods = audioreactive
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} ${esp32s3.build_flags} -D WLED_RELEASE_NAME=\"ESP32-S3_WROOM-2\"
-D CONFIG_LITTLEFS_FOR_IDF_3_2 -D WLED_WATCHDOG_TIMEOUT=0
-D ARDUINO_USB_CDC_ON_BOOT=0 ;; -D ARDUINO_USB_MODE=1 ;; for boards with serial-to-USB chip
;; -D ARDUINO_USB_CDC_ON_BOOT=1 -D ARDUINO_USB_MODE=1 ;; for boards with USB-OTG connector only (USBCDC or "TinyUSB")
-DBOARD_HAS_PSRAM
-D LEDPIN=38 -D DATA_PINS=38 ;; buildin WS2812b LED
-D BTNPIN=0 -D RLYPIN=16 -D IRPIN=17 -D AUDIOPIN=-1
-D WLED_DEBUG
-D SR_DMTYPE=1 -D I2S_SDPIN=13 -D I2S_CKPIN=14 -D I2S_WSPIN=15 -D MCLK_PIN=4 ;; I2S mic
lib_deps = ${esp32s3.lib_deps}
board_build.partitions = ${esp32.extreme_partitions}
board_upload.flash_size = 16MB
board_upload.maximum_size = 16777216
monitor_filters = esp32_exception_decoder
[env:esp32s3_4M_qspi]
;; ESP32-S3, with 4MB FLASH and <= 4MB PSRAM (memory_type: qio_qspi)
board = lolin_s3_mini ;; -S3 mini, 4MB flash 2MB PSRAM
platform = ${esp32s3.platform}
upload_speed = 921600
custom_usermods = audioreactive
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} ${esp32s3.build_flags} -D WLED_RELEASE_NAME=\"ESP32-S3_4M_qspi\"
-DARDUINO_USB_CDC_ON_BOOT=1 -DARDUINO_USB_MODE=1 ;; for boards with USB-OTG connector only (USBCDC or "TinyUSB")
-DBOARD_HAS_PSRAM
-DLOLIN_WIFI_FIX ; seems to work much better with this
-D WLED_WATCHDOG_TIMEOUT=0
lib_deps = ${esp32s3.lib_deps}
board_build.partitions = ${esp32.default_partitions}
board_build.f_flash = 80000000L
board_build.flash_mode = qio
monitor_filters = esp32_exception_decoder
[env:lolin_s2_mini]
platform = ${esp32s2.platform}
board = lolin_s2_mini
board_build.partitions = ${esp32.default_partitions}
board_build.flash_mode = qio
board_build.f_flash = 80000000L
custom_usermods = audioreactive
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} ${esp32s2.build_flags} -D WLED_RELEASE_NAME=\"ESP32-S2\"
-DARDUINO_USB_CDC_ON_BOOT=1
-DARDUINO_USB_MSC_ON_BOOT=0
-DARDUINO_USB_DFU_ON_BOOT=0
-DBOARD_HAS_PSRAM
-DLOLIN_WIFI_FIX ; seems to work much better with this
-D WLED_WATCHDOG_TIMEOUT=0
-D DATA_PINS=16
-D HW_PIN_SCL=35
-D HW_PIN_SDA=33
-D HW_PIN_CLOCKSPI=7
-D HW_PIN_DATASPI=11
-D HW_PIN_MISOSPI=9
; -D STATUSLED=15
lib_deps = ${esp32s2.lib_deps}
[env:usermods]
board = esp32dev
platform = ${esp32_idf_V4.platform}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp32} -D LEDPIN=27 -D BTNPIN=39
lib_ignore =
ESPAsyncTCP
ESPAsyncUDP
platform = espressif32@3.2
[env:sp501e]
board = esp_wroom_02
platform = ${common.platform_wled_default}
board_build.ldscript = ${common.ldscript_2m512k}
build_flags = ${common.build_flags_esp8266} -D LEDPIN=3 -D BTNPIN=1
# ------------------------------------------------------------------------------
# travis test board configurations
# ------------------------------------------------------------------------------
[env:travis_esp8266]
extends = env:d1_mini
build_type = debug
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266} ${common.debug_flags} ${common.build_flags_all_features}
[env:travis_esp32]
extends = env:esp32dev
; build_type = debug
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp32} ${common.debug_flags} ${common.build_flags_all_features}
# ------------------------------------------------------------------------------
# codm pixel controller board configurations
# ------------------------------------------------------------------------------
[env:codm-controller-0.4]
board = esp_wroom_02
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_2m512k}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266} -D LEDPIN=3
[env:codm-controller-0.4-WS2801]
board = esp_wroom_02
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_2m512k}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266} -D USE_WS2801 -D CLKPIN=13 -D DATAPIN=3
[env:codm-controller-0.4-APA102]
board = esp_wroom_02
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_2m512k}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266} -D USE_APA102 -D CLKPIN=13 -D DATAPIN=3
[env:codm-controller-0.5]
board = esp_wroom_02
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_2m512k}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266}
[env:codm-controller-0.5-WS2801]
board = esp_wroom_02
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_2m512k}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266} -D USE_WS2801 #-D CLKPIN=0 -D DATAPIN=2
[env:codm-controller-0.5-APA102]
board = esp_wroom_02
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_2m512k}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266} -D USE_APA102 #-D CLKPIN=0 -D DATAPIN=2
build_flags = ${common.build_flags} ${esp32_idf_V4.build_flags} -D WLED_RELEASE_NAME=\"ESP32_USERMODS\"
-DTOUCH_CS=9
lib_deps = ${esp32_idf_V4.lib_deps}
monitor_filters = esp32_exception_decoder
board_build.flash_mode = dio
; custom_usermods = *every folder with library.json* -- injected by pio-scripts/load_usermods.py
board_build.partitions = ${esp32.extreme_partitions} ; We're gonna need a bigger boat

View File

@ -1,50 +0,0 @@
# Example PlatformIO Project Configuration Override
# ------------------------------------------------------------------------------
# Copy to platformio_override.ini to activate overrides
# ------------------------------------------------------------------------------
# Please visit documentation: https://docs.platformio.org/page/projectconf.html
[platformio]
default_envs = WLED_tasmota_1M
[env:WLED_tasmota_1M]
board = esp01_1m
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_1m128k}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266}
; *********************************************************************
; *** Use custom settings from file my_config.h
-DWLED_USE_MY_CONFIG
; *********************************************************************
; -D WLED_DISABLE_OTA
; -D WLED_DISABLE_ALEXA
; -D WLED_DISABLE_BLYNK
; -D WLED_DISABLE_CRONIXIE
; -D WLED_DISABLE_HUESYNC
; -D WLED_DISABLE_INFRARED
; -D WLED_DISABLE_WEBSOCKETS
; PIN defines - uncomment and change, if needed:
; -D LEDPIN=2
; -D BTNPIN=0
; -D TOUCHPIN=T0
; -D IRPIN=4
; -D RLYPIN=12
; -D RLYMDE=1
; digital LED strip types - uncomment only one ! - this will disable WS281x / SK681x support
; -D USE_APA102
; -D USE_WS2801
; -D USE_LPD8806
; PIN defines for 2 wire LEDs
-D CLKPIN=0
-D DATAPIN=2
; to drive analog LED strips (aka 5050), uncomment the following
; PWM pins 5,12,13,15 are used with Magic Home LED Controller (default)
-D WLED_USE_ANALOG_LEDS
; for the H801 controller (PINs 15,13,12,14 (W2 = 04)) uncomment this
; -D WLED_USE_H801
; for the BW-LT11 controller (PINs 12,4,14,5 ) uncomment this
; -D WLED_USE_BWLT11
; and to enable channel 5 for RGBW-CT led strips this
; -D WLED_USE_5CH_LEDS

View File

@ -0,0 +1,538 @@
# Example PlatformIO Project Configuration Override
# ------------------------------------------------------------------------------
# Copy to platformio_override.ini to activate overrides
# ------------------------------------------------------------------------------
# Please visit documentation: https://docs.platformio.org/page/projectconf.html
[platformio]
default_envs = WLED_generic8266_1M, esp32dev_V4_dio80 # put the name(s) of your own build environment here. You can define as many as you need
#----------
# SAMPLE
#----------
[env:WLED_generic8266_1M]
extends = env:esp01_1m_full # when you want to extend the existing environment (define only updated options)
; board = esp01_1m # uncomment when ou need different board
; platform = ${common.platform_wled_default} # uncomment and change when you want particular platform
; platform_packages = ${common.platform_packages}
; board_build.ldscript = ${common.ldscript_1m128k}
; upload_speed = 921600 # fast upload speed (remove ';' if your board supports fast upload speed)
# Sample libraries used for various usermods. Uncomment when using particular usermod.
lib_deps = ${esp8266.lib_deps}
; olikraus/U8g2 # @~2.33.15
; paulstoffregen/OneWire@~2.3.8
; adafruit/Adafruit Unified Sensor@^1.1.4
; adafruit/DHT sensor library@^1.4.1
; adafruit/Adafruit BME280 Library@^2.2.2
; Wire
; robtillaart/SHT85@~0.3.3
; ;gmag11/QuickESPNow @ ~0.7.0 # will also load QuickDebug
; https://github.com/blazoncek/QuickESPNow.git#optional-debug ;; exludes debug library
; bitbank2/PNGdec@^1.0.1 ;; used for POV display uncomment following
; ${esp32.AR_lib_deps} ;; needed for USERMOD_AUDIOREACTIVE
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} ${esp8266.build_flags}
;
; *** To use the below defines/overrides, copy and paste each onto its own line just below build_flags in the section above.
;
; Set a release name that may be used to distinguish required binary for flashing
; -D WLED_RELEASE_NAME=\"ESP32_MULTI_USREMODS\"
;
; disable specific features
; -D WLED_DISABLE_OTA
; -D WLED_DISABLE_ALEXA
; -D WLED_DISABLE_HUESYNC
; -D WLED_DISABLE_LOXONE
; -D WLED_DISABLE_INFRARED
; -D WLED_DISABLE_WEBSOCKETS
; -D WLED_DISABLE_MQTT
; -D WLED_DISABLE_ADALIGHT
; -D WLED_DISABLE_2D
; -D WLED_DISABLE_PXMAGIC
; -D WLED_DISABLE_ESPNOW
; -D WLED_DISABLE_BROWNOUT_DET
;
; enable optional built-in features
; -D WLED_ENABLE_PIXART
; -D WLED_ENABLE_USERMOD_PAGE # if created
; -D WLED_ENABLE_DMX
;
; PIN defines - uncomment and change, if needed:
; -D DATA_PINS=2
; or use this for multiple outputs
; -D DATA_PINS=1,3
; -D BTNPIN=0
; -D IRPIN=4
; -D RLYPIN=12
; -D RLYMDE=1
; -D RLYODRAIN=0
; -D LED_BUILTIN=2 # GPIO of built-in LED
;
; Limit max buses
; -D WLED_MAX_BUSSES=2
; -D WLED_MAX_ANALOG_CHANNELS=3 # only 3 PWM HW pins available
; -D WLED_MAX_DIGITAL_CHANNELS=2 # only 2 HW accelerated pins available
;
; Configure default WiFi
; -D CLIENT_SSID='"MyNetwork"'
; -D CLIENT_PASS='"Netw0rkPassw0rd"'
;
; Configure and use Ethernet
; -D WLED_USE_ETHERNET
; -D WLED_ETH_DEFAULT=5
; do not use pins 5, (16,) 17, 18, 19, 21, 22, 23, 25, 26, 27 for anything but ethernet
; -D PHY_ADDR=0 -D ETH_PHY_POWER=5 -D ETH_PHY_MDC=23 -D ETH_PHY_MDIO=18
; -D ETH_CLK_MODE=ETH_CLOCK_GPIO17_OUT
;
; NTP time configuration
; -D WLED_NTP_ENABLED=true
; -D WLED_TIMEZONE=2
; -D WLED_LAT=48.86
; -D WLED_LON=2.33
;
; Use Watchdog timer with 10s guard
; -D WLED_WATCHDOG_TIMEOUT=10
;
; Create debug build (with remote debug)
; -D WLED_DEBUG
; -D WLED_DEBUG_HOST='"192.168.0.100"'
; -D WLED_DEBUG_PORT=7868
;
; Use Autosave usermod and set it to do save after 90s
; -D USERMOD_AUTO_SAVE
; -D AUTOSAVE_AFTER_SEC=90
;
; Use AHT10/AHT15/AHT20 usermod
; -D USERMOD_AHT10
;
; Use INA226 usermod
; -D USERMOD_INA226
;
; Use 4 Line Display usermod with SPI display
; -D USERMOD_FOUR_LINE_DISPLAY
; -DFLD_SPI_DEFAULT
; -D FLD_TYPE=SSD1306_SPI64
; -D FLD_PIN_CLOCKSPI=14
; -D FLD_PIN_DATASPI=13
; -D FLD_PIN_DC=26
; -D FLD_PIN_CS=15
; -D FLD_PIN_RESET=27
;
; Use Rotary encoder usermod (in conjunction with 4LD)
; -D USERMOD_ROTARY_ENCODER_UI
; -D ENCODER_DT_PIN=5
; -D ENCODER_CLK_PIN=18
; -D ENCODER_SW_PIN=19
;
; Use Dallas DS18B20 temperature sensor usermod and configure it to use GPIO13
; -D USERMOD_DALLASTEMPERATURE
; -D TEMPERATURE_PIN=13
;
; Use Multi Relay usermod and configure it to use 6 relays and appropriate GPIO
; -D USERMOD_MULTI_RELAY
; -D MULTI_RELAY_MAX_RELAYS=6
; -D MULTI_RELAY_PINS=12,23,22,21,24,25
;
; Use PIR sensor usermod and configure it to use GPIO4 and timer of 60s
; -D USERMOD_PIRSWITCH
; -D PIR_SENSOR_PIN=4 # use -1 to disable usermod
; -D PIR_SENSOR_OFF_SEC=60
; -D PIR_SENSOR_MAX_SENSORS=2 # max allowable sensors (uses OR logic for triggering)
;
; Use Audioreactive usermod and configure I2S microphone
; ${esp32.AR_build_flags} ;; default flags required to properly configure ArduinoFFT
; ;; don't forget to add ArduinoFFT to your libs_deps: ${esp32.AR_lib_deps}
; -D AUDIOPIN=-1
; -D DMTYPE=1 # 0-analog/disabled, 1-I2S generic, 2-ES7243, 3-SPH0645, 4-I2S+mclk, 5-I2S PDM
; -D I2S_SDPIN=36
; -D I2S_WSPIN=23
; -D I2S_CKPIN=19
;
; Use PWM fan usermod
; -D USERMOD_PWM_FAN
; -D TACHO_PIN=33
; -D PWM_PIN=32
;
; Use POV Display usermod
; -D USERMOD_POV_DISPLAY
; Use built-in or custom LED as a status indicator (assumes LED is connected to GPIO16)
; -D STATUSLED=16
;
; set the name of the module - make sure there is a quote-backslash-quote before the name and a backslash-quote-quote after the name
; -D SERVERNAME="\"WLED\""
;
; set the number of LEDs
; -D PIXEL_COUNTS=30
; or this for multiple outputs
; -D PIXEL_COUNTS=30,30
;
; set the default LED type
; -D LED_TYPES=22 # see const.h (TYPE_xxxx)
; or this for multiple outputs
; -D LED_TYPES=TYPE_SK6812_RGBW,TYPE_WS2812_RGB
;
; set default color order of your led strip
; -D DEFAULT_LED_COLOR_ORDER=COL_ORDER_GRB
;
; set milliampere limit when using ESP power pin (or inadequate PSU) to power LEDs
; -D ABL_MILLIAMPS_DEFAULT=850
; -D LED_MILLIAMPS_DEFAULT=55
;
; enable IR by setting remote type
; -D IRTYPE=0 # 0 Remote disabled | 1 24-key RGB | 2 24-key with CT | 3 40-key blue | 4 40-key RGB | 5 21-key RGB | 6 6-key black | 7 9-key red | 8 JSON remote
;
; use PSRAM on classic ESP32 rev.1 (rev.3 or above has no issues)
; -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue # needed only for classic ESP32 rev.1
;
; configure I2C and SPI interface (for various hardware)
; -D I2CSDAPIN=33 # initialise interface
; -D I2CSCLPIN=35 # initialise interface
; -D HW_PIN_SCL=35
; -D HW_PIN_SDA=33
; -D HW_PIN_CLOCKSPI=7
; -D HW_PIN_DATASPI=11
; -D HW_PIN_MISOSPI=9
# ------------------------------------------------------------------------------
# PRE-CONFIGURED DEVELOPMENT BOARDS AND CONTROLLERS
# ------------------------------------------------------------------------------
[env:esp07]
board = esp07
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_4m1m}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} ${esp8266.build_flags}
lib_deps = ${esp8266.lib_deps}
[env:d1_mini]
board = d1_mini
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
upload_speed = 921600
board_build.ldscript = ${common.ldscript_4m1m}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} ${esp8266.build_flags}
lib_deps = ${esp8266.lib_deps}
monitor_filters = esp8266_exception_decoder
[env:heltec_wifi_kit_8]
board = d1_mini
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_4m1m}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} ${esp8266.build_flags}
lib_deps = ${esp8266.lib_deps}
[env:h803wf]
board = d1_mini
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_4m1m}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} ${esp8266.build_flags} -D DATA_PINS=1 -D WLED_DISABLE_INFRARED
lib_deps = ${esp8266.lib_deps}
[env:esp32dev_qio80]
extends = env:esp32dev # we want to extend the existing esp32dev environment (and define only updated options)
board = esp32dev
build_flags = ${common.build_flags} ${esp32.build_flags} #-D WLED_DISABLE_BROWNOUT_DET
${esp32.AR_build_flags} ;; optional - includes USERMOD_AUDIOREACTIVE
lib_deps = ${esp32.lib_deps}
${esp32.AR_lib_deps} ;; needed for USERMOD_AUDIOREACTIVE
monitor_filters = esp32_exception_decoder
board_build.f_flash = 80000000L
board_build.flash_mode = qio
[env:esp32dev_V4_dio80]
;; experimental ESP32 env using ESP-IDF V4.4.x
;; Warning: this build environment is not stable!!
;; please erase your device before installing.
extends = esp32_idf_V4 # based on newer "esp-idf V4" platform environment
board = esp32dev
build_flags = ${common.build_flags} ${esp32_idf_V4.build_flags} #-D WLED_DISABLE_BROWNOUT_DET
${esp32.AR_build_flags} ;; includes USERMOD_AUDIOREACTIVE
lib_deps = ${esp32_idf_V4.lib_deps}
${esp32.AR_lib_deps} ;; needed for USERMOD_AUDIOREACTIVE
monitor_filters = esp32_exception_decoder
board_build.partitions = ${esp32.default_partitions} ;; if you get errors about "out of program space", change this to ${esp32.extended_partitions} or even ${esp32.big_partitions}
board_build.f_flash = 80000000L
board_build.flash_mode = dio
[env:esp32s2_saola]
extends = esp32s2
board = esp32-s2-saola-1
platform = ${esp32s2.platform}
platform_packages = ${esp32s2.platform_packages}
framework = arduino
board_build.flash_mode = qio
upload_speed = 460800
build_flags = ${common.build_flags} ${esp32s2.build_flags}
;-DLOLIN_WIFI_FIX ;; try this in case Wifi does not work
-DARDUINO_USB_CDC_ON_BOOT=1
lib_deps = ${esp32s2.lib_deps}
[env:esp32s3dev_8MB_PSRAM_qspi]
;; ESP32-TinyS3 development board, with 8MB FLASH and PSRAM (memory_type: qio_qspi)
extends = env:esp32s3dev_8MB_PSRAM_opi
;board = um_tinys3 ; -> needs workaround from https://github.com/wled-dev/WLED/pull/2905#issuecomment-1328049860
board = esp32-s3-devkitc-1 ;; generic dev board; the next line adds PSRAM support
board_build.arduino.memory_type = qio_qspi ;; use with PSRAM: 2MB or 4MB
[env:esp8285_4CH_MagicHome]
board = esp8285
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_1m128k}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} ${esp8266.build_flags} -D WLED_DISABLE_OTA
lib_deps = ${esp8266.lib_deps}
[env:esp8285_H801]
board = esp8285
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_1m128k}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} ${esp8266.build_flags} -D WLED_DISABLE_OTA
lib_deps = ${esp8266.lib_deps}
[env:d1_mini_5CH_Shojo_PCB]
board = d1_mini
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_4m1m}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} ${esp8266.build_flags} -D WLED_USE_SHOJO_PCB ;; NB: WLED_USE_SHOJO_PCB is not used anywhere in the source code. Not sure why its needed.
lib_deps = ${esp8266.lib_deps}
[env:d1_mini_debug]
board = d1_mini
build_type = debug
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_4m1m}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} ${esp8266.build_flags} ${common.debug_flags}
lib_deps = ${esp8266.lib_deps}
[env:d1_mini_ota]
board = d1_mini
upload_protocol = espota
# exchange for your WLED IP
upload_port = "10.10.1.27"
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_4m1m}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} ${esp8266.build_flags}
lib_deps = ${esp8266.lib_deps}
[env:anavi_miracle_controller]
board = d1_mini
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_4m1m}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} ${esp8266.build_flags} -D DATA_PINS=12 -D IRPIN=-1 -D RLYPIN=2
lib_deps = ${esp8266.lib_deps}
[env:esp32c3dev_2MB]
;; for ESP32-C3 boards with 2MB flash (instead of 4MB).
;; this board need a specific partition file. OTA not possible.
extends = esp32c3
platform = ${esp32c3.platform}
platform_packages = ${esp32c3.platform_packages}
board = esp32-c3-devkitm-1
build_flags = ${common.build_flags} ${esp32c3.build_flags}
-D WLED_WATCHDOG_TIMEOUT=0
-D WLED_DISABLE_OTA
; -DARDUINO_USB_CDC_ON_BOOT=1 ;; for virtual CDC USB
-DARDUINO_USB_CDC_ON_BOOT=0 ;; for serial-to-USB chip
build_unflags = ${common.build_unflags}
upload_speed = 115200
lib_deps = ${esp32c3.lib_deps}
board_build.partitions = tools/WLED_ESP32_2MB_noOTA.csv
board_build.flash_mode = dio
board_upload.flash_size = 2MB
board_upload.maximum_size = 2097152
[env:wemos_shield_esp32]
extends = esp32 ;; use default esp32 platform
board = esp32dev
upload_speed = 460800
build_flags = ${common.build_flags} ${esp32.build_flags}
-D WLED_RELEASE_NAME=\"ESP32_wemos_shield\"
-D DATA_PINS=16
-D RLYPIN=19
-D BTNPIN=17
-D IRPIN=18
-UWLED_USE_MY_CONFIG
-D USERMOD_DALLASTEMPERATURE
-D USERMOD_FOUR_LINE_DISPLAY
-D TEMPERATURE_PIN=23
${esp32.AR_build_flags} ;; includes USERMOD_AUDIOREACTIVE
lib_deps = ${esp32.lib_deps}
OneWire@~2.3.5 ;; needed for USERMOD_DALLASTEMPERATURE
olikraus/U8g2 @ ^2.28.8 ;; needed for USERMOD_FOUR_LINE_DISPLAY
${esp32.AR_lib_deps} ;; needed for USERMOD_AUDIOREACTIVE
board_build.partitions = ${esp32.default_partitions}
[env:esp32_pico-D4]
extends = esp32 ;; use default esp32 platform
board = pico32 ;; pico32-D4 is different from the standard esp32dev
;; hardware details from https://github.com/srg74/WLED-ESP32-pico
build_flags = ${common.build_flags} ${esp32.build_flags}
-D WLED_RELEASE_NAME=\"pico32-D4\" -D SERVERNAME='"WLED-pico32"'
-D WLED_DISABLE_ADALIGHT ;; no serial-to-USB chip on this board - better to disable serial protocols
-D DATA_PINS=2,18 ;; LED pins
-D RLYPIN=19 -D BTNPIN=0 -D IRPIN=-1 ;; no default pin for IR
${esp32.AR_build_flags} ;; include USERMOD_AUDIOREACTIVE
-D UM_AUDIOREACTIVE_ENABLE ;; enable AR by default
;; Audioreactive settings for on-board microphone (ICS-43432)
-D SR_DMTYPE=1 -D I2S_SDPIN=25 -D I2S_WSPIN=15 -D I2S_CKPIN=14
-D SR_SQUELCH=5 -D SR_GAIN=30
lib_deps = ${esp32.lib_deps}
${esp32.AR_lib_deps} ;; needed for USERMOD_AUDIOREACTIVE
board_build.partitions = ${esp32.default_partitions}
board_build.f_flash = 80000000L
[env:m5atom]
extends = env:esp32dev # we want to extend the existing esp32dev environment (and define only updated options)
build_flags = ${common.build_flags} ${esp32.build_flags} -D DATA_PINS=27 -D BTNPIN=39
[env:sp501e]
board = esp_wroom_02
platform = ${common.platform_wled_default}
board_build.ldscript = ${common.ldscript_2m512k}
build_flags = ${common.build_flags} ${esp8266.build_flags} -D DATA_PINS=3 -D BTNPIN=1
lib_deps = ${esp8266.lib_deps}
[env:sp511e]
board = esp_wroom_02
platform = ${common.platform_wled_default}
board_build.ldscript = ${common.ldscript_2m512k}
build_flags = ${common.build_flags} ${esp8266.build_flags} -D DATA_PINS=3 -D BTNPIN=2 -D IRPIN=5 -D WLED_MAX_BUTTONS=3
lib_deps = ${esp8266.lib_deps}
[env:Athom_RGBCW] ;7w and 5w(GU10) bulbs
board = esp8285
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_2m512k}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} ${esp8266.build_flags} -D BTNPIN=-1 -D RLYPIN=-1 -D DATA_PINS=4,12,14,13,5
-D LED_TYPES=TYPE_ANALOG_5CH -D WLED_DISABLE_INFRARED -D WLED_MAX_CCT_BLEND=0
lib_deps = ${esp8266.lib_deps}
[env:Athom_15w_RGBCW] ;15w bulb
board = esp8285
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_2m512k}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} ${esp8266.build_flags} -D BTNPIN=-1 -D RLYPIN=-1 -D DATA_PINS=4,12,14,5,13
-D LED_TYPES=TYPE_ANALOG_5CH -D WLED_DISABLE_INFRARED -D WLED_MAX_CCT_BLEND=0 -D WLED_USE_IC_CCT
lib_deps = ${esp8266.lib_deps}
[env:Athom_3Pin_Controller] ;small controller with only data
board = esp8285
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_2m512k}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} ${esp8266.build_flags} -D BTNPIN=0 -D RLYPIN=-1 -D DATA_PINS=1 -D WLED_DISABLE_INFRARED
lib_deps = ${esp8266.lib_deps}
[env:Athom_4Pin_Controller] ; With clock and data interface
board = esp8285
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_2m512k}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} ${esp8266.build_flags} -D BTNPIN=0 -D RLYPIN=12 -D DATA_PINS=1 -D WLED_DISABLE_INFRARED
lib_deps = ${esp8266.lib_deps}
[env:Athom_5Pin_Controller] ;Analog light strip controller
board = esp8285
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_2m512k}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} ${esp8266.build_flags} -D BTNPIN=0 -D RLYPIN=-1 DATA_PINS=4,12,14,13 -D WLED_DISABLE_INFRARED
lib_deps = ${esp8266.lib_deps}
[env:MY9291]
board = esp01_1m
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_1m128k}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} ${esp8266.build_flags} -D WLED_DISABLE_OTA -D USERMOD_MY9291
lib_deps = ${esp8266.lib_deps}
# ------------------------------------------------------------------------------
# codm pixel controller board configurations
# codm-controller-0_6 can also be used for the TYWE3S controller
# ------------------------------------------------------------------------------
[env:codm-controller-0_6]
board = esp_wroom_02
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_2m512k}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} ${esp8266.build_flags}
lib_deps = ${esp8266.lib_deps}
[env:codm-controller-0_6-rev2]
board = esp_wroom_02
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_4m1m}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} ${esp8266.build_flags}
lib_deps = ${esp8266.lib_deps}
# ------------------------------------------------------------------------------
# EleksTube-IPS
# ------------------------------------------------------------------------------
[env:elekstube_ips]
extends = esp32 ;; use default esp32 platform
board = esp32dev
upload_speed = 921600
custom_usermods = ${env:esp32dev.custom_usermods} RTC EleksTube_IPS
build_flags = ${common.build_flags} ${esp32.build_flags} -D WLED_DISABLE_BROWNOUT_DET -D WLED_DISABLE_INFRARED
-D DATA_PINS=12
-D RLYPIN=27
-D BTNPIN=34
-D PIXEL_COUNTS=6
# Display config
-D ST7789_DRIVER
-D TFT_WIDTH=135
-D TFT_HEIGHT=240
-D CGRAM_OFFSET
-D TFT_SDA_READ
-D TFT_MOSI=23
-D TFT_SCLK=18
-D TFT_DC=25
-D TFT_RST=26
-D SPI_FREQUENCY=40000000
-D USER_SETUP_LOADED
monitor_filters = esp32_exception_decoder
# ------------------------------------------------------------------------------
# Usermod examples
# ------------------------------------------------------------------------------
# 433MHz RF remote example for esp32dev
[env:esp32dev_usermod_RF433]
extends = env:esp32dev
build_flags = ${env:esp32dev.build_flags} -D USERMOD_RF433
lib_deps = ${env:esp32dev.lib_deps}
sui77/rc-switch @ 2.6.4

View File

@ -1,42 +1,42 @@
<p align="center">
<img src="/images/wled_logo_akemi.png">
<a href="https://github.com/Aircoookie/WLED/releases"><img src="https://img.shields.io/github/release/Aircoookie/WLED.svg?style=flat-square"></a>
<a href="https://raw.githubusercontent.com/Aircoookie/WLED/master/LICENSE"><img src="https://img.shields.io/github/license/Aircoookie/wled?color=blue&style=flat-square"></a>
<a href="https://github.com/wled-dev/WLED/releases"><img src="https://img.shields.io/github/release/wled-dev/WLED.svg?style=flat-square"></a>
<a href="https://raw.githubusercontent.com/wled-dev/WLED/main/LICENSE"><img src="https://img.shields.io/github/license/wled-dev/wled?color=blue&style=flat-square"></a>
<a href="https://wled.discourse.group"><img src="https://img.shields.io/discourse/topics?colorB=blue&label=forum&server=https%3A%2F%2Fwled.discourse.group%2F&style=flat-square"></a>
<a href="https://discord.gg/KuqP7NE"><img src="https://img.shields.io/discord/473448917040758787.svg?colorB=blue&label=discord&style=flat-square"></a>
<a href="https://github.com/Aircoookie/WLED/wiki"><img src="https://img.shields.io/badge/quick_start-wiki-blue.svg?style=flat-square"></a>
<a href="https://discord.gg/QAh7wJHrRM"><img src="https://img.shields.io/discord/473448917040758787.svg?colorB=blue&label=discord&style=flat-square"></a>
<a href="https://kno.wled.ge"><img src="https://img.shields.io/badge/quick_start-wiki-blue.svg?style=flat-square"></a>
<a href="https://github.com/Aircoookie/WLED-App"><img src="https://img.shields.io/badge/app-wled-blue.svg?style=flat-square"></a>
<a href="https://gitpod.io/#https://github.com/Aircoookie/WLED"><img src="https://img.shields.io/badge/Gitpod-ready--to--code-blue?style=flat-square&logo=gitpod"></a>
<a href="https://gitpod.io/#https://github.com/wled-dev/WLED"><img src="https://img.shields.io/badge/Gitpod-ready--to--code-blue?style=flat-square&logo=gitpod"></a>
</p>
# Welcome to my project WLED! ✨
A fast and feature-rich implementation of an ESP8266/ESP32 webserver to control NeoPixel (WS2812B, WS2811, SK6812) LEDs or also SPI based chipsets like the WS2801 and APA102!
A fast and feature-rich implementation of an ESP32 and ESP8266 webserver to control NeoPixel (WS2812B, WS2811, SK6812) LEDs or also SPI based chipsets like the WS2801 and APA102!
## ⚙️ Features
- WS2812FX library integrated for over 100 special effects
- WS2812FX library with more than 100 special effects
- FastLED noise effects and 50 palettes
- Modern UI with color, effect and segment controls
- Segments to set different effects and colors to parts of the LEDs
- Settings page - configuration over network
- Segments to set different effects and colors to user defined parts of the LED string
- Settings page - configuration via the network
- Access Point and station mode - automatic failsafe AP
- Up to 10 LED outputs per instance
- [Up to 10 LED outputs](https://kno.wled.ge/features/multi-strip/#esp32) per instance
- Support for RGBW strips
- Up to 250 user presets to save and load colors/effects easily, supports cycling through them.
- Presets can be used to automatically execute API calls
- Nightlight function (gradually dims down)
- Full OTA software updatability (HTTP + ArduinoOTA), password protectable
- Configurable analog clock + support for the Cronixie kit by Diamex
- Configurable Auto Brightness limit for safer operation
- Full OTA software updateability (HTTP + ArduinoOTA), password protectable
- Configurable analog clock (Cronixie, 7-segment and EleksTube IPS clock support via usermods)
- Configurable Auto Brightness limit for safe operation
- Filesystem-based config for easier backup of presets and settings
## 💡 Supported light control interfaces
- WLED app for [Android](https://play.google.com/store/apps/details?id=com.aircoookie.WLED) and [iOS](https://apps.apple.com/us/app/wled/id1475695033)
- JSON and HTTP request APIs
- MQTT
- Blynk IoT
- MQTT
- E1.31, Art-Net, DDP and TPM2.net
- [diyHue](https://github.com/diyhue/diyHue) (Wled is supported by diyHue, including Hue Sync Entertainment under udp. Thanks to [Gregory Mallios](https://github.com/gmallios))
- [Hyperion](https://github.com/hyperion-project/hyperion.ng)
- UDP realtime
- Alexa voice control (including dimming and color)
@ -48,54 +48,37 @@ A fast and feature-rich implementation of an ESP8266/ESP32 webserver to control
## 📲 Quick start guide and documentation
See the [wiki](https://github.com/Aircoookie/WLED/wiki)!
See the [documentation on our official site](https://kno.wled.ge)!
[On this page](https://github.com/Aircoookie/WLED/wiki/Learning-the-ropes) you can find excellent tutorials made by the community and helpful tools to help you get your new lamp up and running!
[On this page](https://kno.wled.ge/basics/tutorials/) you can find excellent tutorials and tools to help you get your new project up and running!
## 🖼️ Images
## 🖼️ User interface
<img src="/images/macbook-pro-space-gray-on-the-wooden-table.jpg" width="50%"><img src="/images/walking-with-iphone-x.jpg" width="50%">
## 💾 Compatible LED Strips
Type | Voltage | Comments
|---|---|---|
WS2812B | 5v |
WS2813 | 5v |
SK6812 | 5v | RGBW
APA102 | 5v | C/D
WS2801 | 5v | C/D
LPD8806 | 5v | C/D
TM1814 | 12v | RGBW
WS2811 | 12v | 3-LED segments
WS2815 | 12v |
GS8208 | 12v |
Analog/non-addressable | any | Requires additional circuitry
## 🧊 Compatible PC RGB Fans and ARGB accessories
Brand | Model | Comments
|---|---|---|
Corsair | HD120 Fan | Uses WS2812B, data-in only
PCCOOLER | Moonlight 5-pack Fans | Uses WS2812B, includes Data-out connector to keep each fan uniquely addressable if wired in series like traditional LED strips
Any | 5v 3-pin ARGB for PC | Any PC RGB device that supports the 5v 3-pin ARGB motherboard header should work fine with WLED. All the major motherboard vendors support the Corsair HD120 and PCCOOLER fans listed, so we can safely assume any device that supports motherboard ARGB 5V 3-Pin standard will work with WLED.
## 💾 Compatible hardware
See [here](https://kno.wled.ge/basics/compatible-hardware)!
## ✌️ Other
Licensed under the MIT license
Credits [here](https://github.com/Aircoookie/WLED/wiki/Contributors-&-About)!
Uses Linearicons by Perxis!
Licensed under the EUPL v1.2 license
Credits [here](https://kno.wled.ge/about/contributors/)!
Join the Discord server to discuss everything about WLED!
<a href="https://discord.gg/KuqP7NE"><img src="https://discordapp.com/api/guilds/473448917040758787/widget.png?style=banner2" width="25%"></a>
<a href="https://discord.gg/QAh7wJHrRM"><img src="https://discordapp.com/api/guilds/473448917040758787/widget.png?style=banner2" width="25%"></a>
Check out the WLED [Discourse forum](https://wled.discourse.group)!
You can also send me mails to [dev.aircoookie@gmail.com](mailto:dev.aircoookie@gmail.com), but please only do so if you want to talk to me privately.
If WLED really brightens up your every day, you can [![](https://img.shields.io/badge/send%20me%20a%20small%20gift-paypal-blue.svg?style=flat-square)](https://paypal.me/aircoookie)
You can also send me mails to [dev.aircoookie@gmail.com](mailto:dev.aircoookie@gmail.com), but please, only do so if you want to talk to me privately.
If WLED really brightens up your day, you can [![](https://img.shields.io/badge/send%20me%20a%20small%20gift-paypal-blue.svg?style=flat-square)](https://paypal.me/aircoookie)
*Disclaimer:*
If you are sensitive to photosensitive epilepsy it is not recommended that you use this software.
In case you still want to try, don't use strobe, lighting or noise modes or high effect speed settings.
As per the MIT license, I assume no liability for any damage to you or any other person or equipment.
If you are prone to photosensitive epilepsy, we recommended you do **not** use this software.
If you still want to try, don't use strobe, lighting or noise modes or high effect speed settings.
As per the EUPL license, I assume no liability for any damage to you or any other person or equipment.

1
requirements.in Normal file
View File

@ -0,0 +1 @@
platformio>=6.1.17

58
requirements.txt Normal file
View File

@ -0,0 +1,58 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile requirements.in
#
ajsonrpc==1.2.0
# via platformio
anyio==4.8.0
# via starlette
bottle==0.13.2
# via platformio
certifi==2025.1.31
# via requests
charset-normalizer==3.4.1
# via requests
click==8.1.8
# via
# platformio
# uvicorn
colorama==0.4.6
# via platformio
h11==0.14.0
# via
# uvicorn
# wsproto
idna==3.10
# via
# anyio
# requests
marshmallow==3.26.1
# via platformio
packaging==24.2
# via marshmallow
platformio==6.1.17
# via -r requirements.in
pyelftools==0.32
# via platformio
pyserial==3.5
# via platformio
requests==2.32.3
# via platformio
semantic-version==2.10.0
# via platformio
sniffio==1.3.1
# via anyio
starlette==0.45.3
# via platformio
tabulate==0.9.0
# via platformio
typing-extensions==4.12.2
# via anyio
urllib3==2.3.0
# via requests
uvicorn==0.34.0
# via platformio
wsproto==1.2.0
# via platformio

BIN
tools/AutoCubeMap.xlsx Normal file

Binary file not shown.

View File

@ -0,0 +1,6 @@
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x1A0000,
app1, app, ota_1, 0x1B0000,0x1A0000,
spiffs, data, spiffs, 0x350000,0xB0000,
1 # Name Type SubType Offset Size Flags
2 nvs data nvs 0x9000 0x5000
3 otadata data ota 0xe000 0x2000
4 app0 app ota_0 0x10000 0x1A0000
5 app1 app ota_1 0x1B0000 0x1A0000
6 spiffs data spiffs 0x350000 0xB0000

View File

@ -0,0 +1,6 @@
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x200000,
app1, app, ota_1, 0x210000,0x200000,
spiffs, data, spiffs, 0x410000,0xBE0000,
1 # Name Type SubType Offset Size Flags
2 nvs data nvs 0x9000 0x5000
3 otadata data ota 0xe000 0x2000
4 app0 app ota_0 0x10000 0x200000
5 app1 app ota_1 0x210000 0x200000
6 spiffs data spiffs 0x410000 0xBE0000

View File

@ -0,0 +1,8 @@
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x300000,
app1, app, ota_1, 0x310000,0x300000,
spiffs, data, spiffs, 0x610000,0x9E0000,
coredump, data, coredump,,64K
# to create/use ffat, see https://github.com/marcmerlin/esp32_fatfsimage
1 # Name, Type, SubType, Offset, Size, Flags
2 nvs, data, nvs, 0x9000, 0x5000,
3 otadata, data, ota, 0xe000, 0x2000,
4 app0, app, ota_0, 0x10000, 0x300000,
5 app1, app, ota_1, 0x310000,0x300000,
6 spiffs, data, spiffs, 0x610000,0x9E0000,
7 coredump, data, coredump,,64K
8 # to create/use ffat, see https://github.com/marcmerlin/esp32_fatfsimage

View File

@ -0,0 +1,5 @@
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 20K,
otadata, data, ota, 0xe000, 8K,
app0, app, ota_0, 0x10000, 1536K,
spiffs, data, spiffs, 0x190000, 384K,
1 # Name Type SubType Offset Size Flags
2 nvs data nvs 0x9000 20K
3 otadata data ota 0xe000 8K
4 app0 app ota_0 0x10000 1536K
5 spiffs data spiffs 0x190000 384K

View File

@ -0,0 +1,6 @@
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x180000,
app1, app, ota_1, 0x190000,0x180000,
spiffs, data, spiffs, 0x310000,0xF0000,
1 # Name Type SubType Offset Size Flags
2 nvs data nvs 0x9000 0x5000
3 otadata data ota 0xe000 0x2000
4 app0 app ota_0 0x10000 0x180000
5 app1 app ota_1 0x190000 0x180000
6 spiffs data spiffs 0x310000 0xF0000

View File

@ -0,0 +1,7 @@
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x1D0000,
app1, app, ota_1, 0x1E0000,0x1D0000,
spiffs, data, spiffs, 0x3B0000,0x40000,
coredump, data, coredump,,64K
1 # Name, Type, SubType, Offset, Size, Flags
2 nvs, data, nvs, 0x9000, 0x5000,
3 otadata, data, ota, 0xe000, 0x2000,
4 app0, app, ota_0, 0x10000, 0x1D0000,
5 app1, app, ota_1, 0x1E0000,0x1D0000,
6 spiffs, data, spiffs, 0x3B0000,0x40000,
7 coredump, data, coredump,,64K

View File

@ -0,0 +1,7 @@
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x1B0000,
app1, app, ota_1, 0x1C0000,0x1B0000,
spiffs, data, spiffs, 0x370000,0x80000,
coredump, data, coredump,,64K
1 # Name, Type, SubType, Offset, Size, Flags
2 nvs, data, nvs, 0x9000, 0x5000,
3 otadata, data, ota, 0xe000, 0x2000,
4 app0, app, ota_0, 0x10000, 0x1B0000,
5 app1, app, ota_1, 0x1C0000,0x1B0000,
6 spiffs, data, spiffs, 0x370000,0x80000,
7 coredump, data, coredump,,64K

View File

@ -0,0 +1,6 @@
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x1A0000,
app1, app, ota_1, 0x1B0000,0x1A0000,
spiffs, data, spiffs, 0x350000,0xB0000,
1 # Name Type SubType Offset Size Flags
2 nvs data nvs 0x9000 0x5000
3 otadata data ota 0xe000 0x2000
4 app0 app ota_0 0x10000 0x1A0000
5 app1 app ota_1 0x1B0000 0x1A0000
6 spiffs data spiffs 0x350000 0xB0000

7
tools/WLED_ESP32_8MB.csv Normal file
View File

@ -0,0 +1,7 @@
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x200000,
app1, app, ota_1, 0x210000,0x200000,
spiffs, data, spiffs, 0x410000,0x3E0000,
coredump, data, coredump,,64K
1 # Name, Type, SubType, Offset, Size, Flags
2 nvs, data, nvs, 0x9000, 0x5000,
3 otadata, data, ota, 0xe000, 0x2000,
4 app0, app, ota_0, 0x10000, 0x200000,
5 app1, app, ota_1, 0x210000,0x200000,
6 spiffs, data, spiffs, 0x410000,0x3E0000,
7 coredump, data, coredump,,64K

17
tools/all_xml.sh Normal file
View File

@ -0,0 +1,17 @@
#!/bin/bash
# Pull all settings pages for comparison
HOST=$1
TGT_PATH=$2
CURL_ARGS="--compressed"
# Replicate one target many times
function replicate() {
for i in {0..10}
do
echo -n " http://${HOST}/settings.js?p=$i -o ${TGT_PATH}/$i.xml"
done
}
read -a TARGETS <<< $(replicate)
mkdir -p ${TGT_PATH}
curl ${CURL_ARGS} ${TARGETS[@]}

212
tools/cdata-test.js Normal file
View File

@ -0,0 +1,212 @@
'use strict';
const assert = require('node:assert');
const { describe, it, before, after } = require('node:test');
const fs = require('fs');
const path = require('path');
const child_process = require('child_process');
const util = require('util');
const execPromise = util.promisify(child_process.exec);
process.env.NODE_ENV = 'test'; // Set the environment to testing
const cdata = require('./cdata.js');
describe('Function', () => {
const testFolderPath = path.join(__dirname, 'testFolder');
const oldFilePath = path.join(testFolderPath, 'oldFile.txt');
const newFilePath = path.join(testFolderPath, 'newFile.txt');
// Create a temporary file before the test
before(() => {
// Create test folder
if (!fs.existsSync(testFolderPath)) {
fs.mkdirSync(testFolderPath);
}
// Create an old file
fs.writeFileSync(oldFilePath, 'This is an old file.');
// Modify the 'mtime' to simulate an old file
const oldTime = new Date();
oldTime.setFullYear(oldTime.getFullYear() - 1);
fs.utimesSync(oldFilePath, oldTime, oldTime);
// Create a new file
fs.writeFileSync(newFilePath, 'This is a new file.');
});
// delete the temporary files after the test
after(() => {
fs.rmSync(testFolderPath, { recursive: true });
});
describe('isFileNewerThan', async () => {
it('should return true if the file is newer than the provided time', async () => {
const pastTime = Date.now() - 10000; // 10 seconds ago
assert.strictEqual(cdata.isFileNewerThan(newFilePath, pastTime), true);
});
it('should return false if the file is older than the provided time', async () => {
assert.strictEqual(cdata.isFileNewerThan(oldFilePath, Date.now()), false);
});
it('should throw an exception if the file does not exist', async () => {
assert.throws(() => {
cdata.isFileNewerThan('nonexistent.txt', Date.now());
});
});
});
describe('isAnyFileInFolderNewerThan', async () => {
it('should return true if a file in the folder is newer than the given time', async () => {
const time = fs.statSync(path.join(testFolderPath, 'oldFile.txt')).mtime;
assert.strictEqual(cdata.isAnyFileInFolderNewerThan(testFolderPath, time), true);
});
it('should return false if no files in the folder are newer than the given time', async () => {
assert.strictEqual(cdata.isAnyFileInFolderNewerThan(testFolderPath, new Date()), false);
});
it('should throw an exception if the folder does not exist', async () => {
assert.throws(() => {
cdata.isAnyFileInFolderNewerThan('nonexistent', new Date());
});
});
});
});
describe('Script', () => {
const folderPath = 'wled00';
const dataPath = path.join(folderPath, 'data');
before(() => {
process.env.NODE_ENV = 'production';
// Backup files
fs.cpSync("wled00/data", "wled00Backup", { recursive: true });
fs.cpSync("tools/cdata.js", "cdata.bak.js");
fs.cpSync("package.json", "package.bak.json");
});
after(() => {
// Restore backup
fs.rmSync("wled00/data", { recursive: true });
fs.renameSync("wled00Backup", "wled00/data");
fs.rmSync("tools/cdata.js");
fs.renameSync("cdata.bak.js", "tools/cdata.js");
fs.rmSync("package.json");
fs.renameSync("package.bak.json", "package.json");
});
// delete all html_*.h files
async function deleteBuiltFiles() {
const files = await fs.promises.readdir(folderPath);
await Promise.all(files.map(file => {
if (file.startsWith('html_') && path.extname(file) === '.h') {
return fs.promises.unlink(path.join(folderPath, file));
}
}));
}
// check if html_*.h files were created
async function checkIfBuiltFilesExist() {
const files = await fs.promises.readdir(folderPath);
const htmlFiles = files.filter(file => file.startsWith('html_') && path.extname(file) === '.h');
assert(htmlFiles.length > 0, 'html_*.h files were not created');
}
async function runAndCheckIfBuiltFilesExist() {
await execPromise('node tools/cdata.js');
await checkIfBuiltFilesExist();
}
async function checkIfFileWasNewlyCreated(file) {
const modifiedTime = fs.statSync(file).mtimeMs;
assert(Date.now() - modifiedTime < 500, file + ' was not modified');
}
async function testFileModification(sourceFilePath, resultFile) {
// run cdata.js to ensure html_*.h files are created
await execPromise('node tools/cdata.js');
// modify file
fs.appendFileSync(sourceFilePath, ' ');
// delay for 1 second to ensure the modified time is different
await new Promise(resolve => setTimeout(resolve, 1000));
// run script cdata.js again and wait for it to finish
await execPromise('node tools/cdata.js');
await checkIfFileWasNewlyCreated(path.join(folderPath, resultFile));
}
describe('should build if', () => {
it('html_*.h files are missing', async () => {
await deleteBuiltFiles();
await runAndCheckIfBuiltFilesExist();
});
it('only one html_*.h file is missing', async () => {
// run script cdata.js and wait for it to finish
await execPromise('node tools/cdata.js');
// delete a random html_*.h file
let files = await fs.promises.readdir(folderPath);
let htmlFiles = files.filter(file => file.startsWith('html_') && path.extname(file) === '.h');
const randomFile = htmlFiles[Math.floor(Math.random() * htmlFiles.length)];
await fs.promises.unlink(path.join(folderPath, randomFile));
await runAndCheckIfBuiltFilesExist();
});
it('script was executed with -f or --force', async () => {
await execPromise('node tools/cdata.js');
await new Promise(resolve => setTimeout(resolve, 1000));
await execPromise('node tools/cdata.js --force');
await checkIfFileWasNewlyCreated(path.join(folderPath, 'html_ui.h'));
await new Promise(resolve => setTimeout(resolve, 1000));
await execPromise('node tools/cdata.js -f');
await checkIfFileWasNewlyCreated(path.join(folderPath, 'html_ui.h'));
});
it('a file changes', async () => {
await testFileModification(path.join(dataPath, 'index.htm'), 'html_ui.h');
});
it('a inlined file changes', async () => {
await testFileModification(path.join(dataPath, 'index.js'), 'html_ui.h');
});
it('a settings file changes', async () => {
await testFileModification(path.join(dataPath, 'settings_leds.htm'), 'html_ui.h');
});
it('the favicon changes', async () => {
await testFileModification(path.join(dataPath, 'favicon.ico'), 'html_ui.h');
});
it('cdata.js changes', async () => {
await testFileModification('tools/cdata.js', 'html_ui.h');
});
it('package.json changes', async () => {
await testFileModification('package.json', 'html_ui.h');
});
});
describe('should not build if', () => {
it('the files are already built', async () => {
await deleteBuiltFiles();
// run script cdata.js and wait for it to finish
let startTime = Date.now();
await execPromise('node tools/cdata.js');
const firstRunTime = Date.now() - startTime;
// run script cdata.js and wait for it to finish
startTime = Date.now();
await execPromise('node tools/cdata.js');
const secondRunTime = Date.now() - startTime;
// check if second run was faster than the first (must be at least 2x faster)
assert(secondRunTime < firstRunTime / 2, 'html_*.h files were rebuilt');
});
});
});

View File

@ -2,7 +2,7 @@
* Writes compressed C arrays of data files (web interface)
* How to use it?
*
* 1) Install Node 11+ and npm
* 1) Install Node 20+ and npm
* 2) npm install
* 3) npm run build
*
@ -15,21 +15,64 @@
* It uses NodeJS packages to inline, minify and GZIP files. See writeHtmlGzipped and writeChunks invocations at the bottom of the page.
*/
const fs = require("fs");
const fs = require("node:fs");
const path = require("path");
const inline = require("web-resource-inliner");
const zlib = require("node:zlib");
const CleanCSS = require("clean-css");
const minifyHtml = require("html-minifier-terser").minify;
const packageJson = require("../package.json");
/**
*
// Export functions for testing
module.exports = { isFileNewerThan, isAnyFileInFolderNewerThan };
const output = ["wled00/html_ui.h", "wled00/html_pixart.h", "wled00/html_cpal.h", "wled00/html_pxmagic.h", "wled00/html_settings.h", "wled00/html_other.h"]
// \x1b[34m is blue, \x1b[36m is cyan, \x1b[0m is reset
const wledBanner = `
\t\x1b[34m ## ## ## ###### ######
\t\x1b[34m## ## ## ## ## ## ##
\t\x1b[34m## ## ## ## ###### ## ##
\t\x1b[34m## ## ## ## ## ## ##
\t\x1b[34m ## ## ###### ###### ######
\t\t\x1b[36m build script for web UI
\x1b[0m`;
const singleHeader = `/*
* Binary array for the Web UI.
* gzip is used for smaller size and improved speeds.
*
* Please see https://kno.wled.ge/advanced/custom-features/#changing-web-ui
* to find out how to easily modify the web UI source!
*/
function hexdump(buffer) {
`;
const multiHeader = `/*
* More web UI HTML source arrays.
* This file is auto generated, please don't make any changes manually.
*
* Instead, see https://kno.wled.ge/advanced/custom-features/#changing-web-ui
* to find out how to easily modify the web UI source!
*/
`;
function hexdump(buffer, isHex = false) {
let lines = [];
for (let i = 0; i < buffer.length; i += 16) {
let block = buffer.slice(i, i + 16); // cut buffer into blocks of 16
for (let i = 0; i < buffer.length; i += (isHex ? 32 : 16)) {
var block;
let hexArray = [];
for (let value of block) {
hexArray.push("0x" + value.toString(16).padStart(2, "0"));
if (isHex) {
block = buffer.slice(i, i + 32)
for (let j = 0; j < block.length; j += 2) {
hexArray.push("0x" + block.slice(j, j + 2))
}
} else {
block = buffer.slice(i, i + 16); // cut buffer into blocks of 16
for (let value of block) {
hexArray.push("0x" + value.toString(16).padStart(2, "0"));
}
}
let hexString = hexArray.join(", ");
@ -40,161 +83,169 @@ function hexdump(buffer) {
return lines.join(",\n");
}
const inliner = require("inliner");
const zlib = require("zlib");
function strReplace(str, search, replacement) {
return str.split(search).join(replacement);
}
function adoptVersionAndRepo(html) {
let repoUrl = packageJson.repository ? packageJson.repository.url : undefined;
if (repoUrl) {
repoUrl = repoUrl.replace(/^git\+/, "");
repoUrl = repoUrl.replace(/\.git$/, "");
// Replace we
html = strReplace(html, "https://github.com/atuline/WLED", repoUrl);
html = strReplace(html, "https://github.com/Aircoookie/WLED", repoUrl);
html = html.replaceAll("https://github.com/atuline/WLED", repoUrl);
html = html.replaceAll("https://github.com/wled-dev/WLED", repoUrl);
}
let version = packageJson.version;
if (version) {
html = strReplace(html, "##VERSION##", version);
html = html.replaceAll("##VERSION##", version);
}
return html;
}
function writeHtmlGzipped(sourceFile, resultFile) {
console.info("Reading " + sourceFile);
new inliner(sourceFile, function (error, html) {
console.info("Inlined " + html.length + " characters");
html = filter(html, "html-minify-ui");
console.info("Minified to " + html.length + " characters");
async function minify(str, type = "plain") {
const options = {
collapseWhitespace: true,
conservativeCollapse: true, // preserve spaces in text
collapseBooleanAttributes: true,
collapseInlineTagWhitespace: true,
minifyCSS: true,
minifyJS: true,
removeAttributeQuotes: true,
removeComments: true,
sortAttributes: true,
sortClassName: true,
};
if (error) {
console.warn(error);
throw error;
}
html = adoptVersionAndRepo(html);
zlib.gzip(html, { level: zlib.constants.Z_BEST_COMPRESSION }, function (error, result) {
if (error) {
console.warn(error);
throw error;
}
console.info("Compressed " + result.length + " bytes");
const array = hexdump(result);
const src = `/*
* Binary array for the Web UI.
* gzip is used for smaller size and improved speeds.
*
* Please see https://github.com/Aircoookie/WLED/wiki/Add-own-functionality#web-ui
* to find out how to easily modify the web UI source!
*/
// Autogenerated from ${sourceFile}, do not edit!!
const uint16_t PAGE_index_L = ${result.length};
const uint8_t PAGE_index[] PROGMEM = {
${array}
};
`;
console.info("Writing " + resultFile);
fs.writeFileSync(resultFile, src);
});
});
}
const CleanCSS = require("clean-css");
const MinifyHTML = require("html-minifier-terser").minify;
function filter(str, type) {
str = adoptVersionAndRepo(str);
if (type === undefined) {
if (type == "plain") {
return str;
} else if (type == "css-minify") {
return new CleanCSS({}).minify(str).styles;
} else if (type == "js-minify") {
let js = await minifyHtml('<script>' + str + '</script>', options);
return js.replace(/<[\/]*script>/g, '');
} else if (type == "html-minify") {
return MinifyHTML(str, {
collapseWhitespace: true,
maxLineLength: 80,
minifyCSS: true,
minifyJS: true,
continueOnParseError: false,
removeComments: true,
});
} else if (type == "html-minify-ui") {
return MinifyHTML(str, {
collapseWhitespace: true,
conservativeCollapse: true,
maxLineLength: 80,
minifyCSS: true,
minifyJS: true,
continueOnParseError: false,
removeComments: true,
});
} else {
console.warn("Unknown filter: " + type);
return str;
return await minifyHtml(str, options);
}
throw new Error("Unknown filter: " + type);
}
function specToChunk(srcDir, s) {
if (s.method == "plaintext") {
const buf = fs.readFileSync(srcDir + "/" + s.file);
const str = buf.toString("utf-8");
const chunk = `
// Autogenerated from ${srcDir}/${s.file}, do not edit!!
const char ${s.name}[] PROGMEM = R"${s.prepend || ""}${filter(str, s.filter)}${
s.append || ""
}";
async function writeHtmlGzipped(sourceFile, resultFile, page) {
console.info("Reading " + sourceFile);
inline.html({
fileContent: fs.readFileSync(sourceFile, "utf8"),
relativeTo: path.dirname(sourceFile),
strict: true,
},
async function (error, html) {
if (error) throw error;
`;
return s.mangle ? s.mangle(chunk) : chunk;
} else if (s.method == "binary") {
const buf = fs.readFileSync(srcDir + "/" + s.file);
const result = hexdump(buf);
const chunk = `
// Autogenerated from ${srcDir}/${s.file}, do not edit!!
const uint16_t ${s.name}_length = ${result.length};
const uint8_t ${s.name}[] PROGMEM = {
${result}
};
`;
return s.mangle ? s.mangle(chunk) : chunk;
} else {
console.warn("Unknown method: " + s.method);
return undefined;
}
html = adoptVersionAndRepo(html);
const originalLength = html.length;
html = await minify(html, "html-minify");
const result = zlib.gzipSync(html, { level: zlib.constants.Z_BEST_COMPRESSION });
console.info("Minified and compressed " + sourceFile + " from " + originalLength + " to " + result.length + " bytes");
const array = hexdump(result);
let src = singleHeader;
src += `const uint16_t PAGE_${page}_L = ${result.length};\n`;
src += `const uint8_t PAGE_${page}[] PROGMEM = {\n${array}\n};\n\n`;
console.info("Writing " + resultFile);
fs.writeFileSync(resultFile, src);
});
}
function writeChunks(srcDir, specs, resultFile) {
let src = `/*
* More web UI HTML source arrays.
* This file is auto generated, please don't make any changes manually.
* Instead, see https://github.com/Aircoookie/WLED/wiki/Add-own-functionality#web-ui
* to find out how to easily modify the web UI source!
*/
`;
specs.forEach((s) => {
try {
console.info("Reading " + srcDir + "/" + s.file + " as " + s.name);
src += specToChunk(srcDir, s);
} catch (e) {
console.warn(
"Failed " + s.name + " from " + srcDir + "/" + s.file,
e.message.length > 60 ? e.message.substring(0, 60) : e.message
);
async function specToChunk(srcDir, s) {
const buf = fs.readFileSync(srcDir + "/" + s.file);
let chunk = `\n// Autogenerated from ${srcDir}/${s.file}, do not edit!!\n`
if (s.method == "plaintext" || s.method == "gzip") {
let str = buf.toString("utf-8");
str = adoptVersionAndRepo(str);
const originalLength = str.length;
if (s.method == "gzip") {
if (s.mangle) str = s.mangle(str);
const zip = zlib.gzipSync(await minify(str, s.filter), { level: zlib.constants.Z_BEST_COMPRESSION });
console.info("Minified and compressed " + s.file + " from " + originalLength + " to " + zip.length + " bytes");
const result = hexdump(zip);
chunk += `const uint16_t ${s.name}_length = ${zip.length};\n`;
chunk += `const uint8_t ${s.name}[] PROGMEM = {\n${result}\n};\n\n`;
return chunk;
} else {
const minified = await minify(str, s.filter);
console.info("Minified " + s.file + " from " + originalLength + " to " + minified.length + " bytes");
chunk += `const char ${s.name}[] PROGMEM = R"${s.prepend || ""}${minified}${s.append || ""}";\n\n`;
return s.mangle ? s.mangle(chunk) : chunk;
}
});
} else if (s.method == "binary") {
const result = hexdump(buf);
chunk += `const uint16_t ${s.name}_length = ${buf.length};\n`;
chunk += `const uint8_t ${s.name}[] PROGMEM = {\n${result}\n};\n\n`;
return chunk;
}
throw new Error("Unknown method: " + s.method);
}
async function writeChunks(srcDir, specs, resultFile) {
let src = multiHeader;
for (const s of specs) {
console.info("Reading " + srcDir + "/" + s.file + " as " + s.name);
src += await specToChunk(srcDir, s);
}
console.info("Writing " + src.length + " characters into " + resultFile);
fs.writeFileSync(resultFile, src);
}
writeHtmlGzipped("wled00/data/index.htm", "wled00/html_ui.h");
// Check if a file is newer than a given time
function isFileNewerThan(filePath, time) {
const stats = fs.statSync(filePath);
return stats.mtimeMs > time;
}
// Check if any file in a folder (or its subfolders) is newer than a given time
function isAnyFileInFolderNewerThan(folderPath, time) {
const files = fs.readdirSync(folderPath, { withFileTypes: true });
for (const file of files) {
const filePath = path.join(folderPath, file.name);
if (isFileNewerThan(filePath, time)) {
return true;
}
if (file.isDirectory() && isAnyFileInFolderNewerThan(filePath, time)) {
return true;
}
}
return false;
}
// Check if the web UI is already built
function isAlreadyBuilt(webUIPath, packageJsonPath = "package.json") {
let lastBuildTime = Infinity;
for (const file of output) {
try {
lastBuildTime = Math.min(lastBuildTime, fs.statSync(file).mtimeMs);
} catch (e) {
if (e.code !== 'ENOENT') throw e;
console.info("File " + file + " does not exist. Rebuilding...");
return false;
}
}
return !isAnyFileInFolderNewerThan(webUIPath, lastBuildTime) && !isFileNewerThan(packageJsonPath, lastBuildTime) && !isFileNewerThan(__filename, lastBuildTime);
}
// Don't run this script if we're in a test environment
if (process.env.NODE_ENV === 'test') {
return;
}
console.info(wledBanner);
if (isAlreadyBuilt("wled00/data") && process.argv[2] !== '--force' && process.argv[2] !== '-f') {
console.info("Web UI is already built");
return;
}
writeHtmlGzipped("wled00/data/index.htm", "wled00/html_ui.h", 'index');
writeHtmlGzipped("wled00/data/pixart/pixart.htm", "wled00/html_pixart.h", 'pixart');
writeHtmlGzipped("wled00/data/cpal/cpal.htm", "wled00/html_cpal.h", 'cpal');
writeHtmlGzipped("wled00/data/pxmagic/pxmagic.htm", "wled00/html_pxmagic.h", 'pxmagic');
writeChunks(
"wled00/data",
@ -202,137 +253,84 @@ writeChunks(
{
file: "style.css",
name: "PAGE_settingsCss",
prepend: "=====(<style>",
append: "</style>)=====",
method: "plaintext",
method: "gzip",
filter: "css-minify",
mangle: (str) =>
str
.replace("%%", "%")
},
{
file: "common.js",
name: "JS_common",
method: "gzip",
filter: "js-minify",
},
{
file: "settings.htm",
name: "PAGE_settings",
prepend: "=====(",
append: ")=====",
method: "plaintext",
method: "gzip",
filter: "html-minify",
mangle: (str) =>
str
.replace("%", "%%")
.replace(/User Interface\<\/button\>\<\/form\>/gms, "User Interface\<\/button\>\<\/form\>%DMXMENU%"),
},
{
file: "settings_wifi.htm",
name: "PAGE_settings_wifi",
prepend: "=====(",
append: ")=====",
method: "plaintext",
method: "gzip",
filter: "html-minify",
mangle: (str) =>
str
.replace(/\<link rel="stylesheet".*\>/gms, "")
.replace(/\<style\>.*\<\/style\>/gms, "%CSS%%SCSS%")
.replace(
/function GetV().*\<\/script\>/gms,
"function GetV() {var d=document;\n"
),
},
{
file: "settings_leds.htm",
name: "PAGE_settings_leds",
prepend: "=====(",
append: ")=====",
method: "plaintext",
method: "gzip",
filter: "html-minify",
mangle: (str) =>
str
.replace(/\<link rel="stylesheet".*\>/gms, "")
.replace(/\<style\>.*\<\/style\>/gms, "%CSS%%SCSS%")
.replace(
/function GetV().*\<\/script\>/gms,
"function GetV() {var d=document;\n"
),
},
{
file: "settings_dmx.htm",
name: "PAGE_settings_dmx",
prepend: "=====(",
append: ")=====",
method: "plaintext",
method: "gzip",
filter: "html-minify",
mangle: (str) => {
const nocss = str
.replace(/\<link rel="stylesheet".*\>/gms, "")
.replace(/\<style\>.*\<\/style\>/gms, "%CSS%%SCSS%")
.replace(
/function GetV().*\<\/script\>/gms,
"function GetV() {var d=document;\n"
);
return `
#ifdef WLED_ENABLE_DMX
${nocss}
#else
const char PAGE_settings_dmx[] PROGMEM = R"=====()=====";
#endif
`;
},
},
{
file: "settings_ui.htm",
name: "PAGE_settings_ui",
prepend: "=====(",
append: ")=====",
method: "plaintext",
method: "gzip",
filter: "html-minify",
mangle: (str) =>
str
.replace(/\<link rel="stylesheet".*\>/gms, "")
.replace(/\<style\>.*\<\/style\>/gms, "%CSS%%SCSS%")
.replace(
/function GetV().*\<\/script\>/gms,
"function GetV() {var d=document;\n"
),
},
{
file: "settings_sync.htm",
name: "PAGE_settings_sync",
prepend: "=====(",
append: ")=====",
method: "plaintext",
method: "gzip",
filter: "html-minify",
mangle: (str) =>
str
.replace(/\<link rel="stylesheet".*\>/gms, "")
.replace(/\<style\>.*\<\/style\>/gms, "%CSS%%SCSS%")
.replace(/function GetV().*\<\/script\>/gms, "function GetV() {\n"),
},
{
file: "settings_time.htm",
name: "PAGE_settings_time",
prepend: "=====(",
append: ")=====",
method: "plaintext",
method: "gzip",
filter: "html-minify",
mangle: (str) =>
str
.replace(/\<link rel="stylesheet".*\>/gms, "")
.replace(/\<style\>.*\<\/style\>/gms, "%CSS%%SCSS%")
.replace(/function GetV().*\<\/script\>/gms, "function GetV() {\n"),
},
{
file: "settings_sec.htm",
name: "PAGE_settings_sec",
prepend: "=====(",
append: ")=====",
method: "plaintext",
method: "gzip",
filter: "html-minify",
mangle: (str) =>
str
.replace(/\<link rel="stylesheet".*\>/gms, "")
.replace(/\<style\>.*\<\/style\>/gms, "%CSS%%SCSS%")
.replace(
/function GetV().*\<\/script\>/gms,
"function GetV() {var d=document;\n"
),
},
{
file: "settings_um.htm",
name: "PAGE_settings_um",
method: "gzip",
filter: "html-minify",
},
{
file: "settings_2D.htm",
name: "PAGE_settings_2D",
method: "gzip",
filter: "html-minify",
},
{
file: "settings_pin.htm",
name: "PAGE_settings_pin",
method: "gzip",
filter: "html-minify"
}
],
"wled00/html_settings.h"
);
@ -343,9 +341,7 @@ writeChunks(
{
file: "usermod.htm",
name: "PAGE_usermod",
prepend: "=====(",
append: ")=====",
method: "plaintext",
method: "gzip",
filter: "html-minify",
mangle: (str) =>
str.replace(/fetch\("http\:\/\/.*\/win/gms, 'fetch("/win'),
@ -377,48 +373,44 @@ const char PAGE_dmxmap[] PROGMEM = R"=====()=====";
{
file: "update.htm",
name: "PAGE_update",
prepend: "=====(",
append: ")=====",
method: "plaintext",
method: "gzip",
filter: "html-minify",
mangle: (str) =>
str
.replace(
/function GetV().*\<\/script\>/gms,
"</script><script src=\"/settings/s.js?p=9\"></script>"
)
},
{
file: "welcome.htm",
name: "PAGE_welcome",
prepend: "=====(",
append: ")=====",
method: "plaintext",
method: "gzip",
filter: "html-minify",
},
{
file: "liveview.htm",
name: "PAGE_liveview",
prepend: "=====(",
append: ")=====",
method: "plaintext",
method: "gzip",
filter: "html-minify",
},
{
file: "liveviewws.htm",
name: "PAGE_liveviewws",
prepend: "=====(",
append: ")=====",
method: "plaintext",
file: "liveviewws2D.htm",
name: "PAGE_liveviewws2D",
method: "gzip",
filter: "html-minify",
},
{
file: "404.htm",
name: "PAGE_404",
prepend: "=====(",
append: ")=====",
method: "plaintext",
method: "gzip",
filter: "html-minify",
},
{
file: "favicon.ico",
name: "favicon",
method: "binary",
},
}
],
"wled00/html_other.h"
);

232
tools/fps_test.htm Normal file
View File

@ -0,0 +1,232 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>WLED frame rate test tool</title>
<style>
body {
background-color: #222;
color: #fff;
font-family: Helvetica, Verdana, sans-serif;
}
input {
background-color: #333;
color: #fff;
}
#ip {
width: 100px;
}
#secs {
width: 36px;
}
#csva {
position: absolute;
top: -100px; /*gtfo*/
}
button {
background-color: #333;
color: #fff;
}
table, th, td {
border: 1px solid #aaa;
border-collapse: collapse;
text-align: center;
}
.red {
color: #d20;
}
</style>
<script>
var gotfx = false, running = false;
var pos = 0, prev = 0, min = 999, max = 0, fpslist = [], names = [], names_checked = [];
var to;
function S() {
document.getElementById('ip').value = localStorage.getItem('locIpFps');
if (document.getElementById('ip').value) req(false);
}
function loadC() {
hide(false);
var list = localStorage.getItem('fpsFxSelection');
if (!list) return;
list = JSON.parse(list);
var chks = document.querySelectorAll('.fxcheck');
for (let i = 0; i < chks.length; i++) {
if (i < list.length) chks[i].checked = list[i];
}
}
function saveC() {
var list = [];
var chks = document.querySelectorAll('.fxcheck');
for (let i = 0; i < chks.length; i++) {
list.push(chks[i].checked);
}
localStorage.setItem('fpsFxSelection', JSON.stringify(list));
}
function setC(c) {
hide(false);
var chks = document.querySelectorAll('.fxcheck');
for (let i = 0; i < chks.length; i++) {
chks[i].checked = (c == 255);
}
if (c == 1 && chks.length > 100) {
chks[1].checked = true; //Blink
chks[15].checked = true; //Running
chks[16].checked = true; //Saw
chks[37].checked = true; //Running 2
chks[44].checked = true; //Tetrix
chks[63].checked = true; //Pride 2015
chks[74].checked = true; //Colortwinkles
chks[101].checked = true;//Pacifica
}
}
function hide(h) {
var trs = document.querySelectorAll('.trs');
var chks = document.querySelectorAll('.fxcheck');
for (let i = 0; i < trs.length; i++) {
trs[i].style.display = (h && !chks[i].checked) ? "none":"table-row";
}
}
function run(init) {
if (init) {
running = !running;
document.getElementById('runbtn').innerText = running ? 'Stop':'Run';
if (running) {pos = 0; prev = -1; min = 999; max = 0; fpslist = []; names_checked = []; hide(true);}
clearTimeout(to);
if (!running) {req({seg:{fx:0},v:true,stop:true}); return;}
}
if (!gotfx) {req(false); return;}
var chks = document.querySelectorAll('.fxcheck');
var fpsb = document.querySelectorAll('.fps');
if (prev >= 0) {pos++};
if (pos >= chks.length) {run(true); return;} //end
while (!chks[pos].checked) {
fpsb[pos].innerText = "-";
pos++;
if (pos >= chks.length) {run(true); return;} //end
}
names_checked.push(names[pos]);
var extra = {};
try {
extra = JSON.parse(document.getElementById('ej').value);
} catch (e) {
}
var cmd = {seg:{fx:pos},v:true};
Object.assign(cmd, extra);
req(cmd);
}
function req(command) {
var ip = document.getElementById('ip').value;
if (!ip) {alert("Please enter WLED IP"); return;}
if (ip != localStorage.getItem('locIpFps')) localStorage.setItem('locIpFps', document.getElementById('ip').value);
var url = command ? `http://${ip}/json/si` : `http://${ip}/json/effects`;
var type = command ? 'post':'get';
var req = undefined;
if (command)
{
req = JSON.stringify(command);
}
fetch
(url, {
method: type,
headers: {
"Content-type": "application/json; charset=UTF-8"
},
body: req
})
.then(res => {
if (!res.ok) {
alert('Data malfunction');
}
return res.json();
})
.then(json => {
if (!json) {
alert('Empty response'); return;
}
if (!command) {
names = json;
var tblc = '';
for (let i = 0; i < json.length; i++) {
tblc += `<tr class="trs"><td><input type="checkbox" class="fxcheck" /></td><td>${i}</td><td>${json[i]}</td><td class="fps"></td></tr>`
}
var tbl = `<table>
<tr>
<th>Test?</th><th>ID</th><th>Effect Name</th><th>FPS</th>
</tr>
${tblc}
</table>`;
document.getElementById('tablecon').innerHTML = tbl;
setC(1);
loadC();
gotfx = true;
document.getElementById('runbtn').innerText = "Run";
} else {
if (!json.info) return;
document.getElementById('leds').innerText = json.info.leds.count;
document.getElementById('seg').innerText = json.state.seg[0].len;
document.getElementById('bri').innerText = json.state.bri;
if (prev >= 0) {
var lastfps = parseInt(json.info.leds.fps); //previous FX
if (lastfps < min) min = lastfps;
if (lastfps > max) max = lastfps;
fpslist.push(lastfps);
var sum = 0;
for (let i = 0; i < fpslist.length; i++) {
sum += fpslist[i];
}
sum /= fpslist.length;
document.getElementById('fps_min').innerText = min;
document.getElementById('fps_max').innerText = max;
document.getElementById('fps_avg').innerText = Math.round(sum*10)/10;
var fpsb = document.querySelectorAll('.fps');
fpsb[prev].innerHTML = lastfps;
}
prev = pos;
var delay = parseInt(document.getElementById('secs').value)*1000;
delay = Math.min(Math.max(delay, 2000), 15000)
if (!command.stop) to = setTimeout(run,delay);
}
})
.catch(function (error) {
alert('Comms malfunction');
console.log(error);
});
}
function csv(n) {
var txt = "";
for (let i = 0; i < fpslist.length; i++) {
if (!n) txt += names_checked[i] + ',';
txt += fpslist[i]; txt += "\n";
}
document.getElementById('csva').value = txt;
var copyText = document.getElementById('csva');
copyText.select();
copyText.setSelectionRange(0, 999999);
document.execCommand("copy");
}
</script>
</head>
<body onload="S()">
<h2>Starship monitoring dashboard</h2>
(or rather just a WLED frame rate tester lol)<br><br>
IP: <input id="ip" /><br>
Time per effect: <input type=number id=secs value=5 max=15 min=2 />s<br>
Effects to test:
<button type="button" onclick="setC(255)">All</button>
<button type="button" onclick="setC(1)">Selection 1</button>
<button type="button" onclick="setC(0)">None</button>
<button type="button" onclick="loadC()">Get LS</button>
<button type="button" class="red" onclick="saveC()">Save to LS</button><br>
Extra JSON: <input id="ej" /><br>
<button type="button" onclick="run(true)" id="runbtn">Fetch FX list</button><br>
LEDs: <span id="leds">-</span>, Seg: <span id="seg">-</span>, Bri: <span id="bri">-</span><br>
FPS min: <span id="fps_min">-</span>, max: <span id="fps_max">-</span>, avg: <span id="fps_avg">-</span><br><br>
<div id="tablecon">
</div><br>
<button type="button" onclick="csv(false)">Copy csv to clipboard</button>
<button type="button" onclick="csv(true)">Copy csv (FPS only)</button>
<textarea id=csva></textarea>
</body>
</html>

16
tools/multi-update.cmd Normal file
View File

@ -0,0 +1,16 @@
@echo off
SETLOCAL
SET FWPATH=c:\path\to\your\WLED\build_output\firmware
GOTO ESPS
:UPDATEONE
IF NOT EXIST %FWPATH%\%2 GOTO SKIP
ping -w 1000 -n 1 %1 | find "TTL=" || GOTO SKIP
ECHO Updating %1
curl -s -F "update=@%FWPATH%/%2" %1/update >nul
:SKIP
GOTO:EOF
:ESPS
call :UPDATEONE 192.168.x.x firmware.bin
call :UPDATEONE ....

19
tools/multi-update.sh Normal file
View File

@ -0,0 +1,19 @@
#!/bin/bash
FWPATH=/path/to/your/WLED/build_output/firmware
update_one() {
if [ -f $FWPATH/$2 ]; then
ping -c 1 $1 >/dev/null
PINGRESULT=$?
if [ $PINGRESULT -eq 0 ]; then
echo Updating $1
curl -s -F "update=@${FWPATH}/$2" $1/update >/dev/null
return 0
fi
return 1
fi
}
update_one 192.168.x.x firmware.bin
update_one 192.168.x.x firmware.bin
# ...

38
tools/stress_test.sh Normal file
View File

@ -0,0 +1,38 @@
#!/bin/bash
# Some web server stress tests
#
# Perform a large number of parallel requests, stress testing the web server
# TODO: some kind of performance metrics
# Accepts three command line arguments:
# - first argument - mandatory - IP or hostname of target server
# - second argument - target type (optional)
# - third argument - xfer count (for replicated targets) (optional)
HOST=$1
declare -n TARGET_STR="${2:-JSON_LARGER}_TARGETS"
REPLICATE_COUNT=$(("${3:-10}"))
PARALLEL_MAX=${PARALLEL_MAX:-50}
CURL_ARGS="--compressed --parallel --parallel-immediate --parallel-max ${PARALLEL_MAX}"
CURL_PRINT_RESPONSE_ARGS="-w %{http_code}\n"
JSON_TARGETS=('json/state' 'json/info' 'json/si', 'json/palettes' 'json/fxdata' 'settings/s.js?p=2')
FILE_TARGETS=('' 'iro.js' 'rangetouch.js' 'settings' 'settings/wifi')
# Replicate one target many times
function replicate() {
printf "${1}?%d " $(seq 1 ${REPLICATE_COUNT})
}
read -a JSON_TINY_TARGETS <<< $(replicate "json/nodes")
read -a JSON_SMALL_TARGETS <<< $(replicate "json/info")
read -a JSON_LARGE_TARGETS <<< $(replicate "json/si")
read -a JSON_LARGER_TARGETS <<< $(replicate "json/fxdata")
read -a INDEX_TARGETS <<< $(replicate "")
# Expand target URLS to full arguments for curl
TARGETS=(${TARGET_STR[@]})
#echo "${TARGETS[@]}"
FULL_TGT_OPTIONS=$(printf "http://${HOST}/%s -o /dev/null " "${TARGETS[@]}")
#echo ${FULL_TGT_OPTIONS}
time curl ${CURL_ARGS} ${FULL_TGT_OPTIONS}

46
tools/udp_test.py Normal file
View File

@ -0,0 +1,46 @@
import numpy as np
import socket
class WledRealtimeClient:
def __init__(self, wled_controller_ip, num_pixels, udp_port=21324, max_pixels_per_packet=126):
self.wled_controller_ip = wled_controller_ip
self.num_pixels = num_pixels
self.udp_port = udp_port
self.max_pixels_per_packet = max_pixels_per_packet
self._sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
self._prev_pixels = np.full((3, self.num_pixels), 253, dtype=np.uint8)
self.pixels = np.full((3, self.num_pixels), 1, dtype=np.uint8)
def update(self):
# Truncate values and cast to integer
self.pixels = np.clip(self.pixels, 0, 255).astype(np.uint8)
p = np.copy(self.pixels)
idx = np.where(~np.all(p == self._prev_pixels, axis=0))[0]
num_pixels = len(idx)
n_packets = (num_pixels + self.max_pixels_per_packet - 1) // self.max_pixels_per_packet
idx_split = np.array_split(idx, n_packets)
header = bytes([1, 2]) # WARLS protocol header
for packet_indices in idx_split:
data = bytearray(header)
for i in packet_indices:
data.extend([i, *p[:, i]]) # Index and RGB values
self._sock.sendto(bytes(data), (self.wled_controller_ip, self.udp_port))
self._prev_pixels = np.copy(p)
################################## LED blink test ##################################
if __name__ == "__main__":
WLED_CONTROLLER_IP = "192.168.1.153"
NUM_PIXELS = 255 # Amount of LEDs on your strip
import time
wled = WledRealtimeClient(WLED_CONTROLLER_IP, NUM_PIXELS)
print('Starting LED blink test')
while True:
for i in range(NUM_PIXELS):
wled.pixels[1, i] = 255 if wled.pixels[1, i] == 0 else 0
wled.update()
time.sleep(.01)

View File

@ -0,0 +1,256 @@
#include "wled.h"
#include <Adafruit_ADS1X15.h>
#include <math.h>
#include "ChannelSettings.h"
using namespace ADS1115;
class ADS1115Usermod : public Usermod {
public:
void setup() {
ads.setGain(GAIN_ONE); // 1x gain +/- 4.096V
if (!ads.begin()) {
Serial.println("Failed to initialize ADS");
return;
}
if (!initChannel()) {
isInitialized = true;
return;
}
startReading();
isEnabled = true;
isInitialized = true;
}
void loop() {
if (isEnabled && millis() - lastTime > loopInterval) {
lastTime = millis();
// If we don't have new data, skip this iteration.
if (!ads.conversionComplete()) {
return;
}
updateResult();
moveToNextChannel();
startReading();
}
}
void addToJsonInfo(JsonObject& root)
{
if (!isEnabled) {
return;
}
JsonObject user = root[F("u")];
if (user.isNull()) user = root.createNestedObject(F("u"));
for (uint8_t i = 0; i < channelsCount; i++) {
ChannelSettings* settingsPtr = &(channelSettings[i]);
if (!settingsPtr->isEnabled) {
continue;
}
JsonArray lightArr = user.createNestedArray(settingsPtr->name); //name
float value = round((readings[i] + settingsPtr->offset) * settingsPtr->multiplier, settingsPtr->decimals);
lightArr.add(value); //value
lightArr.add(" " + settingsPtr->units); //unit
}
}
void addToConfig(JsonObject& root)
{
JsonObject top = root.createNestedObject(F("ADC ADS1115"));
for (uint8_t i = 0; i < channelsCount; i++) {
ChannelSettings* settingsPtr = &(channelSettings[i]);
JsonObject channel = top.createNestedObject(settingsPtr->settingName);
channel[F("Enabled")] = settingsPtr->isEnabled;
channel[F("Name")] = settingsPtr->name;
channel[F("Units")] = settingsPtr->units;
channel[F("Multiplier")] = settingsPtr->multiplier;
channel[F("Offset")] = settingsPtr->offset;
channel[F("Decimals")] = settingsPtr->decimals;
}
top[F("Loop Interval")] = loopInterval;
}
bool readFromConfig(JsonObject& root)
{
JsonObject top = root[F("ADC ADS1115")];
bool configComplete = !top.isNull();
bool hasEnabledChannels = false;
for (uint8_t i = 0; i < channelsCount && configComplete; i++) {
ChannelSettings* settingsPtr = &(channelSettings[i]);
JsonObject channel = top[settingsPtr->settingName];
configComplete &= !channel.isNull();
configComplete &= getJsonValue(channel[F("Enabled")], settingsPtr->isEnabled);
configComplete &= getJsonValue(channel[F("Name")], settingsPtr->name);
configComplete &= getJsonValue(channel[F("Units")], settingsPtr->units);
configComplete &= getJsonValue(channel[F("Multiplier")], settingsPtr->multiplier);
configComplete &= getJsonValue(channel[F("Offset")], settingsPtr->offset);
configComplete &= getJsonValue(channel[F("Decimals")], settingsPtr->decimals);
hasEnabledChannels |= settingsPtr->isEnabled;
}
configComplete &= getJsonValue(top[F("Loop Interval")], loopInterval);
isEnabled = isInitialized && configComplete && hasEnabledChannels;
return configComplete;
}
uint16_t getId()
{
return USERMOD_ID_ADS1115;
}
private:
static const uint8_t channelsCount = 8;
ChannelSettings channelSettings[channelsCount] = {
{
"Differential reading from AIN0 (P) and AIN1 (N)",
false,
"Differential AIN0 AIN1",
"V",
ADS1X15_REG_CONFIG_MUX_DIFF_0_1,
1,
0,
3
},
{
"Differential reading from AIN0 (P) and AIN3 (N)",
false,
"Differential AIN0 AIN3",
"V",
ADS1X15_REG_CONFIG_MUX_DIFF_0_3,
1,
0,
3
},
{
"Differential reading from AIN1 (P) and AIN3 (N)",
false,
"Differential AIN1 AIN3",
"V",
ADS1X15_REG_CONFIG_MUX_DIFF_1_3,
1,
0,
3
},
{
"Differential reading from AIN2 (P) and AIN3 (N)",
false,
"Differential AIN2 AIN3",
"V",
ADS1X15_REG_CONFIG_MUX_DIFF_2_3,
1,
0,
3
},
{
"Single-ended reading from AIN0",
false,
"Single-ended AIN0",
"V",
ADS1X15_REG_CONFIG_MUX_SINGLE_0,
1,
0,
3
},
{
"Single-ended reading from AIN1",
false,
"Single-ended AIN1",
"V",
ADS1X15_REG_CONFIG_MUX_SINGLE_1,
1,
0,
3
},
{
"Single-ended reading from AIN2",
false,
"Single-ended AIN2",
"V",
ADS1X15_REG_CONFIG_MUX_SINGLE_2,
1,
0,
3
},
{
"Single-ended reading from AIN3",
false,
"Single-ended AIN3",
"V",
ADS1X15_REG_CONFIG_MUX_SINGLE_3,
1,
0,
3
},
};
float readings[channelsCount] = {0, 0, 0, 0, 0, 0, 0, 0};
unsigned long loopInterval = 1000;
unsigned long lastTime = 0;
Adafruit_ADS1115 ads;
uint8_t activeChannel;
bool isEnabled = false;
bool isInitialized = false;
static float round(float value, uint8_t decimals) {
return roundf(value * powf(10, decimals)) / powf(10, decimals);
}
bool initChannel() {
for (uint8_t i = 0; i < channelsCount; i++) {
if (channelSettings[i].isEnabled) {
activeChannel = i;
return true;
}
}
activeChannel = 0;
return false;
}
void moveToNextChannel() {
uint8_t oldActiveChannel = activeChannel;
do
{
if (++activeChannel >= channelsCount){
activeChannel = 0;
}
}
while (!channelSettings[activeChannel].isEnabled && oldActiveChannel != activeChannel);
}
void startReading() {
ads.startADCReading(channelSettings[activeChannel].mux, /*continuous=*/false);
}
void updateResult() {
int16_t results = ads.getLastConversionResults();
readings[activeChannel] = ads.computeVolts(results);
}
};
static ADS1115Usermod ads1115_v2;
REGISTER_USERMOD(ads1115_v2);

View File

@ -0,0 +1,15 @@
#include "wled.h"
namespace ADS1115
{
struct ChannelSettings {
const String settingName;
bool isEnabled;
String name;
String units;
const uint16_t mux;
float multiplier;
float offset;
uint8_t decimals;
};
}

View File

@ -0,0 +1,7 @@
{
"name:": "ADS1115_v2",
"dependencies": {
"Adafruit BusIO": "https://github.com/adafruit/Adafruit_BusIO#1.13.2",
"Adafruit ADS1X15": "https://github.com/adafruit/Adafruit_ADS1X15#2.4.0"
}
}

View File

@ -0,0 +1,10 @@
# ADS1115 16-Bit ADC with four inputs
This usermod will read from an ADS1115 ADC. The voltages are displayed in the Info section of the web UI.
Configuration is performed via the Usermod menu. There are no parameters to set in code!
## Installation
Add 'ADS1115' to `custom_usermods` in your platformio environment.

View File

@ -0,0 +1,328 @@
#include "wled.h"
#include <AHT10.h>
#define AHT10_SUCCESS 1
class UsermodAHT10 : public Usermod
{
private:
static const char _name[];
unsigned long _lastLoopCheck = 0;
bool _settingEnabled : 1; // Enable the usermod
bool _mqttPublish : 1; // Publish mqtt values
bool _mqttPublishAlways : 1; // Publish always, regardless if there is a change
bool _mqttHomeAssistant : 1; // Enable Home Assistant docs
bool _initDone : 1; // Initialization is done
// Settings. Some of these are stored in a different format than they're user settings - so we don't have to convert at runtime
uint8_t _i2cAddress = AHT10_ADDRESS_0X38;
ASAIR_I2C_SENSOR _ahtType = AHT10_SENSOR;
uint16_t _checkInterval = 60000; // milliseconds, user settings is in seconds
float _decimalFactor = 100; // a power of 10 factor. 1 would be no change, 10 is one decimal, 100 is two etc. User sees a power of 10 (0, 1, 2, ..)
uint8_t _lastStatus = 0;
float _lastHumidity = 0;
float _lastTemperature = 0;
#ifndef WLED_MQTT_DISABLE
float _lastHumiditySent = 0;
float _lastTemperatureSent = 0;
#endif
AHT10 *_aht = nullptr;
float truncateDecimals(float val)
{
return roundf(val * _decimalFactor) / _decimalFactor;
}
void initializeAht()
{
if (_aht != nullptr)
{
delete _aht;
}
_aht = new AHT10(_i2cAddress, _ahtType);
_lastStatus = 0;
_lastHumidity = 0;
_lastTemperature = 0;
}
#ifndef WLED_DISABLE_MQTT
void mqttInitialize()
{
// This is a generic "setup mqtt" function, So we must abort if we're not to do mqtt
if (!WLED_MQTT_CONNECTED || !_mqttPublish || !_mqttHomeAssistant)
return;
char topic[128];
snprintf_P(topic, 127, "%s/temperature", mqttDeviceTopic);
mqttCreateHassSensor(F("Temperature"), topic, F("temperature"), F("°C"));
snprintf_P(topic, 127, "%s/humidity", mqttDeviceTopic);
mqttCreateHassSensor(F("Humidity"), topic, F("humidity"), F("%"));
}
void mqttPublishIfChanged(const __FlashStringHelper *topic, float &lastState, float state, float minChange)
{
// Check if MQTT Connected, otherwise it will crash the 8266
// Only report if the change is larger than the required diff
if (WLED_MQTT_CONNECTED && _mqttPublish && (_mqttPublishAlways || fabsf(lastState - state) > minChange))
{
char subuf[128];
snprintf_P(subuf, 127, PSTR("%s/%s"), mqttDeviceTopic, (const char *)topic);
mqtt->publish(subuf, 0, false, String(state).c_str());
lastState = state;
}
}
// Create an MQTT Sensor for Home Assistant Discovery purposes, this includes a pointer to the topic that is published to in the Loop.
void mqttCreateHassSensor(const String &name, const String &topic, const String &deviceClass, const String &unitOfMeasurement)
{
String t = String(F("homeassistant/sensor/")) + mqttClientID + "/" + name + F("/config");
StaticJsonDocument<600> doc;
doc[F("name")] = name;
doc[F("state_topic")] = topic;
doc[F("unique_id")] = String(mqttClientID) + name;
if (unitOfMeasurement != "")
doc[F("unit_of_measurement")] = unitOfMeasurement;
if (deviceClass != "")
doc[F("device_class")] = deviceClass;
doc[F("expire_after")] = 1800;
JsonObject device = doc.createNestedObject(F("device")); // attach the sensor to the same device
device[F("name")] = serverDescription;
device[F("identifiers")] = "wled-sensor-" + String(mqttClientID);
device[F("manufacturer")] = F(WLED_BRAND);
device[F("model")] = F(WLED_PRODUCT_NAME);
device[F("sw_version")] = versionString;
String temp;
serializeJson(doc, temp);
DEBUG_PRINTLN(t);
DEBUG_PRINTLN(temp);
mqtt->publish(t.c_str(), 0, true, temp.c_str());
}
#endif
public:
void setup()
{
initializeAht();
}
void loop()
{
// if usermod is disabled or called during strip updating just exit
// NOTE: on very long strips strip.isUpdating() may always return true so update accordingly
if (!_settingEnabled || strip.isUpdating())
return;
// do your magic here
unsigned long currentTime = millis();
if (currentTime - _lastLoopCheck < _checkInterval)
return;
_lastLoopCheck = currentTime;
_lastStatus = _aht->readRawData();
if (_lastStatus == AHT10_ERROR)
{
// Perform softReset and retry
DEBUG_PRINTLN(F("AHTxx returned error, doing softReset"));
if (!_aht->softReset())
{
DEBUG_PRINTLN(F("softReset failed"));
return;
}
_lastStatus = _aht->readRawData();
}
if (_lastStatus == AHT10_SUCCESS)
{
float temperature = truncateDecimals(_aht->readTemperature(AHT10_USE_READ_DATA));
float humidity = truncateDecimals(_aht->readHumidity(AHT10_USE_READ_DATA));
#ifndef WLED_DISABLE_MQTT
// Push to MQTT
// We can avoid reporting if the change is insignificant. The threshold chosen is below the level of accuracy, but way above 0.01 which is the precision of the value provided.
// The AHT10/15/20 has an accuracy of 0.3C in the temperature readings
mqttPublishIfChanged(F("temperature"), _lastTemperatureSent, temperature, 0.1f);
// The AHT10/15/20 has an accuracy in the humidity sensor of 2%
mqttPublishIfChanged(F("humidity"), _lastHumiditySent, humidity, 0.5f);
#endif
// Store
_lastTemperature = temperature;
_lastHumidity = humidity;
}
}
#ifndef WLED_DISABLE_MQTT
void onMqttConnect(bool sessionPresent)
{
mqttInitialize();
}
#endif
uint16_t getId()
{
return USERMOD_ID_AHT10;
}
void addToJsonInfo(JsonObject &root) override
{
// if "u" object does not exist yet wee need to create it
JsonObject user = root["u"];
if (user.isNull())
user = root.createNestedObject("u");
#ifdef USERMOD_AHT10_DEBUG
JsonArray temp = user.createNestedArray(F("AHT last loop"));
temp.add(_lastLoopCheck);
temp = user.createNestedArray(F("AHT last status"));
temp.add(_lastStatus);
#endif
JsonArray jsonTemp = user.createNestedArray(F("Temperature"));
JsonArray jsonHumidity = user.createNestedArray(F("Humidity"));
if (_lastLoopCheck == 0)
{
// Before first run
jsonTemp.add(F("Not read yet"));
jsonHumidity.add(F("Not read yet"));
return;
}
if (_lastStatus != AHT10_SUCCESS)
{
jsonTemp.add(F("An error occurred"));
jsonHumidity.add(F("An error occurred"));
return;
}
jsonTemp.add(_lastTemperature);
jsonTemp.add(F("°C"));
jsonHumidity.add(_lastHumidity);
jsonHumidity.add(F("%"));
}
void addToConfig(JsonObject &root)
{
JsonObject top = root.createNestedObject(FPSTR(_name));
top[F("Enabled")] = _settingEnabled;
top[F("I2CAddress")] = static_cast<uint8_t>(_i2cAddress);
top[F("SensorType")] = _ahtType;
top[F("CheckInterval")] = _checkInterval / 1000;
top[F("Decimals")] = log10f(_decimalFactor);
#ifndef WLED_DISABLE_MQTT
top[F("MqttPublish")] = _mqttPublish;
top[F("MqttPublishAlways")] = _mqttPublishAlways;
top[F("MqttHomeAssistantDiscovery")] = _mqttHomeAssistant;
#endif
DEBUG_PRINTLN(F("AHT10 config saved."));
}
bool readFromConfig(JsonObject &root) override
{
// default settings values could be set here (or below using the 3-argument getJsonValue()) instead of in the class definition or constructor
// setting them inside readFromConfig() is slightly more robust, handling the rare but plausible use case of single value being missing after boot (e.g. if the cfg.json was manually edited and a value was removed)
JsonObject top = root[FPSTR(_name)];
bool configComplete = !top.isNull();
if (!configComplete)
return false;
bool tmpBool = false;
configComplete &= getJsonValue(top[F("Enabled")], tmpBool);
if (configComplete)
_settingEnabled = tmpBool;
configComplete &= getJsonValue(top[F("I2CAddress")], _i2cAddress);
configComplete &= getJsonValue(top[F("CheckInterval")], _checkInterval);
if (configComplete)
{
if (1 <= _checkInterval && _checkInterval <= 600)
_checkInterval *= 1000;
else
// Invalid input
_checkInterval = 60000;
}
configComplete &= getJsonValue(top[F("Decimals")], _decimalFactor);
if (configComplete)
{
if (0 <= _decimalFactor && _decimalFactor <= 5)
_decimalFactor = pow10f(_decimalFactor);
else
// Invalid input
_decimalFactor = 100;
}
uint8_t tmpAhtType;
configComplete &= getJsonValue(top[F("SensorType")], tmpAhtType);
if (configComplete)
{
if (0 <= tmpAhtType && tmpAhtType <= 2)
_ahtType = static_cast<ASAIR_I2C_SENSOR>(tmpAhtType);
else
// Invalid input
_ahtType = ASAIR_I2C_SENSOR::AHT10_SENSOR;
}
#ifndef WLED_DISABLE_MQTT
configComplete &= getJsonValue(top[F("MqttPublish")], tmpBool);
if (configComplete)
_mqttPublish = tmpBool;
configComplete &= getJsonValue(top[F("MqttPublishAlways")], tmpBool);
if (configComplete)
_mqttPublishAlways = tmpBool;
configComplete &= getJsonValue(top[F("MqttHomeAssistantDiscovery")], tmpBool);
if (configComplete)
_mqttHomeAssistant = tmpBool;
#endif
if (_initDone)
{
// Reloading config
initializeAht();
#ifndef WLED_DISABLE_MQTT
mqttInitialize();
#endif
}
_initDone = true;
return configComplete;
}
~UsermodAHT10()
{
delete _aht;
_aht = nullptr;
}
};
const char UsermodAHT10::_name[] PROGMEM = "AHTxx";
static UsermodAHT10 aht10_v2;
REGISTER_USERMOD(aht10_v2);

View File

@ -0,0 +1,30 @@
# Usermod AHT10
This Usermod is designed to read a `AHT10`, `AHT15` or `AHT20` sensor and output the following:
- Temperature
- Humidity
Configuration is performed via the Usermod menu. The following settings can be configured in the Usermod Menu:
- I2CAddress: The i2c address in decimal. Set it to either 56 (0x38, the default) or 57 (0x39).
- SensorType, one of:
- 0 - AHT10
- 1 - AHT15
- 2 - AHT20
- CheckInterval: Number of seconds between readings
- Decimals: Number of decimals to put in the output
Dependencies, These must be added under `lib_deps` in your `platform.ini` (or `platform_override.ini`).
- Libraries
- `enjoyneering/AHT10@~1.1.0` (by [enjoyneering](https://registry.platformio.org/libraries/enjoyneering/AHT10))
- `Wire`
## Author
[@LordMike](https://github.com/LordMike)
# Compiling
To enable, add 'AHT10' to `custom_usermods` in your platformio encrionment (e.g. in `platformio_override.ini`)
```ini
[env:aht10_example]
extends = env:esp32dev
custom_usermods = ${env:esp32dev.custom_usermods} AHT10
```

View File

@ -0,0 +1,6 @@
{
"name:": "AHT10_v2",
"dependencies": {
"enjoyneering/AHT10":"~1.1.0"
}
}

View File

@ -0,0 +1,5 @@
[env:aht10_example]
extends = env:esp32dev
build_flags =
${common.build_flags} ${esp32.build_flags}
; -D USERMOD_AHT10_DEBUG ; -- add a debug status to the info modal

View File

@ -0,0 +1,259 @@
#include "wled.h"
/*
* Usermod for analog clock
*/
extern Timezone* tz;
class AnalogClockUsermod : public Usermod {
private:
static constexpr uint32_t refreshRate = 50; // per second
static constexpr uint32_t refreshDelay = 1000 / refreshRate;
struct Segment {
// config
int16_t firstLed = 0;
int16_t lastLed = 59;
int16_t centerLed = 0;
// runtime
int16_t size;
Segment() {
update();
}
void validateAndUpdate() {
if (firstLed < 0 || firstLed >= strip.getLengthTotal() ||
lastLed < firstLed || lastLed >= strip.getLengthTotal()) {
*this = {};
return;
}
if (centerLed < firstLed || centerLed > lastLed) {
centerLed = firstLed;
}
update();
}
void update() {
size = lastLed - firstLed + 1;
}
};
// configuration (available in API and stored in flash)
bool enabled = false;
Segment mainSegment;
bool hourMarksEnabled = true;
uint32_t hourMarkColor = 0xFF0000;
uint32_t hourColor = 0x0000FF;
uint32_t minuteColor = 0x00FF00;
bool secondsEnabled = true;
Segment secondsSegment;
uint32_t secondColor = 0xFF0000;
bool blendColors = true;
uint16_t secondsEffect = 0;
// runtime
bool initDone = false;
uint32_t lastOverlayDraw = 0;
void validateAndUpdate() {
mainSegment.validateAndUpdate();
secondsSegment.validateAndUpdate();
if (secondsEffect < 0 || secondsEffect > 1) {
secondsEffect = 0;
}
}
int16_t adjustToSegment(double progress, Segment const& segment) {
int16_t led = segment.centerLed + progress * segment.size;
return led > segment.lastLed
? segment.firstLed + led - segment.lastLed - 1
: led;
}
void setPixelColor(uint16_t n, uint32_t c) {
if (!blendColors) {
strip.setPixelColor(n, c);
} else {
uint32_t oldC = strip.getPixelColor(n);
strip.setPixelColor(n, qadd32(oldC, c));
}
}
String colorToHexString(uint32_t c) {
char buffer[9];
sprintf(buffer, "%06X", c);
return buffer;
}
bool hexStringToColor(String const& s, uint32_t& c, uint32_t def) {
char *ep;
unsigned long long r = strtoull(s.c_str(), &ep, 16);
if (*ep == 0) {
c = r;
return true;
} else {
c = def;
return false;
}
}
void secondsEffectSineFade(int16_t secondLed, Toki::Time const& time) {
uint32_t ms = time.ms % 1000;
uint8_t b0 = (cos8_t(ms * 64 / 1000) - 128) * 2;
setPixelColor(secondLed, gamma32(scale32(secondColor, b0)));
uint8_t b1 = (sin8_t(ms * 64 / 1000) - 128) * 2;
setPixelColor(inc(secondLed, 1, secondsSegment), gamma32(scale32(secondColor, b1)));
}
static inline uint32_t qadd32(uint32_t c1, uint32_t c2) {
return RGBW32(
qadd8(R(c1), R(c2)),
qadd8(G(c1), G(c2)),
qadd8(B(c1), B(c2)),
qadd8(W(c1), W(c2))
);
}
static inline uint32_t scale32(uint32_t c, fract8 scale) {
return RGBW32(
scale8(R(c), scale),
scale8(G(c), scale),
scale8(B(c), scale),
scale8(W(c), scale)
);
}
static inline int16_t dec(int16_t n, int16_t i, Segment const& seg) {
return n - seg.firstLed >= i
? n - i
: seg.lastLed - seg.firstLed - i + n + 1;
}
static inline int16_t inc(int16_t n, int16_t i, Segment const& seg) {
int16_t r = n + i;
if (r > seg.lastLed) {
return seg.firstLed + n - seg.lastLed;
}
return r;
}
public:
AnalogClockUsermod() {
}
void setup() override {
initDone = true;
validateAndUpdate();
}
void loop() override {
if (millis() - lastOverlayDraw > refreshDelay) {
strip.trigger();
}
}
void handleOverlayDraw() override {
if (!enabled) {
return;
}
lastOverlayDraw = millis();
auto time = toki.getTime();
double secondP = second(localTime) / 60.0;
double minuteP = minute(localTime) / 60.0;
double hourP = (hour(localTime) % 12) / 12.0 + minuteP / 12.0;
if (hourMarksEnabled) {
for (int Led = 0; Led <= 55; Led = Led + 5)
{
int16_t hourmarkled = adjustToSegment(Led / 60.0, mainSegment);
setPixelColor(hourmarkled, hourMarkColor);
}
}
if (secondsEnabled) {
int16_t secondLed = adjustToSegment(secondP, secondsSegment);
switch (secondsEffect) {
case 0: // no effect
setPixelColor(secondLed, secondColor);
break;
case 1: // fading seconds
secondsEffectSineFade(secondLed, time);
break;
}
// TODO: move to secondsTrailEffect
// for (uint16_t i = 1; i < secondsTrail + 1; ++i) {
// uint16_t trailLed = dec(secondLed, i, secondsSegment);
// uint8_t trailBright = 255 / (secondsTrail + 1) * (secondsTrail - i + 1);
// setPixelColor(trailLed, gamma32(scale32(secondColor, trailBright)));
// }
}
setPixelColor(adjustToSegment(minuteP, mainSegment), minuteColor);
setPixelColor(adjustToSegment(hourP, mainSegment), hourColor);
}
void addToConfig(JsonObject& root) override {
validateAndUpdate();
JsonObject top = root.createNestedObject(F("Analog Clock"));
top[F("Overlay Enabled")] = enabled;
top[F("First LED (Main Ring)")] = mainSegment.firstLed;
top[F("Last LED (Main Ring)")] = mainSegment.lastLed;
top[F("Center/12h LED (Main Ring)")] = mainSegment.centerLed;
top[F("Hour Marks Enabled")] = hourMarksEnabled;
top[F("Hour Mark Color (RRGGBB)")] = colorToHexString(hourMarkColor);
top[F("Hour Color (RRGGBB)")] = colorToHexString(hourColor);
top[F("Minute Color (RRGGBB)")] = colorToHexString(minuteColor);
top[F("Show Seconds")] = secondsEnabled;
top[F("First LED (Seconds Ring)")] = secondsSegment.firstLed;
top[F("Last LED (Seconds Ring)")] = secondsSegment.lastLed;
top[F("Center/12h LED (Seconds Ring)")] = secondsSegment.centerLed;
top[F("Second Color (RRGGBB)")] = colorToHexString(secondColor);
top[F("Seconds Effect (0-1)")] = secondsEffect;
top[F("Blend Colors")] = blendColors;
}
bool readFromConfig(JsonObject& root) override {
JsonObject top = root[F("Analog Clock")];
bool configComplete = !top.isNull();
String color;
configComplete &= getJsonValue(top[F("Overlay Enabled")], enabled, false);
configComplete &= getJsonValue(top[F("First LED (Main Ring)")], mainSegment.firstLed, 0);
configComplete &= getJsonValue(top[F("Last LED (Main Ring)")], mainSegment.lastLed, 59);
configComplete &= getJsonValue(top[F("Center/12h LED (Main Ring)")], mainSegment.centerLed, 0);
configComplete &= getJsonValue(top[F("Hour Marks Enabled")], hourMarksEnabled, false);
configComplete &= getJsonValue(top[F("Hour Mark Color (RRGGBB)")], color, F("161616")) && hexStringToColor(color, hourMarkColor, 0x161616);
configComplete &= getJsonValue(top[F("Hour Color (RRGGBB)")], color, F("0000FF")) && hexStringToColor(color, hourColor, 0x0000FF);
configComplete &= getJsonValue(top[F("Minute Color (RRGGBB)")], color, F("00FF00")) && hexStringToColor(color, minuteColor, 0x00FF00);
configComplete &= getJsonValue(top[F("Show Seconds")], secondsEnabled, true);
configComplete &= getJsonValue(top[F("First LED (Seconds Ring)")], secondsSegment.firstLed, 0);
configComplete &= getJsonValue(top[F("Last LED (Seconds Ring)")], secondsSegment.lastLed, 59);
configComplete &= getJsonValue(top[F("Center/12h LED (Seconds Ring)")], secondsSegment.centerLed, 0);
configComplete &= getJsonValue(top[F("Second Color (RRGGBB)")], color, F("FF0000")) && hexStringToColor(color, secondColor, 0xFF0000);
configComplete &= getJsonValue(top[F("Seconds Effect (0-1)")], secondsEffect, 0);
configComplete &= getJsonValue(top[F("Blend Colors")], blendColors, true);
if (initDone) {
validateAndUpdate();
}
return configComplete;
}
uint16_t getId() override {
return USERMOD_ID_ANALOG_CLOCK;
}
};
static AnalogClockUsermod analog_clock;
REGISTER_USERMOD(analog_clock);

View File

@ -0,0 +1,3 @@
{
"name:": "Analog_Clock"
}

View File

@ -0,0 +1,567 @@
/*
* Usermod for detecting people entering/leaving a staircase and switching the
* staircase on/off.
*
* Edit the Animated_Staircase_config.h file to compile this usermod for your
* specific configuration.
*
* See the accompanying README.md file for more info.
*/
#include "wled.h"
class Animated_Staircase : public Usermod {
private:
/* configuration (available in API and stored in flash) */
bool enabled = false; // Enable this usermod
unsigned long segment_delay_ms = 150; // Time between switching each segment
unsigned long on_time_ms = 30000; // The time for the light to stay on
int8_t topPIRorTriggerPin = -1; // disabled
int8_t bottomPIRorTriggerPin = -1; // disabled
int8_t topEchoPin = -1; // disabled
int8_t bottomEchoPin = -1; // disabled
bool useUSSensorTop = false; // using PIR or UltraSound sensor?
bool useUSSensorBottom = false; // using PIR or UltraSound sensor?
unsigned int topMaxDist = 50; // default maximum measured distance in cm, top
unsigned int bottomMaxDist = 50; // default maximum measured distance in cm, bottom
bool togglePower = false; // toggle power on/off with staircase on/off
/* runtime variables */
bool initDone = false;
// Time between checking of the sensors
const unsigned int scanDelay = 100;
// Lights on or off.
// Flipping this will start a transition.
bool on = false;
// Swipe direction for current transition
#define SWIPE_UP true
#define SWIPE_DOWN false
bool swipe = SWIPE_UP;
// Indicates which Sensor was seen last (to determine
// the direction when swiping off)
#define LOWER false
#define UPPER true
bool lastSensor = LOWER;
// Time of the last transition action
unsigned long lastTime = 0;
// Time of the last sensor check
unsigned long lastScanTime = 0;
// Last time the lights were switched on or off
unsigned long lastSwitchTime = 0;
// segment id between onIndex and offIndex are on.
// controll the swipe by setting/moving these indices around.
// onIndex must be less than or equal to offIndex
byte onIndex = 0;
byte offIndex = 0;
// The maximum number of configured segments.
// Dynamically updated based on user configuration.
byte maxSegmentId = 1;
byte minSegmentId = 0;
// These values are used by the API to read the
// last sensor state, or trigger a sensor
// through the API
bool topSensorRead = false;
bool topSensorWrite = false;
bool bottomSensorRead = false;
bool bottomSensorWrite = false;
bool topSensorState = false;
bool bottomSensorState = false;
// strings to reduce flash memory usage (used more than twice)
static const char _name[];
static const char _enabled[];
static const char _segmentDelay[];
static const char _onTime[];
static const char _useTopUltrasoundSensor[];
static const char _topPIRorTrigger_pin[];
static const char _topEcho_pin[];
static const char _useBottomUltrasoundSensor[];
static const char _bottomPIRorTrigger_pin[];
static const char _bottomEcho_pin[];
static const char _topEchoCm[];
static const char _bottomEchoCm[];
static const char _togglePower[];
void publishMqtt(bool bottom, const char* state) {
#ifndef WLED_DISABLE_MQTT
//Check if MQTT Connected, otherwise it will crash the 8266
if (WLED_MQTT_CONNECTED){
char subuf[64];
sprintf_P(subuf, PSTR("%s/motion/%d"), mqttDeviceTopic, (int)bottom);
mqtt->publish(subuf, 0, false, state);
}
#endif
}
void updateSegments() {
for (int i = minSegmentId; i < maxSegmentId; i++) {
Segment &seg = strip.getSegment(i);
if (!seg.isActive()) continue; // skip gaps
if (i >= onIndex && i < offIndex) {
seg.setOption(SEG_OPTION_ON, true);
// We may need to copy mode and colors from segment 0 to make sure
// changes are propagated even when the config is changed during a wipe
// seg.setMode(mainsegment.mode);
// seg.setColor(0, mainsegment.colors[0]);
} else {
seg.setOption(SEG_OPTION_ON, false);
}
// Always mark segments as "transitional", we are animating the staircase
//seg.setOption(SEG_OPTION_TRANSITIONAL, true); // not needed anymore as setOption() does it
}
strip.trigger(); // force strip refresh
stateChanged = true; // inform external devices/UI of change
colorUpdated(CALL_MODE_DIRECT_CHANGE);
}
/*
* Detects if an object is within ultrasound range.
* signalPin: The pin where the pulse is sent
* echoPin: The pin where the echo is received
* maxTimeUs: Detection timeout in microseconds. If an echo is
* received within this time, an object is detected
* and the function will return true.
*
* The speed of sound is 343 meters per second at 20 degrees Celsius.
* Since the sound has to travel back and forth, the detection
* distance for the sensor in cm is (0.0343 * maxTimeUs) / 2.
*
* For practical reasons, here are some useful distances:
*
* Distance = maxtime
* 5 cm = 292 uS
* 10 cm = 583 uS
* 20 cm = 1166 uS
* 30 cm = 1749 uS
* 50 cm = 2915 uS
* 100 cm = 5831 uS
*/
bool ultrasoundRead(int8_t signalPin, int8_t echoPin, unsigned int maxTimeUs) {
if (signalPin<0 || echoPin<0) return false;
digitalWrite(signalPin, LOW);
delayMicroseconds(2);
digitalWrite(signalPin, HIGH);
delayMicroseconds(10);
digitalWrite(signalPin, LOW);
return pulseIn(echoPin, HIGH, maxTimeUs) > 0;
}
bool checkSensors() {
bool sensorChanged = false;
if ((millis() - lastScanTime) > scanDelay) {
lastScanTime = millis();
bottomSensorRead = bottomSensorWrite ||
(!useUSSensorBottom ?
(bottomPIRorTriggerPin<0 ? false : digitalRead(bottomPIRorTriggerPin)) :
ultrasoundRead(bottomPIRorTriggerPin, bottomEchoPin, bottomMaxDist*59) // cm to us
);
topSensorRead = topSensorWrite ||
(!useUSSensorTop ?
(topPIRorTriggerPin<0 ? false : digitalRead(topPIRorTriggerPin)) :
ultrasoundRead(topPIRorTriggerPin, topEchoPin, topMaxDist*59) // cm to us
);
if (bottomSensorRead != bottomSensorState) {
bottomSensorState = bottomSensorRead; // change previous state
sensorChanged = true;
publishMqtt(true, bottomSensorState ? "on" : "off");
DEBUG_PRINTLN(F("Bottom sensor changed."));
}
if (topSensorRead != topSensorState) {
topSensorState = topSensorRead; // change previous state
sensorChanged = true;
publishMqtt(false, topSensorState ? "on" : "off");
DEBUG_PRINTLN(F("Top sensor changed."));
}
// Values read, reset the flags for next API call
topSensorWrite = false;
bottomSensorWrite = false;
if (topSensorRead != bottomSensorRead) {
lastSwitchTime = millis();
if (on) {
lastSensor = topSensorRead;
} else {
if (togglePower && onIndex == offIndex && offMode) toggleOnOff(); // toggle power on if off
// If the bottom sensor triggered, we need to swipe up, ON
swipe = bottomSensorRead;
DEBUG_PRINT(F("ON -> Swipe "));
DEBUG_PRINTLN(swipe ? F("up.") : F("down."));
if (onIndex == offIndex) {
// Position the indices for a correct on-swipe
if (swipe == SWIPE_UP) {
onIndex = minSegmentId;
} else {
onIndex = maxSegmentId;
}
offIndex = onIndex;
}
on = true;
}
}
}
return sensorChanged;
}
void autoPowerOff() {
if ((millis() - lastSwitchTime) > on_time_ms) {
// if sensors are still on, do nothing
if (bottomSensorState || topSensorState) return;
// Swipe OFF in the direction of the last sensor detection
swipe = lastSensor;
on = false;
DEBUG_PRINT(F("OFF -> Swipe "));
DEBUG_PRINTLN(swipe ? F("up.") : F("down."));
}
}
void updateSwipe() {
if ((millis() - lastTime) > segment_delay_ms) {
lastTime = millis();
byte oldOn = onIndex;
byte oldOff = offIndex;
if (on) {
// Turn on all segments
onIndex = MAX(minSegmentId, onIndex - 1);
offIndex = MIN(maxSegmentId, offIndex + 1);
} else {
if (swipe == SWIPE_UP) {
onIndex = MIN(offIndex, onIndex + 1);
} else {
offIndex = MAX(onIndex, offIndex - 1);
}
}
if (oldOn != onIndex || oldOff != offIndex) {
updateSegments(); // reduce the number of updates to necessary ones
if (togglePower && onIndex == offIndex && !offMode && !on) toggleOnOff(); // toggle power off for all segments off
}
}
}
// send sensor values to JSON API
void writeSensorsToJson(JsonObject& staircase) {
staircase[F("top-sensor")] = topSensorRead;
staircase[F("bottom-sensor")] = bottomSensorRead;
}
// allow overrides from JSON API
void readSensorsFromJson(JsonObject& staircase) {
bottomSensorWrite = bottomSensorState || (staircase[F("bottom-sensor")].as<bool>());
topSensorWrite = topSensorState || (staircase[F("top-sensor")].as<bool>());
}
void enable(bool enable) {
if (enable) {
DEBUG_PRINTLN(F("Animated Staircase enabled."));
DEBUG_PRINT(F("Delay between steps: "));
DEBUG_PRINT(segment_delay_ms);
DEBUG_PRINT(F(" milliseconds.\nStairs switch off after: "));
DEBUG_PRINT(on_time_ms / 1000);
DEBUG_PRINTLN(F(" seconds."));
if (!useUSSensorBottom)
pinMode(bottomPIRorTriggerPin, INPUT_PULLUP);
else {
pinMode(bottomPIRorTriggerPin, OUTPUT);
pinMode(bottomEchoPin, INPUT);
}
if (!useUSSensorTop)
pinMode(topPIRorTriggerPin, INPUT_PULLUP);
else {
pinMode(topPIRorTriggerPin, OUTPUT);
pinMode(topEchoPin, INPUT);
}
onIndex = minSegmentId = strip.getMainSegmentId(); // it may not be the best idea to start with main segment as it may not be the first one
offIndex = maxSegmentId = strip.getLastActiveSegmentId() + 1;
// shorten the strip transition time to be equal or shorter than segment delay
transitionDelay = segment_delay_ms;
strip.setTransition(segment_delay_ms);
strip.trigger();
} else {
if (togglePower && !on && offMode) toggleOnOff(); // toggle power on if off
// Restore segment options
for (int i = 0; i <= strip.getLastActiveSegmentId(); i++) {
Segment &seg = strip.getSegment(i);
if (!seg.isActive()) continue; // skip vector gaps
seg.setOption(SEG_OPTION_ON, true);
}
strip.trigger(); // force strip update
stateChanged = true; // inform external devices/UI of change
colorUpdated(CALL_MODE_DIRECT_CHANGE);
DEBUG_PRINTLN(F("Animated Staircase disabled."));
}
enabled = enable;
}
public:
void setup() {
// standardize invalid pin numbers to -1
if (topPIRorTriggerPin < 0) topPIRorTriggerPin = -1;
if (topEchoPin < 0) topEchoPin = -1;
if (bottomPIRorTriggerPin < 0) bottomPIRorTriggerPin = -1;
if (bottomEchoPin < 0) bottomEchoPin = -1;
// allocate pins
PinManagerPinType pins[4] = {
{ topPIRorTriggerPin, useUSSensorTop },
{ topEchoPin, false },
{ bottomPIRorTriggerPin, useUSSensorBottom },
{ bottomEchoPin, false },
};
// NOTE: this *WILL* return TRUE if all the pins are set to -1.
// this is *BY DESIGN*.
if (!PinManager::allocateMultiplePins(pins, 4, PinOwner::UM_AnimatedStaircase)) {
topPIRorTriggerPin = -1;
topEchoPin = -1;
bottomPIRorTriggerPin = -1;
bottomEchoPin = -1;
enabled = false;
}
enable(enabled);
initDone = true;
}
void loop() {
if (!enabled || strip.isUpdating()) return;
minSegmentId = strip.getMainSegmentId(); // it may not be the best idea to start with main segment as it may not be the first one
maxSegmentId = strip.getLastActiveSegmentId() + 1;
checkSensors();
if (on) autoPowerOff();
updateSwipe();
}
uint16_t getId() { return USERMOD_ID_ANIMATED_STAIRCASE; }
#ifndef WLED_DISABLE_MQTT
/**
* handling of MQTT message
* topic only contains stripped topic (part after /wled/MAC)
* topic should look like: /swipe with amessage of [up|down]
*/
bool onMqttMessage(char* topic, char* payload) {
if (strlen(topic) == 6 && strncmp_P(topic, PSTR("/swipe"), 6) == 0) {
String action = payload;
if (action == "up") {
bottomSensorWrite = true;
return true;
} else if (action == "down") {
topSensorWrite = true;
return true;
} else if (action == "on") {
enable(true);
return true;
} else if (action == "off") {
enable(false);
return true;
}
}
return false;
}
/**
* subscribe to MQTT topic for controlling usermod
*/
void onMqttConnect(bool sessionPresent) {
//(re)subscribe to required topics
char subuf[64];
if (mqttDeviceTopic[0] != 0) {
strcpy(subuf, mqttDeviceTopic);
strcat_P(subuf, PSTR("/swipe"));
mqtt->subscribe(subuf, 0);
}
}
#endif
void addToJsonState(JsonObject& root) {
JsonObject staircase = root[FPSTR(_name)];
if (staircase.isNull()) {
staircase = root.createNestedObject(FPSTR(_name));
}
writeSensorsToJson(staircase);
DEBUG_PRINTLN(F("Staircase sensor state exposed in API."));
}
/*
* Reads configuration settings from the json API.
* See void addToJsonState(JsonObject& root)
*/
void readFromJsonState(JsonObject& root) {
if (!initDone) return; // prevent crash on boot applyPreset()
bool en = enabled;
JsonObject staircase = root[FPSTR(_name)];
if (!staircase.isNull()) {
if (staircase[FPSTR(_enabled)].is<bool>()) {
en = staircase[FPSTR(_enabled)].as<bool>();
} else {
String str = staircase[FPSTR(_enabled)]; // checkbox -> off or on
en = (bool)(str!="off"); // off is guaranteed to be present
}
if (en != enabled) enable(en);
readSensorsFromJson(staircase);
DEBUG_PRINTLN(F("Staircase sensor state read from API."));
}
}
void appendConfigData() {
//oappend(F("dd=addDropdown('staircase','selectfield');"));
//oappend(F("addOption(dd,'1st value',0);"));
//oappend(F("addOption(dd,'2nd value',1);"));
//oappend(F("addInfo('staircase:selectfield',1,'additional info');")); // 0 is field type, 1 is actual field
}
/*
* Writes the configuration to internal flash memory.
*/
void addToConfig(JsonObject& root) {
JsonObject staircase = root[FPSTR(_name)];
if (staircase.isNull()) {
staircase = root.createNestedObject(FPSTR(_name));
}
staircase[FPSTR(_enabled)] = enabled;
staircase[FPSTR(_segmentDelay)] = segment_delay_ms;
staircase[FPSTR(_onTime)] = on_time_ms / 1000;
staircase[FPSTR(_useTopUltrasoundSensor)] = useUSSensorTop;
staircase[FPSTR(_topPIRorTrigger_pin)] = topPIRorTriggerPin;
staircase[FPSTR(_topEcho_pin)] = useUSSensorTop ? topEchoPin : -1;
staircase[FPSTR(_useBottomUltrasoundSensor)] = useUSSensorBottom;
staircase[FPSTR(_bottomPIRorTrigger_pin)] = bottomPIRorTriggerPin;
staircase[FPSTR(_bottomEcho_pin)] = useUSSensorBottom ? bottomEchoPin : -1;
staircase[FPSTR(_topEchoCm)] = topMaxDist;
staircase[FPSTR(_bottomEchoCm)] = bottomMaxDist;
staircase[FPSTR(_togglePower)] = togglePower;
DEBUG_PRINTLN(F("Staircase config saved."));
}
/*
* Reads the configuration to internal flash memory before setup() is called.
*
* The function should return true if configuration was successfully loaded or false if there was no configuration.
*/
bool readFromConfig(JsonObject& root) {
bool oldUseUSSensorTop = useUSSensorTop;
bool oldUseUSSensorBottom = useUSSensorBottom;
int8_t oldTopAPin = topPIRorTriggerPin;
int8_t oldTopBPin = topEchoPin;
int8_t oldBottomAPin = bottomPIRorTriggerPin;
int8_t oldBottomBPin = bottomEchoPin;
JsonObject top = root[FPSTR(_name)];
if (top.isNull()) {
DEBUG_PRINT(FPSTR(_name));
DEBUG_PRINTLN(F(": No config found. (Using defaults.)"));
return false;
}
enabled = top[FPSTR(_enabled)] | enabled;
segment_delay_ms = top[FPSTR(_segmentDelay)] | segment_delay_ms;
segment_delay_ms = (unsigned long) min((unsigned long)10000,max((unsigned long)10,(unsigned long)segment_delay_ms)); // max delay 10s
on_time_ms = top[FPSTR(_onTime)] | on_time_ms/1000;
on_time_ms = min(900,max(10,(int)on_time_ms)) * 1000; // min 10s, max 15min
useUSSensorTop = top[FPSTR(_useTopUltrasoundSensor)] | useUSSensorTop;
topPIRorTriggerPin = top[FPSTR(_topPIRorTrigger_pin)] | topPIRorTriggerPin;
topEchoPin = top[FPSTR(_topEcho_pin)] | topEchoPin;
useUSSensorBottom = top[FPSTR(_useBottomUltrasoundSensor)] | useUSSensorBottom;
bottomPIRorTriggerPin = top[FPSTR(_bottomPIRorTrigger_pin)] | bottomPIRorTriggerPin;
bottomEchoPin = top[FPSTR(_bottomEcho_pin)] | bottomEchoPin;
topMaxDist = top[FPSTR(_topEchoCm)] | topMaxDist;
topMaxDist = min(150,max(30,(int)topMaxDist)); // max distance ~1.5m (a lag of 9ms may be expected)
bottomMaxDist = top[FPSTR(_bottomEchoCm)] | bottomMaxDist;
bottomMaxDist = min(150,max(30,(int)bottomMaxDist)); // max distance ~1.5m (a lag of 9ms may be expected)
togglePower = top[FPSTR(_togglePower)] | togglePower; // staircase toggles power on/off
DEBUG_PRINT(FPSTR(_name));
if (!initDone) {
// first run: reading from cfg.json
DEBUG_PRINTLN(F(" config loaded."));
} else {
// changing parameters from settings page
DEBUG_PRINTLN(F(" config (re)loaded."));
bool changed = false;
if ((oldUseUSSensorTop != useUSSensorTop) ||
(oldUseUSSensorBottom != useUSSensorBottom) ||
(oldTopAPin != topPIRorTriggerPin) ||
(oldTopBPin != topEchoPin) ||
(oldBottomAPin != bottomPIRorTriggerPin) ||
(oldBottomBPin != bottomEchoPin)) {
changed = true;
PinManager::deallocatePin(oldTopAPin, PinOwner::UM_AnimatedStaircase);
PinManager::deallocatePin(oldTopBPin, PinOwner::UM_AnimatedStaircase);
PinManager::deallocatePin(oldBottomAPin, PinOwner::UM_AnimatedStaircase);
PinManager::deallocatePin(oldBottomBPin, PinOwner::UM_AnimatedStaircase);
}
if (changed) setup();
}
// use "return !top["newestParameter"].isNull();" when updating Usermod with new features
return !top[FPSTR(_togglePower)].isNull();
}
/*
* Shows the delay between steps and power-off time in the "info"
* tab of the web-UI.
*/
void addToJsonInfo(JsonObject& root) {
JsonObject user = root["u"];
if (user.isNull()) {
user = root.createNestedObject("u");
}
JsonArray infoArr = user.createNestedArray(FPSTR(_name)); // name
String uiDomString = F("<button class=\"btn btn-xs\" onclick=\"requestJson({");
uiDomString += FPSTR(_name);
uiDomString += F(":{");
uiDomString += FPSTR(_enabled);
uiDomString += enabled ? F(":false}});\">") : F(":true}});\">");
uiDomString += F("<i class=\"icons ");
uiDomString += enabled ? "on" : "off";
uiDomString += F("\">&#xe08f;</i></button>");
infoArr.add(uiDomString);
}
};
// strings to reduce flash memory usage (used more than twice)
const char Animated_Staircase::_name[] PROGMEM = "staircase";
const char Animated_Staircase::_enabled[] PROGMEM = "enabled";
const char Animated_Staircase::_segmentDelay[] PROGMEM = "segment-delay-ms";
const char Animated_Staircase::_onTime[] PROGMEM = "on-time-s";
const char Animated_Staircase::_useTopUltrasoundSensor[] PROGMEM = "useTopUltrasoundSensor";
const char Animated_Staircase::_topPIRorTrigger_pin[] PROGMEM = "topPIRorTrigger_pin";
const char Animated_Staircase::_topEcho_pin[] PROGMEM = "topEcho_pin";
const char Animated_Staircase::_useBottomUltrasoundSensor[] PROGMEM = "useBottomUltrasoundSensor";
const char Animated_Staircase::_bottomPIRorTrigger_pin[] PROGMEM = "bottomPIRorTrigger_pin";
const char Animated_Staircase::_bottomEcho_pin[] PROGMEM = "bottomEcho_pin";
const char Animated_Staircase::_topEchoCm[] PROGMEM = "top-dist-cm";
const char Animated_Staircase::_bottomEchoCm[] PROGMEM = "bottom-dist-cm";
const char Animated_Staircase::_togglePower[] PROGMEM = "toggle-on-off";
static Animated_Staircase animated_staircase;
REGISTER_USERMOD(animated_staircase);

View File

@ -1,427 +0,0 @@
/*
* Usermod for detecting people entering/leaving a staircase and switching the
* staircase on/off.
*
* Edit the Animated_Staircase_config.h file to compile this usermod for your
* specific configuration.
*
* See the accompanying README.md file for more info.
*/
#pragma once
#include "wled.h"
#include "Animated_Staircase_config.h"
#define USERMOD_ID_ANIMATED_STAIRCASE 1011
/* Initial configuration (available in API and stored in flash) */
bool enabled = true; // Enable this usermod
unsigned long segment_delay_ms = 150; // Time between switching each segment
unsigned long on_time_ms = 5 * 1000; // The time for the light to stay on
#ifndef TOP_PIR_PIN
unsigned int topMaxTimeUs = 1749; // default echo timout, top
#endif
#ifndef BOTTOM_PIR_PIN
unsigned int bottomMaxTimeUs = 1749; // default echo timout, bottom
#endif
// Time between checking of the sensors
const int scanDelay = 50;
class Animated_Staircase : public Usermod {
private:
// Lights on or off.
// Flipping this will start a transition.
bool on = false;
// Swipe direction for current transition
#define SWIPE_UP true
#define SWIPE_DOWN false
bool swipe = SWIPE_UP;
// Indicates which Sensor was seen last (to determine
// the direction when swiping off)
#define LOWER false
#define UPPER true
bool lastSensor = LOWER;
// Time of the last transition action
unsigned long lastTime = 0;
// Time of the last sensor check
unsigned long lastScanTime = 0;
// Last time the lights were switched on or off
unsigned long lastSwitchTime = 0;
// segment id between onIndex and offIndex are on.
// controll the swipe by setting/moving these indices around.
// onIndex must be less than or equal to offIndex
byte onIndex = 0;
byte offIndex = 0;
// The maximum number of configured segments.
// Dynamically updated based on user configuration.
byte maxSegmentId = 1;
byte mainSegmentId = 0;
bool saveState = false;
// These values are used by the API to read the
// last sensor state, or trigger a sensor
// through the API
bool topSensorRead = false;
bool topSensorWrite = false;
bool bottomSensorRead = false;
bool bottomSensorWrite = false;
void updateSegments() {
mainSegmentId = strip.getMainSegmentId();
WS2812FX::Segment mainsegment = strip.getSegment(mainSegmentId);
WS2812FX::Segment* segments = strip.getSegments();
for (int i = 0; i < MAX_NUM_SEGMENTS; i++, segments++) {
if (!segments->isActive()) {
maxSegmentId = i - 1;
break;
}
if (i >= onIndex && i < offIndex) {
segments->setOption(SEG_OPTION_ON, 1, 1);
// We may need to copy mode and colors from segment 0 to make sure
// changes are propagated even when the config is changed during a wipe
// segments->mode = mainsegment.mode;
// segments->colors[0] = mainsegment.colors[0];
} else {
segments->setOption(SEG_OPTION_ON, 0, 1);
}
// Always mark segments as "transitional", we are animating the staircase
segments->setOption(SEG_OPTION_TRANSITIONAL, 1, 1);
}
colorUpdated(NOTIFIER_CALL_MODE_DIRECT_CHANGE);
}
/*
* Detects if an object is within ultrasound range.
* signalPin: The pin where the pulse is sent
* echoPin: The pin where the echo is received
* maxTimeUs: Detection timeout in microseconds. If an echo is
* received within this time, an object is detected
* and the function will return true.
*
* The speed of sound is 343 meters per second at 20 degress Celcius.
* Since the sound has to travel back and forth, the detection
* distance for the sensor in cm is (0.0343 * maxTimeUs) / 2.
*
* For practical reasons, here are some useful distances:
*
* Distance = maxtime
* 5 cm = 292 uS
* 10 cm = 583 uS
* 20 cm = 1166 uS
* 30 cm = 1749 uS
* 50 cm = 2915 uS
* 100 cm = 5831 uS
*/
bool ultrasoundRead(uint8_t signalPin,
uint8_t echoPin,
unsigned int maxTimeUs) {
digitalWrite(signalPin, HIGH);
delayMicroseconds(10);
digitalWrite(signalPin, LOW);
return pulseIn(echoPin, HIGH, maxTimeUs) > 0;
}
void checkSensors() {
if ((millis() - lastScanTime) > scanDelay) {
lastScanTime = millis();
#ifdef BOTTOM_PIR_PIN
bottomSensorRead = bottomSensorWrite || (digitalRead(BOTTOM_PIR_PIN) == HIGH);
#else
bottomSensorRead = bottomSensorWrite || ultrasoundRead(BOTTOM_TRIGGER_PIN, BOTTOM_ECHO_PIN, bottomMaxTimeUs);
#endif
#ifdef TOP_PIR_PIN
topSensorRead = topSensorWrite || (digitalRead(TOP_PIR_PIN) == HIGH);
#else
topSensorRead = topSensorWrite || ultrasoundRead(TOP_TRIGGER_PIN, TOP_ECHO_PIN, topMaxTimeUs);
#endif
// Values read, reset the flags for next API call
topSensorWrite = false;
bottomSensorWrite = false;
if (topSensorRead != bottomSensorRead) {
lastSwitchTime = millis();
if (on) {
lastSensor = topSensorRead;
} else {
// If the bottom sensor triggered, we need to swipe up, ON
swipe = bottomSensorRead;
if (swipe) {
Serial.println("ON -> Swipe up.");
} else {
Serial.println("ON -> Swipe down.");
}
if (onIndex == offIndex) {
// Position the indices for a correct on-swipe
if (swipe == SWIPE_UP) {
onIndex = mainSegmentId;
} else {
onIndex = maxSegmentId+1;
}
offIndex = onIndex;
}
on = true;
}
}
}
}
void autoPowerOff() {
if (on && ((millis() - lastSwitchTime) > on_time_ms)) {
// Swipe OFF in the direction of the last sensor detection
swipe = lastSensor;
on = false;
if (swipe) {
Serial.println("OFF -> Swipe up.");
} else {
Serial.println("OFF -> Swipe down.");
}
}
}
void updateSwipe() {
if ((millis() - lastTime) > segment_delay_ms) {
lastTime = millis();
byte oldOnIndex = onIndex;
byte oldOffIndex = offIndex;
if (on) {
// Turn on all segments
onIndex = MAX(mainSegmentId, onIndex - 1);
offIndex = MIN(maxSegmentId + 1, offIndex + 1);
} else {
if (swipe == SWIPE_UP) {
onIndex = MIN(offIndex, onIndex + 1);
} else {
offIndex = MAX(onIndex, offIndex - 1);
}
}
updateSegments();
}
}
void writeSettingsToJson(JsonObject& root) {
JsonObject staircase = root["staircase"];
if (staircase.isNull()) {
staircase = root.createNestedObject("staircase");
}
staircase["enabled"] = enabled;
staircase["segment-delay-ms"] = segment_delay_ms;
staircase["on-time-s"] = on_time_ms / 1000;
#ifdef TOP_TRIGGER_PIN
staircase["top-echo-us"] = topMaxTimeUs;
#endif
#ifdef BOTTOM_TRIGGER_PIN
staircase["bottom-echo-us"] = bottomMaxTimeUs;
#endif
}
void writeSensorsToJson(JsonObject& root) {
JsonObject staircase = root["staircase"];
if (staircase.isNull()) {
staircase = root.createNestedObject("staircase");
}
staircase["top-sensor"] = topSensorRead;
staircase["bottom-sensor"] = bottomSensorRead;
}
bool readSettingsFromJson(JsonObject& root) {
JsonObject staircase = root["staircase"];
bool changed = false;
bool shouldEnable = staircase["enabled"] | enabled;
if (shouldEnable != enabled) {
enable(shouldEnable);
changed = true;
}
unsigned long c_segment_delay_ms = staircase["segment-delay-ms"] | segment_delay_ms;
if (c_segment_delay_ms != segment_delay_ms) {
segment_delay_ms = c_segment_delay_ms;
changed = true;
}
unsigned long c_on_time_ms = (staircase["on-time-s"] | (on_time_ms / 1000)) * 1000;
if (c_on_time_ms != on_time_ms) {
on_time_ms = c_on_time_ms;
changed = true;
}
#ifdef TOP_TRIGGER_PIN
unsigned int c_topMaxTimeUs = staircase["top-echo-us"] | topMaxTimeUs;
if (c_topMaxTimeUs != topMaxTimeUs) {
topMaxTimeUs = c_topMaxTimeUs;
changed = true;
}
#endif
#ifdef BOTTOM_TRIGGER_PIN
unsigned int c_bottomMaxTimeUs = staircase["bottom-echo-us"] | bottomMaxTimeUs;
if (c_bottomMaxTimeUs != bottomMaxTimeUs) {
bottomMaxTimeUs = c_bottomMaxTimeUs;
changed = true;
}
#endif
return changed;
}
void readSensorsFromJson(JsonObject& root) {
JsonObject staircase = root["staircase"];
bottomSensorWrite = bottomSensorRead || (staircase["bottom-sensor"].as<bool>());
topSensorWrite = topSensorRead || (staircase["top-sensor"].as<bool>());
}
void enable(bool enable) {
if (enable) {
Serial.println("Animated Staircase enabled.");
Serial.print("Delay between steps: ");
Serial.print(segment_delay_ms, DEC);
Serial.print(" milliseconds.\nStairs switch off after: ");
Serial.print(on_time_ms / 1000, DEC);
Serial.println(" seconds.");
#ifdef BOTTOM_PIR_PIN
pinMode(BOTTOM_PIR_PIN, INPUT);
#else
pinMode(BOTTOM_TRIGGER_PIN, OUTPUT);
pinMode(BOTTOM_ECHO_PIN, INPUT);
#endif
#ifdef TOP_PIR_PIN
pinMode(TOP_PIR_PIN, INPUT);
#else
pinMode(TOP_TRIGGER_PIN, OUTPUT);
pinMode(TOP_ECHO_PIN, INPUT);
#endif
} else {
// Restore segment options
WS2812FX::Segment mainsegment = strip.getSegment(mainSegmentId);
WS2812FX::Segment* segments = strip.getSegments();
for (int i = 0; i < MAX_NUM_SEGMENTS; i++, segments++) {
if (!segments->isActive()) {
maxSegmentId = i - 1;
break;
}
segments->setOption(SEG_OPTION_ON, 1, 1);
}
colorUpdated(NOTIFIER_CALL_MODE_DIRECT_CHANGE);
Serial.println("Animated Staircase disabled.");
}
enabled = enable;
}
public:
void setup() { enable(enabled); }
void loop() {
// Write changed settings from to flash (see readFromJsonState())
if (saveState) {
serializeConfig();
saveState = false;
}
if (!enabled) {
return;
}
checkSensors();
autoPowerOff();
updateSwipe();
}
uint16_t getId() { return USERMOD_ID_ANIMATED_STAIRCASE; }
/*
* Shows configuration settings to the json API. This object looks like:
*
* "staircase" : {
* "enabled" : true
* "segment-delay-ms" : 150,
* "on-time-s" : 5
* }
*
*/
void addToJsonState(JsonObject& root) {
writeSettingsToJson(root);
writeSensorsToJson(root);
Serial.println("Staircase config exposed in API.");
}
/*
* Reads configuration settings from the json API.
* See void addToJsonState(JsonObject& root)
*/
void readFromJsonState(JsonObject& root) {
// The call to serializeConfig() must be done in the main loop,
// so we set a flag to signal the main loop to save state.
saveState = readSettingsFromJson(root);
readSensorsFromJson(root);
Serial.println("Staircase config read from API.");
}
/*
* Writes the configuration to internal flash memory.
*/
void addToConfig(JsonObject& root) {
writeSettingsToJson(root);
Serial.println("Staircase config saved.");
}
/*
* Reads the configuration to internal flash memory before setup() is called.
*/
void readFromConfig(JsonObject& root) {
readSettingsFromJson(root);
Serial.println("Staircase config loaded.");
}
/*
* Shows the delay between steps and power-off time in the "info"
* tab of the web-UI.
*/
void addToJsonInfo(JsonObject& root) {
JsonObject staircase = root["u"];
if (staircase.isNull()) {
staircase = root.createNestedObject("u");
}
if (enabled) {
JsonArray usermodEnabled =
staircase.createNestedArray("Staircase enabled"); // name
usermodEnabled.add("yes"); // value
JsonArray segmentDelay =
staircase.createNestedArray("Delay between stairs"); // name
segmentDelay.add(segment_delay_ms); // value
segmentDelay.add(" milliseconds"); // unit
JsonArray onTime =
staircase.createNestedArray("Power-off stairs after"); // name
onTime.add(on_time_ms / 1000); // value
onTime.add(" seconds"); // unit
} else {
JsonArray usermodEnabled =
staircase.createNestedArray("Staircase enabled"); // name
usermodEnabled.add("no"); // value
}
}
};

View File

@ -1,21 +0,0 @@
/*
* Animated_Staircase compiletime confguration.
*
* Please see README.md on how to change this file.
*/
// Please change the pin numbering below to match your board.
#define TOP_PIR_PIN D5
#define BOTTOM_PIR_PIN D6
// Or uncumment and a pir and use an ultrasound HC-SR04 sensor,
// see README.md for details
#ifndef TOP_PIR_PIN
#define TOP_TRIGGER_PIN D2
#define TOP_ECHO_PIN D3
#endif
#ifndef BOTTOM_PIR_PIN
#define BOTTOM_TRIGGER_PIN D4
#define BOTTOM_ECHO_PIN D5
#endif

View File

@ -1,70 +1,34 @@
# Usermod Animated Staircase
This usermod makes your staircase look cool by switching it on with an animation. It uses
This usermod makes your staircase look cool by illuminating it with an animation. It uses
PIR or ultrasonic sensors at the top and bottom of your stairs to:
- Light up the steps in your walking direction, leading the way.
- Light up the steps in the direction you're walking.
- Switch off the steps after you, in the direction of the last detected movement.
- Always switch on when one of the sensors detects movement, even if an effect
is still running. It can therewith handle multiple people on the stairs gracefully.
is still running. It can gracefully handle multiple people on the stairs.
The Animated Staircase can be controlled by the WLED API. Change settings such as
speed, on/off time and distance settings by sending an HTTP request, see below.
speed, on/off time and distance by sending an HTTP request, see below.
## WLED integration
To include this usermod in your WLED setup, you have to be able to [compile WLED from source](https://github.com/Aircoookie/WLED/wiki/Compiling-WLED).
To include this usermod in your WLED setup, you have to be able to [compile WLED from source](https://kno.wled.ge/advanced/compiling-wled/).
Before compiling, you have to make the following modifications:
Edit `usermods_list.cpp`:
1. Open `wled00/usermods_list.cpp`
2. add `#include "../usermods/Animated_Staircase/Animated_Staircase.h"` to the top of the file
3. add `usermods.add(new Animated_Staircase());` to the end of the `void registerUsermods()` function.
Edit your environment in `platformio_override.ini`
1. Open `platformio_override.ini`
2. add `Animated_Staircase` to the `custom_usermods` line for your environment
Edit `Animated_Staircase_config.h`:
1. Open `usermods/Animated_Staircase/Animated_Staircase_config.h`
2. To use PIR sensors, change these lines to match your setup:
Using D7 and D6 pin notation as used on several boards:
```cpp
#define TOP_PIR_PIN D7
#define BOTTOM_PIR_PIN D6
```
Or using GPIO numbering for pins 25 and 26:
```cpp
#define TOP_PIR_PIN 26
#define BOTTOM_PIR_PIN 25
```
To use Ultrasonic HC-SR04 sensors instead of (one of the) PIR sensors,
uncomment one of the PIR sensor lines and adjust the pin numbers for the
connected Ultrasonic sensor. In the example below we use an Ultrasonic
sensor at the bottom of the stairs:
```cpp
#define TOP_PIR_PIN 32
//#define BOTTOM_PIR_PIN D6 /* This PIR sensor is disabled */
#ifndef TOP_PIR_PIN
#define TOP_SIGNAL_PIN D2
#define TOP_ECHO_PIN D3
#endif
#ifndef BOTTOM_PIR_PIN /* If the bottom PIR is disabled, */
#define BOTTOM_SIGNAL_PIN 25 /* This Ultrasonic sensor is used */
#define BOTTOM_ECHO_PIN 26
#endif
```
After these modifications, compile and upload your WLED binary to your board
and check the WLED info page to see if this usermod is enabled.
You can configure usermod using the Usermods settings page.
Please enter GPIO pins for PIR or ultrasonic sensors (trigger and echo).
If you use PIR sensor enter -1 for echo pin.
Maximum distance for ultrasonic sensor can be configured as the time needed for an echo (see below).
## Hardware installation
1. Stick the LED strip under each step of the stairs.
2. Connect the ESP8266 pin D4 or ESP32 pin D2 to the first LED data pin at the bottom step
of your stairs.
1. Attach the LED strip to each step of the stairs.
2. Connect the ESP8266 pin D4 or ESP32 pin D2 to the first LED data pin at the bottom step.
3. Connect the data-out pin at the end of each strip per step to the data-in pin on the
other end of the next step, creating one large virtual LED strip.
next step, creating one large virtual LED strip.
4. Mount sensors of choice at the bottom and top of the stairs and connect them to the ESP.
5. To make sure all LEDs get enough power and have your staircase lighted evenly, power each
step from one side, using at least AWG14 or 2.5mm^2 cable. Don't connect them serial as you
@ -73,7 +37,7 @@ and check the WLED info page to see if this usermod is enabled.
You _may_ need to use 10k pull-down resistors on the selected PIR pins, depending on the sensor.
## WLED configuration
1. In the WLED UI, confgure a segment for each step. The lowest step of the stairs is the
1. In the WLED UI, configure a segment for each step. The lowest step of the stairs is the
lowest segment id.
2. Save your segments into a preset.
3. Ideally, add the preset in the config > LED setup menu to the "apply
@ -90,33 +54,28 @@ or remove them and put everything on one line.
| Setting | Description | Default |
|------------------|---------------------------------------------------------------|---------|
| enabled | Enable or disable the usermod | true |
| segment-delay-ms | Delay (milliseconds) between switching on/off each step | 150 |
| on-time-s | Time (seconds) the stairs stay lit after last detection | 5 |
| bottom-echo-us | Detection range of ultrasonic sensor | 1749 |
| bottomsensor | Manually trigger a down to up animation via API | false |
| topsensor | Manually trigger an up to down animation via API | false |
| bottom-sensor | Manually trigger a down to up animation via API | false |
| top-sensor | Manually trigger an up to down animation via API | false |
To read the current settings, open a browser to `http://xxx.xxx.xxx.xxx/json/state` (use your WLED
device IP address). The device will respond with a json object containing all WLED settings.
The staircase settings and sensor states are inside the WLED status element:
The staircase settings and sensor states are inside the WLED "state" element:
```json
{
"state": {
"staircase": {
"enabled": true,
"segment-delay-ms": 150,
"on-time-s": 5,
"bottomsensor": false,
"topsensor": false
"bottom-sensor": false,
"top-sensor": false
},
}
```
### Enable/disable the usermod
By disabling the usermod you will be able to keep the LED's on, independent from the sensor
activity. This enables to play with the lights without the usermod switching them on or off.
activity. This enables you to play with the lights without the usermod switching them on or off.
To disable the usermod:
@ -128,76 +87,43 @@ curl -X POST -H "Content-Type: application/json" \
To enable the usermod again, use `"enabled":true`.
### Changing animation parameters
To change the delay between the steps to (for example) 100 milliseconds and the on-time to
10 seconds:
Alternatively you can use _Usermod_ Settings page where you can change other parameters as well.
```bash
curl -X POST -H "Content-Type: application/json" \
-d '{"staircase":{"segment-delay-ms":100,"on-time-s":10}}' \
xxx.xxx.xxx.xxx/json/state
```
### Changing animation parameters and detection range of the ultrasonic HC-SR04 sensor
Using _Usermod_ Settings page you can define different usermod parameters, including sensor pins, delay between segment activation etc.
### Changing detection range of the ultrasonic HC-SR04 sensor
When an ultrasonic sensor is enabled in `Animated_Staircase_config.h`, you'll see a
`bottom-echo-us` setting appear in the json api:
When an ultrasonic sensor is enabled you can enter maximum detection distance in centimeters separately for top and bottom sensors.
```json
{
"state": {
"staircase": {
"enabled": true,
"segment-delay-ms": 150,
"on-time-s": 5,
"bottom-echo-us": 1749
},
}
```
If the HC-SR04 sensor detects an echo within 1749 microseconds (corresponding to ~30 cm
detection range from the sensor), it will trigger switching on the staircase. This setting
can be changed through the API with an HTTP POST:
```bash
curl -X POST -H "Content-Type: application/json" \
-d '{"staircase":{"bottom-echo-us":1166}}' \
xxx.xxx.xxx.xxx/json/state
```
Calculating the detection range can be performed as follows: The speed of sound is 343m/s at 20
degrees Centigrade. Since the sound has to travel back and forth, the detection range for the
sensor in cm is (0.0343 * maxTimeUs) / 2. To get you started, please find delays and distances below:
| Distance | Detection time |
|---------:|----------------:|
| 5 cm | 292 uS |
| 10 cm | 583 uS |
| 20 cm | 1166 uS |
| 30 cm | 1749 uS |
| 50 cm | 2915 uS |
| 100 cm | 5831 uS |
**Please note:** that using an HC-SR04 sensor, particularly when detecting echos at longer
distances creates delays in the WLED software, and _might_ introduce timing hickups in your animations or
a less responsive web interface. It is therefore advised to keep the detection time as short as possible.
**Please note:** using an HC-SR04 sensor, particularly when detecting echos at longer
distances creates delays in the WLED software, _might_ introduce timing hiccups in your animation or
a less responsive web interface. It is therefore advised to keep the detection distance as short as possible.
### Animation triggering through the API
Instead of stairs activation by one of the sensors, you can also trigger the animation through
the API. To simulate triggering the bottom sensor, use:
In addition to activation by one of the stair sensors, you can also trigger the animation manually
via the API. To simulate triggering the bottom sensor, use:
```bash
curl -X POST -H "Content-Type: application/json" \
-d '{"staircase":{"bottomsensor":true}}' \
-d '{"staircase":{"bottom-sensor":true}}' \
xxx.xxx.xxx.xxx/json/state
```
Likewise, to trigger the top sensor, use:
Likewise, to trigger the top sensor:
```bash
curl -X POST -H "Content-Type: application/json" \
-d '{"staircase":{"topsensor":true}}' \
-d '{"staircase":{"top-sensor":true}}' \
xxx.xxx.xxx.xxx/json/state
```
**MQTT**
You can publish a message with either `up` or `down` on topic `/swipe` to trigger animation.
You can also use `on` or `off` for enabling or disabling the usermod.
Have fun with this usermod.<br/>
www.rolfje.com
Modifications @blazoncek
## Change log
2021-04
* Adaptation for runtime configuration.

View File

@ -0,0 +1,3 @@
{
"name:": "Animated_Staircase"
}

View File

@ -24,7 +24,7 @@ void RGBNET_readValues() {
int channel = UDP.read();
//channel data is not used we only supports one channel
int len = UDP.read(RGBNET_packet, ledCount*3);
int len = UDP.read(RGBNET_packet, strip.getLengthTotal()*3);
if(len==0){
return;
}
@ -50,7 +50,7 @@ void handleConfig(AsyncWebServerRequest *request)
\"channels\": [\
{\
\"channel\": 1,\
\"leds\": " + ledCount + "\
\"leds\": " + strip.getLengthTotal() + "\
},\
{\
\"channel\": 2,\

View File

@ -0,0 +1,254 @@
// force the compiler to show a warning to confirm that this file is included
#warning **** Included USERMOD_BH1750 ****
#include "wled.h"
#include <BH1750.h>
#ifdef WLED_DISABLE_MQTT
#error "This user mod requires MQTT to be enabled."
#endif
// the max frequency to check photoresistor, 10 seconds
#ifndef USERMOD_BH1750_MAX_MEASUREMENT_INTERVAL
#define USERMOD_BH1750_MAX_MEASUREMENT_INTERVAL 10000
#endif
// the min frequency to check photoresistor, 500 ms
#ifndef USERMOD_BH1750_MIN_MEASUREMENT_INTERVAL
#define USERMOD_BH1750_MIN_MEASUREMENT_INTERVAL 500
#endif
// how many seconds after boot to take first measurement, 10 seconds
#ifndef USERMOD_BH1750_FIRST_MEASUREMENT_AT
#define USERMOD_BH1750_FIRST_MEASUREMENT_AT 10000
#endif
// only report if difference grater than offset value
#ifndef USERMOD_BH1750_OFFSET_VALUE
#define USERMOD_BH1750_OFFSET_VALUE 1
#endif
class Usermod_BH1750 : public Usermod
{
private:
int8_t offset = USERMOD_BH1750_OFFSET_VALUE;
unsigned long maxReadingInterval = USERMOD_BH1750_MAX_MEASUREMENT_INTERVAL;
unsigned long minReadingInterval = USERMOD_BH1750_MIN_MEASUREMENT_INTERVAL;
unsigned long lastMeasurement = UINT32_MAX - (USERMOD_BH1750_MAX_MEASUREMENT_INTERVAL - USERMOD_BH1750_FIRST_MEASUREMENT_AT);
unsigned long lastSend = UINT32_MAX - (USERMOD_BH1750_MAX_MEASUREMENT_INTERVAL - USERMOD_BH1750_FIRST_MEASUREMENT_AT);
// flag to indicate we have finished the first readLightLevel call
// allows this library to report to the user how long until the first
// measurement
bool getLuminanceComplete = false;
// flag set at startup
bool enabled = true;
// strings to reduce flash memory usage (used more than twice)
static const char _name[];
static const char _enabled[];
static const char _maxReadInterval[];
static const char _minReadInterval[];
static const char _offset[];
static const char _HomeAssistantDiscovery[];
bool initDone = false;
bool sensorFound = false;
// Home Assistant and MQTT
String mqttLuminanceTopic;
bool mqttInitialized = false;
bool HomeAssistantDiscovery = true; // Publish Home Assistant Discovery messages
BH1750 lightMeter;
float lastLux = -1000;
bool checkBoundSensor(float newValue, float prevValue, float maxDiff)
{
return isnan(prevValue) || newValue <= prevValue - maxDiff || newValue >= prevValue + maxDiff || (newValue == 0.0 && prevValue > 0.0);
}
// set up Home Assistant discovery entries
void _mqttInitialize()
{
mqttLuminanceTopic = String(mqttDeviceTopic) + F("/brightness");
if (HomeAssistantDiscovery) _createMqttSensor(F("Brightness"), mqttLuminanceTopic, F("Illuminance"), F(" lx"));
}
// Create an MQTT Sensor for Home Assistant Discovery purposes, this includes a pointer to the topic that is published to in the Loop.
void _createMqttSensor(const String &name, const String &topic, const String &deviceClass, const String &unitOfMeasurement)
{
String t = String(F("homeassistant/sensor/")) + mqttClientID + F("/") + name + F("/config");
StaticJsonDocument<600> doc;
doc[F("name")] = String(serverDescription) + " " + name;
doc[F("state_topic")] = topic;
doc[F("unique_id")] = String(mqttClientID) + name;
if (unitOfMeasurement != "")
doc[F("unit_of_measurement")] = unitOfMeasurement;
if (deviceClass != "")
doc[F("device_class")] = deviceClass;
doc[F("expire_after")] = 1800;
JsonObject device = doc.createNestedObject(F("device")); // attach the sensor to the same device
device[F("name")] = serverDescription;
device[F("identifiers")] = "wled-sensor-" + String(mqttClientID);
device[F("manufacturer")] = F(WLED_BRAND);
device[F("model")] = F(WLED_PRODUCT_NAME);
device[F("sw_version")] = versionString;
String temp;
serializeJson(doc, temp);
DEBUG_PRINTLN(t);
DEBUG_PRINTLN(temp);
mqtt->publish(t.c_str(), 0, true, temp.c_str());
}
public:
void setup()
{
if (i2c_scl<0 || i2c_sda<0) { enabled = false; return; }
sensorFound = lightMeter.begin();
initDone = true;
}
void loop()
{
if ((!enabled) || strip.isUpdating())
return;
unsigned long now = millis();
// check to see if we are due for taking a measurement
// lastMeasurement will not be updated until the conversion
// is complete the the reading is finished
if (now - lastMeasurement < minReadingInterval)
{
return;
}
bool shouldUpdate = now - lastSend > maxReadingInterval;
float lux = lightMeter.readLightLevel();
lastMeasurement = millis();
getLuminanceComplete = true;
if (shouldUpdate || checkBoundSensor(lux, lastLux, offset))
{
lastLux = lux;
lastSend = millis();
#ifndef WLED_DISABLE_MQTT
if (WLED_MQTT_CONNECTED)
{
if (!mqttInitialized)
{
_mqttInitialize();
mqttInitialized = true;
}
mqtt->publish(mqttLuminanceTopic.c_str(), 0, true, String(lux).c_str());
DEBUG_PRINTLN(F("Brightness: ") + String(lux) + F("lx"));
}
else
{
DEBUG_PRINTLN(F("Missing MQTT connection. Not publishing data"));
}
#endif
}
}
inline float getIlluminance() {
return (float)lastLux;
}
void addToJsonInfo(JsonObject &root)
{
JsonObject user = root[F("u")];
if (user.isNull())
user = root.createNestedObject(F("u"));
JsonArray lux_json = user.createNestedArray(F("Luminance"));
if (!enabled) {
lux_json.add(F("disabled"));
} else if (!sensorFound) {
// if no sensor
lux_json.add(F("BH1750 "));
lux_json.add(F("Not Found"));
} else if (!getLuminanceComplete) {
// if we haven't read the sensor yet, let the user know
// that we are still waiting for the first measurement
lux_json.add((USERMOD_BH1750_FIRST_MEASUREMENT_AT - millis()) / 1000);
lux_json.add(F(" sec until read"));
return;
} else {
lux_json.add(lastLux);
lux_json.add(F(" lx"));
}
}
// (called from set.cpp) stores persistent properties to cfg.json
void addToConfig(JsonObject &root)
{
// we add JSON object.
JsonObject top = root.createNestedObject(FPSTR(_name)); // usermodname
top[FPSTR(_enabled)] = enabled;
top[FPSTR(_maxReadInterval)] = maxReadingInterval;
top[FPSTR(_minReadInterval)] = minReadingInterval;
top[FPSTR(_HomeAssistantDiscovery)] = HomeAssistantDiscovery;
top[FPSTR(_offset)] = offset;
DEBUG_PRINTLN(F("BH1750 config saved."));
}
// called before setup() to populate properties from values stored in cfg.json
bool readFromConfig(JsonObject &root)
{
// we look for JSON object.
JsonObject top = root[FPSTR(_name)];
if (top.isNull())
{
DEBUG_PRINT(FPSTR(_name));
DEBUG_PRINT(F("BH1750"));
DEBUG_PRINTLN(F(": No config found. (Using defaults.)"));
return false;
}
bool configComplete = !top.isNull();
configComplete &= getJsonValue(top[FPSTR(_enabled)], enabled, false);
configComplete &= getJsonValue(top[FPSTR(_maxReadInterval)], maxReadingInterval, 10000); //ms
configComplete &= getJsonValue(top[FPSTR(_minReadInterval)], minReadingInterval, 500); //ms
configComplete &= getJsonValue(top[FPSTR(_HomeAssistantDiscovery)], HomeAssistantDiscovery, false);
configComplete &= getJsonValue(top[FPSTR(_offset)], offset, 1);
DEBUG_PRINT(FPSTR(_name));
if (!initDone) {
DEBUG_PRINTLN(F(" config loaded."));
} else {
DEBUG_PRINTLN(F(" config (re)loaded."));
}
return configComplete;
}
uint16_t getId()
{
return USERMOD_ID_BH1750;
}
};
// strings to reduce flash memory usage (used more than twice)
const char Usermod_BH1750::_name[] PROGMEM = "BH1750";
const char Usermod_BH1750::_enabled[] PROGMEM = "enabled";
const char Usermod_BH1750::_maxReadInterval[] PROGMEM = "max-read-interval-ms";
const char Usermod_BH1750::_minReadInterval[] PROGMEM = "min-read-interval-ms";
const char Usermod_BH1750::_HomeAssistantDiscovery[] PROGMEM = "HomeAssistantDiscoveryLux";
const char Usermod_BH1750::_offset[] PROGMEM = "offset-lx";
static Usermod_BH1750 bh1750_v2;
REGISTER_USERMOD(bh1750_v2);

View File

@ -0,0 +1,6 @@
{
"name:": "BH1750_v2",
"dependencies": {
"claws/BH1750":"^1.2.0"
}
}

View File

@ -0,0 +1,38 @@
# BH1750 usermod
This usermod will read from an ambient light sensor like the BH1750.
The luminance is displayed in both the Info section of the web UI, as well as published to the `/luminance` MQTT topic if enabled.
## Dependencies
- Libraries
- `claws/BH1750 @^1.2.0`
- Data is published over MQTT - make sure you've enabled the MQTT sync interface.
## Compilation
To enable, compile with `BH1750` in `custom_usermods` (e.g. in `platformio_override.ini`)
### Configuration Options
The following settings can be set at compile-time but are configurable on the usermod menu (except First Measurement time):
* `USERMOD_BH1750_MAX_MEASUREMENT_INTERVAL` - the max number of milliseconds between measurements, defaults to 10000ms
* `USERMOD_BH1750_MIN_MEASUREMENT_INTERVAL` - the min number of milliseconds between measurements, defaults to 500ms
* `USERMOD_BH1750_OFFSET_VALUE` - the offset value to report on, defaults to 1
* `USERMOD_BH1750_FIRST_MEASUREMENT_AT` - the number of milliseconds after boot to take first measurement, defaults to 10000 ms
In addition, the Usermod screen allows you to:
- enable/disable the usermod
- Enable Home Assistant Discovery of usermod
- Configure the SCL/SDA pins
## API
The following method is available to interact with the usermod from other code modules:
- `getIlluminance` read the brightness from the sensor
## Change Log
Jul 2022
- Added Home Assistant Discovery
- Implemented PinManager to register pins
- Made pins configurable in usermod menu
- Added API call to read luminance from other modules
- Enhanced info-screen outputs
- Updated `readme.md`

View File

@ -0,0 +1,483 @@
// force the compiler to show a warning to confirm that this file is included
#warning **** Included USERMOD_BME280 version 2.0 ****
#include "wled.h"
#include <Arduino.h>
#include <BME280I2C.h> // BME280 sensor
#include <EnvironmentCalculations.h> // BME280 extended measurements
#ifdef WLED_DISABLE_MQTT
#error "This user mod requires MQTT to be enabled."
#endif
class UsermodBME280 : public Usermod
{
private:
// NOTE: Do not implement any compile-time variables, anything the user needs to configure
// should be configurable from the Usermod menu using the methods below
// key settings set via usermod menu
uint8_t TemperatureDecimals = 0; // Number of decimal places in published temperaure values
uint8_t HumidityDecimals = 0; // Number of decimal places in published humidity values
uint8_t PressureDecimals = 0; // Number of decimal places in published pressure values
uint16_t TemperatureInterval = 5; // Interval to measure temperature (and humidity, dew point if available) in seconds
uint16_t PressureInterval = 300; // Interval to measure pressure in seconds
BME280I2C::I2CAddr I2CAddress = BME280I2C::I2CAddr_0x76; // i2c address, defaults to 0x76
bool PublishAlways = false; // Publish values even when they have not changed
bool UseCelsius = true; // Use Celsius for Reporting
bool HomeAssistantDiscovery = false; // Publish Home Assistant Device Information
bool enabled = true;
// set the default pins based on the architecture, these get overridden by Usermod menu settings
#ifdef ESP8266
//uint8_t RST_PIN = 16; // Un-comment for Heltec WiFi-Kit-8
#endif
bool initDone = false;
BME280I2C bme;
uint8_t sensorType;
// Measurement timers
long timer;
long lastTemperatureMeasure = 0;
long lastPressureMeasure = 0;
// Current sensor values
float sensorTemperature;
float sensorHumidity;
float sensorHeatIndex;
float sensorDewPoint;
float sensorPressure;
String tempScale;
// Track previous sensor values
float lastTemperature;
float lastHumidity;
float lastHeatIndex;
float lastDewPoint;
float lastPressure;
// MQTT topic strings for publishing Home Assistant discovery topics
bool mqttInitialized = false;
// strings to reduce flash memory usage (used more than twice)
static const char _name[];
static const char _enabled[];
// Read the BME280/BMP280 Sensor (which one runs depends on whether Celsius or Fahrenheit being set in Usermod Menu)
void UpdateBME280Data(int SensorType)
{
float _temperature, _humidity, _pressure;
if (UseCelsius) {
BME280::TempUnit tempUnit(BME280::TempUnit_Celsius);
EnvironmentCalculations::TempUnit envTempUnit(EnvironmentCalculations::TempUnit_Celsius);
BME280::PresUnit presUnit(BME280::PresUnit_hPa);
bme.read(_pressure, _temperature, _humidity, tempUnit, presUnit);
sensorTemperature = _temperature;
sensorHumidity = _humidity;
sensorPressure = _pressure;
tempScale = F("°C");
if (sensorType == 1)
{
sensorHeatIndex = EnvironmentCalculations::HeatIndex(_temperature, _humidity, envTempUnit);
sensorDewPoint = EnvironmentCalculations::DewPoint(_temperature, _humidity, envTempUnit);
}
} else {
BME280::TempUnit tempUnit(BME280::TempUnit_Fahrenheit);
EnvironmentCalculations::TempUnit envTempUnit(EnvironmentCalculations::TempUnit_Fahrenheit);
BME280::PresUnit presUnit(BME280::PresUnit_hPa);
bme.read(_pressure, _temperature, _humidity, tempUnit, presUnit);
sensorTemperature = _temperature;
sensorHumidity = _humidity;
sensorPressure = _pressure;
tempScale = F("°F");
if (sensorType == 1)
{
sensorHeatIndex = EnvironmentCalculations::HeatIndex(_temperature, _humidity, envTempUnit);
sensorDewPoint = EnvironmentCalculations::DewPoint(_temperature, _humidity, envTempUnit);
}
}
}
// Procedure to define all MQTT discovery Topics
void _mqttInitialize()
{
char mqttTemperatureTopic[128];
char mqttHumidityTopic[128];
char mqttPressureTopic[128];
char mqttHeatIndexTopic[128];
char mqttDewPointTopic[128];
snprintf_P(mqttTemperatureTopic, 127, PSTR("%s/temperature"), mqttDeviceTopic);
snprintf_P(mqttPressureTopic, 127, PSTR("%s/pressure"), mqttDeviceTopic);
snprintf_P(mqttHumidityTopic, 127, PSTR("%s/humidity"), mqttDeviceTopic);
snprintf_P(mqttHeatIndexTopic, 127, PSTR("%s/heat_index"), mqttDeviceTopic);
snprintf_P(mqttDewPointTopic, 127, PSTR("%s/dew_point"), mqttDeviceTopic);
if (HomeAssistantDiscovery) {
_createMqttSensor(F("Temperature"), mqttTemperatureTopic, "temperature", tempScale);
_createMqttSensor(F("Pressure"), mqttPressureTopic, "pressure", F("hPa"));
_createMqttSensor(F("Humidity"), mqttHumidityTopic, "humidity", F("%"));
_createMqttSensor(F("HeatIndex"), mqttHeatIndexTopic, "temperature", tempScale);
_createMqttSensor(F("DewPoint"), mqttDewPointTopic, "temperature", tempScale);
}
}
// Create an MQTT Sensor for Home Assistant Discovery purposes, this includes a pointer to the topic that is published to in the Loop.
void _createMqttSensor(const String &name, const String &topic, const String &deviceClass, const String &unitOfMeasurement)
{
String t = String(F("homeassistant/sensor/")) + mqttClientID + F("/") + name + F("/config");
StaticJsonDocument<600> doc;
doc[F("name")] = String(serverDescription) + " " + name;
doc[F("state_topic")] = topic;
doc[F("unique_id")] = String(mqttClientID) + name;
if (unitOfMeasurement != "")
doc[F("unit_of_measurement")] = unitOfMeasurement;
if (deviceClass != "")
doc[F("device_class")] = deviceClass;
doc[F("expire_after")] = 1800;
JsonObject device = doc.createNestedObject(F("device")); // attach the sensor to the same device
device[F("name")] = serverDescription;
device[F("identifiers")] = "wled-sensor-" + String(mqttClientID);
device[F("manufacturer")] = F(WLED_BRAND);
device[F("model")] = F(WLED_PRODUCT_NAME);
device[F("sw_version")] = versionString;
String temp;
serializeJson(doc, temp);
DEBUG_PRINTLN(t);
DEBUG_PRINTLN(temp);
mqtt->publish(t.c_str(), 0, true, temp.c_str());
}
void publishMqtt(const char *topic, const char* state) {
//Check if MQTT Connected, otherwise it will crash the 8266
if (WLED_MQTT_CONNECTED){
char subuf[128];
snprintf_P(subuf, 127, PSTR("%s/%s"), mqttDeviceTopic, topic);
mqtt->publish(subuf, 0, false, state);
}
}
void initializeBmeComms()
{
BME280I2C::Settings settings{
BME280::OSR_X16, // Temperature oversampling x16
BME280::OSR_X16, // Humidity oversampling x16
BME280::OSR_X16, // Pressure oversampling x16
BME280::Mode_Forced,
BME280::StandbyTime_1000ms,
BME280::Filter_Off,
BME280::SpiEnable_False,
I2CAddress
};
bme.setSettings(settings);
if (!bme.begin())
{
sensorType = 0;
DEBUG_PRINTLN(F("Could not find BME280 I2C sensor!"));
}
else
{
switch (bme.chipModel())
{
case BME280::ChipModel_BME280:
sensorType = 1;
DEBUG_PRINTLN(F("Found BME280 sensor! Success."));
break;
case BME280::ChipModel_BMP280:
sensorType = 2;
DEBUG_PRINTLN(F("Found BMP280 sensor! No Humidity available."));
break;
default:
sensorType = 0;
DEBUG_PRINTLN(F("Found UNKNOWN sensor! Error!"));
}
}
}
public:
void setup()
{
if (i2c_scl<0 || i2c_sda<0) { enabled = false; sensorType = 0; return; }
initializeBmeComms();
initDone = true;
}
void loop()
{
if (!enabled || strip.isUpdating()) return;
// BME280 sensor MQTT publishing
// Check if sensor present and Connected, otherwise it will crash the MCU
if (sensorType != 0)
{
// Timer to fetch new temperature, humidity and pressure data at intervals
timer = millis();
if (timer - lastTemperatureMeasure >= TemperatureInterval * 1000)
{
lastTemperatureMeasure = timer;
UpdateBME280Data(sensorType);
float temperature = roundf(sensorTemperature * powf(10, TemperatureDecimals)) / powf(10, TemperatureDecimals);
float humidity, heatIndex, dewPoint;
// If temperature has changed since last measure, create string populated with device topic
// from the UI and values read from sensor, then publish to broker
if (temperature != lastTemperature || PublishAlways)
{
publishMqtt("temperature", String(temperature, (unsigned) TemperatureDecimals).c_str());
}
lastTemperature = temperature; // Update last sensor temperature for next loop
if (sensorType == 1) // Only if sensor is a BME280
{
humidity = roundf(sensorHumidity * powf(10, HumidityDecimals)) / powf(10, HumidityDecimals);
heatIndex = roundf(sensorHeatIndex * powf(10, TemperatureDecimals)) / powf(10, TemperatureDecimals);
dewPoint = roundf(sensorDewPoint * powf(10, TemperatureDecimals)) / powf(10, TemperatureDecimals);
if (humidity != lastHumidity || PublishAlways)
{
publishMqtt("humidity", String(humidity, (unsigned) HumidityDecimals).c_str());
}
if (heatIndex != lastHeatIndex || PublishAlways)
{
publishMqtt("heat_index", String(heatIndex, (unsigned) TemperatureDecimals).c_str());
}
if (dewPoint != lastDewPoint || PublishAlways)
{
publishMqtt("dew_point", String(dewPoint, (unsigned) TemperatureDecimals).c_str());
}
lastHumidity = humidity;
lastHeatIndex = heatIndex;
lastDewPoint = dewPoint;
}
}
if (timer - lastPressureMeasure >= PressureInterval * 1000)
{
lastPressureMeasure = timer;
float pressure = roundf(sensorPressure * powf(10, PressureDecimals)) / powf(10, PressureDecimals);
if (pressure != lastPressure || PublishAlways)
{
publishMqtt("pressure", String(pressure, (unsigned) PressureDecimals).c_str());
}
lastPressure = pressure;
}
}
}
void onMqttConnect(bool sessionPresent)
{
if (WLED_MQTT_CONNECTED && !mqttInitialized)
{
_mqttInitialize();
mqttInitialized = true;
}
}
/*
* API calls te enable data exchange between WLED modules
*/
inline float getTemperatureC() {
if (UseCelsius) {
return (float)roundf(sensorTemperature * powf(10, TemperatureDecimals)) / powf(10, TemperatureDecimals);
} else {
return (float)roundf(sensorTemperature * powf(10, TemperatureDecimals)) / powf(10, TemperatureDecimals) * 1.8f + 32;
}
}
inline float getTemperatureF() {
if (UseCelsius) {
return ((float)roundf(sensorTemperature * powf(10, TemperatureDecimals)) / powf(10, TemperatureDecimals) -32) * 0.56f;
} else {
return (float)roundf(sensorTemperature * powf(10, TemperatureDecimals)) / powf(10, TemperatureDecimals);
}
}
inline float getHumidity() {
return (float)roundf(sensorHumidity * powf(10, HumidityDecimals));
}
inline float getPressure() {
return (float)roundf(sensorPressure * powf(10, PressureDecimals));
}
inline float getDewPointC() {
if (UseCelsius) {
return (float)roundf(sensorDewPoint * powf(10, TemperatureDecimals)) / powf(10, TemperatureDecimals);
} else {
return (float)roundf(sensorDewPoint * powf(10, TemperatureDecimals)) / powf(10, TemperatureDecimals) * 1.8f + 32;
}
}
inline float getDewPointF() {
if (UseCelsius) {
return ((float)roundf(sensorDewPoint * powf(10, TemperatureDecimals)) / powf(10, TemperatureDecimals) -32) * 0.56f;
} else {
return (float)roundf(sensorDewPoint * powf(10, TemperatureDecimals)) / powf(10, TemperatureDecimals);
}
}
inline float getHeatIndexC() {
if (UseCelsius) {
return (float)roundf(sensorHeatIndex * powf(10, TemperatureDecimals)) / powf(10, TemperatureDecimals);
} else {
return (float)roundf(sensorHeatIndex * powf(10, TemperatureDecimals)) / powf(10, TemperatureDecimals) * 1.8f + 32;
}
}
inline float getHeatIndexF() {
if (UseCelsius) {
return ((float)roundf(sensorHeatIndex * powf(10, TemperatureDecimals)) / powf(10, TemperatureDecimals) -32) * 0.56f;
} else {
return (float)roundf(sensorHeatIndex * powf(10, TemperatureDecimals)) / powf(10, TemperatureDecimals);
}
}
// Publish Sensor Information to Info Page
void addToJsonInfo(JsonObject &root)
{
JsonObject user = root[F("u")];
if (user.isNull()) user = root.createNestedObject(F("u"));
if (sensorType==0) //No Sensor
{
// if we sensor not detected, let the user know
JsonArray temperature_json = user.createNestedArray(F("BME/BMP280 Sensor"));
temperature_json.add(F("Not Found"));
}
else if (sensorType==2) //BMP280
{
JsonArray temperature_json = user.createNestedArray(F("Temperature"));
JsonArray pressure_json = user.createNestedArray(F("Pressure"));
temperature_json.add(roundf(sensorTemperature * powf(10, TemperatureDecimals)) / powf(10, TemperatureDecimals));
temperature_json.add(tempScale);
pressure_json.add(roundf(sensorPressure * powf(10, PressureDecimals)) / powf(10, PressureDecimals));
pressure_json.add(F("hPa"));
}
else if (sensorType==1) //BME280
{
JsonArray temperature_json = user.createNestedArray(F("Temperature"));
JsonArray humidity_json = user.createNestedArray(F("Humidity"));
JsonArray pressure_json = user.createNestedArray(F("Pressure"));
JsonArray heatindex_json = user.createNestedArray(F("Heat Index"));
JsonArray dewpoint_json = user.createNestedArray(F("Dew Point"));
temperature_json.add(roundf(sensorTemperature * powf(10, TemperatureDecimals)) / powf(10, TemperatureDecimals));
temperature_json.add(tempScale);
humidity_json.add(roundf(sensorHumidity * powf(10, HumidityDecimals)) / powf(10, HumidityDecimals));
humidity_json.add(F("%"));
pressure_json.add(roundf(sensorPressure * powf(10, PressureDecimals)) / powf(10, PressureDecimals));
pressure_json.add(F("hPa"));
heatindex_json.add(roundf(sensorHeatIndex * powf(10, TemperatureDecimals)) / powf(10, TemperatureDecimals));
heatindex_json.add(tempScale);
dewpoint_json.add(roundf(sensorDewPoint * powf(10, TemperatureDecimals)) / powf(10, TemperatureDecimals));
dewpoint_json.add(tempScale);
}
return;
}
// Save Usermod Config Settings
void addToConfig(JsonObject& root)
{
JsonObject top = root.createNestedObject(FPSTR(_name));
top[FPSTR(_enabled)] = enabled;
top[F("I2CAddress")] = static_cast<uint8_t>(I2CAddress);
top[F("TemperatureDecimals")] = TemperatureDecimals;
top[F("HumidityDecimals")] = HumidityDecimals;
top[F("PressureDecimals")] = PressureDecimals;
top[F("TemperatureInterval")] = TemperatureInterval;
top[F("PressureInterval")] = PressureInterval;
top[F("PublishAlways")] = PublishAlways;
top[F("UseCelsius")] = UseCelsius;
top[F("HomeAssistantDiscovery")] = HomeAssistantDiscovery;
DEBUG_PRINTLN(F("BME280 config saved."));
}
// Read Usermod Config Settings
bool readFromConfig(JsonObject& root)
{
// default settings values could be set here (or below using the 3-argument getJsonValue()) instead of in the class definition or constructor
// setting them inside readFromConfig() is slightly more robust, handling the rare but plausible use case of single value being missing after boot (e.g. if the cfg.json was manually edited and a value was removed)
JsonObject top = root[FPSTR(_name)];
if (top.isNull()) {
DEBUG_PRINT(F(_name));
DEBUG_PRINTLN(F(": No config found. (Using defaults.)"));
return false;
}
bool configComplete = !top.isNull();
configComplete &= getJsonValue(top[FPSTR(_enabled)], enabled);
// A 3-argument getJsonValue() assigns the 3rd argument as a default value if the Json value is missing
uint8_t tmpI2cAddress;
configComplete &= getJsonValue(top[F("I2CAddress")], tmpI2cAddress, 0x76);
I2CAddress = static_cast<BME280I2C::I2CAddr>(tmpI2cAddress);
configComplete &= getJsonValue(top[F("TemperatureDecimals")], TemperatureDecimals, 1);
configComplete &= getJsonValue(top[F("HumidityDecimals")], HumidityDecimals, 0);
configComplete &= getJsonValue(top[F("PressureDecimals")], PressureDecimals, 0);
configComplete &= getJsonValue(top[F("TemperatureInterval")], TemperatureInterval, 30);
configComplete &= getJsonValue(top[F("PressureInterval")], PressureInterval, 30);
configComplete &= getJsonValue(top[F("PublishAlways")], PublishAlways, false);
configComplete &= getJsonValue(top[F("UseCelsius")], UseCelsius, true);
configComplete &= getJsonValue(top[F("HomeAssistantDiscovery")], HomeAssistantDiscovery, false);
DEBUG_PRINT(FPSTR(_name));
if (!initDone) {
// first run: reading from cfg.json
DEBUG_PRINTLN(F(" config loaded."));
} else {
// changing parameters from settings page
DEBUG_PRINTLN(F(" config (re)loaded."));
// Reset all known values
sensorType = 0;
sensorTemperature = 0;
sensorHumidity = 0;
sensorHeatIndex = 0;
sensorDewPoint = 0;
sensorPressure = 0;
lastTemperature = 0;
lastHumidity = 0;
lastHeatIndex = 0;
lastDewPoint = 0;
lastPressure = 0;
initializeBmeComms();
}
return configComplete;
}
uint16_t getId() {
return USERMOD_ID_BME280;
}
};
const char UsermodBME280::_name[] PROGMEM = "BME280/BMP280";
const char UsermodBME280::_enabled[] PROGMEM = "enabled";
static UsermodBME280 bme280_v2;
REGISTER_USERMOD(bme280_v2);

View File

@ -1,40 +1,84 @@
Hello! I have written a v2 usermod for the BME280/BMP280 sensor based on the [existing v1 usermod](https://github.com/Aircoookie/WLED/blob/master/usermods/Wemos_D1_mini%2BWemos32_mini_shield/usermod_bme280.cpp). It is not just a refactor, there are many changes which I made to fit my use case, and I hope they will fit the use cases of others as well! Most notably, this usermod is *just* for the BME280 and does not control a display like in the v1 usermod designed for the WeMos shield.
# Usermod BME280
This Usermod is designed to read a `BME280` or `BMP280` sensor and output the following:
- Temperature
- Humidity (`BME280` only)
- Pressure
- Heat Index (`BME280` only)
- Dew Point (`BME280` only)
- Requires libraries `BME280@~3.0.0` (by [finitespace](https://github.com/finitespace/BME280)) and `Wire`. Please add these under `lib_deps` in your `platform.ini` (or `platform_override.ini`).
- Data is published over MQTT so make sure you've enabled the MQTT sync interface.
- This usermod also writes to serial (GPIO1 on ESP8266). Please make sure nothing else listening on the serial TX pin of your board will get confused by log messages!
Configuration is performed via the Usermod menu. There are no parameters to set in code! The following settings can be configured in the Usermod Menu:
- The i2c address in decimal. Set it to either 118 (0x76, the default) or 119 (0x77).
- Temperature Decimals (number of decimal places to output)
- Humidity Decimals
- Pressure Decimals
- Temperature Interval (how many seconds between temperature and humidity measurements)
- Pressure Interval
- Publish Always (turn off to only publish changes, on to publish whether or not value changed)
- Use Celsius (turn off to use Fahrenheit)
- Home Assistant Discovery (turn on to sent MQTT Discovery entries for Home Assistant)
- SCL/SDA GPIO Pins
To enable, compile with `USERMOD_BME280` defined (i.e. `platformio_override.ini`)
Dependencies
- Libraries
- `BME280@~3.0.0` (by [finitespace](https://github.com/finitespace/BME280))
- `Wire`
- Data is published over MQTT - make sure you've enabled the MQTT sync interface.
- This usermod also writes to serial (GPIO1 on ESP8266). Please make sure nothing else is listening to the serial TX pin or your board will get confused by log messages!
In addition to outputting via MQTT, you can read the values from the Info Screen on the dashboard page of the device's web interface.
Methods also exist to read the read/calculated values from other WLED modules through code.
- `getTemperatureC()`
- `getTemperatureF()`
- `getHumidity()`
- `getPressure()`
- `getDewPointC()`
- `getDewPointF()`
- `getHeatIndexC()`
- `getHeatIndexF()`
# Compiling
To enable, add `BME280_v2` to your `custom_usermods` (e.g. in `platformio_override.ini`)
```ini
build_flags =
${common.build_flags_esp8266}
-D USERMOD_BME280
```
or define `USERMOD_BME280` in `my_config.h`
```c++
#define USERMOD_BME280
[env:usermod_bme280_d1_mini]
extends = env:d1_mini
custom_usermods = ${env:d1_mini.custom_usermods} BME280_v2
```
Changes include:
- Adjustable measure intervals
- Temperature and pressure have separate intervals due to pressure not frequently changing at any constant altitude
- Adjustment of number of decimal places in published sensor values
- Separate adjustment for temperature, humidity and pressure values
- Values are rounded to the specified number of decimal places
- Pressure measured in units of hPa instead of Pa
- Calculation of heat index (apparent temperature) and dew point
- These, along with humidity measurements, are disabled if the sensor is a BMP280
- 16x oversampling of sensor during measurement
- Values are only published if they are different from the previous value
- Values are published on startup (continually until the MQTT broker acknowledges a successful publication)
Adjustments are made through preprocessor definitions at the start of the class definition.
MQTT topics are as follows:
# MQTT
MQTT topics are as follows (`<deviceTopic>` is set in MQTT section of Sync Setup menu):
Measurement type | MQTT topic
--- | ---
Temperature | `<deviceTopic>/temperature`
Humidity | `<deviceTopic>/humidity`
Pressure | `<deviceTopic>/pressure`
Heat index | `<deviceTopic>/heat_index`
Dew point | `<deviceTopic>/dew_point`
Dew point | `<deviceTopic>/dew_point`
If you are using Home Assistant, and `Home Assistant Discovery` is turned on, Home Assistant should automatically detect a new device, provided you have the MQTT integration installed. The device is separate from the main WLED device and will contain sensors for Pressure, Humidity, Temperature, Dew Point and Heat Index.
# Revision History
Jul 2022
- Added Home Assistant Discovery
- Added API interface to output data
- Removed compile-time variables
- Added usermod menu interface
- Added value outputs to info screen
- Updated `readme.md`
- Registered usermod
- Implemented PinManager for usermod
- Implemented reallocation of pins without reboot
Apr 2021
- Added `Publish Always` option
Dec 2020
- Ported to V2 Usermod format
- Customizable `measure intervals`
- Customizable number of `decimal places` in published sensor values
- Pressure measured in units of hPa instead of Pa
- Calculation of heat index (apparent temperature) and dew point
- `16x oversampling` of sensor during measurement
- Values only published if they are different from the previous value

View File

@ -0,0 +1,6 @@
{
"name:": "BME280_v2",
"dependencies": {
"finitespace/BME280":"~3.0.0"
}
}

View File

@ -1,212 +0,0 @@
#pragma once
#include "wled.h"
#include <Arduino.h>
#include <Wire.h>
#include <BME280I2C.h> // BME280 sensor
#include <EnvironmentCalculations.h> // BME280 extended measurements
class UsermodBME280 : public Usermod
{
private:
// User-defined configuration
#define Celsius // Show temperature mesaurement in Celcius. Comment out for Fahrenheit
#define TemperatureDecimals 1 // Number of decimal places in published temperaure values
#define HumidityDecimals 0 // Number of decimal places in published humidity values
#define PressureDecimals 2 // Number of decimal places in published pressure values
#define TemperatureInterval 5 // Interval to measure temperature (and humidity, dew point if available) in seconds
#define PressureInterval 300 // Interval to measure pressure in seconds
// Sanity checks
#if !defined(TemperatureDecimals) || TemperatureDecimals < 0
#define TemperatureDecimals 0
#endif
#if !defined(HumidityDecimals) || HumidityDecimals < 0
#define HumidityDecimals 0
#endif
#if !defined(PressureDecimals) || PressureDecimals < 0
#define PressureDecimals 0
#endif
#if !defined(TemperatureInterval) || TemperatureInterval < 0
#define TemperatureInterval 1
#endif
#if !defined(PressureInterval) || PressureInterval < 0
#define PressureInterval TemperatureInterval
#endif
#ifdef ARDUINO_ARCH_ESP32 // ESP32 boards
uint8_t SCL_PIN = 22;
uint8_t SDA_PIN = 21;
#else // ESP8266 boards
uint8_t SCL_PIN = 5;
uint8_t SDA_PIN = 4;
//uint8_t RST_PIN = 16; // Uncoment for Heltec WiFi-Kit-8
#endif
// BME280 sensor settings
BME280I2C::Settings settings{
BME280::OSR_X16, // Temperature oversampling x16
BME280::OSR_X16, // Humidity oversampling x16
BME280::OSR_X16, // Pressure oversampling x16
// Defaults
BME280::Mode_Forced,
BME280::StandbyTime_1000ms,
BME280::Filter_Off,
BME280::SpiEnable_False,
BME280I2C::I2CAddr_0x76 // I2C address. I2C specific. Default 0x76
};
BME280I2C bme{settings};
uint8_t SensorType;
// Measurement timers
long timer;
long lastTemperatureMeasure = 0;
long lastPressureMeasure = 0;
// Current sensor values
float SensorTemperature;
float SensorHumidity;
float SensorHeatIndex;
float SensorDewPoint;
float SensorPressure;
// Track previous sensor values
float lastTemperature;
float lastHumidity;
float lastHeatIndex;
float lastDewPoint;
float lastPressure;
// Store packet IDs of MQTT publications
uint16_t mqttTemperaturePub = 0;
uint16_t mqttPressurePub = 0;
void UpdateBME280Data(int SensorType)
{
float _temperature, _humidity, _pressure;
#ifdef Celsius
BME280::TempUnit tempUnit(BME280::TempUnit_Celsius);
EnvironmentCalculations::TempUnit envTempUnit(EnvironmentCalculations::TempUnit_Celsius);
#else
BME280::TempUnit tempUnit(BME280::TempUnit_Fahrenheit);
EnvironmentCalculations::TempUnit envTempUnit(EnvironmentCalculations::TempUnit_Fahrenheit);
#endif
BME280::PresUnit presUnit(BME280::PresUnit_hPa);
bme.read(_pressure, _temperature, _humidity, tempUnit, presUnit);
SensorTemperature = _temperature;
SensorHumidity = _humidity;
SensorPressure = _pressure;
if (SensorType == 1)
{
SensorHeatIndex = EnvironmentCalculations::HeatIndex(_temperature, _humidity, envTempUnit);
SensorDewPoint = EnvironmentCalculations::DewPoint(_temperature, _humidity, envTempUnit);
}
}
public:
void setup()
{
Wire.begin(SDA_PIN, SCL_PIN);
if (!bme.begin())
{
SensorType = 0;
Serial.println("Could not find BME280I2C sensor!");
}
else
{
switch (bme.chipModel())
{
case BME280::ChipModel_BME280:
SensorType = 1;
Serial.println("Found BME280 sensor! Success.");
break;
case BME280::ChipModel_BMP280:
SensorType = 2;
Serial.println("Found BMP280 sensor! No Humidity available.");
break;
default:
SensorType = 0;
Serial.println("Found UNKNOWN sensor! Error!");
}
}
}
void loop()
{
// BME280 sensor MQTT publishing
// Check if sensor present and MQTT Connected, otherwise it will crash the MCU
if (SensorType != 0 && mqtt != nullptr)
{
// Timer to fetch new temperature, humidity and pressure data at intervals
timer = millis();
if (timer - lastTemperatureMeasure >= TemperatureInterval * 1000 || mqttTemperaturePub == 0)
{
lastTemperatureMeasure = timer;
UpdateBME280Data(SensorType);
float Temperature = roundf(SensorTemperature * pow(10, TemperatureDecimals)) / pow(10, TemperatureDecimals);
float Humidity, HeatIndex, DewPoint;
// If temperature has changed since last measure, create string populated with device topic
// from the UI and values read from sensor, then publish to broker
if (Temperature != lastTemperature)
{
String topic = String(mqttDeviceTopic) + "/temperature";
mqttTemperaturePub = mqtt->publish(topic.c_str(), 0, false, String(Temperature, TemperatureDecimals).c_str());
}
lastTemperature = Temperature; // Update last sensor temperature for next loop
if (SensorType == 1) // Only if sensor is a BME280
{
Humidity = roundf(SensorHumidity * pow(10, HumidityDecimals)) / pow(10, HumidityDecimals);
HeatIndex = roundf(SensorHeatIndex * pow(10, TemperatureDecimals)) / pow(10, TemperatureDecimals);
DewPoint = roundf(SensorDewPoint * pow(10, TemperatureDecimals)) / pow(10, TemperatureDecimals);
if (Humidity != lastHumidity)
{
String topic = String(mqttDeviceTopic) + "/humidity";
mqtt->publish(topic.c_str(), 0, false, String(Humidity, HumidityDecimals).c_str());
}
if (HeatIndex != lastHeatIndex)
{
String topic = String(mqttDeviceTopic) + "/heat_index";
mqtt->publish(topic.c_str(), 0, false, String(HeatIndex, TemperatureDecimals).c_str());
}
if (DewPoint != lastDewPoint)
{
String topic = String(mqttDeviceTopic) + "/dew_point";
mqtt->publish(topic.c_str(), 0, false, String(DewPoint, TemperatureDecimals).c_str());
}
lastHumidity = Humidity;
lastHeatIndex = HeatIndex;
lastDewPoint = DewPoint;
}
}
if (timer - lastPressureMeasure >= PressureInterval * 1000 || mqttPressurePub == 0)
{
lastPressureMeasure = timer;
float Pressure = roundf(SensorPressure * pow(10, PressureDecimals)) / pow(10, PressureDecimals);
if (Pressure != lastPressure)
{
String topic = String(mqttDeviceTopic) + "/pressure";
mqttPressurePub = mqtt->publish(topic.c_str(), 0, true, String(Pressure, PressureDecimals).c_str());
}
lastPressure = Pressure;
}
}
}
};

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,163 @@
# Usermod BME68X
This usermod was developed for a BME680/BME68X sensor. The BME68X is not compatible with the BME280/BMP280 chip. It has its own library. The original 'BSEC Software Library' from Bosch was used to develop the code. The measured values are displayed on the WLED info page.
<p align="center"><img src="pics/pic1.png" style="width:60%;"></p>
In addition, the values are published on MQTT if this is active. The topic used for this is: 'wled/[MQTT Client ID]'. The Client ID is set in the WLED MQTT settings.
<p align="center"><img src="pics/pic2.png"></p>
If you use HomeAssistance discovery, the device tree for HomeAssistance is created. This is published under the topic 'homeassistant/sensor/[MQTT Client ID]' via MQTT.
<p align="center"><img src="pics/pic3.png"></p>
A device with the following sensors appears in HomeAssistant. Please note that MQTT must be activated in HomeAssistant.
<p align="center"><img src="pics/pic4.png" style="width:60%;"></p>
## Features
Raw sensor types
Sensor Accuracy Scale Range
-----------------------------
Temperature +/- 1.0 °C/°F -40 to 85 °C
Humidity +/- 3 % 0 to 100 %
Pressure +/- 1 hPa 300 to 1100 hPa
Gas Resistance Ohm
The BSEC Library calculates the following values via the gas resistance
Sensor Accuracy Scale Range
-----------------------------
IAQ value between 0 and 500
Static IAQ same as IAQ but for permanently installed devices
CO2 PPM
VOC PPM
Gas-Percentage %
In addition the usermod calculates
Sensor Accuracy Scale Range
-----------------------------
Absolute humidity g/m³
Dew point °C/°F
### IAQ (Indoor Air Quality)
The IAQ is divided into the following value groups.
<p align="center"><img src="pics/pic5.png"></p>
For more detailed information, please consult the enclosed Bosch product description (BME680.pdf).
## Calibration of the device
The gas sensor of the BME68X must be calibrated. This differs from the BME280, which does not require any calibration.
There is a range of additional information for this, which the driver also provides. These values can be found in HomeAssistant under Diagnostics.
- **STABILIZATION_STATUS**: Gas sensor stabilization status [boolean] Indicates initial stabilization status of the gas sensor element: stabilization is ongoing (0) or stabilization is finished (1).
- **RUN_IN_STATUS**: Gas sensor run-in status [boolean] Indicates power-on stabilization status of the gas sensor element: stabilization is ongoing (0) or stabilization is finished (1)
Furthermore, all GAS based values have their own accuracy value. These have the following meaning:
- **Accuracy = 0** means the sensor is being stabilized (this can take a while on the first run)
- **Accuracy = 1** means that the previous measured values show too few differences and cannot be used for calibration. If the sensor is at accuracy 1 for too long, you must ensure that the ambient air is chaning. Opening the windows is fine. Or sometimes it is sufficient to breathe on the sensor for approx. 5 minutes.
- **Accuracy = 2** means the sensor is currently calibrating.
- **Accuracy = 3** means that the sensor has been successfully calibrated. Once accuracy 3 is reached, the calibration data is automatically written to the file system. This calibration data will be used again at the next start and will speed up the calibration.
The IAQ index is therefore only meaningful if IAQ Accuracy = 3. In addition to the value for IAQ, BSEC also provides us with CO2 and VOC equivalent values. When using the sensor, the calibration value should also always be read out and displayed or transmitted.
Reasonably reliable values are therefore only achieved when accuracy displays the value 3.
## Settings
The settings of the usermods are set in the usermod section of wled.
<p align="center"><img src="pics/pic6.png"></p>
The possible settings are
- **Enable:** Enables / disables the usermod
- **I2C address:** I2C address of the sensor. You can choose between 0X77 & 0X76. The default is 0x77.
- **Interval:** Specifies the interval of seconds at which the usermod should be executed. The default is every second.
- **Pub Chages Only:** If this item is active, the values are only published if they have changed since the last publication.
- **Pub Accuracy:** The Accuracy values associated with the gas values are also published.
- **Pub Calib State:** If this item is active, STABILIZATION_STATUS& RUN_IN_STATUS are also published.
- **Temp Scale:** Here you can choose between °C and °F.
- **Temp Offset:** The temperature offset is always set in °C. It must be converted for Fahrenheit.
- **HA Discovery:** If this item is active, the HomeAssistant sensor tree is created.
- **Pause While WLED Active:** If WLED has many LEDs to calculate, the computing power may no longer be sufficient to calculate the LEDs and read the sensor data. The LEDs then hang for a few microseconds, which can be seen. If this point is active, no sensor data is fetched as long as WLED is running.
- **Del Calibration Hist:** If a check mark is set here, the calibration file saved in the file system is deleted when the settings are saved.
### Sensors
Applies to all sensors. The number of decimal places is set here. If the sensor is set to -1, it will no longer be published. In addition, the IAQ values can be activated here in verbal form.
It is recommended to use the Static IAQ for the IAQ values. This is recommended by Bosch for statically placed devices.
## Output
Data is published over MQTT - make sure you've enabled the MQTT sync interface.
In addition to outputting via MQTT, you can read the values from the Info Screen on the dashboard page of the device's web interface.
Methods also exist to read the read/calculated values from other WLED modules through code.
- getTemperature(); The scale °C/°F is depended to the settings
- getHumidity();
- getPressure();
- getGasResistance();
- getAbsoluteHumidity();
- getDewPoint(); The scale °C/°F is depended to the settings
- getIaq();
- getStaticIaq();
- getCo2();
- getVoc();
- getGasPerc();
- getIaqAccuracy();
- getStaticIaqAccuracy();
- getCo2Accuracy();
- getVocAccuracy();
- getGasPercAccuracy();
- getStabStatus();
- getRunInStatus();
## Compilation
To enable, compile with `BME68X` in `custom_usermods` (e.g. in `platformio_override.ini`)
Example:
```[env:esp32_mySpecial]
extends = env:esp32dev
custom_usermods = ${env:esp32dev.custom_usermods} BME68X
```
## Revision History
### Version 1.0.0
- First version of the BME68X_v user module
### Version 1.0.1
- Rebased to WELD Version 0.15
- Reworked some default settings
- A problem with the default settings has been fixed
### Version 1.0.2
* Rebased to WELD Version 0.16
* Fixed: Solved compilation problems related to some macro naming interferences.
## Known problems
- MQTT goes online at device start. Shortly afterwards it goes offline and takes quite a while until it goes online again. The problem does not come from this user module, but from the WLED core.
- If you save the settings often, WLED can get stuck.
- If many LEDS are connected to WLED, reading the sensor can cause a small but noticeable hang. The "Pause While WLED Active" option was introduced as a workaround.
<div><img src="pics/GeoGab.svg" width="20%"/> </div>
Gabriel Sieben (gsieben@geogab.net)

View File

@ -0,0 +1,6 @@
{
"name:": "BME68X",
"dependencies": {
"boschsensortec/BSEC Software Library":"^1.8.1492"
}
}

View File

@ -0,0 +1,76 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xml:space="preserve"
style="enable-background:new 0 0 595.28 127.56;"
viewBox="0 0 600 135"
y="0px"
x="0px"
id="Layer_1"
version="1.1"><metadata
id="metadata2372"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs2370"><linearGradient
osb:paint="solid"
id="linearGradient3877"><stop
id="stop3875"
offset="0"
style="stop-color:#808285;stop-opacity:1;" /></linearGradient><clipPath
id="clipPath2379"
clipPathUnits="userSpaceOnUse"><g
style="fill:#808285;fill-opacity:1;fill-rule:nonzero;stroke:#230065;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.99607843"
id="use2381"><path
style="fill:#808285;fill-opacity:1;fill-rule:nonzero;stroke:#230065;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.99607843"
class="st0"
d="m 588.34,94.29 c 0,13.28 -10.77,24.04 -24.04,24.04 H 31.38 C 18.1,118.33 7.34,107.57 7.34,94.29 V 32.38 C 7.34,19.1 18.1,8.34 31.38,8.34 h 532.91 c 13.28,0 24.04,10.76 24.04,24.04 V 94.29 Z M 159.44,69.66 c 0,17.15 11.68,19.07 21.89,19.07 h 14.23 c 14.6,0 23.44,-3.2 23.44,-13.87 v -0.91 h -7.84 c -0.45,7.11 -4.47,8.39 -14.32,8.39 h -10.76 c -13.68,0 -18.79,-2.74 -18.79,-13.32 V 66.65 H 219 V 60.9 C 219,44.3 208.88,40.74 194.83,40.74 h -12.59 c -11.12,0 -22.8,1.92 -22.8,18.79 z m 51.72,-9.95 h -43.87 c 0.73,-10.58 3.65,-12.59 16.05,-12.59 h 11.49 c 12.77,0 16.33,4.74 16.33,9.49 z m 18.62,10.13 c 0,15.33 10.86,18.88 25.73,18.88 h 11.22 c 14.87,0 25.72,-3.56 25.72,-18.88 V 59.62 c 0,-15.32 -10.85,-18.88 -25.72,-18.88 h -11.22 c -14.87,0 -25.73,3.56 -25.73,18.88 z m 54.82,-0.46 c 0,10.86 -6.38,12.95 -15.51,12.95 h -15.96 c -9.12,0 -15.51,-2.09 -15.51,-12.95 v -9.31 c 0,-10.85 6.39,-12.95 15.51,-12.95 h 15.96 c 9.12,0 15.51,2.1 15.51,12.95 z m 173.79,18.61 v -31.2 c 0,-13.87 -9.85,-16.06 -24.45,-16.06 h -12.41 c -14.05,0 -19.43,3.47 -19.43,11.95 v 2.28 h 7.84 v -1.64 c 0,-3.83 1.92,-6.2 11.77,-6.2 h 11.49 c 12.04,0 17.33,1.09 17.33,9.49 v 8.76 h -0.18 c -2.74,-4.47 -6.39,-5.56 -16.6,-5.56 H 421.16 C 407.48,59.81 400,61.09 400,71.67 v 3.1 c 0,8.76 3.1,13.96 14.96,13.96 h 18.79 z m -7.84,-12.5 c 0,5.84 -5.47,6.84 -19.7,6.84 h -10.4 c -10.76,0 -12.59,-2.19 -12.59,-7.39 v -1.46 c 0,-5.84 2.83,-7.3 12.95,-7.3 h 12.04 c 12.04,0 17.7,0.82 17.7,7.2 z M 73.6,66.69 h 10.88 l 5.03,0.01 h 48.67 v 2.41 c 0,9.12 -5.47,12.23 -14.41,12.23 H 88.83 c -8.58,0 -15.51,-2.55 -15.51,-14.05 v -0.35 -0.26 z m -9.16,-0.01 c 0,0.06 0,0.14 0,0.2 0.67,14.68 6.68,21.76 23.47,21.76 h 36.85 c 16.51,0 22.35,-6.39 22.35,-24.36 V 59.4 H 89.51 L 85.39,59.39 H 73.32 v -0.01 -16.9 c 0,-11.49 6.93,-14.05 15.51,-14.05 H 112 c 22.07,0 25.81,0.91 25.81,13.23 h 8.39 v -2.37 c 0,-15.23 -12.68,-18.15 -24.54,-18.15 H 87.92 c -17.88,0 -23.53,8.03 -23.53,24.72 V 59.39 L 64.38,59.4 H 44.6 c -11.86,0 -24.54,2.92 -24.54,18.15 v 2.37 5.02 2.37 c 0,15.24 12.68,18.16 24.54,18.16 h 40.79 432.59 34.03 c 17.88,0 23.54,-8.03 23.54,-24.72 V 45.88 c 0,-16.69 -5.65,-24.72 -23.54,-24.72 l -0.16,-0.02 h -223 c -17.88,0 -23.53,8.03 -23.53,24.72 v 18.06 c 0,16.69 5.65,24.72 23.53,24.72 h 36.85 c 16.51,0 22.35,-6.39 22.35,-24.36 V 59.4 h -42.78 v 7.3 h 33.84 v 2.41 c 0,9.12 -5.47,12.23 -14.41,12.23 h -34.94 c -8.58,0 -15.5,-2.55 -15.5,-14.05 V 42.48 c 0,-11.49 6.93,-14.05 15.5,-14.05 l 142.5,0.02 v 61.24 l 24.35,0.73 h 10.95 c 14.23,0 24.18,-3.56 24.18,-19.61 V 62.6 c 0,-14.87 -5.75,-20.16 -24.63,-20.16 h -11.95 -14.88 -0.17 l -0.02,-14.01 h 71.75 l -0.75,0.02 c 8.58,0 15.51,2.55 15.51,14.04 v 41.62 c 0,11.49 -6.93,14.05 -15.51,14.05 H 518.97 86.87 54.27 c -22.08,0 -25.81,-0.91 -25.81,-13.23 v -5.02 c 0,-12.31 3.74,-13.23 25.81,-13.23 h 9.84 z m 459.45,4.04 c 0,9.03 -2.83,13.32 -15.6,13.32 h -12.77 c -11.67,0 -15.42,-4.93 -15.42,-13.41 v -8.85 c 0,-11.13 6.48,-12.95 17.06,-12.95 h 10.58 c 10.76,0 16.14,2.01 16.14,12.77 v 9.12 z"
id="path3935" /><path
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#230065;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.99607843"
class="st0"
d="m 611.07375,-48.387188 c 0,13.28 -10.77,24.039999 -24.04,24.039999 H 54.113747 c -13.27999,0 -24.04,-10.76 -24.04,-24.039999 v -61.910002 c 0,-13.28 10.76001,-24.04 24.04,-24.04 H 587.02375 c 13.28,0 24.04,10.76 24.04,24.04 v 61.910002 z"
id="path3937" /></g></clipPath><clipPath
id="clipPath2398"
clipPathUnits="userSpaceOnUse"><g
id="use2400"
style="fill:#268298;fill-opacity:1"><g
id="g3959"
clip-path="url(#clipPath2407)"
style="fill:#268298;fill-opacity:1"><g
id="g3957"
style="fill:#268298;fill-opacity:1"><rect
style="opacity:1;fill:#268298;fill-opacity:1;stroke:#000000;stroke-opacity:1"
id="rect3955"
width="350.98587"
height="147.57361"
x="95.224861"
y="-97.290329" /></g></g></g></clipPath><clipPath
id="clipPath2407"
clipPathUnits="userSpaceOnUse"><g
id="use2409"
style="fill:#268298;fill-opacity:1"><rect
style="opacity:1;fill:#268298;fill-opacity:1;stroke:#000000;stroke-opacity:1"
id="rect3963"
width="350.98587"
height="147.57361"
x="95.224861"
y="-97.290329" /></g></clipPath></defs>
<style
id="style2363"
type="text/css">
.st0{fill:#808285;}
</style>
<path
style="opacity:1;fill:#ffffff;fill-opacity:0.9859813;fill-rule:nonzero;stroke:#5c7823;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.99607843"
class="st0"
d="M 600,103.51782 C 600,116.79902 588.8778,127.56 575.17384,127.56 H 24.826163 C 11.111876,127.56 5.1635108e-7,116.79902 5.1635108e-7,103.51782 V 41.602186 C 5.1635108e-7,28.320979 11.111876,17.560001 24.826163,17.560001 H 575.16351 c 13.71429,0 24.82616,10.760978 24.82616,24.042185 v 61.915634 z"
id="path2365-0" /><path
style="fill:#808285;fill-opacity:1;fill-rule:nonzero;stroke:#230065;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.99607843"
class="st0"
d="M 600,103.51782 C 600,116.79902 588.8778,127.56 575.17384,127.56 H 24.826162 C 11.111877,127.56 5.1635111e-7,116.79902 5.1635111e-7,103.51782 V 41.602187 C 5.1635111e-7,28.320977 11.111876,17.559997 24.826162,17.559997 H 575.16351 c 13.71429,0 24.82616,10.76098 24.82616,24.04219 V 103.51782 Z M 157.07401,78.885567 c 0,17.15156 12.06196,19.07173 22.60585,19.07173 h 14.69535 c 15.07745,0 24.20654,-3.20029 24.20654,-13.87125 v -0.91009 h -8.09638 c -0.46472,7.11065 -4.61618,8.39076 -14.7883,8.39076 h -11.11188 c -14.12736,0 -19.40447,-2.74024 -19.40447,-13.3212 v -2.37022 h 53.40103 v -5.75052 c 0,-16.60151 -10.45094,-20.16183 -24.96041,-20.16183 h -13.00172 c -11.48365,0 -23.54561,1.92017 -23.54561,18.79171 z m 53.41136,-9.9509 h -45.30465 c 0.75387,-10.58096 3.76936,-12.59114 16.57487,-12.59114 h 11.86575 c 13.18761,0 16.86403,4.74043 16.86403,9.49086 z m 19.22891,10.13092 c 0,15.33139 11.21515,18.88171 26.57143,18.88171 h 11.58692 c 15.35629,0 26.56111,-3.56032 26.56111,-18.88171 v -10.22093 c 0,-15.32139 -11.20482,-18.88171 -26.56111,-18.88171 h -11.58692 c -15.35628,0 -26.57143,3.56032 -26.57143,18.88171 z m 56.61275,-0.46004 c 0,10.86098 -6.58865,12.95117 -16.01722,12.95117 h -16.48193 c -9.41825,0 -16.01721,-2.09019 -16.01721,-12.95117 v -9.31085 c 0,-10.85098 6.59896,-12.95117 16.01721,-12.95117 h 16.48193 c 9.41824,0 16.01722,2.10019 16.01722,12.95117 z m 179.47332,18.61169 v -31.20283 c 0,-13.87126 -10.17212,-16.06146 -25.24957,-16.06146 h -12.81584 c -14.50946,0 -20.0654,3.47031 -20.0654,11.95108 v 2.28021 h 8.09638 v -1.64015 c 0,-3.83035 1.98279,-6.20056 12.15491,-6.20056 h 11.86575 c 12.43373,0 17.89673,1.0901 17.89673,9.49086 v 8.7608 h -0.18589 c -2.8296,-4.47041 -6.59897,-5.56051 -17.14286,-5.56051 h -13.00172 c -14.12736,0 -21.85198,1.28012 -21.85198,11.86108 v 3.10028 c 0,8.76079 3.20138,13.96126 15.44923,13.96126 h 19.40447 z m -8.09639,-12.50114 c 0,5.84053 -5.64888,6.84062 -20.34423,6.84062 h -10.74011 c -11.11187,0 -13.00172,-2.19019 -13.00172,-7.39067 v -1.46013 c 0,-5.84053 2.92255,-7.30066 13.3735,-7.30066 h 12.43373 c 12.43374,0 18.27883,0.82007 18.27883,7.20065 z m -389.27711,-8.8008 h 11.2358 l 5.194492,0.01 h 50.261618 v 2.41021 c 0,9.12083 -5.64888,12.23111 -14.88124,12.23111 H 84.154905 c -8.860585,0 -16.017212,-2.55023 -16.017212,-14.05127 v -0.35003 -0.26003 z m -9.459552,-0.01 c 0,0.06 0,0.14002 0,0.20002 0.69191,14.68133 6.898451,21.76198 24.237521,21.76198 h 38.055071 c 17.04992,0 23.0809,-6.39058 23.0809,-24.36221 v -4.88045 H 84.857142 l -4.254733,-0.01 H 68.137693 v -0.01 -16.90153 c 0,-11.49104 7.156627,-14.05129 16.017212,-14.05129 h 23.927705 c 22.79174,0 26.65405,0.91009 26.65405,13.23121 h 8.66437 v -2.37021 c 0,-15.23139 -13.09466,-18.15166 -25.34251,-18.15166 H 83.215146 c -18.464717,0 -24.299483,8.03073 -24.299483,24.72226 v 13.53122 l -0.01033,0.01 h -20.42685 c -12.247849,0 -25.342513,2.92027 -25.342513,18.15165 v 2.37022 5.02045 2.37022 c 0,15.241393 13.094664,18.161653 25.342513,18.161653 h 42.123923 446.736664 35.14286 c 18.46471,0 24.30981,-8.03073 24.30981,-24.722253 v -34.87316 c 0,-16.69153 -5.83477,-24.72226 -24.30981,-24.72226 l -0.16523,-0.02 H 332.0241 c -18.46471,0 -24.29948,8.03073 -24.29948,24.72226 v 18.06163 c 0,16.69152 5.83477,24.72225 24.29948,24.72225 h 38.05508 c 17.04991,0 23.08089,-6.39058 23.08089,-24.36221 v -4.88045 h -44.179 v 7.30067 h 34.94664 v 2.41021 c 0,9.12083 -5.64888,12.23111 -14.88123,12.23111 h -36.08262 c -8.86059,0 -16.00688,-2.55023 -16.00688,-14.05127 v -24.81225 c 0,-11.49104 7.15662,-14.05129 16.00688,-14.05129 l 147.16007,0.02 v 61.24556 l 25.14629,0.73007 h 11.30809 c 14.69536,0 24.97074,-3.56033 24.97074,-19.61178 v -8.21075 c 0,-14.87135 -5.93803,-20.16183 -25.43545,-20.16183 h -12.34079 -15.36661 -0.17556 l -0.0207,-14.01128 h 74.09639 l -0.77453,0.02 c 8.86059,0 16.01721,2.55024 16.01721,14.04128 v 41.62378 c 0,11.491053 -7.15662,14.051283 -16.01721,14.051283 H 528.36145 82.130808 48.464716 c -22.802065,0 -26.654044,-0.91008 -26.654044,-13.231213 v -5.02046 c 0,-12.31111 3.862306,-13.2312 26.654044,-13.2312 h 10.161789 z m 474.475042,4.04037 c 0,9.03082 -2.92255,13.32121 -16.11015,13.32121 h -13.18761 c -12.05164,0 -15.92427,-4.93045 -15.92427,-13.41122 v -8.8508 c 0,-11.13101 6.69191,-12.95118 17.6179,-12.95118 h 10.92599 c 11.11188,0 16.66781,2.01019 16.66781,12.77116 v 9.12083 z"
id="path2365" />
</svg>

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

View File

@ -0,0 +1,861 @@
#include "wled.h"
#include "battery_defaults.h"
#include "UMBattery.h"
#include "types/UnkownUMBattery.h"
#include "types/LionUMBattery.h"
#include "types/LipoUMBattery.h"
/*
* Usermod by Maximilian Mewes
* E-mail: mewes.maximilian@gmx.de
* Created at: 25.12.2022
* If you have any questions, please feel free to contact me.
*/
class UsermodBattery : public Usermod
{
private:
// battery pin can be defined in my_config.h
int8_t batteryPin = USERMOD_BATTERY_MEASUREMENT_PIN;
UMBattery* bat = new UnkownUMBattery();
batteryConfig cfg;
// Initial delay before first reading to allow voltage stabilization
unsigned long initialDelay = USERMOD_BATTERY_INITIAL_DELAY;
bool initialDelayComplete = false;
bool isFirstVoltageReading = true;
// how often to read the battery voltage
unsigned long readingInterval = USERMOD_BATTERY_MEASUREMENT_INTERVAL;
unsigned long nextReadTime = 0;
unsigned long lastReadTime = 0;
// between 0 and 1, to control strength of voltage smoothing filter
float alpha = USERMOD_BATTERY_AVERAGING_ALPHA;
// auto shutdown/shutoff/master off feature
bool autoOffEnabled = USERMOD_BATTERY_AUTO_OFF_ENABLED;
uint8_t autoOffThreshold = USERMOD_BATTERY_AUTO_OFF_THRESHOLD;
// low power indicator feature
bool lowPowerIndicatorEnabled = USERMOD_BATTERY_LOW_POWER_INDICATOR_ENABLED;
uint8_t lowPowerIndicatorPreset = USERMOD_BATTERY_LOW_POWER_INDICATOR_PRESET;
uint8_t lowPowerIndicatorThreshold = USERMOD_BATTERY_LOW_POWER_INDICATOR_THRESHOLD;
uint8_t lowPowerIndicatorReactivationThreshold = lowPowerIndicatorThreshold+10;
uint8_t lowPowerIndicatorDuration = USERMOD_BATTERY_LOW_POWER_INDICATOR_DURATION;
bool lowPowerIndicationDone = false;
unsigned long lowPowerActivationTime = 0; // used temporary during active time
uint8_t lastPreset = 0;
//
bool initDone = false;
bool initializing = true;
bool HomeAssistantDiscovery = false;
// strings to reduce flash memory usage (used more than twice)
static const char _name[];
static const char _readInterval[];
static const char _enabled[];
static const char _threshold[];
static const char _preset[];
static const char _duration[];
static const char _init[];
static const char _haDiscovery[];
/**
* Helper for rounding floating point values
*/
float dot2round(float x)
{
float nx = (int)(x * 100 + .5);
return (float)(nx / 100);
}
/**
* Helper for converting a string to lowercase
*/
String stringToLower(String str)
{
for(int i = 0; i < str.length(); i++)
if(str[i] >= 'A' && str[i] <= 'Z')
str[i] += 32;
return str;
}
/**
* Turn off all leds
*/
void turnOff()
{
bri = 0;
stateUpdated(CALL_MODE_DIRECT_CHANGE);
}
/**
* Indicate low power by activating a configured preset for a given time and then switching back to the preset that was selected previously
*/
void lowPowerIndicator()
{
if (!lowPowerIndicatorEnabled) return;
if (batteryPin < 0) return; // no measurement
if (lowPowerIndicationDone && lowPowerIndicatorReactivationThreshold <= bat->getLevel()) lowPowerIndicationDone = false;
if (lowPowerIndicatorThreshold <= bat->getLevel()) return;
if (lowPowerIndicationDone) return;
if (lowPowerActivationTime <= 1) {
lowPowerActivationTime = millis();
lastPreset = currentPreset;
applyPreset(lowPowerIndicatorPreset);
}
if (lowPowerActivationTime+(lowPowerIndicatorDuration*1000) <= millis()) {
lowPowerIndicationDone = true;
lowPowerActivationTime = 0;
applyPreset(lastPreset);
}
}
/**
* read the battery voltage in different ways depending on the architecture
*/
float readVoltage()
{
#ifdef ARDUINO_ARCH_ESP32
// use calibrated millivolts analogread on esp32 (150 mV ~ 2450 mV default attentuation) and divide by 1000 to get from milivolts to volts and multiply by voltage multiplier and apply calibration value
return (analogReadMilliVolts(batteryPin) / 1000.0f) * bat->getVoltageMultiplier() + bat->getCalibration();
#else
// use analog read on esp8266 ( 0V ~ 1V no attenuation options) and divide by ADC precision 1023 and multiply by voltage multiplier and apply calibration value
return (analogRead(batteryPin) / 1023.0f) * bat->getVoltageMultiplier() + bat->getCalibration();
#endif
}
#ifndef WLED_DISABLE_MQTT
void addMqttSensor(const String &name, const String &type, const String &topic, const String &deviceClass, const String &unitOfMeasurement = "", const bool &isDiagnostic = false)
{
StaticJsonDocument<600> doc;
char uid[128], json_str[1024], buf[128];
doc[F("name")] = name;
doc[F("stat_t")] = topic;
sprintf_P(uid, PSTR("%s_%s_%s"), escapedMac.c_str(), stringToLower(name).c_str(), type);
doc[F("uniq_id")] = uid;
doc[F("dev_cla")] = deviceClass;
doc[F("exp_aft")] = 1800;
if(type == "binary_sensor") {
doc[F("pl_on")] = "on";
doc[F("pl_off")] = "off";
}
if(unitOfMeasurement != "")
doc[F("unit_of_measurement")] = unitOfMeasurement;
if(isDiagnostic)
doc[F("entity_category")] = "diagnostic";
JsonObject device = doc.createNestedObject(F("device")); // attach the sensor to the same device
device[F("name")] = serverDescription;
device[F("ids")] = String(F("wled-sensor-")) + mqttClientID;
device[F("mf")] = F(WLED_BRAND);
device[F("mdl")] = F(WLED_PRODUCT_NAME);
device[F("sw")] = versionString;
sprintf_P(buf, PSTR("homeassistant/%s/%s/%s/config"), type, mqttClientID, uid);
DEBUG_PRINTLN(buf);
size_t payload_size = serializeJson(doc, json_str);
DEBUG_PRINTLN(json_str);
mqtt->publish(buf, 0, true, json_str, payload_size);
}
void publishMqtt(const char* topic, const char* state)
{
if (WLED_MQTT_CONNECTED) {
char buf[128];
snprintf_P(buf, 127, PSTR("%s/%s"), mqttDeviceTopic, topic);
mqtt->publish(buf, 0, false, state);
}
}
#endif
public:
//Functions called by WLED
/**
* setup() is called once at boot. WiFi is not yet connected at this point.
* You can use it to initialize variables, sensors or similar.
*/
void setup()
{
// plug in the right battery type
if(cfg.type == (batteryType)lipo) {
bat = new LipoUMBattery();
} else if(cfg.type == (batteryType)lion) {
bat = new LionUMBattery();
}
// update the choosen battery type with configured values
bat->update(cfg);
#ifdef ARDUINO_ARCH_ESP32
bool success = false;
DEBUG_PRINTLN(F("Allocating battery pin..."));
if (batteryPin >= 0 && digitalPinToAnalogChannel(batteryPin) >= 0)
if (PinManager::allocatePin(batteryPin, false, PinOwner::UM_Battery)) {
DEBUG_PRINTLN(F("Battery pin allocation succeeded."));
success = true;
}
if (!success) {
DEBUG_PRINTLN(F("Battery pin allocation failed."));
batteryPin = -1; // allocation failed
} else {
pinMode(batteryPin, INPUT);
}
#else //ESP8266 boards have only one analog input pin A0
pinMode(batteryPin, INPUT);
#endif
// First voltage reading is delayed to allow voltage stabilization after powering up
nextReadTime = millis() + initialDelay;
lastReadTime = millis();
initDone = true;
}
/**
* connected() is called every time the WiFi is (re)connected
* Use it to initialize network interfaces
*/
void connected()
{
//Serial.println("Connected to WiFi!");
}
/*
* loop() is called continuously. Here you can check for events, read sensors, etc.
*
*/
void loop()
{
if(strip.isUpdating()) return;
lowPowerIndicator();
// Handling the initial delay
if (!initialDelayComplete && millis() < nextReadTime)
return; // Continue to return until the initial delay is over
// Once the initial delay is over, set it as complete
if (!initialDelayComplete)
{
initialDelayComplete = true;
// Set the regular interval after initial delay
nextReadTime = millis() + readingInterval;
}
// Make the first voltage reading after the initial delay has elapsed
if (isFirstVoltageReading)
{
bat->setVoltage(readVoltage());
isFirstVoltageReading = false;
}
// check the battery level every USERMOD_BATTERY_MEASUREMENT_INTERVAL (ms)
if (millis() < nextReadTime) return;
nextReadTime = millis() + readingInterval;
lastReadTime = millis();
if (batteryPin < 0) return; // nothing to read
initializing = false;
float rawValue = readVoltage();
// filter with exponential smoothing because ADC in esp32 is fluctuating too much for a good single readout
float filteredVoltage = bat->getVoltage() + alpha * (rawValue - bat->getVoltage());
bat->setVoltage(filteredVoltage);
// translate battery voltage into percentage
bat->calculateAndSetLevel(filteredVoltage);
// Auto off -- Master power off
if (autoOffEnabled && (autoOffThreshold >= bat->getLevel()))
turnOff();
#ifndef WLED_DISABLE_MQTT
publishMqtt("battery", String(bat->getLevel(), 0).c_str());
publishMqtt("voltage", String(bat->getVoltage()).c_str());
#endif
}
/**
* addToJsonInfo() can be used to add custom entries to the /json/info part of the JSON API.
* Creating an "u" object allows you to add custom key/value pairs to the Info section of the WLED web UI.
* Below it is shown how this could be used for e.g. a light sensor
*/
void addToJsonInfo(JsonObject& root)
{
JsonObject user = root["u"];
if (user.isNull()) user = root.createNestedObject("u");
if (batteryPin < 0) {
JsonArray infoVoltage = user.createNestedArray(F("Battery voltage"));
infoVoltage.add(F("n/a"));
infoVoltage.add(F(" invalid GPIO"));
return; // no GPIO - nothing to report
}
// info modal display names
JsonArray infoPercentage = user.createNestedArray(F("Battery level"));
JsonArray infoVoltage = user.createNestedArray(F("Battery voltage"));
JsonArray infoNextUpdate = user.createNestedArray(F("Next update"));
infoNextUpdate.add((nextReadTime - millis()) / 1000);
infoNextUpdate.add(F(" sec"));
if (initializing) {
infoPercentage.add(FPSTR(_init));
infoVoltage.add(FPSTR(_init));
return;
}
if (bat->getLevel() < 0) {
infoPercentage.add(F("invalid"));
} else {
infoPercentage.add(bat->getLevel());
}
infoPercentage.add(F(" %"));
if (bat->getVoltage() < 0) {
infoVoltage.add(F("invalid"));
} else {
infoVoltage.add(dot2round(bat->getVoltage()));
}
infoVoltage.add(F(" V"));
}
void addBatteryToJsonObject(JsonObject& battery, bool forJsonState)
{
if(forJsonState) { battery[F("type")] = cfg.type; } else {battery[F("type")] = (String)cfg.type; } // has to be a String otherwise it won't get converted to a Dropdown
battery[F("min-voltage")] = bat->getMinVoltage();
battery[F("max-voltage")] = bat->getMaxVoltage();
battery[F("calibration")] = bat->getCalibration();
battery[F("voltage-multiplier")] = bat->getVoltageMultiplier();
battery[FPSTR(_readInterval)] = readingInterval;
battery[FPSTR(_haDiscovery)] = HomeAssistantDiscovery;
JsonObject ao = battery.createNestedObject(F("auto-off")); // auto off section
ao[FPSTR(_enabled)] = autoOffEnabled;
ao[FPSTR(_threshold)] = autoOffThreshold;
JsonObject lp = battery.createNestedObject(F("indicator")); // low power section
lp[FPSTR(_enabled)] = lowPowerIndicatorEnabled;
lp[FPSTR(_preset)] = lowPowerIndicatorPreset; // dropdown trickery (String)lowPowerIndicatorPreset;
lp[FPSTR(_threshold)] = lowPowerIndicatorThreshold;
lp[FPSTR(_duration)] = lowPowerIndicatorDuration;
}
void getUsermodConfigFromJsonObject(JsonObject& battery)
{
getJsonValue(battery[F("type")], cfg.type);
getJsonValue(battery[F("min-voltage")], cfg.minVoltage);
getJsonValue(battery[F("max-voltage")], cfg.maxVoltage);
getJsonValue(battery[F("calibration")], cfg.calibration);
getJsonValue(battery[F("voltage-multiplier")], cfg.voltageMultiplier);
setReadingInterval(battery[FPSTR(_readInterval)] | readingInterval);
setHomeAssistantDiscovery(battery[FPSTR(_haDiscovery)] | HomeAssistantDiscovery);
JsonObject ao = battery[F("auto-off")];
setAutoOffEnabled(ao[FPSTR(_enabled)] | autoOffEnabled);
setAutoOffThreshold(ao[FPSTR(_threshold)] | autoOffThreshold);
JsonObject lp = battery[F("indicator")];
setLowPowerIndicatorEnabled(lp[FPSTR(_enabled)] | lowPowerIndicatorEnabled);
setLowPowerIndicatorPreset(lp[FPSTR(_preset)] | lowPowerIndicatorPreset);
setLowPowerIndicatorThreshold(lp[FPSTR(_threshold)] | lowPowerIndicatorThreshold);
lowPowerIndicatorReactivationThreshold = lowPowerIndicatorThreshold+10;
setLowPowerIndicatorDuration(lp[FPSTR(_duration)] | lowPowerIndicatorDuration);
if(initDone)
bat->update(cfg);
}
/**
* addToJsonState() can be used to add custom entries to the /json/state part of the JSON API (state object).
* Values in the state object may be modified by connected clients
*/
void addToJsonState(JsonObject& root)
{
JsonObject battery = root.createNestedObject(FPSTR(_name));
if (battery.isNull())
battery = root.createNestedObject(FPSTR(_name));
addBatteryToJsonObject(battery, true);
DEBUG_PRINTLN(F("Battery state exposed in JSON API."));
}
/**
* readFromJsonState() can be used to receive data clients send to the /json/state part of the JSON API (state object).
* Values in the state object may be modified by connected clients
*/
/*
void readFromJsonState(JsonObject& root)
{
if (!initDone) return; // prevent crash on boot applyPreset()
JsonObject battery = root[FPSTR(_name)];
if (!battery.isNull()) {
getUsermodConfigFromJsonObject(battery);
DEBUG_PRINTLN(F("Battery state read from JSON API."));
}
}
*/
/**
* addToConfig() can be used to add custom persistent settings to the cfg.json file in the "um" (usermod) object.
* It will be called by WLED when settings are actually saved (for example, LED settings are saved)
* If you want to force saving the current state, use serializeConfig() in your loop().
*
* CAUTION: serializeConfig() will initiate a filesystem write operation.
* It might cause the LEDs to stutter and will cause flash wear if called too often.
* Use it sparingly and always in the loop, never in network callbacks!
*
* addToConfig() will make your settings editable through the Usermod Settings page automatically.
*
* Usermod Settings Overview:
* - Numeric values are treated as floats in the browser.
* - If the numeric value entered into the browser contains a decimal point, it will be parsed as a C float
* before being returned to the Usermod. The float data type has only 6-7 decimal digits of precision, and
* doubles are not supported, numbers will be rounded to the nearest float value when being parsed.
* The range accepted by the input field is +/- 1.175494351e-38 to +/- 3.402823466e+38.
* - If the numeric value entered into the browser doesn't contain a decimal point, it will be parsed as a
* C int32_t (range: -2147483648 to 2147483647) before being returned to the usermod.
* Overflows or underflows are truncated to the max/min value for an int32_t, and again truncated to the type
* used in the Usermod when reading the value from ArduinoJson.
* - Pin values can be treated differently from an integer value by using the key name "pin"
* - "pin" can contain a single or array of integer values
* - On the Usermod Settings page there is simple checking for pin conflicts and warnings for special pins
* - Red color indicates a conflict. Yellow color indicates a pin with a warning (e.g. an input-only pin)
* - Tip: use int8_t to store the pin value in the Usermod, so a -1 value (pin not set) can be used
*
* See usermod_v2_auto_save.h for an example that saves Flash space by reusing ArduinoJson key name strings
*
* If you need a dedicated settings page with custom layout for your Usermod, that takes a lot more work.
* You will have to add the setting to the HTML, xml.cpp and set.cpp manually.
* See the WLED Soundreactive fork (code and wiki) for reference. https://github.com/atuline/WLED
*
* I highly recommend checking out the basics of ArduinoJson serialization and deserialization in order to use custom settings!
*/
void addToConfig(JsonObject& root)
{
JsonObject battery = root.createNestedObject(FPSTR(_name));
if (battery.isNull()) {
battery = root.createNestedObject(FPSTR(_name));
}
#ifdef ARDUINO_ARCH_ESP32
battery[F("pin")] = batteryPin;
#endif
addBatteryToJsonObject(battery, false);
// read voltage in case calibration or voltage multiplier changed to see immediate effect
bat->setVoltage(readVoltage());
DEBUG_PRINTLN(F("Battery config saved."));
}
void appendConfigData()
{
// Total: 462 Bytes
oappend(F("td=addDropdown('Battery','type');")); // 34 Bytes
oappend(F("addOption(td,'Unkown','0');")); // 28 Bytes
oappend(F("addOption(td,'LiPo','1');")); // 26 Bytes
oappend(F("addOption(td,'LiOn','2');")); // 26 Bytes
oappend(F("addInfo('Battery:type',1,'<small style=\"color:orange\">requires reboot</small>');")); // 81 Bytes
oappend(F("addInfo('Battery:min-voltage',1,'v');")); // 38 Bytes
oappend(F("addInfo('Battery:max-voltage',1,'v');")); // 38 Bytes
oappend(F("addInfo('Battery:interval',1,'ms');")); // 36 Bytes
oappend(F("addInfo('Battery:HA-discovery',1,'');")); // 38 Bytes
oappend(F("addInfo('Battery:auto-off:threshold',1,'%');")); // 45 Bytes
oappend(F("addInfo('Battery:indicator:threshold',1,'%');")); // 46 Bytes
oappend(F("addInfo('Battery:indicator:duration',1,'s');")); // 45 Bytes
// this option list would exeed the oappend() buffer
// a list of all presets to select one from
// oappend(F("bd=addDropdown('Battery:low-power-indicator', 'preset');"));
// the loop generates: oappend(F("addOption(bd, 'preset name', preset id);"));
// for(int8_t i=1; i < 42; i++) {
// oappend(F("addOption(bd, 'Preset#"));
// oappendi(i);
// oappend(F("',"));
// oappendi(i);
// oappend(F(");"));
// }
}
/**
* readFromConfig() can be used to read back the custom settings you added with addToConfig().
* This is called by WLED when settings are loaded (currently this only happens immediately after boot, or after saving on the Usermod Settings page)
*
* readFromConfig() is called BEFORE setup(). This means you can use your persistent values in setup() (e.g. pin assignments, buffer sizes),
* but also that if you want to write persistent values to a dynamic buffer, you'd need to allocate it here instead of in setup.
* If you don't know what that is, don't fret. It most likely doesn't affect your use case :)
*
* Return true in case the config values returned from Usermod Settings were complete, or false if you'd like WLED to save your defaults to disk (so any missing values are editable in Usermod Settings)
*
* getJsonValue() returns false if the value is missing, or copies the value into the variable provided and returns true if the value is present
* The configComplete variable is true only if the "exampleUsermod" object and all values are present. If any values are missing, WLED will know to call addToConfig() to save them
*
* This function is guaranteed to be called on boot, but could also be called every time settings are updated
*/
bool readFromConfig(JsonObject& root)
{
#ifdef ARDUINO_ARCH_ESP32
int8_t newBatteryPin = batteryPin;
#endif
JsonObject battery = root[FPSTR(_name)];
if (battery.isNull())
{
DEBUG_PRINT(FPSTR(_name));
DEBUG_PRINTLN(F(": No config found. (Using defaults.)"));
return false;
}
#ifdef ARDUINO_ARCH_ESP32
newBatteryPin = battery[F("pin")] | newBatteryPin;
#endif
setMinBatteryVoltage(battery[F("min-voltage")] | bat->getMinVoltage());
setMaxBatteryVoltage(battery[F("max-voltage")] | bat->getMaxVoltage());
setCalibration(battery[F("calibration")] | bat->getCalibration());
setVoltageMultiplier(battery[F("voltage-multiplier")] | bat->getVoltageMultiplier());
setReadingInterval(battery[FPSTR(_readInterval)] | readingInterval);
setHomeAssistantDiscovery(battery[FPSTR(_haDiscovery)] | HomeAssistantDiscovery);
getUsermodConfigFromJsonObject(battery);
#ifdef ARDUINO_ARCH_ESP32
if (!initDone)
{
// first run: reading from cfg.json
batteryPin = newBatteryPin;
DEBUG_PRINTLN(F(" config loaded."));
}
else
{
DEBUG_PRINTLN(F(" config (re)loaded."));
// changing parameters from settings page
if (newBatteryPin != batteryPin)
{
// deallocate pin
PinManager::deallocatePin(batteryPin, PinOwner::UM_Battery);
batteryPin = newBatteryPin;
// initialise
setup();
}
}
#endif
return !battery[FPSTR(_readInterval)].isNull();
}
#ifndef WLED_DISABLE_MQTT
void onMqttConnect(bool sessionPresent)
{
// Home Assistant Autodiscovery
if (!HomeAssistantDiscovery)
return;
// battery percentage
char mqttBatteryTopic[128];
snprintf_P(mqttBatteryTopic, 127, PSTR("%s/battery"), mqttDeviceTopic);
this->addMqttSensor(F("Battery"), "sensor", mqttBatteryTopic, "battery", "%", true);
// voltage
char mqttVoltageTopic[128];
snprintf_P(mqttVoltageTopic, 127, PSTR("%s/voltage"), mqttDeviceTopic);
this->addMqttSensor(F("Voltage"), "sensor", mqttVoltageTopic, "voltage", "V", true);
}
#endif
/*
*
* Getter and Setter. Just in case some other usermod wants to interact with this in the future
*
*/
/**
* getId() allows you to optionally give your V2 usermod an unique ID (please define it in const.h!).
* This could be used in the future for the system to determine whether your usermod is installed.
*/
uint16_t getId()
{
return USERMOD_ID_BATTERY;
}
/**
* get currently active battery type
*/
batteryType getBatteryType()
{
return cfg.type;
}
/**
*
*/
unsigned long getReadingInterval()
{
return readingInterval;
}
/**
* minimum repetition is 3000ms (3s)
*/
void setReadingInterval(unsigned long newReadingInterval)
{
readingInterval = max((unsigned long)3000, newReadingInterval);
}
/**
* Get lowest configured battery voltage
*/
float getMinBatteryVoltage()
{
return bat->getMinVoltage();
}
/**
* Set lowest battery voltage
* can't be below 0 volt
*/
void setMinBatteryVoltage(float voltage)
{
bat->setMinVoltage(voltage);
}
/**
* Get highest configured battery voltage
*/
float getMaxBatteryVoltage()
{
return bat->getMaxVoltage();
}
/**
* Set highest battery voltage
* can't be below minBatteryVoltage
*/
void setMaxBatteryVoltage(float voltage)
{
bat->setMaxVoltage(voltage);
}
/**
* Get the calculated voltage
* formula: (adc pin value / adc precision * max voltage) + calibration
*/
float getVoltage()
{
return bat->getVoltage();
}
/**
* Get the mapped battery level (0 - 100) based on voltage
* important: voltage can drop when a load is applied, so its only an estimate
*/
int8_t getBatteryLevel()
{
return bat->getLevel();
}
/**
* Get the configured calibration value
* a offset value to fine-tune the calculated voltage.
*/
float getCalibration()
{
return bat->getCalibration();
}
/**
* Set the voltage calibration offset value
* a offset value to fine-tune the calculated voltage.
*/
void setCalibration(float offset)
{
bat->setCalibration(offset);
}
/**
* Set the voltage multiplier value
* A multiplier that may need adjusting for different voltage divider setups
*/
void setVoltageMultiplier(float multiplier)
{
bat->setVoltageMultiplier(multiplier);
}
/*
* Get the voltage multiplier value
* A multiplier that may need adjusting for different voltage divider setups
*/
float getVoltageMultiplier()
{
return bat->getVoltageMultiplier();
}
/**
* Get auto-off feature enabled status
* is auto-off enabled, true/false
*/
bool getAutoOffEnabled()
{
return autoOffEnabled;
}
/**
* Set auto-off feature status
*/
void setAutoOffEnabled(bool enabled)
{
autoOffEnabled = enabled;
}
/**
* Get auto-off threshold in percent (0-100)
*/
int8_t getAutoOffThreshold()
{
return autoOffThreshold;
}
/**
* Set auto-off threshold in percent (0-100)
*/
void setAutoOffThreshold(int8_t threshold)
{
autoOffThreshold = min((int8_t)100, max((int8_t)0, threshold));
// when low power indicator is enabled the auto-off threshold cannot be above indicator threshold
autoOffThreshold = lowPowerIndicatorEnabled /*&& autoOffEnabled*/ ? min(lowPowerIndicatorThreshold-1, (int)autoOffThreshold) : autoOffThreshold;
}
/**
* Get low-power-indicator feature enabled status
* is the low-power-indicator enabled, true/false
*/
bool getLowPowerIndicatorEnabled()
{
return lowPowerIndicatorEnabled;
}
/**
* Set low-power-indicator feature status
*/
void setLowPowerIndicatorEnabled(bool enabled)
{
lowPowerIndicatorEnabled = enabled;
}
/**
* Get low-power-indicator preset to activate when low power is detected
*/
int8_t getLowPowerIndicatorPreset()
{
return lowPowerIndicatorPreset;
}
/**
* Set low-power-indicator preset to activate when low power is detected
*/
void setLowPowerIndicatorPreset(int8_t presetId)
{
// String tmp = ""; For what ever reason this doesn't work :(
// lowPowerIndicatorPreset = getPresetName(presetId, tmp) ? presetId : lowPowerIndicatorPreset;
lowPowerIndicatorPreset = presetId;
}
/*
* Get low-power-indicator threshold in percent (0-100)
*/
int8_t getLowPowerIndicatorThreshold()
{
return lowPowerIndicatorThreshold;
}
/**
* Set low-power-indicator threshold in percent (0-100)
*/
void setLowPowerIndicatorThreshold(int8_t threshold)
{
lowPowerIndicatorThreshold = threshold;
// when auto-off is enabled the indicator threshold cannot be below auto-off threshold
lowPowerIndicatorThreshold = autoOffEnabled /*&& lowPowerIndicatorEnabled*/ ? max(autoOffThreshold+1, (int)lowPowerIndicatorThreshold) : max(5, (int)lowPowerIndicatorThreshold);
}
/**
* Get low-power-indicator duration in seconds
*/
int8_t getLowPowerIndicatorDuration()
{
return lowPowerIndicatorDuration;
}
/**
* Set low-power-indicator duration in seconds
*/
void setLowPowerIndicatorDuration(int8_t duration)
{
lowPowerIndicatorDuration = duration;
}
/**
* Get low-power-indicator status when the indication is done this returns true
*/
bool getLowPowerIndicatorDone()
{
return lowPowerIndicationDone;
}
/**
* Set Home Assistant auto discovery
*/
void setHomeAssistantDiscovery(bool enable)
{
HomeAssistantDiscovery = enable;
}
/**
* Get Home Assistant auto discovery
*/
bool getHomeAssistantDiscovery()
{
return HomeAssistantDiscovery;
}
};
// strings to reduce flash memory usage (used more than twice)
const char UsermodBattery::_name[] PROGMEM = "Battery";
const char UsermodBattery::_readInterval[] PROGMEM = "interval";
const char UsermodBattery::_enabled[] PROGMEM = "enabled";
const char UsermodBattery::_threshold[] PROGMEM = "threshold";
const char UsermodBattery::_preset[] PROGMEM = "preset";
const char UsermodBattery::_duration[] PROGMEM = "duration";
const char UsermodBattery::_init[] PROGMEM = "init";
const char UsermodBattery::_haDiscovery[] PROGMEM = "HA-discovery";
static UsermodBattery battery;
REGISTER_USERMOD(battery);

View File

@ -0,0 +1,160 @@
#ifndef UMBBattery_h
#define UMBBattery_h
#include "battery_defaults.h"
/**
* Battery base class
* all other battery classes should inherit from this
*/
class UMBattery
{
private:
protected:
float minVoltage;
float maxVoltage;
float voltage;
int8_t level = 100;
float calibration; // offset or calibration value to fine tune the calculated voltage
float voltageMultiplier; // ratio for the voltage divider
float linearMapping(float v, float min, float max, float oMin = 0.0f, float oMax = 100.0f)
{
return (v-min) * (oMax-oMin) / (max-min) + oMin;
}
public:
UMBattery()
{
this->setVoltageMultiplier(USERMOD_BATTERY_VOLTAGE_MULTIPLIER);
this->setCalibration(USERMOD_BATTERY_CALIBRATION);
}
virtual void update(batteryConfig cfg)
{
if(cfg.minVoltage) this->setMinVoltage(cfg.minVoltage);
if(cfg.maxVoltage) this->setMaxVoltage(cfg.maxVoltage);
if(cfg.level) this->setLevel(cfg.level);
if(cfg.calibration) this->setCalibration(cfg.calibration);
if(cfg.voltageMultiplier) this->setVoltageMultiplier(cfg.voltageMultiplier);
}
/**
* Corresponding battery curves
* calculates the level in % (0-100) with given voltage and possible voltage range
*/
virtual float mapVoltage(float v, float min, float max) = 0;
// {
// example implementation, linear mapping
// return (v-min) * 100 / (max-min);
// };
virtual void calculateAndSetLevel(float voltage) = 0;
/*
*
* Getter and Setter
*
*/
/*
* Get lowest configured battery voltage
*/
virtual float getMinVoltage()
{
return this->minVoltage;
}
/*
* Set lowest battery voltage
* can't be below 0 volt
*/
virtual void setMinVoltage(float voltage)
{
this->minVoltage = max(0.0f, voltage);
}
/*
* Get highest configured battery voltage
*/
virtual float getMaxVoltage()
{
return this->maxVoltage;
}
/*
* Set highest battery voltage
* can't be below minVoltage
*/
virtual void setMaxVoltage(float voltage)
{
this->maxVoltage = max(getMinVoltage()+.5f, voltage);
}
float getVoltage()
{
return this->voltage;
}
/**
* check if voltage is within specified voltage range, allow 10% over/under voltage
*/
void setVoltage(float voltage)
{
// this->voltage = ( (voltage < this->getMinVoltage() * 0.85f) || (voltage > this->getMaxVoltage() * 1.1f) )
// ? -1.0f
// : voltage;
this->voltage = voltage;
}
float getLevel()
{
return this->level;
}
void setLevel(float level)
{
this->level = constrain(level, 0.0f, 110.0f);
}
/*
* Get the configured calibration value
* a offset value to fine-tune the calculated voltage.
*/
virtual float getCalibration()
{
return calibration;
}
/*
* Set the voltage calibration offset value
* a offset value to fine-tune the calculated voltage.
*/
virtual void setCalibration(float offset)
{
calibration = offset;
}
/*
* Get the configured calibration value
* a value to set the voltage divider ratio
*/
virtual float getVoltageMultiplier()
{
return voltageMultiplier;
}
/*
* Set the voltage multiplier value
* a value to set the voltage divider ratio.
*/
virtual void setVoltageMultiplier(float multiplier)
{
voltageMultiplier = multiplier;
}
};
#endif

Some files were not shown because too many files have changed in this diff Show More