Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WiP -Audio fastpath #40

Merged
merged 114 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
fb03a37
fps help in LED settings
softhack007 Apr 30, 2023
40c96c1
a bunch of smaller speedups to core functions
softhack007 Apr 30, 2023
f69142d
optimization for AA setPixelColorXY()
softhack007 Apr 30, 2023
ac5aed8
websocket bugfix from upstream
softhack007 Apr 30, 2023
0c58c12
audio fastpath: reduce filter delay
softhack007 Apr 30, 2023
e1cadbc
(experimental) reduced websocket frequency
softhack007 Apr 30, 2023
56b6290
Update audio_reactive.h
softhack007 Apr 30, 2023
91d36fa
fastpath: use i2s#1 for 5th LED pin
softhack007 May 2, 2023
7d0e627
some effect optimizations
softhack007 May 3, 2023
4341d36
move main JSON doc into PSRAM (experimental)
softhack007 May 4, 2023
ca5a54b
Merge branch 'mdev' into audio_fastpath
ewoudwijma May 4, 2023
f57c39c
new pio environment for ESP32 rev3 with PSRAM (faster)
softhack007 May 4, 2023
63ffc6e
Update platformio.ini
softhack007 May 4, 2023
d4fb542
Merge branch 'mdev' into audio_fastpath
softhack007 May 6, 2023
9a4c020
reduce file search buffer, to reduce file access delays
softhack007 May 6, 2023
50b3c9d
library updates
softhack007 May 7, 2023
04b55a5
back to NeoPixelBus @ 2.7.1
softhack007 May 7, 2023
d8bd451
Merge branch 'mdev' into audio_fastpath
softhack007 May 8, 2023
237286f
npm run build
softhack007 May 8, 2023
4810a85
Merge branch 'mdev' into audio_fastpath
softhack007 May 9, 2023
f050e60
well-defined fastled version
softhack007 May 10, 2023
c4664e5
Merge branch 'mdev' into audio_fastpath
softhack007 May 10, 2023
f147d79
Merge branch 'mdev' into audio_fastpath
softhack007 May 11, 2023
d5c33df
file buffer size: back to default
softhack007 May 12, 2023
6317dcb
swapped-channel workaround needed a bit longer
softhack007 May 11, 2023
9f6278a
Bugfix.
blazoncek May 14, 2023
6d23eb6
improve robustness when heap is low
softhack007 May 15, 2023
2e6d58f
small LED performance improvement
softhack007 May 15, 2023
72f7f9c
fix 8266 compile error
softhack007 May 15, 2023
175375e
Merge branch 'mdev' into audio_fastpath
ewoudwijma May 16, 2023
40d1201
Merge branch 'mdev' into audio_fastpath
ewoudwijma May 17, 2023
ef12aaa
Temp fix for leds array crashes: size fixed to 10000pixels/30000bytes
ewoudwijma May 17, 2023
894fdce
Merge remote-tracking branch 'upstream/main' into mdev
softhack007 May 21, 2023
fc19340
(experimental) use malloc/realloc for customMappingTable
softhack007 May 21, 2023
63e63ad
minor speedup for liveview and websockets
softhack007 May 21, 2023
d872629
Merge remote-tracking branch 'upstream/main' into mdev
softhack007 May 22, 2023
e6fb6c4
Merge pull request #39 from troyhacks/ES8388-Lyra-T-Fixes-Test
netmindz May 23, 2023
4197f98
package.json and cdata.js: set urls to MoonModules
ewoudwijma May 24, 2023
5edd5e6
tiny
ewoudwijma May 24, 2023
71153ee
small debug improvements
softhack007 May 25, 2023
df26430
audioreactive: replace dynamic buffer with static buffer
softhack007 May 25, 2023
e2eb3e8
npm run build
softhack007 May 25, 2023
9cb6189
minor speedup for 2D
softhack007 May 26, 2023
6d78e46
strip.service() optimization
softhack007 May 26, 2023
49f2e26
arduinoFFT hash update
softhack007 May 26, 2023
5081cfb
Bug fix, allocate string to store ledmap name
ewoudwijma May 29, 2023
859adb3
Update platformio.ini: fastled version update
softhack007 May 29, 2023
d8bc5e2
Dynamic Peek framerates :tada:
ewoudwijma May 29, 2023
1daeecc
Merge branch 'mdev' into audio_fastpath
softhack007 May 30, 2023
c13a5d7
post-merge
softhack007 May 30, 2023
36c34b5
Merge branch 'mdev' into audio_fastpath
ewoudwijma May 31, 2023
52fe8e2
Merge branch 'mdev' into audio_fastpath
softhack007 Jun 1, 2023
1b8ebfd
Added heap debug - enable with WLED_DEBUG_HEAP
troyhacks Jun 1, 2023
63b03a4
Merge branch 'mdev' into audio_fastpath
softhack007 Jun 1, 2023
c052da9
Merge pull request #50 from troyhacks/heap_debug
softhack007 Jun 1, 2023
f877837
platformio.ini: WLED_DEBUG_HEAP for 16MB debug targets
softhack007 Jun 1, 2023
dc77c17
Merge branch 'mdev' into audio_fastpath
softhack007 Jun 1, 2023
0f45b4f
webserver: removing JSON_BUFFER_SIZE for esp32
softhack007 Jun 1, 2023
55b0463
heap debug: show total free + fragmentation level
softhack007 Jun 1, 2023
53c8f9f
Minor edit to remove a space for clarity
troyhacks Jun 1, 2023
be2da7b
minor edit: tab inserted
softhack007 Jun 1, 2023
62990cd
Minor edit: typo
troyhacks Jun 2, 2023
cfc1116
Force reconnect via Serial input
troyhacks Jun 2, 2023
35f3f28
Oops. Bonus brace.
troyhacks Jun 2, 2023
4d64efa
sendLiveLedsWs: don't kick clients
softhack007 Jun 4, 2023
aded74d
suspendStripService improvements
softhack007 Jun 4, 2023
143f842
WLED_DEBUG_MAPS flag added
troyhacks Jun 6, 2023
b6f1a59
global buffer for UDP sound sync
softhack007 Jun 7, 2023
e6334d8
hide "slow strip" when compiling with HEAP_DEBUG
softhack007 Jun 7, 2023
f0dd66e
SoundSync: use local static buffer
softhack007 Jun 7, 2023
4dc6a38
Added code for dealing with low heap, heap debug.
troyhacks Jun 7, 2023
06344ae
FFT UDP fush if not read.
troyhacks Jun 7, 2023
7e1d15c
Merge branch 'audio_fastpath' of https://github.com/MoonModules/WLED …
troyhacks Jun 7, 2023
309e66b
Added fallback for ESP8266 to original code.
troyhacks Jun 7, 2023
af6091b
fixing some memory leaks
softhack007 Jun 7, 2023
d8a6889
build fix
softhack007 Jun 7, 2023
7465be7
heap mud scrum
softhack007 Jun 7, 2023
82f9be5
npm run build
troyhacks Jun 7, 2023
337b117
Merge branch 'audio_fastpath' of https://github.com/MoonModules/WLED …
troyhacks Jun 7, 2023
5c79375
Bug fix segment view, use ledmapMaxSize (TroyHack)
ewoudwijma Jun 8, 2023
b473a40
Tiny things
ewoudwijma Jun 8, 2023
d1b2759
npm run build
softhack007 Jun 8, 2023
7dcc8f1
enumerateLedmaps improvements
softhack007 Jun 8, 2023
d4a37ec
clean up ledmap names when directly reading from file
softhack007 Jun 9, 2023
a9cdd21
prevent strip flickering
softhack007 Jun 12, 2023
6883996
another mitigation for flickering
softhack007 Jun 13, 2023
47de28e
2D Lissajous improvements
softhack007 Jun 14, 2023
2410c22
2D Lissajous: revive old anti-aliased code
softhack007 Jun 14, 2023
3127c60
Merge branch 'mdev' into audio_fastpath
softhack007 Jun 15, 2023
d51a41f
post-merge
softhack007 Jun 15, 2023
a7d627b
Merge branch 'mdev' into audio_fastpath
softhack007 Jun 16, 2023
553f234
npm run build
softhack007 Jun 16, 2023
8aef434
re-enable old peak detect algo, plus ripplepeak bugfix
softhack007 Jun 18, 2023
708cd8e
free udp receive buffers before parsePacket
softhack007 Jun 20, 2023
310daa6
improve segment code robustness
softhack007 Jun 20, 2023
582b96f
robustness improvements
softhack007 Jun 21, 2023
1c53f14
Temporary bugfix for #3264
blazoncek Jun 24, 2023
3cc1d30
optimization for ABL hotfix
softhack007 Jul 1, 2023
a84c361
build number ++
softhack007 Jul 1, 2023
ecf3317
de-optimization
softhack007 Jul 3, 2023
29644cc
ABL optimization
softhack007 Jul 3, 2023
601499b
XY: minor bugfix
softhack007 Jul 6, 2023
5fe12ee
Merge branch 'mdev' into audio_fastpath
softhack007 Jul 8, 2023
a2e2ead
npm run build
softhack007 Jul 8, 2023
a45306b
blur speedup
softhack007 Jul 6, 2023
c64f74a
fix for random crashes on changing presets (UI)
softhack007 Jul 8, 2023
9a832ed
build number upgrade
softhack007 Jul 8, 2023
9ed5dc7
npm run build
softhack007 Jul 8, 2023
c22c92e
preview at full brightness
softhack007 Jul 10, 2023
0fb5edc
robustness improvements from upstream
softhack007 Jul 13, 2023
3295579
jsonToPixels robustness
softhack007 Jul 13, 2023
9a3a97e
pre-merge
softhack007 Jul 13, 2023
99def64
live view: more updates in non-fastpath builds
softhack007 Jul 13, 2023
9243b90
max is faster than MAX
softhack007 Jul 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,8 @@ upload_speed = 115200
# ------------------------------------------------------------------------------
lib_compat_mode = strict
lib_deps =
fastled/FastLED @ 3.5.0
;fastled/FastLED @ 3.5.0
https://github.com/FastLED/FastLED.git#master ;; up to 50% faster
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it perhaps an idea to refer to a "known good" hash, so we get predictable builds?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. Makes sense 👍

