From c77c4d68ecca72b3461b633c89898d6e38183769 Mon Sep 17 00:00:00 2001 From: mrfaptastic <12006953+mrfaptastic@users.noreply.github.com> Date: Thu, 24 Jun 2021 17:14:06 +0100 Subject: [PATCH] Update ESP32-HUB75-MatrixPanel-I2S-DMA.cpp --- ESP32-HUB75-MatrixPanel-I2S-DMA.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ESP32-HUB75-MatrixPanel-I2S-DMA.cpp b/ESP32-HUB75-MatrixPanel-I2S-DMA.cpp index 6e30888..c21d2a1 100644 --- a/ESP32-HUB75-MatrixPanel-I2S-DMA.cpp +++ b/ESP32-HUB75-MatrixPanel-I2S-DMA.cpp @@ -687,16 +687,16 @@ void MatrixPanel_I2S_DMA::brtCtrlOE(int brt, const bool _buff_id){ // Brightness control via OE toggle - disable matrix output at specified x_coord if((coloridx > lsbMsbTransitionBit || !coloridx) && ((x_coord) >= brt)){ - row[x_coord] |= BIT_OE; continue; // For Brightness control + row[x_coord] |= BIT_OE; // Disable output after this point. + continue; } // special case for the bits *after* LSB through (lsbMsbTransitionBit) - OE is output after data is shifted, so need to set OE to fractional brightness if(coloridx && coloridx <= lsbMsbTransitionBit) { // divide brightness in half for each bit below lsbMsbTransitionBit int lsbBrightness = brt >> (lsbMsbTransitionBit - coloridx + 1); if((x_coord) >= lsbBrightness) - row[x_coord] |= BIT_OE; // For Brightness - - continue; + row[x_coord] |= BIT_OE; // Disable output after this point. + continue; } // clear OE bit for all other pixels