0.1.17 add this.bus to namespace to give access to bus functions via packet including ack

master
David Kebler 2019-04-28 10:02:45 -07:00
parent 54872314ba
commit a60f99ad0a
2 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@uci/i2c-device", "name": "@uci/i2c-device",
"version": "0.1.16", "version": "0.1.17",
"description": "Device Classes for I2C Interfacing", "description": "Device Classes for I2C Interfacing",
"main": "src/device", "main": "src/device",
"scripts": { "scripts": {
@ -26,7 +26,7 @@
}, },
"homepage": "https://github.com/uCOMmandIt/i2c#readme", "homepage": "https://github.com/uCOMmandIt/i2c#readme",
"dependencies": { "dependencies": {
"@uci/base": "^0.1.20", "@uci/base": "^0.1.21",
"@uci-utils/logger": "0.0.14" "@uci-utils/logger": "0.0.14"
}, },
"devDependencies": { "devDependencies": {

View File

@ -25,6 +25,7 @@ class I2CDevice extends Base {
this.address = +opts.address // make sure any passed number is number not a string this.address = +opts.address // make sure any passed number is number not a string
this.channel = +opts.channel // if using TAC9546A channel number on which device is attached this.channel = +opts.channel // if using TAC9546A channel number on which device is attached
this.bus = this.bindFuncs(commands) this.bus = this.bindFuncs(commands)
this.addNamespace('bus','s') // give remote packet access to bus commands. ack will superceed base ack
} }
async init() { async init() {