summaryrefslogtreecommitdiff
path: root/src/ao_gps.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2009-07-17 21:30:53 -0700
committerKeith Packard <keithp@keithp.com>2009-07-17 21:32:17 -0700
commitd6749bf24792bb41ca700cf4b8e5e1ac1a63cbf0 (patch)
treed74bc78f33786a3cb1d3aa902af51a93e32d9418 /src/ao_gps.c
parenta1da7e871aee75308bc05ce1b7a0dc402e4c9509 (diff)
Add AO_GPS_RUNNING state.
This tracks whether the GPS receiver has ever sent a valid report to the flight computer, allowing the user to tell whether the GPS receiver is working at all. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/ao_gps.c')
-rw-r--r--src/ao_gps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ao_gps.c b/src/ao_gps.c
index 811ac2a8..32a44fb1 100644
--- a/src/ao_gps.c
+++ b/src/ao_gps.c
@@ -332,7 +332,7 @@ ao_gps(void) __reentrant
ao_gps_data.hour = ao_sirf_data.utc_hour;
ao_gps_data.minute = ao_sirf_data.utc_minute;
ao_gps_data.second = ao_sirf_data.utc_second / 1000;
- ao_gps_data.flags = (ao_sirf_data.num_sv << AO_GPS_NUM_SAT_SHIFT) & AO_GPS_NUM_SAT_MASK;
+ ao_gps_data.flags = ((ao_sirf_data.num_sv << AO_GPS_NUM_SAT_SHIFT) & AO_GPS_NUM_SAT_MASK) | AO_GPS_RUNNING;
if ((ao_sirf_data.nav_type & NAV_TYPE_GPS_FIX_TYPE_MASK) >= NAV_TYPE_4_SV_KF)
ao_gps_data.flags |= AO_GPS_VALID;
ao_gps_data.latitude = ao_sirf_data.lat;