kopia lustrzana https://github.com/Hamlib/Hamlib
Change satmode rig split_get_freq to return to starting VFO
rodzic
d631b2d215
commit
af09b043ea
|
@ -3530,10 +3530,13 @@ int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
|
||||||
struct rig_state *rs;
|
struct rig_state *rs;
|
||||||
unsigned char ackbuf[MAXFRAMELEN];
|
unsigned char ackbuf[MAXFRAMELEN];
|
||||||
int ack_len = sizeof(ackbuf);
|
int ack_len = sizeof(ackbuf);
|
||||||
|
vfo_t save_vfo;
|
||||||
|
|
||||||
|
|
||||||
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
|
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
|
||||||
rs = &rig->state;
|
rs = &rig->state;
|
||||||
priv = (struct icom_priv_data *) rs->priv;
|
priv = (struct icom_priv_data *) rs->priv;
|
||||||
|
save_vfo = priv->curr_vfo; // so we can restore it later
|
||||||
|
|
||||||
/* This method works also in memory mode(RIG_VFO_MEM) */
|
/* This method works also in memory mode(RIG_VFO_MEM) */
|
||||||
if (!priv->no_xchg && rig_has_vfo_op(rig, RIG_OP_XCHG))
|
if (!priv->no_xchg && rig_has_vfo_op(rig, RIG_OP_XCHG))
|
||||||
|
@ -3596,7 +3599,13 @@ int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (RIG_OK != (rc = icom_set_vfo(rig, rx_vfo)))
|
if (VFO_HAS_MAIN_SUB_A_B_ONLY)
|
||||||
|
{
|
||||||
|
// Then we return the VFO to where it was
|
||||||
|
rig_debug(RIG_DEBUG_TRACE, "%s: SATMODE rig so returning vfo to %s\n", __func__,
|
||||||
|
rig_strvfo(save_vfo));
|
||||||
|
}
|
||||||
|
else if (RIG_OK != (rc = icom_set_vfo(rig, rx_vfo)))
|
||||||
{
|
{
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue