altosui: eeprom files place 'boost' time in the flight number record.
authorKeith Packard <keithp@keithp.com>
Sun, 5 Sep 2010 08:55:56 +0000 (01:55 -0700)
committerKeith Packard <keithp@keithp.com>
Sun, 5 Sep 2010 08:55:56 +0000 (01:55 -0700)
Instead of looking for the first state change record, use the Flight
record to get the boost tick.

Signed-off-by: Keith Packard <keithp@keithp.com>
ao-tools/altosui/AltosEepromReader.java

index 86bbaee0cde2a9640b768aca0f17a428032cc941..cb82f9a9d6ced0f7f37596a178c88e52199d791e 100644 (file)
@@ -101,8 +101,6 @@ public class AltosEepromReader extends AltosReader {
 
        int                     gps_tick;
 
-       boolean                 saw_boost;
-
        int                     boost_tick;
 
        boolean                 saw_gps_date;
@@ -343,15 +341,10 @@ public class AltosEepromReader extends AltosReader {
                                if (record.cmd == Altos.AO_LOG_INVALID)
                                        continue;
                                tick = record.tick;
-                               if (!saw_boost && record.cmd == Altos.AO_LOG_STATE &&
-                                   record.a >= Altos.ao_flight_boost)
-                               {
-                                       saw_boost = true;
-                                       boost_tick = tick;
-                               }
                                if (record.cmd == Altos.AO_LOG_FLIGHT) {
                                        state.ground_accel = record.a;
                                        state.flight = record.b;
+                                       boost_tick = tick;
                                        seen |= seen_flight;
                                }