From 7b238e67f094e669f271213eb41582fc4490aab3 Mon Sep 17 00:00:00 2001 From: Todd Treece Date: Thu, 19 May 2016 13:26:59 -0400 Subject: [PATCH] remove check device method --- index.js | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/index.js b/index.js index d06f866..5937ade 100644 --- a/index.js +++ b/index.js @@ -92,8 +92,7 @@ class MPR121 extends EventEmitter { configure() { - return this.checkDevice() - .then(() => this.setThresholds(12, 6)) + return this.setThresholds(12, 6) .then(() => this.writeByte(MPR121_MHDR, 0x01)) .then(() => this.writeByte(MPR121_NHDR, 0x01)) .then(() => this.writeByte(MPR121_NCLR, 0x0E)) @@ -116,21 +115,6 @@ class MPR121 extends EventEmitter { } - checkDevice() { - - return this.readByte(MPR121_CONFIG2) - .then((c) => { - - // TODO figure out why this fails on ras pi - // if(c != 0x24) - // return Promise.reject(`MPR121 notfound. Check address, bus and wiring. (${c} != 36)`); - - return Promise.resolve(); - - }); - - } - setThresholds(touch, release) { if(touch < 0 || touch > 255) return Promise.reject();