From 7c6678133c27effa310e8f5b503bac093874bf7e Mon Sep 17 00:00:00 2001 From: "rjbatista@gmail.com" Date: Sun, 4 Dec 2011 18:29:34 +0000 Subject: [PATCH] Minor optimization --- InvertedTM1638.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/InvertedTM1638.cpp b/InvertedTM1638.cpp index 38b197a..56b7504 100644 --- a/InvertedTM1638.cpp +++ b/InvertedTM1638.cpp @@ -53,9 +53,5 @@ byte InvertedTM1638::getButtons() void InvertedTM1638::sendChar(byte pos, byte data, boolean dot) { - byte n = data; - - n = n & 128 | n & 64 | (n & 4) << 3 | (n & 2) << 3 | (n & 1) << 3 | (n & 32) >> 3 | (n & 16) >> 3 | (n & 8) >> 3; - - TM1638::sendChar(7 - pos, n, dot); + TM1638::sendChar(7 - pos, data & 0xC0 | (data & 0x07) << 3 | (data & 0x38) >> 3, dot); }