[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. c4e1deb8b6a97847bec30
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Michael B. <mdb...@us...> - 2020-12-03 05:49:41
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via c4e1deb8b6a97847bec30980d50436028cc626ce (commit) via e49dc2e1f5174574d46b8050bc7a98079e5f9b38 (commit) via 4f8de2487371a9c60041a88884b8a7aa3ccea539 (commit) from eb8082b1f882706f589b2d5ff605d9d130e597e4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit c4e1deb8b6a97847bec30980d50436028cc626ce Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Dec 2 23:47:30 2020 -0600 Add flushx parameter to rotctl https://github.com/Hamlib/Hamlib/issues/371 diff --git a/src/rot_conf.c b/src/rot_conf.c index 874bbc8d..9faa6aef 100644 --- a/src/rot_conf.c +++ b/src/rot_conf.c @@ -73,6 +73,12 @@ static const struct confparams rotfrontend_cfg_params[] = TOK_RETRY, "retry", "Retry", "Max number of retry", "0", RIG_CONF_NUMERIC, { .n = { 0, 10, 1 } } }, + { + TOK_FLUSHX, "flushx", "Flush with read instead of TCFLUSH", + "True enables flushing serial port with read instead of TCFLUSH -- MicroHam", + "0", RIG_CONF_CHECKBUTTON, { } + }, + { TOK_MIN_AZ, "min_az", "Minimum azimuth", @@ -296,6 +302,10 @@ int frontrot_set_conf(ROT *rot, token_t token, const char *val) break; + case TOK_FLUSHX: + rs->rotport.flushx = atoi(val); + break; + case TOK_MIN_AZ: rs->min_az = atof(val); break; commit e49dc2e1f5174574d46b8050bc7a98079e5f9b38 Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Dec 2 07:50:11 2020 -0600 astyle gs232a/gs232b diff --git a/rotators/gs232a/gs232a.c b/rotators/gs232a/gs232a.c index 81386a81..a6faf0c3 100644 --- a/rotators/gs232a/gs232a.c +++ b/rotators/gs232a/gs232a.c @@ -103,11 +103,12 @@ transaction_write: retval = read_string(&rs->rotport, data, data_len, REPLY_EOM, strlen(REPLY_EOM)); - if (strncmp(data,"\r\n",2) == 0 - ||strchr(data,'>')) + 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)); + 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 } diff --git a/rotators/gs232a/gs232b.c b/rotators/gs232a/gs232b.c index 7dc9c6a6..740a7af9 100644 --- a/rotators/gs232a/gs232b.c +++ b/rotators/gs232a/gs232b.c @@ -110,11 +110,12 @@ transaction_write: retval = read_string(&rs->rotport, data, data_len, REPLY_EOM, strlen(REPLY_EOM)); - if (strncmp(data,"\r\n",2) == 0 - ||strchr(data,'>')) + 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)); + 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 } commit 4f8de2487371a9c60041a88884b8a7aa3ccea539 Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Dec 2 07:48:21 2020 -0600 Change gs232a/b post_write_delay to 50ms Add retry when > char is seen indicating ?> error response https://github.com/Hamlib/Hamlib/issues/371 diff --git a/rotators/gs232a/gs232a.c b/rotators/gs232a/gs232a.c index a2ccd3f6..81386a81 100644 --- a/rotators/gs232a/gs232a.c +++ b/rotators/gs232a/gs232a.c @@ -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, diff --git a/rotators/gs232a/gs232b.c b/rotators/gs232a/gs232b.c index 143f3f02..7dc9c6a6 100644 --- a/rotators/gs232a/gs232b.c +++ b/rotators/gs232a/gs232b.c @@ -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, ----------------------------------------------------------------------- Summary of changes: rotators/gs232a/gs232a.c | 19 +++++++++++++------ rotators/gs232a/gs232b.c | 14 +++++++++++--- src/rot_conf.c | 10 ++++++++++ 3 files changed, 34 insertions(+), 9 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |