Commit Graph

2829 Commits

Author SHA1 Message Date
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
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
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
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
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
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
050489dd80 allow Lolin Wifi Fix on -S3 2023-07-20 22:09:48 +02: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
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
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
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
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
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 b4f08fa8d5.

* 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
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
cschwinne
c04c73bbd7 WS logic: No resending, improved ESP8266 stability
Update ESP8266 core to 3.1.2
2023-06-18 01:07:50 +02: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
Blaz Kristan
75244853c1 Fix for #3251 2023-06-16 10:24:56 +02: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