diff options
author | Keith Packard <keithp@keithp.com> | 2012-11-18 10:10:29 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2012-11-18 10:10:29 -0800 |
commit | fcb801b145e1ae6f1c0b3418a99245d34dbf5aa4 (patch) | |
tree | cd22fde425ba8502127ec3def22d15804cb0a151 /altoslib | |
parent | c494eecc51f7d80e24e5db7af0021c56cb6871d4 (diff) |
altoslib: Allow flight number to be zero
It's zero when there's no storage space on the device. Instead of
waiting for non-zero flight number, wait for the seen_flight bit to be
set in the telem tracking state
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altoslib')
-rw-r--r-- | altoslib/AltosLog.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/altoslib/AltosLog.java b/altoslib/AltosLog.java index 1c7069ce..aa30190c 100644 --- a/altoslib/AltosLog.java +++ b/altoslib/AltosLog.java @@ -85,7 +85,7 @@ public class AltosLog implements Runnable { continue; try { AltosRecord telem = AltosTelemetry.parse(line.line, previous); - if (telem.serial != 0 && telem.flight != 0 && + if ((telem.seen & AltosRecord.seen_flight) != 0 && (telem.serial != serial || telem.flight != flight || log_file == null)) { close_log_file(); |