Skip to content

Commit 0cd2331

Browse files
committed
Removed unused code
1 parent 86503dd commit 0cd2331

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

src/web-serial-daemon.js

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,6 @@ import {
44
} from 'rxjs/operators';
55
import Daemon from './daemon';
66

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-
197
export default class WebSerialDaemon extends Daemon {
208
constructor(boardsUrl) {
219
super(boardsUrl);
@@ -70,31 +58,8 @@ export default class WebSerialDaemon extends Daemon {
7058
// eslint-disable-next-line class-methods-use-this
7159
closeAllPorts() {
7260
console.log('should be closing serial ports here');
73-
// const devices = this.devicesList.getValue().serial;
74-
// TODO: do something to close the seriap ports...
7561
}
7662

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-
9863
/**
9964
* Request serial port open
10065
* @param {string} port the port name

0 commit comments

Comments
 (0)