From fb4924cc0a4e7336e2f4e0a833dc50870c39657a Mon Sep 17 00:00:00 2001 From: "rjbatista@gmail.com" Date: Tue, 17 Jan 2012 22:19:00 +0000 Subject: [PATCH] ISSUE #18: Corrected problem with setLEDs() caused by changes in the previous version --- CHANGES.txt | 2 ++ TM1638.cpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 28c24f1..8c5eca8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,5 @@ +- ISSUE #18: Corrected problem with setLEDs() caused by changes in the previous version. + Version 2.0.0 - Support for the TM1640; diff --git a/TM1638.cpp b/TM1638.cpp index 981f857..4784b4d 100644 --- a/TM1638.cpp +++ b/TM1638.cpp @@ -82,11 +82,11 @@ void TM1638::setLEDs(word leds) for (int i = 0; i < displays; i++) { byte color = 0; - if (leds & (1 << i) != 0) { + if ((leds & (1 << i)) != 0) { color |= TM1638_COLOR_RED; } - if (leds & (1 << (i + 8)) != 0) { + if ((leds & (1 << (i + 8))) != 0) { color |= TM1638_COLOR_GREEN; }