Skip to content

Commit

Permalink
HUB75: trade bit depth against memory needs
Browse files Browse the repository at this point in the history
gradually reduce bitdepts on esp32
  • Loading branch information
softhack007 committed Sep 28, 2024
1 parent 2aa0d47 commit 59ca792
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions wled00/bus_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,14 @@ BusHub75Matrix::BusHub75Matrix(BusConfig &bc) : Bus(bc.type, bc.start, bc.autoWh
break;
}

#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32S2)// classic esp32, or esp32-s2: reduce bitdepth for large panels
if (mxconfig.mx_height >= 64) {
if (mxconfig.chain_length * mxconfig.mx_width > 192) mxconfig.setPixelColorDepthBits(3);
else if (mxconfig.chain_length * mxconfig.mx_width > 64) mxconfig.setPixelColorDepthBits(4);
else mxconfig.setPixelColorDepthBits(8);
} else mxconfig.setPixelColorDepthBits(8);
#endif

#if defined(ARDUINO_ADAFRUIT_MATRIXPORTAL_ESP32S3) // MatrixPortal ESP32-S3

// https://www.adafruit.com/product/5778
Expand Down

0 comments on commit 59ca792

Please sign in to comment.