maxint-rd / TM16xx

Arduino TM16xx library for LED & KEY and LED Matrix modules based on TM1638, TM1637, TM1640 and similar chips. Simply use print() on 7-segment and use Adafruit GFX on matrix.
169 stars 34 forks source link

TM16xxDisplay.cpp bug #43

Open cNavsky opened 9 months ago

cNavsky commented 9 months ago

if(TM16XX_OPT_COMBIDISPLAY) condition reversed in functions:

M16xxDisplay::setIntensity (line105), and TM16xxDisplay::clear (line 203).

i.e. it refer to _aModules[I] when TM16XX_OPT_COMBIDISPLAY set to 0

maxint-rd commented 9 months ago

Hi @cNavsky, thank you for your attention to find this bug and for your notification!

Your contribution is much appreciated as I didn't catch this bug. Apparently I didn't notice the incomplete behavior when setting that option to 1 and probably didn't even test setting that option to 0. Duh...

Probably the bug would prevent compilation when the option was set to zero, so I'm happy to fix it. I just committed a quick fix, but don't have time to do a full test now...

For readers: The option is there to reduce the code when using a small MCU.