projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
altosui: Catch errors opening USB devices. Limit list to relevant devices
[fw/altos]
/
ao-tools
/
altosui
/
AltosSerial.java
diff --git
a/ao-tools/altosui/AltosSerial.java
b/ao-tools/altosui/AltosSerial.java
index e84f5b63e4e21c7ca5cdd0cbb0cb90c863383ced..b016c1d65fbecfe0463c0e97933148cf10c2d55b 100644
(file)
--- a/
ao-tools/altosui/AltosSerial.java
+++ b/
ao-tools/altosui/AltosSerial.java
@@
-134,6
+134,8
@@
public class AltosSerial implements Runnable {
public void open(altos_device device) throws FileNotFoundException {
close();
altos = libaltos.altos_open(device);
+ if (altos == null)
+ throw new FileNotFoundException(device.getPath());
input_thread = new Thread(this);
input_thread.start();
}