altoslib: Update received time when replaying flights
authorKeith Packard <keithp@keithp.com>
Fri, 6 Sep 2013 05:53:14 +0000 (22:53 -0700)
committerKeith Packard <keithp@keithp.com>
Fri, 6 Sep 2013 05:53:14 +0000 (22:53 -0700)
Received time is otherwise recorded as the time when the packets were
read from the file, which doesn't work in real-time playback

Signed-off-by: Keith Packard <keithp@keithp.com>
altoslib/AltosReplayReader.java

index f65caaa0445b9ee54d0c6b4026d3d15df99ec41a..19091d3dfd22cea4055948b566e6548f61689c0c 100644 (file)
@@ -41,6 +41,7 @@ public class AltosReplayReader extends AltosFlightReader {
                /* Make it run in realtime after the rocket leaves the pad */
                if (state.state > AltosLib.ao_flight_pad)
                        Thread.sleep((int) (Math.min(state.time_change,10) * 1000));
+               state.set_received_time(System.currentTimeMillis());
        }
 
        public File backing_file() { return file; }