mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-10-12 04:48:33 +00:00
ATL-530: No checks before upload/verify/burn
Made the port/fqbn/programmer optional for upload, verify, and burn bootloader. From now on, the IDE does not warn the user before performing the desired CLI command. Closes arduino/arduino-pro-ide#364 Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
@@ -46,27 +46,11 @@ export class BurnBootloader extends SketchContribution {
|
||||
}
|
||||
try {
|
||||
const { boardsConfig } = this.boardsServiceClientImpl;
|
||||
if (!boardsConfig || !boardsConfig.selectedBoard) {
|
||||
throw new Error('No boards selected. Please select a board.');
|
||||
}
|
||||
if (!boardsConfig.selectedBoard.fqbn) {
|
||||
throw new Error(`No core is installed for the '${boardsConfig.selectedBoard.name}' board. Please install the core.`);
|
||||
}
|
||||
const { selectedPort } = boardsConfig;
|
||||
if (!selectedPort) {
|
||||
throw new Error('No ports selected. Please select a port.');
|
||||
}
|
||||
|
||||
const port = selectedPort.address;
|
||||
const port = boardsConfig.selectedPort?.address;
|
||||
const [fqbn, { selectedProgrammer: programmer }] = await Promise.all([
|
||||
this.boardsDataStore.appendConfigToFqbn(boardsConfig.selectedBoard.fqbn),
|
||||
this.boardsDataStore.getData(boardsConfig.selectedBoard.fqbn)
|
||||
this.boardsDataStore.appendConfigToFqbn(boardsConfig.selectedBoard?.fqbn),
|
||||
this.boardsDataStore.getData(boardsConfig.selectedBoard?.fqbn)
|
||||
]);
|
||||
|
||||
if (!programmer) {
|
||||
throw new Error('Programmer is not selected. Please select a programmer from the `Tools` > `Programmer` menu.');
|
||||
}
|
||||
|
||||
this.outputChannelManager.getChannel('Arduino: bootloader').clear();
|
||||
await this.coreService.burnBootloader({
|
||||
fqbn,
|
||||
|
Reference in New Issue
Block a user