MajicDesigns / MD_MAX72XX

LED Matrix Library
GNU Lesser General Public License v2.1
307 stars 122 forks source link

Corruption in scrolled text example #54

Closed elan closed 1 year ago

elan commented 1 year ago

Scrolling text can leave garbage in-between characters. This is due to the code here:

    for (uint8_t i=0; i<=charWidth; i++)
    {
      mx.transform(MD_MAX72XX::TSL);
      if (i < charWidth)
        mx.setColumn(0, cBuf[i]);
      delay(DELAYTIME);
    }

The correct code should be like this (we need to zero out the row explicitly):

    for (uint8_t i=0; i<=charWidth; i++)
    {
      mx.transform(MD_MAX72XX::TSL);
      mx.setColumn(0, (i < charWidth) ? cBuf[i] : 0);
      delay(DELAYTIME);
    }

Thanks for a great library!

MajicDesigns commented 1 year ago

Which example file? (name)

elan commented 1 year ago

I apologize for the lack of context: https://github.com/MajicDesigns/MD_MAX72XX/blob/a761e79a2cf29538cbbdb0c0cb0754ac7ddc8612/examples/MD_MAX72xx_Test/MD_MAX72xx_Test.ino#L53-L58

MajicDesigns commented 1 year ago

Change will be included in the next release.