From d39bf80d3cb8eddecf41ffb6a40a4ae61969e85f Mon Sep 17 00:00:00 2001 From: David Kebler Date: Mon, 10 Feb 2020 21:37:00 -0800 Subject: [PATCH] 0.1.41 support closed property as dupe to state on interrupt packet --- package.json | 17 +++++------------ src/mcp230xxi.js | 1 + 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 0fa9523..cf3805e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@uci/mcp", "main": "src", - "version": "0.1.40", + "version": "0.1.41", "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", @@ -29,21 +29,14 @@ }, "homepage": "https://github.com/uCOMmandIt/uci-mcp#readme", "dependencies": { - "@uci-utils/bind-funcs": "^0.2.4", "@uci-utils/byte": "^0.2.3", - "@uci-utils/logger": "0.0.15", - "@uci-utils/ready": "^0.1.2", - "@uci/base": "^0.1.36", - "@uci/i2c-device": "^0.1.24", - "@uci/logger": "0.0.6", - "@uci/socket": "^0.2.28", - "is-plain-object": "^3.0.0", - "merge-anything": "^2.4.4" + "@uci-utils/logger": "0.0.16", + "@uci/i2c-device": "^0.1.27" }, "devDependencies": { "chai": "^4.2.0", "esm": "^3.2.25", - "mocha": "^6.2.2", - "nodemon": "^1.19.4" + "mocha": "^7.0.1", + "nodemon": "^2.0.2" } } diff --git a/src/mcp230xxi.js b/src/mcp230xxi.js index fc2df9f..039ef65 100644 --- a/src/mcp230xxi.js +++ b/src/mcp230xxi.js @@ -128,6 +128,7 @@ const icommands = { inter.port = this[ipin].mport inter.interrupt_ready = status inter.state = (await this.commands.pin.status({pin:pin, port:this.getPort(ipin)})).state + inter.closed = inter.state === 'on' ? true : false this._interruptProcess(inter) // replying with reset command which is also a check return {cmd:'reset', pin:ipin}