From 31edc73380c474c994ae4b7c1a624b9b8aa810a7 Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Sat, 13 Jan 2024 18:52:34 +0000 Subject: [PATCH] Tweaks --- platformio.ini | 3 ++- wled00/bus_manager.cpp | 19 ++++++------------- wled00/bus_manager.h | 1 + 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/platformio.ini b/platformio.ini index 99160071..64910e37 100644 --- a/platformio.ini +++ b/platformio.ini @@ -2185,5 +2185,6 @@ build_flags = ${common.build_flags} ${esp32s3.build_flags} -Wno-misleading-inden -D WLED_DEBUG ; -D SR_DEBUG ; -D MIC_LOGGER - -D WLED_ENABLE_SMARTMATRIX -D NO_GFX + -D WLED_USE_PSRAM -DBOARD_HAS_PSRAM ; tells WLED that PSRAM shall be used + -D WLED_ENABLE_SMARTMATRIX -D NO_GFX ;-D SPIRAM_FRAMEBUFFER -D DEFAULT_LED_TYPE=60 \ No newline at end of file diff --git a/wled00/bus_manager.cpp b/wled00/bus_manager.cpp index 450e45b1..82e19644 100644 --- a/wled00/bus_manager.cpp +++ b/wled00/bus_manager.cpp @@ -556,26 +556,19 @@ uint8_t oePin = 14; // Allocate memory and start DMA display if( not display->begin() ) { - Serial.println("****** !KABOOM! I2S memory allocation failed ***********"); + USER_PRINTLN("****** !KABOOM! I2S memory allocation failed ***********"); } USER_PRINTLN("MatrixPanel_I2S_DMA started"); } void BusSmartMatrix::setPixelColor(uint16_t pix, uint32_t c) { - uint8_t r = R(c); - uint8_t g = G(c); - uint8_t b = B(c); - uint8_t x = pix % mxconfig.mx_width; - uint8_t y = floor(pix / mxconfig.mx_width); + r = R(c); + g = G(c); + b = B(c); + x = pix % mxconfig.mx_width; + y = floor(pix / mxconfig.mx_width); display->drawPixelRGB888(x, y, r, g, b); - - //display->drawPixelRGB888(1, 31, 0, 0, 255 ); - - // display->drawPixelRGB888(31, 31, 255, 255, 0 ); - - // display->drawPixelRGB888(1, 31, 0, 0, 255 ); - } void BusSmartMatrix::setBrightness(uint8_t b, bool immediate) { diff --git a/wled00/bus_manager.h b/wled00/bus_manager.h index 99a86d22..61f7fef7 100644 --- a/wled00/bus_manager.h +++ b/wled00/bus_manager.h @@ -369,6 +369,7 @@ class BusSmartMatrix : public Bus { private: MatrixPanel_I2S_DMA *display = nullptr; HUB75_I2S_CFG mxconfig; + uint8_t r, g, b, x, y; }; #endif