kopia lustrzana https://github.com/Hamlib/Hamlib
Add satmode rig logic to set_split_freq
rodzic
e55e1feb86
commit
b0fcd87f7f
|
@ -3370,7 +3370,7 @@ int icom_get_split_vfos(const RIG *rig, vfo_t *rx_vfo, vfo_t *tx_vfo)
|
||||||
int satmode = 0;
|
int satmode = 0;
|
||||||
// e.g. IC9700 split on Main/Sub does not work
|
// e.g. IC9700 split on Main/Sub does not work
|
||||||
// only Main VFOA/B and SubRx/MainTx split works
|
// only Main VFOA/B and SubRx/MainTx split works
|
||||||
rig_get_func((RIG*)rig, RIG_VFO_CURR, RIG_FUNC_SATMODE, &satmode);
|
rig_get_func((RIG *)rig, RIG_VFO_CURR, RIG_FUNC_SATMODE, &satmode);
|
||||||
|
|
||||||
// don't care about retval here...only care about satmode=1
|
// don't care about retval here...only care about satmode=1
|
||||||
if (satmode)
|
if (satmode)
|
||||||
|
@ -3417,10 +3417,12 @@ int icom_set_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 for %s\n", __func__, rig_strvfo(vfo));
|
rig_debug(RIG_DEBUG_VERBOSE, "%s called for %s\n", __func__, rig_strvfo(vfo));
|
||||||
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;
|
||||||
|
|
||||||
if (!priv->no_xchg && rig_has_vfo_op(rig, RIG_OP_XCHG))
|
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)
|
if (VFO_HAS_MAIN_SUB_A_B_ONLY)
|
||||||
{
|
{
|
||||||
// Then we leave the VFO on the tx_vfo which should be Main
|
// Then we return the VFO to where it was
|
||||||
// in satellite mode
|
|
||||||
rig_debug(RIG_DEBUG_TRACE, "%s: SATMODE rig so setting vfo to %s\n", __func__,
|
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;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue