Change rig.c to utilize caps function

pull/281/head
Michael Black W9MDB 2020-05-16 21:33:52 +02:00
rodzic d540def11b
commit dc389d7908
1 zmienionych plików z 5 dodań i 3 usunięć

Wyświetl plik

@ -1150,7 +1150,7 @@ int HAMLIB_API rig_get_twiddle(RIG *rig, int *seconds)
// detect if somebody is twiddling the VFO
// 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
static int twiddling(RIG *rig)
int twiddling(RIG *rig)
{
const struct rig_caps *caps;
@ -1832,9 +1832,11 @@ int HAMLIB_API rig_set_vfo(RIG *rig, vfo_t vfo)
// we only get the freq if we set the vfo OK
if (retcode == RIG_OK && caps->get_freq)
{
retcode = rig_get_freq(rig, vfo, &curr_freq);
rig_debug(RIG_DEBUG_TRACE, "%s: retcode from rig_get_freq = %s\n", __func__,
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__,
rigerror(retcode));
}
}