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

Commit

Permalink
Merge upload and uploadUsingProgrammer into one build function
Browse files Browse the repository at this point in the history
  • Loading branch information
hlovdal authored and adiazulay committed Jan 19, 2021
1 parent a14f777 commit e4a70b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/arduino/arduino.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export class ArduinoApp {
* selectable programmer
* @param {bool} [compile=true] - Indicates whether to compile the code when using the CLI to upload
*/
public async upload(buildMode: BuildMode, compile: boolean = true) {
public async build(buildMode: BuildMode, compile: boolean = true) {
const dc = DeviceContext.getInstance();
const args: string[] = [];
let restoreSerialMonitor: boolean = false;
Expand Down
8 changes: 4 additions & 4 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export async function activate(context: vscode.ExtensionContext) {
location: vscode.ProgressLocation.Window,
title: "Arduino: Uploading...",
}, async () => {
await arduinoContextModule.default.arduinoApp.upload(BuildMode.Upload);
await arduinoContextModule.default.arduinoApp.build(BuildMode.Upload);
});
} catch (ex) {
}
Expand All @@ -163,7 +163,7 @@ export async function activate(context: vscode.ExtensionContext) {
location: vscode.ProgressLocation.Window,
title: "Arduino: Using CLI to upload...",
}, async () => {
await arduinoContextModule.default.arduinoApp.upload(BuildMode.Upload, false);
await arduinoContextModule.default.arduinoApp.build(BuildMode.Upload, false);
});
} catch (ex) {
}
Expand Down Expand Up @@ -198,7 +198,7 @@ export async function activate(context: vscode.ExtensionContext) {
if (!status.compile) {
status.compile = "upload";
try {
await arduinoContextModule.default.arduinoApp.upload(BuildMode.UploadProgrammer, true);
await arduinoContextModule.default.arduinoApp.build(BuildMode.UploadProgrammer, true);
} catch (ex) {
}
delete status.compile;
Expand All @@ -211,7 +211,7 @@ export async function activate(context: vscode.ExtensionContext) {
if (!status.compile) {
status.compile = "cliUpload";
try {
await arduinoContextModule.default.arduinoApp.upload(BuildMode.UploadProgrammer, false);
await arduinoContextModule.default.arduinoApp.build(BuildMode.UploadProgrammer, false);
} catch (ex) {
}
delete status.compile;
Expand Down

0 comments on commit e4a70b0

Please sign in to comment.