diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-09-17 03:30:00 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-09-17 03:30:00 +0000 |
commit | b7061f11db8ed4bbfe68a5638cd36a0282fead25 (patch) | |
tree | 80971dc85f7f9b84db691156d61e018e7d1b127e | |
parent | 7f57321161579a36115ea682a25879512ca13013 (diff) | |
download | gpsd-b7061f11db8ed4bbfe68a5638cd36a0282fead25.tar.gz |
Remove a fulfilled TODO item, add some warning comments,
and fix a minor inconsistency.
-rw-r--r-- | TODO | 5 | ||||
-rwxr-xr-x | regress-driver | 2 | ||||
-rw-r--r-- | serial.c | 13 |
3 files changed, 13 insertions, 7 deletions
@@ -37,11 +37,6 @@ of mode switch we should be uttering. *** Cleanup after the big protocol rewrite -**** ?DEVICE testing - -The ?DEVICE invocations corresponding to old B, C, and N still need -testing on live devices. - **** The Python client library presently speaks only old protocol. **** gpsmon's client mode still relies on old protocol diff --git a/regress-driver b/regress-driver index ab042e15..c9a12b73 100755 --- a/regress-driver +++ b/regress-driver @@ -73,7 +73,7 @@ case $mode in echo "Testing super-raw mode..." >&2 for f in $*; do dir=`dirname $f` - gpsfake -s 38400 -1 -b -p -r '{"class":"WATCH","enable":False,"raw":1}' $opts ${f} \ + gpsfake -s 38400 -1 -b -p -r '{"class":"WATCH","enable":False,"raw":2}' $opts ${f} \ | ./striplog -1 >$dir/test1.chk; ./striplog <$${f} >$dir/test2.chk; cmp $dir/test[12].chk; @@ -85,6 +85,11 @@ void gpsd_set_speed(struct gps_device_t *session, { speed_t rate; + /* + * Yes, you can set speeds that aren't in the hunt loop. If you + * do this, and you aren't on Linux where boad rate is preserved + * across port closings, you've screwed yourself. Don't do that! + */ if (speed < 300) rate = B0; else if (speed < 1200) @@ -110,7 +115,13 @@ void gpsd_set_speed(struct gps_device_t *session, /* * Don't mess with this conditional! Speed zero is supposed to mean - * to leave the port speed at whatever it currently is. + * to leave the port speed at whatever it currently is. This leads + * to excellent behavior on Linux, which preserves baudrate across + * serial device closes - it means that if you've opended this + * device before you typically don't have to hunt at all because + * it's still at the same speed you left it - you'll typically + * get packet lock within 1.5 seconds. Alas, the BSDs and OS X + * aren't so nice. */ /*@ignore@*/ if (rate != B0) { |