kopia lustrzana https://github.com/Hamlib/Hamlib
Remove FA/FB validation from newcat.c
set_freq validtion is now done in rig.c so we can return to fire-and-forget https://github.com/Hamlib/Hamlib/issues/569pull/573/head
rodzic
9a6552c3cf
commit
318b437fa5
|
@ -694,7 +694,7 @@ int newcat_get_conf(RIG *rig, token_t token, char *val)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* rig_set_freq
|
* newcat_set_freq
|
||||||
*
|
*
|
||||||
* Set frequency for a given VFO
|
* Set frequency for a given VFO
|
||||||
* RIG_TARGETABLE_VFO
|
* RIG_TARGETABLE_VFO
|
||||||
|
@ -9671,13 +9671,16 @@ int newcat_set_cmd_validate(RIG *rig)
|
||||||
ENTERFUNC;
|
ENTERFUNC;
|
||||||
rig_debug(RIG_DEBUG_TRACE, "%s: priv->cmd_str=%s\n", __func__, priv->cmd_str);
|
rig_debug(RIG_DEBUG_TRACE, "%s: priv->cmd_str=%s\n", __func__, priv->cmd_str);
|
||||||
|
|
||||||
|
// For FA and FB rig.c now tries to verify the set_freq actually works
|
||||||
|
// Seem the FT-2000 can't do a FA set followed by an immediate read
|
||||||
|
// So we'll use the old "ID" to verify the command.
|
||||||
if ((strncmp(priv->cmd_str, "FA", 2) == 0) && (strlen(priv->cmd_str) > 3))
|
if ((strncmp(priv->cmd_str, "FA", 2) == 0) && (strlen(priv->cmd_str) > 3))
|
||||||
{
|
{
|
||||||
strcpy(valcmd, "FA;");
|
strcpy(valcmd, ""); // No validation done -- rig.c now does followup query
|
||||||
}
|
}
|
||||||
else if ((strncmp(priv->cmd_str, "FB", 2) == 0) && (strlen(priv->cmd_str) > 3))
|
else if ((strncmp(priv->cmd_str, "FB", 2) == 0) && (strlen(priv->cmd_str) > 3))
|
||||||
{
|
{
|
||||||
strcpy(valcmd, "FB;");
|
strcpy(valcmd, ""); // No validation done -- rig.c now does followup query
|
||||||
}
|
}
|
||||||
else if ((strncmp(priv->cmd_str, "MD", 2) == 0) && (strlen(priv->cmd_str) > 3))
|
else if ((strncmp(priv->cmd_str, "MD", 2) == 0) && (strlen(priv->cmd_str) > 3))
|
||||||
{
|
{
|
||||||
|
@ -9720,6 +9723,12 @@ int newcat_set_cmd_validate(RIG *rig)
|
||||||
bytes = read_string(&state->rigport, priv->ret_data, sizeof(priv->ret_data),
|
bytes = read_string(&state->rigport, priv->ret_data, sizeof(priv->ret_data),
|
||||||
&cat_term, sizeof(cat_term));
|
&cat_term, sizeof(cat_term));
|
||||||
|
|
||||||
|
// FA and FB success is now verified in rig.c with a followup query
|
||||||
|
// so no validation is needed
|
||||||
|
if (strncmp(priv->cmd_str, "FA", 2)==0 || strncmp(priv->cmd_str, "FB", 2))
|
||||||
|
{
|
||||||
|
return RIG_OK;
|
||||||
|
}
|
||||||
if (strncmp(priv->cmd_str, "FT", 2) == 0
|
if (strncmp(priv->cmd_str, "FT", 2) == 0
|
||||||
&& strncmp(priv->ret_data, "FT", 2) == 0)
|
&& strncmp(priv->ret_data, "FT", 2) == 0)
|
||||||
{
|
{
|
||||||
|
|
Ładowanie…
Reference in New Issue