From a60f99ad0a5548ec35ca0b646ca8b817ca0d5f12 Mon Sep 17 00:00:00 2001 From: David Kebler Date: Sun, 28 Apr 2019 10:02:45 -0700 Subject: [PATCH] 0.1.17 add this.bus to namespace to give access to bus functions via packet including ack --- package.json | 4 ++-- src/device.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 243dc98..bf603a7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@uci/i2c-device", - "version": "0.1.16", + "version": "0.1.17", "description": "Device Classes for I2C Interfacing", "main": "src/device", "scripts": { @@ -26,7 +26,7 @@ }, "homepage": "https://github.com/uCOMmandIt/i2c#readme", "dependencies": { - "@uci/base": "^0.1.20", + "@uci/base": "^0.1.21", "@uci-utils/logger": "0.0.14" }, "devDependencies": { diff --git a/src/device.js b/src/device.js index 05a1c57..bc2312b 100644 --- a/src/device.js +++ b/src/device.js @@ -25,6 +25,7 @@ class I2CDevice extends Base { 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.bus = this.bindFuncs(commands) + this.addNamespace('bus','s') // give remote packet access to bus commands. ack will superceed base ack } async init() {