kopia lustrzana https://github.com/Hamlib/Hamlib
rodzic
e57774cfde
commit
24a9fdcc94
|
@ -909,7 +909,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
|
||||||
// remove the split check here -- hopefully works OK
|
// remove the split check here -- hopefully works OK
|
||||||
//&& !rig->state.cache.split
|
//&& !rig->state.cache.split
|
||||||
// seems some rigs are problematic
|
// seems some rigs are problematic
|
||||||
&& !(is_ftdx3000)
|
// && !(is_ftdx3000)
|
||||||
// some rigs can't do BS command on 60M
|
// some rigs can't do BS command on 60M
|
||||||
// && !(is_ftdx3000 && newcat_band_index(freq) == 2)
|
// && !(is_ftdx3000 && newcat_band_index(freq) == 2)
|
||||||
&& !(is_ft2000 && newcat_band_index(freq) == 2)
|
&& !(is_ft2000 && newcat_band_index(freq) == 2)
|
||||||
|
@ -920,13 +920,21 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
|
||||||
{
|
{
|
||||||
if (rig->state.current_vfo != vfo)
|
if (rig->state.current_vfo != vfo)
|
||||||
{
|
{
|
||||||
// then we need to change vfos, BS, and change back
|
int vfo1 = 1, vfo2 = 0;
|
||||||
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "VS1;BS%02d;VS0;",
|
if (vfo == RIG_VFO_A || vfo == RIG_VFO_MAIN) {
|
||||||
newcat_band_index(freq));
|
vfo1 = 0;
|
||||||
|
vfo2 = 1;
|
||||||
if (vfo == RIG_VFO_A || vfo == RIG_VFO_MAIN)
|
}
|
||||||
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "VS0;BS%02d;VS1;",
|
// we need to change vfos, BS, and change back
|
||||||
newcat_band_index(freq));
|
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "VS%d;BS%02d",
|
||||||
|
vfo1, newcat_band_index(freq));
|
||||||
|
if (RIG_OK != (err = newcat_set_cmd(rig)))
|
||||||
|
{
|
||||||
|
rig_debug(RIG_DEBUG_ERR, "%s: Unexpected error with BS command#1=%s\n",
|
||||||
|
__func__, rigerror(err));
|
||||||
|
}
|
||||||
|
hl_usleep(50*1000); // wait for BS to do it's thing and swap back
|
||||||
|
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "VS%d;", vfo2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -936,9 +944,8 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
|
||||||
|
|
||||||
if (RIG_OK != (err = newcat_set_cmd(rig)))
|
if (RIG_OK != (err = newcat_set_cmd(rig)))
|
||||||
{
|
{
|
||||||
rig_debug(RIG_DEBUG_ERR, "%s: Unexpected error with BS command#1=%s\n",
|
rig_debug(RIG_DEBUG_ERR, "%s: Unexpected error with BS command#2=%s\n",
|
||||||
__func__,
|
__func__, rigerror(err));
|
||||||
rigerror(err));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0 // disable for testing
|
#if 0 // disable for testing
|
||||||
|
@ -979,7 +986,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
|
||||||
|
|
||||||
if (RIG_OK != (err = newcat_set_cmd(rig)))
|
if (RIG_OK != (err = newcat_set_cmd(rig)))
|
||||||
{
|
{
|
||||||
rig_debug(RIG_DEBUG_ERR, "%s: Unexpected error with BS command#2=%s\n",
|
rig_debug(RIG_DEBUG_ERR, "%s: Unexpected error with BS command#3=%s\n",
|
||||||
__func__,
|
__func__,
|
||||||
rigerror(err));
|
rigerror(err));
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
typedef char ncboolean;
|
typedef char ncboolean;
|
||||||
|
|
||||||
/* shared function version */
|
/* shared function version */
|
||||||
#define NEWCAT_VER "20210802"
|
#define NEWCAT_VER "20210805"
|
||||||
|
|
||||||
/* Hopefully large enough for future use, 128 chars plus '\0' */
|
/* Hopefully large enough for future use, 128 chars plus '\0' */
|
||||||
#define NEWCAT_DATA_LEN 129
|
#define NEWCAT_DATA_LEN 129
|
||||||
|
|
Ładowanie…
Reference in New Issue