diff --git a/.gitignore b/.gitignore index 1a359fd..b9e74b5 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /syncd/ *.lock *.travis.yml +/.yalc/ diff --git a/package.json b/package.json index 242ddcd..86f0c96 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@uci/mcp", "main": "src", - "version": "0.1.38", + "version": "0.1.39", "description": "Classes and Helper Functions for using the MCP chip on I2C Bus", "scripts": { "outputs": "./node_modules/.bin/nodemon -r esm --preserve-symlinks examples/outputs", diff --git a/src/mcp230xx.js b/src/mcp230xx.js index a65d260..c1dfbfa 100644 --- a/src/mcp230xx.js +++ b/src/mcp230xx.js @@ -19,16 +19,13 @@ class MCP230XX extends Device { this.commands = this.bindFuncs(commands) this.addNamespace('commands', 's') // allow access to commands via socket/server - if (opts.lport) this.registerSocket('mcp-t','s','t',{port:opts.lport}) - if (opts.lpath) this.registerSocket('mcp-n','s','n',{path: opts.lpath}) - - this.ready.addObserver('mcp',this.ready.getObserver('i2c').pipe( + this.ready.addObserver('mcp:configure',this.ready.getObserver('i2c:device:ack').pipe( map(async ready => { if (ready) { let res = await this.commands.chip.cfg({cfg:this.chipCfg}) if (!res.error) { let res = await this.commands.pin.cfgs({configs:this.pinsCfg}) - return res.error? false :true + return res.error? false : true } return false } return false