Skip to content

Commit

Permalink
brightness fix
Browse files Browse the repository at this point in the history
  • Loading branch information
2dom committed Apr 30, 2020
1 parent 04554a7 commit 57b2539
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions PxMatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -640,8 +640,7 @@ inline void PxMATRIX::fillMatrixBuffer(int16_t x, int16_t y, uint8_t r, uint8_t
x =_width - 1 -x;

if ((x < 0) || (x >= _width) || (y < 0) || (y >= _height))
return;

return;

if (_color_order!= RRGGBB)
{
Expand Down Expand Up @@ -1055,7 +1054,7 @@ uint8_t (*bufferp)[PxMATRIX_COLOR_DEPTH][buffer_size] = &PxMATRIX_buffer;
for (uint8_t i=0;i<_row_pattern;i++)
{
if(_driver_chip == SHIFT) {
if (_fast_update){
if ((_fast_update)&&(_brightness==255)){

// This will clock data into the display while the outputs are still
// latched (LEDs on). We therefore utilize SPI transfer latency as LED
Expand Down Expand Up @@ -1157,7 +1156,7 @@ uint8_t (*bufferp)[PxMATRIX_COLOR_DEPTH][buffer_size] = &PxMATRIX_buffer;
digitalWrite(_OE_PIN, 0); //<<<< insert this
unsigned long start_time = micros();

while ((micros()-start_time)<show_time)
while ((micros()-start_time)<latch_time)
delayMicroseconds(1);
//GPIO_REG_CLEAR( 1 << _OE_PIN);
digitalWrite(_OE_PIN, 1);
Expand Down

0 comments on commit 57b2539

Please sign in to comment.