allocate more PSRAM for JSON
This commit is contained in:
@@ -814,7 +814,11 @@ WLED_GLOBAL int8_t spi_sclk _INIT(HW_PIN_CLOCKSPI);
|
||||
#ifndef WLED_DEFINE_GLOBAL_VARS
|
||||
WLED_GLOBAL PSRAMDynamicJsonDocument doc;
|
||||
#else
|
||||
WLED_GLOBAL PSRAMDynamicJsonDocument doc(JSON_BUFFER_SIZE);
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32S2) || !defined(BOARD_HAS_PSRAM)
|
||||
WLED_GLOBAL PSRAMDynamicJsonDocument doc(JSON_BUFFER_SIZE); // S2 has very small RAM - lets not push our luck too far
|
||||
#else
|
||||
WLED_GLOBAL PSRAMDynamicJsonDocument doc(JSON_BUFFER_SIZE * 2 ); // initially "doc" is allocated in RAM, and later pushed into PSRAM when the drivers is ready
|
||||
#endif
|
||||
//#warning trying to always use dynamic JSON in PSRAM
|
||||
#endif
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user