projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altosui: Fix flight data download for TM. Look for MM flights when graphing
[fw/altos]
/
altosui
/
AltosDisplayThread.java
diff --git
a/altosui/AltosDisplayThread.java
b/altosui/AltosDisplayThread.java
index 84abfae92966cc3c4c8cc6657fb3ebbf1f3e83f6..03ce4efda1d918e88c693e9378bfd0795c08ac45 100644
(file)
--- a/
altosui/AltosDisplayThread.java
+++ b/
altosui/AltosDisplayThread.java
@@
-27,13
+27,13
@@
import java.util.*;
import java.text.*;
import java.util.prefs.*;
import java.util.concurrent.LinkedBlockingQueue;
import java.text.*;
import java.util.prefs.*;
import java.util.concurrent.LinkedBlockingQueue;
+import org.altusmetrum.AltosLib.*;
public class AltosDisplayThread extends Thread {
Frame parent;
IdleThread idle_thread;
AltosVoice voice;
public class AltosDisplayThread extends Thread {
Frame parent;
IdleThread idle_thread;
AltosVoice voice;
- String name;
AltosFlightReader reader;
int crc_errors;
AltosFlightDisplay display;
AltosFlightReader reader;
int crc_errors;
AltosFlightDisplay display;
@@
-57,19
+57,18
@@
public class AltosDisplayThread extends Thread {
SwingUtilities.invokeLater(r);
}
SwingUtilities.invokeLater(r);
}
- void reading_error_internal(
String name
) {
+ void reading_error_internal() {
JOptionPane.showMessageDialog(parent,
JOptionPane.showMessageDialog(parent,
- String.format("Error reading from \"%s\"", name),
+ String.format("Error reading from \"%s\"",
reader.
name),
"Telemetry Read Error",
JOptionPane.ERROR_MESSAGE);
}
"Telemetry Read Error",
JOptionPane.ERROR_MESSAGE);
}
- void reading_error_safely(String in_name) {
- final String name = in_name;
+ void reading_error_safely() {
Runnable r = new Runnable() {
public void run() {
try {
Runnable r = new Runnable() {
public void run() {
try {
- reading_error_internal(
name
);
+ reading_error_internal();
} catch (Exception ex) {
}
}
} catch (Exception ex) {
}
}
@@
-258,7
+257,7
@@
public class AltosDisplayThread extends Thread {
} catch (InterruptedException ee) {
interrupted = true;
} catch (IOException ie) {
} catch (InterruptedException ee) {
interrupted = true;
} catch (IOException ie) {
- reading_error_safely(
name
);
+ reading_error_safely();
} finally {
if (!interrupted)
idle_thread.report(true);
} finally {
if (!interrupted)
idle_thread.report(true);