kopia lustrzana https://github.com/Hamlib/Hamlib
Fix FT450 FB command to swap VFOs
rodzic
5a9daf5f0e
commit
c93da3c5d4
|
@ -991,8 +991,25 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
|
||||||
|
|
||||||
|
|
||||||
// cppcheck-suppress *
|
// cppcheck-suppress *
|
||||||
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "F%c%0*"PRIll"%c", c,
|
if (RIG_MODEL_FT450 == caps->rig_model)
|
||||||
priv->width_frequency, (int64_t)freq, cat_term);
|
{
|
||||||
|
if (c == 'B')
|
||||||
|
{
|
||||||
|
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "VS1;F%c%0*"PRIll"%c;VS0;", c,
|
||||||
|
priv->width_frequency, (int64_t)freq, cat_term);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "F%c%0*"PRIll"%c", c,
|
||||||
|
priv->width_frequency, (int64_t)freq, cat_term);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "F%c%0*"PRIll"%c", c,
|
||||||
|
priv->width_frequency, (int64_t)freq, cat_term);
|
||||||
|
}
|
||||||
|
|
||||||
rig_debug(RIG_DEBUG_TRACE, "%s:%d cmd_str = %s\n", __func__, __LINE__,
|
rig_debug(RIG_DEBUG_TRACE, "%s:%d cmd_str = %s\n", __func__, __LINE__,
|
||||||
priv->cmd_str);
|
priv->cmd_str);
|
||||||
|
|
||||||
|
@ -1279,7 +1296,7 @@ int newcat_set_vfo(RIG *rig, vfo_t vfo)
|
||||||
rig_strvfo(vfo));
|
rig_strvfo(vfo));
|
||||||
|
|
||||||
// we can't change VFO while transmitting
|
// we can't change VFO while transmitting
|
||||||
if (rig->state.cache.ptt == RIG_PTT_ON) return RIG_OK;
|
if (rig->state.cache.ptt == RIG_PTT_ON) { return RIG_OK; }
|
||||||
|
|
||||||
if (!newcat_valid_command(rig, command))
|
if (!newcat_valid_command(rig, command))
|
||||||
{
|
{
|
||||||
|
@ -9661,7 +9678,8 @@ int newcat_set_cmd_validate(RIG *rig)
|
||||||
// for the BS command we can only run it once
|
// for the BS command we can only run it once
|
||||||
// so we'll assume it worked
|
// so we'll assume it worked
|
||||||
// maybe Yaeus will make this command more intelligent
|
// maybe Yaeus will make this command more intelligent
|
||||||
if (strstr(priv->cmd_str,"BS")) return RIG_OK;
|
if (strstr(priv->cmd_str, "BS")) { return RIG_OK; }
|
||||||
|
|
||||||
// if the first two chars match we are validated
|
// if the first two chars match we are validated
|
||||||
if (strncmp(priv->cmd_str, "VS", 2) == 0
|
if (strncmp(priv->cmd_str, "VS", 2) == 0
|
||||||
&& strncmp(priv->cmd_str, priv->ret_data, 2) == 0) { RETURNFUNC(RIG_OK); }
|
&& strncmp(priv->cmd_str, priv->ret_data, 2) == 0) { RETURNFUNC(RIG_OK); }
|
||||||
|
|
Ładowanie…
Reference in New Issue