From 087e96d0d771a3a1f2019dfcd2f6e48c5140e3bd Mon Sep 17 00:00:00 2001 From: mrfaptastic <12006953+mrfaptastic@users.noreply.github.com> Date: Thu, 24 Jun 2021 16:37:46 +0100 Subject: [PATCH] Inital commit --- ESP32-HUB75-MatrixPanel-I2S-DMA.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ESP32-HUB75-MatrixPanel-I2S-DMA.cpp b/ESP32-HUB75-MatrixPanel-I2S-DMA.cpp index fd31f73..6e30888 100644 --- a/ESP32-HUB75-MatrixPanel-I2S-DMA.cpp +++ b/ESP32-HUB75-MatrixPanel-I2S-DMA.cpp @@ -637,6 +637,7 @@ void MatrixPanel_I2S_DMA::clearFrameBuffer(bool _buff_id){ // drive latch while shifting out last bit of RGB data row[dma_buff.rowBits[row_idx]->width - 2] |= BIT_LAT; // -1 pixel to compensate array index starting at 0 + row[dma_buff.rowBits[row_idx]->width - 1] |= BIT_LAT; // -1 pixel to compensate array index starting at 0 // need to disable OE before/after latch to hide row transition // Should be one clock or more before latch, otherwise can get ghosting @@ -661,8 +662,8 @@ void MatrixPanel_I2S_DMA::brtCtrlOE(int brt, const bool _buff_id){ if (!initialized) return; - if (brt > PIXELS_PER_ROW - m_cfg.latch_blanking) // can't control values larger than (row_width - latch_blanking) to avoid ongoing issues being raised about brightness and ghosting. - brt = PIXELS_PER_ROW - m_cfg.latch_blanking; + if (brt > PIXELS_PER_ROW - (MAX_LAT_BLANKING + 2)) // can't control values larger than (row_width - latch_blanking) to avoid ongoing issues being raised about brightness and ghosting. + brt = PIXELS_PER_ROW - (MAX_LAT_BLANKING + 2); // +2 for a bit of buffer... if (brt < 0) brt = 0;