Wait for the data record to indicate that the flight value is valid
before setting the graph callsign/flight/serial data.
Signed-off-by: Keith Packard <keithp@keithp.com>
public AltosUIDataPoint next() {
state = new AltosState(iterator.next(), state);
public AltosUIDataPoint next() {
state = new AltosState(iterator.next(), state);
- if (dataSet.callsign == null && state.data.callsign != null)
- dataSet.callsign = state.data.callsign;
+ if ((state.data.seen & AltosRecord.seen_flight) != 0) {
+ if (dataSet.callsign == null && state.data.callsign != null)
+ dataSet.callsign = state.data.callsign;
- if (dataSet.serial == 0 && state.data.serial != 0)
- dataSet.serial = state.data.serial;
+ if (dataSet.serial == 0 && state.data.serial != 0)
+ dataSet.serial = state.data.serial;
- if (dataSet.flight == 0 && state.data.flight != 0)
- dataSet.flight = state.data.flight;
+ if (dataSet.flight == 0 && state.data.flight != 0)
+ dataSet.flight = state.data.flight;
+ }
return new AltosGraphDataPoint(state);
}
return new AltosGraphDataPoint(state);
}