Only do x25 command if not in satellite mode for icom rigs

pull/224/head
Michael Black 2020-03-14 15:07:49 -05:00
rodzic 79661711f1
commit 92c6f3924e
1 zmienionych plików z 36 dodań i 21 usunięć

Wyświetl plik

@ -3636,8 +3636,14 @@ 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)
{
int satmode = 0;
rc = rig_get_func(rig, RIG_VFO_CURR, RIG_FUNC_SATMODE, &satmode);
rig_debug(RIG_DEBUG_VERBOSE, "%s: satmode=%d\n", __func__, satmode);
if (satmode == 0) // only worth trying if not in satmode
{ {
freq_len = priv->civ_731_mode ? 4 : 5; freq_len = priv->civ_731_mode ? 4 : 5;
/* /*
@ -3654,6 +3660,7 @@ int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
{ {
return rc; return rc;
} }
}
priv->x25cmdfails = 1; priv->x25cmdfails = 1;
} }
@ -3798,8 +3805,15 @@ 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)
{
int satmode = 0;
rc = rig_get_func(rig, RIG_VFO_CURR, RIG_FUNC_SATMODE, &satmode);
rig_debug(RIG_DEBUG_VERBOSE, "%s: satmode=%d\n", __func__, satmode);
if (satmode == 0) // only worth trying if not in satmode
{ {
cmd = C_SEND_SEL_FREQ; cmd = C_SEND_SEL_FREQ;
subcmd = 0x01; // get the unselected vfo subcmd = 0x01; // get the unselected vfo
@ -3811,6 +3825,7 @@ int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
*tx_freq = from_bcd(ackbuf + 2, (priv->civ_731_mode ? 4 : 5) * 2); *tx_freq = from_bcd(ackbuf + 2, (priv->civ_731_mode ? 4 : 5) * 2);
return rc; return rc;
} }
}
priv->x25cmdfails = 1; priv->x25cmdfails = 1;
} }