summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-02-19 23:34:40 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-02-19 23:34:40 +0000
commitda98b3eb7983c2207ca407e281d9ada6e48a6f3d (patch)
treee31e604a229b5800a352405f30d657708f5c897a
parent50038e3acc531301ebf9372778939100fbbaae71 (diff)
downloadgpsd-da98b3eb7983c2207ca407e281d9ada6e48a6f3d.tar.gz
Reserve lower-case letters for gpsmon generic commands.
-rw-r--r--gpsmon.xml13
-rw-r--r--monitor_proto.c4
-rw-r--r--sirfmon.c10
3 files changed, 18 insertions, 9 deletions
diff --git a/gpsmon.xml b/gpsmon.xml
index 3755592e..dee83b1b 100644
--- a/gpsmon.xml
+++ b/gpsmon.xml
@@ -175,9 +175,14 @@ per second, for example "s9600".</para>
<variablelist>
<varlistentry>
-<term>m</term>
+<term>A</term>
<listitem>
-<para>Set (m1) or clear (m0) static navigation. The SiRF documentation
+<para>Toggle reporting of 50BPS subframe data.</para>
+</listitem>
+<varlistentry>
+<term>M</term>
+<listitem>
+<para>Set (M1) or clear (M0) static navigation. The SiRF documentation
says <quote>Static navigation is a position filter designed to be used
with motor vehicles. When the vehicle's velocity falls below a
threshold, the position and heading are frozen, and velocity is set to
@@ -194,11 +199,11 @@ zero and position changing in large jumps.</para>
</listitem>
</varlistentry>
<varlistentry>
-<term>p</term>
+<term>P</term>
<listitem>
<para>Toggle navigation-parameter display mode. Toggles between
normal display and one that shows selected navigation parameters from
-MID 19, including the Static Navigation bit toggled by the 'm' command.</para>
+MID 19, including the Static Navigation bit toggled by the 'M' command.</para>
</listitem>
</varlistentry>
</variablelist>
diff --git a/monitor_proto.c b/monitor_proto.c
index 0b644923..3b4f40d7 100644
--- a/monitor_proto.c
+++ b/monitor_proto.c
@@ -85,6 +85,10 @@ static int PROTO_command(char line[])
*
* This method is optional. If you set the command method pointer to
* NULL, gpsmon will behave sanely, accepting no device-specific commands.
+ *
+ * It is a useful convention to use uppercase letters for
+ * driver-specfic commands and leave lowercase ones for the
+ * generic gpsmon ones.
*/
/*
diff --git a/sirfmon.c b/sirfmon.c
index f6d0478d..0eb58308 100644
--- a/sirfmon.c
+++ b/sirfmon.c
@@ -6,7 +6,7 @@
* a -- toggle receipt of 50BPS subframe data (undocumented).
* d -- MID 4 rate change (undocumented)
* m -- set or clear static navigation mode
- * t -- toggle navigation-parameter display mode
+ * p -- toggle navigation-parameter display mode
*/
#include <stdio.h>
#include <stdlib.h>
@@ -638,7 +638,7 @@ static int sirf_command(char line[])
switch (line[0])
{
- case 'a': /* toggle 50bps subframe data */
+ case 'A': /* toggle 50bps subframe data */
(void)memset(buf, '\0', sizeof(buf));
putbyte(buf, 0, 0x80);
putbyte(buf, 23, 12);
@@ -646,13 +646,13 @@ static int sirf_command(char line[])
(void)monitor_control_send(buf, 25);
return COMMAND_MATCH;
- case 'm': /* static navigation */
+ case 'M': /* static navigation */
putbyte(buf, 0,0x8f); /* id */
putbyte(buf, 1, atoi(line+1));
(void)monitor_control_send(buf, 2);
return COMMAND_MATCH;
- case 'd': /* MID 4 rate change */
+ case 'D': /* MID 4 rate change (undocumented) */
v = atoi(line+1);
if (v > 30)
return COMMAND_MATCH;
@@ -667,7 +667,7 @@ static int sirf_command(char line[])
(void)monitor_control_send(buf, 8);
return COMMAND_MATCH;
- case 't': /* poll navigation params */
+ case 'P': /* poll navigation params */
dispmode = !dispmode;
return COMMAND_MATCH;
}