kopia lustrzana https://github.com/Hamlib/Hamlib
Combine writes in newcat_set_cmd_validate to speed up timing
https://github.com/Hamlib/Hamlib/issues/505pull/518/head
rodzic
59df7ccc23
commit
c3ac828cdb
|
@ -9427,10 +9427,10 @@ int newcat_set_cmd_validate(RIG *rig)
|
||||||
while (rc != RIG_OK && retry++ < retries)
|
while (rc != RIG_OK && retry++ < retries)
|
||||||
{
|
{
|
||||||
int bytes;
|
int bytes;
|
||||||
|
char cmd[256]; // big enough
|
||||||
rig_flush(&state->rigport); /* discard any unsolicited data */
|
rig_flush(&state->rigport); /* discard any unsolicited data */
|
||||||
rc = write_block(&state->rigport, priv->cmd_str, strlen(priv->cmd_str));
|
snprintf(cmd,sizeof(cmd),"%s%s",priv->cmd_str,priv->valcmd);
|
||||||
if (rc != RIG_OK) return -RIG_EIO;
|
rc = write_block(&state->rigport, cmd, strlen(cmd));
|
||||||
rc = write_block(&state->rigport, valcmd, strlen(valcmd));
|
|
||||||
if (rc != RIG_OK) return -RIG_EIO;
|
if (rc != RIG_OK) return -RIG_EIO;
|
||||||
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));
|
||||||
|
|
Ładowanie…
Reference in New Issue