hasnain99 / tm1638-library

Automatically exported from code.google.com/p/tm1638-library
0 stars 0 forks source link

TM1638QYF has swapped first and second four positions on display #36

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Any output to display.

What is the expected output? What do you see instead?
Expected: "01234567"
Reality: "45670123"

What version of the product are you using? On what operating system?
library version: 2.2.0

To solve this problem change following code in TM1638QYF.cpp in function 
TM1638QYF::setDisplay:

change line:
    sendData(i << 1, val);
... to:
    sendData(i << 1, ((val & 0x0F) << 4) | ((val & 0xF0) >> 4)); // swap Hi-Lo nibble

Original issue reported on code.google.com by jiri.sut...@gmail.com on 26 Jul 2015 at 6:23