Skip to content

Commit

Permalink
Merge pull request #155 from aj-ptw/master
Browse files Browse the repository at this point in the history
v2.1.2
  • Loading branch information
AJ Keller authored Jul 20, 2017
2 parents 7e7ccf3 + 0abebcd commit 2992d23
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
7 changes: 7 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# 2.1.2

### Enhancements

* Update openbci-utilities to v0.1.2 to patch for sendCounts.
* Disconnect did not disconnect from serial port if the device was not streaming.

# 2.1.1

### Bug Fixes
Expand Down
4 changes: 3 additions & 1 deletion openBCICyton.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,13 +368,15 @@ Cyton.prototype.disconnect = function () {
if (this.isStreaming()) {
if (this.options.verbose) console.log('stop streaming');
return this.streamStop();
} else {
return Promise.resolve();
}
})
.then(() => {
if (!this.isConnected()) {
return Promise.reject(Error('no board connected'));
} else {
return new Promise((resolve, reject) => {
return new Promise((resolve) => {
// serial emitting 'close' will call _disconnected
this.serial.close(() => {
resolve();
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "openbci",
"version": "2.1.1",
"version": "2.1.2",
"description": "The official Node.js SDK for the OpenBCI Biosensor Board.",
"main": "index.js",
"scripts": {
Expand All @@ -21,7 +21,7 @@
"gaussian": "^1.0.0",
"lodash": "^4.17.4",
"mathjs": "^3.14.2",
"openbci-utilities": "0.1.0",
"openbci-utilities": "0.1.2",
"performance-now": "^2.1.0",
"safe-buffer": "^5.1.1",
"serialport": "4.0.7",
Expand Down

0 comments on commit 2992d23

Please sign in to comment.