projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altosui: Open serial device at 'new' time. Prohibit duplicate opens.
[fw/altos]
/
ao-tools
/
altosui
/
AltosUI.java
diff --git
a/ao-tools/altosui/AltosUI.java
b/ao-tools/altosui/AltosUI.java
index 9ab451defca7847e24354195809dad779f2b8231..0d8f0e8d30d48bb6ca89c09e47a555495bd37929 100644
(file)
--- a/
ao-tools/altosui/AltosUI.java
+++ b/
ao-tools/altosui/AltosUI.java
@@
-56,6
+56,12
@@
public class AltosUI extends JFrame {
device.getPath()),
"Cannot open target device",
JOptionPane.ERROR_MESSAGE);
device.getPath()),
"Cannot open target device",
JOptionPane.ERROR_MESSAGE);
+ } catch (AltosSerialInUseException si) {
+ JOptionPane.showMessageDialog(AltosUI.this,
+ String.format("Device \"%s\" already in use",
+ device.getPath()),
+ "Device in use",
+ JOptionPane.ERROR_MESSAGE);
} catch (IOException ee) {
JOptionPane.showMessageDialog(AltosUI.this,
device.getPath(),
} catch (IOException ee) {
JOptionPane.showMessageDialog(AltosUI.this,
device.getPath(),