summaryrefslogtreecommitdiff
path: root/altoslib/AltosLog.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-09-05 22:52:22 -0700
committerKeith Packard <keithp@keithp.com>2013-09-05 22:52:22 -0700
commite17e3691d93636eebbd7381f2df1303dc46ea96c (patch)
treeb90d2882e46aacda84d5b8a677c91730e8144ffc /altoslib/AltosLog.java
parenta9c495c7ca1e08b7ac76b0dab8b3bd9bd3a7edfc (diff)
altoslib: Only open log file when both flight and serial are known
Some telemetry formats include serial and flight in different packets, so wait for both before creating the file Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altoslib/AltosLog.java')
-rw-r--r--altoslib/AltosLog.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/altoslib/AltosLog.java b/altoslib/AltosLog.java
index 850b0437..ed59ef71 100644
--- a/altoslib/AltosLog.java
+++ b/altoslib/AltosLog.java
@@ -95,7 +95,8 @@ public class AltosLog implements Runnable {
close_log_file();
serial = state.serial;
flight = state.flight;
- open(state);
+ if (state.serial != AltosLib.MISSING && state.flight != AltosLib.MISSING)
+ open(state);
}
} catch (ParseException pe) {
} catch (AltosCRCException ce) {