ISSUE #19: Corrected setDisplayToString dot bug

This commit is contained in:
rjbatista@gmail.com
2012-02-20 21:29:32 +00:00
parent 5e2afcdaeb
commit 8b1fda292d
2 changed files with 4 additions and 2 deletions

View File

@@ -1,3 +1,5 @@
- ISSUE #19: Corrected setDisplayToString dot bug.
Version 2.0.1
- ISSUE #15: Backwards compatibility with previous Arduino IDE (pure virtual functions were not supported);

View File

@@ -93,7 +93,7 @@ void TM16XX::setDisplayToString(const char* string, const word dots, const byte
{
for (int i = 0; i < displays - pos; i++) {
if (string[i] != '\0') {
sendChar(i + pos, font[string[i] - 32], dots & (1 << (displays - i - 1)) != 0);
sendChar(i + pos, font[string[i] - 32], (dots & (1 << (displays - i - 1))) != 0);
} else {
break;
}
@@ -106,7 +106,7 @@ void TM16XX::setDisplayToString(const String string, const word dots, const byte
for (int i = 0; i < displays - pos; i++) {
if (i < stringLength) {
sendChar(i + pos, font[string.charAt(i) - 32], dots & (1 << (displays - i - 1)) != 0);
sendChar(i + pos, font[string.charAt(i) - 32], (dots & (1 << (displays - i - 1))) != 0);
} else {
break;
}