From aa0300f11fe5b7f1d3e548e29dc809b803aa1f7a Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 26 May 2017 00:51:37 -0700 Subject: altoslib: Make AltosReplayReader start synchronously enough to track states The Altos UI needs to see 'pad' state and then 'boost' state so that it will automatically switch tabs during the flight. When reading from eeprom files, the only way that is going to happen is if the reader thread waits until the UI has definitely seen 'pad' state, which we do by simply delaying the reader thread until after that has happened. Signed-off-by: Keith Packard --- altoslib/AltosState.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'altoslib/AltosState.java') diff --git a/altoslib/AltosState.java b/altoslib/AltosState.java index 889aa9a3..0716b892 100644 --- a/altoslib/AltosState.java +++ b/altoslib/AltosState.java @@ -705,8 +705,6 @@ public class AltosState extends AltosDataListener { public double igniter_voltage[]; public AltosGPS gps; - public AltosGPS temp_gps; - public int temp_gps_sat_tick; public boolean gps_pending; public AltosIMU imu; @@ -757,6 +755,7 @@ public class AltosState extends AltosDataListener { public void init() { set = 0; + System.out.printf("state init\n"); received_time = System.currentTimeMillis(); time = AltosLib.MISSING; time_change = AltosLib.MISSING; @@ -793,8 +792,6 @@ public class AltosState extends AltosDataListener { kalman_acceleration = new AltosValue(); gps = null; - temp_gps = null; - temp_gps_sat_tick = 0; gps_pending = false; imu = null; -- cgit v1.2.3