0.3.0 bump version for 3-2020 deployment of light code
use this.getSocket to get attached observer namemaster
parent
76803d58a1
commit
aa6a789afd
12
.travis.yml
12
.travis.yml
|
@ -1,12 +0,0 @@
|
||||||
language: node_js
|
|
||||||
|
|
||||||
node_js:
|
|
||||||
- '7.10'
|
|
||||||
- 'node'
|
|
||||||
|
|
||||||
sudo: false
|
|
||||||
|
|
||||||
script: npm test
|
|
||||||
|
|
||||||
after_success:
|
|
||||||
- bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"
|
|
|
@ -1,4 +0,0 @@
|
||||||
{
|
|
||||||
"ignoreRoot": [".git"],
|
|
||||||
"watch": ["node_modules/@uci/*/src","node_modules/@uci-utils/*/src","src","examples"]
|
|
||||||
}
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@uci/i2c-device",
|
"name": "@uci/i2c-device",
|
||||||
"version": "0.1.28",
|
"version": "0.3.0",
|
||||||
"description": "Device Classes for I2C Interfacing",
|
"description": "Device Classes for I2C Interfacing",
|
||||||
"main": "src/device",
|
"main": "src/device",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -26,14 +26,14 @@
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/uCOMmandIt/i2c#readme",
|
"homepage": "https://github.com/uCOMmandIt/i2c#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@uci/base": "^0.1.43",
|
"@uci/base": "^0.5.0",
|
||||||
"@uci-utils/logger": "^0.0.16"
|
"@uci-utils/logger": "^0.0.16"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"chai": "^4.2.0",
|
"chai": "^4.2.0",
|
||||||
"chai-as-promised": "^7.1.1",
|
"chai-as-promised": "^7.1.1",
|
||||||
"esm": "^3.2.25",
|
"esm": "^3.2.25",
|
||||||
"mocha": "^7.0.1",
|
"mocha": "^7.1.0",
|
||||||
"nodemon": "^2.0.2"
|
"nodemon": "^2.0.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ class I2CDevice extends Base {
|
||||||
this._s.ack = async (packet) => { return Object.assign(packet,await this.bus.ack()) } // give socket access to bus.ack
|
this._s.ack = async (packet) => { return Object.assign(packet,await this.bus.ack()) } // give socket access to bus.ack
|
||||||
|
|
||||||
this.ready.addObserver(`${opts.i2cbus.name}:process`) // will emit on received <bus>:process ready packet
|
this.ready.addObserver(`${opts.i2cbus.name}:process`) // will emit on received <bus>:process ready packet
|
||||||
let busobs = this.ready.combineObservers(`${opts.i2cbus.name}`,[`${opts.i2cbus.name}:consumer`,`${opts.i2cbus.name}:process`])
|
let busobs = this.ready.combineObservers(`${opts.i2cbus.name}`,[this.getSocket(opts.i2cbus.name).obsName,`${opts.i2cbus.name}:process`])
|
||||||
// make device ack by extending bus observer
|
// make device ack by extending bus observer
|
||||||
this.ready.addObserver('i2c:device:ack',busobs
|
this.ready.addObserver('i2c:device:ack',busobs
|
||||||
.pipe(
|
.pipe(
|
||||||
|
|
Loading…
Reference in New Issue