Skip to content

Commit

Permalink
Merge pull request #85 from aj-ptw/fix-constants-constructor
Browse files Browse the repository at this point in the history
Fix constants not set in constructor
  • Loading branch information
AJ Keller authored Sep 29, 2016
2 parents 3c46100 + 470ee81 commit 18b137b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 1.3.1

### Bug Fixes

* Fixed bug where `connected` and `streaming` were not set in constructor

# 1.3.0

### New Features
Expand Down
3 changes: 3 additions & 0 deletions openBCIBoard.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ function OpenBCIFactory() {
this.accelArray = [0,0,0]; // X, Y, Z
this.channelSettingsArray = k.channelSettingsArrayInit(k.numberOfChannelsForBoardType(this.options.boardType));
this.writeOutArray = new Array(100);
// Booleans
this.connected = false;
this.streaming = false;
// Buffers
this.buffer = null;
this.masterBuffer = masterBufferMaker();
Expand Down
2 changes: 2 additions & 0 deletions test/openBCIBoard-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ describe('openbci-sdk',function() {
expect(board.options.verbose).to.be.false;
expect(board.sampleRate()).to.equal(250);
expect(board.numberOfChannels()).to.equal(8);
expect(board.connected).to.be.false;
expect(board.streaming).to.be.false;
});
it('should be able to set ganglion mode', () => {
var board = new openBCIBoard.OpenBCIBoard({
Expand Down

0 comments on commit 18b137b

Please sign in to comment.