altosui: AltosEepromReader was mis-setting boost tick
authorKeith Packard <keithp@keithp.com>
Fri, 27 Aug 2010 06:47:38 +0000 (23:47 -0700)
committerKeith Packard <keithp@keithp.com>
Fri, 27 Aug 2010 06:47:38 +0000 (23:47 -0700)
It was supposed to use record.tick instead of the (unset) state.tick
value.

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

index deab2167be6e80bcdc31b70fa4e0a4ebd7382bcf..3f2d4c625671877e047b1d5d903a8c02b4415b3a 100644 (file)
@@ -133,8 +133,6 @@ public class AltosEepromReader extends AltosReader {
                                        ground_pres += state.pres;
                                        state.ground_pres = (int) (ground_pres / n_pad_samples);
                                        state.flight_pres = state.ground_pres;
-                                       System.out.printf("ground pressure %d altitude %f\n",
-                                                         record.b, state.altitude());
                                        ground_accel += state.accel;
                                        state.ground_accel = (int) (ground_accel / n_pad_samples);
                                        state.flight_accel = state.ground_accel;
@@ -156,7 +154,6 @@ public class AltosEepromReader extends AltosReader {
                                seen |= seen_deploy;
                                break;
                        case Altos.AO_LOG_STATE:
-                               System.out.printf("state %d\n", record.a);
                                state.state = record.a;
                                break;
                        case Altos.AO_LOG_GPS_TIME:
@@ -298,10 +295,10 @@ public class AltosEepromReader extends AltosReader {
                                        break;
                                tick = record.tick;
                                if (!saw_boost && record.cmd == Altos.AO_LOG_STATE &&
-                                   record.a == Altos.ao_flight_boost)
+                                   record.a >= Altos.ao_flight_boost)
                                {
                                        saw_boost = true;
-                                       boost_tick = state.tick;
+                                       boost_tick = tick;
                                }
                                records.add(record);
                        }