Add satmode rig logic to set_split_freq

pull/224/head
Michael Black 2020-02-29 16:24:31 -06:00
rodzic e55e1feb86
commit b0fcd87f7f
1 zmienionych plików z 6 dodań i 5 usunięć

Wyświetl plik

@ -3417,10 +3417,12 @@ int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
struct rig_state *rs;
unsigned char ackbuf[MAXFRAMELEN];
int ack_len = sizeof(ackbuf);
vfo_t save_vfo;
rig_debug(RIG_DEBUG_VERBOSE, "%s called for %s\n", __func__, rig_strvfo(vfo));
rs = &rig->state;
priv = (struct icom_priv_data *) rs->priv;
save_vfo = priv->curr_vfo;
if (!priv->no_xchg && rig_has_vfo_op(rig, RIG_OP_XCHG))
{
@ -3487,12 +3489,11 @@ int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
if (VFO_HAS_MAIN_SUB_A_B_ONLY)
{
// Then we leave the VFO on the tx_vfo which should be Main
// in satellite mode
// Then we return the VFO to where it was
rig_debug(RIG_DEBUG_TRACE, "%s: SATMODE rig so setting vfo to %s\n", __func__,
rig_strvfo(tx_vfo));
rig_strvfo(save_vfo));
if (RIG_OK != (rc = icom_set_vfo(rig, tx_vfo)))
if (RIG_OK != (rc = icom_set_vfo(rig, save_vfo)))
{
return rc;
}