From 08c2446f61ce8f8d185f83ed2b96f42f53b46039 Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Tue, 17 Sep 2024 18:11:06 +0200 Subject: [PATCH] better PSRAM flags handling (minor) in MM, we can have WLED_USE_PSRAM_JSON instead of WLED_USE_PSRAM. --- wled00/bus_manager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wled00/bus_manager.cpp b/wled00/bus_manager.cpp index a29ae468..0811ea5d 100644 --- a/wled00/bus_manager.cpp +++ b/wled00/bus_manager.cpp @@ -786,8 +786,8 @@ BusHub75Matrix::BusHub75Matrix(BusConfig &bc) : Bus(bc.type, bc.start, bc.autoWh setBitArray(_ledsDirty, _len, false); // reset dirty bits if (mxconfig.double_buff == false) { - #if defined(CONFIG_IDF_TARGET_ESP32S3) && defined(BOARD_HAS_PSRAM) && defined(WLED_USE_PSRAM) && defined(CONFIG_SPIRAM_MODE_OCT) - if (psramFound()){ + #if defined(CONFIG_IDF_TARGET_ESP32S3) && CONFIG_SPIRAM_MODE_OCT && defined(BOARD_HAS_PSRAM) && (defined(WLED_USE_PSRAM) || defined(WLED_USE_PSRAM_JSON)) + if (psramFound()) { _ledBuffer = (CRGB*) ps_calloc(_len, sizeof(CRGB)); // create LEDs buffer (initialized to BLACK) } else { _ledBuffer = (CRGB*) calloc(_len, sizeof(CRGB)); // create LEDs buffer (initialized to BLACK)