IRremoteESP8266 @ 2.8.2
;;https://github.com/Aircoookie/ESPAsyncWebServer.git @ ~2.0.7
https://github.com/lost-hope/ESPAsyncWebServer.git#master ;; WLEDMM to display .log and .wled files in /edit
Expand Down Expand Up @@ -244,8 +245,8 @@ lib_deps =
#https://github.com/lorol/LITTLEFS.git
ESPAsyncTCP @ 1.2.2
ESPAsyncUDP
${env.lib_deps}
makuna/NeoPixelBus @ 2.6.9
${env.lib_deps}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ordering significant or just accidental change?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually ordering is significant. It seems that the first library reference "wins".
This was changed recently in upstream, to ensure that the right library versions are pulled in.


[esp32]
#platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.2.3/platform-espressif32-2.0.2.3.zip
Expand All @@ -269,8 +270,9 @@ lib_deps =
; https://github.com/lorol/LITTLEFS.git
; WLEDMM specific: use patched version of lorol LittleFS
https://github.com/softhack007/LITTLEFS-threadsafe.git#master
;;makuna/NeoPixelBus @ 2.6.9 ;; WLEDMM default
makuna/NeoPixelBus @ 2.7.3
${env.lib_deps}
makuna/NeoPixelBus @ 2.6.9

