[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 6a89902b3501a788263b6
Library to control radio transceivers and receivers
Brought to you by:
n0nb
|
From: n0nb <n0...@us...> - 2025-11-17 12:25:22
|
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 6a89902b3501a788263b6133245582ce5609fe18 (commit)
via 0bf9d6255bda68ebef4914c58baa15d0dd7a9021 (commit)
via acd4e6031eb5ee61c99dc56e9d914b4e1d3ccc37 (commit)
via 65be240130abab7d095cc1d2e31043d66d775f79 (commit)
from 55feb026fa0de001cd4306f90691f0b00214f04e (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 6a89902b3501a788263b6133245582ce5609fe18
Author: George Baltz N3GB <Geo...@gm...>
Date: Mon Nov 10 15:52:10 2025 -0500
Fix vfo name for IC-820H
Dunno about the FIXME: on the next line, but the IC-820H definitely
doesn't have a VFO C.
diff --git a/rigs/icom/ic820h.c b/rigs/icom/ic820h.c
index e4674d008..4f9550e93 100644
--- a/rigs/icom/ic820h.c
+++ b/rigs/icom/ic820h.c
@@ -28,7 +28,7 @@
#define IC820H_MODES (RIG_MODE_SSB|RIG_MODE_CW|RIG_MODE_FM)
-#define IC820H_VFO_ALL (RIG_VFO_A|RIG_VFO_C|RIG_VFO_MEM)
+#define IC820H_VFO_ALL (RIG_VFO_A|RIG_VFO_B|RIG_VFO_MEM)
/* FIXME: What about MAIN/SUB mode? And satellite mode? */
#define IC820H_VFO_OPS (RIG_OP_FROM_VFO|RIG_OP_TO_VFO|RIG_OP_CPY|RIG_OP_MCL)
commit 0bf9d6255bda68ebef4914c58baa15d0dd7a9021
Author: George Baltz N3GB <Geo...@gm...>
Date: Sat Nov 8 12:29:23 2025 -0500
Fix some typos
Use the correct VFO param instead of modes
Gets rid of a couple of very weird VFO entries.
diff --git a/rigs/barrett/4100.c b/rigs/barrett/4100.c
index 29d34f9a3..a97a2cde8 100644
--- a/rigs/barrett/4100.c
+++ b/rigs/barrett/4100.c
@@ -29,8 +29,8 @@
#define MAXCMDLEN 32
-//#define BARRETT4100 VFOS (RIG_VFO_A|RIG_VFO_MEM) // VFO_MEM eventually?
-#define BARRETT4100 VFOS (RIG_VFO_A)
+//#define BARRETT4100_VFOS (RIG_VFO_A|RIG_VFO_MEM) // VFO_MEM eventually?
+#define BARRETT4100_VFOS (RIG_VFO_A)
#define BARRETT4100_MODES (RIG_MODE_CW | RIG_MODE_SSB)
@@ -275,7 +275,7 @@ struct rig_caps barrett4100_caps =
.transceive = RIG_TRN_RIG,
.rx_range_list1 = {{
.startf = kHz(10), .endf = MHz(30), .modes = BARRETT4100_MODES,
- .low_power = -1, .high_power = -1, BARRETT4100_MODES, RIG_ANT_1
+ .low_power = -1, .high_power = -1, BARRETT4100_VFOS, RIG_ANT_1
},
RIG_FRNG_END,
},
diff --git a/rigs/mds/9710.c b/rigs/mds/9710.c
index 7abacdbdf..30130d39f 100644
--- a/rigs/mds/9710.c
+++ b/rigs/mds/9710.c
@@ -45,17 +45,17 @@ struct rig_caps mds_9710_caps =
.rx_range_list1 = {
{
.startf = MHz(800), .endf = MHz(880), .modes = MDS_ALL_MODES,
- .low_power = 0, .high_power = 0, MDS_ALL_MODES, RIG_ANT_1,
+ .low_power = 0, .high_power = 0, MDS_VFOS, RIG_ANT_1,
},
{
.startf = MHz(880), .endf = MHz(960), .modes = MDS_ALL_MODES,
- .low_power = 0, .high_power = 0, MDS_ALL_MODES, RIG_ANT_1,
+ .low_power = 0, .high_power = 0, MDS_VFOS, RIG_ANT_1,
},
RIG_FRNG_END,
},
.rx_range_list2 = {RIG_FRNG_END,},
.tx_range_list1 = {
- {MHz(380), MHz(530), MDS_ALL_MODES, W(.1), W(5), RIG_VFO_A, RIG_ANT_NONE},
+ {MHz(380), MHz(530), MDS_ALL_MODES, W(.1), W(5), MDS_VFOS, RIG_ANT_NONE},
RIG_FRNG_END,
},
// .tx_range_list2 = {RIG_FRNG_END,}
commit acd4e6031eb5ee61c99dc56e9d914b4e1d3ccc37
Author: George Baltz N3GB <Geo...@gm...>
Date: Fri Nov 7 05:57:15 2025 -0500
Remove (infinite) recursive call to rig_close()
diff --git a/rigs/barrett/4100.c b/rigs/barrett/4100.c
index b401bbe64..29d34f9a3 100644
--- a/rigs/barrett/4100.c
+++ b/rigs/barrett/4100.c
@@ -134,7 +134,7 @@ static int barrett4100_close(RIG *rig)
rig_debug(RIG_DEBUG_ERR, "%s(%d): result=%s\n", __func__, __LINE__, response);
}
- return rig_close(rig);
+ return retval;
}
int barrett4100_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
commit 65be240130abab7d095cc1d2e31043d66d775f79
Author: George Baltz N3GB <Geo...@gm...>
Date: Sun Oct 12 14:04:30 2025 -0400
Don't re-compute (twice!) the length of the verify command every time through
kenwood_transaction(), when it doesn't change after kenwood_open().
Remove redundant memset()
diff --git a/rigs/kenwood/ic10.c b/rigs/kenwood/ic10.c
index c1cab5029..97c4701cc 100644
--- a/rigs/kenwood/ic10.c
+++ b/rigs/kenwood/ic10.c
@@ -28,6 +28,8 @@
#include <ctype.h> /* character class tests */
#include "hamlib/rig.h"
+#include "hamlib/port.h"
+#include "hamlib/rig_state.h"
#include "iofunc.h"
#include "misc.h"
@@ -101,8 +103,8 @@ transaction:
char buffer[50];
const struct kenwood_priv_data *priv = STATE(rig)->priv;
- if (RIG_OK != (retval = write_block(rp,
- (unsigned char *) priv->verify_cmd, strlen(priv->verify_cmd))))
+ if (RIG_OK != (retval = write_block(rp, (unsigned char *)priv->verify_cmd,
+ priv->verify_cmd_len)))
{
return retval;
}
diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c
index c607ee4f0..a2d05054c 100644
--- a/rigs/kenwood/kenwood.c
+++ b/rigs/kenwood/kenwood.c
@@ -30,6 +30,8 @@
#include <ctype.h>
#include "hamlib/rig.h"
+#include "hamlib/port.h"
+#include "hamlib/rig_state.h"
#include "serial.h"
#include "register.h"
#include "cal.h"
@@ -431,8 +433,8 @@ transaction_write:
/* no reply expected so we need to write a command that always
gives a reply so we can read any error replies from the actual
command being sent without blocking */
- if (RIG_OK != (retval = write_block(rp,
- (unsigned char *) priv->verify_cmd, strlen(priv->verify_cmd))))
+ if (RIG_OK != (retval = write_block(rp, (unsigned char *)priv->verify_cmd,
+ priv->verify_cmd_len)))
{
goto transaction_quit;
}
@@ -443,7 +445,7 @@ transaction_read:
// this len/expected stuff is confusing -- logic in some places includes the semicolon
// so we add 1 to our read_string length to cover these cases
// eventually we should be able to get rid of this but requires testing all Kenwood rigs
- len = min(datasize ? datasize + 1 : strlen(priv->verify_cmd) + 48,
+ len = min(datasize ? datasize + 1 : priv->verify_cmd_len + 48,
KENWOOD_MAX_BUF_LEN);
retval = read_string(rp, (unsigned char *) buffer, len,
cmdtrm_str, strlen(cmdtrm_str), 0, 1);
@@ -851,12 +853,11 @@ int kenwood_init(RIG *rig)
priv = STATE(rig)->priv;
- memset(priv, 0x00, sizeof(struct kenwood_priv_data));
-
if (RIG_IS_XG3)
{
priv->verify_cmd[0] = caps->cmdtrm;
priv->verify_cmd[1] = '\0';
+ priv->verify_cmd_len = 1;
}
else
{
@@ -864,6 +865,7 @@ int kenwood_init(RIG *rig)
priv->verify_cmd[1] = 'D';
priv->verify_cmd[2] = caps->cmdtrm;
priv->verify_cmd[3] = '\0';
+ priv->verify_cmd_len = 3;
}
priv->split = RIG_SPLIT_OFF;
@@ -1049,6 +1051,7 @@ int kenwood_open(RIG *rig)
priv->verify_cmd[1] = 'A';
priv->verify_cmd[2] = caps->cmdtrm;
priv->verify_cmd[3] = '\0';
+ priv->verify_cmd_len = 3;
strcpy(id, "ID019"); /* fake a TS-2000 */
}
else
diff --git a/rigs/kenwood/kenwood.h b/rigs/kenwood/kenwood.h
index 36783db08..d20168211 100644
--- a/rigs/kenwood/kenwood.h
+++ b/rigs/kenwood/kenwood.h
@@ -155,6 +155,7 @@ struct kenwood_priv_data
int trn_state; /* AI state discovered at startup */
unsigned fw_rev_uint; /* firmware revision as a number 1.07 -> 107 */
char verify_cmd[4]; /* command used to verify set commands */
+ int verify_cmd_len; /* length of above command - set when cmd built */
int is_emulation; /* flag for TS-2000 emulations */
void *data; /* model specific data */
rmode_t curr_mode; /* used for is_emulation to avoid get_mode on VFOB */
diff --git a/rigs/kenwood/thd72.c b/rigs/kenwood/thd72.c
index 1abaf28e7..3feda3ac2 100644
--- a/rigs/kenwood/thd72.c
+++ b/rigs/kenwood/thd72.c
@@ -25,6 +25,7 @@
#include <math.h>
#include "hamlib/rig.h"
+#include "hamlib/rig_state.h"
#include "kenwood.h"
#include "th.h"
#include "misc.h"
@@ -150,6 +151,7 @@ int thd72_open(RIG *rig)
int ret;
struct kenwood_priv_data *priv = STATE(rig)->priv;
strcpy(priv->verify_cmd, "ID\r");
+ priv->verify_cmd_len = 3;
//ret = kenwood_transaction(rig, "", NULL, 0);
//DELAY;
diff --git a/rigs/kenwood/thd74.c b/rigs/kenwood/thd74.c
index ab1040a6a..401fcf55f 100644
--- a/rigs/kenwood/thd74.c
+++ b/rigs/kenwood/thd74.c
@@ -25,6 +25,7 @@
#include <math.h>
#include "hamlib/rig.h"
+#include "hamlib/rig_state.h"
#include "kenwood.h"
#include "th.h"
#include "misc.h"
@@ -159,6 +160,7 @@ int thd74_open(RIG *rig)
//struct kenwood_priv_data *priv = STATE(rig)->priv;
// this is already done in kenwood_init
//strcpy(priv->verify_cmd, "ID\r");
+ //priv->verify_cmd_len = 3;
//ret = kenwood_transaction(rig, "", NULL, 0);
-----------------------------------------------------------------------
Summary of changes:
rigs/barrett/4100.c | 8 ++++----
rigs/icom/ic820h.c | 2 +-
rigs/kenwood/ic10.c | 6 ++++--
rigs/kenwood/kenwood.c | 13 ++++++++-----
rigs/kenwood/kenwood.h | 1 +
rigs/kenwood/thd72.c | 2 ++
rigs/kenwood/thd74.c | 2 ++
rigs/mds/9710.c | 6 +++---
8 files changed, 25 insertions(+), 15 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|