Update ESP32-HUB75-MatrixPanel-I2S-DMA.cpp
This commit is contained in:
parent
087e96d0d7
commit
c77c4d68ec
1 changed files with 4 additions and 4 deletions
|
@ -687,15 +687,15 @@ void MatrixPanel_I2S_DMA::brtCtrlOE(int brt, const bool _buff_id){
|
||||||
|
|
||||||
// Brightness control via OE toggle - disable matrix output at specified x_coord
|
// Brightness control via OE toggle - disable matrix output at specified x_coord
|
||||||
if((coloridx > lsbMsbTransitionBit || !coloridx) && ((x_coord) >= brt)){
|
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
|
// 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) {
|
if(coloridx && coloridx <= lsbMsbTransitionBit) {
|
||||||
// divide brightness in half for each bit below lsbMsbTransitionBit
|
// divide brightness in half for each bit below lsbMsbTransitionBit
|
||||||
int lsbBrightness = brt >> (lsbMsbTransitionBit - coloridx + 1);
|
int lsbBrightness = brt >> (lsbMsbTransitionBit - coloridx + 1);
|
||||||
if((x_coord) >= lsbBrightness)
|
if((x_coord) >= lsbBrightness)
|
||||||
row[x_coord] |= BIT_OE; // For Brightness
|
row[x_coord] |= BIT_OE; // Disable output after this point.
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue