fixed leading zero issue

This commit is contained in:
Lucas Pleß 2013-06-15 15:34:15 +02:00
parent fadf444a08
commit 7b3165aa7c
1 changed files with 2 additions and 2 deletions

View File

@ -91,7 +91,7 @@ static void print_sevenseg(uint8_t display, uint16_t value) {
if(display == 0) {
digitbuffer[0] = segment_translate[d[0]];
if(d[1] == 0)
if(d[1] == 0 && d[2] == 0)
digitbuffer[1] = 0x00;
else
digitbuffer[1] = segment_translate[d[1]];
@ -101,7 +101,7 @@ static void print_sevenseg(uint8_t display, uint16_t value) {
digitbuffer[2] = segment_translate[d[2]];
} else {
digitbuffer[3] = segment_translate[d[0]];
if(d[1] == 0)
if(d[1] == 0 && d[2] == 0)
digitbuffer[4] = 0x00;
else
digitbuffer[4] = segment_translate[d[1]];