BCM accumulation correction

This commit is contained in:
Kouzerumatsu / Bananafox 2023-01-20 13:32:51 +08:00 committed by GitHub
parent c1d85fad42
commit ffd196d9e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -692,7 +692,6 @@ void MatrixPanel_I2S_DMA::brtCtrlOEv2(uint8_t brt, const int _buff_id) {
brt = 0; brt = 0;
*/ */
int brightness_in_x_pixels = PIXELS_PER_ROW * ((float)brt/256);
//Serial.println(brightness_in_x_pixels, DEC); //Serial.println(brightness_in_x_pixels, DEC);
uint8_t _blank = m_cfg.latch_blanking; // don't want to inadvertantly blast over this uint8_t _blank = m_cfg.latch_blanking; // don't want to inadvertantly blast over this
@ -706,6 +705,7 @@ void MatrixPanel_I2S_DMA::brtCtrlOEv2(uint8_t brt, const int _buff_id) {
// let's set OE control bits for specific pixels in each color_index subrows // let's set OE control bits for specific pixels in each color_index subrows
uint8_t colouridx = dma_buff.rowBits[row_idx]->colour_depth; uint8_t colouridx = dma_buff.rowBits[row_idx]->colour_depth;
do { do {
int brightness_in_x_pixels = PIXELS_PER_ROW * brt >> 8 + max( ( dma_buff.rowBits[row_idx]->colour_depth - colouridx - 2 ), 0);
--colouridx; --colouridx;
// switch pointer to a row for a specific color index // switch pointer to a row for a specific color index