summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-02-26 17:17:33 -0500
committerEric S. Raymond <esr@thyrsus.com>2011-02-26 17:17:33 -0500
commit908a60348a2fc9457135bc88a425d716454335ea (patch)
tree9906039546e04debad5bfff709c114cf266844e0
parent15885248f9631dc02b9a3c574b6b7672d3059ba4 (diff)
downloadgpsd-908a60348a2fc9457135bc88a425d716454335ea.tar.gz
RTCM[23] are single-packet formats, so they have reliable cycle detection.
All regression tests pass.
-rw-r--r--drivers.c2
-rw-r--r--gpsd.h-tail3
2 files changed, 4 insertions, 1 deletions
diff --git a/drivers.c b/drivers.c
index c4e7bb8a..beae5826 100644
--- a/drivers.c
+++ b/drivers.c
@@ -871,6 +871,7 @@ static gps_mask_t rtcm104v2_analyze(struct gps_device_t *session)
gpsd_hexdump_wrapper(session->packet.isgps.buf,
(session->gpsdata.rtcm2.length +
2) * sizeof(isgps30bits_t), LOG_RAW));
+ session->cycle_end_reliable = true;
return RTCM2_IS;
}
@@ -919,6 +920,7 @@ static gps_mask_t rtcm104v3_analyze(struct gps_device_t *session)
(size_t) (session->gpsdata.rtcm3.length),
LOG_RAW));
/* *INDENT-ON* */
+ session->cycle_end_reliable = true;
return RTCM3_IS;
}
diff --git a/gpsd.h-tail b/gpsd.h-tail
index 7431f109..1b6f6a9c 100644
--- a/gpsd.h-tail
+++ b/gpsd.h-tail
@@ -54,7 +54,6 @@ typedef unsigned int speed_t;
enum isgpsstat_t {
ISGPS_NO_SYNC, ISGPS_SYNC, ISGPS_SKIP, ISGPS_MESSAGE,
};
-#define ISGPS_ERRLEVEL_BASE 5
#define RTCM_MAX (RTCM2_WORDS_MAX * sizeof(isgps30bits_t))
@@ -610,6 +609,8 @@ struct gps_device_t {
#define LOG_SPIN 6 /* logging for catching spin bugs */
#define LOG_RAW 7 /* raw low-level I/O */
+#define ISGPS_ERRLEVEL_BASE LOG_RAW
+
#define IS_HIGHEST_BIT(v,m) (v & ~((m<<1)-1))==0
/* here are the available GPS drivers */