altoslib: Pass all flight records while reading telem file
[fw/altos] / altoslib / AltosTimeSeries.java
index 75225e1558d236ae45bdd34e72509fcce48905ab..9c6e936cec1101222c0daac420d51d4b4682b16f 100644 (file)
@@ -21,14 +21,17 @@ public class AltosTimeSeries implements Iterable<AltosTimeValue>, Comparable<Alt
        public AltosUnits               units;
        ArrayList<AltosTimeValue>       values;
        boolean                         data_changed;
+       double                          min_time = -2;
 
        public int compareTo(AltosTimeSeries other) {
                return label.compareTo(other.label);
        }
 
        public void add(AltosTimeValue tv) {
-               data_changed = true;
-               values.add(tv);
+               if (tv.time >= min_time) {
+                       data_changed = true;
+                       values.add(tv);
+               }
        }
 
        public void erase_values() {