File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed
Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 22
33### Enhancements
44
5- * Update openbci-utilities to v0.1.1 to patch for sendCounts.
5+ * Update openbci-utilities to v0.1.2 to patch for sendCounts.
6+ * Disconnect did not disconnect from serial port if the device was not streaming.
67
78# 2.1.1
89
Original file line number Diff line number Diff line change @@ -368,13 +368,15 @@ Cyton.prototype.disconnect = function () {
368368 if ( this . isStreaming ( ) ) {
369369 if ( this . options . verbose ) console . log ( 'stop streaming' ) ;
370370 return this . streamStop ( ) ;
371+ } else {
372+ return Promise . resolve ( ) ;
371373 }
372374 } )
373375 . then ( ( ) => {
374376 if ( ! this . isConnected ( ) ) {
375377 return Promise . reject ( Error ( 'no board connected' ) ) ;
376378 } else {
377- return new Promise ( ( resolve , reject ) => {
379+ return new Promise ( ( resolve ) => {
378380 // serial emitting 'close' will call _disconnected
379381 this . serial . close ( ( ) => {
380382 resolve ( ) ;
Original file line number Diff line number Diff line change 2121 "gaussian" : " ^1.0.0" ,
2222 "lodash" : " ^4.17.4" ,
2323 "mathjs" : " ^3.14.2" ,
24- "openbci-utilities" : " 0.1.1 " ,
24+ "openbci-utilities" : " 0.1.2 " ,
2525 "performance-now" : " ^2.1.0" ,
2626 "safe-buffer" : " ^5.1.1" ,
2727 "serialport" : " 4.0.7" ,
You can’t perform that action at this time.
0 commit comments