Blaž Kristan
ba5ec57e4d
Enumeration support.
2024-11-09 11:33:10 +01: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
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
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
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
011afd0910
Merge branch '0_15' into blending-styles
2024-08-17 15:24:20 +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
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
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
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
Blaz Kristan
efa32ed4f6
Size optimisations
2024-07-09 21:50:27 +02:00
Blaz Kristan
296df2660a
Merge branch '0_15' into blending-styles
2024-06-16 18:22:21 +02: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
0c8d9d5614
Mode blending styles
...
- alternative to #3669
2024-04-03 18:38:06 +02:00
Blaz Kristan
fd149b3f46
fileDoc removal (optimisation)
2024-03-26 17:18:52 +01:00
thatdonfc
ecee073e08
Fix palette names when palette ID > 58 and not custom
2024-03-19 14:04:24 -07: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
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
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
7eae8f68d8
Merge branch 'main' into 0_15
2024-02-06 14:47:20 +01:00
Blaz Kristan
1f81fb9284
Implement JSON buffer in PSRAM to free up DRAM.
2023-12-21 21:30:17 +01:00
Blaz Kristan
c0412d368e
SEGLEN bugfix if default map1D2D not defined
...
- comments
2023-12-02 00:48:49 +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
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
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
Blaz Kristan
06402cf1c6
Making buffer fix easy to maintain and portable.
...
Thanks to @softhack007
2023-08-17 17:10:29 +02:00
Blaz Kristan
7e28718681
Too long metadata string bugfix.
2023-08-17 16:24:16 +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
Aircoookie
dd9da2853a
Support settings pin unlock via JSON
...
Also supports locking by providing any incorrect pin
2023-06-14 11:53:39 +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
dfa0a16487
Reduce sound sim options to increase 2D mapping.
2023-04-04 17:16:50 +02: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
506b6b51ce
whitespace cleanup
2023-01-06 09:24:29 +01:00
Blaž Kristan
3841780fe6
Merge branch 'async-psave' into dev
2022-10-13 14:25:01 +02:00
Blaz Kristan
426635871b
Bus corrections for C3, S2 & S3.
...
Minor hostname tweak.
2022-10-10 16:46:23 +02:00
Blaz Kristan
2c27240da6
Remove DISABLE_AUDIO
2022-09-05 00:43:26 +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
1cb3ab82c2
Reduction of flicering on web access (info)
2022-08-10 20:53:11 +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
Blaz Kristan
f45082b764
Crash fix for ESP8266 if mode contains !
2022-08-03 22:27:45 +02:00
Blaz Kristan
d0a08a55d1
Memory management!
2022-08-03 21:36:47 +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
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
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
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
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
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
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
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
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
17be0a2c12
Enhance rotary encoder with custom sliders.
...
Soft watchdog timer (by poelzi)
2022-05-24 13:45:35 +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
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
Blaz Kristan
92cbdde429
Cleanup.
2022-04-16 16:31:00 +02:00
Blaz Kristan
f1dd1bd6bd
Relative value wrapping and operator fix.
...
Slot selector changes.
2022-03-04 21:49:07 +01:00
Blaz Kristan
41b6f3ffa7
Merge branch 'master' into merge-master
2022-02-20 22:24:11 +01:00
Blaz Kristan
52f0ae9350
Merge branch 'master' into master-merge
...
Few UI fixes.
2022-02-03 17:40:44 +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
b0c40e1e37
Color change tracking. Minor fixes.
2022-01-15 21:15:37 +01:00
Blaž Kristan
0777eaad10
Minor styling changes.
2021-12-08 10:00:31 +01:00
Blaz Kristan
156b499f93
Merge branch 'master' of https://github.com/aircoookie/WLED into dev
2021-12-07 17:18:38 +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
5c7e3c6bab
Bugfixes.
2021-12-03 21:09:53 +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
1e98d56bb6
Removed conditional compile.
2021-11-17 16:34:08 +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
7a228cac43
Bugfix for network 'pin' conflict.
2021-11-09 17:49:05 +01:00
Blaž Kristan
5714578783
Refactoring & code clean-up.
...
- utility functions
- network functions
- math functions
2021-10-11 14:13:34 +02:00