Fix an issue presenting on the Yaesu FT-450(D)

this rig is prone to giving transitory busy responses to CAT commands,
the retry mechanism for set commands was looping rather than accepting
the results of  a successful command verification read.  This is fixed
and the notification trace message is reduced to a warning.
Hamlib-3.1
Bill Somerville 2016-08-23 09:44:19 +01:00
rodzic e1afcbd292
commit 4e76780242
1 zmienionych plików z 19 dodań i 12 usunięć

Wyświetl plik

@ -4445,10 +4445,10 @@ int newcat_set_cmd (RIG *rig)
return rc; return rc;
} }
/* skip validation if high throughput is needed */ /* skip validation if high throughput is needed */
if (priv->fast_set_commands == TRUE){ if (priv->fast_set_commands == TRUE){
return RIG_OK; return RIG_OK;
} }
/* send the verification command */ /* send the verification command */
rig_debug(RIG_DEBUG_TRACE, "cmd_str = %s\n", verify_cmd); rig_debug(RIG_DEBUG_TRACE, "cmd_str = %s\n", verify_cmd);
@ -4496,17 +4496,24 @@ int newcat_set_cmd (RIG *rig)
case '?': case '?':
/* Rig busy wait please */ /* Rig busy wait please */
rig_debug(RIG_DEBUG_ERR, "%s: Rig busy\n", __func__, priv->cmd_str); rig_debug(RIG_DEBUG_WARN, "%s: Rig busy - retrying\n", __func__, priv->cmd_str);
/* read the verify command reply */ /* read the verify command reply */
read_string(&state->rigport, priv->ret_data, sizeof(priv->ret_data), if ((rc = read_string(&state->rigport, priv->ret_data, sizeof(priv->ret_data),
&cat_term, sizeof(cat_term)); &cat_term, sizeof(cat_term))) > 0)
rig_debug(RIG_DEBUG_TRACE, "%s: read count = %d, ret_data = %s\n", {
__func__, rc, priv->ret_data); rig_debug(RIG_DEBUG_TRACE, "%s: read count = %d, ret_data = %s\n",
rc = -RIG_BUSBUSY; __func__, rc, priv->ret_data);
break; /* retry */ rc = RIG_OK; /* probably recovered and read verification */
}
else
{
/* probably a timeout */
rc = -RIG_BUSBUSY; /* retry */
}
break;
} }
} }
else if (RIG_OK == rc)
{ {
/* Check that response prefix and response termination is /* Check that response prefix and response termination is
correct - alternative is response is longer that the correct - alternative is response is longer that the