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>
continue;
try {
AltosRecord telem = AltosTelemetry.parse(line.line, previous);
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();
(telem.serial != serial || telem.flight != flight || log_file == null))
{
close_log_file();