[Hamlib-commits] Hamlib -- Ham radio control libraries branch Hamlib-4.6.3 updated. 4.6.3-2-gcea177
Library to control radio transceivers and receivers
Brought to you by:
n0nb
|
From: n0nb <n0...@us...> - 2025-06-18 03:09:53
|
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, Hamlib-4.6.3 has been updated
via cea177f3959cb57673573273f839bea2450f93b5 (commit)
via b365b0afe0886d5b183e1739953f62f472b12631 (commit)
from 371db9ffd2ef86637ba31a1445edce2f24a36904 (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 cea177f3959cb57673573273f839bea2450f93b5
Author: Nate Bargmann <n0...@n0...>
Date: Tue Jun 17 22:06:42 2025 -0500
Update NEWS on Kenwood command terminator fix
diff --git a/NEWS b/NEWS
index 33f1da732..b3875a694 100644
--- a/NEWS
+++ b/NEWS
@@ -15,6 +15,12 @@ Version 5.x -- future
Version 4.7.0
* 2025-12-01 (target)
+Version 4.6.4
+ * 2025-07-08
+ * Fix handling of unprintable characters in kenwood.c that broke radios
+ such as the TM-D710/TM-V71 that use EOM_TH (\r) as the command terminator.
+ (TNX, Lars Kellogg-Stedman and George Baltz).
+
Version 4.6.3
* 2025-06-10
* Release dedicated to the memory of Michael Black, W9MDB (SK). Mike was a
commit b365b0afe0886d5b183e1739953f62f472b12631
Author: Lars Kellogg-Stedman <la...@od...>
Date: Tue Jun 17 22:04:23 2025 -0400
Un-break hamlib on TM-D710/TM-V71/etc
Commit d1e0e3f introduced a `remove_nonprint` method that breaks hamlib on
all TM-D710/TM-V71A devices by erroneously removing the command termination
character (`\r`).
This commit adopts a solution proposed by @GeoBaltz that only runs
`remove_nonprint` if the command termination character itself is printable.
Resolves: #1767 #1698
(cherry picked from commit 85c9e15eac641ddddad57fc4b1683becaa6d7e83)
diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c
index 45bd5012f..004a411b7 100644
--- a/rigs/kenwood/kenwood.c
+++ b/rigs/kenwood/kenwood.c
@@ -231,6 +231,12 @@ struct confparams kenwood_cfg_params[] =
{ RIG_CONF_END, NULL, }
};
+// This function removes non-printable characters from a buffer. This was
+// implemented to work around a problem reported with the uSDX transceiver
+// [1], which emulates the Kenwood TS-480 but apparently generates garbage
+// on the serial port in some situations.
+//
+// [1]: https://github.com/Hamlib/Hamlib/issues/1652
static int remove_nonprint(char *s)
{
int i, j = 0;
@@ -443,9 +449,14 @@ transaction_read:
rig_debug(RIG_DEBUG_TRACE, "%s: read_string len=%d '%s'\n", __func__,
(int)strlen(buffer), buffer);
- // this fixes the case when some corrupt data is returned
- // let's us be a little more robust about funky serial data
- remove_nonprint(buffer);
+ // This fixes the case when some corrupt data is returned; it lets us be a
+ // little more robust about funky serial data. If the terminator is
+ // printable(usually ';'), then there should be no nonprintables in the
+ // message; if it isn't (usually '\r') then don't touch the message.
+ if (isprint(caps->cmdtrm))
+ {
+ remove_nonprint(buffer);
+ }
if (retval < 0)
{
-----------------------------------------------------------------------
Summary of changes:
NEWS | 6 ++++++
rigs/kenwood/kenwood.c | 17 ++++++++++++++---
2 files changed, 20 insertions(+), 3 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|