kopia lustrzana https://github.com/Hamlib/Hamlib
Do not change split freq if change not needed
https://github.com/Hamlib/Hamlib/issues/863pull/875/head
rodzic
aa86f25321
commit
eed9637675
10
src/rig.c
10
src/rig.c
|
@ -3923,6 +3923,7 @@ int HAMLIB_API rig_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
|
||||||
const struct rig_caps *caps;
|
const struct rig_caps *caps;
|
||||||
int retcode, rc2;
|
int retcode, rc2;
|
||||||
vfo_t curr_vfo, tx_vfo;
|
vfo_t curr_vfo, tx_vfo;
|
||||||
|
freq_t tfreq = 0;
|
||||||
|
|
||||||
if (CHECK_RIG_ARG(rig))
|
if (CHECK_RIG_ARG(rig))
|
||||||
{
|
{
|
||||||
|
@ -3945,6 +3946,14 @@ int HAMLIB_API rig_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
|
||||||
tx_vfo = vfo;
|
tx_vfo = vfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rig_get_freq(rig, tx_vfo, &tfreq);
|
||||||
|
|
||||||
|
if (tfreq == tx_freq)
|
||||||
|
{
|
||||||
|
rig_debug(RIG_DEBUG_TRACE, "%s: freq set not needed\n", __func__);
|
||||||
|
RETURNFUNC(RIG_OK);
|
||||||
|
}
|
||||||
|
|
||||||
if (caps->set_split_freq
|
if (caps->set_split_freq
|
||||||
&& (vfo == RIG_VFO_CURR
|
&& (vfo == RIG_VFO_CURR
|
||||||
|| vfo == RIG_VFO_TX
|
|| vfo == RIG_VFO_TX
|
||||||
|
@ -4007,7 +4016,6 @@ int HAMLIB_API rig_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
|
||||||
}
|
}
|
||||||
|
|
||||||
int retry = 3;
|
int retry = 3;
|
||||||
freq_t tfreq;
|
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
|
Ładowanie…
Reference in New Issue