File tree Expand file tree Collapse file tree 1 file changed +8
-12
lines changed
Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ class VirtualSerial {
99 constructor ( ) {
1010 this . connected = false ;
1111 this . connectionId = false ;
12- this . openCanceled = false ;
1312 this . bitrate = 0 ;
1413 this . bytesReceived = 0 ;
1514 this . bytesSent = 0 ;
@@ -18,25 +17,22 @@ class VirtualSerial {
1817 this . transmitting = false ;
1918 this . outputBuffer = [ ] ;
2019 }
21- connect ( port , options , callback ) {
22- if ( ! this . openCanceled ) {
23- this . connected = true ;
24- this . connectionId = VIRTUAL ;
25- this . bitrate = 115200 ;
26- callback ( ) ;
27- }
20+ connect ( port , options ) {
21+ this . connected = true ;
22+ this . connectionId = VIRTUAL ;
23+ this . bitrate = 115200 ;
24+ return true ;
2825 }
29- disconnect ( callback ) {
26+ disconnect ( ) {
3027 this . connected = false ;
3128 this . outputBuffer = [ ] ;
3229 this . transmitting = false ;
3330 if ( this . connectionId ) {
3431 this . connectionId = false ;
3532 this . bitrate = 0 ;
36- if ( callback ) {
37- callback ( true ) ;
38- }
33+ return true ;
3934 }
35+ return false ;
4036 }
4137 getConnectedPort ( ) {
4238 return this . connectionId ;
You can’t perform that action at this time.
0 commit comments