[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. b707b52481b9a43e480d9
Library to control radio transceivers and receivers
Brought to you by:
n0nb
|
From: n0nb <n0...@us...> - 2025-11-20 13:02:43
|
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 b707b52481b9a43e480d9e3b3fb19b445f0f5f52 (commit)
via 171ee2a619dc2cffe4c100ed315e5b4568f1fe5b (commit)
via 4505a2820e07fb055c43b7821f89ed55ee495732 (commit)
via 4f14c2db8b0b31451d59c9c33280268d681811df (commit)
via 2806ef56348f6d80e6be6aa7e0fc155362b92347 (commit)
via d98073833bbe95783fcf4d45bf76017728b17472 (commit)
from 6a89902b3501a788263b6133245582ce5609fe18 (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 b707b52481b9a43e480d9e3b3fb19b445f0f5f52
Author: George Baltz N3GB <Geo...@gm...>
Date: Wed Nov 19 06:23:31 2025 -0500
Oops. Fix extra "s.
diff --git a/doc/man1/rigctl.1 b/doc/man1/rigctl.1
index 00802cdc3..782a02da5 100644
--- a/doc/man1/rigctl.1
+++ b/doc/man1/rigctl.1
@@ -760,7 +760,7 @@ Have rig transmit internal message
.RI \(aq Msgnum \(aq
.
.TP
-.BR 0xab ", " stop_voice_mem "
+.BR 0xab ", " stop_voice_mem
Stop transmision of internal message
.
.TP
diff --git a/doc/man1/rigctld.1 b/doc/man1/rigctld.1
index 1ebc72c18..60adc7e39 100644
--- a/doc/man1/rigctld.1
+++ b/doc/man1/rigctld.1
@@ -779,7 +779,7 @@ Have rig transmit internal message
.RI \(aq Msgnum \(aq
.
.TP
-.BR 0xab ", " stop_voice_mem "
+.BR 0xab ", " stop_voice_mem
Stop transmission of internal message
.
.TP
commit 171ee2a619dc2cffe4c100ed315e5b4568f1fe5b
Author: George Baltz N3GB <Geo...@gm...>
Date: Tue Nov 18 17:43:12 2025 -0500
Update NEWS
diff --git a/NEWS b/NEWS
index 0a1c50f4f..bc9716936 100644
--- a/NEWS
+++ b/NEWS
@@ -14,6 +14,7 @@ Version 5.x -- future
Version 4.7.0
* 2025-12-01 (target)
+ * Revamp Kenwood voice memory handler - Fixes TS-890S & TS-990S (n3gb)
* libusb is now detected using the pkg-config facility.
* Some internal functions change names to avoid conflicts with apps.
* POSIX threads are required to build and run Hamlib. Note that it was
commit 4505a2820e07fb055c43b7821f89ed55ee495732
Author: George Baltz N3GB <Geo...@gm...>
Date: Tue Nov 18 16:24:39 2025 -0500
Renovate Kenwood voice memory handler
Remove all model references from kenwood_send voice_mem() and
kenwood_stop_voice_mem()
Remove (almost) all model tests from initialization code - # of
voice memories determined by entry in STATE(rig)->chan_list.
diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c
index 03b97a5e9..7929a8ae5 100644
--- a/rigs/kenwood/kenwood.c
+++ b/rigs/kenwood/kenwood.c
@@ -840,18 +840,20 @@ int kenwood_init(RIG *rig)
{
struct kenwood_priv_data *priv;
struct kenwood_priv_caps *caps = kenwood_caps(rig);
+ struct rig_state *rs = STATE(rig);
+ int i;
rig_debug(RIG_DEBUG_VERBOSE, "%s called, version %s/%s\n", __func__,
BACKEND_VER, rig->caps->version);
- STATE(rig)->priv = calloc(1, sizeof(struct kenwood_priv_data));
+ rs->priv = calloc(1, sizeof(struct kenwood_priv_data));
- if (STATE(rig)->priv == NULL)
+ if (rs->priv == NULL)
{
RETURNFUNC2(-RIG_ENOMEM);
}
- priv = STATE(rig)->priv;
+ priv = rs->priv;
if (RIG_IS_XG3)
{
@@ -907,6 +909,39 @@ int kenwood_init(RIG *rig)
kenwood_mode_table[8] = RIG_MODE_PKTUSB;
}
+ /* Set up voice memory parameters */
+ priv->voice_mem_max = -1;
+ for (i = 0; i < HAMLIB_CHANLSTSIZ && !RIG_IS_CHAN_END(rs->chan_list[i]); i++)
+ {
+ if (rs->chan_list[i].type == RIG_MTYPE_VOICE)
+ {
+ priv->voice_mem_min = rs->chan_list[i].startc;
+ priv->voice_mem_max = rs->chan_list[i].endc;
+ }
+ /* Do morse mem here */
+ }
+ if (priv->voice_mem_max > 0)
+ {
+ if (RIG_IS_TS890S || RIG_IS_TS990S)
+ {
+ /* The PB01 command displays the 'Voice Message List', and we don't turn it off;
+ turning it off also cancels the message(stupid firmware!), so it has to be on
+ for the duration.
+ Maybe someday there'll be a better way, but for now, if it bothers you just hit
+ the ESC button(bottom left)
+ */
+ priv->voice_mem_enable = "PB01";
+ priv->voice_mem_start = "PB1%d5";
+ priv->voice_mem_stop = "PB1%d0";
+ }
+ else
+ {
+ //priv->voice_mem_enable = NULL;
+ priv->voice_mem_start = "PB%d";
+ priv->voice_mem_stop = "PB0";
+ }
+ }
+
RETURNFUNC2(RIG_OK);
}
@@ -5648,40 +5683,19 @@ int kenwood_send_voice_mem(RIG *rig, vfo_t vfo, int bank)
struct kenwood_priv_data *priv = STATE(rig)->priv;
ENTERFUNC;
- if (RIG_IS_TS890S || RIG_IS_TS990S)
+ if (bank < priv->voice_mem_min || bank > priv->voice_mem_max)
{
- kenwood_transaction(rig, "PB01", NULL, 0);
- }
-
-
- if ((bank < 1 || bank > 3) &&
- (rig->caps->rig_model == RIG_MODEL_TS2000
- || rig->caps->rig_model == RIG_MODEL_TS480))
- {
- rig_debug(RIG_DEBUG_ERR, "%s: TS2000/TS480 channel is from 1 to 3\n", __func__);
+ rig_debug(RIG_DEBUG_ERR, "%s: Voice channels from %d to %d, %d out of range\n", __func__,
+ (int)priv->voice_mem_min, (int)priv->voice_mem_max, bank);
RETURNFUNC(-RIG_EINVAL);
}
- // some rigs have 5 channels -- newew ones have 10 channels
- if ((bank < 1 || bank > 5)
- && (rig->caps->rig_model == RIG_MODEL_TS590SG
- || rig->caps->rig_model == RIG_MODEL_TS590S))
+ if (priv->voice_mem_enable)
{
- rig_debug(RIG_DEBUG_ERR, "%s: TS590S/SG channel is from 1 to 5\n", __func__);
- RETURNFUNC(-RIG_EINVAL);
+ kenwood_transaction(rig, priv->voice_mem_enable, NULL, 0);
}
- if (rig->caps->rig_model == RIG_MODEL_TS2000
- || (rig->caps->rig_model == RIG_MODEL_TS480
- || (rig->caps->rig_model == RIG_MODEL_TS590SG
- || rig->caps->rig_model == RIG_MODEL_TS590S)))
- {
- SNPRINTF(cmd, sizeof(cmd), "PB%d", bank);
- }
- else
- {
- SNPRINTF(cmd, sizeof(cmd), "PB1%d5", bank);
- }
+ SNPRINTF(cmd, sizeof(cmd), priv->voice_mem_start, bank);
priv->voice_bank = bank;
RETURNFUNC(kenwood_transaction(rig, cmd, NULL, 0));
@@ -5692,17 +5706,10 @@ int kenwood_stop_voice_mem(RIG *rig, vfo_t vfo)
struct kenwood_priv_data *priv = STATE(rig)->priv;
ENTERFUNC;
- if (rig->caps->rig_model == RIG_MODEL_TS2000
- || (rig->caps->rig_model == RIG_MODEL_TS480
- || (rig->caps->rig_model == RIG_MODEL_TS590SG
- || rig->caps->rig_model == RIG_MODEL_TS590S)))
- {
- SNPRINTF(cmd, sizeof(cmd), "PB0");
- }
- else
- {
- SNPRINTF(cmd, sizeof(cmd), "PB1%d0", priv->voice_bank);
- }
+ if (!priv->voice_mem_stop) { RETURNFUNC(-RIG_EINTERNAL); }
+
+ // priv->voice_bank may be unused
+ SNPRINTF(cmd, sizeof(cmd), priv->voice_mem_stop, priv->voice_bank);
RETURNFUNC(kenwood_transaction(rig, cmd, NULL, 0));
}
diff --git a/rigs/kenwood/kenwood.h b/rigs/kenwood/kenwood.h
index d20168211..229bac445 100644
--- a/rigs/kenwood/kenwood.h
+++ b/rigs/kenwood/kenwood.h
@@ -184,6 +184,8 @@ struct kenwood_priv_data
int save_k2_ext_lvl; // so we can restore to original
int save_k3_ext_lvl; // so we can restore to original -- for future use if needed
int voice_bank; /* last voice bank send for use by stop_voice_mem */
+ short voice_mem_min, voice_mem_max; // Voice channel range
+ const char *voice_mem_enable, *voice_mem_start, *voice_mem_stop; // Commands to do the thing to do
rmode_t last_mode_pc; // last mode memory for PC command
int power_now,power_min,power_max;
};
commit 4f14c2db8b0b31451d59c9c33280268d681811df
Author: George Baltz N3GB <Geo...@gm...>
Date: Tue Nov 18 14:14:45 2025 -0500
Add missing 'stop_voice_mem' to man pages.
diff --git a/doc/man1/rigctl.1 b/doc/man1/rigctl.1
index 4dbe56bec..00802cdc3 100644
--- a/doc/man1/rigctl.1
+++ b/doc/man1/rigctl.1
@@ -760,6 +760,10 @@ Have rig transmit internal message
.RI \(aq Msgnum \(aq
.
.TP
+.BR 0xab ", " stop_voice_mem "
+Stop transmision of internal message
+.
+.TP
.BR 0x8b ", " get_dcd
Get
.RI \(aq DCD \(aq
diff --git a/doc/man1/rigctld.1 b/doc/man1/rigctld.1
index ce9bbe804..1ebc72c18 100644
--- a/doc/man1/rigctld.1
+++ b/doc/man1/rigctld.1
@@ -779,6 +779,10 @@ Have rig transmit internal message
.RI \(aq Msgnum \(aq
.
.TP
+.BR 0xab ", " stop_voice_mem "
+Stop transmission of internal message
+.
+.TP
.BR 0x8b ", " get_dcd
Get
.RI \(aq DCD \(aq
commit 2806ef56348f6d80e6be6aa7e0fc155362b92347
Author: George Baltz N3GB <Geo...@gm...>
Date: Mon Nov 17 16:24:45 2025 -0500
Update Kenwood rig caps for voice memories
diff --git a/rigs/kenwood/ts2000.c b/rigs/kenwood/ts2000.c
index d18b9216b..f3964393e 100644
--- a/rigs/kenwood/ts2000.c
+++ b/rigs/kenwood/ts2000.c
@@ -1753,6 +1753,7 @@ struct rig_caps ts2000_caps =
.chan_list = {
{ 0, 299, RIG_MTYPE_MEM, TS2000_MEM_CAP },
{ 1, 3, RIG_MTYPE_MORSE },
+ { 1, 3, RIG_MTYPE_VOICE }, // Only if DRU-3A installed
RIG_CHAN_END,
},
@@ -2011,6 +2012,7 @@ struct rig_caps sdrconsole_caps =
.chan_list = {
{ 0, 299, RIG_MTYPE_MEM, TS2000_MEM_CAP },
{ 1, 3, RIG_MTYPE_MORSE },
+ //{ 1, 3, RIG_MTYPE_VOICE }, // ??? Standard or optional ???
RIG_CHAN_END,
},
diff --git a/rigs/kenwood/ts480.c b/rigs/kenwood/ts480.c
index a96a4ab22..7cbed12a2 100644
--- a/rigs/kenwood/ts480.c
+++ b/rigs/kenwood/ts480.c
@@ -1349,6 +1349,11 @@ struct rig_caps ts480_caps =
.transceive = RIG_TRN_RIG,
.agc_level_count = 3,
.agc_levels = { RIG_AGC_OFF, RIG_AGC_FAST, RIG_AGC_SLOW },
+ .chan_list = {
+ { 1, 3, RIG_MTYPE_VOICE }, // Only if VGS-1 installed
+ { 1, 3, RIG_MTYPE_MORSE },
+ RIG_CHAN_END
+ },
.rx_range_list1 = {
{kHz(100), Hz(59999999), TS480_ALL_MODES, -1, -1, TS480_VFO},
diff --git a/rigs/kenwood/ts590.c b/rigs/kenwood/ts590.c
index 168f100a4..0e21aad82 100644
--- a/rigs/kenwood/ts590.c
+++ b/rigs/kenwood/ts590.c
@@ -1748,6 +1748,7 @@ struct rig_caps ts590_caps =
.chan_list = { /* TBC */
{ 0, 89, RIG_MTYPE_MEM, TS590_CHANNEL_CAPS },
{ 90, 99, RIG_MTYPE_EDGE, TS590_CHANNEL_CAPS },
+ { 1, 4, RIG_MTYPE_VOICE },
RIG_CHAN_END,
},
@@ -1919,6 +1920,8 @@ struct rig_caps ts590_caps =
.send_morse = kenwood_send_morse,
.stop_morse = kenwood_stop_morse,
.wait_morse = rig_wait_morse,
+ .send_voice_mem = kenwood_send_voice_mem,
+ .stop_voice_mem = kenwood_stop_voice_mem,
.set_mem = kenwood_set_mem,
.get_mem = kenwood_get_mem,
.vfo_ops = TS590_VFO_OPS,
@@ -1969,6 +1972,7 @@ struct rig_caps fx4_caps =
.chan_list = { /* TBC */
{ 0, 89, RIG_MTYPE_MEM, TS590_CHANNEL_CAPS },
{ 90, 99, RIG_MTYPE_EDGE, TS590_CHANNEL_CAPS },
+ { 1, 4, RIG_MTYPE_VOICE }, //??? Standard ???
RIG_CHAN_END,
},
@@ -2180,6 +2184,7 @@ struct rig_caps ts590sg_caps =
{ 0, 89, RIG_MTYPE_MEM, TS590_CHANNEL_CAPS },
{ 90, 99, RIG_MTYPE_EDGE, TS590_CHANNEL_CAPS },
{ 1, 3, RIG_MTYPE_MORSE },
+ { 1, 4, RIG_MTYPE_VOICE },
RIG_CHAN_END,
},
@@ -2350,6 +2355,8 @@ struct rig_caps ts590sg_caps =
.send_morse = kenwood_send_morse,
.stop_morse = kenwood_stop_morse,
.wait_morse = rig_wait_morse,
+ .send_voice_mem = kenwood_send_voice_mem,
+ .stop_voice_mem = kenwood_stop_voice_mem,
.set_mem = kenwood_set_mem,
.get_mem = kenwood_get_mem,
.vfo_ops = TS590_VFO_OPS,
commit d98073833bbe95783fcf4d45bf76017728b17472
Author: George Baltz N3GB <Geo...@gm...>
Date: Sun Nov 16 05:08:26 2025 -0500
Fix Kenwood voice memory
Thanks to Mike K6GTE and Not1MM, I finally found a contest logger that:
a) Runs native on Linux (Python)
b) Supports ARRL Sweepstakes
c) Fully supports TS-890S bells & whistles (via Hamlib)
Imagine my surprise and disappointment when Hamlib really didn't
drive the TS-890S voice keyer correctly.
This patch gets it going(limpimg). More to come to do it right.
diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c
index a2d05054c..03b97a5e9 100644
--- a/rigs/kenwood/kenwood.c
+++ b/rigs/kenwood/kenwood.c
@@ -5648,10 +5648,11 @@ int kenwood_send_voice_mem(RIG *rig, vfo_t vfo, int bank)
struct kenwood_priv_data *priv = STATE(rig)->priv;
ENTERFUNC;
-#if 0 // don't really need to turn on the list
- SNPRINTF(cmd, sizeof(cmd), "PB01");
- kenwood_transaction(rig, cmd, NULL, 0);
-#endif
+ if (RIG_IS_TS890S || RIG_IS_TS990S)
+ {
+ kenwood_transaction(rig, "PB01", NULL, 0);
+ }
+
if ((bank < 1 || bank > 3) &&
(rig->caps->rig_model == RIG_MODEL_TS2000
@@ -5679,13 +5680,12 @@ int kenwood_send_voice_mem(RIG *rig, vfo_t vfo, int bank)
}
else
{
- SNPRINTF(cmd, sizeof(cmd), "PB1%d1", bank);
+ SNPRINTF(cmd, sizeof(cmd), "PB1%d5", bank);
}
priv->voice_bank = bank;
RETURNFUNC(kenwood_transaction(rig, cmd, NULL, 0));
}
-
int kenwood_stop_voice_mem(RIG *rig, vfo_t vfo)
{
char cmd[16];
-----------------------------------------------------------------------
Summary of changes:
NEWS | 1 +
doc/man1/rigctl.1 | 4 +++
doc/man1/rigctld.1 | 4 +++
rigs/kenwood/kenwood.c | 89 +++++++++++++++++++++++++++-----------------------
rigs/kenwood/kenwood.h | 2 ++
rigs/kenwood/ts2000.c | 2 ++
rigs/kenwood/ts480.c | 5 +++
rigs/kenwood/ts590.c | 7 ++++
8 files changed, 73 insertions(+), 41 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|