From e3e9ff72faa910fb2ebb5d1512f04286fe5e807d Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Sun, 25 Feb 2024 11:24:12 +0000 Subject: [PATCH] Force chain length to 1 for 64 panels --- wled00/bus_manager.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wled00/bus_manager.cpp b/wled00/bus_manager.cpp index 64a104fc..744fdf78 100644 --- a/wled00/bus_manager.cpp +++ b/wled00/bus_manager.cpp @@ -466,7 +466,6 @@ BusHub75Matrix::BusHub75Matrix(BusConfig &bc) : Bus(bc.type, bc.start, bc.autoWh mxconfig.double_buff = false; // <------------- Turn on double buffer - mxconfig.chain_length = max((u_int8_t) 1, min(bc.pins[0], (u_int8_t) 4)); // prevent bad data preventing boot due to low memory fourScanPanel = nullptr; @@ -493,6 +492,13 @@ BusHub75Matrix::BusHub75Matrix(BusConfig &bc) : Bus(bc.type, bc.start, bc.autoWh break; } + mxconfig.chain_length = max((u_int8_t) 1, min(bc.pins[0], (u_int8_t) 4)); // prevent bad data preventing boot due to low memory + + if(mxconfig.mx_width >= 64 && (bc.pins[0] > 1)) { + USER_PRINT("WARNING, only single panel can be used of 64x64 due to memory") + mxconfig.chain_length = 1; + } + // mxconfig.driver = HUB75_I2S_CFG::SHIFTREG; #if defined(ARDUINO_ADAFRUIT_MATRIXPORTAL_ESP32S3) // MatrixPortal ESP32-S3