mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-15 00:02:49 +03:00
Serial prompt fixes.
Not showing the serial prompt if no serial ports are available. Showing the serial prompt for verbose upload, too.
This commit is contained in:
@ -2233,7 +2233,6 @@ public class Editor extends JFrame implements RunnerListener {
|
|||||||
|
|
||||||
|
|
||||||
public boolean serialPrompt() {
|
public boolean serialPrompt() {
|
||||||
populateSerialMenu();
|
|
||||||
int count = serialMenu.getItemCount();
|
int count = serialMenu.getItemCount();
|
||||||
Object[] names = new Object[count];
|
Object[] names = new Object[count];
|
||||||
for (int i = 0; i < count; i++) {
|
for (int i = 0; i < count; i++) {
|
||||||
@ -2298,7 +2297,9 @@ public class Editor extends JFrame implements RunnerListener {
|
|||||||
// error message will already be visible
|
// error message will already be visible
|
||||||
}
|
}
|
||||||
} catch (SerialNotFoundException e) {
|
} catch (SerialNotFoundException e) {
|
||||||
if (serialPrompt()) run();
|
populateSerialMenu();
|
||||||
|
if (serialMenu.getItemCount() == 0) statusError(e);
|
||||||
|
else if (serialPrompt()) run();
|
||||||
else statusNotice("Upload canceled.");
|
else statusNotice("Upload canceled.");
|
||||||
} catch (RunnerException e) {
|
} catch (RunnerException e) {
|
||||||
//statusError("Error during upload.");
|
//statusError("Error during upload.");
|
||||||
@ -2329,6 +2330,11 @@ public class Editor extends JFrame implements RunnerListener {
|
|||||||
} else {
|
} else {
|
||||||
// error message will already be visible
|
// error message will already be visible
|
||||||
}
|
}
|
||||||
|
} catch (SerialNotFoundException e) {
|
||||||
|
populateSerialMenu();
|
||||||
|
if (serialMenu.getItemCount() == 0) statusError(e);
|
||||||
|
else if (serialPrompt()) run();
|
||||||
|
else statusNotice("Upload canceled.");
|
||||||
} catch (RunnerException e) {
|
} catch (RunnerException e) {
|
||||||
//statusError("Error during upload.");
|
//statusError("Error during upload.");
|
||||||
//e.printStackTrace();
|
//e.printStackTrace();
|
||||||
|
Reference in New Issue
Block a user