From b0f6955740b3358cae3bfdc4385a7ce8eaf50d43 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Thu, 20 Mar 2014 18:36:43 +0000 Subject: [PATCH] Added option to not use VFO XCHG command when setting split parameters. With Icom rigs that use MAIN?SUB VFOs there is a trade off when setting the mode or frequency of the "other" VFO. Untill now Hamlib uses the XCHG VFO command to address the "other" VFO. This has some advantages, particularly it preserves the selected VFO and it preserves memory mode of either VFO. The disadvantage is that any split command causes the Rx to glitch when the VFO/MEMs are exchanged. I have added a config parameter for Icom rigs called "no_xchg" which forces the direct addressing of VFOs to set split mode/frequency. It is a boolean option with a default of "0" (false) which equates to prior behaviour. Setting it to "1" (true) will make the backend use change VFO commands to set the "other" VFO. This means that TX on "SUB" in split is assumed, that both are in VFO mode (not MEM), and set/get split functions will leave the MAIN VFO selected. --- icom/delta2.c | 1 + icom/ic1275.c | 1 + icom/ic271.c | 1 + icom/ic275.c | 1 + icom/ic471.c | 1 + icom/ic475.c | 1 + icom/ic7000.c | 1 + icom/ic703.c | 1 + icom/ic706.c | 3 +++ icom/ic707.c | 1 + icom/ic7100.c | 1 + icom/ic718.c | 1 + icom/ic7200.c | 1 + icom/ic725.c | 1 + icom/ic726.c | 1 + icom/ic728.c | 1 + icom/ic735.c | 1 + icom/ic736.c | 1 + icom/ic737.c | 1 + icom/ic738.c | 1 + icom/ic7410.c | 1 + icom/ic746.c | 2 ++ icom/ic751.c | 1 + icom/ic756.c | 4 ++++ icom/ic7600.c | 1 + icom/ic761.c | 1 + icom/ic765.c | 1 + icom/ic7700.c | 1 + icom/ic775.c | 1 + icom/ic78.c | 1 + icom/ic7800.c | 1 + icom/ic781.c | 1 + icom/ic820h.c | 3 ++- icom/ic821h.c | 3 ++- icom/ic910.c | 1 + icom/ic9100.c | 1 + icom/ic92d.c | 1 + icom/ic970.c | 1 + icom/icom.c | 39 +++++++++++++++++++++++++++++++++++---- icom/icom.h | 2 ++ icom/icr10.c | 1 + icom/icr20.c | 1 + icom/icr7000.c | 2 ++ icom/icr71.c | 1 + icom/icr72.c | 1 + icom/icr75.c | 1 + icom/icr8500.c | 1 + icom/icr9000.c | 1 + icom/icr9500.c | 1 + icom/icrx7.c | 1 + icom/id1.c | 1 + icom/omni.c | 1 + icom/os456.c | 1 + icom/os535.c | 1 + 54 files changed, 98 insertions(+), 6 deletions(-) diff --git a/icom/delta2.c b/icom/delta2.c index 57c203437..cb34ba652 100644 --- a/icom/delta2.c +++ b/icom/delta2.c @@ -56,6 +56,7 @@ static const struct icom_priv_caps delta2_priv_caps = { 0x01, /* default address */ 1, /* 731 mode */ + 0, /* no XCHG */ ic737_ts_sc_list /* TODO: ts_sc_list */ }; diff --git a/icom/ic1275.c b/icom/ic1275.c index 702cdf74e..1daecdda5 100644 --- a/icom/ic1275.c +++ b/icom/ic1275.c @@ -39,6 +39,7 @@ static const struct icom_priv_caps ic1275_priv_caps = { 0x18, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic737_ts_sc_list }; diff --git a/icom/ic271.c b/icom/ic271.c index e2b826dc1..93c558b46 100644 --- a/icom/ic271.c +++ b/icom/ic271.c @@ -48,6 +48,7 @@ static const struct icom_priv_caps ic271_priv_caps = { 0x20, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic737_ts_sc_list }; diff --git a/icom/ic275.c b/icom/ic275.c index cfabe2e51..4e7f8458f 100644 --- a/icom/ic275.c +++ b/icom/ic275.c @@ -43,6 +43,7 @@ static const struct icom_priv_caps ic275_priv_caps = { 0x10, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic737_ts_sc_list }; diff --git a/icom/ic471.c b/icom/ic471.c index 4b160553e..5a2c18f51 100644 --- a/icom/ic471.c +++ b/icom/ic471.c @@ -47,6 +47,7 @@ static const struct icom_priv_caps ic471_priv_caps = { 0x22, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic737_ts_sc_list }; diff --git a/icom/ic475.c b/icom/ic475.c index bdc419d90..ed9662611 100644 --- a/icom/ic475.c +++ b/icom/ic475.c @@ -43,6 +43,7 @@ static const struct icom_priv_caps ic475_priv_caps = { 0x14, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic737_ts_sc_list }; diff --git a/icom/ic7000.c b/icom/ic7000.c index 977674ce6..114fdea00 100644 --- a/icom/ic7000.c +++ b/icom/ic7000.c @@ -109,6 +109,7 @@ static const struct icom_priv_caps IC7000_priv_caps = { 0x70, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic7000_ts_sc_list }; diff --git a/icom/ic703.c b/icom/ic703.c index b063109ae..406f18957 100644 --- a/icom/ic703.c +++ b/icom/ic703.c @@ -79,6 +79,7 @@ static const struct icom_priv_caps ic703_priv_caps = { 0x68, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic706_ts_sc_list }; diff --git a/icom/ic706.c b/icom/ic706.c index 8aeb1554b..c4376251b 100644 --- a/icom/ic706.c +++ b/icom/ic706.c @@ -132,6 +132,7 @@ static int ic706_r2i_mode(RIG *rig, rmode_t mode, pbwidth_t width, static const struct icom_priv_caps ic706_priv_caps = { 0x48, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic706_ts_sc_list, .r2i_mode = ic706_r2i_mode }; @@ -264,6 +265,7 @@ const struct rig_caps ic706_caps = { static const struct icom_priv_caps ic706mkii_priv_caps = { 0x4e, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic706_ts_sc_list, .r2i_mode = ic706_r2i_mode }; @@ -419,6 +421,7 @@ const struct rig_caps ic706mkii_caps = { static const struct icom_priv_caps ic706mkiig_priv_caps = { 0x58, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic706_ts_sc_list, .r2i_mode = ic706_r2i_mode }; diff --git a/icom/ic707.c b/icom/ic707.c index 6a97e9a7e..cd3e6e1b2 100644 --- a/icom/ic707.c +++ b/icom/ic707.c @@ -53,6 +53,7 @@ static const struct icom_priv_caps ic707_priv_caps = { 0x3e, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic737_ts_sc_list }; diff --git a/icom/ic7100.c b/icom/ic7100.c index 57d48ac0f..902407d9c 100644 --- a/icom/ic7100.c +++ b/icom/ic7100.c @@ -97,6 +97,7 @@ static const struct icom_priv_caps ic7100_priv_caps = { 0x88, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic7100_ts_sc_list, /* FIXME */ }; diff --git a/icom/ic718.c b/icom/ic718.c index e8fd3e723..4ded185d3 100644 --- a/icom/ic718.c +++ b/icom/ic718.c @@ -71,6 +71,7 @@ static const struct icom_priv_caps IC718_priv_caps = { 0x5e, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic718_ts_sc_list }; diff --git a/icom/ic7200.c b/icom/ic7200.c index 6e0594843..10b9ff3a8 100644 --- a/icom/ic7200.c +++ b/icom/ic7200.c @@ -79,6 +79,7 @@ static const struct icom_priv_caps IC7200_priv_caps = { 0x76, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic7200_ts_sc_list }; diff --git a/icom/ic725.c b/icom/ic725.c index 08a164f6f..0507a4ef5 100644 --- a/icom/ic725.c +++ b/icom/ic725.c @@ -51,6 +51,7 @@ static const struct icom_priv_caps ic725_priv_caps = { 0x28, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic737_ts_sc_list }; diff --git a/icom/ic726.c b/icom/ic726.c index dc7d4387a..098299502 100644 --- a/icom/ic726.c +++ b/icom/ic726.c @@ -53,6 +53,7 @@ static const struct icom_priv_caps ic726_priv_caps = { 0x30, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic737_ts_sc_list }; diff --git a/icom/ic728.c b/icom/ic728.c index 45a1a8895..c9f570a04 100644 --- a/icom/ic728.c +++ b/icom/ic728.c @@ -53,6 +53,7 @@ static const struct icom_priv_caps ic728_priv_caps = { 0x38, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic737_ts_sc_list }; diff --git a/icom/ic735.c b/icom/ic735.c index 77d9b962f..8c79cde38 100644 --- a/icom/ic735.c +++ b/icom/ic735.c @@ -50,6 +50,7 @@ static const struct icom_priv_caps ic735_priv_caps = { 0x04, /* default address */ 1, /* 731 mode */ + 0, /* no XCHG */ ic737_ts_sc_list }; diff --git a/icom/ic736.c b/icom/ic736.c index f64156847..9d92abf96 100644 --- a/icom/ic736.c +++ b/icom/ic736.c @@ -57,6 +57,7 @@ static const struct icom_priv_caps ic736_priv_caps = { 0x40, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic737_ts_sc_list }; diff --git a/icom/ic737.c b/icom/ic737.c index fbaa798b5..07935ca29 100644 --- a/icom/ic737.c +++ b/icom/ic737.c @@ -53,6 +53,7 @@ static const struct icom_priv_caps ic737_priv_caps = { 0x3c, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic737_ts_sc_list }; diff --git a/icom/ic738.c b/icom/ic738.c index c033bf8f3..2da0fc619 100644 --- a/icom/ic738.c +++ b/icom/ic738.c @@ -57,6 +57,7 @@ static const struct icom_priv_caps ic738_priv_caps = { 0x44, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic737_ts_sc_list }; diff --git a/icom/ic7410.c b/icom/ic7410.c index 890dc81c6..784972874 100644 --- a/icom/ic7410.c +++ b/icom/ic7410.c @@ -75,6 +75,7 @@ static const struct icom_priv_caps ic7410_priv_caps = { 0x80, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic756pro_ts_sc_list }; diff --git a/icom/ic746.c b/icom/ic746.c index 4cc313e87..6048f7338 100644 --- a/icom/ic746.c +++ b/icom/ic746.c @@ -163,6 +163,7 @@ static int ic746pro_get_ext_parm(RIG *rig, token_t token, value_t *val); static const struct icom_priv_caps ic746_priv_caps = { 0x56, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic756pro_ts_sc_list }; @@ -369,6 +370,7 @@ static const struct confparams ic746pro_ext_parms[] = { static const struct icom_priv_caps ic746pro_priv_caps = { 0x66, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic756pro_ts_sc_list }; diff --git a/icom/ic751.c b/icom/ic751.c index e193fa62b..06954c889 100644 --- a/icom/ic751.c +++ b/icom/ic751.c @@ -79,6 +79,7 @@ static const struct icom_priv_caps ic751_priv_caps = { 0x1c, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic737_ts_sc_list }; diff --git a/icom/ic756.c b/icom/ic756.c index 09e3cce81..6e1635b00 100644 --- a/icom/ic756.c +++ b/icom/ic756.c @@ -113,6 +113,7 @@ static int r2i_mode(RIG *rig, rmode_t mode, pbwidth_t width, static const struct icom_priv_caps ic756_priv_caps = { 0x50, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic756_ts_sc_list, .r2i_mode = r2i_mode }; @@ -254,6 +255,7 @@ const struct rig_caps ic756_caps = { static const struct icom_priv_caps ic756pro_priv_caps = { 0x5c, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic756pro_ts_sc_list }; @@ -401,6 +403,7 @@ const struct rig_caps ic756pro_caps = { static const struct icom_priv_caps ic756pro2_priv_caps = { 0x64, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic756pro_ts_sc_list }; @@ -759,6 +762,7 @@ static int ic756pro2_get_ext_parm(RIG *rig, token_t token, value_t *val) static const struct icom_priv_caps ic756pro3_priv_caps = { 0x6e, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic756pro_ts_sc_list }; diff --git a/icom/ic7600.c b/icom/ic7600.c index db3f9ac56..c0a1de3c3 100644 --- a/icom/ic7600.c +++ b/icom/ic7600.c @@ -88,6 +88,7 @@ static const struct icom_priv_caps ic7600_priv_caps = { 0x7a, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic756pro_ts_sc_list }; diff --git a/icom/ic761.c b/icom/ic761.c index aa0266e84..b0d78e23f 100644 --- a/icom/ic761.c +++ b/icom/ic761.c @@ -51,6 +51,7 @@ static const struct icom_priv_caps ic761_priv_caps = { 0x1e, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic737_ts_sc_list }; diff --git a/icom/ic765.c b/icom/ic765.c index 8205b1cfd..76e102223 100644 --- a/icom/ic765.c +++ b/icom/ic765.c @@ -53,6 +53,7 @@ static const struct icom_priv_caps ic765_priv_caps = { 0x2c, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic737_ts_sc_list }; diff --git a/icom/ic7700.c b/icom/ic7700.c index 9ed00d7ca..12a502255 100644 --- a/icom/ic7700.c +++ b/icom/ic7700.c @@ -75,6 +75,7 @@ static const struct icom_priv_caps ic7700_priv_caps = { 0x74, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic756pro_ts_sc_list }; diff --git a/icom/ic775.c b/icom/ic775.c index 02ad5d87d..d146ccd2e 100644 --- a/icom/ic775.c +++ b/icom/ic775.c @@ -50,6 +50,7 @@ static const struct icom_priv_caps ic775_priv_caps = { 0x46, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic737_ts_sc_list }; diff --git a/icom/ic78.c b/icom/ic78.c index bf575c830..643f73c16 100644 --- a/icom/ic78.c +++ b/icom/ic78.c @@ -63,6 +63,7 @@ static const struct icom_priv_caps ic78_priv_caps = { 0x62, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic706_ts_sc_list }; diff --git a/icom/ic7800.c b/icom/ic7800.c index 27c94da0c..3a901c72a 100644 --- a/icom/ic7800.c +++ b/icom/ic7800.c @@ -78,6 +78,7 @@ static int ic7800_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val); static const struct icom_priv_caps ic7800_priv_caps = { 0x6a, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic756pro_ts_sc_list }; diff --git a/icom/ic781.c b/icom/ic781.c index a4d814497..1e0ccaf08 100644 --- a/icom/ic781.c +++ b/icom/ic781.c @@ -54,6 +54,7 @@ static const struct icom_priv_caps ic781_priv_caps = { 0x26, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic737_ts_sc_list }; diff --git a/icom/ic820h.c b/icom/ic820h.c index 47d0339cb..f5bf703a9 100644 --- a/icom/ic820h.c +++ b/icom/ic820h.c @@ -48,7 +48,8 @@ */ static const struct icom_priv_caps ic820h_priv_caps = { 0x42, /* default address */ - 1, /* 731 mode */ + 1, /* 731 mode */ + 0, /* no XCHG */ ic737_ts_sc_list }; diff --git a/icom/ic821h.c b/icom/ic821h.c index 8a1681100..5d5600d9d 100644 --- a/icom/ic821h.c +++ b/icom/ic821h.c @@ -48,7 +48,8 @@ */ static const struct icom_priv_caps ic821h_priv_caps = { 0x4c, /* default address */ - 1, /* 731 mode */ + 1, /* 731 mode */ + 0, /* no XCHG */ ic737_ts_sc_list }; diff --git a/icom/ic910.c b/icom/ic910.c index 8d0017f73..26f15cf2d 100644 --- a/icom/ic910.c +++ b/icom/ic910.c @@ -245,6 +245,7 @@ static int ic910_r2i_mode(RIG *rig, rmode_t mode, pbwidth_t width, static const struct icom_priv_caps ic910_priv_caps = { 0x60, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic910_ts_sc_list, .r2i_mode = ic910_r2i_mode }; diff --git a/icom/ic9100.c b/icom/ic9100.c index b03bd3a18..d6c15466a 100644 --- a/icom/ic9100.c +++ b/icom/ic9100.c @@ -97,6 +97,7 @@ static const struct icom_priv_caps ic9100_priv_caps = { 0x7c, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic910_ts_sc_list, /* FIXME */ }; diff --git a/icom/ic92d.c b/icom/ic92d.c index b5a18d4f6..43e2ad557 100644 --- a/icom/ic92d.c +++ b/icom/ic92d.c @@ -89,6 +89,7 @@ const struct ts_sc_list ic92d_ts_sc_list[] = { static const struct icom_priv_caps ic92d_priv_caps = { 0x01, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic92d_ts_sc_list, .serial_full_duplex = 1 }; diff --git a/icom/ic970.c b/icom/ic970.c index c1cf6fb1a..9907dbd15 100644 --- a/icom/ic970.c +++ b/icom/ic970.c @@ -44,6 +44,7 @@ static const struct icom_priv_caps ic970_priv_caps = { 0x2e, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic737_ts_sc_list }; diff --git a/icom/icom.c b/icom/icom.c index 06050062b..d2170f97c 100644 --- a/icom/icom.c +++ b/icom/icom.c @@ -255,6 +255,7 @@ struct icom_addr { #define TOK_CIVADDR TOKEN_BACKEND(1) #define TOK_MODE731 TOKEN_BACKEND(2) +#define TOK_NOXCHG TOKEN_BACKEND(3) const struct confparams icom_cfg_params[] = { { TOK_CIVADDR, "civaddr", "CI-V address", "Transceiver's CI-V address", @@ -264,6 +265,9 @@ const struct confparams icom_cfg_params[] = { "data length, needed for IC731 and IC735", "0", RIG_CONF_CHECKBUTTON }, + { TOK_NOXCHG, "no_xchg", "No VFO XCHG", "Don't Use VFO XCHG to set other VFO mode and Frequency", + "0", RIG_CONF_CHECKBUTTON + }, { RIG_CONF_END, NULL, } }; @@ -378,6 +382,7 @@ int icom_init(RIG *rig) priv->re_civ_addr = priv_caps->re_civ_addr; priv->civ_731_mode = priv_caps->civ_731_mode; + priv->no_xchg = priv_caps->no_xchg; return RIG_OK; } @@ -1359,6 +1364,9 @@ int icom_set_conf(RIG *rig, token_t token, const char *val) case TOK_MODE731: priv->civ_731_mode = atoi(val) ? 1:0; break; + case TOK_NOXCHG: + priv->no_xchg = atoi(val) ? 1:0; + break; default: return -RIG_EINVAL; } @@ -1385,6 +1393,9 @@ int icom_get_conf(RIG *rig, token_t token, char *val) case TOK_MODE731: sprintf(val, "%d", priv->civ_731_mode); break; + case TOK_NOXCHG: + sprintf(val, "%d", priv->no_xchg); + break; default: return -RIG_EINVAL; } @@ -1654,9 +1665,14 @@ int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) { int status; vfo_t rx_vfo, tx_vfo; + struct icom_priv_data *priv; + struct rig_state *rs; + + rs = &rig->state; + priv = (struct icom_priv_data*)rs->priv; /* This method works also in memory mode(RIG_VFO_MEM) */ - if (rig_has_vfo_op(rig, RIG_OP_XCHG)) { + if (!priv->no_xchg && rig_has_vfo_op(rig, RIG_OP_XCHG)) { status = icom_vfo_op(rig, vfo, RIG_OP_XCHG); if (status != RIG_OK) return status; @@ -1701,9 +1717,14 @@ int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq) { int status; vfo_t rx_vfo, tx_vfo; + struct icom_priv_data *priv; + struct rig_state *rs; + + rs = &rig->state; + priv = (struct icom_priv_data*)rs->priv; /* This method works also in memory mode(RIG_VFO_MEM) */ - if (rig_has_vfo_op(rig, RIG_OP_XCHG)) { + if (!priv->no_xchg && rig_has_vfo_op(rig, RIG_OP_XCHG)) { status = icom_vfo_op(rig, vfo, RIG_OP_XCHG); if (status != RIG_OK) return status; @@ -1748,9 +1769,14 @@ int icom_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width { int status; vfo_t rx_vfo, tx_vfo; + struct icom_priv_data *priv; + struct rig_state *rs; + + rs = &rig->state; + priv = (struct icom_priv_data*)rs->priv; /* This method works also in memory mode(RIG_VFO_MEM) */ - if (rig_has_vfo_op(rig, RIG_OP_XCHG)) { + if (!priv->no_xchg && rig_has_vfo_op(rig, RIG_OP_XCHG)) { status = icom_vfo_op(rig, vfo, RIG_OP_XCHG); if (status != RIG_OK) return status; @@ -1796,9 +1822,14 @@ int icom_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode, pbwidth_t *tx_wid { int status; vfo_t rx_vfo, tx_vfo; + struct icom_priv_data *priv; + struct rig_state *rs; + + rs = &rig->state; + priv = (struct icom_priv_data*)rs->priv; /* This method works also in memory mode(RIG_VFO_MEM) */ - if (rig_has_vfo_op(rig, RIG_OP_XCHG)) { + if (!priv->no_xchg && rig_has_vfo_op(rig, RIG_OP_XCHG)) { status = icom_vfo_op(rig, vfo, RIG_OP_XCHG); if (status != RIG_OK) return status; diff --git a/icom/icom.h b/icom/icom.h index a5c648528..8b68463a3 100644 --- a/icom/icom.h +++ b/icom/icom.h @@ -98,6 +98,7 @@ typedef struct rig_pltstate { struct icom_priv_caps { unsigned char re_civ_addr; /* the remote dlft equipment's CI-V address*/ int civ_731_mode; /* Off: freqs on 10 digits, On: freqs on 8 digits */ + int no_xchg; /* Off: use VFO XCHG to set other VFO, On: use set VFO to set other VFO */ const struct ts_sc_list *ts_sc_list; int settle_time; /*!< Receiver settle time, in ms */ int (*r2i_mode)(RIG *rig, rmode_t mode, pbwidth_t width, @@ -116,6 +117,7 @@ struct icom_priv_caps { struct icom_priv_data { unsigned char re_civ_addr; /* the remote equipment's CI-V address*/ int civ_731_mode; /* Off: freqs on 10 digits, On: freqs on 8 digits */ + int no_xchg; /* Off: use VFO XCHG to set other VFO, On: use set VFO to set other VFO */ pltstate_t *pltstate; /* only on optoscan */ }; diff --git a/icom/icr10.c b/icom/icr10.c index 6c8bf1174..ed3f07333 100644 --- a/icom/icr10.c +++ b/icom/icr10.c @@ -48,6 +48,7 @@ static const struct icom_priv_caps icr10_priv_caps = { 0x52, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ r8500_ts_sc_list /* wrong, but don't have set_ts anyway */ }; diff --git a/icom/icr20.c b/icom/icr20.c index 83797c257..37a3c30b6 100644 --- a/icom/icr20.c +++ b/icom/icr20.c @@ -52,6 +52,7 @@ static const struct icom_priv_caps icr20_priv_caps = { 0x6c, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ r8500_ts_sc_list /* wrong, but don't have set_ts anyway */ }; diff --git a/icom/icr7000.c b/icom/icr7000.c index 2f8da9041..17a49cd15 100644 --- a/icom/icr7000.c +++ b/icom/icr7000.c @@ -52,6 +52,7 @@ static int r7000_set_freq(RIG *rig, vfo_t vfo, freq_t freq); static const struct icom_priv_caps icr7000_priv_caps = { 0x08, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ r7100_ts_sc_list }; /* @@ -161,6 +162,7 @@ const struct rig_caps icr7000_caps = { static const struct icom_priv_caps icr7100_priv_caps = { 0x34, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ r7100_ts_sc_list }; /* diff --git a/icom/icr71.c b/icom/icr71.c index f54f73471..527dba138 100644 --- a/icom/icr71.c +++ b/icom/icr71.c @@ -43,6 +43,7 @@ static const struct icom_priv_caps icr71_priv_caps = { 0x1a, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic737_ts_sc_list /* none actually */ }; diff --git a/icom/icr72.c b/icom/icr72.c index 914195129..b1368578a 100644 --- a/icom/icr72.c +++ b/icom/icr72.c @@ -44,6 +44,7 @@ static const struct icom_priv_caps icr72_priv_caps = { 0x32, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ ic737_ts_sc_list }; diff --git a/icom/icr75.c b/icom/icr75.c index daeb47c96..55961a1bd 100644 --- a/icom/icr75.c +++ b/icom/icr75.c @@ -97,6 +97,7 @@ static int icr75_get_channel(RIG *rig, channel_t *chan); static const struct icom_priv_caps icr75_priv_caps = { 0x5a, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ r75_ts_sc_list }; diff --git a/icom/icr8500.c b/icom/icr8500.c index da00ed408..dae042e9f 100644 --- a/icom/icr8500.c +++ b/icom/icr8500.c @@ -65,6 +65,7 @@ static const struct icom_priv_caps icr8500_priv_caps = { 0x4a, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ r8500_ts_sc_list }; /* diff --git a/icom/icr9000.c b/icom/icr9000.c index 99bd2830c..9d05c1806 100644 --- a/icom/icr9000.c +++ b/icom/icr9000.c @@ -60,6 +60,7 @@ static const struct icom_priv_caps icr9000_priv_caps = { 0x2a, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ r9000_ts_sc_list }; diff --git a/icom/icr9500.c b/icom/icr9500.c index 2b52365bc..1681e52b8 100644 --- a/icom/icr9500.c +++ b/icom/icr9500.c @@ -64,6 +64,7 @@ static const struct icom_priv_caps icr9500_priv_caps = { 0x72, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ r9500_ts_sc_list }; diff --git a/icom/icrx7.c b/icom/icrx7.c index 70126b0eb..c388ce79c 100644 --- a/icom/icrx7.c +++ b/icom/icrx7.c @@ -48,6 +48,7 @@ static const struct icom_priv_caps icrx7_priv_caps = { 0x78, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ r8500_ts_sc_list /* wrong, but don't have set_ts anyway */ }; diff --git a/icom/id1.c b/icom/id1.c index 1b108b6be..9c328b67d 100644 --- a/icom/id1.c +++ b/icom/id1.c @@ -66,6 +66,7 @@ const struct ts_sc_list id1_ts_sc_list[] = { static const struct icom_priv_caps id1_priv_caps = { 0x01, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ id1_ts_sc_list }; diff --git a/icom/omni.c b/icom/omni.c index 33d62b1ba..09d41c1e6 100644 --- a/icom/omni.c +++ b/icom/omni.c @@ -58,6 +58,7 @@ static int omni6_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit); static const struct icom_priv_caps omnivip_priv_caps = { 0x04, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ NULL /* TODO */ }; diff --git a/icom/os456.c b/icom/os456.c index cf847ad51..3481120d5 100644 --- a/icom/os456.c +++ b/icom/os456.c @@ -67,6 +67,7 @@ extern struct confparams opto_ext_parms[]; static const struct icom_priv_caps os456_priv_caps = { 0x80, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ NULL, .settle_time = 20, }; diff --git a/icom/os535.c b/icom/os535.c index 7edc6f7bf..5c79d66b4 100644 --- a/icom/os535.c +++ b/icom/os535.c @@ -59,6 +59,7 @@ extern struct confparams opto_ext_parms[]; static const struct icom_priv_caps os535_priv_caps = { 0x80, /* default address */ 0, /* 731 mode */ + 0, /* no XCHG */ NULL, .settle_time = 12, };