File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -513,8 +513,8 @@ To do:
513
513
this . hadData = false ;
514
514
this . flowControlWait = 0 ;
515
515
this . rxDataHandlerLastCh = 0 ;
516
- if ( this . isOpen ) {
517
- this . isOpen = false ;
516
+ if ( ! this . isOpen ) {
517
+ this . isOpen = true ;
518
518
this . emit ( "open" ) ;
519
519
}
520
520
// if we had any writes queued, do them now
@@ -569,8 +569,8 @@ To do:
569
569
return ;
570
570
}
571
571
var txItem = connection . txDataQueue [ 0 ] ;
572
- uart . writeProgress ( txItem . maxLength - txItem . data . length , txItem . maxLength ) ;
573
- connection . updateProgress ( txItem . maxLength - txItem . data . length , txItem . maxLength ) ;
572
+ uart . writeProgress ( txItem . maxLength - ( txItem . data ? txItem . data . length : 0 ) , txItem . maxLength ) ;
573
+ connection . updateProgress ( txItem . maxLength - ( txItem . data ? txItem . data . length : 0 ) , txItem . maxLength ) ;
574
574
if ( txItem . data . length <= connection . chunkSize ) {
575
575
chunk = txItem . data ;
576
576
txItem . data = undefined ;
@@ -893,7 +893,7 @@ To do:
893
893
} ) ;
894
894
return device . gatt . connect ( ) ;
895
895
} ) . then ( function ( server ) {
896
- log ( 1 , "Connected" ) ;
896
+ log ( 2 , "BLE Connected" ) ;
897
897
btServer = server ;
898
898
return server . getPrimaryService ( NORDIC_SERVICE ) ;
899
899
} ) . then ( function ( service ) {
You can’t perform that action at this time.
0 commit comments