kopia lustrzana https://github.com/Hamlib/Hamlib
Allow an IF response to TX/RX for kenwood.c
https://github.com/Hamlib/Hamlib/issues/229pull/234/head
rodzic
e8ee703605
commit
39ea145365
|
@ -343,8 +343,8 @@ transaction_write:
|
||||||
}
|
}
|
||||||
|
|
||||||
transaction_read:
|
transaction_read:
|
||||||
/* allow one extra byte for terminator we don't return */
|
/* allow room for most any response */
|
||||||
len = min(datasize ? datasize + 1 : strlen(priv->verify_cmd) + 13,
|
len = min(datasize ? datasize + 1 : strlen(priv->verify_cmd) + 32,
|
||||||
KENWOOD_MAX_BUF_LEN);
|
KENWOOD_MAX_BUF_LEN);
|
||||||
retval = read_string(&rs->rigport, buffer, len, cmdtrm, strlen(cmdtrm));
|
retval = read_string(&rs->rigport, buffer, len, cmdtrm, strlen(cmdtrm));
|
||||||
rig_debug(RIG_DEBUG_TRACE, "%s: read_string(len=%d)='%s'\n", __func__,
|
rig_debug(RIG_DEBUG_TRACE, "%s: read_string(len=%d)='%s'\n", __func__,
|
||||||
|
@ -491,6 +491,15 @@ transaction_read:
|
||||||
__func__,
|
__func__,
|
||||||
priv->verify_cmd, buffer);
|
priv->verify_cmd, buffer);
|
||||||
|
|
||||||
|
// seems some rigs will send back an IF response to RX/TX when it changes the status
|
||||||
|
// normally RX/TX returns nothing when it's a null effect
|
||||||
|
// TS-950SDX is known to behave this way
|
||||||
|
if (strncmp(cmdstr,"RX",2)==0 || strncmp(cmdstr,"TX",2)==0) {
|
||||||
|
if (strncmp(priv->verify_cmd,"IF",2)==0) {
|
||||||
|
rig_debug(RIG_DEBUG_TRACE,"%s: RX/TX got IF response so we're good\n", __func__);
|
||||||
|
goto transaction_quit;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (priv->verify_cmd[0] != buffer[0]
|
if (priv->verify_cmd[0] != buffer[0]
|
||||||
|| (priv->verify_cmd[1] && priv->verify_cmd[1] != buffer[1]))
|
|| (priv->verify_cmd[1] && priv->verify_cmd[1] != buffer[1]))
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "token.h"
|
#include "token.h"
|
||||||
|
|
||||||
#define BACKEND_VER "20200427"
|
#define BACKEND_VER "20200428"
|
||||||
|
|
||||||
#define EOM_KEN ';'
|
#define EOM_KEN ';'
|
||||||
#define EOM_TH '\r'
|
#define EOM_TH '\r'
|
||||||
|
|
Ładowanie…
Reference in New Issue