kopia lustrzana https://github.com/Hamlib/Hamlib
Fix Yaesu command retriespull/369/head
rodzic
e459d4edc2
commit
a0ee4d01b2
|
@ -355,7 +355,7 @@ transaction_read:
|
|||
if (retval < 0)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_WARN,
|
||||
"%s: read_string retval < 0, retval = %d, retry_read=%d, retry=%d\n", __func__,
|
||||
"%s: read_string retval < 0, retval = %d, retry_read=%d, rs->rigport.retry=%d\n", __func__,
|
||||
retval, retry_read, rs->rigport.retry);
|
||||
|
||||
// only retry if we expect a response from the command
|
||||
|
@ -476,7 +476,8 @@ transaction_read:
|
|||
rig_debug(RIG_DEBUG_ERR, "%s: wrong reply %c%c for command %c%c\n",
|
||||
__func__, buffer[0], buffer[1], cmdstr[0], cmdstr[1]);
|
||||
|
||||
if (retry_read++ < rs->rigport.retry)
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: retry_read=%d, rs->rigport.retry=%d\n", __func__, retry_read, rs->rigport.retry);
|
||||
if (retry_read++ < rs->rigport.retry)
|
||||
{
|
||||
goto transaction_write;
|
||||
}
|
||||
|
@ -4220,6 +4221,8 @@ DECLARE_PROBERIG_BACKEND(kenwood)
|
|||
int retval = -1;
|
||||
int rates[] = { 115200, 57600, 38400, 19200, 9600, 4800, 1200, 0 }; /* possible baud rates */
|
||||
int rates_idx;
|
||||
int write_delay = port->write_delay;
|
||||
int retry = port->retry;
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
|
||||
|
||||
|
@ -4249,6 +4252,8 @@ DECLARE_PROBERIG_BACKEND(kenwood)
|
|||
|
||||
if (retval != RIG_OK)
|
||||
{
|
||||
port->write_delay = write_delay;
|
||||
port->retry = retry;
|
||||
return RIG_MODEL_NONE;
|
||||
}
|
||||
|
||||
|
@ -4264,6 +4269,8 @@ DECLARE_PROBERIG_BACKEND(kenwood)
|
|||
|
||||
if (retval != RIG_OK || id_len < 0 || !strcmp(idbuf, "ID;"))
|
||||
{
|
||||
port->write_delay = write_delay;
|
||||
port->retry = retry;
|
||||
return RIG_MODEL_NONE;
|
||||
}
|
||||
|
||||
|
@ -4276,6 +4283,8 @@ DECLARE_PROBERIG_BACKEND(kenwood)
|
|||
rig_debug(RIG_DEBUG_VERBOSE, "probe_kenwood: protocol error, "
|
||||
" expected %d, received %d: %s\n",
|
||||
6, id_len, idbuf);
|
||||
port->write_delay = write_delay;
|
||||
port->retry = retry;
|
||||
return RIG_MODEL_NONE;
|
||||
}
|
||||
|
||||
|
@ -4293,6 +4302,8 @@ DECLARE_PROBERIG_BACKEND(kenwood)
|
|||
(*cfunc)(port, kenwood_id_string_list[i].model, data);
|
||||
}
|
||||
|
||||
port->write_delay = write_delay;
|
||||
port->retry = retry;
|
||||
return kenwood_id_string_list[i].model;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include <string.h>
|
||||
#include "token.h"
|
||||
|
||||
#define BACKEND_VER "20200714"
|
||||
#define BACKEND_VER "20200901"
|
||||
|
||||
#define EOM_KEN ';'
|
||||
#define EOM_TH '\r'
|
||||
|
|
Ładowanie…
Reference in New Issue