summaryrefslogtreecommitdiff
path: root/libgpsd_core.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2010-12-29 16:36:37 -0800
committerGary E. Miller <gem@rellim.com>2010-12-29 16:36:37 -0800
commitc6cb438abf5987b553f09f8dd6ee72efe0175a8c (patch)
tree2f7d03ad888c7c79fea9729cc7f7cf3404eea35e /libgpsd_core.c
parent1ffcfee756b08543e6073680b01dcb7a1b9473a9 (diff)
downloadgpsd-c6cb438abf5987b553f09f8dd6ee72efe0175a8c.tar.gz
Move the speed warning so each autobaud test does not give the warning.
Diffstat (limited to 'libgpsd_core.c')
-rw-r--r--libgpsd_core.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libgpsd_core.c b/libgpsd_core.c
index e2cb79da..8058e3a7 100644
--- a/libgpsd_core.c
+++ b/libgpsd_core.c
@@ -1365,13 +1365,18 @@ gps_mask_t gpsd_poll(struct gps_device_t *session)
/* track the packet count since achieving sync on the device */
if (first_sync) {
+ speed_t speed = gpsd_get_speed(&session->ttyset);
+
/*@-nullderef@*/
gpsd_report(LOG_INF,
"%s identified as type %s (%f sec @ %dbps)\n",
session->gpsdata.dev.path,
session->device_type->type_name,
timestamp() - session->opentime,
- gpsd_get_speed(&session->ttyset));
+ speed);
+ if ( 38400 > speed ) {
+ gpsd_report(LOG_WARN, "WARNING: speed less than 38,400 may cause data lag and loss of functionality\n");
+ }
/*@+nullderef@*/
/* fire the identified hook */
if (session->device_type != NULL