Commit Graph

4252 Commits

Author SHA1 Message Date
Ewoud
ca5a54bb72 Merge branch 'mdev' into audio_fastpath 2023-05-04 17:52:21 +02:00
Ewoud
642dbfed85 GFX default on, if set off it stays off (until page refresh) 2023-05-04 17:51:33 +02:00
Frank
4341d36885 move main JSON doc into PSRAM (experimental)
this should move the main JSON doc into PSRAM on WROVER boards.
* free heap should increase by ~60kb
* PSRAM use should go up by the same amount.
2023-05-04 17:09:43 +02:00
Frank
7d0e627e14 some effect optimizations
* getpixelcolor: attribute pure - it reads memory, but does not write
* some optimizations for SEGMENT.blur() and SEGMENT.fadeToBlackBy()

* FX.c:pp remove double calls to blur() and fade_out()
* FX.cpp: SEGMENT.setUpLeds() added to effects, to enable LED buffering (safe some time because getPixelColor does not need to access NeopixelBus)

* a few other optimizations to safe time and avoid "expensive" operations
* set I2C bus speed to 400kHz (default is 100Khz)

* a few other small optimizations and tweaks
* pio: esp32 V4 builds use "patch5" toolchain version, which contains a few bugfixes especially for memory management.
2023-05-03 20:33:23 +02:00
Frank
91d36fa269 fastpath: use i2s#1 for 5th LED pin
use 4 RMT channels, then I2S#1, then RMT 5-8. This allows to have up to 5 "fast" LED pins.

