@@ -2748,28 +2748,28 @@ public void handlePlotter() {
2748
2748
private void handleBurnBootloader () {
2749
2749
console .clear ();
2750
2750
statusNotice (tr ("Burning bootloader to I/O Board (this may take a minute)..." ));
2751
- SwingUtilities .invokeLater (new Runnable () {
2752
- public void run () {
2753
- try {
2754
- Uploader uploader = new SerialUploader ();
2755
- if (uploader .burnBootloader ()) {
2756
- statusNotice (tr ("Done burning bootloader." ));
2757
- } else {
2758
- statusError (tr ("Error while burning bootloader." ));
2759
- // error message will already be visible
2760
- }
2761
- } catch (PreferencesMapException e ) {
2762
- statusError (I18n .format (
2763
- tr ("Error while burning bootloader: missing '{0}' configuration parameter" ),
2764
- e .getMessage ()));
2765
- } catch (RunnerException e ) {
2766
- statusError (e .getMessage ());
2767
- } catch (Exception e ) {
2768
- statusError (tr ("Error while burning bootloader." ));
2769
- e .printStackTrace ();
2751
+ new Thread (() -> {
2752
+ try {
2753
+ Uploader uploader = new SerialUploader ();
2754
+ if (uploader .burnBootloader ()) {
2755
+ SwingUtilities .invokeLater (() -> statusNotice (tr ("Done burning bootloader." )));
2756
+ } else {
2757
+ SwingUtilities .invokeLater (() -> statusError (tr ("Error while burning bootloader." )));
2758
+ // error message will already be visible
2770
2759
}
2760
+ } catch (PreferencesMapException e ) {
2761
+ SwingUtilities .invokeLater (() -> {
2762
+ statusError (I18n .format (
2763
+ tr ("Error while burning bootloader: missing '{0}' configuration parameter" ),
2764
+ e .getMessage ()));
2765
+ });
2766
+ } catch (RunnerException e ) {
2767
+ SwingUtilities .invokeLater (() -> statusError (e .getMessage ()));
2768
+ } catch (Exception e ) {
2769
+ SwingUtilities .invokeLater (() -> statusError (tr ("Error while burning bootloader." )));
2770
+ e .printStackTrace ();
2771
2771
}
2772
- });
2772
+ }). start () ;
2773
2773
}
2774
2774
2775
2775
0 commit comments