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)
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.
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().
* 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.
* 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)
* 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>
* 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>
* 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
* 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>
* 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>
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
* 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>
* 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.
* 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)
* 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
* 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>
* 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>
* 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>
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) {
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.
* 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)
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