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 6bf6b6a commit 3f0cf12Copy full SHA for 3f0cf12
kernel/src/services/DeviceService.ts
@@ -1,5 +1,7 @@
1
import { Transport } from 'esptool-js';
2
3
+const reconnectString: string = "%connect%"
4
+
5
export class DeviceService {
6
private port: SerialPort | null = null;
7
private transport: Transport | null = null;
@@ -136,6 +138,14 @@ export class DeviceService {
136
138
137
139
await writer.write(ctrl_e);
140
await writer.write(new_line);
141
142
+ if (code.includes(reconnectString)) {
143
+ // Reconnect the device or connect for the first time
144
145
+ console.log('Reconnect command detected, reconnecting device...');
146
147
+ }
148
149
150
const data = encoder.encode(code + "######START REQUEST######");
151
await writer.write(data);
0 commit comments