Skip to content

Commit 25dc728

Browse files
committed
Workaround for correct MPR121 ESPRIMA minification
1 parent 6e66cb8 commit 25dc728

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

devices/MPR121.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ var mpr = require("MPR121").connect(I2C1, ready, { address: 0x5B });
2323
Default address is 0x5A, if tied to 3.3V its 0x5B
2424
If tied to SDA its 0x5C and if SCL then 0x5D
2525
*/
26-
exports.connect = (i2c, callback, options) => {
26+
exports.connect = function(i2c, callback, options) {
2727
options = options || {};
2828

2929
let addr = options.address || 0x5A; // default address
@@ -32,13 +32,13 @@ exports.connect = (i2c, callback, options) => {
3232
read: (count) => i2c.readFrom(addr, count),
3333
write: (data) => i2c.writeTo(addr, data),
3434

35-
touched: () => {
35+
touched: function() {
3636
i2c.writeTo(addr, 0x00);
3737
var data = i2c.readFrom(addr, 2);
3838
return (data[1] << 8) || data[0];
3939
},
4040

41-
setThresholds: (touch, release) => {
41+
setThresholds: function(touch, release) {
4242
for (i=0; i<24; i+=2) {
4343
i2c.writeTo(addr, 0x41+i, touch);
4444
i2c.writeTo(addr, 0x42+i, release);

0 commit comments

Comments
 (0)