Wykres commitów

303 Commity (remove-v1-usermod)

Autor SHA1 Wiadomość Data
Damian Schneider cae98451e3 Merge remote-tracking branch 'upstream/main' into 0_15__speed_improvements 2024-12-20 09:12:01 +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 fd3b47908b renamed functions, changed timeout to 24ms 2024-12-19 17:41:44 +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
Blaž Kristan 4758b5efe8 Proper fix for #3605 & #4346
- allow incrementing/decrementing as specified in API
2024-12-07 10:11:25 +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
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 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
Will Miles 2a094883ad Better oappend shim on ESP8266
Detect IRAM pointers if we can't be sure.
2024-10-23 20:01:42 -04:00
Will Miles 95b4bde918 UsermodManager: Make into namespace
Namespaces are the C++ language construct for grouping global functions.
2024-10-20 11:11:20 -04: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 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
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 3f3c986932 Merge branch '0_15' into end_oappend_v2 2024-09-24 21:43:47 +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 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 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
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 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
Damian Schneider d45b4ad134 fixes and consistency 2024-09-13 19:01:54 +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 de5632b1cf Merge branch '0_15' into blending-styles 2024-06-01 17:54:57 +02:00
Blaz Kristan 501f988b0f ESP-NOW usermod hook 2024-05-25 20:01:38 +02:00
Blaž Kristan f441ce9c17 Merge branch '0_15' into blending-styles 2024-05-12 08:12:58 +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
Blaz Kristan a320f16404 Real math fix 2024-05-09 23:58:58 +02:00
Blaz Kristan 2ff49cf657 Fix for #3952
- included IR optimisations & code rearrangement
2024-05-03 15:45:15 +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
Blaz Kristan 0c8d9d5614 Mode blending styles
- alternative to #3669
2024-04-03 18:38:06 +02:00
Blaz Kristan ecfdc6f0a8 Bugfixes:
- #3843
- #3844
- network scan on new install
- misc optimization
2024-03-22 20:49:13 +01: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
Christian Schwinne b2afac8914 GIFs work again in principle 2024-03-10 21:36:13 +01:00
Christian Schwinne 3ad56ea103 GIF testing 2024-03-10 14:34:15 +01:00
Christian Schwinne 7e17011ebc Revert "Merge branch 'gif' into 0_15"
This reverts commit cb5eb9edc7, reversing
changes made to da5c12f466.
2024-03-09 20:00:41 +01:00
Christian Schwinne cb5eb9edc7
Merge branch 'gif' into 0_15 2024-03-09 18:23:59 +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
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
Blaz Kristan 41129cf379 Sqeeze every byte 2024-02-25 17:08:01 +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
Blaz Kristan 66d9e8c038 Merge branch '0_15' into harmonic-random-palette-generator 2024-02-06 10:53:44 +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
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 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 bfb217c203 Implement multiple WiFi
- similar to #3705
- solves #2845, #2974, #852, #1228
2024-01-21 00:30:15 +01:00
Christian Schwinne 9378fc7276 Merge remote-tracking branch 'origin/0_15' into gif 2024-01-16 21:53:08 +01: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
Blaz Kristan 67ae716c60 JSON HTTP error handling 2023-12-12 15:45:57 +01:00
Blaz Kristan 2b616b688d Implement global JSON API boolean toggle. 2023-11-06 20:08:45 +01: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
Aircoookie 2f9c126d34 GIF Error codes 2023-07-31 18:13:03 +02:00
cschwinne c16462a0ce Experimental GIF support 2023-06-30 23:59:29 +02:00
Christian Schwinne 481bd6f57a
Add WiFi network scan RPC command to Improv Serial (#3271) 2023-06-27 01:51:44 +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
Aircoookie dd9da2853a Support settings pin unlock via JSON
Also supports locking by providing any incorrect pin
2023-06-14 11:53:39 +02:00
Blaz Kristan 3ca58ee65f Pin dropdowns POC.
NeoPixelBusGammaMethod POC.
PixelMagic POC.
Button reassign POC.
2023-06-10 20:43:27 +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
Blaz Kristan 763b64cc57 Combat low memory condition on ESP8266. 2023-03-10 15:20:50 +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
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 d78bef72ea Disable MQTT more.
Disable Alexa more.
2023-01-12 20:35:34 +01:00
Blaž Kristan 506b6b51ce whitespace cleanup 2023-01-06 09:24:29 +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
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 f8db06c7c5.

* 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 7642f8d702 Async preset saving.
Minor bugfixes.
2022-10-08 18:25:51 +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 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
Blaz Kristan 1cb3ab82c2 Reduction of flicering on web access (info) 2022-08-10 20:53:11 +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
Blaz Kristan 1abf0fc134 Deprecate EEPROM support (compile time option). 2022-07-30 11:04:04 +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
Blaz Kristan 8e9637f6d4 Default effect values. 2022-07-23 22:00:19 +02:00
Blaž Kristan 35250677b9 Prevent I2S use for LEDs w/ Audioreactive on ESP32 2022-07-22 08:59:04 +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
Blaz Kristan 8c759cb65a Usermod config info & data. 2022-06-11 18:55:23 +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 184ff7a3b3 Audioreactive usermod. 2022-06-08 21:14:01 +02:00
Blaz Kristan f1a1b89d13 Fixes.
- correct preset cycling
- updated rotary encoder preset selection
2022-06-03 22:22:18 +02:00
Blaz Kristan 17be0a2c12 Enhance rotary encoder with custom sliders.
Soft watchdog timer (by poelzi)
2022-05-24 13:45:35 +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
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 081f211231 Merge branch 'master' into merge-master 2022-04-04 20:52:42 +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
Blaž Kristan 0234017ca1 Merge branch 'master' into master-merge 2022-03-15 09:55:23 +01:00