Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Commit 73f0de0

Browse files
authored
change words for select serial port notification (#745)
1 parent f5b3e43 commit 73f0de0

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/arduino/arduino.ts

+12-2
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,12 @@ export class ArduinoApp {
109109
await this.getMainSketch(dc);
110110
}
111111
if (!dc.port) {
112-
vscode.window.showErrorMessage("Please specify the upload serial port.");
112+
const choice = await vscode.window.showInformationMessage(
113+
"Serial port is not specified. Do you want to select a serial port for uploading?",
114+
"Yes", "No");
115+
if (choice === "Yes") {
116+
vscode.commands.executeCommand("arduino.selectSerialPort");
117+
}
113118
return;
114119
}
115120

@@ -185,7 +190,12 @@ export class ArduinoApp {
185190
await this.getMainSketch(dc);
186191
}
187192
if (!dc.port) {
188-
vscode.window.showErrorMessage("Please specify the upload serial port.");
193+
const choice = await vscode.window.showInformationMessage(
194+
"Serial port is not specified. Do you want to select a serial port for uploading?",
195+
"Yes", "No");
196+
if (choice === "Yes") {
197+
vscode.commands.executeCommand("arduino.selectSerialPort");
198+
}
189199
return;
190200
}
191201

0 commit comments

Comments
 (0)