From 37bcbb378e34a9a5a155d8f141d3bc65209c8cfa Mon Sep 17 00:00:00 2001 From: adambla76 Date: Sun, 10 Nov 2019 14:42:49 +0100 Subject: [PATCH] Update main.ts --- main.ts | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/main.ts b/main.ts index 7f72883..0acf2e2 100644 --- a/main.ts +++ b/main.ts @@ -265,12 +265,7 @@ namespace grove { this.bit(dispData, 3); this.bit(0x7f, 2); this.bit(0x7f, 1); - this.bit(0x7f, 0); - - this.buf[3] = dispData; - this.buf[2] = 0x7f; - this.buf[1] = 0x7f; - this.buf[0] = 0x7f; + this.bit(0x7f, 0); } else if(dispData < 100) { @@ -278,11 +273,6 @@ namespace grove { this.bit((dispData / 10) % 10, 2); this.bit(0x7f, 1); 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) { @@ -290,11 +280,6 @@ namespace grove { this.bit((dispData / 10) % 10, 2); this.bit((dispData / 100) % 10, 1); 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 { @@ -302,11 +287,6 @@ namespace grove { this.bit((dispData / 10) % 10, 2); this.bit((dispData / 100) % 10, 1); 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; } } @@ -583,4 +563,4 @@ namespace grove { }) } -} \ No newline at end of file +}