Prevent ftdx101d from setting frequency on the non-tx vfo when in split mode

pull/519/head^2
Michael Black W9MDB 2021-01-24 12:25:29 -06:00
rodzic 2be172ac4e
commit 7e6adc6d2a
2 zmienionych plików z 14 dodań i 3 usunięć

Wyświetl plik

@ -775,6 +775,15 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
target_vfo = 'A' == c ? '0' : '1';
// some rigs like FTDX101D cannot change non-TX vfo freq
// but they can change the TX vfo
if (is_ftdx101 && rig->state.cache.ptt == RIG_PTT_ON)
{
// then we can't change freq on the non-tx VFO
rig_debug(RIG_DEBUG_TRACE, "%s: ftdx101 check vfo OK, vfo=%s, tx_vfo=%s\n", __func__, rig_strvfo(vfo), rig_strvfo(rig->state.tx_vfo));
if (vfo != rig->state.tx_vfo) return -RIG_ENTARGET;
}
if (rig->state.cache.ptt ==
RIG_PTT_ON) // we have a few rigs that can't set TX VFO while PTT_ON
{
@ -6687,6 +6696,7 @@ ncboolean newcat_is_rig(RIG *rig, rig_model_t model)
/*
* newcat_set_tx_vfo does not set priv->curr_vfo
* does set rig->state.tx_vfo
*/
int newcat_set_tx_vfo(RIG *rig, vfo_t tx_vfo)
{
@ -6762,9 +6772,10 @@ int newcat_set_tx_vfo(RIG *rig, vfo_t tx_vfo)
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "%s%c%c", command, p1, cat_term);
rig_debug(RIG_DEBUG_TRACE, "cmd_str = %s\n", priv->cmd_str);
rig_debug(RIG_DEBUG_TRACE, "cmd_str = %s, vfo=%s\n", priv->cmd_str, rig_strvfo(tx_vfo));
rig->state.tx_vfo = tx_vfo;
/* Set TX VFO */
RETURNFUNC(newcat_set_cmd(rig));
}

Wyświetl plik

@ -50,7 +50,7 @@
typedef char ncboolean;
/* shared function version */
#define NEWCAT_VER "20210123"
#define NEWCAT_VER "20210124"
/* Hopefully large enough for future use, 128 chars plus '\0' */
#define NEWCAT_DATA_LEN 129