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"
if random palette was used in the startup preset, all LEDs were orange until the first palette cycling happened.
This fix ensures that there is no all-orange palette initially.
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
I've found a code spellchecker, so this is what can be corrected easily. Changes are only affecting comments, readme and a few user-visible strings. So no functional impact expected.
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.
Found out that the main JSON 'doc' is still living in normal RAM, even when PSRAM is available...
This results is very low RAM especially on -S2.
This change tries to find a balance between "need large json buffer" and "other features become unstable when free RAM is low".
* fix some too-long tabs
*author info added
* shrunk number of blank lines
* removed unused audio variables
* colorIndex : better accuracy by first doing multiply, then divide
Some usermods may cause unexpected behaviour if not configured properly.
* Battery: can cause unexpected shutdowns if no voltage measurement circuit connected
* RTC: can cause unexpected time &date changes if no RTC connected to I2C
* mcu temp: can cause hight CPU load, and may cause instabilities due to use of an "unsupported" API from espressif