diff options
-rw-r--r-- | gpsmon.xml | 13 | ||||
-rw-r--r-- | monitor_proto.c | 4 | ||||
-rw-r--r-- | sirfmon.c | 10 |
3 files changed, 18 insertions, 9 deletions
@@ -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. */ /* @@ -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; } |