kopia lustrzana https://github.com/Hamlib/Hamlib
Bump up priv_cap->ant_count before calling rig_get_ant
rodzic
7e8938ae65
commit
28dad4f15f
|
@ -5311,14 +5311,15 @@ static int icom_get_ant_count(RIG *rig)
|
||||||
int looplimit = 0;
|
int looplimit = 0;
|
||||||
priv_caps->ant_count = 0;
|
priv_caps->ant_count = 0;
|
||||||
do {
|
do {
|
||||||
|
++priv_caps->ant_count; // need to bump thsi up before rig_get_ant
|
||||||
retval = rig_get_ant(rig, RIG_VFO_CURR, rig_idx2setting(ant), &tmp_ant, &tmp_option);
|
retval = rig_get_ant(rig, RIG_VFO_CURR, rig_idx2setting(ant), &tmp_ant, &tmp_option);
|
||||||
if (retval == RIG_OK) {
|
if (retval == RIG_OK) {
|
||||||
++priv_caps->ant_count;
|
|
||||||
rig_debug(RIG_DEBUG_TRACE,"%s: found ant#%d\n", __func__, priv_caps->ant_count);
|
rig_debug(RIG_DEBUG_TRACE,"%s: found ant#%d\n", __func__, priv_caps->ant_count);
|
||||||
++ant;
|
++ant;
|
||||||
}
|
}
|
||||||
} while(retval == RIG_OK && ++looplimit < 10);
|
} while(retval == RIG_OK && ++looplimit < 10);
|
||||||
}
|
}
|
||||||
|
--priv_caps->ant_count; // we have 1 too many when we get here
|
||||||
rig_debug(RIG_DEBUG_TRACE,"%s: ant_count=%d\n", __func__, priv_caps->ant_count);
|
rig_debug(RIG_DEBUG_TRACE,"%s: ant_count=%d\n", __func__, priv_caps->ant_count);
|
||||||
return priv_caps->ant_count;
|
return priv_caps->ant_count;
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue