summaryrefslogtreecommitdiff
path: root/subframe.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-02-22 08:16:31 -0500
committerEric S. Raymond <esr@thyrsus.com>2011-02-22 13:01:55 -0500
commitd4c7e7bb9c9bcb0fcbd8af0a3a79e6d884f53dda (patch)
treeb130525a63185405d7044e9fea96fdf8989a0cc8 /subframe.c
parentaca2b1ad6b2593799a0f3848d84dd95bc039546f (diff)
downloadgpsd-d4c7e7bb9c9bcb0fcbd8af0a3a79e6d884f53dda.tar.gz
Move a warning about speeds < 38400 that triggered too often.
I have profiled. For GPS data, 9600 is sufficient. The exception is if subframe data is enabled.
Diffstat (limited to 'subframe.c')
-rw-r--r--subframe.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/subframe.c b/subframe.c
index 7738d7d7..48d90bfd 100644
--- a/subframe.c
+++ b/subframe.c
@@ -18,6 +18,13 @@ gps_mask_t gpsd_interpret_subframe_raw(struct gps_device_t *session,
uint8_t preamble;
uint32_t parity;
+ if (session->subframe_count++ == 0) {
+ speed_t speed = gpsd_get_speed(&session->ttyset);
+
+ if (speed < 38400)
+ gpsd_report(LOG_WARN, "speed less than 38,400 may cause data lag and loss of functionality\n");
+ }
+
/*
* This function assumes an array of 10 ints, each of which carries
* a raw 30-bit GPS word use your favorite search engine to find the