"Even though the ESP32 has 8 channels of RMT hardware, using beyond 4 has shown to cause sending delays." (https://github.com/Makuna/NeoPixelBus/wiki/ESP32-NeoMethods#rmt)
2023-05-03 00:29:14 +02:00
Frank
56b6290fdd Update audio_reactive.h
small oops
2023-04-30 21:03:00 +02:00
Frank
e1cadbc337 (experimental) reduced websocket frequency
fastpath: reduced websocket frequency, to have more time for physically attached LEDs.

fingers crossed that this won't break anything....
2023-04-30 21:00:28 +02:00
Frank
0c58c12d0f audio fastpath: reduce filter delay
- reduced filter strength, which also reduces delays
- increased I2S buffer count, and reduced I2S cycle time to recover from delays faster.
2023-04-30 20:58:06 +02:00
Frank
ac5aed8e36 websocket bugfix from upstream
web response buffer size (corruption when websockets not used)

432c5837f0
2023-04-30 19:28:44 +02:00
Frank
f69142d5be optimization for AA setPixelColorXY() 2023-04-30 19:09:38 +02:00
Frank
40c96c14f5 a bunch of smaller speedups to core functions
*  make local functions "static"
* use fast_ int types where possible
* use native min/max instead of MIN/MAX macros. Macros evaluate each parameter TWICE!!
* adding __attribute__((pure)) and __attribute((const)) to help the compiler optimize
* ws.cpp: reduce max "live leds" in fastpath mode
2023-04-30 18:41:30 +02:00
Frank
fb03a37b08 fps help in LED settings
led settings: added hint on max leds per pin
fx.h: faster FRAMERATE_FIXED
2023-04-30 18:37:14 +02:00
Frank
c0a0f66aa4 trying to revive github ci build for new MCUs (#38)
as suggested here:
* https://github.com/platformio/platform-espressif32/issues/1081#issuecomment-1518601054
2023-04-30 16:45:11 +02:00
netmindz
62910038e4 Merge pull request #37 from netmindz/mdev
Update FX.cpp
2023-04-28 13:17:55 +01:00
netmindz
d4bdb3037c Update FX.cpp
Assign proper attribution of DJLight to Stefan Petrick
2023-04-24 18:37:15 +01:00
Frank
fb3477e5f6 soundreactive effect updated
* blurz: some visual improvements
* Matripix: improved color smoothness, Color by frequency (instead of volume), option to use sound pressure
* pixelwave: improved color selection, use sound energy instead of volume
* freqwave: some speedups, option to show frequency with "musical scale"

* gravfreq: fixed some math accidents that lead to horrible flickering
* default setting improved for some effects
2023-04-21 23:27:14 +02:00
Frank
d5a7f5dd74 scrolling text bugfix
effect was crashing with too long or undefined segment names.
2023-04-21 19:27:37 +02:00
Frank
8e9db0adde more accurate FPS forESP32
the standard millis() code is very inaccurate in the "high FPS" ranges. This replaces it with the esp32 high resolution timer.
2023-04-21 17:34:01 +02:00
Frank
9130e4be54 minor optimization of core LED functions
* use _fast_ integer types in loops - in contrast to "uint16_t" etc, the compiler can leave out range/overflow corrections, so it might run faster.
* fcn_declare.h: revive "WLED_USE_REAL_MATH" option, which can be a bit faster on ESP32.
2023-04-21 16:44:58 +02:00
Frank
363567434d audio effects: allow to run at full speed
* set the "speed" slider to 255, for running at full speed
* #FPS (framerate) and #POW (ampere) added to scrolling text
2023-04-21 15:57:31 +02:00
Frank
00661de7fc accept up to 250 fps target in LED preferences
warning included.
2023-04-21 15:26:35 +02:00
Frank
63a597b987 pio: same for -S3 .....
Tool Manager: toolchain-xtensa-esp32s3@8.4.0+2021r2-patch3 has been installed!
Tool Manager: Installing espressif/toolchain-riscv32-esp @ 8.4.0+2021r2-patch3
Error: Could not find the package with 'espressif/toolchain-riscv32-esp @ 8.4.0+2021r2-patch3' requirements for your system 'linux_x86_64'
Error: Process completed with exit code 1.
2023-04-20 01:10:54 +02:00
Frank
b35cd2140a pio: disable -C3 and -S2 builds until github fixes their build toolds
Tool Manager: toolchain-xtensa-esp32s2@8.4.0+2021r2-patch3 has been installed!
Tool Manager: Installing espressif/toolchain-riscv32-esp @ 8.4.0+2021r2-patch3
Error: Could not find the package with 'espressif/toolchain-riscv32-esp @ 8.4.0+2021r2-patch3' requirements for your system 'linux_x86_64'
2023-04-20 01:05:43 +02:00
Frank
33a78bef4d a little less buffer for -S2
the last change caused a build error for ESP32-S2: region `dram0_0_seg' overflowed by 5064 bytes
2023-04-20 00:58:31 +02:00
Frank
1b3d9a1a53 more JSON buffer for boards with PSRAM
allows to load ledmaps with > 15000 positions!
2023-04-20 00:34:01 +02:00
Frank
bcbc0fbda4 Update platformio.ini
* temporarily remove esp32c3dev_4MB_M from nightly builds, as the github action build currently has strange problems with it
* -D WLED_USE_PSRAM_JSON for ESP32 boards, as using PSRAM for LED Buffers and Segment Buffers causes slow-down
2023-04-19 18:19:37 +02:00
Frank
d90ee766f6 PSRAM: you can have it, and eat it or not eat it
*This patch allows to compile with BOARD_HAS_PSRAM, but not set WLED_USE_PSRAM - reserved pins will be protected, and PSRAM usage will be shown in info.
* if you add `-D WLED_USE_PSRAM_JSON` then PSRAM will be used for some JSON buffers, but not for LEDs and Segments.
2023-04-19 17:58:50 +02:00
Frank
e2d3800fc3 woraround for spurious crash in serializePalettes
the root cause of the crash is not really clear, as the problem seems to occur randomly, mosr frequent with fresh installations.
This workaround prevents the array bounds violation, by re-using the last valid  gGradientPalettes entry.
2023-04-19 15:34:35 +02:00
Frank
a2f15c775b WIFI_POWERON_HACK for AP mode
reduce TX power - required for C3 mini v1.0.0 (wemos), see https://www.wemos.cc/en/latest/c3/c3_mini_1_0_0.html#about-wifi
2023-04-19 11:56:29 +02:00
Troy
0558865cf5 Merge pull request #36 from Fonta/patch-1
Fix invalid environment error in PlatformIO
2023-04-17 21:44:20 -04:00
Troy
2e1189381d Merge pull request #35 from troyhacks/DDP-RGBW-Transmit-Fix
DDP Transmit RGBW Fix
2023-04-17 19:52:36 -04:00
Frank
8d85a52449 correct some stupid peak detection defaults
parameters C1 and C2 control peak detection. Previous defaults (c2=0 !!!) did not make any sense.
2023-04-17 21:35:47 +02:00
Frank
3f4294398a Blurz effect: back to original SR code
Modifications from upstream have made the effect kind of boring non-reactive. So we go back to the original effect.

HINT: Effect looks best with _segment_ brightness set to max (use _global_ brightness to reduce brightness as you like).
2023-04-17 21:22:11 +02:00
Fonta
45da3121d6 Update platformio.ini 2023-04-16 03:08:18 +02:00
Fonta
6b6c961a00 Fix invalid environment error in PlatformIO
PlatformIO gives error on codm environments
``Error: Invalid environment name 'codm-controller-0.6'. The name can contain alphanumeric, underscore, and hyphen characters (a-z, 0-9, -, _)``
2023-04-16 03:05:20 +02:00
Frank
28c737df87 small fix
Serial0 does not exist without ARDUINO_USB_CDC_ON_BOOT
2023-04-15 23:37:54 +02:00
Frank
0fd26cc783 replace AC WebServer with lost-hope variant
temporarily replace the webserver with a   modified one that can also show .wled and .log files under /edit.
2023-04-15 21:33:06 +02:00
Frank
2585b785d9 remove duplictate dependancies (AsyncTCP 1.1.1)
* moving "pbolduc/AsyncTCP.git @ 1.2.0" on top of lib_deps, to prevent that AsyncTCP 1.1.1 is pulled in (due due dependacies from Aircoookie/ESPAsyncWebServer
* remove duplicate env.lib_deps from -S2 environments
2023-04-15 21:06:00 +02:00
Frank
c295c87798 moving esp_dmx lib into esp32_4MB_V4_S_base
the idea is to keep enable flag and library in the same build env.
2023-04-15 17:04:26 +02:00
Frank
244a6137d2 esp32_4MB_V4_M: stay below 100% flash usage 2023-04-15 01:11:25 +02:00
Frank
322ab9c552 arti-fx error handling improvements
- if log file cannot be created, switch to serial logging
- fixing a broken format string
- usermod_arti: avoid to copy more than what fits into the buffer
2023-04-15 01:10:03 +02:00
TroyHacks
b7f1373e7d DDP Transmit RGBW Fix 2023-04-14 15:05:41 -04:00
Frank
4294f60151 npm run build 2023-04-14 20:00:35 +02:00
Frank
cc9a19bc1d partial merge of upstream/main
* leaving out DotStarHspi5MhzMethod, as we are still on NPB 2.6.9 for eth boards
* leaving out the index.css/index.css changes, as I'm not sure how to merge this.

@ewoudwijma we need to merge the JS and CSS parts when you are back; I'll stay with our MM version for now.
2023-04-14 19:53:04 +02:00
netmindz
ee23827fdb Merge pull request #16 from netmindz/audio-palette-updates
Audio palette updates
2023-04-14 18:38:06 +01:00
Will Tatam
cc25a21bcb Merge branch 'mdev' into audio-palette-updates 2023-04-14 18:28:43 +01:00
Frank
05c3e569f1 optional: warn about functions with high stack usage 2023-04-14 19:08:41 +02:00
Frank
3e2a6848f9 arti setup(): attempt to fix memory leak
- check that programName is not too long (fileNameLength-7 is the limit)
- try to fix a memory leak, as programText must be free'd in case of error.

@ewoudwijma please review my changes, I'm not 100% sure I did it right.
2023-04-14 18:40:25 +02:00
Frank
10ca7c83ca enumerateLedmaps: prevent buffer overflow
make sure that bounds of char fileName[33] are not exceeded by sprintf.
2023-04-14 18:33:07 +02:00
Frank
5f4dd53be4 V4 target: enable warning for variable shadoing
* pio.ini: add "-Wshadow=compatible-local" for V4 targets
* pio.ini: fix alignment for 8266 build_flags
* fix one (harmless) case of shadowed vars in MM specific code
2023-04-14 14:20:55 +02:00