Skip to content

Commit 259af35

Browse files
author
AJ Keller
authored
Merge pull request #150 from aj-ptw/master
Fix for printing debug output
2 parents 1d2f6ff + 86307aa commit 259af35

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,7 +1139,7 @@ ourBoard.write('o');
11391139
11401140
Emitted when the serial connection to the board is closed.
11411141
1142-
#### <a name="event-close"></a> .on('droppedPacket', callback)
1142+
#### <a name="event-dropped-packet"></a> .on('droppedPacket', callback)
11431143
11441144
Emitted when a packet (or packets) are dropped. Returns an array.
11451145
@@ -1171,7 +1171,7 @@ Emitted when the board is in a ready to start streaming state.
11711171
11721172
Emitted when there is a new sample available.
11731173
1174-
#### <a name="event-sample"></a> .on('synced', callback)
1174+
#### <a name="event-synced"></a> .on('synced', callback)
11751175
11761176
Emitted when there is a new sample available.
11771177

changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# 2.0.1
2+
3+
### Bug Fixes
4+
5+
* Debug bytes was set to always print in processBytes
6+
17
# 2.0.0
28

39
### New Features

openBCICyton.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ Cyton.prototype.write = function (dataToWrite) {
553553
* @author AJ Keller (@pushtheworldllc)
554554
*/
555555
Cyton.prototype._writeAndDrain = function (data) {
556-
obciDebug.debugBytes('>>>', data);
556+
if (this.options.debug) obciDebug.debugBytes('>>>', data);
557557

558558
return new Promise((resolve, reject) => {
559559
if (!this.isConnected()) return reject(Error('Serial port not open'));
@@ -1772,7 +1772,7 @@ Cyton.prototype.syncClocksFull = function () {
17721772
* @author AJ Keller (@pushtheworldllc)
17731773
*/
17741774
Cyton.prototype._processBytes = function (data) {
1775-
obciDebug.debugBytes(this.curParsingMode + '<<', data);
1775+
if (this.options.debug) obciDebug.debugBytes(this.curParsingMode + '<<', data);
17761776

17771777
// Concat old buffer
17781778
var oldDataBuffer = null;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "openbci",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"description": "The official Node.js SDK for the OpenBCI Biosensor Board.",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)