summaryrefslogtreecommitdiff
path: root/altosui/AltosReplayReader.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-08-10 14:08:21 -0700
committerKeith Packard <keithp@keithp.com>2011-08-10 14:08:21 -0700
commit9e1487b1a5db0afd1d23c86d82c60b1c1a62aab0 (patch)
treeab00e263739cacb14a09a63b650639a28fe4fe3f /altosui/AltosReplayReader.java
parent6ac604d11de44cd824f09e4b467264a2b74be7bd (diff)
altosui: Add a 'Graph Flight' button to the 'landed' tab
This lets you see the results of a flight as soon as the rocket lands using the telemetry data. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui/AltosReplayReader.java')
-rw-r--r--altosui/AltosReplayReader.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/altosui/AltosReplayReader.java b/altosui/AltosReplayReader.java
index 4e5e1d93..eed56cff 100644
--- a/altosui/AltosReplayReader.java
+++ b/altosui/AltosReplayReader.java
@@ -34,6 +34,7 @@ import java.util.concurrent.LinkedBlockingQueue;
public class AltosReplayReader extends AltosFlightReader {
Iterator<AltosRecord> iterator;
+ File file;
public AltosRecord read() {
if (iterator.hasNext())
@@ -50,8 +51,11 @@ public class AltosReplayReader extends AltosFlightReader {
Thread.sleep((int) (Math.min(state.time_change,10) * 1000));
}
- public AltosReplayReader(Iterator<AltosRecord> in_iterator, String in_name) {
+ public File backing_file() { return file; }
+
+ public AltosReplayReader(Iterator<AltosRecord> in_iterator, File in_file) {
iterator = in_iterator;
- name = in_name;
+ file = in_file;
+ name = file.getName();
}
}