;; ** For compiling with latest Frameworks (IDF4.4.x and arduino-esp32 v2.0.x) **
;;; standard V4 platform
Expand All @@ -296,9 +298,8 @@ build_flagsV4 = -g
;;; V4.4.x libraries (without LOROL_LITTLEFS; with newer NeoPixelBus)
lib_depsV4 =
https://github.com/pbolduc/AsyncTCP.git @ 1.2.0 ;; WLEDMM this must be first in the list, otherwise Aircoookie/ESPAsyncWebServer pulls in an older version of AsyncTCP !!
makuna/NeoPixelBus @ 2.7.3
${env.lib_deps}
;https://github.com/Makuna/NeoPixelBus.git#master ;; NPB 2.6.9 tends to crash whith IDF V4.4.3 -> use latest NeoPixelBus dev instead
makuna/NeoPixelBus @ 2.7.1

[esp32s2]
build_flags = -g
Expand All @@ -314,8 +315,8 @@ build_flags = -g

lib_deps =
https://github.com/pbolduc/AsyncTCP.git @ 1.2.0 ;; WLEDMM this must be first in the list, otherwise Aircoookie/ESPAsyncWebServer pulls in an older version of AsyncTCP !!
makuna/NeoPixelBus @ 2.7.3 ;; WLEDMM - new version is more stable on -S2
${env.lib_deps}
makuna/NeoPixelBus @ 2.7.1 ;; WLEDMM - new version is more stable on -S2

[esp32c3]
build_flags = -g
Expand Down Expand Up @@ -352,8 +353,8 @@ build_flags = -g

lib_deps =
https://github.com/pbolduc/AsyncTCP.git @ 1.2.0
${env.lib_deps}
makuna/NeoPixelBus @ 2.7.3
${env.lib_deps}


