Commit Graph

306 Commits

Author SHA1 Message Date
Frank
80a9736d0d print WLED error codes to serial + netdebug
These errors were shown in UI only, but missing in debug output.
2023-12-29 21:40:46 +01:00
Blaz Kristan
738df1847a Fix for #2922 2023-12-29 17:21:43 +01:00
Frank
58fe146a70 the experiment evolves
trying to find all the conditions when _doc[]_ should _not_ be touched ...
2023-12-19 11:28:46 +01:00
Frank
cde3298c54 MM experimental - build flag to move ALL json into PSRAM
-DALL_JSON_TO_PSRAM -DBOARD_HAS_PSRAM -D WLED_USE_PSRAM_JSON

on -S2, this *doubles* the PSRAM utilization!

before: heap used 85%, PSRAM used 13kb / 21kb
after:   heap used 60%, PSRAM used 41kb / 65kb !!
2023-12-18 20:41:11 +01:00
Frank
36eb520592 reduce RAM needs for -S2, user message on heap emergency actions 2023-12-18 15:39:12 +01:00
Frank
c8cee6cb51 -S2/-C3: removing stupid double protection of PSRAM pins
these pins are already forbidden in isPinOK.
In MM, trying to allocate them produces a buch of false warnings.
2023-12-18 11:34:42 +01:00
Frank
d25835ceae experimental: trying to get the main JSON doc into PSRAM
Its not enough to declare "doc" as DynamicJsonPSRAMDocument - PSRAM is not yet initialized when "doc" is created. So we need a trick to get the main doc into PSRAM later, during WLED::setup().

Code is very experimental, may or may not work, and need more testing
-> disabled with "#if 0"
2023-12-16 22:50:05 +01:00
Frank
8905992a89 code spell checking - part4 (MM specific) 2023-12-15 00:14:57 +01:00
Frank
d00b32e6de bugfix - unusable pins on pico32 boards (#3573)
According to the technical manual, GPIO 16 + 17 are used for onboard flash, so cannot be used by WLED.

example buildenv:

[env:esp32_pico]
extends = env:esp32dev_qio80
board = pico32
2023-12-14 22:16:50 +01:00
Frank
0a70f97780 random seed bugfix (compile errors on older platforms) 2023-12-12 15:36:31 +01:00
Blaž Kristan
451243c78d Merge pull request #3552 from TripleWhy/seedRandom16
Seed FastLED's RNG
2023-12-12 15:21:00 +01:00
Frank
1fb1e674f4 fix for build errors with older frameworks
hrmpf
2023-12-12 00:57:21 +01:00
Frank
4f30f69584 found a way to increase TCP stacksize (for AudioReactive UI)
we can use `-D CONFIG_ASYNC_TCP_TASK_STACK_SIZE=xxxx` to increase the stack size of AsyncWebserver - default is 8196.
This should give us a bit of headroom for new UI items.

We still need PR #94 for more savings.
2023-12-12 00:43:48 +01:00
Frank
ab309b39d2 Merge pull request #3536 from Aircoookie/ntp_errorchecking
NTP validation, and rejecting malformed responses (related to #3515)
2023-11-22 20:20:52 +01:00
Ewoud
76aa3072b6 Octopus and Crazy Bees Super Sync compatible 2023-10-02 12:45:56 +02:00
Christian Schwinne
d3f3f6330b Add WiFi network scan RPC command to Improv Serial (#3271) 2023-09-01 18:07:00 +02:00
Frank
95f6e7e47a allow Lolin Wifi Fix on -S3 2023-08-29 12:33:50 +02:00
Frank
82f9080609 show kernel debug messages in debug builds 2023-08-23 13:19:48 +02:00
Frank
331089a8d9 esp-now remote: reduce number of exported functions
too many global variables and functions ... this makes stuff 'static' that can remain at file scope
2023-07-30 21:42:05 +02:00
Clayton Sims
5e20f94b8e 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-07-27 17:17:41 +02:00
Frank
39db568ca9 increase STACK_BUF_SIZE after PR#59
* increase buffer by 64 bytes (sting added in AR usermod)
* better diag message when buffer is full
* change "Arduino  max stack" to debug message
2023-07-27 12:45:14 +02:00
Frank
5f55f91ff0 debug message cleanup
changed some non-critical USER_PRINT debug messages into DEBUG_PRINT
2023-07-14 16:17:42 +02:00
Frank
3127c60b41 Merge branch 'mdev' into audio_fastpath 2023-06-15 20:54:57 +02:00
Frank
a9cdd21da9 prevent strip flickering
* it seems that NPB is very sensitive when being interrupted during LEDs driving.  This change tries to avoid flash (file) writes when the strip is active.
* minor optimization: yield is completely unnecessary on ESP32 (we have a real OS).
2023-06-12 23:27:09 +02:00
Frank
6fd647ab15 post-merge
* restore WLED_USE_PSRAM_JSON - not existing in upstream
* fix compiler warning about ambiguous "&"
2023-06-07 21:45:52 +02:00
Ewoud
b95ff2d74f Merge remote-tracking branch 'upstream/main' into mdev 2023-06-07 20:54:04 +02:00
Frank
d8a68890d4 build fix
removing some bonus colons.
2023-06-07 17:16:49 +02:00
Frank
af6091b493 fixing some memory leaks
* audio_reactive.h: catch memory errors from WiFiUDP
* udp: explicitly flush unused receive buffers.
* wled.cpp: additional debug info about "largest available block"
* FX_fcn.cpp: free _globalLeds before running purgeSegments().
2023-06-07 17:10:32 +02:00
TroyHacks
309e66bf8a Added fallback for ESP8266 to original code. 2023-06-07 10:44:10 -04:00
TroyHacks
4dc6a388a8 Added code for dealing with low heap, heap debug. 2023-06-07 10:33:26 -04:00
Frank
e6334d8e3d hide "slow strip" when compiling with HEAP_DEBUG 2023-06-07 12:25:41 +02:00
Frank
aded74d8b1 suspendStripService improvements
* also suspend Transitions, Notifications and Live LED updates while strip or segments are under update from the Web UI.
2023-06-04 20:30:03 +02:00
Frank
404fb566fa partly disable waitUntilIdle() as its still work-in-progress
This disables parts of the new feature that might lead to delays, so basicially there is some detection, but no protection any more.

further development needed --> audio_fastpath branch

compile with -D WLEDMM_PROTECT_SERVICE to enable full protection.
2023-06-01 21:55:46 +02:00
Frank
0a5bfb656d avoid updating strip / segments while draving effects (ESP32 only)
💫 this is the way🌟
A new locking mechanism that allows to wait until strip.service() has completed.
2023-06-01 17:41:36 +02:00
Blaz Kristan
9f3520cba5 Update comments. 2023-05-30 16:09:51 +02:00
Blaz Kristan
5a8a8dc292 Feature implementation
- #2236
  - #1984
Better PSRAM handling
platformio.ini update
On/Off bus handling
2023-05-28 22:50:19 +02:00
Ewoud
fede3dd54c Merge remote-tracking branch 'upstream/main' into mdev 2023-05-11 17:39:12 +02:00
Blaž Kristan
8e79bd8785 Merge pull request #3162 from wled-install/main
Add LAN8720 reset and new ethernet board
2023-05-05 21:32:06 +02:00
Blaz Kristan
432c5837f0 Bugfix
- WiFi power for Lolin S2 & C3 (use -DLOLIN_WIFI_FIX)
- web response buffer size (corruption when websockets not used)
2023-04-30 17:30:36 +02:00
wled-install
599ff66522 Add files via upload 2023-04-28 17:15: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
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
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
Frank
28c737df87 small fix
Serial0 does not exist without ARDUINO_USB_CDC_ON_BOOT
2023-04-15 23:37:54 +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
Frank
94a7f5623d handling of Serial on CDC USB board
... like the typical -C3
* Replaced a few direct Serial.printf with macros
* Always check if Serial is connected before printing (CDC sometimes hangs  when trying to send/receive without connection)
2023-04-13 22:59:09 +02:00
MoonModules
7ffe25d55c Merge branch 'mdev' into DMX-Input-esp_dmx 2023-04-06 20:51:20 +02:00
Frank
4e8974a69b pio: generic build env for ESP32-S2, and some cleanup 2023-03-30 23:59:38 +02:00
Will Tatam
db812439ff Merge branch 'mdev' into DMX-Input-esp_dmx 2023-03-30 15:26:05 +01:00
Will Tatam
f34ba8f3fb Remov hard coded pin values for DMX 2023-03-30 15:15:38 +01:00