use programmer id for upload/verify

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
Akos Kitta
2020-07-21 20:12:51 +02:00
parent cc76f2bbc8
commit 87b383f57e
4 changed files with 26 additions and 11 deletions

View File

@@ -81,13 +81,17 @@ export class UploadSketch extends SketchContribution {
if (!boardsConfig.selectedBoard.fqbn) {
throw new Error(`No core is installed for the '${boardsConfig.selectedBoard.name}' board. Please install the core.`);
}
const fqbn = await this.boardsDataStore.appendConfigToFqbn(boardsConfig.selectedBoard.fqbn);
const [fqbn, data] = await Promise.all([
this.boardsDataStore.appendConfigToFqbn(boardsConfig.selectedBoard.fqbn),
this.boardsDataStore.getData(boardsConfig.selectedBoard.fqbn)
]);
this.outputChannelManager.getChannel('Arduino: upload').clear();
await this.coreService.upload({
sketchUri: uri,
fqbn,
port: selectedPort.address,
optimizeForDebug: this.editorMode.compileForDebug
optimizeForDebug: this.editorMode.compileForDebug,
programmer: data.selectedProgrammer
});
this.messageService.info('Done uploading.', { timeout: 1000 });
} catch (e) {

View File

@@ -69,12 +69,16 @@ export class VerifySketch extends SketchContribution {
if (!boardsConfig.selectedBoard.fqbn) {
throw new Error(`No core is installed for the '${boardsConfig.selectedBoard.name}' board. Please install the core.`);
}
const fqbn = await this.boardsDataStore.appendConfigToFqbn(boardsConfig.selectedBoard.fqbn);
const [data, fqbn] = await Promise.all([
this.boardsDataStore.getData(boardsConfig.selectedBoard.fqbn),
this.boardsDataStore.appendConfigToFqbn(boardsConfig.selectedBoard.fqbn)
]);
this.outputChannelManager.getChannel('Arduino: compile').clear();
await this.coreService.compile({
sketchUri: uri,
fqbn,
optimizeForDebug: this.editorMode.compileForDebug
optimizeForDebug: this.editorMode.compileForDebug,
programmer: data.selectedProgrammer
});
this.messageService.info('Done compiling.', { timeout: 1000 });
} catch (e) {