kopia lustrzana https://github.com/Hamlib/Hamlib
new command dump_conf from rigctl
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2364 7ae35d74-ebe9-4afe-98af-79ac388436b8Hamlib-1.2.8
rodzic
946a153560
commit
dbb8c50555
|
@ -3,7 +3,7 @@
|
|||
* This programs dumps the capabilities of a backend rig.
|
||||
*
|
||||
*
|
||||
* $Id: dumpcaps.c,v 1.46 2008-04-27 09:56:06 fillods Exp $
|
||||
* $Id: dumpcaps.c,v 1.47 2008-05-23 14:26:07 fillods Exp $
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
|
@ -34,7 +34,7 @@
|
|||
#include "misc.h"
|
||||
|
||||
#include "sprintflst.h"
|
||||
|
||||
#include "rigctl_parse.h"
|
||||
|
||||
static int print_ext(RIG *rig, const struct confparams *cfp, rig_ptr_t ptr);
|
||||
int range_sanity_check(const struct freq_range_list range_list[], int rx);
|
||||
|
@ -553,3 +553,10 @@ static void dump_chan_caps(const channel_cap_t *chan, FILE *fout)
|
|||
if (chan->ext_levels) fprintf(fout, "EXTLVL ");
|
||||
}
|
||||
|
||||
int dumpconf (RIG* rig, FILE *fout)
|
||||
{
|
||||
rig_token_foreach(rig, print_conf_list, (rig_ptr_t)rig);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
.\" First parameter, NAME, should be all caps
|
||||
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
||||
.\" other parameters are allowed: see man(7), man(1)
|
||||
.TH RIGCTL "1" "February 24, 2007" "Hamlib" "Radio Control Program"
|
||||
.TH RIGCTL "1" "May 8, 2008" "Hamlib" "Radio Control Program"
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.\"
|
||||
.\" Some roff macros, for reference:
|
||||
|
@ -303,6 +303,10 @@ Not a real rig remote command, it just dumps capabilities, i.e. what the
|
|||
backend knows about this model, and what it can do. TODO: Ensure this is
|
||||
in a consistent format so it can be read into a hash, dictionary, etc.
|
||||
.TP
|
||||
.B 3, dump_conf
|
||||
Not a real rig remote command, it just dumps a list of all config parameters
|
||||
defined for the radio.
|
||||
.TP
|
||||
.B 2, power2mW
|
||||
Converts a power value in a range of \fI0.0 ... 1.0\fP to the real transmit
|
||||
power in milli-Watts. The \fIfrequency\fP and \fImode\fP also need to be
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* It takes commands in interactive mode as well as
|
||||
* from command line options.
|
||||
*
|
||||
* $Id: rigctl.c,v 1.66 2008-01-12 00:36:58 n0nb Exp $
|
||||
* $Id: rigctl.c,v 1.67 2008-05-23 14:26:09 fillods Exp $
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
|
@ -281,11 +281,11 @@ int main (int argc, char *argv[])
|
|||
* print out conf parameters
|
||||
*/
|
||||
if (show_conf) {
|
||||
rig_token_foreach(my_rig, print_conf_list, (rig_ptr_t)my_rig);
|
||||
dumpconf(my_rig, stdout);
|
||||
}
|
||||
|
||||
/*
|
||||
* print out conf parameters, and exists immediately
|
||||
* print out capabilities, and exists immediately
|
||||
* We may be interested only in only caps, and rig_open may fail.
|
||||
*/
|
||||
if (dump_caps_opt) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* It takes commands in interactive mode as well as
|
||||
* from command line options.
|
||||
*
|
||||
* $Id: rigctl_parse.h,v 1.2 2008-01-05 18:13:12 fillods Exp $
|
||||
* $Id: rigctl_parse.h,v 1.3 2008-05-23 14:26:09 fillods Exp $
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
|
@ -35,6 +35,7 @@
|
|||
*/
|
||||
|
||||
int dumpcaps (RIG *, FILE *);
|
||||
int dumpconf (RIG *, FILE *);
|
||||
|
||||
/*
|
||||
* Prototypes
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* Hamlib Interface - sprintf toolbox header
|
||||
* Copyright (c) 2003 by Stephane Fillod
|
||||
* Copyright (c) 2003-2008 by Stephane Fillod
|
||||
*
|
||||
* $Id: sprintflst.h,v 1.1 2003-11-16 16:58:35 fillods Exp $
|
||||
* $Id: sprintflst.h,v 1.2 2008-05-23 14:26:09 fillods Exp $
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
|
@ -25,6 +25,7 @@
|
|||
|
||||
#include <hamlib/rig.h>
|
||||
|
||||
#define SPRINTF_MAX_SIZE 256
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue