@@ -4,18 +4,6 @@ import {
4
4
} from 'rxjs/operators' ;
5
5
import Daemon from './daemon' ;
6
6
7
- // function mapSerialPortToDevice(port) {
8
- // const info = port.getInfo();
9
- // return {
10
- // Name: `Board-${info.usbVendorId}-${info.usbProductId}`,
11
- // SerialNumber: `${info.usbVendorId}-${info.usbProductId}`,
12
- // IsOpen: true,
13
- // VendorID: '0x2341', // String(info.usbVendorId),
14
- // ProductID: '0x0054', // String(info.usbProductId)
15
- // // type: 'web-serial'
16
- // };
17
- // }
18
-
19
7
export default class WebSerialDaemon extends Daemon {
20
8
constructor ( boardsUrl ) {
21
9
super ( boardsUrl ) ;
@@ -70,31 +58,8 @@ export default class WebSerialDaemon extends Daemon {
70
58
// eslint-disable-next-line class-methods-use-this
71
59
closeAllPorts ( ) {
72
60
console . log ( 'should be closing serial ports here' ) ;
73
- // const devices = this.devicesList.getValue().serial;
74
- // TODO: do something to close the seriap ports...
75
61
}
76
62
77
- // async cdcReset() {
78
- // this.webSerialManager.cdcReset();
79
- // }
80
-
81
- // async askPermissionAndCdcReset() {
82
- // const port = await this.connectToSerialDevice();
83
- // const { usbVendorId, usbProductId } = port.getInfo();
84
- // this.webSerialManager.cdcReset();
85
- // this.appMessages.next({
86
- // ports: [{
87
- // Name: `Board-${usbVendorId}-${usbProductId}`,
88
- // SerialNumber: `${usbVendorId}-${usbProductId}`,
89
- // IsOpen: true,
90
- // VendorID: `0x${usbVendorId.toString(16).padStart(4, 0)}`,
91
- // ProductID: `0x${usbProductId.toString(16).padStart(4, 0)}`,
92
- // // type: 'web-serial'
93
- // serialAPI: 'web'
94
- // }]
95
- // });
96
- // }
97
-
98
63
/**
99
64
* Request serial port open
100
65
* @param {string } port the port name
0 commit comments