We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d11422 commit 3803ad6Copy full SHA for 3803ad6
kernel/src/services/DeviceService.ts
@@ -24,15 +24,14 @@ export class DeviceService {
24
}
25
26
// Try opening and closing the port to check if it's available
27
+ console.log('[checkPort]: Checking if port is available');
28
try {
29
await this.port.open({ baudRate: 115200 });
30
await this.port.close();
31
32
catch (err) {
- if (err instanceof DOMException && err.name === 'InvalidStateError') {
33
- console.log('[checkPort]: Port is already open by another application');
34
- return false;
35
- }
+ console.log('[checkPort]: Port is already open by another application');
+ return false;
36
37
38
// If we reach here, the port is available
0 commit comments