altosui: Only update GPS data when new GPS information arrives
[fw/altos] / altosui / AltosState.java
index 3d8e5e120d184d178e8295d0049ef5c51607bc4a..da498bc1d3b12f7a46709547249e07808cf1357a 100644 (file)
@@ -135,7 +135,7 @@ public class AltosState {
 
                time = tick / 100.0;
 
-               if (state == Altos.ao_flight_pad || state == Altos.ao_flight_idle) {
+               if (cur.new_gps && (state == Altos.ao_flight_pad || state == Altos.ao_flight_idle)) {
 
                        /* Track consecutive 'good' gps reports, waiting for 10 of them */
                        if (data.gps != null && data.gps.locked && data.gps.nsat >= 4)