kopia lustrzana https://github.com/Hamlib/Hamlib
Merge branch 'master' of https://github.com/mdblack98/Hamlib
commit
1b6f84c1a5
|
@ -532,8 +532,8 @@ int kenwood_safe_transaction(RIG *rig, const char *cmd, char *buf,
|
|||
return -RIG_EINVAL;
|
||||
}
|
||||
|
||||
// if this is an IF; cmd and not the first time through check cache
|
||||
if (strncmp(cmd, "IF;", 3) == 0 && priv->cache_start.tv_sec != 0)
|
||||
// if this is an IF cmd and not the first time through check cache
|
||||
if (strcmp(cmd, "IF") == 0 && priv->cache_start.tv_sec != 0)
|
||||
{
|
||||
int cache_age_ms;
|
||||
|
||||
|
@ -548,15 +548,14 @@ int kenwood_safe_transaction(RIG *rig, const char *cmd, char *buf,
|
|||
|
||||
// else we drop through and do the real IF command
|
||||
}
|
||||
else if (cmd[2] != ';')
|
||||
|
||||
if (strlen(cmd) > 2)
|
||||
{
|
||||
// then we must be setting something so we'll invalidate the cache
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: cache invalidated\n", __func__);
|
||||
priv->cache_start.tv_sec = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
memset(buf, 0, buf_size);
|
||||
|
||||
if (expected == 0)
|
||||
|
|
|
@ -5943,7 +5943,7 @@ int newcat_get_cmd(RIG *rig)
|
|||
// this is for WSJT-X/JTDX sequence of v/f/m/t
|
||||
// should allow rapid repeat of any call using the IF; cmd
|
||||
// Any call that changes something in the IF response should invalidate the cache
|
||||
if (strncmp(priv->cmd_str, "IF;", 2) == 0 && priv->cache_start.tv_sec != 0)
|
||||
if (strcmp(priv->cmd_str, "IF;") == 0 && priv->cache_start.tv_sec != 0)
|
||||
{
|
||||
int cache_age_ms;
|
||||
|
||||
|
@ -5957,7 +5957,7 @@ int newcat_get_cmd(RIG *rig)
|
|||
}
|
||||
// we drop through and do the real IF command
|
||||
}
|
||||
else if (priv->cmd_str[2] != ';') // then we must be setting something so we'll invalidate the cache
|
||||
if (priv->cmd_str[2] != ';') // then we must be setting something so we'll invalidate the cache
|
||||
{
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: cache invalidated\n", __func__);
|
||||
priv->cache_start.tv_sec = 0;
|
||||
|
|
Ładowanie…
Reference in New Issue