kopia lustrzana https://github.com/Hamlib/Hamlib
Only call rig_get_vfo in icom_set_vfo if get_vfo is enabled
rodzic
e0d39b3dcb
commit
24c18938c2
17
src/rig.c
17
src/rig.c
|
@ -2629,15 +2629,18 @@ int HAMLIB_API rig_set_vfo(RIG *rig, vfo_t vfo)
|
||||||
|
|
||||||
if (vfo == RIG_VFO_CURR) { RETURNFUNC(RIG_OK); }
|
if (vfo == RIG_VFO_CURR) { RETURNFUNC(RIG_OK); }
|
||||||
|
|
||||||
retcode = rig_get_vfo(rig, &curr_vfo);
|
if (rig->caps->get_vfo)
|
||||||
|
|
||||||
if (retcode != RIG_OK)
|
|
||||||
{
|
{
|
||||||
rig_debug(RIG_DEBUG_WARN, "%s: rig_get_vfo error=%s\n", __func__,
|
retcode = rig_get_vfo(rig, &curr_vfo);
|
||||||
rigerror(retcode));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (curr_vfo == vfo) { RETURNFUNC(RIG_OK); }
|
if (retcode != RIG_OK)
|
||||||
|
{
|
||||||
|
rig_debug(RIG_DEBUG_WARN, "%s: rig_get_vfo error=%s\n", __func__,
|
||||||
|
rigerror(retcode));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (curr_vfo == vfo) { RETURNFUNC(RIG_OK); }
|
||||||
|
}
|
||||||
|
|
||||||
#if 0 // removing this check 20210801 -- should be mapped already
|
#if 0 // removing this check 20210801 -- should be mapped already
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue