Fixes #23 by hard setting noble version number to 0.1.7

Esse commit está contido em:
AJ Keller
2017-02-16 10:56:14 -05:00
commit b3f917ae9f
4 arquivos alterados com 32 adições e 21 exclusões
+5
Ver Arquivo
@@ -1,3 +1,8 @@
# 0.4.3
### Bug Fixes
* Fix #23 by hard setting noble to 0.1.7, 0.1.8 breaks
# 0.4.2
### New Features
+17 -16
Ver Arquivo
@@ -2,8 +2,7 @@ const Ganglion = require('../../index').Ganglion;
const k = require('../../openBCIConstants');
const verbose = true;
let ganglion = new Ganglion({
// debug: true; ,
nobleAutoStart: false,
debug: true,
sendCounts: true,
verbose: verbose
}, (error) => {
@@ -63,7 +62,7 @@ ganglion.once(k.OBCIEmitterGanglionFound, (peripheral) => {
});
ganglion.on('message', (message) => {
// console.log('message: ', message.toString());
console.log('message: ', message.toString());
});
let lastVal = 0;
@@ -81,21 +80,23 @@ ganglion.once(k.OBCIEmitterGanglionFound, (peripheral) => {
});
ganglion.once('ready', () => {
if (accel) {
ganglion.accelStart()
.then(() => {
return ganglion.streamStart();
})
.catch(errorFunc);
} else if (impedance) {
ganglion.impedanceStart().catch(errorFunc);
} else {
// ganglion.streamStart().catch(errorFunc);
}
console.log('ready');
// if (accel) {
// ganglion.accelStart()
// .then(() => {
// return ganglion.streamStart();
// })
// .catch(errorFunc);
// } else if (impedance) {
// ganglion.impedanceStart().catch(errorFunc);
// } else {
//
// }
ganglion.streamStart().catch(errorFunc);
console.log('ready');
});
ganglion.connect(peripheral).catch(errorFunc);
ganglion.connect("Ganglion-58f3").catch(errorFunc);
});
function exitHandler (options, err) {
+8 -3
Ver Arquivo
@@ -511,9 +511,14 @@ Ganglion.prototype.write = function (data) {
if (!Buffer.isBuffer(data)) {
data = new Buffer(data);
}
if (this.options.debug) openBCIUtils.debugBytes('>>>', data);
this._sendCharacteristic.write(data);
resolve();
this._sendCharacteristic.write(data, true, (err) => {
if (err) {
reject(err);
} else {
if (this.options.debug) openBCIUtils.debugBytes('>>>', data);
resolve();
}
});
} else {
reject('Send characteristic not set, please call connect method');
}
+2 -2
Ver Arquivo
@@ -1,6 +1,6 @@
{
"name": "openbci-ganglion",
"version": "0.4.2",
"version": "0.4.3",
"description": "The official Node.js SDK for the OpenBCI Ganglion Biosensor Board.",
"main": "index.js",
"scripts": {
@@ -22,7 +22,7 @@
"gaussian": "^1.0.0",
"lodash": "^4.16.6",
"mathjs": "^3.3.0",
"noble": "^1.7.0",
"noble": "1.7.0",
"performance-now": "^0.2.0",
"sntp": "^2.0.0",
"streamsearch": "^0.1.2"