X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Fao_gps.c;h=78957cb386dc6aeff05f2f19af1971128ff1a0d1;hp=811ac2a8aae0aee4f1a3c0643da7c61e3aa34ff7;hb=ab40d224b39ba6d29c4056e2d2c365e1eb3d3793;hpb=34f148500df427c148188c0ada20bf914a7c74ba diff --git a/src/ao_gps.c b/src/ao_gps.c index 811ac2a8..78957cb3 100644 --- a/src/ao_gps.c +++ b/src/ao_gps.c @@ -289,9 +289,9 @@ ao_gps(void) __reentrant } for (;;) { /* Locate the begining of the next record */ - while (ao_sirf_byte() != 0xa0) + while (ao_sirf_byte() != (uint8_t) 0xa0) ; - if (ao_sirf_byte() != 0xa2) + if (ao_sirf_byte() != (uint8_t) 0xa2) continue; /* Length */ @@ -321,9 +321,9 @@ ao_gps(void) __reentrant cksum |= ao_sirf_byte(); if (ao_sirf_cksum != cksum) continue; - if (ao_sirf_byte() != 0xb0) + if (ao_sirf_byte() != (uint8_t) 0xb0) continue; - if (ao_sirf_byte() != 0xb3) + if (ao_sirf_byte() != (uint8_t) 0xb3) continue; switch (i) { @@ -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;