From 8b1fda292d3d3a33a4ea42d3fed5024c2b0959d0 Mon Sep 17 00:00:00 2001 From: "rjbatista@gmail.com" Date: Mon, 20 Feb 2012 21:29:32 +0000 Subject: [PATCH] ISSUE #19: Corrected setDisplayToString dot bug --- CHANGES.txt | 2 ++ TM16XX.cpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index d38742b..7f1d8ee 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -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); diff --git a/TM16XX.cpp b/TM16XX.cpp index e1f7363..38ad0c8 100644 --- a/TM16XX.cpp +++ b/TM16XX.cpp @@ -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; }