Change rig_set_split_mode to disable/enable ptt by rig model as needed

https://github.com/Hamlib/Hamlib/issues/838
pull/875/head
Mike Black W9MDB 2021-11-03 08:16:39 -05:00
rodzic 30ef04b1a4
commit c1c1f1f053
1 zmienionych plików z 12 dodań i 2 usunięć

Wyświetl plik

@ -4224,6 +4224,7 @@ int HAMLIB_API rig_set_split_mode(RIG *rig,
const struct rig_caps *caps;
int retcode, rc2;
vfo_t curr_vfo, tx_vfo;
int split_fix = 0;
ENTERFUNC;
@ -4251,7 +4252,13 @@ int HAMLIB_API rig_set_split_mode(RIG *rig,
RETURNFUNC(retcode);
}
rig_set_split_vfo(rig,RIG_VFO_CURR, RIG_SPLIT_OFF, RIG_VFO_CURR);
// some rigs exhibit undesirable flashing when split is on
// and and we have to switch VFOS to set things
if (rig->caps->rig_model == RIG_MODEL_FT950)
{
rig_set_split_vfo(rig,RIG_VFO_CURR, RIG_SPLIT_OFF, RIG_VFO_CURR);
split_fix = 1;
}
/* Assisted mode */
curr_vfo = rig->state.current_vfo;
@ -4323,7 +4330,10 @@ int HAMLIB_API rig_set_split_mode(RIG *rig,
/* return the first error code */
retcode = rc2;
}
rig_set_split_vfo(rig,RIG_VFO_CURR, RIG_SPLIT_ON, RIG_VFO_CURR);
if (split_fix)
{
rig_set_split_vfo(rig,RIG_VFO_CURR, RIG_SPLIT_ON, RIG_VFO_CURR);
}
RETURNFUNC(retcode);
}