diff options
| author | Keith Packard <keithp@keithp.com> | 2011-08-10 14:34:39 -0700 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2011-08-10 14:34:39 -0700 | 
| commit | 01b9352eb8ca0e4e2d023ce973c4e863cdcc0c51 (patch) | |
| tree | 8a93c0d01fe47983fc9523876d8dfe40f80b7786 /altosui/AltosDataPointReader.java | |
| parent | 9e1487b1a5db0afd1d23c86d82c60b1c1a62aab0 (diff) | |
altosui: Prune telemetry file graphs to just the flight
Remove data earlier than 1 second before boost and data after landing.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui/AltosDataPointReader.java')
| -rw-r--r-- | altosui/AltosDataPointReader.java | 6 | 
1 files changed, 5 insertions, 1 deletions
| diff --git a/altosui/AltosDataPointReader.java b/altosui/AltosDataPointReader.java index fa48013f..c3aabb0c 100644 --- a/altosui/AltosDataPointReader.java +++ b/altosui/AltosDataPointReader.java @@ -69,10 +69,14 @@ class AltosDataPointReader implements Iterable<AltosDataPoint> {                  throw new UnsupportedOperationException();               }              public boolean hasNext() { +		if (record != null && record.state == Altos.ao_flight_landed) +		    return false;                  return iter.hasNext();              }              public AltosDataPoint next() { -                read_next_record(); +		do { +		    read_next_record(); +		} while (record.time < -1.0 && hasNext());                  return current_dp();              }          }; | 
