diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 8a6420410..296b49492 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -776,7 +776,7 @@ icom_rig_open(RIG *rig) priv->tx_vfo = RIG_VFO_MAIN; } -#if 0 // do not do this here -- needs to be done when ranges are requested instead +#if 0 // do not do this here -- needs to be done when ranges are requested instead as this is very slow icom_get_freq_range(rig); // try get to get rig range capability dyamically #endif diff --git a/src/rig.c b/src/rig.c index d1bdd3def..2cd1e1a63 100644 --- a/src/rig.c +++ b/src/rig.c @@ -1295,9 +1295,12 @@ int HAMLIB_API rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq) rig->state.current_freq = freq; } - elapsed_ms(&rig->state.cache.time_ptt, ELAPSED_SET); - rig->state.cache.freq = freq; - rig->state.cache.vfo_freq = vfo; + if (retcode == RIG_OK) + { + elapsed_ms(&rig->state.cache.time_ptt, ELAPSED_SET); + rig->state.cache.freq = freq; + rig->state.cache.vfo_freq = vfo; + } return retcode; }