kopia lustrzana https://github.com/Hamlib/Hamlib
icom.c if VFOA/B is requested for rig without VFOA/A maps to Main/Sub
https://github.com/Hamlib/Hamlib/issues/231pull/234/head
rodzic
1aed5e9266
commit
48b0234caf
|
@ -1095,10 +1095,14 @@ int icom_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
|
|||
rig_debug(RIG_DEBUG_VERBOSE, "%s: using vfo=%s\n", __func__,
|
||||
rig_strvfo(vfo));
|
||||
|
||||
if (priv->curr_vfo == RIG_VFO_NONE) {
|
||||
if (priv->curr_vfo == RIG_VFO_NONE)
|
||||
{
|
||||
retval = rig_set_vfo(rig, vfo);
|
||||
if (retval != RIG_OK) {
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: set_vfo failed? retval=%s\n", __func__, strerror(retval));
|
||||
|
||||
if (retval != RIG_OK)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: set_vfo failed? retval=%s\n", __func__,
|
||||
strerror(retval));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1873,7 +1877,8 @@ int icom_set_vfo(RIG *rig, vfo_t vfo)
|
|||
if ((vfo == RIG_VFO_A || vfo == RIG_VFO_B) && !VFO_HAS_A_B)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: Rig does not have VFO A/B?\n", __func__);
|
||||
return -RIG_EINVAL;
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: Mapping VFOA=Main, VFOB=Sub\n", __func__);
|
||||
vfo = vfo == RIG_VFO_A ? RIG_VFO_A : RIG_VFO_B;
|
||||
}
|
||||
|
||||
if ((vfo == RIG_VFO_MAIN || vfo == RIG_VFO_SUB) && !VFO_HAS_MAIN_SUB)
|
||||
|
|
Ładowanie…
Reference in New Issue