Change gs232a/b post_write_delay to 50ms

Add retry when > char is seen indicating ?> error response
https://github.com/Hamlib/Hamlib/issues/371
pull/453/head
Michael Black W9MDB 2020-12-02 07:48:21 -06:00
rodzic eb8082b1f8
commit 4f8de24873
2 zmienionych plików z 22 dodań i 9 usunięć

Wyświetl plik

@ -103,7 +103,13 @@ transaction_write:
retval = read_string(&rs->rotport, data, data_len, REPLY_EOM,
strlen(REPLY_EOM));
if (strncmp(data,"\r\n",2)==0) retval = -1;
if (strncmp(data,"\r\n",2) == 0
||strchr(data,'>'))
{
rig_debug(RIG_DEBUG_ERR,"%s: wrong response nbytes=%d\n", __func__, (int)strlen(data));
dump_hex((unsigned char*)data,strlen(data));
retval = -1; // force retry
}
if (retval < 0)
{
@ -294,7 +300,7 @@ const struct rot_caps gs23_rot_caps =
ROT_MODEL(ROT_MODEL_GS23),
.model_name = "GS-23",
.mfg_name = "Yaesu/Kenpro",
.version = "20201201.0",
.version = "20201202.0",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rot_type = ROT_TYPE_AZEL,
@ -306,7 +312,7 @@ const struct rot_caps gs23_rot_caps =
.serial_parity = RIG_PARITY_NONE,
.serial_handshake = RIG_HANDSHAKE_NONE,
.write_delay = 0,
.post_write_delay = 25,
.post_write_delay = 50,
.timeout = 400,
.retry = 3,
@ -330,7 +336,7 @@ const struct rot_caps gs232_rot_caps =
ROT_MODEL(ROT_MODEL_GS232),
.model_name = "GS-232",
.mfg_name = "Yaesu/Kenpro",
.version = "20201201.0",
.version = "20201202.0",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rot_type = ROT_TYPE_AZEL,
@ -342,7 +348,7 @@ const struct rot_caps gs232_rot_caps =
.serial_parity = RIG_PARITY_NONE,
.serial_handshake = RIG_HANDSHAKE_NONE,
.write_delay = 0,
.post_write_delay = 25,
.post_write_delay = 50,
.timeout = 400,
.retry = 3,
@ -378,7 +384,7 @@ const struct rot_caps gs232a_rot_caps =
.serial_parity = RIG_PARITY_NONE,
.serial_handshake = RIG_HANDSHAKE_NONE,
.write_delay = 0,
.post_write_delay = 25,
.post_write_delay = 50,
.timeout = 400,
.retry = 3,

Wyświetl plik

@ -110,7 +110,14 @@ transaction_write:
retval = read_string(&rs->rotport, data, data_len, REPLY_EOM,
strlen(REPLY_EOM));
if (strncmp(data,"\r\n",2)==0) retval = -1;
if (strncmp(data,"\r\n",2) == 0
||strchr(data,'>'))
{
rig_debug(RIG_DEBUG_ERR,"%s: wrong response nbytes=%d\n", __func__, (int)strlen(data));
dump_hex((unsigned char*)data,strlen(data));
retval = -1; // force retry
}
if (retval < 0)
{
@ -331,7 +338,7 @@ const struct rot_caps gs232b_rot_caps =
ROT_MODEL(ROT_MODEL_GS232B),
.model_name = "GS-232B",
.mfg_name = "Yaesu",
.version = "20201201.0",
.version = "20201202.0",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rot_type = ROT_TYPE_OTHER,
@ -343,7 +350,7 @@ const struct rot_caps gs232b_rot_caps =
.serial_parity = RIG_PARITY_NONE,
.serial_handshake = RIG_HANDSHAKE_NONE,
.write_delay = 0,
.post_write_delay = 25,
.post_write_delay = 50,
.timeout = 400,
.retry = 3,