[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. b25ba02aca830895fe63d
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: n0nb <n0...@us...> - 2025-06-18 02:58:30
|
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 b25ba02aca830895fe63d7aadbfd1918398e463e (commit) via 85c9e15eac641ddddad57fc4b1683becaa6d7e83 (commit) from aca0b2d1c63eb27b23ce376eaf630da169c17a0a (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 b25ba02aca830895fe63d7aadbfd1918398e463e Author: Nate Bargmann <n0...@n0...> Date: Tue Jun 17 21:47:59 2025 -0500 Update news on Kenwood command terminator fix diff --git a/NEWS b/NEWS index 19410006c..aee6e4b92 100644 --- a/NEWS +++ b/NEWS @@ -14,8 +14,11 @@ Version 5.x -- future Version 4.7.0 * 2025-12-01 (target) - * Reduce/repair excess output from cppcheck.sh - mostly cosmetic changes (WIP) - Output from `wc -l cppcheck.log` - 4.6.2: 981 now: 732 + * 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). + * Reduce/repair excess output from cppcheck.sh - mostly cosmetic changes (WIP) + Output from `wc -l cppcheck.log` - 4.6.2: 981 now: 732 * Remove dead getopt code. GitHub PR #1709. (TNX Daniele Forsi) * Move rig_cache to separate(calloc) storage. Prepare for other moves. Issue #1420 commit 85c9e15eac641ddddad57fc4b1683becaa6d7e83 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 diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index 1596c2dfe..435bedf4e 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 | 7 +++++-- rigs/kenwood/kenwood.c | 17 ++++++++++++++--- 2 files changed, 19 insertions(+), 5 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |