summaryrefslogtreecommitdiff
path: root/altoslib/AltosTelemetryFile.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-09-05 11:33:48 -0700
committerKeith Packard <keithp@keithp.com>2013-09-05 11:35:14 -0700
commit5b976a6651f4eb05d30afc08b9e1f27c7e52ae00 (patch)
tree3a8f38d92fdc3b3e9e62d7744ff93a0f9ca8f7dc /altoslib/AltosTelemetryFile.java
parentb984ff81d6b8979574e0248ffe8876634b8e1942 (diff)
altoslib: Finish AltosState changes. Update version number.
Removes all of the AltosRecord bits, changes the monitor idle bits to have per-object state updaters. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altoslib/AltosTelemetryFile.java')
-rw-r--r--altoslib/AltosTelemetryFile.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/altoslib/AltosTelemetryFile.java b/altoslib/AltosTelemetryFile.java
index 33872688..7566d946 100644
--- a/altoslib/AltosTelemetryFile.java
+++ b/altoslib/AltosTelemetryFile.java
@@ -15,7 +15,7 @@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-package org.altusmetrum.altoslib_1;
+package org.altusmetrum.altoslib_2;
import java.io.*;
import java.util.*;
@@ -72,16 +72,14 @@ public class AltosTelemetryFile extends AltosStateIterable {
/* Find boost tick */
AltosState state = start.clone();
- System.out.printf ("Searching for boost\n");
for (AltosTelemetry telem : telems) {
telem.update_state(state);
+ state.finish_update();
if (state.state != AltosLib.ao_flight_invalid && state.state >= AltosLib.ao_flight_boost) {
- System.out.printf ("boost tick %d\n", state.tick);
start.set_boost_tick(state.tick);
break;
}
}
- System.out.printf ("Found boost %d\n", start.boost_tick);
}
public Iterator<AltosState> iterator() {
@@ -91,6 +89,7 @@ public class AltosTelemetryFile extends AltosStateIterable {
while (i.hasNext() && !state.valid()) {
AltosTelemetry t = i.next();
t.update_state(state);
+ state.finish_update();
}
return new AltosTelemetryIterator(state, i);
}