[Git][NTPsec/ntpsec][master] Change the default baud rate of the NMEA driver to 9600.
Eric S. Raymond
gitlab at mg.gitlab.com
Sat Jul 9 14:21:03 UTC 2016
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
df2280b0 by Eric S. Raymond at 2016-07-09T10:19:35-04:00
Change the default baud rate of the NMEA driver to 9600.
The --enable-classic-mode build switch restores the old 4800bps
default.
- - - - -
4 changed files:
- INSTALL
- docs/driver_nmea.txt
- docs/index.txt
- ntpd/refclock_nmea.c
Changes:
=====================================
INSTALL
=====================================
--- a/INSTALL
+++ b/INSTALL
@@ -159,6 +159,8 @@ Here's what it presently does:
syntax (but the new syntax won't work for these, though it will for
other driver types).
+* Reverts the default baudrate of the NMEA driver to 4800 (from 9600).
+
Other behaviors may be added in future releases.
== Uninstalled binaries and scripts ==
=====================================
docs/driver_nmea.txt
=====================================
--- a/docs/driver_nmea.txt
+++ b/docs/driver_nmea.txt
@@ -35,8 +35,8 @@ enables its use.
If there is a /dev/gpspps__u__ it is tried first for PPS, before /dev/gps__u__.
-The various GPS sentences that this driver recognises look like this:
-(others quietly ignored)
+The various GPS sentences that this driver recognises look like this
+(others are quietly ignored):
.Accepted NMEA sentences
[options="header"]
@@ -114,7 +114,7 @@ temporarily to get the numbers for the NMEA sentence of your choice.
The default (mode 0) is to process all supported sentences at a
-linespeed of 4800 bps, which results in the first one received and
+linespeed of 9600 bps, which results in the first one received and
recognized in each cycle being used. If only specific sentences should
be recognized, then the mode byte must be chosen to enable only the
selected ones. Multiple sentences may be selected by adding their mode
@@ -128,7 +128,8 @@ and
* using more than one sentence per cycle overstuffs the internal data
filters.
-The driver uses 4800 bits per second by default, but faster bitrates can
+The driver uses 9600 bits per second by default, unless {projecct-shortname}
+was built in which case the old default of 4800bps is used. Faster bitrates can
be selected using the +baud+ option.
*Caveat:* Using higher line speeds does not necessarily increase the
@@ -245,7 +246,7 @@ switched on by sending the following string.
== Configuration Example ==
----------------------------------------------------------------------------
-refclock nmea mode baud 9600 # All sentences at 9600 baud
+refclock nmea mode baud 19200 # All sentences at 19200 baud
----------------------------------------------------------------------------
== Additional Information ==
=====================================
docs/index.txt
=====================================
--- a/docs/index.txt
+++ b/docs/index.txt
@@ -166,6 +166,11 @@ few will be user-visible.
addresses formerly used. The code can be built in a strict NTP
Classic compatibility mode that restores the old behavior.
+* The default baudrate of the NMEA driver has been changed to 9600 to
+ match the default speed of almost all modern GPSes. The code can be
+ built in a strict NTP Classic compatibility mode that restores the
+ old 4800bps default.
+
* The -!m, ->, and -< options of some Classic commands are not
supported. (The argument-parsing framework code that implemented
them in Classic was overcomplicated and buggy and had to be removed.)
=====================================
ntpd/refclock_nmea.c
=====================================
--- a/ntpd/refclock_nmea.c
+++ b/ntpd/refclock_nmea.c
@@ -142,7 +142,11 @@
*/
#define DEVICE "/dev/gps%d" /* GPS serial device */
#define PPSDEV "/dev/gpspps%d" /* PPSAPI device override */
+#ifdef ENABLE_CLASSIC_MODE
#define SPEED232 B4800 /* uart speed (4800 bps) */
+#else
+#define SPEED232 B9600 /* uart speed (9600 bps) */
+#endif
#define PRECISION (-9) /* precision assumed (about 2 ms) */
#define PPS_PRECISION (-20) /* precision assumed (about 1 us) */
#define REFID "GPS\0" /* reference id */
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/df2280b015f6d28abc167d78bd03ed24d672dd8a
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160709/54dac8e1/attachment.html>
More information about the vc
mailing list