From da98b3eb7983c2207ca407e281d9ada6e48a6f3d Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 19 Feb 2009 23:34:40 +0000 Subject: Reserve lower-case letters for gpsmon generic commands. --- gpsmon.xml | 13 +++++++++---- monitor_proto.c | 4 ++++ sirfmon.c | 10 +++++----- 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". -m +A -Set (m1) or clear (m0) static navigation. The SiRF documentation +Toggle reporting of 50BPS subframe data. + + +M + +Set (M1) or clear (M0) static navigation. The SiRF documentation says 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. -p +P 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. +MID 19, including the Static Navigation bit toggled by the 'M' command. 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 #include @@ -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; } -- cgit v1.2.1