Update main.ts

This commit is contained in:
adambla76 2019-11-10 14:42:49 +01:00 committed by Baozhu Zuo
parent eba0e205f5
commit 37bcbb378e

20
main.ts
View File

@ -266,11 +266,6 @@ namespace grove {
this.bit(0x7f, 2); this.bit(0x7f, 2);
this.bit(0x7f, 1); this.bit(0x7f, 1);
this.bit(0x7f, 0); this.bit(0x7f, 0);
this.buf[3] = dispData;
this.buf[2] = 0x7f;
this.buf[1] = 0x7f;
this.buf[0] = 0x7f;
} }
else if(dispData < 100) else if(dispData < 100)
{ {
@ -278,11 +273,6 @@ namespace grove {
this.bit((dispData / 10) % 10, 2); this.bit((dispData / 10) % 10, 2);
this.bit(0x7f, 1); this.bit(0x7f, 1);
this.bit(0x7f, 0); this.bit(0x7f, 0);
this.buf[3] = dispData % 10;
this.buf[2] = (dispData / 10) % 10;
this.buf[1] = 0x7f;
this.buf[0] = 0x7f;
} }
else if(dispData < 1000) else if(dispData < 1000)
{ {
@ -290,11 +280,6 @@ namespace grove {
this.bit((dispData / 10) % 10, 2); this.bit((dispData / 10) % 10, 2);
this.bit((dispData / 100) % 10, 1); this.bit((dispData / 100) % 10, 1);
this.bit(0x7f, 0); this.bit(0x7f, 0);
this.buf[3] = dispData % 10;
this.buf[2] = (dispData / 10) % 10;
this.buf[1] = (dispData / 100) % 10;
this.buf[0] = 0x7f;
} }
else else
{ {
@ -302,11 +287,6 @@ namespace grove {
this.bit((dispData / 10) % 10, 2); this.bit((dispData / 10) % 10, 2);
this.bit((dispData / 100) % 10, 1); this.bit((dispData / 100) % 10, 1);
this.bit((dispData / 1000) % 10, 0); this.bit((dispData / 1000) % 10, 0);
this.buf[3] = dispData % 10;
this.buf[2] = (dispData / 10) % 10;
this.buf[1] = (dispData / 100) % 10;
this.buf[0] = (dispData / 1000) % 10;
} }
} }