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

Commit e4a70b0

Browse files
hlovdaladiazulay
authored andcommitted
Merge upload and uploadUsingProgrammer into one build function
1 parent a14f777 commit e4a70b0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/arduino/arduino.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export class ArduinoApp {
107107
* selectable programmer
108108
* @param {bool} [compile=true] - Indicates whether to compile the code when using the CLI to upload
109109
*/
110-
public async upload(buildMode: BuildMode, compile: boolean = true) {
110+
public async build(buildMode: BuildMode, compile: boolean = true) {
111111
const dc = DeviceContext.getInstance();
112112
const args: string[] = [];
113113
let restoreSerialMonitor: boolean = false;

src/extension.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ export async function activate(context: vscode.ExtensionContext) {
145145
location: vscode.ProgressLocation.Window,
146146
title: "Arduino: Uploading...",
147147
}, async () => {
148-
await arduinoContextModule.default.arduinoApp.upload(BuildMode.Upload);
148+
await arduinoContextModule.default.arduinoApp.build(BuildMode.Upload);
149149
});
150150
} catch (ex) {
151151
}
@@ -163,7 +163,7 @@ export async function activate(context: vscode.ExtensionContext) {
163163
location: vscode.ProgressLocation.Window,
164164
title: "Arduino: Using CLI to upload...",
165165
}, async () => {
166-
await arduinoContextModule.default.arduinoApp.upload(BuildMode.Upload, false);
166+
await arduinoContextModule.default.arduinoApp.build(BuildMode.Upload, false);
167167
});
168168
} catch (ex) {
169169
}
@@ -198,7 +198,7 @@ export async function activate(context: vscode.ExtensionContext) {
198198
if (!status.compile) {
199199
status.compile = "upload";
200200
try {
201-
await arduinoContextModule.default.arduinoApp.upload(BuildMode.UploadProgrammer, true);
201+
await arduinoContextModule.default.arduinoApp.build(BuildMode.UploadProgrammer, true);
202202
} catch (ex) {
203203
}
204204
delete status.compile;
@@ -211,7 +211,7 @@ export async function activate(context: vscode.ExtensionContext) {
211211
if (!status.compile) {
212212
status.compile = "cliUpload";
213213
try {
214-
await arduinoContextModule.default.arduinoApp.upload(BuildMode.UploadProgrammer, false);
214+
await arduinoContextModule.default.arduinoApp.build(BuildMode.UploadProgrammer, false);
215215
} catch (ex) {
216216
}
217217
delete status.compile;

0 commit comments

Comments
 (0)