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

change words for select serial port notification #745

Merged
merged 1 commit into from
Jan 8, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions src/arduino/arduino.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,12 @@ export class ArduinoApp {
await this.getMainSketch(dc);
}
if (!dc.port) {
vscode.window.showErrorMessage("Please specify the upload serial port.");
const choice = await vscode.window.showInformationMessage(
"Serial port is not specified. Do you want to select a serial port for uploading?",
"Yes", "No");
if (choice === "Yes") {
vscode.commands.executeCommand("arduino.selectSerialPort");
}
return;
}

Expand Down Expand Up @@ -185,7 +190,12 @@ export class ArduinoApp {
await this.getMainSketch(dc);
}
if (!dc.port) {
vscode.window.showErrorMessage("Please specify the upload serial port.");
const choice = await vscode.window.showInformationMessage(
"Serial port is not specified. Do you want to select a serial port for uploading?",
"Yes", "No");
if (choice === "Yes") {
vscode.commands.executeCommand("arduino.selectSerialPort");
}
return;
}

Expand Down