From d065e3332ffdc4b87ae626b3bd102dbde82cd88b Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Wed, 30 Aug 2023 01:04:13 +0200 Subject: [PATCH] Reduce static JSON buffer size on -S2/-C3 Reduce static buffer allocation, hoping to improve overall stability. --- wled00/const.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wled00/const.h b/wled00/const.h index 871d2bc4..da2da42c 100644 --- a/wled00/const.h +++ b/wled00/const.h @@ -423,9 +423,9 @@ #if defined(BOARD_HAS_PSRAM) && (defined(WLED_USE_PSRAM) || defined(WLED_USE_PSRAM_JSON)) #if defined(ARDUINO_ARCH_ESP32S2) || defined(ARDUINO_ARCH_ESP32C3) #if defined(ARDUINO_ARCH_ESP32C3) - #define JSON_BUFFER_SIZE 48000 // WLEDMM - max 48KB on -C3 with PSRAM + #define JSON_BUFFER_SIZE 46000 // WLEDMM - max 46KB on -C3 with PSRAM (chip has 400kb RAM) #else - #define JSON_BUFFER_SIZE 42000 // WLEDMM - max 42KB on -S2 with PSRAM + #define JSON_BUFFER_SIZE 36000 // WLEDMM - max 36KB on -S2 with PSRAM (chip has 320kb RAM) #endif #else #define JSON_BUFFER_SIZE 56000 // WLEDMM (was 60000) slightly reduced to avoid build error "region dram0_0_seg overflowed"