[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 989623ec511e6f428aa89
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: n0nb <n0...@us...> - 2025-08-02 01:15: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 989623ec511e6f428aa8998e88df3f69f9e11d79 (commit) via b4eb1bdb12bd475927ec1c05d25a539eae5fa3df (commit) via 0c57ccad264d0f1b54a943795ab47ac199a08f27 (commit) via 094b5e741a63c7310983ee6e77da6d46de73c819 (commit) via 200b2aaecc89cfcfdce416d7f7a9439bd8758c2b (commit) via 6af3b3a94e55d69aad55f4a36818f41dec0aef05 (commit) via 5f78c54bae8502b3ec1e0f1c43643b7857b6e62f (commit) via f8c3d6b614597b8cc24c3b443a9fd1984ebf16a6 (commit) from a9ecd503294b60aed1874cd962c23a9655f3432d (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 989623ec511e6f428aa8998e88df3f69f9e11d79 Merge: b4eb1bdb1 0c57ccad2 Author: Nate Bargmann <n0...@n0...> Date: Fri Aug 1 18:31:38 2025 -0500 Merge GitHub PR #1824 commit b4eb1bdb12bd475927ec1c05d25a539eae5fa3df Author: Nate Bargmann <n0...@n0...> Date: Fri Aug 1 18:25:16 2025 -0500 Quell warning from clang This warning was seen on MacOS and on Debian 12 and 13 using clang: CC kenwood.lo kenwood.c:2293:9: warning: absolute value function 'abs' given an argument of type 'shortfreq_t' (aka 'long') but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value] 2293 | if (abs(rit) > 9999) { RETURNFUNC(-RIG_EINVAL); } | ^ kenwood.c:2293:9: note: use function 'labs' instead 2293 | if (abs(rit) > 9999) { RETURNFUNC(-RIG_EINVAL); } | ^~~ | labs 1 warning generated. Closes issue #1806 on GitHub diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index ccb13c65a..3d67090a7 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -2290,7 +2290,7 @@ int kenwood_set_rit_new(RIG *rig, vfo_t vfo, shortfreq_t rit) char rdbuf[10]; ENTERFUNC; - if (abs(rit) > 9999) { RETURNFUNC(-RIG_EINVAL); } + if (labs(rit) > 9999) { RETURNFUNC(-RIG_EINVAL); } retval = kenwood_get_rit_new(rig, vfo, &oldrit); if (retval != RIG_OK) { RETURNFUNC(retval); } if (rit == oldrit) // if the new value is the same commit 0c57ccad264d0f1b54a943795ab47ac199a08f27 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Tue Jul 29 23:26:34 2025 +0200 Add missing include file Otherwise it isn't added to the distribution archive created by "make distcheck". diff --git a/simulators/Makefile.am b/simulators/Makefile.am index 2c7cb7f04..b9d58619e 100644 --- a/simulators/Makefile.am +++ b/simulators/Makefile.am @@ -32,7 +32,7 @@ simkenwood_LDFLAGS = $(WINEXELDFLAGS) simyaesu_LDFLAGS = $(WINEXELDFLAGS) simid5100_LDFLAGS = $(WINEXELDFLAGS) -EXTRA_DIST = +EXTRA_DIST = sim.h # Support 'make check' target for simple tests #check_SCRIPTS = commit 094b5e741a63c7310983ee6e77da6d46de73c819 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Tue Jul 29 21:07:54 2025 +0200 Remove unused variables diff --git a/simulators/simic7000.c b/simulators/simic7000.c index 693971b7a..06673d9fa 100644 --- a/simulators/simic7000.c +++ b/simulators/simic7000.c @@ -60,7 +60,7 @@ void dumphex(const unsigned char *buf, int n) int frameGet(int fd, unsigned char *buf) { - int i = 0, n; + int i = 0; memset(buf, 0, BUFSIZE); unsigned char c; diff --git a/simulators/simtmd710.c b/simulators/simtmd710.c index 6cea1853b..9cd53ebc1 100644 --- a/simulators/simtmd710.c +++ b/simulators/simtmd710.c @@ -87,10 +87,7 @@ int openPort(char *comport) // doesn't matter for using pts devices int main(int argc, char *argv[]) { char buf[256]; - char *pbuf; int fd = openPort(argv[1]); - int freqa = 14074000, freqb = 140735000; - int modeA = 0; // , modeB = 0; while (1) { commit 200b2aaecc89cfcfdce416d7f7a9439bd8758c2b Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Tue Jul 29 20:56:29 2025 +0200 Remove unneeded typedef It's only used by Yeasu simulators. diff --git a/simulators/simelecraft.c b/simulators/simelecraft.c index 2ddcfab85..f52903254 100644 --- a/simulators/simelecraft.c +++ b/simulators/simelecraft.c @@ -38,27 +38,6 @@ int modea = 2; int modeb = 2; int ptt = 0; -// ID 0310 == 310, Must drop leading zero -typedef enum nc_rigid_e -{ - NC_RIGID_NONE = 0, - NC_RIGID_FT450 = 241, - NC_RIGID_FT450D = 244, - NC_RIGID_FT950 = 310, - NC_RIGID_FT891 = 135, - NC_RIGID_FT991 = 135, - NC_RIGID_FT2000 = 251, - NC_RIGID_FT2000D = 252, - NC_RIGID_FTDX1200 = 583, - NC_RIGID_FTDX9000D = 101, - NC_RIGID_FTDX9000Contest = 102, - NC_RIGID_FTDX9000MP = 103, - NC_RIGID_FTDX5000 = 362, - NC_RIGID_FTDX3000 = 460, - NC_RIGID_FTDX101D = 681, - NC_RIGID_FTDX101MP = 682 -} nc_rigid_t; - int getmyline(int fd, char *buf) { diff --git a/simulators/simelecraftk4.c b/simulators/simelecraftk4.c index 33399b91c..fae2f2cb7 100644 --- a/simulators/simelecraftk4.c +++ b/simulators/simelecraftk4.c @@ -39,27 +39,6 @@ int modeB = 2; int ptt = 0; // int freqa = 14074000, freqb = 14073500; -// ID 0310 == 310, Must drop leading zero -typedef enum nc_rigid_e -{ - NC_RIGID_NONE = 0, - NC_RIGID_FT450 = 241, - NC_RIGID_FT450D = 244, - NC_RIGID_FT950 = 310, - NC_RIGID_FT891 = 135, - NC_RIGID_FT991 = 135, - NC_RIGID_FT2000 = 251, - NC_RIGID_FT2000D = 252, - NC_RIGID_FTDX1200 = 583, - NC_RIGID_FTDX9000D = 101, - NC_RIGID_FTDX9000Contest = 102, - NC_RIGID_FTDX9000MP = 103, - NC_RIGID_FTDX5000 = 362, - NC_RIGID_FTDX3000 = 460, - NC_RIGID_FTDX101D = 681, - NC_RIGID_FTDX101MP = 682 -} nc_rigid_t; - int getmyline(int fd, char *buf) { diff --git a/simulators/simkenwood.c b/simulators/simkenwood.c index 208d3a464..daa7575f1 100644 --- a/simulators/simkenwood.c +++ b/simulators/simkenwood.c @@ -25,27 +25,6 @@ int filternum = 7; int datamode = 0; int vfo, vfo_tx, ptt, ptt_data, ptt_mic, ptt_tune; -// ID 0310 == 310, Must drop leading zero -typedef enum nc_rigid_e -{ - NC_RIGID_NONE = 0, - NC_RIGID_FT450 = 241, - NC_RIGID_FT450D = 244, - NC_RIGID_FT950 = 310, - NC_RIGID_FT891 = 135, - NC_RIGID_FT991 = 135, - NC_RIGID_FT2000 = 251, - NC_RIGID_FT2000D = 252, - NC_RIGID_FTDX1200 = 583, - NC_RIGID_FTDX9000D = 101, - NC_RIGID_FTDX9000Contest = 102, - NC_RIGID_FTDX9000MP = 103, - NC_RIGID_FTDX5000 = 362, - NC_RIGID_FTDX3000 = 460, - NC_RIGID_FTDX101D = 681, - NC_RIGID_FTDX101MP = 682 -} nc_rigid_t; - int getmyline(int fd, char *buf) { diff --git a/simulators/simpowersdr.c b/simulators/simpowersdr.c index b603ae0c3..a3701831c 100644 --- a/simulators/simpowersdr.c +++ b/simulators/simpowersdr.c @@ -26,27 +26,6 @@ int keyspd = 20; double alc = 0; int tx; -// ID 0310 == 310, Must drop leading zero -typedef enum nc_rigid_e -{ - NC_RIGID_NONE = 0, - NC_RIGID_FT450 = 241, - NC_RIGID_FT450D = 244, - NC_RIGID_FT950 = 310, - NC_RIGID_FT891 = 135, - NC_RIGID_FT991 = 135, - NC_RIGID_FT2000 = 251, - NC_RIGID_FT2000D = 252, - NC_RIGID_FTDX1200 = 583, - NC_RIGID_FTDX9000D = 101, - NC_RIGID_FTDX9000Contest = 102, - NC_RIGID_FTDX9000MP = 103, - NC_RIGID_FTDX5000 = 362, - NC_RIGID_FTDX3000 = 460, - NC_RIGID_FTDX101D = 681, - NC_RIGID_FTDX101MP = 682 -} nc_rigid_t; - int getmyline(int fd, char *buf) { diff --git a/simulators/simtmd700.c b/simulators/simtmd700.c index 2e6876a37..5bb363533 100644 --- a/simulators/simtmd700.c +++ b/simulators/simtmd700.c @@ -25,27 +25,6 @@ char modeB = '0'; int band = 0; int control = 1; -// ID 0310 == 310, Must drop leading zero -typedef enum nc_rigid_e -{ - NC_RIGID_NONE = 0, - NC_RIGID_FT450 = 241, - NC_RIGID_FT450D = 244, - NC_RIGID_FT950 = 310, - NC_RIGID_FT891 = 135, - NC_RIGID_FT991 = 135, - NC_RIGID_FT2000 = 251, - NC_RIGID_FT2000D = 252, - NC_RIGID_FTDX1200 = 583, - NC_RIGID_FTDX9000D = 101, - NC_RIGID_FTDX9000Contest = 102, - NC_RIGID_FTDX9000MP = 103, - NC_RIGID_FTDX5000 = 362, - NC_RIGID_FTDX3000 = 460, - NC_RIGID_FTDX101D = 681, - NC_RIGID_FTDX101MP = 682 -} nc_rigid_t; - int getmyline(int fd, char *buf) { diff --git a/simulators/simtmd710.c b/simulators/simtmd710.c index f00d5ae3b..6cea1853b 100644 --- a/simulators/simtmd710.c +++ b/simulators/simtmd710.c @@ -25,27 +25,6 @@ int filternum = 7; int datamode = 0; int vfo, vfo_tx, ptt, ptt_data, ptt_mic, ptt_tune; -// ID 0310 == 310, Must drop leading zero -typedef enum nc_rigid_e -{ - NC_RIGID_NONE = 0, - NC_RIGID_FT450 = 241, - NC_RIGID_FT450D = 244, - NC_RIGID_FT950 = 310, - NC_RIGID_FT891 = 135, - NC_RIGID_FT991 = 135, - NC_RIGID_FT2000 = 251, - NC_RIGID_FT2000D = 252, - NC_RIGID_FTDX1200 = 583, - NC_RIGID_FTDX9000D = 101, - NC_RIGID_FTDX9000Contest = 102, - NC_RIGID_FTDX9000MP = 103, - NC_RIGID_FTDX5000 = 362, - NC_RIGID_FTDX3000 = 460, - NC_RIGID_FTDX101D = 681, - NC_RIGID_FTDX101MP = 682 -} nc_rigid_t; - int getmyline(int fd, char *buf) { commit 6af3b3a94e55d69aad55f4a36818f41dec0aef05 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Tue Jul 29 19:33:36 2025 +0200 Remove DECLARE_INITRIG_BACKEND() This code is uneeded. diff --git a/rigs/commradio/commradio.c b/rigs/commradio/commradio.c index c14c20fb8..560419438 100644 --- a/rigs/commradio/commradio.c +++ b/rigs/commradio/commradio.c @@ -226,12 +226,3 @@ DECLARE_INITRIG_BACKEND(commradio) return (RIG_OK); } - -/* - * For some reason, I can't get this to even link without this function. - */ -DECLARE_PROBERIG_BACKEND(commradio) -{ - return (RIG_MODEL_NONE); -} - diff --git a/src/register.c b/src/register.c index 2169e192d..fd6419e57 100644 --- a/src/register.c +++ b/src/register.c @@ -154,7 +154,7 @@ static struct { RIG_MDS, RIG_BACKEND_MDS, RIG_FUNCNAMA(mds) }, { RIG_ANYTONE, RIG_BACKEND_ANYTONE, RIG_FUNCNAMA(anytone) }, { RIG_MOTOROLA, RIG_BACKEND_MOTOROLA, RIG_FUNCNAMA(motorola) }, - { RIG_COMMRADIO, RIG_BACKEND_COMMRADIO, RIG_FUNCNAM(commradio) }, + { RIG_COMMRADIO, RIG_BACKEND_COMMRADIO, RIG_FUNCNAMA(commradio) }, { 0, NULL }, /* end */ }; commit 5f78c54bae8502b3ec1e0f1c43643b7857b6e62f Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Tue Jul 29 19:18:49 2025 +0200 Remove DECLARE_INITRIG_BACKEND() Breaks rig_probe() for rigs probed later (eg. Kenwood). diff --git a/rigs/gomspace/gs100.c b/rigs/gomspace/gs100.c index 647d11d69..86782c90a 100644 --- a/rigs/gomspace/gs100.c +++ b/rigs/gomspace/gs100.c @@ -578,11 +578,4 @@ DECLARE_INITRIG_BACKEND(gomspace) return (RIG_OK); } - -/* Probe RIG backend function */ -DECLARE_PROBERIG_BACKEND(gomspace) -{ - return (RIG_MODEL_GS100); -} - /*----------------------------------------------------------------------------*/ diff --git a/src/register.c b/src/register.c index aa476412e..2169e192d 100644 --- a/src/register.c +++ b/src/register.c @@ -150,7 +150,7 @@ static struct { RIG_BARRETT, RIG_BACKEND_BARRETT, RIG_FUNCNAMA(barrett) }, { RIG_ELAD, RIG_BACKEND_ELAD, RIG_FUNCNAMA(elad) }, { RIG_CODAN, RIG_BACKEND_CODAN, RIG_FUNCNAMA(codan) }, - { RIG_GOMSPACE, RIG_BACKEND_GOMSPACE, RIG_FUNCNAM(gomspace) }, + { RIG_GOMSPACE, RIG_BACKEND_GOMSPACE, RIG_FUNCNAMA(gomspace) }, { RIG_MDS, RIG_BACKEND_MDS, RIG_FUNCNAMA(mds) }, { RIG_ANYTONE, RIG_BACKEND_ANYTONE, RIG_FUNCNAMA(anytone) }, { RIG_MOTOROLA, RIG_BACKEND_MOTOROLA, RIG_FUNCNAMA(motorola) }, commit f8c3d6b614597b8cc24c3b443a9fd1984ebf16a6 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Mon Jul 28 22:01:12 2025 +0200 Fix error messages diff --git a/simulators/simyaesu.c b/simulators/simyaesu.c index fe90cd422..cc57d818f 100644 --- a/simulators/simyaesu.c +++ b/simulators/simyaesu.c @@ -240,7 +240,7 @@ int main(int argc, char *argv[]) n = write(fd, buf, strlen(buf)); //printf("n=%d\n", n); - if (n <= 0) { perror("ID"); } + if (n <= 0) { perror("AI"); } } else if (strcmp(buf, "AI0;") == 0) { @@ -321,7 +321,7 @@ int main(int argc, char *argv[]) SNPRINTF(resp, sizeof(resp), "MD1%c;", modeB); n = write(fd, resp, strlen(resp)); - if (n < 0) { perror("MD0;"); } + if (n < 0) { perror("MD1;"); } } else if (strncmp(buf, "MD1", 3) == 0) { ----------------------------------------------------------------------- Summary of changes: rigs/commradio/commradio.c | 9 --------- rigs/gomspace/gs100.c | 7 ------- rigs/kenwood/kenwood.c | 2 +- simulators/Makefile.am | 2 +- simulators/simelecraft.c | 21 --------------------- simulators/simelecraftk4.c | 21 --------------------- simulators/simic7000.c | 2 +- simulators/simkenwood.c | 21 --------------------- simulators/simpowersdr.c | 21 --------------------- simulators/simtmd700.c | 21 --------------------- simulators/simtmd710.c | 24 ------------------------ simulators/simyaesu.c | 4 ++-- src/register.c | 4 ++-- 13 files changed, 7 insertions(+), 152 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |