Add IPP, DPP, and TX_INHIBIT for IC7610

pull/1458/head
Mike Black W9MDB 2023-12-09 09:23:50 -06:00
rodzic ea823e911c
commit 63c615a452
5 zmienionych plików z 37 dodań i 30 usunięć

Wyświetl plik

@ -144,7 +144,7 @@ struct cmdparams ic7610_extcmds[] =
int ic7610_ext_tokens[] = int ic7610_ext_tokens[] =
{ {
TOK_DRIVE_GAIN, TOK_DIGI_SEL_FUNC, TOK_DIGI_SEL_LEVEL, TOK_DRIVE_GAIN, TOK_DIGI_SEL_FUNC, TOK_DIGI_SEL_LEVEL,
TOK_SCOPE_MSS, TOK_SCOPE_SDS, TOK_SCOPE_STX, TOK_SCOPE_CFQ, TOK_SCOPE_EDG, TOK_SCOPE_VBW, TOK_SCOPE_RBW, TOK_SCOPE_MKP, TOK_SCOPE_MSS, TOK_SCOPE_SDS, TOK_SCOPE_STX, TOK_SCOPE_CFQ, TOK_SCOPE_EDG, TOK_SCOPE_VBW, TOK_SCOPE_RBW, TOK_SCOPE_MKP,TOK_IPP_FUNC,TOK_TX_INHIBIT_FUNC,TOK_DPP_FUNC,
TOK_BACKEND_NONE TOK_BACKEND_NONE
}; };
@ -402,6 +402,7 @@ struct rig_caps ic7610_caps =
}, },
.ext_tokens = ic7610_ext_tokens, .ext_tokens = ic7610_ext_tokens,
.extfuncs = icom_ext_funcs,
.extlevels = icom_ext_levels, .extlevels = icom_ext_levels,
.ctcss_list = common_ctcss_list, .ctcss_list = common_ctcss_list,
.dcs_list = NULL, .dcs_list = NULL,
@ -577,6 +578,8 @@ struct rig_caps ic7610_caps =
.get_ext_level = icom_get_ext_level, .get_ext_level = icom_get_ext_level,
.set_func = icom_set_func, .set_func = icom_set_func,
.get_func = icom_get_func, .get_func = icom_get_func,
.set_ext_func = icom_set_ext_func,
.get_ext_func = icom_get_ext_func,
.set_parm = icom_set_parm, .set_parm = icom_set_parm,
.get_parm = icom_get_parm, .get_parm = icom_get_parm,
.set_mem = icom_set_mem, .set_mem = icom_set_mem,

Wyświetl plik

@ -460,6 +460,9 @@ const struct confparams icom_cfg_params[] =
const struct confparams icom_ext_funcs[] = const struct confparams icom_ext_funcs[] =
{ {
{ TOK_DIGI_SEL_FUNC, "digi_sel", "DIGI-SEL enable", "", "", RIG_CONF_CHECKBUTTON, {} }, { TOK_DIGI_SEL_FUNC, "digi_sel", "DIGI-SEL enable", "", "", RIG_CONF_CHECKBUTTON, {} },
{ TOK_IPP_FUNC, "IPP", "IP Plus", "", "", RIG_CONF_CHECKBUTTON, {} },
{ TOK_TX_INHIBIT_FUNC, "TX_INHIBIT", "TX Inhibit", "", "", RIG_CONF_CHECKBUTTON, {} },
{ TOK_DPP_FUNC, "DPP", "Digital Pre Distortion-SEL enable", "", "", RIG_CONF_CHECKBUTTON, {} },
{ RIG_CONF_END, NULL, } { RIG_CONF_END, NULL, }
}; };
@ -519,6 +522,9 @@ const struct cmdparams icom_ext_cmd[] =
{ {.t = TOK_DRIVE_GAIN}, CMD_PARAM_TYPE_TOKEN, C_CTL_LVL, S_LVL_DRIVE, SC_MOD_RW, 0, {0}, CMD_DAT_FLT, 2 }, { {.t = TOK_DRIVE_GAIN}, CMD_PARAM_TYPE_TOKEN, C_CTL_LVL, S_LVL_DRIVE, SC_MOD_RW, 0, {0}, CMD_DAT_FLT, 2 },
{ {.t = TOK_DIGI_SEL_FUNC}, CMD_PARAM_TYPE_TOKEN, C_CTL_FUNC, S_FUNC_DIGISEL, SC_MOD_RW, 0, {0}, CMD_DAT_BOL, 1 }, { {.t = TOK_DIGI_SEL_FUNC}, CMD_PARAM_TYPE_TOKEN, C_CTL_FUNC, S_FUNC_DIGISEL, SC_MOD_RW, 0, {0}, CMD_DAT_BOL, 1 },
{ {.t = TOK_DIGI_SEL_LEVEL}, CMD_PARAM_TYPE_TOKEN, C_CTL_LVL, S_LVL_DIGI, SC_MOD_RW, 0, {0}, CMD_DAT_FLT, 2 }, { {.t = TOK_DIGI_SEL_LEVEL}, CMD_PARAM_TYPE_TOKEN, C_CTL_LVL, S_LVL_DIGI, SC_MOD_RW, 0, {0}, CMD_DAT_FLT, 2 },
{ {.t = TOK_IPP_FUNC}, CMD_PARAM_TYPE_TOKEN, C_CTL_FUNC, S_FUNC_IPP, SC_MOD_RW, 0, {0}, CMD_DAT_BOL, 1 },
{ {.t = TOK_TX_INHIBIT_FUNC}, CMD_PARAM_TYPE_TOKEN, C_CTL_FUNC, S_FUNC_TX_INHIBIT, SC_MOD_RW, 0, {0}, CMD_DAT_BOL, 1 },
{ {.t = TOK_DPP_FUNC}, CMD_PARAM_TYPE_TOKEN, C_CTL_FUNC, S_FUNC_DPP, SC_MOD_RW, 0, {0}, CMD_DAT_BOL, 1 },
{ {0} } { {0} }
}; };

Wyświetl plik

@ -35,7 +35,7 @@
#include <sys/time.h> #include <sys/time.h>
#endif #endif
#define BACKEND_VER "20231130" #define BACKEND_VER "20231209"
#define ICOM_IS_ID31 rig_is_model(rig, RIG_MODEL_ID31) #define ICOM_IS_ID31 rig_is_model(rig, RIG_MODEL_ID31)
#define ICOM_IS_ID51 rig_is_model(rig, RIG_MODEL_ID51) #define ICOM_IS_ID51 rig_is_model(rig, RIG_MODEL_ID51)

Wyświetl plik

@ -348,6 +348,8 @@
#define S_FUNC_NXENC 0x63 /* NXDN encryption */ #define S_FUNC_NXENC 0x63 /* NXDN encryption */
#define S_FUNC_DCENC 0x64 /* DCR encryption */ #define S_FUNC_DCENC 0x64 /* DCR encryption */
#define S_FUNC_IPP 0x65 /* IP+ setting */ #define S_FUNC_IPP 0x65 /* IP+ setting */
#define S_FUNC_TX_INHIBIT 0x66 /* TX inhibit setting */
#define S_FUNC_DPP 0x67 /* DPP setting */
/* /*
* Set Power On/Off (C_SET_PWR) subcommands * Set Power On/Off (C_SET_PWR) subcommands
@ -567,6 +569,9 @@
#define TOK_SCOPE_FEF TOKEN_BACKEND(146) #define TOK_SCOPE_FEF TOKEN_BACKEND(146)
#define TOK_SCOPE_RBW TOKEN_BACKEND(147) #define TOK_SCOPE_RBW TOKEN_BACKEND(147)
#define TOK_SCOPE_MKP TOKEN_BACKEND(148) #define TOK_SCOPE_MKP TOKEN_BACKEND(148)
#define TOK_IPP_FUNC TOKEN_BACKEND(149)
#define TOK_TX_INHIBIT_FUNC TOKEN_BACKEND(150)
#define TOK_DPP_FUNC TOKEN_BACKEND(151)
/* /*
* icom_ext_parm table subcommand modifiers * icom_ext_parm table subcommand modifiers

Wyświetl plik

@ -133,7 +133,7 @@ int id5100_set_vfo(RIG *rig, vfo_t vfo)
{ {
myvfo = S_SUB; myvfo = S_SUB;
priv->dual_watch_main_sub = MAIN_ON_RIGHT; priv->dual_watch_main_sub = MAIN_ON_RIGHT;
rig->state.current_vfo = RIG_VFO_B; rig->state.current_vfo = vfo;
} }
if (RIG_OK != (retval = icom_transaction(rig, C_SET_VFO, myvfo, NULL, 0, ackbuf, if (RIG_OK != (retval = icom_transaction(rig, C_SET_VFO, myvfo, NULL, 0, ackbuf,
@ -215,10 +215,7 @@ int id5100_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
vfo_t currvfo = rig->state.current_vfo; vfo_t currvfo = rig->state.current_vfo;
// we automatically dual_watchy based on requested VFO if (rs->dual_watch == 1 && rig->state.current_vfo != RIG_VFO_SUB) { id5100_set_split_vfo(rig, RIG_VFO_SUB, 0, RIG_VFO_MAIN); }
if (rs->dual_watch == 0 && (vfo == RIG_VFO_MAIN || vfo == RIG_VFO_SUB)) { id5100_set_split_vfo(rig, RIG_VFO_SUB, 1, RIG_VFO_MAIN); }
if (rs->dual_watch == 1 && (vfo == RIG_VFO_A || vfo == RIG_VFO_B)) { id5100_set_split_vfo(rig, RIG_VFO_A, 0, RIG_VFO_A); }
if (rs->dual_watch) // dual watch is different if (rs->dual_watch) // dual watch is different
{ {
@ -249,7 +246,7 @@ int id5100_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
{ {
rig_debug(RIG_DEBUG_VERBOSE, "%s(%d): Sub on left\n", __func__, __LINE__); rig_debug(RIG_DEBUG_VERBOSE, "%s(%d): Sub on left\n", __func__, __LINE__);
if (currvfo == RIG_VFO_B && (vfo == RIG_VFO_B || vfo == RIG_VFO_SUB)) if ((currvfo == RIG_VFO_B || currvfo == RIG_VFO_SUB) && (vfo == RIG_VFO_B || vfo == RIG_VFO_SUB))
{ {
rig_debug(RIG_DEBUG_ERR, "%s: Method#3\n", __func__); rig_debug(RIG_DEBUG_ERR, "%s: Method#3\n", __func__);
id5100_set_vfo(rig, RIG_VFO_MAIN); id5100_set_vfo(rig, RIG_VFO_MAIN);
@ -430,7 +427,13 @@ int id5100_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
rig_debug(RIG_DEBUG_VERBOSE, "%s called vfo=%s\n", __func__, rig_strvfo(vfo)); rig_debug(RIG_DEBUG_VERBOSE, "%s called vfo=%s\n", __func__, rig_strvfo(vfo));
if (rs->dual_watch == 0) if (tx_vfo != RIG_VFO_MAIN)
{
rig_debug(RIG_DEBUG_ERR, "%s Split VFO must be Main\n", __func__);
return -RIG_EINVAL;
}
if (rs->dual_watch == 0 || split == RIG_SPLIT_OFF)
{ {
if (RIG_OK != (retval = icom_set_func(rig, RIG_VFO_CURR, RIG_FUNC_DUAL_WATCH, if (RIG_OK != (retval = icom_set_func(rig, RIG_VFO_CURR, RIG_FUNC_DUAL_WATCH,
split))) split)))
@ -440,7 +443,7 @@ int id5100_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
rs->dual_watch = split; rs->dual_watch = split;
if (split == 0) { rig_set_vfo(rig, RIG_VFO_A); } // if (split == RIG_SPLIT_OFF) { rig_set_vfo(rig, RIG_VFO_A); }
return RIG_OK; return RIG_OK;
} }
@ -449,20 +452,10 @@ int id5100_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
// ID5100 puts tx on Main and rx on Left side // ID5100 puts tx on Main and rx on Left side
// So we put Main on right side to match gpredict positions // So we put Main on right side to match gpredict positions
if (tx_vfo == RIG_VFO_A || tx_vfo == RIG_VFO_MAIN)
{
// we must set RX vfo to SUB // we must set RX vfo to SUB
retval = id5100_set_vfo(rig, RIG_VFO_SUB); retval = id5100_set_vfo(rig, RIG_VFO_SUB);
rs->current_vfo = RIG_VFO_SUB; rs->current_vfo = RIG_VFO_SUB;
priv->dual_watch_main_sub = MAIN_ON_RIGHT; priv->dual_watch_main_sub = MAIN_ON_RIGHT;
}
else
{
rig_debug(RIG_DEBUG_ERR,
"%s: ID5100 split must have Tx=Main=Tx, Rx=Sub, got Tx=%s, Rx=%s\n", __func__,
rig_strvfo(tx_vfo), rig_strvfo(vfo));
retval = -RIG_EINVAL;
}
return retval; return retval;
} }
@ -492,14 +485,14 @@ int id5100_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
int id5100_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq) int id5100_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
{ {
int retval; int retval;
struct rig_state *rs = &rig->state; //struct rig_state *rs = &rig->state;
struct icom_priv_data *priv = (struct icom_priv_data *) rs->priv; //struct icom_priv_data *priv = (struct icom_priv_data *) rs->priv;
vfo_t currvfo; //vfo_t currvfo;
rig_debug(RIG_DEBUG_VERBOSE, "%s(%d): vfo=%s\n", __func__, __LINE__, rig_debug(RIG_DEBUG_VERBOSE, "%s(%d): vfo=%s\n", __func__, __LINE__,
rig_strvfo(vfo)); rig_strvfo(vfo));
currvfo = rig->state.current_vfo;
#if 0 #if 0
currvfo = rig->state.current_vfo;
if (priv->dual_watch_main_sub == MAIN_ON_LEFT && (currvfo == RIG_VFO_MAIN if (priv->dual_watch_main_sub == MAIN_ON_LEFT && (currvfo == RIG_VFO_MAIN
|| currvfo == RIG_VFO_A) && vfo == RIG_VFO_TX) || currvfo == RIG_VFO_A) && vfo == RIG_VFO_TX)
@ -534,9 +527,9 @@ struct rig_caps id5100_caps =
RIG_MODEL(RIG_MODEL_ID5100), RIG_MODEL(RIG_MODEL_ID5100),
.model_name = "ID-5100", .model_name = "ID-5100",
.mfg_name = "Icom", .mfg_name = "Icom",
.version = BACKEND_VER ".8", .version = BACKEND_VER ".9",
.copyright = "LGPL", .copyright = "LGPL",
.status = RIG_STATUS_STABLE, .status = RIG_STATUS_BETA,
.rig_type = RIG_TYPE_MOBILE, .rig_type = RIG_TYPE_MOBILE,
.ptt_type = RIG_PTT_RIG, .ptt_type = RIG_PTT_RIG,
.dcd_type = RIG_DCD_RIG, .dcd_type = RIG_DCD_RIG,