kopia lustrzana https://github.com/Hamlib/Hamlib
Merge branch 'master' of https://github.com/mdblack98/Hamlib
commit
200a258ee9
|
@ -944,6 +944,10 @@ Get DTMF
|
|||
Get misc information about the rig (no VFO in 'VFO mode' or value is passed).
|
||||
.
|
||||
.TP
|
||||
.B dump_state
|
||||
Return certain state information about the radio backend.
|
||||
.
|
||||
.TP
|
||||
.BR 1 ", " dump_caps
|
||||
Not a real rig remote command, it just dumps capabilities, i.e. what the
|
||||
backend knows about this model, and what it can do.
|
||||
|
|
|
@ -428,6 +428,15 @@ Returns
|
|||
\(lqModel Name\(rq at present.
|
||||
.
|
||||
.TP
|
||||
.B dump_state
|
||||
Return certain state information about the rotator backend.
|
||||
.
|
||||
.TP
|
||||
.BR 1 ", " dump_caps
|
||||
Not a real rot remote command, it just dumps capabilities, i.e. what the
|
||||
backend knows about this model, and what it can do.
|
||||
.
|
||||
.TP
|
||||
.BR w ", " send_cmd " \(aq" \fICmd\fP \(aq
|
||||
Send a raw command string to the rotator.
|
||||
.IP
|
||||
|
|
|
@ -170,6 +170,12 @@ Use the
|
|||
option above for a list of configuration parameters for a given model number.
|
||||
.
|
||||
.TP
|
||||
.BR \-u ", " \-\-dump\-state
|
||||
Dump state for the rotator defined with
|
||||
.B -m
|
||||
above and exit.
|
||||
.
|
||||
.TP
|
||||
.BR \-u ", " \-\-dump\-caps
|
||||
Dump capabilities for the rotator defined with
|
||||
.B -m
|
||||
|
@ -363,6 +369,15 @@ Returns
|
|||
\(lqModel Name\(rq.
|
||||
.
|
||||
.TP
|
||||
.B dump_state
|
||||
Return certain state information about the rotator backend.
|
||||
.
|
||||
.TP
|
||||
.BR 1 ", " dump_caps
|
||||
Not a real rot remote command, it just dumps capabilities, i.e. what the
|
||||
backend knows about this model, and what it can do.
|
||||
.
|
||||
.TP
|
||||
.BR w ", " send_cmd " \(aq" \fICmd\fP \(aq
|
||||
Send a raw command string to the rotator.
|
||||
.IP
|
||||
|
|
|
@ -1388,12 +1388,12 @@ typedef int (* confval_cb_t)(RIG *,
|
|||
#define RIG_MODEL(arg) .rig_model=arg,.macro_name=#arg
|
||||
struct rig_caps {
|
||||
rig_model_t rig_model; /*!< Rig model. */
|
||||
const char *macro_name; /*!< Rig model macro name */
|
||||
const char *model_name; /*!< Model name. */
|
||||
const char *mfg_name; /*!< Manufacturer. */
|
||||
const char *version; /*!< Driver version. */
|
||||
const char *copyright; /*!< Copyright info. */
|
||||
enum rig_status_e status; /*!< Driver status. */
|
||||
const char *macro_name; /*!< Rig model macro name */
|
||||
|
||||
int rig_type; /*!< Rig type. */
|
||||
ptt_type_t ptt_type; /*!< Type of the PTT port. */
|
||||
|
|
25
src/conf.c
25
src/conf.c
|
@ -73,9 +73,14 @@ static const struct confparams frontend_cfg_params[] =
|
|||
"0", RIG_CONF_NUMERIC, { .n = { 0, 10, 1 } }
|
||||
},
|
||||
{
|
||||
TOK_ITU_REGION, "itu_region", "ITU region",
|
||||
"ITU region this rig has been manufactured for (freq. band plan)",
|
||||
"0", RIG_CONF_NUMERIC, { .n = { 1, 3, 1 } }
|
||||
TOK_RANGE_SELECTED, "Selected range list", "Range list#",
|
||||
"The tx/rx range list in use",
|
||||
"0", RIG_CONF_NUMERIC, { .n = { 1, 5, 1 } }
|
||||
},
|
||||
{
|
||||
TOK_RANGE_NAME, "Selected range list", "Range list name",
|
||||
"The tx/rx range list name",
|
||||
"Default", RIG_CONF_STRING
|
||||
},
|
||||
|
||||
{
|
||||
|
@ -371,7 +376,7 @@ static int frontend_set_conf(RIG *rig, token_t token, const char *val)
|
|||
|
||||
break;
|
||||
|
||||
case TOK_ITU_REGION:
|
||||
case TOK_RANGE_SELECTED:
|
||||
if (1 != sscanf(val, "%d", &val_i))
|
||||
{
|
||||
return -RIG_EINVAL;//value format error
|
||||
|
@ -394,23 +399,23 @@ static int frontend_set_conf(RIG *rig, token_t token, const char *val)
|
|||
break;
|
||||
|
||||
case 3:
|
||||
memcpy(rs->tx_range_list, caps->tx_range_list2,
|
||||
memcpy(rs->tx_range_list, caps->tx_range_list3,
|
||||
sizeof(struct freq_range_list)*FRQRANGESIZ);
|
||||
memcpy(rs->rx_range_list, caps->rx_range_list2,
|
||||
memcpy(rs->rx_range_list, caps->rx_range_list3,
|
||||
sizeof(struct freq_range_list)*FRQRANGESIZ);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
memcpy(rs->tx_range_list, caps->tx_range_list2,
|
||||
memcpy(rs->tx_range_list, caps->tx_range_list4,
|
||||
sizeof(struct freq_range_list)*FRQRANGESIZ);
|
||||
memcpy(rs->rx_range_list, caps->rx_range_list2,
|
||||
memcpy(rs->rx_range_list, caps->rx_range_list4,
|
||||
sizeof(struct freq_range_list)*FRQRANGESIZ);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
memcpy(rs->tx_range_list, caps->tx_range_list2,
|
||||
memcpy(rs->tx_range_list, caps->tx_range_list5,
|
||||
sizeof(struct freq_range_list)*FRQRANGESIZ);
|
||||
memcpy(rs->rx_range_list, caps->rx_range_list2,
|
||||
memcpy(rs->rx_range_list, caps->rx_range_list5,
|
||||
sizeof(struct freq_range_list)*FRQRANGESIZ);
|
||||
break;
|
||||
|
||||
|
|
10
src/rig.c
10
src/rig.c
|
@ -406,7 +406,15 @@ RIG *HAMLIB_API rig_init(rig_model_t rig_model)
|
|||
rs->transceive = RIG_TRN_OFF;
|
||||
rs->poll_interval = 500;
|
||||
rs->lo_freq = 0;
|
||||
|
||||
|
||||
// We are using range_list1 as the default
|
||||
// Eventually we will have separate model number for different rig variations
|
||||
// So range_list1 will become just range_list (per model)
|
||||
// See ic9700.c for a 5-model example
|
||||
memcpy(rs->tx_range_list, caps->tx_range_list1,
|
||||
sizeof(struct freq_range_list)*FRQRANGESIZ);
|
||||
memcpy(rs->rx_range_list, caps->rx_range_list1,
|
||||
sizeof(struct freq_range_list)*FRQRANGESIZ);
|
||||
#if 0 // this is no longer applicable -- replace it with something?
|
||||
|
||||
// we need to be able to figure out what model radio we have
|
||||
|
|
|
@ -98,8 +98,10 @@
|
|||
#define TOK_POLL_INTERVAL TOKEN_FRONTEND(111)
|
||||
/** \brief rig: lo frequency of any transverters */
|
||||
#define TOK_LO_FREQ TOKEN_FRONTEND(112)
|
||||
/** \brief rig: International Telecommunications Union region no. */
|
||||
#define TOK_ITU_REGION TOKEN_FRONTEND(120)
|
||||
/** \brief rig: Range index 1-5 */
|
||||
#define TOK_RANGE_SELECTED TOKEN_FRONTEND(121)
|
||||
/** \brief rig: Range Name */
|
||||
#define TOK_RANGE_NAME TOKEN_FRONTEND(122)
|
||||
/*
|
||||
* rotator specific tokens
|
||||
* (strictly, should be documented as rotator_internal)
|
||||
|
|
Ładowanie…
Reference in New Issue