Commit Graph

327 Commits

Author SHA1 Message Date
Troy
e08ae84a83 Allow 8 AoftAP clients (for Dom)
Increases the allowed SoftAP clients so folks doing syncing "in the field" can connect more devices without a proper WiFi network.
2024-05-08 12:18:31 -04:00
Frank
06f94743bf pico board: always protect pin 16+17
runtime detection of PICO boards, to ensure that SPIRAM pins are protected even when users install a non-pico firmware build.
2024-05-07 13:35:16 +02:00
Frank
e0a4a7c71e minor updates 2024-04-30 17:16:11 +02:00
Frank
858610e39b trying to reduce flickering
The NeoPixelBus RMT driver seems to get stalled when ESP.get.... functions are called (big kernel lock?). Also its glitching during flash file access.

This change tries to avoid some conflicts by first checking that the driver is not sending.
2024-04-26 21:21:32 +02:00
Frank
c8e181f3b1 overlooked one 2024-02-23 11:19:17 +01:00
Frank
2cc67245ca avoid infinite disconnect loops when RAM is low 2024-02-23 10:54:50 +01:00
Frank
7593c23105 minor fixies
* setup: print free filesystem space after mount
* loop: forgot to actually reset the stale lock
* handleConnection: (8266) user messages in case of "heap too low".
2024-02-12 21:51:23 +01:00
netmindz
42109fe606 Merge branch 'mdev' into dmx_input 2024-01-16 13:27:42 +00:00
Frank
e33bcb822e USB CDC: avoid hung devices when USB host is not connected
see https://github.com/espressif/arduino-esp32/issues/9043

"
The S3, C3, C6 and H2 that have HW CDC JTAG USB port may cause a delay when using HWCDC in Serial by activating CDC on Boot and selecting the USB Mode for Hardware CDC and JTAG. This happens when no USB application in USB Host side is started to receive the data sent by the ESP32xx.

The USB CDC buffer gets full and the Arduino HW CDC layer will timeout, by default 100ms, until give up trying to send the CDC data.

As a workaround, it is necessary to use HWCDC::setTxTimeoutMs(timeout_ms) and set it to zero.
"
2024-01-04 16:03:46 +01:00
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
Arne
3b9b9f59e1 Revert "Rename WLED_ENABLE_DMX to WLED_ENABLE_DMX_OUTPUT"
This reverts commit e3f256bd44.
2023-10-22 20:52:31 +02:00
Ewoud
76aa3072b6 Octopus and Crazy Bees Super Sync compatible 2023-10-02 12:45:56 +02:00
Arne
ff2953bab5 Do no longer disable dmx_input when cache is disabled.
No longer needed because missing ISR_ATTR have been added to esp_dmx.
2023-09-24 13:30:17 +02:00
Arne
7cccb2e181 rename initDmx() -> initDmxOutput() 2023-09-24 13:30:17 +02:00
Arne
6efd7457e0 rename handleDMX() handleDMXOutput() 2023-09-24 13:30:17 +02:00
Arne
e3f256bd44 Rename WLED_ENABLE_DMX to WLED_ENABLE_DMX_OUTPUT 2023-09-24 13:30:17 +02:00
Arne
6378771746 Add dmx input port to configuration 2023-09-24 13:30:17 +02:00
Arne
03b164f94c Support dmx rdm personality change 2023-09-24 13:30:09 +02:00
Arne
fe84a9ad8a hack: disable dmx receiver while wifi is being activated
This fixes a crash in the dmx receiver. The dmx receiver cannot work while cache is disabled. For some reason activating wifi disables the cache. In theory, the driver is placed in iram and should work, but it doesn't. This might be a bug in the driver.
2023-09-24 13:30:09 +02:00
Arne
f4c8a31be9 Turn dmx_into into class with state.
This is much nicer to read and in the future more state will be added to support all the rdm stuff.
2023-09-24 13:30:09 +02:00
Arne
b4bbf0a5cb Extract dmx_input from dmx.cpp into dmx_input.cpp.
This greatly improves readability because it gets rid of most of the
ifdefs.
2023-09-24 13:30:09 +02:00
Arne
a516a7b85f Move dmx_input pin allocations from wled.cpp to dmx.cpp 2023-09-24 13:30:09 +02:00
Arne
1bc6e25355 rename global dmx... variables to dmxInput...
This is the first step in supporting both dmx input and dmx output on different pins.
2023-09-24 13:30:09 +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