X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosui%2FAltosState.java;h=1ac816d52f842f594e9b378b003ba8a59754e907;hp=0ff2479e6334d7295a3b7eeebe52df378bc18655;hb=6ac604d11de44cd824f09e4b467264a2b74be7bd;hpb=7f5b5848ad6ef5c808638a29c3dc0101b56ed11e diff --git a/altosui/AltosState.java b/altosui/AltosState.java index 0ff2479e..1ac816d5 100644 --- a/altosui/AltosState.java +++ b/altosui/AltosState.java @@ -28,6 +28,7 @@ public class AltosState { long report_time; + double time; double time_change; int tick; @@ -130,7 +131,9 @@ public class AltosState { time_change = 0; } - if (state == Altos.ao_flight_pad) { + time = tick / 100.0; + + if (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)