kopia lustrzana https://github.com/Hamlib/Hamlib
Change rig.c to utilize caps function
rodzic
d540def11b
commit
dc389d7908
|
@ -1150,7 +1150,7 @@ int HAMLIB_API rig_get_twiddle(RIG *rig, int *seconds)
|
||||||
// detect if somebody is twiddling the VFO
|
// detect if somebody is twiddling the VFO
|
||||||
// indicator is last set freq doesn't match current freq
|
// indicator is last set freq doesn't match current freq
|
||||||
// so we have to query freq every time we set freq or vfo to handle this
|
// so we have to query freq every time we set freq or vfo to handle this
|
||||||
static int twiddling(RIG *rig)
|
int twiddling(RIG *rig)
|
||||||
{
|
{
|
||||||
const struct rig_caps *caps;
|
const struct rig_caps *caps;
|
||||||
|
|
||||||
|
@ -1832,10 +1832,12 @@ int HAMLIB_API rig_set_vfo(RIG *rig, vfo_t vfo)
|
||||||
// we only get the freq if we set the vfo OK
|
// we only get the freq if we set the vfo OK
|
||||||
if (retcode == RIG_OK && caps->get_freq)
|
if (retcode == RIG_OK && caps->get_freq)
|
||||||
{
|
{
|
||||||
retcode = rig_get_freq(rig, vfo, &curr_freq);
|
if (caps->get_freq) {
|
||||||
|
retcode = caps->get_freq(rig, vfo, &curr_freq);
|
||||||
rig_debug(RIG_DEBUG_TRACE, "%s: retcode from rig_get_freq = %s\n", __func__,
|
rig_debug(RIG_DEBUG_TRACE, "%s: retcode from rig_get_freq = %s\n", __func__,
|
||||||
rigerror(retcode));
|
rigerror(retcode));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// expire several cached items when we switch VFOs
|
// expire several cached items when we switch VFOs
|
||||||
|
|
Ładowanie…
Reference in New Issue