kopia lustrzana https://github.com/Hamlib/Hamlib
Merge branch 'master' of https://github.com/mdblack98/Hamlib
commit
cf1187997a
|
@ -3636,23 +3636,30 @@ int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
|
||||||
save_vfo = priv->curr_vfo;
|
save_vfo = priv->curr_vfo;
|
||||||
|
|
||||||
// If the rigs supports the 0x25 command we'll use it
|
// If the rigs supports the 0x25 command we'll use it
|
||||||
// This eliminates VFO swapping and improves satmode operations
|
// This eliminates VFO swapping and improves split operations
|
||||||
if (priv->x25cmdfails == 0)
|
if (priv->x25cmdfails == 0)
|
||||||
{
|
{
|
||||||
freq_len = priv->civ_731_mode ? 4 : 5;
|
int satmode = 0;
|
||||||
/*
|
rc = rig_get_func(rig, RIG_VFO_CURR, RIG_FUNC_SATMODE, &satmode);
|
||||||
* to_bcd requires nibble len
|
rig_debug(RIG_DEBUG_VERBOSE, "%s: satmode=%d\n", __func__, satmode);
|
||||||
*/
|
|
||||||
to_bcd(freqbuf, tx_freq, freq_len * 2);
|
|
||||||
|
|
||||||
cmd = C_SEND_SEL_FREQ;
|
if (satmode == 0) // only worth trying if not in satmode
|
||||||
subcmd = 0x01; // set the unselected vfo
|
|
||||||
rc = icom_transaction(rig, cmd, subcmd, freqbuf, freq_len, ackbuf,
|
|
||||||
&ack_len);
|
|
||||||
|
|
||||||
if (rc == RIG_OK) // then we're done!!
|
|
||||||
{
|
{
|
||||||
return rc;
|
freq_len = priv->civ_731_mode ? 4 : 5;
|
||||||
|
/*
|
||||||
|
* to_bcd requires nibble len
|
||||||
|
*/
|
||||||
|
to_bcd(freqbuf, tx_freq, freq_len * 2);
|
||||||
|
|
||||||
|
cmd = C_SEND_SEL_FREQ;
|
||||||
|
subcmd = 0x01; // set the unselected vfo
|
||||||
|
rc = icom_transaction(rig, cmd, subcmd, freqbuf, freq_len, ackbuf,
|
||||||
|
&ack_len);
|
||||||
|
|
||||||
|
if (rc == RIG_OK) // then we're done!!
|
||||||
|
{
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
priv->x25cmdfails = 1;
|
priv->x25cmdfails = 1;
|
||||||
|
@ -3798,18 +3805,26 @@ int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the rigs supports the 0x25 command we'll use it
|
// If the rigs supports the 0x25 command we'll use it
|
||||||
// This eliminates VFO swapping and improves satmode operations
|
// This eliminates VFO swapping and improves split operations
|
||||||
|
// This does not work in satellite mode for the 9700
|
||||||
if (priv->x25cmdfails == 0)
|
if (priv->x25cmdfails == 0)
|
||||||
{
|
{
|
||||||
cmd = C_SEND_SEL_FREQ;
|
int satmode = 0;
|
||||||
subcmd = 0x01; // get the unselected vfo
|
rc = rig_get_func(rig, RIG_VFO_CURR, RIG_FUNC_SATMODE, &satmode);
|
||||||
rc = icom_transaction(rig, cmd, subcmd, NULL, 0, ackbuf,
|
rig_debug(RIG_DEBUG_VERBOSE, "%s: satmode=%d\n", __func__, satmode);
|
||||||
&ack_len);
|
|
||||||
|
|
||||||
if (rc == RIG_OK) // then we're done!!
|
if (satmode == 0) // only worth trying if not in satmode
|
||||||
{
|
{
|
||||||
*tx_freq = from_bcd(ackbuf + 2, (priv->civ_731_mode ? 4 : 5) * 2);
|
cmd = C_SEND_SEL_FREQ;
|
||||||
return rc;
|
subcmd = 0x01; // get the unselected vfo
|
||||||
|
rc = icom_transaction(rig, cmd, subcmd, NULL, 0, ackbuf,
|
||||||
|
&ack_len);
|
||||||
|
|
||||||
|
if (rc == RIG_OK) // then we're done!!
|
||||||
|
{
|
||||||
|
*tx_freq = from_bcd(ackbuf + 2, (priv->civ_731_mode ? 4 : 5) * 2);
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
priv->x25cmdfails = 1;
|
priv->x25cmdfails = 1;
|
||||||
|
@ -4750,6 +4765,8 @@ int icom_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
|
||||||
unsigned char fctbuf[MAXFRAMELEN], ackbuf[MAXFRAMELEN];
|
unsigned char fctbuf[MAXFRAMELEN], ackbuf[MAXFRAMELEN];
|
||||||
int fct_len, acklen, retval;
|
int fct_len, acklen, retval;
|
||||||
int fct_cn, fct_sc; /* Command Number, Subcommand */
|
int fct_cn, fct_sc; /* Command Number, Subcommand */
|
||||||
|
struct rig_state *rs = &rig->state;
|
||||||
|
struct icom_priv_data *priv = (struct icom_priv_data *) rs->priv;
|
||||||
|
|
||||||
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
|
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
|
||||||
|
|
||||||
|
@ -4935,6 +4952,7 @@ int icom_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
|
||||||
fct_cn = C_CTL_FUNC;
|
fct_cn = C_CTL_FUNC;
|
||||||
fct_sc = S_MEM_SATMODE;
|
fct_sc = S_MEM_SATMODE;
|
||||||
}
|
}
|
||||||
|
priv->x25cmdfails = 0; // we reset this to try it again
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define BACKEND_VER "0.37"
|
#define BACKEND_VER "0.38"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* defines used by comp_cal_str in rig.c
|
* defines used by comp_cal_str in rig.c
|
||||||
|
|
Ładowanie…
Reference in New Issue