Allow setting split mode without smashing the VFOB frequency.

pull/116/head
Jonathan Bastien-Filiatrault 2019-07-09 21:50:15 -04:00
rodzic 67181bf846
commit cdd77ae71e
1 zmienionych plików z 11 dodań i 0 usunięć

Wyświetl plik

@ -408,6 +408,7 @@ int ft891_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_widt
{ {
struct newcat_priv_data *priv; struct newcat_priv_data *priv;
struct rig_state *state; struct rig_state *state;
freq_t b_freq;
int err; int err;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
@ -422,6 +423,11 @@ int ft891_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_widt
priv = (struct newcat_priv_data *)rig->state.priv; priv = (struct newcat_priv_data *)rig->state.priv;
// Remember VFOB frequency
if (RIG_OK != (err = newcat_get_freq(rig,RIG_VFO_B,&b_freq))) {
return err;
}
// Change mode on VFOA and make VFOB match VFOA // Change mode on VFOA and make VFOB match VFOA
if (RIG_OK != (err = newcat_set_mode(rig,RIG_VFO_A,tx_mode,tx_width))) { if (RIG_OK != (err = newcat_set_mode(rig,RIG_VFO_A,tx_mode,tx_width))) {
return err; return err;
@ -434,6 +440,11 @@ int ft891_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_widt
return err; return err;
} }
// Restore VFOB frequency
if (RIG_OK != (err = newcat_set_freq(rig,RIG_VFO_B,b_freq))) {
return err;
}
#if 0 #if 0
if (RIG_OK != (err = newcat_get_cmd (rig))) if (RIG_OK != (err = newcat_get_cmd (rig)))
return err; return err;