MCPcopy
hub / github.com/arduino/Arduino / handleBurnBootloader

Method handleBurnBootloader

app/src/processing/app/Editor.java:2378–2406  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2376 }
2377
2378 private void handleBurnBootloader() {
2379 console.clear();
2380 EditorConsole.setCurrentEditorConsole(this.console);
2381 statusNotice(tr("Burning bootloader to I/O Board (this may take a minute)..."));
2382 new Thread(() -> {
2383 try {
2384 Uploader uploader = new SerialUploader();
2385 if (uploader.burnBootloader()) {
2386 SwingUtilities.invokeLater(() -> statusNotice(tr("Done burning bootloader.")));
2387 } else {
2388 SwingUtilities.invokeLater(() -> statusError(tr("Error while burning bootloader.")));
2389 // error message will already be visible
2390 }
2391 } catch (SerialNotFoundException e) {
2392 SwingUtilities.invokeLater(() -> statusError(tr("Error while burning bootloader: please select a serial port.")));
2393 } catch (PreferencesMapException e) {
2394 SwingUtilities.invokeLater(() -> {
2395 statusError(I18n.format(
2396 tr("Error while burning bootloader: missing '{0}' configuration parameter"),
2397 e.getMessage()));
2398 });
2399 } catch (RunnerException e) {
2400 SwingUtilities.invokeLater(() -> statusError(e.getMessage()));
2401 } catch (Exception e) {
2402 SwingUtilities.invokeLater(() -> statusError(tr("Error while burning bootloader.")));
2403 e.printStackTrace();
2404 }
2405 }).start();
2406 }
2407
2408 private void handleBoardInfo() {
2409 console.clear();

Callers 1

buildToolsMenuMethod · 0.95

Calls 10

statusNoticeMethod · 0.95
burnBootloaderMethod · 0.95
statusErrorMethod · 0.95
formatMethod · 0.95
trMethod · 0.80
printStackTraceMethod · 0.80
startMethod · 0.65
clearMethod · 0.45
getMessageMethod · 0.45

Tested by

no test coverage detected