Skip to content
Permalink
Browse files
Change rig_get_rig_info to use cached values for VFOB when not target…
…able

#682
  • Loading branch information
mdblack98 committed Apr 27, 2021
1 parent bfa7599 commit 2066bb38fd8b77a46526826b1be2d0f9f34ddf8e
Showing with 13 additions and 2 deletions.
  1. +13 −2 src/rig.c
@@ -6223,8 +6223,19 @@ int HAMLIB_API rig_get_rig_info(RIG *rig, char *response, int max_response_len)
vfoB = vfo_fixup(rig, RIG_VFO_B);
ret = rig_get_vfo_info(rig, vfoA, &freqA, &modeA, &widthA, &split, &satmode);
if (ret != RIG_OK) RETURNFUNC(ret);
ret = rig_get_vfo_info(rig, vfoB, &freqB, &modeB, &widthB, &split, &satmode);
if (ret != RIG_OK) RETURNFUNC(ret);
// we need both vfo and mode targtable to avoid vfo swapping
if ((rig->caps->targetable_vfo & RIG_TARGETABLE_FREQ) && (rig->caps->targetable_vfo & RIG_TARGETABLE_MODE))
{
ret = rig_get_vfo_info(rig, vfoB, &freqB, &modeB, &widthB, &split, &satmode);
if (ret != RIG_OK) RETURNFUNC(ret);
}
else
{
// we'll use cached info instead of doing the vfo swapping
int cache_ms_freq, cache_ms_mode, cache_ms_width;
rig_get_cache(rig, vfoB, &freqB, &cache_ms_freq, &modeB, &cache_ms_mode, &widthB,
&cache_ms_width);
}
rxa = 1;
txa = split == 0;
rxb = !rxa;

0 comments on commit 2066bb3

Please sign in to comment.