projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altosui: Select devices by USB vendor/product ID.
[fw/altos]
/
ao-tools
/
altosui
/
AltosSerial.java
diff --git
a/ao-tools/altosui/AltosSerial.java
b/ao-tools/altosui/AltosSerial.java
index f12b31b3187e9b253b4a3560080db9d8e2966d7e..efa63f681819e2ed9f3d22ebfac66d79e47f7750 100644
(file)
--- a/
ao-tools/altosui/AltosSerial.java
+++ b/
ao-tools/altosui/AltosSerial.java
@@
-104,10
+104,8
@@
public class AltosSerial implements Runnable {
}
public void close() {
}
public void close() {
- if (altos != null)
{
+ if (altos != null)
libaltos.altos_close(altos);
libaltos.altos_close(altos);
- altos = null;
- }
if (input_thread != null) {
try {
input_thread.interrupt();
if (input_thread != null) {
try {
input_thread.interrupt();
@@
-116,6
+114,10
@@
public class AltosSerial implements Runnable {
}
input_thread = null;
}
}
input_thread = null;
}
+ if (altos != null) {
+ libaltos.altos_free(altos);
+ altos = null;
+ }
}
public void putc(char c) {
}
public void putc(char c) {
@@
-139,7
+141,7
@@
public class AltosSerial implements Runnable {
throw new FileNotFoundException(device.getPath());
input_thread = new Thread(this);
input_thread.start();
throw new FileNotFoundException(device.getPath());
input_thread = new Thread(this);
input_thread.start();
- print("\nE 0\n
m 1\n
");
+ print("\nE 0\n");
try {
Thread.sleep(200);
} catch (InterruptedException e) {
try {
Thread.sleep(200);
} catch (InterruptedException e) {