From dcfa56498d1b65a213b8aba9cbd6c4806532383c Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 13 Nov 2010 16:07:04 -0800 Subject: altosui: Open serial device at 'new' time. Prohibit duplicate opens. With the per-serial UI, there's never a reason to create a serial device without opening it right away. This eliminates the bug caused by not opening the serial device for telemetry reception. Serial devices can now be opened only once; this eliminates errors when trying to reflash or configure devices while receiving telemetry. Signed-off-by: Keith Packard --- ao-tools/altosui/AltosDebug.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'ao-tools/altosui/AltosDebug.java') diff --git a/ao-tools/altosui/AltosDebug.java b/ao-tools/altosui/AltosDebug.java index 9c10129d..9aa35d3f 100644 --- a/ao-tools/altosui/AltosDebug.java +++ b/ao-tools/altosui/AltosDebug.java @@ -19,9 +19,10 @@ package altosui; import java.lang.*; import java.io.*; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.LinkedList; -import java.util.Iterator; +import java.util.concurrent.*; +import java.util.*; + +import libaltosJNI.*; public class AltosDebug extends AltosSerial { @@ -259,4 +260,8 @@ public class AltosDebug extends AltosSerial { public void reset() { printf ("R\n"); } + + public AltosDebug (altos_device in_device) throws FileNotFoundException, AltosSerialInUseException { + super(in_device); + } } \ No newline at end of file -- cgit v1.2.3