fix bad comment

master
David Kebler 2017-10-18 17:34:34 -07:00
parent a46e9501eb
commit 35605352bf
2 changed files with 239 additions and 239 deletions

View File

@ -1,7 +1,7 @@
{
"name": "@uci/mcp",
"main": "src/mcp23008-17.js",
"version": "0.1.1",
"version": "0.1.2",
"description": "Classes and Helper Functions for using the MCP chip on I2C Bus",
"scripts": {
"test": "./node_modules/.bin/mocha --reporter list --timeout 30000",

View File

@ -4,7 +4,7 @@ const Device = require('@uci/i2c').Device,
portpin = require('./port-pin'), // classes for MCP port and pins
EventEmitter = require('events'),
_ = require('@uci/utils'),
aggregate = require("aggregation/es6")
aggregate = require('aggregation/es6')
const
Port = portpin.Port,
@ -115,7 +115,7 @@ class MCP23008 extends aggregate(Device, EventEmitter) {
// pin configurations should already be set before calling
async writePinsCfg() {
debug.L1(`writing mcp pins config`)
debug.L1('writing mcp pins config')
for (let port in this.ports) {
for (let setting in registers.pin_config) {
let reg = registers.pin_config[setting]
@ -128,7 +128,7 @@ class MCP23008 extends aggregate(Device, EventEmitter) {
await this.write(portReg(reg, port), byte)
}
}
debug.L1(`done writing mcp pins config`)
debug.L1('done writing mcp pins config')
} // end writePinsCfg
async readPort(port, opts = {}) {
@ -154,7 +154,7 @@ class MCP23008 extends aggregate(Device, EventEmitter) {
port = 'A'
}
await this.readPort(port, opts)
TODO return just true or false not the decimal of pin - will need new version on npm
// TODO return just true or false not the decimal of pin - will need new version on npm
return this.ports[port].state.bwOp(Math.pow(2, pin - 1), 'check') ? true : false
}