kopia lustrzana https://github.com/Hamlib/Hamlib
Some Yaesu rigs like FT-DX101D will turn off split mode when setting mode of VFO_B
So, if we set mode on VFOB and we're in split we will query split after and reset if needed We query rather than relying on specific models to cover all such Yaesus that might exist https://github.com/Hamlib/Hamlib/issues/293pull/312/head
rodzic
b0a956df81
commit
8cad7b0a8f
|
@ -731,6 +731,7 @@ int newcat_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
|
|||
{
|
||||
struct newcat_priv_data *priv;
|
||||
int err;
|
||||
split_t split_save = rig->state.cache.split;
|
||||
|
||||
priv = (struct newcat_priv_data *)rig->state.priv;
|
||||
|
||||
|
@ -786,6 +787,22 @@ int newcat_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
|
|||
/* Set width after mode has been set */
|
||||
err = newcat_set_rx_bandwidth(rig, vfo, mode, width);
|
||||
|
||||
// some rigs if you set mode on VFOB it will turn off split
|
||||
// so if we started in split we query split and turn it back on if needed
|
||||
if (split_save)
|
||||
{
|
||||
split_t split;
|
||||
vfo_t tx_vfo;
|
||||
err = rig_get_split_vfo(rig, RIG_VFO_A, &split, &tx_vfo);
|
||||
|
||||
// we'll just reset to split to what we want if we need to
|
||||
if (!split)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: turning split back on...buggy rig\n", __func__);
|
||||
err = rig_set_split_vfo(rig, RIG_VFO_A, split_save, RIG_VFO_B);
|
||||
}
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -1504,6 +1521,7 @@ int newcat_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo)
|
|||
return err;
|
||||
}
|
||||
|
||||
// should this just return VFO_A/VFO_B?
|
||||
if (*tx_vfo != vfo)
|
||||
{
|
||||
*split = RIG_SPLIT_ON;
|
||||
|
@ -4787,6 +4805,7 @@ int newcat_set_tx_vfo(RIG *rig, vfo_t tx_vfo)
|
|||
// The DX101D returns FT0 when in split and not transmitting
|
||||
command = "ST";
|
||||
}
|
||||
|
||||
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);
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
typedef char ncboolean;
|
||||
|
||||
/* shared function version */
|
||||
#define NEWCAT_VER "20200611"
|
||||
#define NEWCAT_VER "20200614"
|
||||
|
||||
/* Hopefully large enough for future use, 128 chars plus '\0' */
|
||||
#define NEWCAT_DATA_LEN 129
|
||||
|
|
Ładowanie…
Reference in New Issue