Michael Black W9MDB 2020-06-22 23:16:02 -05:00
rodzic b380ed5dbf
commit 4ff31d008f
1 zmienionych plików z 19 dodań i 19 usunięć

Wyświetl plik

@ -1459,10 +1459,10 @@ int HAMLIB_API rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
// If we're in vfo_mode then rigctld will do any VFO swapping we need
if ((caps->targetable_vfo & RIG_TARGETABLE_FREQ)
|| vfo == RIG_VFO_CURR || vfo == rig->state.current_vfo
|| rig->state.vfo_opt == 1)
{
// If rig does not have set_vfo we need to change vfo
if (vfo == RIG_VFO_CURR && caps->set_vfo == NULL)
|| (rig->state.vfo_opt == 1 && rig->caps->rig_model == RIG_MODEL_NETRIGCTL))
{
// If rig does not have set_vfo we need to change vfo
if (vfo == RIG_VFO_CURR && caps->set_vfo == NULL)
{
vfo = vfo_fixup(rig, RIG_VFO_A);
rig_debug(RIG_DEBUG_TRACE, "%s: no set_vfo so vfo=%s\n", __func__,
@ -1540,29 +1540,29 @@ int HAMLIB_API rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
/* VFO compensation */
if (rig->state.vfo_comp != 0.0)
{
*freq = (freq_t)(*freq / (1.0 + (double)rig->state.vfo_comp));
{
*freq = (freq_t)(*freq / (1.0 + (double)rig->state.vfo_comp));
}
if (retcode == RIG_OK
&& (vfo == RIG_VFO_CURR || vfo == rig->state.current_vfo))
{
rig->state.current_freq = *freq;
}
{
rig->state.current_freq = *freq;
}
if (rig->state.lo_freq != 0.0)
{
*freq += rig->state.lo_freq;
}
if (rig->state.lo_freq != 0.0)
{
*freq += rig->state.lo_freq;
}
cache_ms = elapsed_ms(&(rig->state.cache.time_freq), ELAPSED_SET);
rig_debug(RIG_DEBUG_TRACE, "%s: cache reset age=%dms, vfo=%s, freq=%.0f\n",
__func__, cache_ms, rig_strvfo(vfo), *freq);
rig->state.cache.freq = *freq;
rig->state.cache.vfo_freq = vfo;
cache_ms = elapsed_ms(&(rig->state.cache.time_freq), ELAPSED_SET);
rig_debug(RIG_DEBUG_TRACE, "%s: cache reset age=%dms, vfo=%s, freq=%.0f\n",
__func__, cache_ms, rig_strvfo(vfo), *freq);
rig->state.cache.freq = *freq;
rig->state.cache.vfo_freq = vfo;
return retcode;
return retcode;
}