diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index b5c9174f8..fd013bd49 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -787,20 +787,17 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) if (vfo != rig->state.tx_vfo) return -RIG_ENTARGET; } - ptt_t ptt; - if (RIG_OK != (err = newcat_get_ptt(rig, vfo, &ptt))) + if (is_ftdx3000 || is_ftdx5000) { - ERRMSG(err, "newcat_set_cmd failed"); - RETURNFUNC(err); - } + // we have a few rigs that can't set freq while PTT_ON + ptt_t ptt; + if (RIG_OK != (err = newcat_get_ptt(rig, vfo, &ptt))) + { + ERRMSG(err, "newcat_set_cmd failed"); + RETURNFUNC(err); + } - if (ptt == RIG_PTT_ON) // we have a few rigs that can't set TX VFO while PTT_ON - { - // should be true whether we're on VFOA or VFOB but only restricting VFOB right now - // we return RIG_OK as we dont' want - if (is_ftdx3000) { return RIG_ENTARGET; } - - if (is_ftdx5000) { return RIG_ENTARGET; } + if (ptt) { return RIG_ENTARGET; } } if (RIG_MODEL_FT450 == caps->rig_model) diff --git a/src/rig.c b/src/rig.c index 3fe55bc79..c69f02592 100644 --- a/src/rig.c +++ b/src/rig.c @@ -1839,6 +1839,30 @@ int HAMLIB_API rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) RETURNFUNC(retcode); } +/** + * \brief get the frequency of VFOA and VFOB + * \param rig The rig handle + * \param freqA The location where to store the VFOA/Main frequency + * \param freqB The location where to store the VFOB/Sub frequency + * + * Retrieves the frequency of VFOA/Main and VFOB/Sub + * The value stored at \a freq location equals RIG_FREQ_NONE when the current + * frequency of the VFO is not defined (e.g. blank memory). + * + * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * a negative value if an error occurred (in which case, cause is + * set appropriately). + * + * \sa rig_set_freq() + */ +int HAMLIB_API rig_get_freqs(RIG *rig, freq_t *freqA, freq_t freqB) +{ + // we will attempt to avoid vfo swapping in this routine + + return -RIG_ENIMPL; + +} + /** * \brief set the mode of the target VFO