summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gpsmon.c24
-rw-r--r--gpsmon.xml21
2 files changed, 38 insertions, 7 deletions
diff --git a/gpsmon.c b/gpsmon.c
index d36d0ca8..94ccda8f 100644
--- a/gpsmon.c
+++ b/gpsmon.c
@@ -340,7 +340,7 @@ int main (int argc, char **argv)
gmt_offset = (int)tzoffset();
/*@ -branchstate @*/
- while ((option = getopt(argc, argv, "D:F:Vh")) != -1) {
+ while ((option = getopt(argc, argv, "D:F:Vhl")) != -1) {
switch (option) {
case 'D':
debuglevel = atoi(optarg);
@@ -351,6 +351,28 @@ int main (int argc, char **argv)
case 'V':
(void)printf("gpsmon %s\n", VERSION);
exit(0);
+ case 'l': /* list known device types */
+ for (active = monitor_objects; *active; active++) {
+ (void)fputs((*active)->driver->type_name, stdout);
+ (void)fputs("\ti l", stdout);
+ (void)fputc(' ', stdout);
+ if ((*active)->driver->mode_switcher != NULL)
+ (void)fputc('n', stdout);
+ else
+ (void)fputc(' ', stdout);
+ (void)fputc(' ', stdout);
+ if ((*active)->driver->speed_switcher != NULL)
+ (void)fputc('s', stdout);
+ else
+ (void)fputc(' ', stdout);
+ (void)fputc(' ', stdout);
+ if ((*active)->driver->control_send != NULL)
+ (void)fputc('c', stdout);
+ else
+ (void)fputc(' ', stdout);
+ (void)fputc('\n', stdout);
+ }
+ exit(0);
case 'h': case '?': default:
(void)fputs("usage: gpsmon [-?hv] [-F controlsock] [server[:port:[device]]]\n", stderr);
exit(1);
diff --git a/gpsmon.xml b/gpsmon.xml
index 7263b14f..32c31e4d 100644
--- a/gpsmon.xml
+++ b/gpsmon.xml
@@ -17,7 +17,7 @@
<cmdsynopsis>
<command>gpsmon</command>
<arg choice='opt'>-h </arg>
- <arg choice='opt'>-v </arg>
+ <arg choice='opt'>-V </arg>
<arg>-F <replaceable>control-socket</replaceable></arg>
<arg choice='opt'>
<group>
@@ -31,6 +31,8 @@
<arg choice='plain'><replaceable>device</replaceable></arg>
</group>
</arg>
+ <arg choice='opt'>-l </arg>
+ <arg choice='opt'>-D <replaceable>debuglevel</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
@@ -50,7 +52,7 @@ to derive climb/sink or error estimates. Nor does it discard
altitude when fix quality is too low.</para>
<para><application>gpsmon</application> accepts an -h option that
-displays a usage message, or a -v option to dump the package
+displays a usage message, or a -V option to dump the package
version and exit.</para>
<para>This program may be run in either of two modes, as a client for
@@ -75,6 +77,12 @@ your local filesystem.</para>
probably only useful to developers of the GPSD code. Consult the
packet-getter source code for relevant values.</para>
+<para>The -l option lists a table showing which GPS device tyupes
+<application>gpsmon</application> has built-in support for, and which
+generic commands can be applied to which GPS types, and then
+exits. Note that this does not list type-specific commands associated
+with individual GPS types.</para>
+
<para>After startup, the top part of the screen reports the contents
of several especially interesting packet types. The bottom half of
the screen is a scrolling hex dump of all packets the GPS is issuing.
@@ -161,10 +169,11 @@ per second, for example "s9600".</para>
<term>t</term>
<listitem>
<para>Force a switch of monitoring type. Follow it with a string that
-is unique to the name of a gpsd driver with monitor support;
-<application>gpsmon</application> will switch to using that driver
-and display code. Will show an error message if there is no matching
-gpsd driver, or multiple matches, or the unique match has no display
+is unique to the name of a gpsd driver with
+<application>gpsmon</application> support;
+<application>gpsmon</application> will switch to using that driver and
+display code. Will show an error message if there is no matching gpsd
+driver, or multiple matches, or the unique match has no display
support in <application>gpsmon</application>.</para>
</listitem>
</varlistentry>