kopia lustrzana https://github.com/Hamlib/Hamlib
Change ptt check in newcat.c set_freq to check ptt only for affected rigs
https://github.com/Hamlib/Hamlib/issues/540pull/544/head
rodzic
360704908b
commit
54aca79671
|
@ -787,6 +787,9 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
|
|||
if (vfo != rig->state.tx_vfo) return -RIG_ENTARGET;
|
||||
}
|
||||
|
||||
if (is_ftdx3000 || is_ftdx5000)
|
||||
{
|
||||
// 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)))
|
||||
{
|
||||
|
@ -794,13 +797,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
|
|||
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)
|
||||
|
|
24
src/rig.c
24
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
|
||||
|
|
Ładowanie…
Reference in New Issue