# ------------------------------------------------------------------------------
Expand Down Expand Up @@ -1242,16 +1243,14 @@ build_flags = ${esp32_4MB_V4_M_base.build_flags}
-D WLED_RELEASE_NAME=esp32_4MB_V4_M
-D WLED_WATCHDOG_TIMEOUT=0 #-D WLED_DISABLE_BROWNOUT_DET
-D ARDUINO_USB_CDC_ON_BOOT=0 ; needed for arduino-esp32 >=2.0.4; avoids errors on startup
; RAM: [== ] 24.8% (used 81316 bytes from 327680 bytes)
; Flash: [==========] 97.2% (used 1528253 bytes from 1572864 bytes)
-D WLED_DISABLE_LOXONE ; FLASH 1272 bytes
-D WLED_DISABLE_ALEXA ; RAM 116 bytes; FLASH 13524 bytes
-D WLED_DISABLE_HUESYNC ;RAM 122 bytes; FLASH 6308 bytes
; RAM: [== ] 24.7% (used 81076 bytes from 327680 bytes)
; Flash: [==========] 95.8% (used 1506893 bytes from 1572864 bytes)
;-D WLED_DISABLE_MQTT ; RAM 216 bytes; FLASH 16496 bytes
-D WLED_DISABLE_INFRARED ;RAM 136 bytes; FLASH 24492 bytes ;; softhack007 disabled to stay below 100% flash size
lib_ignore = IRremoteESP8266 ; use with WLED_DISABLE_INFRARED for faster compilation
;; RAM: [== ] 24.7% (used 80884 bytes from 327680 bytes)
;; Flash: [==========] 99.0% (used 1556429 bytes from 1572864 bytes)

; compiled with ESP-IDF 4.4.1
[env:esp32_16MB_V4_M]
Expand Down
18 changes: 9 additions & 9 deletions usermods/usermod_v2_weather/usermod_v2_weather.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ uint16_t mode_2DWeather(void) {
// currentTime = localTime;
}
else
color = ColorFromPalette(SEGPALETTE, map((uint8_t)weather_temps[x%100], 0, 40, 0, 255), 255, LINEARBLEND);
color = ColorFromPalette(SEGPALETTE, map((uint8_t)weather_temps[x%100], 0, 40, 1, 255), 255, LINEARBLEND);

for (int y=0; y<SEGMENT.virtualHeight() * (weather_temps[x%100]-weather_minTemp)/(weather_maxTemp - weather_minTemp); y++) {
SEGMENT.setPixelColorXY(x, SEGMENT.virtualHeight() - y, color);
Expand All @@ -58,7 +58,7 @@ uint16_t mode_2DWeather(void) {
snprintf(tempString, 5, "%5.2f", currentTemp); // snprintf will prevent overflow
// Serial.println();

CRGB color = ColorFromPalette(SEGPALETTE, map((uint8_t)currentTemp, 0, 40, 0, 255), 255, LINEARBLEND);
CRGB color = ColorFromPalette(SEGPALETTE, map((uint8_t)currentTemp, 0, 40, 1, 255), 255, LINEARBLEND);
//really don't understand why this is not working if width < 16 (only works when Serial.println is uncommented ???)
// uint16_t x = 0;
// const uint16_t xSpace = (SEGMENT.virtualWidth()<16)?4:5;
Expand All @@ -78,17 +78,17 @@ uint16_t mode_2DWeather(void) {
// // Serial.printf(" %d %d\n", x, xSpace);

if (SEGMENT.virtualWidth() < 16) {
SEGMENT.drawCharacter(tempString[0], 0, -2, 5, 8, color);
SEGMENT.drawCharacter(tempString[1], 4, -2, 5, 8, color);
SEGMENT.drawCharacter(tempString[0], 0, -2, 5, 8, uint32_t(color), BLACK);
SEGMENT.drawCharacter(tempString[1], 4, -2, 5, 8, uint32_t(color), BLACK);
SEGMENT.setPixelColorXY(8, 4, color);
SEGMENT.drawCharacter(tempString[3], 9, -2, 5, 8, color);
SEGMENT.drawCharacter(tempString[3], 9, -2, 5, 8, uint32_t(color), BLACK);
}
else {
SEGMENT.drawCharacter(tempString[0], 0, -2, 5, 8, color);
SEGMENT.drawCharacter(tempString[1], 5, -2, 5, 8, color);
SEGMENT.drawCharacter(tempString[0], 0, -2, 5, 8, uint32_t(color), BLACK);
SEGMENT.drawCharacter(tempString[1], 5, -2, 5, 8, uint32_t(color), BLACK);
SEGMENT.setPixelColorXY(10, 4, color);
SEGMENT.drawCharacter(tempString[3], 12, -2, 5, 8, color);
SEGMENT.drawCharacter(tempString[4], 17, -2, 5, 8, color);
SEGMENT.drawCharacter(tempString[3], 12, -2, 5, 8, uint32_t(color), BLACK);
SEGMENT.drawCharacter(tempString[4], 17, -2, 5, 8, uint32_t(color), BLACK);
}

return FRAMETIME;
Expand Down
2 changes: 1 addition & 1 deletion wled00/wled.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

// version code in format yymmddb (b = daily build)
#define VERSION 2305040 // May-the-4th be with you ;-)
#define VERSION 2305070

//uncomment this if you have a "my_config.h" file you'd like to use
//#define WLED_USE_MY_CONFIG
Expand Down