aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormrfaptastic <12006953+mrfaptastic@users.noreply.github.com>2023-02-10 06:18:14 +1000
committerGitHub <noreply@github.com>2023-02-10 06:18:14 +1000
commit6fbf31ea1c9004c3f125df97b5e8eb2a8e0e26c3 (patch)
tree68e7b821dd4cbe05803cefa30210a71fbf9360b0 /src
parent59071660fcb94aaed5b5925815229b7fafbc09f5 (diff)
parent70c2ad6c06414969884e89a80de71f613a758bb4 (diff)
Merge pull request #394 from Kouzeru/master
Slight fix to catch the least bits
Diffstat (limited to 'src')
-rw-r--r--src/ESP32-HUB75-MatrixPanel-I2S-DMA.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ESP32-HUB75-MatrixPanel-I2S-DMA.cpp b/src/ESP32-HUB75-MatrixPanel-I2S-DMA.cpp
index dea7ce6..e3ddbad 100644
--- a/src/ESP32-HUB75-MatrixPanel-I2S-DMA.cpp
+++ b/src/ESP32-HUB75-MatrixPanel-I2S-DMA.cpp
@@ -715,7 +715,8 @@ void MatrixPanel_I2S_DMA::brtCtrlOEv2(uint8_t brt, const int _buff_id) {
char rightshift = std::max( bitplane - bitshift - 2, 0 );
// calculate the OE disable period by brightness, and also blanking
- int brightness_in_x_pixels = ( ( _width - _blank ) * brt) >> (8 + rightshift);
+ int brightness_in_x_pixels = ( ( _width - _blank ) * brt ) >> ( 7 + rightshift );
+ brightness_in_x_pixels = ( brightness_in_x_pixels >> 1 ) | ( brightness_in_x_pixels & 1 );
// switch pointer to a row for a specific color index
ESP32_I2S_DMA_STORAGE_TYPE* row = dma_buff.rowBits[row_idx]->getDataPtr(colouridx, _buff_id);