altos: ublox driver always offers course data when it has a fix
authorKeith Packard <keithp@keithp.com>
Tue, 6 May 2014 06:43:44 +0000 (23:43 -0700)
committerKeith Packard <keithp@keithp.com>
Fri, 9 May 2014 03:44:10 +0000 (20:44 -0700)
Set the AO_GPS_COURSE_VALID bit to signal that this part of the GPS
data is valid.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/drivers/ao_gps_ublox.c

index 01169522f2ae49f53852098b8c2e9d797dc25a3f..8676a670fd86a092bdaf5fcdd8d7b8220ab92ac3 100644 (file)
@@ -713,7 +713,7 @@ ao_gps(void) __reentrant
                                ao_gps_data.flags |= AO_GPS_RUNNING;
                                if (nav_sol.gps_fix & (1 << NAV_SOL_FLAGS_GPSFIXOK)) {
                                        uint8_t nsat = nav_sol.nsat;
-                                       ao_gps_data.flags |= AO_GPS_VALID;
+                                       ao_gps_data.flags |= AO_GPS_VALID | AO_GPS_COURSE_VALID;
                                        if (nsat > 15)
                                                nsat = 15;
                                        ao_gps_data.flags |= nsat;