fixed leading zero issue
This commit is contained in:
parent
fadf444a08
commit
7b3165aa7c
|
@ -91,7 +91,7 @@ static void print_sevenseg(uint8_t display, uint16_t value) {
|
||||||
|
|
||||||
if(display == 0) {
|
if(display == 0) {
|
||||||
digitbuffer[0] = segment_translate[d[0]];
|
digitbuffer[0] = segment_translate[d[0]];
|
||||||
if(d[1] == 0)
|
if(d[1] == 0 && d[2] == 0)
|
||||||
digitbuffer[1] = 0x00;
|
digitbuffer[1] = 0x00;
|
||||||
else
|
else
|
||||||
digitbuffer[1] = segment_translate[d[1]];
|
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]];
|
digitbuffer[2] = segment_translate[d[2]];
|
||||||
} else {
|
} else {
|
||||||
digitbuffer[3] = segment_translate[d[0]];
|
digitbuffer[3] = segment_translate[d[0]];
|
||||||
if(d[1] == 0)
|
if(d[1] == 0 && d[2] == 0)
|
||||||
digitbuffer[4] = 0x00;
|
digitbuffer[4] = 0x00;
|
||||||
else
|
else
|
||||||
digitbuffer[4] = segment_translate[d[1]];
|
digitbuffer[4] = segment_translate[d[1]];
|
||||||
|
|
Loading…
Reference in New Issue