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).
|
Get misc information about the rig (no VFO in 'VFO mode' or value is passed).
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
|
.B dump_state
|
||||||
|
Return certain state information about the radio backend.
|
||||||
|
.
|
||||||
|
.TP
|
||||||
.BR 1 ", " dump_caps
|
.BR 1 ", " dump_caps
|
||||||
Not a real rig remote command, it just dumps capabilities, i.e. what the
|
Not a real rig remote command, it just dumps capabilities, i.e. what the
|
||||||
backend knows about this model, and what it can do.
|
backend knows about this model, and what it can do.
|
||||||
|
|
|
@ -428,6 +428,15 @@ Returns
|
||||||
\(lqModel Name\(rq at present.
|
\(lqModel Name\(rq at present.
|
||||||
.
|
.
|
||||||
.TP
|
.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
|
.BR w ", " send_cmd " \(aq" \fICmd\fP \(aq
|
||||||
Send a raw command string to the rotator.
|
Send a raw command string to the rotator.
|
||||||
.IP
|
.IP
|
||||||
|
|
|
@ -170,6 +170,12 @@ Use the
|
||||||
option above for a list of configuration parameters for a given model number.
|
option above for a list of configuration parameters for a given model number.
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
|
.BR \-u ", " \-\-dump\-state
|
||||||
|
Dump state for the rotator defined with
|
||||||
|
.B -m
|
||||||
|
above and exit.
|
||||||
|
.
|
||||||
|
.TP
|
||||||
.BR \-u ", " \-\-dump\-caps
|
.BR \-u ", " \-\-dump\-caps
|
||||||
Dump capabilities for the rotator defined with
|
Dump capabilities for the rotator defined with
|
||||||
.B -m
|
.B -m
|
||||||
|
@ -363,6 +369,15 @@ Returns
|
||||||
\(lqModel Name\(rq.
|
\(lqModel Name\(rq.
|
||||||
.
|
.
|
||||||
.TP
|
.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
|
.BR w ", " send_cmd " \(aq" \fICmd\fP \(aq
|
||||||
Send a raw command string to the rotator.
|
Send a raw command string to the rotator.
|
||||||
.IP
|
.IP
|
||||||
|
|
|
@ -1388,12 +1388,12 @@ typedef int (* confval_cb_t)(RIG *,
|
||||||
#define RIG_MODEL(arg) .rig_model=arg,.macro_name=#arg
|
#define RIG_MODEL(arg) .rig_model=arg,.macro_name=#arg
|
||||||
struct rig_caps {
|
struct rig_caps {
|
||||||
rig_model_t rig_model; /*!< Rig model. */
|
rig_model_t rig_model; /*!< Rig model. */
|
||||||
const char *macro_name; /*!< Rig model macro name */
|
|
||||||
const char *model_name; /*!< Model name. */
|
const char *model_name; /*!< Model name. */
|
||||||
const char *mfg_name; /*!< Manufacturer. */
|
const char *mfg_name; /*!< Manufacturer. */
|
||||||
const char *version; /*!< Driver version. */
|
const char *version; /*!< Driver version. */
|
||||||
const char *copyright; /*!< Copyright info. */
|
const char *copyright; /*!< Copyright info. */
|
||||||
enum rig_status_e status; /*!< Driver status. */
|
enum rig_status_e status; /*!< Driver status. */
|
||||||
|
const char *macro_name; /*!< Rig model macro name */
|
||||||
|
|
||||||
int rig_type; /*!< Rig type. */
|
int rig_type; /*!< Rig type. */
|
||||||
ptt_type_t ptt_type; /*!< Type of the PTT port. */
|
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 } }
|
"0", RIG_CONF_NUMERIC, { .n = { 0, 10, 1 } }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
TOK_ITU_REGION, "itu_region", "ITU region",
|
TOK_RANGE_SELECTED, "Selected range list", "Range list#",
|
||||||
"ITU region this rig has been manufactured for (freq. band plan)",
|
"The tx/rx range list in use",
|
||||||
"0", RIG_CONF_NUMERIC, { .n = { 1, 3, 1 } }
|
"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;
|
break;
|
||||||
|
|
||||||
case TOK_ITU_REGION:
|
case TOK_RANGE_SELECTED:
|
||||||
if (1 != sscanf(val, "%d", &val_i))
|
if (1 != sscanf(val, "%d", &val_i))
|
||||||
{
|
{
|
||||||
return -RIG_EINVAL;//value format error
|
return -RIG_EINVAL;//value format error
|
||||||
|
@ -394,23 +399,23 @@ static int frontend_set_conf(RIG *rig, token_t token, const char *val)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
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);
|
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);
|
sizeof(struct freq_range_list)*FRQRANGESIZ);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4:
|
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);
|
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);
|
sizeof(struct freq_range_list)*FRQRANGESIZ);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 5:
|
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);
|
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);
|
sizeof(struct freq_range_list)*FRQRANGESIZ);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -407,6 +407,14 @@ RIG *HAMLIB_API rig_init(rig_model_t rig_model)
|
||||||
rs->poll_interval = 500;
|
rs->poll_interval = 500;
|
||||||
rs->lo_freq = 0;
|
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?
|
#if 0 // this is no longer applicable -- replace it with something?
|
||||||
|
|
||||||
// we need to be able to figure out what model radio we have
|
// we need to be able to figure out what model radio we have
|
||||||
|
|
|
@ -98,8 +98,10 @@
|
||||||
#define TOK_POLL_INTERVAL TOKEN_FRONTEND(111)
|
#define TOK_POLL_INTERVAL TOKEN_FRONTEND(111)
|
||||||
/** \brief rig: lo frequency of any transverters */
|
/** \brief rig: lo frequency of any transverters */
|
||||||
#define TOK_LO_FREQ TOKEN_FRONTEND(112)
|
#define TOK_LO_FREQ TOKEN_FRONTEND(112)
|
||||||
/** \brief rig: International Telecommunications Union region no. */
|
/** \brief rig: Range index 1-5 */
|
||||||
#define TOK_ITU_REGION TOKEN_FRONTEND(120)
|
#define TOK_RANGE_SELECTED TOKEN_FRONTEND(121)
|
||||||
|
/** \brief rig: Range Name */
|
||||||
|
#define TOK_RANGE_NAME TOKEN_FRONTEND(122)
|
||||||
/*
|
/*
|
||||||
* rotator specific tokens
|
* rotator specific tokens
|
||||||
* (strictly, should be documented as rotator_internal)
|
* (strictly, should be documented as rotator_internal)
|
||||||
|
|
Ładowanie…
Reference in New Issue