hamlib-cvs-digest Mailing List for Ham Radio Control Libraries (Page 6)
Library to control radio transceivers and receivers
Brought to you by:
n0nb
You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(57) |
Nov
(27) |
Dec
(25) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(41) |
Feb
(101) |
Mar
(60) |
Apr
(32) |
May
(32) |
Jun
(198) |
Jul
(95) |
Aug
(60) |
Sep
(48) |
Oct
(96) |
Nov
(27) |
Dec
(222) |
2002 |
Jan
(180) |
Feb
(46) |
Mar
(68) |
Apr
(11) |
May
(36) |
Jun
(34) |
Jul
(113) |
Aug
(42) |
Sep
(71) |
Oct
(65) |
Nov
(116) |
Dec
(40) |
2003 |
Jan
(32) |
Feb
(92) |
Mar
(29) |
Apr
(102) |
May
(21) |
Jun
(34) |
Jul
(3) |
Aug
(60) |
Sep
(30) |
Oct
(62) |
Nov
(57) |
Dec
(33) |
2004 |
Jan
(28) |
Feb
(46) |
Mar
(16) |
Apr
(14) |
May
(31) |
Jun
(21) |
Jul
(10) |
Aug
(80) |
Sep
(42) |
Oct
(11) |
Nov
(28) |
Dec
(13) |
2005 |
Jan
(35) |
Feb
(26) |
Mar
(20) |
Apr
(118) |
May
(2) |
Jun
(5) |
Jul
|
Aug
|
Sep
(5) |
Oct
(1) |
Nov
(13) |
Dec
(1) |
2006 |
Jan
(9) |
Feb
(25) |
Mar
(22) |
Apr
(6) |
May
|
Jun
|
Jul
(2) |
Aug
(1) |
Sep
(3) |
Oct
(46) |
Nov
(13) |
Dec
(7) |
2007 |
Jan
(9) |
Feb
(14) |
Mar
(3) |
Apr
|
May
(6) |
Jun
(1) |
Jul
|
Aug
(11) |
Sep
(7) |
Oct
(8) |
Nov
(41) |
Dec
(3) |
2008 |
Jan
(27) |
Feb
(16) |
Mar
(13) |
Apr
(23) |
May
(39) |
Jun
(4) |
Jul
(7) |
Aug
(1) |
Sep
(13) |
Oct
(52) |
Nov
(44) |
Dec
(55) |
2009 |
Jan
(72) |
Feb
(69) |
Mar
|
Apr
|
May
|
Jun
(13) |
Jul
(1) |
Aug
(6) |
Sep
(15) |
Oct
(11) |
Nov
(31) |
Dec
(20) |
2010 |
Jan
(24) |
Feb
(21) |
Mar
(22) |
Apr
(40) |
May
(38) |
Jun
(4) |
Jul
(2) |
Aug
(22) |
Sep
(19) |
Oct
(14) |
Nov
(5) |
Dec
(8) |
2011 |
Jan
(14) |
Feb
(36) |
Mar
(6) |
Apr
|
May
|
Jun
(23) |
Jul
(13) |
Aug
(8) |
Sep
(7) |
Oct
|
Nov
(3) |
Dec
(9) |
2012 |
Jan
(17) |
Feb
(13) |
Mar
(10) |
Apr
|
May
(1) |
Jun
(14) |
Jul
(4) |
Aug
(12) |
Sep
(2) |
Oct
(24) |
Nov
(14) |
Dec
(2) |
2013 |
Jan
(4) |
Feb
(3) |
Mar
(3) |
Apr
(3) |
May
(10) |
Jun
(4) |
Jul
(7) |
Aug
|
Sep
(15) |
Oct
(5) |
Nov
(1) |
Dec
(2) |
2014 |
Jan
|
Feb
(8) |
Mar
(1) |
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
(3) |
Oct
(7) |
Nov
(6) |
Dec
(3) |
2015 |
Jan
(4) |
Feb
(5) |
Mar
(8) |
Apr
(8) |
May
(2) |
Jun
|
Jul
(4) |
Aug
(7) |
Sep
(8) |
Oct
|
Nov
(6) |
Dec
(4) |
2016 |
Jan
(6) |
Feb
(26) |
Mar
(3) |
Apr
(10) |
May
(6) |
Jun
(5) |
Jul
(1) |
Aug
(4) |
Sep
(3) |
Oct
(4) |
Nov
(3) |
Dec
(10) |
2017 |
Jan
(11) |
Feb
(11) |
Mar
(2) |
Apr
(1) |
May
(7) |
Jun
(2) |
Jul
(11) |
Aug
(9) |
Sep
(5) |
Oct
(5) |
Nov
(1) |
Dec
(2) |
2018 |
Jan
(5) |
Feb
(2) |
Mar
(19) |
Apr
(7) |
May
(11) |
Jun
(3) |
Jul
(4) |
Aug
(10) |
Sep
(2) |
Oct
(8) |
Nov
(6) |
Dec
(9) |
2019 |
Jan
(9) |
Feb
(6) |
Mar
(2) |
Apr
(4) |
May
(6) |
Jun
(9) |
Jul
(6) |
Aug
(3) |
Sep
(5) |
Oct
(2) |
Nov
(8) |
Dec
(9) |
2020 |
Jan
(15) |
Feb
(1) |
Mar
(18) |
Apr
(33) |
May
(43) |
Jun
(87) |
Jul
(45) |
Aug
(8) |
Sep
(43) |
Oct
(3) |
Nov
(5) |
Dec
(42) |
2021 |
Jan
(116) |
Feb
(40) |
Mar
(58) |
Apr
(48) |
May
(29) |
Jun
(2) |
Jul
|
Aug
(22) |
Sep
(18) |
Oct
(1) |
Nov
|
Dec
(3) |
2022 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
(1) |
May
(2) |
Jun
(1) |
Jul
|
Aug
(1) |
Sep
|
Oct
(6) |
Nov
(2) |
Dec
(9) |
2023 |
Jan
(10) |
Feb
|
Mar
|
Apr
(10) |
May
(3) |
Jun
(1) |
Jul
(2) |
Aug
(4) |
Sep
(1) |
Oct
|
Nov
(2) |
Dec
(3) |
2024 |
Jan
(4) |
Feb
(1) |
Mar
(2) |
Apr
(2) |
May
(5) |
Jun
(3) |
Jul
(1) |
Aug
(2) |
Sep
|
Oct
(2) |
Nov
(3) |
Dec
(9) |
2025 |
Jan
(5) |
Feb
(5) |
Mar
|
Apr
(10) |
May
(20) |
Jun
(43) |
Jul
(24) |
Aug
(47) |
Sep
(38) |
Oct
(4) |
Nov
|
Dec
|
From: n0nb <n0...@us...> - 2025-06-23 13:15: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, master has been updated via dc12b01aed6b4449e42ff57e71f3687b1b837a20 (commit) from 1441ce18391beece4e4b65036da911e6d55fd409 (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 dc12b01aed6b4449e42ff57e71f3687b1b837a20 Author: markjfine <mar...@fi...> Date: Mon Jun 23 01:25:09 2025 -0400 Correct powerstat check The R75 for some reason rejects the powerstat query and returns an error. Commented out .get_powerstat to correct that. Applications should initially assume it's on, then internally track power status, since you can still turn it off. diff --git a/rigs/icom/icr75.c b/rigs/icom/icr75.c index 1644ecdc5..5b423a141 100644 --- a/rigs/icom/icr75.c +++ b/rigs/icom/icr75.c @@ -245,7 +245,7 @@ struct rig_caps icr75_caps = .scan = icom_scan, .set_ts = icom_set_ts, .set_powerstat = icom_set_powerstat, - .get_powerstat = icom_get_powerstat, + //.get_powerstat = icom_get_powerstat, .set_channel = icr75_set_channel, .get_channel = icr75_get_channel, ----------------------------------------------------------------------- Summary of changes: rigs/icom/icr75.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-06-21 15:27:01
|
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 b34695aab8dc7865620676a28ee7bbe7dc67fd3e (commit) via 7127d887833d8c9dbc22ddb46d3ad10c514c41a1 (commit) via 7b8ce52a9ea5bf0e5df18167253e461e429fefcb (commit) via c7cf8593172a03892576268aa7d2124a8af8f740 (commit) from 619cf9fc0d3de8f31fc9d30c8199898c5a91be94 (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 b34695aab8dc7865620676a28ee7bbe7dc67fd3e Author: Nate Bargmann <n0...@n0...> Date: Sat Jun 21 10:22:50 2025 -0500 Update NEWS for rigctld seperator character fix. diff --git a/NEWS b/NEWS index b8cc0fb05..5e2a8ac30 100644 --- a/NEWS +++ b/NEWS @@ -21,6 +21,8 @@ Version 4.6.4 such as the TM-D710/TM-V71 that use EOM_TH (\r) as the command terminator. (TNX, Lars Kellogg-Stedman and George Baltz). * Fixed jrc_set_chan. (TNX Mark Fine). + * Fix memory leak in rigctl_parse.c and use unique separator character + for each rigctld connection--closes GitHub #1748. (TNX George Baltz). Version 4.6.3 * 2025-06-10 commit 7127d887833d8c9dbc22ddb46d3ad10c514c41a1 Author: George Baltz N3GB <Geo...@gm...> Date: Sat Jun 21 04:31:31 2025 -0400 Make separator character local to rigctld connection Response to rigctld command was being corrupted by other threads Fixes issue #1748 (cherry picked from commit 8d0e67f0173d1cd7131c1235997105204cc48dbd) diff --git a/tests/rigctld.c b/tests/rigctld.c index c0754acb6..9200feec7 100644 --- a/tests/rigctld.c +++ b/tests/rigctld.c @@ -1251,6 +1251,7 @@ void *handle_socket(void *arg) char serv[NI_MAXSERV]; char send_cmd_term = '\r'; /* send_cmd termination char */ int ext_resp = 0; + char my_resp_sep = resp_sep; // Separator for this connection, initial default rig_powerstat = RIG_POWER_ON; // defaults to power on struct timespec powerstat_check_time; @@ -1299,7 +1300,7 @@ void *handle_socket(void *arg) #else mutex_rigctld(1); retcode = rig_open(my_rig); - mutex_rigctld(1); + mutex_rigctld(0); if (RIG_OK == retcode && verbose > RIG_DEBUG_ERR) { @@ -1340,8 +1341,8 @@ void *handle_socket(void *arg) __func__, handle_data_arg->vfo_mode, handle_data_arg->use_password); retcode = rigctl_parse(handle_data_arg->rig, fsockin, fsockout, NULL, 0, - mutex_rigctld, - 1, 0, &handle_data_arg->vfo_mode, send_cmd_term, &ext_resp, &resp_sep, + mutex_rigctld, 1, 0, &handle_data_arg->vfo_mode, + send_cmd_term, &ext_resp, &my_resp_sep, handle_data_arg->use_password); if (retcode != 0) { rig_debug(RIG_DEBUG_VERBOSE, "%s: rigctl_parse retcode=%d\n", __func__, retcode); } commit 7b8ce52a9ea5bf0e5df18167253e461e429fefcb Author: George Baltz N3GB <Geo...@gm...> Date: Fri Jun 20 17:36:03 2025 -0400 Add -S to rigctld man page (cherry picked from commit 65d922ce536dd0001fc690e7a6a2e59f334f3cb8) diff --git a/doc/man1/rigctld.1 b/doc/man1/rigctld.1 index b8bd84949..2a8847ec2 100644 --- a/doc/man1/rigctld.1 +++ b/doc/man1/rigctld.1 @@ -25,6 +25,7 @@ rigctld \- TCP radio control daemon .OP \-D type .OP \-s baud .OP \-c id +.OP \-S char .OP \-T IPADDR .OP \-t number .OP \-C parm=val commit c7cf8593172a03892576268aa7d2124a8af8f740 Author: George Baltz N3GB <Geo...@gm...> Date: Thu Jun 19 11:34:35 2025 -0400 Fix memory leak in rigctl_parse.c strip_quotes() orphaned 1 or 2 strings per call. (cherry picked from commit 0740af61a37f7ae2a350ae2d1c4151c07849b6c3) diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index b17060fc3..f67d7d179 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -497,9 +497,9 @@ void hash_delete_all() // modifies s to remove quotes -void strip_quotes(char *s) +static void strip_quotes(char *s) { - char *s2 = strdup(s); + char *s2; char *p; if (s[0] != '\"') { return; } // no quotes @@ -510,6 +510,7 @@ void strip_quotes(char *s) if (p) { *p = 0; } strcpy(s, s2); + free(s2); } #ifdef HAVE_LIBREADLINE ----------------------------------------------------------------------- Summary of changes: NEWS | 2 ++ doc/man1/rigctld.1 | 1 + tests/rigctl_parse.c | 5 +++-- tests/rigctld.c | 7 ++++--- 4 files changed, 10 insertions(+), 5 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-06-21 15:17:37
|
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 8d0e67f0173d1cd7131c1235997105204cc48dbd (commit) via 65d922ce536dd0001fc690e7a6a2e59f334f3cb8 (commit) via 0740af61a37f7ae2a350ae2d1c4151c07849b6c3 (commit) from aa39d6a618c82bb0482098fefd2cfddb7bd7ee61 (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 8d0e67f0173d1cd7131c1235997105204cc48dbd Author: George Baltz N3GB <Geo...@gm...> Date: Sat Jun 21 04:31:31 2025 -0400 Make separator character local to rigctld connection Response to rigctld command was being corrupted by other threads Fixes issue #1748 diff --git a/tests/rigctld.c b/tests/rigctld.c index a57ab497b..8d2f266c9 100644 --- a/tests/rigctld.c +++ b/tests/rigctld.c @@ -1161,6 +1161,7 @@ void *handle_socket(void *arg) char serv[NI_MAXSERV]; char send_cmd_term = '\r'; /* send_cmd termination char */ int ext_resp = 0; + char my_resp_sep = resp_sep; // Separator for this connection, initial default rig_powerstat = RIG_POWER_ON; // defaults to power on struct timespec powerstat_check_time; @@ -1209,7 +1210,7 @@ void *handle_socket(void *arg) #else mutex_rigctld(1); retcode = rig_open(my_rig); - mutex_rigctld(1); + mutex_rigctld(0); if (RIG_OK == retcode && verbose > RIG_DEBUG_ERR) { @@ -1250,8 +1251,8 @@ void *handle_socket(void *arg) __func__, handle_data_arg->vfo_mode, handle_data_arg->use_password); retcode = rigctl_parse(handle_data_arg->rig, fsockin, fsockout, NULL, 0, - mutex_rigctld, - 1, 0, &handle_data_arg->vfo_mode, send_cmd_term, &ext_resp, &resp_sep, + mutex_rigctld, 1, 0, &handle_data_arg->vfo_mode, + send_cmd_term, &ext_resp, &my_resp_sep, handle_data_arg->use_password); if (retcode != 0) { rig_debug(RIG_DEBUG_VERBOSE, "%s: rigctl_parse retcode=%d\n", __func__, retcode); } commit 65d922ce536dd0001fc690e7a6a2e59f334f3cb8 Author: George Baltz N3GB <Geo...@gm...> Date: Fri Jun 20 17:36:03 2025 -0400 Add -S to rigctld man page diff --git a/doc/man1/rigctld.1 b/doc/man1/rigctld.1 index b8bd84949..2a8847ec2 100644 --- a/doc/man1/rigctld.1 +++ b/doc/man1/rigctld.1 @@ -25,6 +25,7 @@ rigctld \- TCP radio control daemon .OP \-D type .OP \-s baud .OP \-c id +.OP \-S char .OP \-T IPADDR .OP \-t number .OP \-C parm=val commit 0740af61a37f7ae2a350ae2d1c4151c07849b6c3 Author: George Baltz N3GB <Geo...@gm...> Date: Thu Jun 19 11:34:35 2025 -0400 Fix memory leak in rigctl_parse.c strip_quotes() orphaned 1 or 2 strings per call. diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index e551db06d..92872ab98 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -497,9 +497,9 @@ void hash_delete_all() // modifies s to remove quotes -void strip_quotes(char *s) +static void strip_quotes(char *s) { - char *s2 = strdup(s); + char *s2; char *p; if (s[0] != '\"') { return; } // no quotes @@ -510,6 +510,7 @@ void strip_quotes(char *s) if (p) { *p = 0; } strcpy(s, s2); + free(s2); } #ifdef HAVE_LIBREADLINE ----------------------------------------------------------------------- Summary of changes: doc/man1/rigctld.1 | 1 + tests/rigctl_parse.c | 5 +++-- tests/rigctld.c | 7 ++++--- 3 files changed, 8 insertions(+), 5 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-06-21 02:32:18
|
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 619cf9fc0d3de8f31fc9d30c8199898c5a91be94 (commit) via 7d2e82886130070e6680d60d8d9596c697cb9c08 (commit) from cea177f3959cb57673573273f839bea2450f93b5 (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 619cf9fc0d3de8f31fc9d30c8199898c5a91be94 Author: Nate Bargmann <n0...@n0...> Date: Fri Jun 20 21:30:24 2025 -0500 Update NEWS for jrc_set_chan diff --git a/NEWS b/NEWS index b3875a694..b8cc0fb05 100644 --- a/NEWS +++ b/NEWS @@ -20,6 +20,7 @@ Version 4.6.4 * 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). + * Fixed jrc_set_chan. (TNX Mark Fine). Version 4.6.3 * 2025-06-10 commit 7d2e82886130070e6680d60d8d9596c697cb9c08 Author: markjfine <mar...@fi...> Date: Fri Jun 20 18:03:22 2025 -0400 Fixed jrc_set_chan set_chan() was correctly creating and sending the command, and returning RIG_OK. However, radio was actually ignoring it because command wasn't terminated with a CR. This is now corrected. (cherry picked from commit aa39d6a618c82bb0482098fefd2cfddb7bd7ee61) diff --git a/rigs/jrc/jrc.c b/rigs/jrc/jrc.c index 40cd79ff0..fb42ac05a 100644 --- a/rigs/jrc/jrc.c +++ b/rigs/jrc/jrc.c @@ -1459,6 +1459,8 @@ int jrc_set_chan(RIG *rig, vfo_t vfo, const channel_t *chan) chan->levels[rig_setting2idx(RIG_LEVEL_AGC)].i); } + cmdbuf[priv->mem_len - 1] = 0x0d; + return jrc_transaction(rig, cmdbuf, strlen(cmdbuf), NULL, NULL); } ----------------------------------------------------------------------- Summary of changes: NEWS | 1 + rigs/jrc/jrc.c | 2 ++ 2 files changed, 3 insertions(+) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-06-21 02:26:32
|
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 aa39d6a618c82bb0482098fefd2cfddb7bd7ee61 (commit) from b25ba02aca830895fe63d7aadbfd1918398e463e (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 aa39d6a618c82bb0482098fefd2cfddb7bd7ee61 Author: markjfine <mar...@fi...> Date: Fri Jun 20 18:03:22 2025 -0400 Fixed jrc_set_chan set_chan() was correctly creating and sending the command, and returning RIG_OK. However, radio was actually ignoring it because command wasn't terminated with a CR. This is now corrected. diff --git a/rigs/jrc/jrc.c b/rigs/jrc/jrc.c index 40cd79ff0..fb42ac05a 100644 --- a/rigs/jrc/jrc.c +++ b/rigs/jrc/jrc.c @@ -1459,6 +1459,8 @@ int jrc_set_chan(RIG *rig, vfo_t vfo, const channel_t *chan) chan->levels[rig_setting2idx(RIG_LEVEL_AGC)].i); } + cmdbuf[priv->mem_len - 1] = 0x0d; + return jrc_transaction(rig, cmdbuf, strlen(cmdbuf), NULL, NULL); } ----------------------------------------------------------------------- Summary of changes: rigs/jrc/jrc.c | 2 ++ 1 file changed, 2 insertions(+) hooks/post-receive -- Hamlib -- Ham radio control libraries |
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 |
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 |
From: n0nb <n0...@us...> - 2025-06-16 01:14:26
|
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 aca0b2d1c63eb27b23ce376eaf630da169c17a0a (commit) from 07d0d91a440ba2fc43aae326f9bcb228e14d23fc (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 aca0b2d1c63eb27b23ce376eaf630da169c17a0a Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Jun 15 23:18:24 2025 +0200 Ignore files generated when building for Windows diff --git a/.gitignore b/.gitignore index 5da00dd4e..29c1e9bbc 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ .dirstamp .libs/ *~ +*.exe *.o *.lo *.la @@ -42,6 +43,7 @@ doc/stamp-vti doc/hamlib.html doc/version.texi hamlib-*.tar.gz +hamlib-*.zip include/hamlib/config.h include/hamlib/config.h.in include/stamp-h1 ----------------------------------------------------------------------- Summary of changes: .gitignore | 2 ++ 1 file changed, 2 insertions(+) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-06-15 18:41:15
|
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 07d0d91a440ba2fc43aae326f9bcb228e14d23fc (commit) via 49e65de2031559c47b9b1d61692916704b93a45e (commit) from bddd3ace002ede56a26741838f5e11157ab7ef0d (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 07d0d91a440ba2fc43aae326f9bcb228e14d23fc Author: George Baltz N3GB <Geo...@gm...> Date: Sun Jun 15 13:52:09 2025 -0400 Yet more cppcheck messages silenced. diff --git a/rigs/dummy/dummy.c b/rigs/dummy/dummy.c index edf4155bc..ff6db275d 100644 --- a/rigs/dummy/dummy.c +++ b/rigs/dummy/dummy.c @@ -353,10 +353,7 @@ static int dummy_cleanup(RIG *rig) free(priv->ext_parms); free(priv->magic_conf); - if (rs->priv) - { - free(rs->priv); - } + free(priv); rs->priv = NULL; diff --git a/rigs/icom/frame.c b/rigs/icom/frame.c index b7c6c817c..8de1a7b0f 100644 --- a/rigs/icom/frame.c +++ b/rigs/icom/frame.c @@ -124,7 +124,7 @@ int icom_frame_fix_preamble(int frame_len, unsigned char *frame) * return RIG_OK if transaction completed, * or a negative value otherwise indicating the error. */ -int icom_one_transaction(RIG *rig, unsigned char cmd, int subcmd, +static int icom_one_transaction(RIG *rig, unsigned char cmd, int subcmd, const unsigned char *payload, int payload_len, unsigned char *data, int *data_len) { diff --git a/rigs/icom/icf8101.c b/rigs/icom/icf8101.c index a94769cff..127b30df2 100644 --- a/rigs/icom/icf8101.c +++ b/rigs/icom/icf8101.c @@ -190,7 +190,7 @@ static const struct icom_priv_caps icf8101_priv_caps = .r2i_mode = icf8101_r2i_mode }; -int icf8101_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) +static int icf8101_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) { switch (func) { @@ -199,7 +199,7 @@ int icf8101_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) } } -int icf8101_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status) +static int icf8101_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status) { switch (func) { @@ -208,7 +208,7 @@ int icf8101_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status) } } -int icf8101_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) +static int icf8101_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) { rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); @@ -223,7 +223,7 @@ int icf8101_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) } } -int icf8101_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) +static int icf8101_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) { rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); @@ -237,24 +237,24 @@ int icf8101_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) } } -int icf8101_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) +static int icf8101_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) { return rig_set_freq(rig, RIG_VFO_B, tx_freq); } -int icf8101_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq) +static int icf8101_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq) { return rig_get_freq(rig, RIG_VFO_B, tx_freq); } -int icf8101_set_split_freq_mode(RIG *rig, vfo_t vfo, freq_t tx_freq, +static int icf8101_set_split_freq_mode(RIG *rig, vfo_t vfo, freq_t tx_freq, rmode_t mode, pbwidth_t width) { rig_set_freq(rig, RIG_VFO_B, tx_freq); return rig_set_mode(rig, RIG_VFO_B, mode, -1); } -int icf8101_get_split_freq_mode(RIG *rig, vfo_t vfo, freq_t *tx_freq, +static int icf8101_get_split_freq_mode(RIG *rig, vfo_t vfo, freq_t *tx_freq, rmode_t *mode, pbwidth_t *width) { rig_get_freq(rig, RIG_VFO_B, tx_freq); @@ -263,7 +263,7 @@ int icf8101_get_split_freq_mode(RIG *rig, vfo_t vfo, freq_t *tx_freq, -int icf8101_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) +static int icf8101_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) { unsigned char cmdbuf[4]; int ack_len; @@ -277,7 +277,7 @@ int icf8101_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) &ack_len); } -int icf8101_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo) +static int icf8101_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo) { int retval; int ack_len; @@ -299,7 +299,7 @@ int icf8101_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo) return retval; } -int icf8101_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) +static int icf8101_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) { unsigned char ackbuf[MAXFRAMELEN], pttbuf[2]; int ack_len = sizeof(ackbuf), retval; @@ -350,7 +350,7 @@ int icf8101_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) * icf8101_get_ptt * Assumes rig!=NULL, STATE(rig)->priv!=NULL, ptt!=NULL */ -int icf8101_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) +static int icf8101_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) { unsigned char pttbuf[MAXFRAMELEN]; int ptt_len, retval; diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 7cb8cf81a..85b6d1e68 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -1454,7 +1454,7 @@ static int icom_band_changing(RIG *rig, freq_t test_freq) } static int icom_set_freq_x25(RIG *rig, vfo_t vfo, freq_t freq, int freq_len, - unsigned char *freqbuf) + const unsigned char *freqbuf) { struct rig_state *rs = STATE(rig); struct icom_priv_data *priv = (struct icom_priv_data *) rs->priv; @@ -2789,7 +2789,6 @@ static int icom_get_mode_without_data(RIG *rig, vfo_t vfo, rmode_t *mode, if (--mode_len == 3) { - // cppcheck-suppress redundantAssignment priv_data->filter = modebuf[2]; rig_debug(RIG_DEBUG_TRACE, "%s(%d): modebuf[0]=0x%02x, modebuf[1]=0x%02x, modebuf[2]=0x%02x, mode_len=%d, filter=%d\n", diff --git a/src/network.c b/src/network.c index de65fd2db..3e169a97f 100644 --- a/src/network.c +++ b/src/network.c @@ -184,7 +184,7 @@ static void handle_error(enum rig_debug_level_e lvl, const char *msg) #define TRACE rig_debug(RIG_DEBUG_ERR, "TRACE %s(%d)\n", __func__,__LINE__); -int network_init() +static int network_init() { int retval = -RIG_EINTERNAL; #ifdef __MINGW32__ @@ -830,7 +830,6 @@ static int multicast_publisher_write_packet_header(RIG *rig, return RIG_OK; } -// cppcheck-suppress unusedFunction int network_publish_rig_poll_data(RIG *rig) { const struct rig_state *rs = STATE(rig); @@ -854,7 +853,6 @@ int network_publish_rig_poll_data(RIG *rig) return result; } -// cppcheck-suppress unusedFunction int network_publish_rig_transceive_data(RIG *rig) { const struct rig_state *rs = STATE(rig); diff --git a/tests/ampctl_parse.c b/tests/ampctl_parse.c index 66499bd40..eaf9fce18 100644 --- a/tests/ampctl_parse.c +++ b/tests/ampctl_parse.c @@ -1554,7 +1554,7 @@ static int hash_model_list(const struct amp_caps *caps, void *data) return 1; /* !=0, we want them all ! */ } -void print_model_list() +static void print_model_list() { struct mod_lst *s; diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index b17060fc3..e551db06d 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -2101,7 +2101,7 @@ static int hash_model_list(const struct rig_caps *caps, void *data) } -void print_model_list() +static void print_model_list() { struct mod_lst *s; diff --git a/tests/rotctl_parse.c b/tests/rotctl_parse.c index 97e64d3af..c3f7e77d3 100644 --- a/tests/rotctl_parse.c +++ b/tests/rotctl_parse.c @@ -1638,7 +1638,7 @@ static int hash_model_list(const struct rot_caps *caps, void *data) return 1; /* !=0, we want them all ! */ } -void print_model_list() +static void print_model_list() { struct mod_lst *s; commit 49e65de2031559c47b9b1d61692916704b93a45e Author: George Baltz N3GB <Geo...@gm...> Date: Sat Jun 14 19:17:23 2025 -0400 Get rid of spurious messages from \dump_caps rig_sprintf_func() outputs a RIG_DEBUG_ERR message for each function that the rig does not support. diff --git a/src/sprintflst.c b/src/sprintflst.c index b1fe66bb9..2bbe1c612 100644 --- a/src/sprintflst.c +++ b/src/sprintflst.c @@ -207,16 +207,19 @@ int rig_sprintf_func(char *str, int nlen, setting_t func) { const char *ms = rig_strfunc(func & rig_idx2setting(i)); - if (!ms || !ms[0]) + if (!ms) { rig_debug(RIG_DEBUG_ERR, "%s: unknown RIG_FUNC=%x\n", __func__, i); continue; /* unknown, FIXME! */ } - strcat(str, ms); - strcat(str, " "); - len += strlen(ms) + 1; - check_buffer_overflow(str, len, nlen); + if (ms[0]) + { + strcat(str, ms); + strcat(str, " "); + len += strlen(ms) + 1; + check_buffer_overflow(str, len, nlen); + } } return len; ----------------------------------------------------------------------- Summary of changes: rigs/dummy/dummy.c | 5 +---- rigs/icom/frame.c | 2 +- rigs/icom/icf8101.c | 24 ++++++++++++------------ rigs/icom/icom.c | 3 +-- src/network.c | 4 +--- src/sprintflst.c | 13 ++++++++----- tests/ampctl_parse.c | 2 +- tests/rigctl_parse.c | 2 +- tests/rotctl_parse.c | 2 +- 9 files changed, 27 insertions(+), 30 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-06-14 17:04:26
|
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 bddd3ace002ede56a26741838f5e11157ab7ef0d (commit) from df2bf0c6349dfc88004348631a5d9ca8bfeb138e (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 bddd3ace002ede56a26741838f5e11157ab7ef0d Author: Nate Bargmann <n0...@n0...> Date: Sat Jun 14 11:22:00 2025 -0500 Revert 17b404a6c71f3d0bd60153a9191088e6cc9960c5 These changes were unnecessary as the real bug is that the incorrect function was being called in meade.c. Closes GitHub issue #268. Fix testloc.c diff --git a/include/hamlib/rotator.h b/include/hamlib/rotator.h index 4ddf4f5a1..0a183c668 100644 --- a/include/hamlib/rotator.h +++ b/include/hamlib/rotator.h @@ -909,7 +909,6 @@ dec2dmmm HAMLIB_PARAMS((double dec, extern HAMLIB_EXPORT(double) dmmm2dec HAMLIB_PARAMS((int degrees, double minutes, - double seconds, int sw)); extern HAMLIB_EXPORT(setting_t) rot_parse_func(const char *s); diff --git a/rotators/meade/meade.c b/rotators/meade/meade.c index 997ec24cc..b3fad52f9 100644 --- a/rotators/meade/meade.c +++ b/rotators/meade/meade.c @@ -353,8 +353,8 @@ static int meade_get_position(ROT *rot, azimuth_t *az, elevation_t *el) rig_debug(RIG_DEBUG_VERBOSE, "%s: az=%03d:%02d:%02d, el=%03d:%02d:%02d\n", __func__, az_degrees, az_minutes, az_seconds, el_degrees, el_minutes, el_seconds); - *az = dmmm2dec(az_degrees, az_minutes, az_seconds, az_seconds); - *el = dmmm2dec(el_degrees, el_minutes, el_seconds, el_seconds); + *az = dms2dec(az_degrees, az_minutes, az_seconds, 0); + *el = dms2dec(el_degrees, el_minutes, el_seconds, 0); return RIG_OK; } diff --git a/src/locator.c b/src/locator.c index 652ca007b..7480a36d4 100644 --- a/src/locator.c +++ b/src/locator.c @@ -217,14 +217,13 @@ double HAMLIB_API dms2dec(int degrees, int minutes, double seconds, int sw) * * \param degrees Degrees, whole degrees. * \param minutes Minutes, decimal minutes. - * \param seconds Seconds, decimal seconds. * \param sw South or West. * * Convert a degrees decimal minutes (D M.MMM) notation common on many GPS * units to a decimal degrees (D.DDD) angle value. * - * \note For the parameters \a degrees > 360, \a minutes > 60.0, \a seconds > - * 60.0 are allowed, but the resulting angle will not be normalized. + * \note For the parameters \a degrees > 360, \a minutes > 60.0 are allowed, but + * the resulting angle will not be normalized. * * When the variable \a sw is passed a value of 1, the returned decimal * degrees value will be negative (*South* or *West*). When passed a value of @@ -234,7 +233,7 @@ double HAMLIB_API dms2dec(int degrees, int minutes, double seconds, int sw) * * \sa dec2dmmm() */ -double HAMLIB_API dmmm2dec(int degrees, double minutes, double seconds, int sw) +double HAMLIB_API dmmm2dec(int degrees, double minutes, int sw) { double st; @@ -250,7 +249,7 @@ double HAMLIB_API dmmm2dec(int degrees, double minutes, double seconds, int sw) minutes = fabs(minutes); } - st = (double)degrees + (minutes / 60) + (seconds / 3600); + st = (double)degrees + minutes / 60; if (sw == 1) { diff --git a/tests/rotctl_parse.c b/tests/rotctl_parse.c index 5b843f03a..97e64d3af 100644 --- a/tests/rotctl_parse.c +++ b/tests/rotctl_parse.c @@ -2769,8 +2769,7 @@ declare_proto_rot(d_mm2dec) CHKSCN1ARG(sscanf(arg2, "%lf", &min)); CHKSCN1ARG(sscanf(arg3, "%d", &sw)); - dec_deg = dmmm2dec(deg, min, sw, - 0.0); // we'll add real seconds when somebody asks for it + dec_deg = dmmm2dec(deg, min, sw); if ((interactive && prompt) || (interactive && !prompt && ext_resp)) { diff --git a/tests/testloc.c b/tests/testloc.c index 64a156413..578d03e1c 100644 --- a/tests/testloc.c +++ b/tests/testloc.c @@ -93,7 +93,7 @@ int main(int argc, char *argv[]) printf(" GPS lon:\t%f\t%c%d %.3f'\n", lon1, sign, deg, mmm); /* hamlib function to convert deg, decimal min to decimal degrees */ - lon1 = dmmm2dec(deg, mmm, nesw, 0.0); + lon1 = dmmm2dec(deg, mmm, nesw); printf(" Recoded GPS:\t%f\n", lon1); /* hamlib function to convert decimal degrees to deg, min, sec */ @@ -141,7 +141,7 @@ int main(int argc, char *argv[]) printf(" GPS lat:\t%f\t%c%d %.3f'\n", lat1, sign, deg, mmm); /* hamlib function to convert deg, decimal min to decimal degrees */ - lat1 = dmmm2dec(deg, mmm, nesw, 0.0); + lat1 = dmmm2dec(deg, mmm, nesw); printf(" Recoded GPS:\t%f\n", lat1); /* hamlib function to convert decimal degrees to maidenhead */ @@ -216,7 +216,7 @@ int main(int argc, char *argv[]) printf(" GPS lon:\t%f\t%c%d %.3f'\n", lon2, sign, deg, mmm); /* hamlib function to convert deg, decimal min to decimal degrees */ - lon2 = dmmm2dec(deg, mmm, nesw, 0.0); + lon2 = dmmm2dec(deg, mmm, nesw); printf(" Recoded GPS:\t%f\n", lon2); /* hamlib function to convert decimal degrees to deg, min, sec */ @@ -264,7 +264,7 @@ int main(int argc, char *argv[]) printf(" GPS lat:\t%f\t%c%d %.3f'\n", lat2, sign, deg, mmm); /* hamlib function to convert deg, decimal min to decimal degrees */ - lat2 = dmmm2dec(deg, mmm, nesw, 0.0); + lat2 = dmmm2dec(deg, mmm, nesw); printf(" Recoded GPS:\t%f\n", lat2); /* hamlib function to convert decimal degrees to maidenhead */ ----------------------------------------------------------------------- Summary of changes: include/hamlib/rotator.h | 1 - rotators/meade/meade.c | 4 ++-- src/locator.c | 9 ++++----- tests/rotctl_parse.c | 3 +-- tests/testloc.c | 8 ++++---- 5 files changed, 11 insertions(+), 14 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-06-14 14:46:02
|
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 df2bf0c6349dfc88004348631a5d9ca8bfeb138e (commit) from 93434b6523e966e86fa06bd98d4be1cfafea4e98 (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 df2bf0c6349dfc88004348631a5d9ca8bfeb138e Author: George Baltz N3GB <Geo...@gm...> Date: Fri Jun 13 14:30:38 2025 -0400 Fix 0x26 command in simic705.c - off by 1 byte Reduce usage of rig.h idioms - use Icom values. Reduce/cleanup some debug output. Add width set (1A 03) diff --git a/simulators/simic705.c b/simulators/simic705.c index 0110780cf..c3734841b 100644 --- a/simulators/simic705.c +++ b/simulators/simic705.c @@ -22,31 +22,42 @@ struct ip_mreq #include <termios.h> #include <unistd.h> +/* Simulators really shouldn't be using ANY of the definitions + * from the Hamlib rig.h parameters, but only those of the + * rig itself. This still won't be a clean room implementation, + * but lets try to use as many as possible of Icom's definitions + * for the rig parameters. + */ +#include "../rigs/icom/icom_defs.h" #define BUFSIZE 256 #define X25 +#undef SATMODE +unsigned char civaddr = 0xA4; int civ_731_mode = 0; -vfo_t current_vfo = RIG_VFO_A; +int current_vfo = S_VFOA; int split = 0; int keyspd = 85; // 85=20WPM // we make B different from A to ensure we see a difference at startup float freqA = 14074000; float freqB = 14074500; -mode_t modeA = RIG_MODE_FM; -mode_t modeB = RIG_MODE_FM; +unsigned char modeA = S_FM; +unsigned char modeB = S_FM; int datamodeA = 0; int datamodeB = 0; -pbwidth_t widthA = 0; -pbwidth_t widthB = 1; -ant_t ant_curr = 0; -int ant_option = 0; +int widthA = 0; +int widthB = 1; +unsigned char filterA = 1, filterB = 1; +//ant_t ant_curr = 0; +//int ant_option = 0; int ptt = 0; int satmode = 0; int agc_time = 1; int ovf_status = 0; int powerstat = 1; +const char *vfonames[2] = {"VFOA", "VFOB"}; void dumphex(const unsigned char *buf, int n) { @@ -69,7 +80,7 @@ again: buf[i++] = c; //printf("i=%d, c=0x%02x\n",i,c); - if (c == 0xfd) + if (c == FI) // End of message (EOM) { dumphex(buf, i); return i; @@ -100,6 +111,7 @@ void frameParse(int fd, unsigned char *frame, int len) { double freq; int n = 0; + unsigned char acknak = ACK; // Hope for the best if (len == 0) { @@ -110,7 +122,7 @@ void frameParse(int fd, unsigned char *frame, int len) printf("Here#1\n"); dumphex(frame, len); - if (frame[0] != 0xfe && frame[1] != 0xfe) + if (frame[0] != 0xfe || frame[1] != 0xfe) { printf("expected fe fe, got "); dumphex(frame, len); @@ -119,10 +131,10 @@ void frameParse(int fd, unsigned char *frame, int len) switch (frame[4]) { - case 0x03: + case C_RD_FREQ: // 0x03 //from_bcd(frameackbuf[2], (civ_731_mode ? 4 : 5) * 2); - if (current_vfo == RIG_VFO_A || current_vfo == RIG_VFO_MAIN) + if (current_vfo == S_VFOA || current_vfo == S_MAIN) { printf("get_freqA\n"); to_bcd(&frame[5], (long long)freqA, (civ_731_mode ? 4 : 5) * 2); @@ -133,7 +145,7 @@ void frameParse(int fd, unsigned char *frame, int len) to_bcd(&frame[5], (long long)freqB, (civ_731_mode ? 4 : 5) * 2); } - frame[10] = 0xfd; + frame[10] = FI; if (powerstat) { @@ -142,8 +154,8 @@ void frameParse(int fd, unsigned char *frame, int len) break; - case 0x04: - if (current_vfo == RIG_VFO_A || current_vfo == RIG_VFO_MAIN) + case C_RD_MODE: // 0x04 + if (current_vfo == S_VFOA || current_vfo == S_MAIN) { printf("get_modeA\n"); frame[5] = modeA; @@ -160,70 +172,75 @@ void frameParse(int fd, unsigned char *frame, int len) n = write(fd, frame, 8); break; - case 0x05: + case C_SET_FREQ: // 0x05 freq = from_bcd(&frame[5], (civ_731_mode ? 4 : 5) * 2); printf("set_freq to %.0f\n", freq); - if (current_vfo == RIG_VFO_A || current_vfo == RIG_VFO_MAIN) { freqA = freq; } + if (current_vfo == S_VFOA || current_vfo == S_MAIN) { freqA = freq; } else { freqB = freq; } - frame[4] = 0xfb; - frame[5] = 0xfd; + frame[4] = ACK; + frame[5] = FI; n = write(fd, frame, 6); break; - case 0x06: - if (current_vfo == RIG_VFO_A || current_vfo == RIG_VFO_MAIN) { modeA = frame[6]; } + case C_SET_MODE: // 0x06 + if (current_vfo == S_VFOA || current_vfo == S_MAIN) { modeA = frame[6]; } else { modeB = frame[6]; } - frame[4] = 0xfb; - frame[5] = 0xfd; + frame[4] = ACK; + frame[5] = FI; n = write(fd, frame, 6); break; - case 0x07: - + case C_SET_VFO: // 0x07 switch (frame[5]) { - case 0x00: current_vfo = RIG_VFO_A; break; - - case 0x01: current_vfo = RIG_VFO_B; break; - - case 0xd0: current_vfo = RIG_VFO_MAIN; break; - - case 0xd1: current_vfo = RIG_VFO_SUB; break; + case S_VFOA: + case S_VFOB: + current_vfo = frame[5]; + break; + case S_BTOA: + // Figure out what this really does + break; + case S_XCHNG: + // Ditto + break; + default: + acknak = NAK; } - printf("set_vfo to %s\n", rig_strvfo(current_vfo)); + printf("set_vfo to %s\n", vfonames[current_vfo]); - frame[4] = 0xfb; - frame[5] = 0xfd; + frame[4] = acknak; + frame[5] = FI; n = write(fd, frame, 6); break; - case 0x0f: + case C_CTL_SPLT: // 0x0F if (frame[5] == 0) { split = 0; } else if (frame[5] == 1) { split = 1; } else { frame[6] = split; } - if (frame[5] == 0xfd) + if (frame[5] == FI) { printf("get split %d\n", split); - frame[7] = 0xfd; + frame[7] = FI; n = write(fd, frame, 8); } else { - printf("set split %d\n", 1); - frame[4] = 0xfb; - frame[5] = 0xfd; + printf("set split %d\n", split); + frame[4] = ACK; + frame[5] = FI; n = write(fd, frame, 6); } break; - case 0x12: // we're simulating the 3-byte version -- not the 2-byte - if (frame[5] != 0xfd) +#if 0 // No antenna control + case C_CTL_ANT: // 0x12 we're simulating the 3-byte version -- not the 2-byte + if (frame[5] != FI) { printf("Set ant %d\n", -1); ant_curr = frame[5]; @@ -242,16 +259,17 @@ void frameParse(int fd, unsigned char *frame, int len) dump_hex(frame, 8); n = write(fd, frame, 8); break; +#endif - case 0x14: + case C_CTL_LVL: // 0x14 printf("cmd=0x14\n"); switch (frame[5]) { static int power_level = 0; - case 0x07: - case 0x08: + case S_LVL_PBTIN: // 0x07 + case S_LVL_PBTOUT: // 0x08 if (frame[6] != 0xfd) { frame[6] = 0xfb; @@ -270,31 +288,27 @@ void frameParse(int fd, unsigned char *frame, int len) break; - case 0x0a: - printf("Using power level %d\n", power_level); + case S_LVL_RFPOWER: // 0x0A power_level += 10; - if (power_level > 250) { power_level = 0; } + printf("Using power level %d\n", power_level); to_bcd(&frame[6], (long long)power_level, 2); frame[8] = 0xfd; n = write(fd, frame, 9); break; - case 0x0c: - dumphex(frame, 10); - printf("subcmd=0x0c #1\n"); + case S_LVL_KEYSPD: // 0x0C + //dumphex(frame, 10); if (frame[6] != 0xfd) // then we have data { - printf("subcmd=0x0c #1\n"); keyspd = from_bcd(&frame[6], 2); frame[6] = 0xfb; n = write(fd, frame, 7); } else { - printf("subcmd=0x0c #1\n"); to_bcd(&frame[6], keyspd, 2); frame[8] = 0xfd; n = write(fd, frame, 9); @@ -305,41 +319,41 @@ void frameParse(int fd, unsigned char *frame, int len) break; - case 0x15: + case C_RD_SQSM: // 0x15 switch (frame[5]) { static int meter_level = 0; - case 0x02: + case S_SML: // 0x02 frame[6] = 00; frame[7] = 00; - frame[8] = 0xfd; + frame[8] = FI; n = write(fd, frame, 9); break; - case 0x07: + case S_OVF: // 0x07 frame[6] = ovf_status; - frame[7] = 0xfd; + frame[7] = FI; n = write(fd, frame, 8); - ovf_status = ovf_status == 0 ? 1 : 0; + ovf_status = !ovf_status; break; - case 0x11: - printf("Using meter level %d\n", meter_level); + case S_RFML: // 0x11 meter_level += 10; - if (meter_level > 250) { meter_level = 0; } + printf("Using meter level %d\n", meter_level); to_bcd(&frame[6], (long long)meter_level, 2); - frame[8] = 0xfd; + frame[8] = FI; n = write(fd, frame, 9); break; } - case 0x16: + case C_CTL_FUNC: // 0x16 switch (frame[5]) { - case 0x5a: +#ifdef SATMODE + case S_FUNC_SATM: // 0x5A if (frame[6] == 0xfe) { satmode = frame[6]; @@ -347,45 +361,57 @@ void frameParse(int fd, unsigned char *frame, int len) else { frame[6] = satmode; - frame[7] = 0xfd; + frame[7] = FI; n = write(fd, frame, 8); } break; +#endif } break; - case 0x18: // miscellaneous things + case C_SET_PWR: // 0x18 miscellaneous things frame[5] = 1; - frame[6] = 0xfd; + frame[6] = FI; n = write(fd, frame, 7); break; - case 0x19: // miscellaneous things - frame[5] = 0x94; - frame[6] = 0xfd; + case C_RD_TRXID: // 0x19 miscellaneous things + frame[5] = 0xA4; + frame[6] = FI; n = write(fd, frame, 7); break; - case 0x1a: // miscellaneous things + case C_CTL_MEM: // 0x1A miscellaneous things switch (frame[5]) { - case 0x03: // width - if (current_vfo == RIG_VFO_A || current_vfo == RIG_VFO_MAIN) { frame[6] = widthA; } - else { frame[6] = widthB; } + case S_MEM_FILT_WDTH: // 0x03 width + if (frame[6] == FI) // Query + { + if (current_vfo == S_VFOA || current_vfo == S_MAIN) { frame[6] = widthA; } + else { frame[6] = widthB; } - frame[7] = 0xfd; - n = write(fd, frame, 8); + frame[7] = FI; + n = write(fd, frame, 8); + } + else // set + { + if (current_vfo == S_VFOA) { widthA = frame[6]; } + else { widthB = frame[6]; } + frame[4] = ACK; + frame[5] = FI; + n = write(fd, frame, 6); + } break; case 0x04: // AGC TIME printf("frame[6]==x%02x, frame[7]=0%02x\n", frame[6], frame[7]); - if (frame[6] == 0xfd) // the we are reading + if (frame[6] == FI) // then we are reading { frame[6] = agc_time; - frame[7] = 0xfd; + frame[7] = FI; n = write(fd, frame, 8); } else @@ -399,31 +425,33 @@ void frameParse(int fd, unsigned char *frame, int len) break; +#ifdef SATMODE case 0x07: // satmode frame[4] = 0; frame[7] = 0xfd; n = write(fd, frame, 8); break; +#endif } break; - case 0x1c: + case C_CTL_PTT: //0x1C switch (frame[5]) { - case 0: + case S_PTT: // 0x00 if (frame[6] == 0xfd) { frame[6] = ptt; - frame[7] = 0xfd; + frame[7] = FI; n = write(fd, frame, 8); } else { ptt = frame[6]; - frame[7] = 0xfb; - frame[8] = 0xfd; + frame[7] = ACK; + frame[8] = FI; n = write(fd, frame, 9); } @@ -436,8 +464,8 @@ void frameParse(int fd, unsigned char *frame, int len) #ifdef X25 - case 0x25: - if (frame[6] == 0xfd) + case C_SEND_SEL_FREQ: // 0x25 + if (frame[6] == FI) { if (frame[5] == 0x00) { @@ -450,7 +478,7 @@ void frameParse(int fd, unsigned char *frame, int len) printf("X25 get_freqB=%.0f\n", freqB); } - frame[11] = 0xfd; + frame[11] = FI; #if 0 unsigned char frame2[11]; @@ -498,54 +526,53 @@ void frameParse(int fd, unsigned char *frame, int len) break; - case 0x26: - for (int i = 0; i < 6; ++i) { printf("%02x:", frame[i]); } + case C_SEND_SEL_MODE: // 0x26 if (frame[6] == 0xfd) // then a query { - for (int i = 0; i < 6; ++i) { printf("%02x:", frame[i]); } - frame[6] = frame[5] == 0 ? modeA : modeB; frame[7] = frame[5] == 0 ? datamodeA : datamodeB; - frame[8] = 0x01; + frame[8] = frame[5] == 0 ? filterA : filterB; frame[9] = 0xfd; + printf(" ->"); + for (int i = 0; i < 10; ++i) { printf("%02x:", frame[i]); } + printf("\n"); n = write(fd, frame, 10); } else { - for (int i = 0; i < 12; ++i) { printf("%02x:", frame[i]); } - - if (frame[6] == 0) + if (frame[5] == 0) { - modeA = frame[7]; - datamodeA = frame[8]; + modeA = frame[6]; + datamodeA = frame[7]; + filterA = frame[8]; } else { - modeB = frame[7]; - datamodeB = frame[8]; + modeB = frame[6]; + datamodeB = frame[7]; + filterB = frame[8]; } - frame[4] = 0xfb; - frame[5] = 0xfd; + frame[4] = ACK; + frame[5] = FI; n = write(fd, frame, 6); } - printf("\n"); break; #else case 0x25: printf("x25 send nak\n"); - frame[4] = 0xfa; - frame[5] = 0xfd; + frame[4] = NAK; + frame[5] = FI; n = write(fd, frame, 6); break; case 0x26: printf("x26 send nak\n"); - frame[4] = 0xfa; - frame[5] = 0xfd; + frame[4] = NAK; + frame[5] = FI; n = write(fd, frame, 6); break; #endif @@ -599,13 +626,13 @@ int openPort(char *comport) // doesn't matter for using pts devices void rigStatus() { - char vfoa = current_vfo == RIG_VFO_A ? '*' : ' '; - char vfob = current_vfo == RIG_VFO_B ? '*' : ' '; - printf("%cVFOA: mode=%d datamode=%d width=%ld freq=%.0f\n", vfoa, modeA, + char vfoa = current_vfo == S_VFOA ? '*' : ' '; + char vfob = current_vfo == S_VFOB ? '*' : ' '; + printf("%cVFOA: mode=%d datamode=%d width=%d freq=%.0f\n", vfoa, modeA, datamodeA, widthA, freqA); - printf("%cVFOB: mode=%d datamode=%d width=%ld freq=%.0f\n", vfob, modeB, + printf("%cVFOB: mode=%d datamode=%d width=%d freq=%.0f\n", vfob, modeB, datamodeB, widthB, freqB); ----------------------------------------------------------------------- Summary of changes: simulators/simic705.c | 247 ++++++++++++++++++++++++++++---------------------- 1 file changed, 137 insertions(+), 110 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-06-10 01:04:41
|
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 annotated tag, 4.6.3 has been created at d7d544b56972b57f1267ebccdb30f2a9b950b98f (tag) tagging 371db9ffd2ef86637ba31a1445edce2f24a36904 (commit) tagged by Nate Bargmann on Mon Jun 9 19:57:15 2025 -0500 - Log ----------------------------------------------------------------- Hamlib 4.6.3 release -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQSC1k9rDmfNQfaJu6b7LFEw1VqIGQUCaEeC+AAKCRD7LFEw1VqI GYPjAJ0eKBMcvaOfqzlbrZaPOBfH0+b7SwCeIT+Tm9pbD369oGNERp1S7c10Bbg= =gDle -----END PGP SIGNATURE----- (no author) (1): New repository initialized by cvs2svn. Addison Schuhardt (1): Refactoring GPIO push-to-talk logic to use libgpiod rather than the deprecated/broken sysfs method. TODO: I'm not familiar with autoconf to set up linking to libgpiod correctly, so I'd like to ask someone else to do that. Fixes #1538 Adrian Chadd (1): Upgrade TS-711 and TS-811 to work. Agis Zisimatos (1): easycomm: Return the correct value of pointer val Alessandro Zummo, IZ1PRB (36): Remove const from priv_caps to allow kenwood_init to initialize default values if they're missing Call kenwood_init in each and every driver Use an appropriate debug level Support get/set_powerstat on pcr100 Add kenwood_simple_cmd Make set_ptt behave as before, fix set_ant for ts570.c ts450: remove RIG_FUNC_TONE from has_xx_func if tone unit is not detected ts450,ts690,ts850: use FL command to get/set filters in get/set_mode. (code from ts850.c) ts450: indentation fixes remove fixed command terminator (;) from generic code ts140,ts2000,ts480,ts570,ts680,ts850,ts870s: remove usage of fixed ; and EOM fix tabs thg71,tmv7,ts450s,ts690: verify rig id at rig_open ts450: implement set_channel remove unused parameter from get_kenwood_func ts570,ts850,ts870s,ts140,ts480,ts680: use kenwood_simple_cmd where possible Replace __FUNCTION__, which is gcc specific and was deprecated a long time ago, with __func__, which is at least defined in C99. generic, ts850: implemented CTCSS TN command (reported not working for ts850, should now be fixed) Add description for the kenwood mode n. 8 implemented set/get_ext_param (voice, fine, xit, rit). enabled on ts450 and ts850 Added my call sign removed comment about switch optimizatons. the compiler will generate the assembly code in a different order which is usually based on the case value. other compiler optimizations might also affect it, so it's useless to optimize the order. check ptt status before set_ptt. enabled on ts850. style fixes band up/down was inverted Try to compensate for leftover characters Try to cope withe the PCR100 and PCR1000 at the same time Bumped out to beta, solved a few bugs. Tested with PCR100/1000/1500. kenwood: send the whole buffer at once, added kenwood_cmd - removed EOM, it's handled by kenwood_transaction - fixed tabs and spaces - added generic routine for vfo errors - set_mem: do not switch vfo if already in mem mode - simplified invocation of some commands - buffer optimizations - added PARM_BEEP and PARM_APO - fixed getting of LEVEL_RFPOWER - fixed get_ant tmv7: removed EOM thg71: removed EOM thf7: - wrong rfpower level granularity - added .reset - call kenwood_open - use generic th_set_vfo th: fixed formatting issue th: fixed stack corruption th: fixed a missing newline Alex V Flinsch, KC2IVL (8): Initial changes for ft100 Initial release initial release fixed various command options new file, list of tones/codes and sequence used by various yaesu rigs added get frequency to ft100 code added getinfo func hdr *** empty log message *** Alexander Sack (1): Get firmware revision level from K3/KX3. Alexander Schultze (3): easycomm: include a new EasyComm3 to support move speed and infostring update EasyComm3 to include setting and getting of config and status easycomm: implement get/set config, easycom include status and error bytes, fix get_info Alexandru Csete OZ9AEC (34): Added new stylesheet to make API docs look better. Modified to use new stylesheet. Added doxygen comments. Added rotator.h and rotlist.h to the input list. Applied Tommi's improvements from the FT-857 backend with the following changes and additions: Full RF power scale corresponds to 10 bars, not 15. Added RIT, XIT and IF shift ranges to dummy backend. Cast constant caps to variable caps in order to avoid compiler warnings. Cast from const to variable in order to avoid compiler warnings. - Cast unsigned char to char in order to avoid compiler warnings. - Ensure that all variables have a value before they are used (ft920). - Disable unused functions and variables (frg100). - Incremented backend version numbers. Use tone_t for pcr1_ctcss_list. Changed arg 4 of pcr_transaction to unsigned. Cast the other mismatches to (char *). Cast unsigned char to char in order to avoid compiler warnings. Incremented backend version number. - Cast unsigned char to char in order to avoid compiler warnings. - Ensure that all variables have a value before they are used (tentec.c). - Cast unsigned char to char in order to avoid compiler warnings. - Incremented backend version number. - Cast/change unsigned char to char in order to fix compile warnings. - Incremented backend version number. - Cast/change unsigned char to char in order to fix compile warnings. - Incremented backend version numbers. - Cast/change unsigned char to char in order to fix compile warnings. - Incremented backend version numbers. - Cast/change unsigned char to char in order to fix compile warnings. - Incremented backend version number. - Cast/change unsigned char to char in order to fix compile warnings. - Incremented backend version numbers. - Cast unsigned char to char in order to avoid compiler warnings. - Handle all enum values in switch statements. Fixed type mismatches that caused compile warnings. Fixed type mismatches that caused compile warnings. Initialise icom_val to avoid compiler warning. Fixed type mismatches between signed and unsigned char. There are a few very suspicious 'if' statements in icom.c and frame.c - Fixed type mismatches and unhandled switch cases. - Incremented backend version numbers. Cast constant caps to variable caps in order to avoid compiler warnings. Updated. Added infor about w (send_cmd). Max serial rate is 9600. Changed backend status to stable. Escape the backslash character. The 765 can do RIG_SCAN_PROG and RIG_SCAN_MEM. Fixed S-meter reading to use calibration table since frontend always uses RAWSTR. Fixed RF power reading and added power2mw and mw2power. Fixed RIG_LEVEL_STRENGTH reading. Andrew Errington (1): Initial support for CM108 GPIO contorl of PTT Andrew Rodland (3): Fix spurious writes when no RT-21 second port Enable "stop" command for RT-21 rotator. Update RT-21 version Arkadiusz Miśkiewicz (1): Additional PKTUSB and PKTLSB mapping for USB-D1/LSB-D1 AuroraRAS (5): Prepare .gitignore file for NDK build Append the missing information to build hamlib v4.3 for Android NDK make the Android.mk files adapt to multi arch add androidsensor rotator AndroidSensor codes improvement Ben Coleman, NJ8J (6): Fixed bug in rpcrig_set_parm (using RIG_LEVEL_IS_FLOAT instead of RIG_PARM_FLOAT) Fixed same bug in rigctl_get_parm. Added checking of return string from rig on set (non-retrieval) commands. Added code for COMP function. Added alinco_set_parm & tweaked dx77 capabilities. Handle setting Keyer speed and CW Pitch Added NJ8J's email address. Change email address for NJ8J Berndt Josef Wulf, VK5ABN (11): Implemented rig_set_channel() Implemented set_parm() for BACKLIGHT operation Commented out RIG_MODE_PKTFM overlooked at the submission of previous code Implemented RIG_MODE_PKTFM and RIG_MODE_PKTLSB modes Changed debug message format for freq_t from long long to double ft990_get_ptt() now uses the FT990_SF_XMIT instead of FT990_SF_PTT. FT990_SF_PTT only returns status of PTT activated by CAT commands, whereas FT990_SF_XMIT reports the actual status of the ptt line. ft990_get_mem(): Fixed bug that prevented the reporting of current channel number when vfo != RIG_VFO_MEM Fixed erroneous return value Fixed mispelled name for VK5ABN Added missing modes to RX/TX caps Fixed bug in ft990_set_mode that caused RTTY interchanged modes USB/LSB Fixed bugs in ft990_get_channel Bill Barker (1): Add test for Flex 6300 ID Bill Somerville (212): Patch submission for IC-756 Patch to allow same serial port for PTT and CAT. Patch to fix broken Yaesu backend with FT-2000(D) Fix rig_open not failing when PTT/DCD port is unavailable. Fix Icom IC-756 filter handling. Fix Yaesu newcat backend set_tx_vfo issue. Add support for Data Modes on Icom "Pro" models. Fix Icom IC-726 mode handling. Fix Kenwood TS-2000 split operation. Fix Kenwood Split Operation for TS50 & TS480. Fix Kenwood TS-870s split and bandwidth set/get. Correct receive buffer length for IS; comamnd. Fix Kenwood CAT transaction busy retry mechanism. Fix Kenwood get split VFO function. Add data sub-mode support for TS590s. Correct order of MD and DA commands for TS590s. Get firmware revision for TS590s in rig_open. Fix TS590s firmware defect. Fix Kenwood get_vfo function returning wrong VFO in split TX. Make Kenwood TS590s firmware defect fixup revision specific. Extend TS590s firmware defect fixup to both VFOs. Fix Icom IC-756 Pro III get data mode. Add spilt mode get and set for Elecraft K3. Fix data sub-modes on Elecraft K3. Fix Elecraft Data Mode Translation. Fix Elecraft K3 Data Sub-Mode Setting. Fix Yaesu FT1000MP and FT1000MP Mk V modes. Fix configure.ac Fix a warning message. Added option to not use VFO XCHG command when setting split parameters. Fix a buffer overflow in the Windows termios emulation. Fix pkg-config generation. Fix Icom IC-756Pro mode get/set. Facility for rigctl to read commands from standard input. Add a pause command to the rigctl command set. Prefix action function names so as not to clash with system names. Prefix action function names so as not to clash with system names. Corrected typos in rigctl.1 manpage. Add read commands from stdin and pause command features to rotctl. Merge branch 'rigctl-stdin' of ssh://git.code.sf.net/u/bsomervi/hamlib into rigctl-stdin Fix manpage errors. Remove redundant RIG_PTT_SERIAL_CAT enum from ptt_t Only check for serial control line conflicts if PTT shares CAT port Fix Ten-Tec Orion get/set split functions Icom IC-7410 has VFO A/B not MAIN/SUB Added IC-7410 data modes Add retry mechanism for Yaesu "newcat" backend Implement retries for Yaesu "newcat" rigs Disable auto information mode on open Add retry mechanism for Yaesu "newcat" backend Implement retries for Yaesu "newcat" rigs Disable auto information mode on open Merge branch 'yaesu-retries' of ssh://git.code.sf.net/u/bsomervi/hamlib into yaesu-retries RIG_OK is zero and need not be negated and this will not change Fix response length expected error in K3 back end Data mode support for the Icom IC-7700 Data mode support for the Icom IC-9100 Data mode support for the Icom IC-7200 Add support for the Kenwood TS-590SG Kenwood TS-590SG Always clear serial control lines when used for PTT Disable AI mode on open for Kenwood/Elecraft rigs Add more diagnostics and error checks to serial line control Move serial line control error checks to lower level routines Merge branch 'master' into kenwood-ai-off-at-start Merge branch 'master' into ptt-control-on-cat-port Fix serial i/o on Windows. Yaesu newcat style command response reading improvements Increase communications timeout for Icom rigs Kenwood AIn; command has no reply Revert read_string() to partial results are a success status Remove gratuitous sleeps before function exits Error checks on simulated direct VFO addressing Elecraft K2 RTTY modes are not FSK Kenwood and Elecraft rigs sometimes ignore commands Removed kenwood_cmd function and replaced uses of it Allow for failed test command on the K2 Elecraft K3 has 1 stop bit Kenwood TS-570 series IF returns current frequency Switch to "ID;" command for verification as no "AI;" on TS-840s Increase Elecraft K2 comms timeout and retries Switch Kenwood TS940 to generic kenwood CAT functions Improve command verification for Kenwood & Elecraft Use local buffer in kenwood transaction funciton Clarify the handling of Kenwood CAT message terminators Further clarification in the implementation of kenwood_transaction() Removed redundant precondition test Remove kenwood_simple_cmd as kenwood_transaction has that functionality Call kenwood_open() for TS-2000 to ensure AI mode is disabled Allow for bad ID from DDUtil in TS-2000 mode Allow one extra byte in read_string() length to accomodate terminator Enable data modes for the Icom IC-7100 Allow for PowerSDR ID in Kenwood TS2000 emulation mode Fix TenTec Argonaut message lengths and timeout Fix TenTec set split command Implement get PTT status for the TenTec Argonaut Fix error with width in set mode for the TT argonaut Yaesu FT540 can only change the frequency of the current VFO Fix defect in Kenwood TS-940 IF command response parsing Fix response lengths for the TT Jupiter 538 Do not attempt CAT PTT commands on the Icom IC-706mkIIG Use correct argument type for serial control line functions Initial back end implementation for the Kenwood TS-990s Mode set is not VFO targetable on the Kenwood TS990s The Kenwood TS990s only does split Tx on SUB VFO The doesn't appear to be a way of getting PTT/SEND on the TS990s Lower both RTS and DTR on alternate PTT serial port Honour any error status from serial port calls Dummy get_ptt function needs to read RTS/DTR/PARALLEL Make autogen.sh agnostic to whitespace in paths Increase the number or retries for most Kenwood rigs Command validation for Yaesu set commands Remove unecessary delays from TS-940S backend Proper IPv6 and dual stack networking Fix compiler warnings Proper IPv6 and dual stack networking for rotator net daemon Attempt to restore AI status on exit Allow for poor emulations of Kenwood rigs that have no ID command Use correct function to execute set type commands with no response Add a new command line option '--no-restore-ai' ('-n') to rigctl Fix FT-817/857/897 issues and add some missing functionality Fix missing PKTUSB mode setting code for FT-817 & FT-897 Fix a logic error in band detection during IC-910 set frequency Add missing configuration getters Detect C-IV NAK returns as rejected commands Elecraft rigs do not switch VFO in IF command responses during split Tx. Redundant split mode directives on Elecraft rigs cause Tx failures Only use IPv6 features on Windows versions that support it (>=XP) Improve IPv6 portability and consistency Add 23cms to IC-910(H) backend Implement combined split VFO frequency and mode setting. Initial implementation of rig_{set,get}_split_freq_mode() for FT-857. Implement rig_{set,get}_split_freq_mode() for IC-756 series. Add {get,set}_splitfrequency_mode for the IC-910(H) Elide unnecessary CAT commands when setting split frequency and mode Do not swap VFO unnecessarily Better set frequency semantics for the IC-910(h) VFO targetable get frequency operation for the Icom IC-910(h) Make sure right band is used when setting frequency on IC-910(H) Use rig state rig port retry option rather than from capabilities Use a sensible port timeout value for the Kenwood TS-850 Further attempts to simplify and improve Icom CAT for split operating Add RIG_PASSBAND_NOCHANGE as possible set_{split_,split_freq_,}mode argument Switch to POSIXLY_CORRECT mode for getopt_long() Fix a regression introduced in 222ad74 Do not crash if expected CTCSS tones not sepcified Do not attempt to query AI state on the TS-450s as it is not supported Some more Kenwood rigs with no AI query Adjust rig_list_foreach to allow use for unregistering Fix an issue presenting on the Yaesu FT-450(D) Release the serial port used for PTT when possible Change the IC7600 & IC7800 set/get mode to versions that support DATA modes Add rig_{open,close} functions to TS-790 backend Revised kenwood rig busy response handling Add get and set split functions for the TS450S Simplify and fix defects in the FT991 back end Fix some endian issues in the si570/AVR SDR back ends Fix a state machine defect with repeated PTT reset calls Do not pass --no-cpp_precomp to compilers on Mac OS X Allow RIG_LEVEL_STRENGTH queries over the network link Stop rigctld and rotctld crashing when service threads cannot write to clients Use snprintf throughout kenwood/kenwood.c for buffer safety Fix off-by-one issue in reading memory mode from IF command response Fix some issues with commands not supported by TS-2000 CAT emulations Add best guess transmit status to rig state structure Take out unecessary delays in K(X)3(S) back end. FT-817 status queries honour retries and timeout Make rig_open() call in rigctld lazy and add graceful termination Simplify SWIG interface definition and hide 64-bit values from Lua binding Remove unnecessary delays from TS-990 and TS-2000 back ends Change frequency setting for the FT-747GX to something more basic Fix an incorrect error return value from win32_serial_select() Fix timeout issues with the Ten-Tec Orion/Eagle Ensure compilation works with a pre C11 compiler Make code C90 compliant again Move unnecessary global and file static variables to the stack Simplify unnecessary persistence of extended response state Fix misunderstanding of netrigctl_transaction() return value Made PTT and DCD options consistent between rigctl and rigctld Report unrecognised PTT and DCD types in rigctl and rigctld Update i/o functions to support GPIO(N) port closure Fixed erroneous messages in rig_close with GPIO(N) PTT or DCD types Remove duplication across GPIO and GPION handling of PTT and DCD Improved get PTT state handling in dummy backend Simplify closing of device files Repair a regression with the dummy get PTT functionality Revert "Add debug to serial.c" Repair a regression with the dummy get PTT functionality Revert "Add debug to serial.c" Fix regression with slow responses from SmartSDR causing errors Deal with remote PTT type at the client end Avoid 'echo -n' as macOS sh doesn't support it Fixing an operator precedence defect Updates to the TH-D7A/E back end Less ambiguous variable name and repair merge issue in prior commit Add missing config parameters for rig power on/off and screen-saver New power on option rather than power on/off Make version recording safe for parallel builds without breaking make dist Make version recording safe for parallel builds Ensure old hamlibdatetime.h headers in the source dir are ignored Merge branch 'safe-scs-versioning' of ssh://git.code.sf.net/u/bsomervi/hamlib into safe-scs-versioning Fix make dist versioning Use BUILT_SOURCES make mechanism as intended Fix rebuild dependency Build hamlibdatetime.h every time Force copy over existing Minimize rebuilding Correct use of sh if Another attempt at a reliable SCS version header generation Remove temporary file Add missing shared library API exports Add missing export definition Blaine Kubesh (8): added Icom803 to icmarine added Icom803 to icmarine added Icom803 to icmarine Update ic-m803 remote-id to 20 Update icm803.c Update AUTHORS undo author changes Update icm803.c Bob Freeman (1): New CNCTRK rotor backend Brandon Durepo (5): Added multi-stage Docker build and hamlib-runtime image Added multi-platform support for linux/arm64 and linux/amd64 Add support for the hamlib-base-image and hamlib-runtime targets - support the arm64 and amd64 platforms on both a base-image and runtime Added git and vim to the hamlib-base-image Added Python support Brian G. Lucas (10): Pretty much a complete re-write of thd72.c, since the old one didn't work at all. Many commands have been tested with real hardware. But more work remains to be done. WIP: thd72 driver. More level, func, and parm stuff works. WIP: thd72 driver. Try to simplify the menu based interface. WIP: thd72 driver. First cut at get_channel(). Other cleanup. WIP: thd72 driver. More interfaces implemented. Other cleanup. Implement some more interfaces. Comment out get_chan_all_cb because the block read routine doesn't work. Fix a format so that it works with Windows. Can't test it because I have no Windows machines. Fix RFPOWER level for FT-450D. It uses 5-100, rather than 0-255 that the FT-450 does. In newcat_open(), initialize rig_id in case any subsequent commands need it. Some calls to thd72_get_menu_item where passing wrong values for range check. C-Elegans (1): Add ability to have rigctld display transverter frequency CJ (1): fix windows makefile Callum McEwen (VK5MCA) (4): Update codan.c Update README.codan Add V3.51 firmware comment Update comments on codan_set_ptt Cedric DJ3CE (1): Add SWR get_level to K3 (KX3, KX2) Charles Suprin (7): Add file for TM-D710 support. Merge branch 'master' of ssh://hamlib.git.sourceforge.net/gitroot/hamlib/hamlib Add D710 to riglist. Add D710 code to kenwood library. Register D710 interface. Initial D710 Implementation. Register D710 interface. Charles Suprin, AA1VS (3): extend th_get_vfo_char to support D700 Changed th_set_freq to round and select step size to use. Allows 6.25kHz and 5kHz channelization. Use new th_set_freq for TM-D700 Chen (Kina) (1): pmr171.c: Fix typo in get_freq Chris Karpinsky, AA1VL (7): add serial_flush() method to clean rx buffer initial stab at this for the Yaesu FT-817 add ft817.* add ft817 bump the backend status to ALPHA Initial entry of cgirig giving ability to use hamlib from a web browser. increased post write delay to 300 Chris Ruvolo (4): TS-690: deal with optional tone board using TS-450 logic TS-690 does not implement the PC command to get/set output power level TS-690 does not implement the GT command to get/set AGC rate TS-690: bump version Christian Bayer (11): upstream 817 FT-817 power and SWR levels ft-857 power levels for 2m/70cm export correct function for wsjtx fixed cal table conversion added header use correct value divider update disable scaling fixed compile errors fixed merge errors and variable declarations Christoph Berg (2): ic7610: Re-add send_morse Implement netrigctl_stop_morse Christoph Nadig (1): Fix for setting power on Elecraft TRXs Chuck Hemker, N2POR (1): Use RIG_TARGETABLE_MODE in rig_set_mode and rig_get_mode Chuck Ritola (8): Use loop to ensure RS-HFIQ hears first command. Closes #730 Add ability to read TX drive level Implement board temperature reading for TEMP_METER Parse and store RS-HFIQ firmware version. Firmware version check before power meter query. Merge branch 'master' into rshfiq-aug2021 Map FCDPP LNA and Mixer Gain as PREAMP values. Closes #766 Map FCDPP LNA and Mixer Gain as PREAMP values. Closes #766 DJ3CE (1): Patch power reading of IC-705/-905 DL1YCF (6): Merge branch 'master' of https://github.com/Hamlib/Hamlib Merge branch 'master' of https://github.com/Hamlib/Hamlib Merge branch 'master' of https://github.com/Hamlib/Hamlib Merge branch 'master' of https://github.com/Hamlib/Hamlib Merge branch 'master' of https://github.com/Hamlib/Hamlib Merge branch 'master' of https://github.com/Hamlib/Hamlib Dale E. Edmons, KD7ENI (19): Added comments to commandline in rigctl (second time) --Dale Started TS-2000 update/overhaul --Dale Copied too much stuff, backed out what I broke. Bring ts2k.c more in line with current CVS. Changed ts2000.c to ts2000.h. Start of rig menuing functions. New file. Renamed ts2000.c.new ts2000.h Bring code more in line with CVS code. Changes often, so added status. Will delete when things stabilize. Corrected status to CVS branch. Renamed new ts2000.c to ts2000.h Wouldn't compile. Removed ts2k.c. Haven't got all new rig.h stuff removed. Temp kludge to make ts2k.c compile (keeps Hamlib from compiling!). Updated status. Added working TS-2000 files. There are some changes left out but this is the minimum I could commit and have a functional rig. The cost is that I've broken kylix and others that duplicate rig.h. I'm in the process of repairing the damage. Please be patient. I hope a day or so, but am asking for up to a week. E-mail me about *anything* you find broken. Kylix (and similar) is (are) known to not work. Changed name back to original. Had to re-run automake kenwood/Makefile. 1) Updated branch_ts2k with respect to HEAD. 2) Working ts2k_menu. (only in RIG_MODEL_TS2K) 3) Split TS-2000 into experimental and standard versions: RIG_MODEL_TS2000 = standard, RIG_MODEL_TS2K = experimental. 4) Basic command parser in tests/rc. Will open/close rig or copy a freq from one rig/vfo to another rig/vfo. Very cool. Very basic. Very experimental. 5) Added test programs. a) testcmd - calls parser (no command prompt yet!) b) testts2k - replacement for testrig (with trivial modification) c) testptt - testts2k/testrig should not transmit. TX stuff in testptt. 6) Used crowbar to merge HEAD into branch_ts2k. Working on clean-up. 7) I'm sure I've forgotten or neglected to mention some other stuff. Daniel Estévez (2): Fix DIG MODE for FT817-ND Fix DIG MODE for FT817-ND Daniele Forsi (5): Set the executable bits on py3test.py Fix spelling errors Fix more spelling errors Fix more spelling errors Fix typos Daniele Forsi IU5HKX (150): Fix a [missingInclude] "information" when running cppcheck --check-config The -M option needs an argument like its long version "multicast-addr" Fix lintian warning: macro 'RG' not defined Fix lintian warning: macro 'IN' not defined Fix spelling errors Remove unused includes related to times and dates Remove unused includes of math.h Remove unused includes Revert unwanted changes Remove unused includes of errno.h Remove unused include of amp_dummy.h Remove unused include of cm108.h Remove unused includes of fcntl.h Remove unused includes of frame.h Remove unused include of getopt.h Remove unused includes of gpio.h Remove unused includes of cal.h Remove unused include of usb_port.h Remove unused includes of ctype.h Remove unused include of stdbool.h Remove unused include of stdarg.h Remove unused include of stdlib.h [icom] Remove unused include of config.h [kenwood] Remove unused include of config.h [yaesu] Remove unused include of config.h [rotators] Remove unused include of config.h [tests] Remove unused include of config.h [rigs/*] Remove unused include of config.h [amplifiers] Remove unused include of config.h [extra] Remove unused include of config.h Add include/hamlib directory to all makefiles [icom] Fix includes [kenwood] Fix includes [yaesu] Fix includes [rigs/*] Fix includes [rotators] Fix includes [tests] Fix includes [amplifiers] Fix includes Update .gitignore Fix unterminated comment Fix include not found by cppcheck.sh Enable --show-conf for ampctl and ampctld Fix typos Fix include not found by cppcheck.sh also in the other branch of the "if" Fix passing one or more paths to ./cppcheck.sh Fix several cppcheck "missingInclude" informational messages Fix cppcheck "unmatchedSuppression" informational messages Add to .gitignore some files created during "make check" Fix cppcheck "missingInclude" informational message Fix Doxygen unmatched directives \cond and \endcond Fix Doxygen documentation for the Apex rotator Fix Doxygen documentation for the GRBLTRK rotators Fix typos Fix Doxygen comments Fix typos Remove duplicated conditions Fix initializer-overrides warnings by clang Fix typos Add/fix Doxygen comments Fix segfaults with malformed input and wrong command line arguments Fix segfaults with malformed input and wrong command line arguments Fix check for RIG_BUSBUSY Fix name of command in the usage and version texts Fix name of command in the version text Fix man page of rigctld Fix warning message for twiddle_rit Fix typos in man pages and other documentation Fix typos in comments Fix typos in messages Remove duplicated sentence Fix typos Remove unused and empty source files Fix typos Fix underline and italics Escape literal \n Fix usage of .EX Set parameter keywords bold, not their descriptions Add bold Fix my previous commit ("Add bold" d9545845) Ignore files related to tests Delete a generated file when doing make clean Delete a generated directory when doing make clean Make help strings more similar Remove duplicated text Fix groff syntax Fix list of parameters for get_func/set_func Fix list of parameters for get_level/set_level Fix list of parameters for get_parm/set_parm Add missing diagram Fix typos Sync text between man rigctl and man rigctld Add description for -w/--twiddle_rit Add missing arguments to command line options Remove unused command line short options -M and -N Add missing command line short option -b for --bind-all Add that passwords aren't implemented Add -b, --bind-all to --help text Remove duplicated cppcheck suppressions Fix typos Fix name of function in error messages Remove non-working compilation instructions from comments Remove duplicated line Fix Doxygen comment Fix typos Fix Doxygen comment Fix names of parameters in Doxygen comments Add documentation for RIG_CONF_END Add cross references hash mark for Doxygen Update the directory tree Remove old version numbers Update copyright year List more optional dependencies Explain how to use the simulators Fix compilation error in simid5100.c Fix compilation error in simicr8600.c Describe the use of simulators Also check the "name" parameter Fix syntax of #define Remove redundant dependencies Add rules to build dependencies of libhamlib.la in other directories Remove unneeded dependency Remove unneeded test script testcpp.sh Fix error return values Fix typo Replace non-portable make rule with one that is also easier to understand Fix --without-cxx-binding being ignored Remove duplicated assignment of compilation flags Fix --enable-winradio[=yes] being considered =no Fix --enable-parallel[=yes] being considered =no Fix --enable-html-matrix[=yes] being considered =no Fix --with-readline[=yes] being considered =no Fix --with-libusb[=yes] being considered =no Make usage texts more similar Document existing option to read commands from stdin Remove unused definition of -z command line option Fix definition of -B/--mapa2b command line option Allow to give the command lines options --list or --version Fix --with-indi[=no] being considered =yes Fix failure of ./configure --with-tcl-binding --with-xml-support Fix compilation errors and warnings and link failure Use the variable with the version number in the example path Fix typos Also mention amplifiers Remove duplicated comment Fix typo Fix typo Fix list of dependecies of aclocal.m4 Fix syntax error Fix typo Fix Doxygen tags Dario Ventura (3): New Prosistel rotor backend from IZ7CRX Add elevation code to Prosistel backend TS2000 Satellite mode and Gpredict Dariusz Bismor, SQ9KEJ (1): rigmem: implement CSV file loading David Brewerton M0EZP (1): FT990UNI patch contribution from M0EZP David Fannin (1): Submission for new backend model (134) for Yaesu FT-DX1200 Davide Gerhard (3): tests/{memcsv.c,memsave.c}: partially revert commit 4072f9f4 ic746.c: correct chanbuf length, fix channel structure and support split ic746.c: add ic746pro_set_channel() to load memory from csv Dawid SQ6EMM (3): Add method to build inside docker Let SEND_MORSE and SEND_VOICE_MEM be announced as capabilities. Allow \send_voice_mem to be used over network and tested in dummy rig Dawid Szymanski (2): ICOM Voice Keyer implemented. typo fix Dhiru Kholia (1): Minor fixes for FT-747GX simulator Diane Bruce, VA3DB (5): - first cut at fixing configure to recognise --without-tcl-binding and --without-python-binding options - gt_HEADER_INTTYPES_H is definitely bogus here, leftover from what? - document debian/FreeBSD needs for AUTOMAKE etc. - add in libtoolize which should be there - These should have been commented out. - Extra comma on RIG_STATUS_BUGGY can cause a compiler error. Dieter Röver (1): Fix bug in vfo_comp calculation in Hamlib Ekki Plicht (DF4OR) (2): New model Icom IC-R8600 Patch for Icom DCS code handling Eli Schwartz (1): tests: fix compilation with modern compilers Elliott Liggett (1): Added functionality for the IC-7300 auto antenna tuner Eriks Dobelis (2): ft817: adding delay before next retry after returning from tx to rx ft817: Moving delay value into #define section of the header Ervin Hegedus (9): RIG_PASSBAND_NORMAL wasn't handled correctly when rig_set_mode() was called - fixed Fixed SWIG `Setting a const char * variable may leak memory' error Fixed Kenwood filter cmd when passband is set to 500Hz Merged from upstream Merge branch 'master' of http://git.code.sf.net/p/hamlib/code Added Lua binding and demo script Added new example to Python demo script (set/get float type level) Change variable length argument handling in affected functions Fix two typos Ervin Hegedüs (1): rig.swg: New properly formatted macro Evgeniy Titorenko (1): Add Radant AZV-1 Rotator controller protocol. Francois Retief (21): Added read_serial function to read strings from a port. Corrected some comments Added code to hexdump to right align ASCII dump column added private caps for rig termination character add private caps and more commands. Changed to a new transaction function and adde quite a few commands. add private caps to store the termination character of Kenwood rigs commands. added a kenwood_init and _cleanup routine for priv caps & priv data. Added a new function: LCD Lamp ON/OFF (for Kenwood TH-7DA) check trn state of rig in rig_open. Initial commit of Kylix binding New backend for rotators New RPC backend for rotators Added rot_move function Fix macro name Added rot_move function Added easycomm and rpcrot backends Fixed circular dependency for rpc.rigd and rpc.rotd regenerated Added IC-910 rig. Added constants for the IC-910 rig. Frank Goenninger (8): Add ADAT ADT-200A backend adat updates from Frank, DG1SBG ADAT fixes on Windows RIG ADAT: Adaption to firmware 1.40fb and transverter board. .gitignore: Ignore some macOS housekeeping files. Major code cleanup. Replace dyn. memory by static memory usage. FIXED: Source code inconsistency after major code change. FIXED: Incorrect usage of snprintf() argument for buffer length. Frank Singleton, VK3FCS (165): Initial revision Initial revision *** empty log message *** *** empty log message *** *** empty log message *** Initial revision Initial revision *** empty log message *** *** empty log message *** added build_all ,cleanall and verify targets *** empty log message *** initial top level makefile add some things initial import initial import initial import fixed some typos use rig_open and rig_close added rig_open and rig_close fixed cmd_sat_on / off added sat-on and sat_off to test changed cmd_get_rx_status, must do tx also updated test() all reads use while (1) and break added ../common as object path added rig_open and rig_close using rig_open and rig_close and serial.h use common dir for serial stuff use ft747 on serial port /dev/ttyS0 read uses while(1) and break use while(1) and break added read_sleep use read_sleep now from serial.h using read_sleep from serial.h had rx and tx status swapped (document error?) removed cmd_get_update using CVS instead of RCS directories use MODE_xx defines cannot use const int in case statements ?? so use #define instead use #defines for MODE_XXX used in case statements working out freq conversion, unfinished playing with test routines long int cmd_get_freq_mode_status_main_vfo(int fd, unsigned char *mode); long int cmd_get_freq_mode_status_main_vfo(int fd, unsigned char *mode) frq = cmd_get_freq_mode_status_main_vfo(fd, &mode); starting with the cmd_set commands now starting on cmd_set commands now starting on cmd_set_freq commands now add scanning todo now set sat rx and tx freq and mode also fix typo dump raw hex data when writing and reading trying some cms_set_freq_xxx commands added routines for dec <-> packed decimal conversion minor added generic hex dump routine, static void dump_hex(unsigned char *ptr, int size, int width); removed unwanted debug printf's removed dump_hex from here.. calc_freq_from_packed4 is about to be replaced calc_packed_from_char and calc_char_from_packed now here cleanup cleanup void dump_hex(unsigned char *ptr, int size, int width); adding dcs tables and repeater offset in Hz describe faulty yaesu documentation added README.license for GPL added GPL license info included full GPL license Updated docs to point to http://sourceforge.net/projects/hamlib/ and added a C code snippet on how to use the API. added -I$(COMMON_DIR) to find rig.h added -I$(COMMON_DIR) to find rig.h adding capabilities initial capabilities stuff starting to add rig_caps stuff starting to add rig_caps stuff starting to add rig_caps stuff. added GPL stuff and comments adding rig_caps stuff adding rig_cap stuff adding rig_caps stuff add capabilities and preferences adding rig_caps functionality adding rig_caps stuff frontend reduction on backend function namespace - phew !! frontend API clarification removed old open_port2() using old rig_caps fixed some typos, added 3 more candidates for API missing ; in some enums converting to frontend/backend structure compiles ok removed open_port() and write_block() removed open_port() and write_block() fixed typos, added &ft747_caps in rig_caps changing to frontend/backend style converting to frontend/backend style added 3 more cmd_* for API examples Example of setting rig Main VFO to 439.700 Mhz FM cleanup comments added extern const struct rig_caps ft747_caps; still thinking about set/get strategy minor updates added extra rig caps added some set/get examples with return code checking added testrig to Makefile, no linking yet added usleep to read_sleep() updated rig_caps structure *** empty log message *** test making a shared lib (at last) for the frontend - more todo test making a shared lib for the frontend - make hamlib describe frontend/backend structure updated code snippet example started ft747_set_ptt and ft747_set_vfo starting to implement set/get pairs added typedef enum ptt_type_e ptt_type_t; added VFO types to enum starting on libhamlib Makefile, added ./lib and ./include under common make, make install, and make clean work ok, using ./lib and ./include directories also. make, make install, and make clean work ok, using ./lib and ./include directories also. removed "make verify". Added reference to common/Makefile added printf("testrig:main() has been called \n"); for testing linking makefile for testing testrig linking alternative rig_base declaration removes references to rig_caps at compile time. should populate it another way -- FS added printf's to confirm rig.c (hamlib) is being called ok better libhamlib.so version :-) added ft847_open and ft847_close to enable CAT ON/OFF added ft747_open and ft747_close updated lib names for backend to libhamlib-xxxxx.so API updates - added set/get_mode merge with TRN stuff and add some set/get_mode and vfo stuff added post_write_delay cvs mails to hamlib-cvs-digest cvs mail update works ok :-) minor fixes updated ptt/mode/vfo added set/get freq to use generic bcd etc more set_freq() examples 1. Added VFO as target for some set/get cmds. 2. ./testrig still runs ok using RIG_VFO_CURR. minor update to active VFO handling in _set_vfo some new defines for FT747_VFO_A/B minor updates to active vfo handling added ptt handling example, stand back ! trying different approach to storing cmd sequence. _set_ptt is being converted. Needs tidying up though. Some sequences are complete, and can be read from static data. Incomplete sequences will eventually be copied form static declaration, and completed in priv data. Removed static stuff from functions. Also, begin to implement table driven command translation from API to rig native. priv now contains a cmd table that is used for backend commands towards rig. Added some new freq/mode combinations. converting ft847 to table driven, similar to ft747. more table driven stuff for ft847. cat/ptt/freq being converted. Added ft847_send_priv_cmd(), converted some part of API to use this. Added _set_mode to work now. TODO: put _send_priv_cmd into yaesu.[ch] so ft747 can use also. Turned on PTT also (stand back).. rig_cleanup and rig_close not calling backend removed unused calc_ functions. removed old API functions, general cleanup tested rig_close and rig_cleanup Initial release, common yaesu declareations etc. add version tag nseq uses YAESU_CMD_LENGTH Initial yaesu Makefile Moved from ft747 and ft847 dirs common yaesu handling common yaesu dir Begin to use common yaesu code general cleanup, added _send_priv_cmd added targetable_vfo value to caps minor cleanup ChangeLog history started Initial import for ChangeLog handling starting to convert rig struct to readable form more of convert rig struct to readable form Changelog update for HAMLIB-1.1.1 GeoBaltz (1): Merge branch 'master' into rp12 George Baltz N3GB (194): Add missing level definitions for TS-590SG Add routine to check input to <brand>_set_level ATTenuator level 0 should always be allowed - to turn it off. First round of level_gran additions. Do the check for min=max=0 the right way. Round 2. Enable first user of check_level_param Round 3 of level_gran updates. Remove hard-coded constants. Enable full level checking for TS-890S. Add default level values for Elecraft rigs. Update RIG_LEVEL_READONLY_LIST. Round 4 of level_gran updates. Fix the comment about float levels. Add Elecraft defaults to makefile. Fix typos (missing '('s ) in man pages. Add missing commands to man pages Avoid NULL dereference in debug statement. Use level_gran[] values in kenwood_get_level. Still more level_gran data. Yet more missing level defs. Enable level_gran[] checking for all calls to kenwood_set_level. Add basis for level_gran use in newcat.c Convert set/get AF, RF to use level_gran info. Convert MICGAIN to level_gran Convert COMP Convert ANTIVOX & VOXGAIN New for old - update level_gran for ft9000Old Fix segfault on rigctl exit Convert SQL to use level_gran data. Convert MONITOR_GAIN Convert RFPOWER to level_gran usage Convert NR to use level_gran Fix inverted VHF/UHF BANDSELECT labels Fix duplicate level definition Add RIG_LEVEL_USB_AF_INPUT to RIG_LEVEL_FLOAT_LIST Implement RIG_LEVEL_USB_AF[_INPUT] for TS-890S Enable set_level checking for all Yaesu/newcat rigs. Replace hard coded constants with table values f conversion already rounds, so no external rounding needed. Move meter reader to kenwood.c, so it can be used by ts990.c Use general meter reader to get SWR value for TS-990. Revert "Fix FTDX101MP RFPOWER to allow 200W" Unnecessary code, breaks other levels. Fix FTDX101MP RFPOWER the right way. Restore shared library ABI compatibility with previous hamlibs Add basic support for transparent access to port structures. More Kenwood rigs ported to new access macros. Convert the remaining files in rigs/kenwood/ Define different (disambiguated) names for external use. Fix copy/paste errors in xiegu.c More typos/copy/paste errors in rigs/icom Add cache to the MACRO/porting list Implement function to get structure address Function to get amplifier port address Convert src/amplifier.c to new MACROs/access method. Add function to get rotator port address(es) Port conf.c to use access macros Convert more files in src/ Pointerize all the ports in src/rig.c Need more parens to work in expressions. Update example.c Avoid using raw rigport, in two different ways. Fix variable name. Implement ctcss tone for TS-890S. Fix off by one error in tones for TS-590/890/990 Fix some rigs I found docs for - more needed Add funcs to set/clear TONE/CTCSS modes for TS-890S Add remaining rigs, matching old behavior. Fix copy/paste foulup. Drat. Fix more copy/paste SNAFUs Update NEWS with pointer conversion macros. Make simulator match the Real World(TM) Add missing P4 Repair RIG_LEVEL_STRENGTH Add calibration table for TS-890S RFPOWER_METER_WATTS Bring simts890.c a little closer to the real thing Still needs more work. Fix icom_set_powerstat() to correctly save&restore rp->retry, rp->timeout_retry Convert some cache references to pointers Convert a few more cache pointers Cache pointers for src/rig.c Issue #1420 again. Convert rot_conf.c and amp_conf.c to pointers Update dcdport usage in tests/*.c Issue #1445 Play catchup with split/VFO revision. Fix typos in rebase fixups. Start converting rigs/* This commit does rigs/adat/, rigs/alinco/ and rigs/aor/. Port rigs/anytone/, rigs/barrett/ and rigs/codan/ Fixup git rebase SMerge error. Convert rigs/dorji, rigs/drake, rigs/elad. Convert rigs/dummy/ Convert rigs/flexradio, rigs/gomspace, rigs/jrc, rigs/kachina Convert rigs/icom/, rigs/kit/ Convert rigs/loew/, rigs/pcr/, rigs/prm80/, rigs/racal/ and rigs/rs/ Convert rigs/mds/, rigs/skanti/, rigs/tapr/ and rigs/tentec/ Do rigs/tuner/, rigs/uniden/, rigs/winradio/ & rigs/wj/ Convert rigs/yaesu Minor cleanup of ts890.c Update simts890.c Make IF return RX/TX status Document IF data, reformat IF & SF commands Convert all port references in amplifiers/ to pointers. Convert first part of rotators/ Finish rotators/ Add STATE to the list of pointers Convert tests/* to pointers Finish tests/* Update some of rigs/* to use pointer to cache Use pointers for all cache references in rigs/* All struct rig_cache referenced converted to pointers. Start converting rigs/* to use pointers to state More pointers to state More pointers to state Pointerize all state references in rigs/kenwood/* Add macros for amplifier and rotator state pointers. Fix incorrect port read for elevation Normalize some debug/trace output. More state pointer changes Convert macros in rig.h to use STATE() More state pointer changes Still more state pointer conversions. More state pointers - mostly sed i Pointerize state references in Tentec rigs. And another batch... Use sed -i on all in rigs/kit/ More sed -i with manual fixups. Convert all of rigs/* except rigs/icom and rigs/yaesu First set of rigs/icom/* state pointer macros. Convert rigs/icom/icom.[ch] First batch of state pointers in rigs/yaesu/ Next batch of state pointers Convert newcat.c FIx the stragglers Revert "Fix rotorez set_conf in both rotctl and rotctld -- since it needs to be done after rot_open" Definitions, storage and infrastructure for queuing config commands Implement the first user of the deferred set_conf entries. Fix other rotators that try to do I/O before open. Finish all port initialization before allowing I/O. Balance ENTERFUNC/RETURNFUNC, ENTERFUNC2/RETURNFUNC2, ELAPSED1/ELAPSED2 usage Balance ENTERFUNC/RETURNFUNC usage More of the balancing act. More balancing Finish balancing Get rid of some false positives for func_chk Fix func_chk to do useful things Fix ENTERFUNC/RETURNFUNC imbalances found by repaired func_chk More pointer conversions for rig->state. More pointerizations in src/* Convert all rig->state. references in src/rig.c to pointers. Play catch-up with recent code. Use pointers for amp->state references Use macros/pointers for rot->state references More amplifier and rotator state changes Yet another batch of state pointers Catch up with latest code Balance new code. Fix wrong error message for SF1 command. Make SNPRINTF do something useful for Hamlib Remove dead code Declare local functions as local Implement rig_get_clock for TS-890S Fix wrong utc_offset Use a reliable source for TZ offset Add just enough to simts890.c to fake kenwood_get_clock. Tweaks to simts890.c Fix negative fractional UTC offsets Implement kenwood_set_clock Fix command lengths for TS-890S set/get_antenna. Still more tweaks to simts890.c Replace raw write() calls with macro More fixes for simts890.c Reduce dependency on include/hamlib/rig.h Convert VFOs into objects(structs). Get rid of ghost commands. More VFOs as objects. Change FA/FB/SF to use band memories Implement step sizes for some freq changes Add DN/UP, FC, and UD commands to simts890.c Correct some split problems and connect VFO ops Clean up Make FR & FT commands aware of new vfo structs. Add traffic tracing to simts890.c Annotate legacy (undocumented) commands in simts890.c Add RIT/XIT commands (FS, RC, RD/RU, RF, RT, XT) to simts890.c Astyle simts890.c Update TS-890S and TS-990S RIT/XIT handling Factor out TS-890S and TS-990S from kenwood_get_split_vfo_if() MACROize new code. Minimal support for KY commands in simts890.c Use short (i.e., variable length) messages in kenwood_send_morse() Fix porting unneeded code Fix unbalanced ENTERFUNC/RETURNFUNC pairs in icom.c Fix the easy parts of missing thread locks Replace rs->multicast->mutex with a dedicated mutex for the API. Add locking to rig_stop_morse Fix timeout in kenwood_stop_morse Minor cleanups/fixes Add dates for recent releases Drop redundant token lookups. Make local functions static. Enable rig_vfo_op for TS-890S Add locking around get/set levels Fix out of sequence merge for issue #1634 Fix backward frequency tests in ft857.c Pass spectrum data through to callback Don't start async_data_handler until rig is fully opened. Update NEWS Georges Auberger (1): Add product id for CM119B chip. Used in KURI adapter designed by W7NX. Gerardo Richarte (1): gs232b.c: Improve get_position string parsing Gisle Vanem (1): Enable verbose mode in bindings/pytest.py Greg Troxel (1): Warning about dodgy code in drake.c HB9EIK (4): Initial release ELAD FDM DUO Update ELAD files Update build system for ELAD backend Update copyright for fdm_duo.c Hans Van Ingelgom (1): Added Peaberry V1 and V2 models Hegedüs Ervin (4): Merge branch 'master' of http://git.code.sf.net/p/hamlib/code Check SWIG string functions for some languages Leave off multiply 'typedef const char * const_char_string' definition (in rig.swg and rotator.swg) Fixed int[10] type variable error in bindings Jae Stutzman (5): Added HPSDR backend Clears potential garbage data in read buffer prior to command being sent Updated PiHPSDR backend defaults Use Windows ioctlsocket to avoid buffer overrun Added new AGC control for PiHPSDR James Watson, HZ1JW (2): Added ic7200 to icom Corrected modes in ic7200.c Jaroslav Skarvada (2): Fix hardcoded pcconfig libdir Fix serial_port DCD squelch Jeroen Vreeken (9): Add support for GPIO PTT. Add missing breaks and improve error messages Add Dorji DRA818 modules (VHF and UHF variants) Also works with NiceRF SA818 modules Merge branch 'master' of git://git.code.sf.net/p/hamlib/code Small fixes to DRA818 volume handling Add GPIO and GPION options for DCD. Also bump abi version since the config params struct needed resizing. Merge branch 'master' of github.com:Hamlib/Hamlib GPIO working after debugging Merge branch 'master' of github.com:Hamlib/Hamlib Johan Ström (1): Backup serial options on open, restore on close John Paul Adrian Glaubitz (1): dummy/dummy.c: Fix unaligned access in dummy_get_level() Jonathan Bastien-Filiatrault (3): Correct FT; command that does not exist on the FT-891. Allow setting split mode without smashing the VFOB frequency. Scale power values correctly for Yaesu FT-891. Jonny public (1): ether6: New rotor backend from Jonny, DG9OAA Joop Stakenborg, PG4I (116): update (kenwood is not a WIP anymore) first implementation of kenwood_get_ptt enable get_ptt for this rig add get_ptt for this rig additional protocol checks and cleanups fix signal strength add RIG_LEVEL_RFPOWER fix_compilation add rit capabilities bring comands in sync with other kenwood rigs add rit capabilities send_morse added explain set_rit fix get_ctcss_tone by using IF command typo add xit capabilities add set_level and get_level bring rig in sync with other kenwood rigs bump version numbers nothing returned by the rig for these commands fix get_level_agc fix set_level_agc getting in sync with the debian 1.1.2 package remove template files initial checkin make this NMU for now correct the path for copying files in the apropriate package do not install the old changelog versioning not used move .la, .a, .so files to the correct package include rpc.rigd and rpc.rotd include pkgconfig support don't create shlibs file for drake, jrc and easycomm libraries move hamlib1 to the top so the documentations gets installed correctly make building easier, call autogen.sh INSTALL file not used build the documentation package we don't have to call configure twice cleanup remove some build dependencies and don't call autogen.sh ts450s uses IF command for get_vfo, get_freq and get_mode minor bugfix, bump to beta add CWR and RTTYR this rig does not have a command for reading IF bandwidth retrieve passband with FW command passband should be calculated after mode is set use rig_passband_normal here various lintian fixes one last lintian fix use FW command to set bandpass cw filters for normal, narrow and wide more filters get_mode and set_mode for this rig filters some comments correct rit add get_level cleanups more modes set_level for this rig should use kenwood_get_freq minor bug add rpm support need hamlib.spec for 'make rpm' make rpm will fail with a '-' in the version number a working spec file update debian build for rotorez and fodtrack, minor fixes unofficial fix the debian build script, new maintainer update the debian build tree to the latest correct baudrate for the ts-950, use the information field IF for get_vfo by default (supported by most kenwood rigs), ts870s will use the much shorter FR command for get_vfo correct baudrate for some rigs and add ts-950 to the id_list ts-850 returns ID 009 according to martin, OK1RR fix 'make rpm' build for hamlib-1.1.5 not needed sync with latest debian package and add tcl, c++, python and perl bindings correct spelling s-meter calibration by Matt Dawson basic functionality by Matt Dawson, tested with grig and xlog lifetime e-mail address :-) sync with latest debian release more... [truncated message content] |
From: n0nb <n0...@us...> - 2025-06-10 01:03:24
|
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 371db9ffd2ef86637ba31a1445edce2f24a36904 (commit) from ff72e8eef28045194a9284c1fba8a5f9c71f2ea9 (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 371db9ffd2ef86637ba31a1445edce2f24a36904 Author: Nate Bargmann <n0...@n0...> Date: Mon Jun 9 19:52:44 2025 -0500 Release 4.6.3 diff --git a/configure.ac b/configure.ac index 442b8354a..06542cdad 100644 --- a/configure.ac +++ b/configure.ac @@ -14,7 +14,7 @@ dnl Please do not use '-' in the version number, as package managers will fail, dnl however, the use of '~' should be fine as apt (others?) will treat dnl it as an earlier version than the actual release. TNX KA6MAL dnl PACKAGE_NAME + " " + PACKAGE_VERSION must not exceed 20 chars! -AC_INIT([Hamlib],[4.6.3~rc3],[ham...@li...],[hamlib],[http://www.hamlib.org]) +AC_INIT([Hamlib],[4.6.3],[ham...@li...],[hamlib],[http://www.hamlib.org]) #AC_INIT([PRODUCT_NAME], [Hamlib]) #AC_DEFINE([Hamlib], [PRODUCT_VERSION_RESOURCE]) ----------------------------------------------------------------------- Summary of changes: configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-06-09 19:09:34
|
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 93434b6523e966e86fa06bd98d4be1cfafea4e98 (commit) via 39a1a367e1f45b80df63ec527fec7a462ee98012 (commit) via c3d21b477ee2cba30808d1252ecd6d7fbc44f987 (commit) via 32b57107f40f14c62631ef52aad777687f187604 (commit) via 5087894d7166d121a02bc9347bdd216258fe7f3b (commit) from 7b60cb586dc6b1f76bd85bceba42dac373159914 (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 93434b6523e966e86fa06bd98d4be1cfafea4e98 Author: George Baltz N3GB <Geo...@gm...> Date: Mon Jun 9 05:26:07 2025 -0400 Put k3.c back in the right order And make one more func static diff --git a/rigs/kenwood/k3.c b/rigs/kenwood/k3.c index 29423315b..4a9064b9b 100644 --- a/rigs/kenwood/k3.c +++ b/rigs/kenwood/k3.c @@ -165,9 +165,13 @@ static int k3_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status); static int k3_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op); static int k3_power2mW(RIG *rig, unsigned int *mwpower, float power, freq_t freq, rmode_t mode); +static int kx3_get_bar_graph_level(RIG *rig, float *level); +static int k3_send_voice_mem(RIG *rig, vfo_t vfo, int ch); +static int k3_stop_voice_mem(RIG *rig, vfo_t vfo); +static int k3_stop_morse(RIG *rig, vfo_t vfo); /* Private helper functions */ -int set_rit_xit(RIG *rig, shortfreq_t rit); +static int set_rit_xit(RIG *rig, shortfreq_t rit); static int k3_set_nb_level(RIG *rig, float dsp_nb, float if_nb); static int k3_get_nb_level(RIG *rig, float *dsp_nb, float *if_nb); static int k3_get_bar_graph_level(RIG *rig, float *smeter, float *pwr, float *alc, @@ -191,11 +195,6 @@ static int k4_stop_morse(RIG *rig, vfo_t vfo); * Part of info comes from http://www.elecraft.com/K2_Manual_Download_Page.htm#K3 * look for K3 Programmer's Reference PDF */ -static int kx3_get_bar_graph_level(RIG *rig, float *level); -static int k3_send_voice_mem(RIG *rig, vfo_t vfo, int ch); -static int k3_stop_voice_mem(RIG *rig, vfo_t vfo); -static int k3_stop_morse(RIG *rig, vfo_t vfo); - struct rig_caps k3_caps = { RIG_MODEL(RIG_MODEL_K3), @@ -2611,7 +2610,7 @@ static int k3_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status) * RIT/XIT to an arbitrary offset. When rit == 0, the RIT/XIT offset is * cleared. */ -int set_rit_xit(RIG *rig, shortfreq_t rit) +static int set_rit_xit(RIG *rig, shortfreq_t rit) { int err; commit 39a1a367e1f45b80df63ec527fec7a462ee98012 Author: George Baltz N3GB <Geo...@gm...> Date: Sat Jun 7 21:22:13 2025 -0400 Get rid of a few more style infractions. Update NEWS. diff --git a/NEWS b/NEWS index ab7ec0bc7..19410006c 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,8 @@ 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 * Remove dead getopt code. GitHub PR #1709. (TNX Daniele Forsi) * Move rig_cache to separate(calloc) storage. Prepare for other moves. Issue #1420 @@ -25,8 +27,8 @@ Version 4.6.3 five years from 2020 to 2025. Mike passed away on March 28, 2025 due to complications from ALS (Lou Gehrig's disease). - * JRC: Removed RIG_FUNC_FAGC from 535D as erroneous, Added RIG_FUNC_NB2 - functionality to both 535D and 545. (TNX Mark Fine) + * JRC: Removed RIG_FUNC_FAGC from 535D as erroneous, Added RIG_FUNC_NB2 + functionality to both 535D and 545. (TNX Mark Fine) * Restore IC-7300 spectrum data callback - regression in 4.6 (n3gb) * Add locking to rig_[gs]et_level() - fixes sending CW from tlf (n3gb) * Fix attempt to use memory returned by setlocale() after being freed (TNX Mooneer Salem) diff --git a/rigs/adat/adat.c b/rigs/adat/adat.c index e23002184..fccda1946 100644 --- a/rigs/adat/adat.c +++ b/rigs/adat/adat.c @@ -2170,7 +2170,6 @@ int adat_cmd_fn_set_freq(RIG *pRig) } else { - // cppcheck-suppress constVariablePointer const adat_priv_data_ptr pPriv = (adat_priv_data_ptr) STATE(pRig)->priv; char acBuf[ ADAT_BUFSZ + 1 ]; @@ -2226,7 +2225,6 @@ int adat_cmd_fn_set_vfo(RIG *pRig) } else { - // cppcheck-suppress constVariablePointer const adat_priv_data_ptr pPriv = (adat_priv_data_ptr) STATE(pRig)->priv; char acBuf[ ADAT_BUFSZ + 1 ]; @@ -2350,7 +2348,7 @@ int adat_cmd_fn_set_ptt(RIG *pRig) else { adat_priv_data_ptr pPriv = (adat_priv_data_ptr) STATE(pRig)->priv; - char *pcPTTStr = NULL; + const char *pcPTTStr = NULL; // Switch PTT @@ -2690,7 +2688,6 @@ const char *adat_get_info(RIG *pRig) if (nRC == RIG_OK) { - // cppcheck-suppress constVariablePointer const adat_priv_data_ptr pPriv = (adat_priv_data_ptr) STATE(pRig)->priv; snprintf(acBuf, 2048, @@ -2774,7 +2771,6 @@ int adat_get_freq(RIG *pRig, vfo_t vfo, freq_t *freq) } else { - // cppcheck-suppress constVariablePointer const adat_priv_data_ptr pPriv = (adat_priv_data_ptr) STATE(pRig)->priv; nRC = adat_transaction(pRig, &adat_cmd_list_get_freq); @@ -2932,7 +2928,6 @@ int adat_get_mode(RIG *pRig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) } else { - // cppcheck-suppress constVariablePointer const adat_priv_data_ptr pPriv = (adat_priv_data_ptr) STATE(pRig)->priv; nRC = adat_transaction(pRig, &adat_cmd_list_get_mode); @@ -2975,7 +2970,6 @@ int adat_get_vfo(RIG *pRig, vfo_t *vfo) } else { - // cppcheck-suppress constVariablePointer const adat_priv_data_ptr pPriv = (adat_priv_data_ptr) STATE(pRig)->priv; nRC = adat_transaction(pRig, &adat_cmd_list_get_vfo); @@ -3055,7 +3049,6 @@ int adat_get_ptt(RIG *pRig, vfo_t vfo, ptt_t *ptt) } else { - // cppcheck-suppress constVariablePointer const adat_priv_data_ptr pPriv = (adat_priv_data_ptr) STATE(pRig)->priv; nRC = adat_transaction(pRig, &adat_cmd_list_get_ptt); @@ -3316,7 +3309,6 @@ int adat_get_conf(RIG *pRig, hamlib_token_t token, char *val) } else { - // cppcheck-suppress constVariablePointer const adat_priv_data_ptr pPriv = (adat_priv_data_ptr) STATE(pRig)->priv; switch (token) diff --git a/src/rig.c b/src/rig.c index 5d83546eb..951d1c004 100644 --- a/src/rig.c +++ b/src/rig.c @@ -269,7 +269,7 @@ typedef struct async_data_handler_priv_data_s static int async_data_handler_start(RIG *rig); static int async_data_handler_stop(RIG *rig); -void *async_data_handler(void *arg); +static void *async_data_handler(void *arg); #endif #if defined(HAVE_PTHREAD) @@ -289,7 +289,7 @@ typedef struct morse_data_handler_priv_data_s static int morse_data_handler_start(RIG *rig); static int morse_data_handler_stop(RIG *rig); int morse_data_handler_set_keyspd(RIG *rig, int keyspd); -void *morse_data_handler(void *arg); +static void *morse_data_handler(void *arg); #endif /* @@ -390,7 +390,7 @@ MUTEX(mutex_debugmsgsave); void add2debugmsgsave(const char *s) { - char *p; + const char *p; char stmp[DEBUGMSGSAVE_SIZE]; int i, nlines; int maxmsg = DEBUGMSGSAVE_SIZE / 2; @@ -2134,7 +2134,6 @@ int rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq) if (rs->tx_vfo == vfo && curr_band != last_band) { - struct rig_cache *cachep = CACHE(rig); rig_debug(RIG_DEBUG_VERBOSE, "%s: band changing to %s\n", __func__, rig_get_band_str(rig, curr_band, 0)); band_changing = 1; @@ -4714,7 +4713,7 @@ int HAMLIB_API rig_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) const struct rig_state *rs; struct rig_cache *cachep; int retcode, rc2; - vfo_t curr_vfo, tx_vfo = RIG_VFO_CURR; + vfo_t curr_vfo, tx_vfo; freq_t tfreq = 0; if (CHECK_RIG_ARG(rig)) @@ -8629,7 +8628,7 @@ static int morse_data_handler_stop(RIG *rig) #endif #if defined(HAVE_PTHREAD) -void *async_data_handler(void *arg) +static void *async_data_handler(void *arg) { struct async_data_handler_args_s *args = (struct async_data_handler_args_s *) arg; @@ -8725,7 +8724,7 @@ again: #endif #if defined(HAVE_PTHREAD) -void *morse_data_handler(void *arg) +static void *morse_data_handler(void *arg) { struct morse_data_handler_args_s *args = (struct morse_data_handler_args_s *) arg; diff --git a/tests/rigctl.c b/tests/rigctl.c index e04ff7e8f..7b224575a 100644 --- a/tests/rigctl.c +++ b/tests/rigctl.c @@ -220,7 +220,7 @@ int main(int argc, char *argv[]) ptt_type_t ptt_type = RIG_PTT_NONE; dcd_type_t dcd_type = RIG_DCD_NONE; int serial_rate = 0; - char *civaddr = NULL; /* NULL means no need to set conf */ + const char *civaddr = NULL; /* NULL means no need to set conf */ char conf_parms[MAXCONFLEN] = ""; int interactive; /* if no cmd on command line, switch to interactive */ int prompt = 1; /* Print prompt in rigctl */ @@ -507,7 +507,7 @@ int main(int argc, char *argv[]) } my_rig->caps->ptt_type = ptt_type; - char *token = strtok(conf_parms, ","); + const char *token = strtok(conf_parms, ","); struct rig_state *rs = STATE(my_rig); while (token) @@ -564,7 +564,7 @@ int main(int argc, char *argv[]) if (ptt_type == RIG_PTT_NONE) { rig_debug(RIG_DEBUG_VERBOSE, "%s: defaulting to RTS PTT\n", __func__); - my_rig->caps->ptt_type = ptt_type = RIG_PTT_SERIAL_RTS; + my_rig->caps->ptt_type = RIG_PTT_SERIAL_RTS; } } @@ -690,7 +690,14 @@ int main(int argc, char *argv[]) hist_path_size = sizeof(char) * (strlen(hist_dir) + strlen(hist_file) + 1); hist_path = (char *)calloc(hist_path_size, sizeof(char)); - SNPRINTF(hist_path, hist_path_size, "%s%s", hist_dir, hist_file); + if (hist_path) + { + SNPRINTF(hist_path, hist_path_size, "%s%s", hist_dir, hist_file); + } + else + { + fprintf(stderr, "Allocation failed - no readline history\n"); + } } if (rd_hist && hist_path) diff --git a/tests/rigctld.c b/tests/rigctld.c index 4435c26ca..a57ab497b 100644 --- a/tests/rigctld.c +++ b/tests/rigctld.c @@ -256,7 +256,7 @@ int main(int argc, char *argv[]) ptt_type_t ptt_type = RIG_PTT_NONE; dcd_type_t dcd_type = RIG_DCD_NONE; int serial_rate = 0; - char *civaddr = NULL; /* NULL means no need to set conf */ + const char *civaddr = NULL; /* NULL means no need to set conf */ char conf_parms[MAXCONFLEN] = ""; struct addrinfo hints, *result, *saved_result; @@ -573,7 +573,7 @@ int main(int argc, char *argv[]) } my_rig->caps->ptt_type = ptt_type; - char *token = strtok(conf_parms, ","); + const char *token = strtok(conf_parms, ","); struct rig_state *rs = STATE(my_rig); while (token) @@ -643,7 +643,7 @@ int main(int argc, char *argv[]) if (ptt_type == RIG_PTT_NONE) { rig_debug(RIG_DEBUG_VERBOSE, "%s: defaulting to RTS PTT\n", __func__); - my_rig->caps->ptt_type = ptt_type = RIG_PTT_SERIAL_RTS; + my_rig->caps->ptt_type = RIG_PTT_SERIAL_RTS; } } commit c3d21b477ee2cba30808d1252ecd6d7fbc44f987 Author: George Baltz N3GB <Geo...@gm...> Date: Fri Jun 6 15:31:46 2025 -0400 Add build directory search for includes to cppcheck.sh Try to find the build location if you build out of tree. Not a very thorough sesrch, just enough to find it on my system. Needs local customization for the general case. Also fix missing ", delete config statement with bad syntax. diff --git a/cppcheck.sh b/cppcheck.sh index 83ecda000..e55f20164 100755 --- a/cppcheck.sh +++ b/cppcheck.sh @@ -5,6 +5,19 @@ set -x # There are things that could still be done...especially in the C++ area echo "Ideally there should be no errors or warnings" +# We need the generated include files, not just the base +# If this is not the build directory, try to find one +BUILDINC="" +if ! test -f Makefile; then + # Find mine, YMMV + if test -d build; then + BUILDINC="-I build/src -I build/include -I build/include/hamlib" + # Put code here to find your build directory and set BUILDINC + else + echo "Unknown build directory, some includes won't be found" + fi +fi + # We do suppress some errors which are expected or other code # There are quite a few C++ items to take care of still if anybody cares SUPPRESS="\ @@ -23,7 +36,7 @@ SUPPRESS="\ --suppress=*:extra/gnuradio/wfm.h \ --suppress=*:extra/gnuradio/gnuradio.cc \ --suppress=missingIncludeSystem \ ---suppress=*:style/rigs/adat/adat.c +" #CHECK="\ #-D RIG_LEVEL_LINEOUT=1 \ @@ -83,6 +96,7 @@ if test $# -eq 0 ; then -I include/hamlib/ \ -I lib \ -I security \ + $BUILDINC \ -q \ --force \ --enable=all \ @@ -100,6 +114,7 @@ else -I include/hamlib/ \ -I lib \ -I security \ + $BUILDINC \ -q \ --force \ --enable=all \ commit 32b57107f40f14c62631ef52aad777687f187604 Author: George Baltz N3GB <Geo...@gm...> Date: Thu Jun 5 14:13:14 2025 -0400 More static and const additions. diff --git a/rigs/icom/ic7300.c b/rigs/icom/ic7300.c index 3c495563b..ac867a311 100644 --- a/rigs/icom/ic7300.c +++ b/rigs/icom/ic7300.c @@ -42,9 +42,9 @@ int ic7300_set_clock(RIG *rig, int year, int month, int day, int hour, int ic7300_get_clock(RIG *rig, int *year, int *month, int *day, int *hour, int *min, int *sec, double *msec, int *utc_offset); -int ic9700_set_clock(RIG *rig, int year, int month, int day, int hour, +static int ic9700_set_clock(RIG *rig, int year, int month, int day, int hour, int min, int sec, double msec, int utc_offset); -int ic9700_get_clock(RIG *rig, int *year, int *month, int *day, +static int ic9700_get_clock(RIG *rig, int *year, int *month, int *day, int *hour, int *min, int *sec, double *msec, int *utc_offset); @@ -2165,7 +2165,7 @@ int ic7300_get_clock(RIG *rig, int *year, int *month, int *day, int *hour, } // if hour < 0 then only date will be set -int ic9700_set_clock(RIG *rig, int year, int month, int day, int hour, int min, +static int ic9700_set_clock(RIG *rig, int year, int month, int day, int hour, int min, int sec, double msec, int utc_offset) { int cmd = 0x1a; @@ -2219,7 +2219,7 @@ int ic9700_set_clock(RIG *rig, int year, int month, int day, int hour, int min, return retval; } -int ic9700_get_clock(RIG *rig, int *year, int *month, int *day, int *hour, +static int ic9700_get_clock(RIG *rig, int *year, int *month, int *day, int *hour, int *min, int *sec, double *msec, int *utc_offset) { int cmd = 0x1a; diff --git a/rigs/icom/ic7600.c b/rigs/icom/ic7600.c index 07eb0bc56..2397d769d 100644 --- a/rigs/icom/ic7600.c +++ b/rigs/icom/ic7600.c @@ -172,7 +172,7 @@ static const struct icom_priv_caps ic7600_priv_caps = // if hour < 0 then only date will be set -int ic7600_set_clock(RIG *rig, int year, int month, int day, int hour, int min, +static int ic7600_set_clock(RIG *rig, int year, int month, int day, int hour, int min, int sec, double msec, int utc_offset) { int cmd = 0x1a; @@ -226,7 +226,7 @@ int ic7600_set_clock(RIG *rig, int year, int month, int day, int hour, int min, return retval; } -int ic7600_get_clock(RIG *rig, int *year, int *month, int *day, int *hour, +static int ic7600_get_clock(RIG *rig, int *year, int *month, int *day, int *hour, int *min, int *sec, double *msec, int *utc_offset) { int cmd = 0x1a; diff --git a/rigs/icom/ic7610.c b/rigs/icom/ic7610.c index a468066cb..a5de29ed8 100644 --- a/rigs/icom/ic7610.c +++ b/rigs/icom/ic7610.c @@ -253,7 +253,7 @@ static const struct icom_priv_caps ic7610_priv_caps = // if hour < 0 then only date will be set -int ic7610_set_clock(RIG *rig, int year, int month, int day, int hour, int min, +static int ic7610_set_clock(RIG *rig, int year, int month, int day, int hour, int min, int sec, double msec, int utc_offset) { int cmd = 0x1a; @@ -307,7 +307,7 @@ int ic7610_set_clock(RIG *rig, int year, int month, int day, int hour, int min, return retval; } -int ic7610_get_clock(RIG *rig, int *year, int *month, int *day, int *hour, +static int ic7610_get_clock(RIG *rig, int *year, int *month, int *day, int *hour, int *min, int *sec, double *msec, int *utc_offset) { int cmd = 0x1a; diff --git a/rigs/icom/ic7700.c b/rigs/icom/ic7700.c index 3d1a2f576..e9290b7cc 100644 --- a/rigs/icom/ic7700.c +++ b/rigs/icom/ic7700.c @@ -144,7 +144,7 @@ static const struct icom_priv_caps ic7700_priv_caps = }; // if hour < 0 then only date will be set -int ic7700_set_clock(RIG *rig, int year, int month, int day, int hour, int min, +static int ic7700_set_clock(RIG *rig, int year, int month, int day, int hour, int min, int sec, double msec, int utc_offset) { int cmd = 0x1a; @@ -198,7 +198,7 @@ int ic7700_set_clock(RIG *rig, int year, int month, int day, int hour, int min, return retval; } -int ic7700_get_clock(RIG *rig, int *year, int *month, int *day, int *hour, +static int ic7700_get_clock(RIG *rig, int *year, int *month, int *day, int *hour, int *min, int *sec, double *msec, int *utc_offset) { int cmd = 0x1a; diff --git a/rigs/icom/ic7760.c b/rigs/icom/ic7760.c index c20f46d74..304bc3ece 100644 --- a/rigs/icom/ic7760.c +++ b/rigs/icom/ic7760.c @@ -143,7 +143,7 @@ static const struct icom_priv_caps ic7760_priv_caps = }; // if hour < 0 then only date will be set -int ic7760_set_clock(RIG *rig, int year, int month, int day, int hour, int min, +static int ic7760_set_clock(RIG *rig, int year, int month, int day, int hour, int min, int sec, double msec, int utc_offset) { int cmd = 0x1a; @@ -197,7 +197,7 @@ int ic7760_set_clock(RIG *rig, int year, int month, int day, int hour, int min, return retval; } -int ic7760_get_clock(RIG *rig, int *year, int *month, int *day, int *hour, +static int ic7760_get_clock(RIG *rig, int *year, int *month, int *day, int *hour, int *min, int *sec, double *msec, int *utc_offset) { int cmd = 0x1a; diff --git a/rigs/icom/ic7800.c b/rigs/icom/ic7800.c index 86e1489f0..c7a742f4d 100644 --- a/rigs/icom/ic7800.c +++ b/rigs/icom/ic7800.c @@ -34,9 +34,9 @@ #include "bandplan.h" #include "ic7300.h" -int ic7800_set_clock(RIG *rig, int year, int month, int day, int hour, int min, +static int ic7800_set_clock(RIG *rig, int year, int month, int day, int hour, int min, int sec, double msec, int utc_offset); -int ic7800_get_clock(RIG *rig, int *year, int *month, int *day, int *hour, +static int ic7800_get_clock(RIG *rig, int *year, int *month, int *day, int *hour, int *min, int *sec, double *msec, int *utc_offset); #define IC7800_ALL_RX_MODES (RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_CWR|RIG_MODE_SSB|RIG_MODE_RTTY|RIG_MODE_RTTYR|RIG_MODE_FM|RIG_MODE_PSK|RIG_MODE_PSKR|RIG_MODE_PKTLSB|RIG_MODE_PKTUSB|RIG_MODE_PKTAM|RIG_MODE_PKTFM) @@ -429,7 +429,7 @@ int ic7800_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) } // if hour < 0 then only date will be set -int ic7800_set_clock(RIG *rig, int year, int month, int day, int hour, int min, +static int ic7800_set_clock(RIG *rig, int year, int month, int day, int hour, int min, int sec, double msec, int utc_offset) { int cmd = 0x1a; @@ -483,7 +483,7 @@ int ic7800_set_clock(RIG *rig, int year, int month, int day, int hour, int min, return retval; } -int ic7800_get_clock(RIG *rig, int *year, int *month, int *day, int *hour, +static int ic7800_get_clock(RIG *rig, int *year, int *month, int *day, int *hour, int *min, int *sec, double *msec, int *utc_offset) { int cmd = 0x1a; diff --git a/rigs/icom/ic785x.c b/rigs/icom/ic785x.c index a2d225bb6..f0094809d 100644 --- a/rigs/icom/ic785x.c +++ b/rigs/icom/ic785x.c @@ -116,8 +116,8 @@ extern int ic7800_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val); extern int ic7800_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val); -int ic785x_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val); -int ic785x_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val); +static int ic785x_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val); +static int ic785x_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val); struct cmdparams ic785x_extcmds[] = { @@ -498,12 +498,12 @@ struct rig_caps ic785x_caps = .hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS }; -int ic785x_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) +static int ic785x_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) { return ic7800_set_level(rig, vfo, level, val); } -int ic785x_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) +static int ic785x_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) { return ic7800_get_level(rig, vfo, level, val); } diff --git a/rigs/icom/ic821h.c b/rigs/icom/ic821h.c index 83527e30a..b8692d2d7 100644 --- a/rigs/icom/ic821h.c +++ b/rigs/icom/ic821h.c @@ -54,7 +54,7 @@ static const struct icom_priv_caps ic821h_priv_caps = // split could be on VFOA/B or Main/Sub // If Main/Sub we assume we're doing satmode -int ic821h_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) +static int ic821h_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) { int retval = -RIG_EINTERNAL; diff --git a/rigs/icom/ic910.c b/rigs/icom/ic910.c index 8afbfd55a..de2d031f0 100644 --- a/rigs/icom/ic910.c +++ b/rigs/icom/ic910.c @@ -135,7 +135,7 @@ static const struct icom_priv_caps ic910_priv_caps = .r2i_mode = ic910_r2i_mode }; -int ic910_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) +static int ic910_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) { switch (func) { @@ -152,7 +152,7 @@ int ic910_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) } } -int ic910_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status) +static int ic910_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status) { switch (func) { @@ -167,7 +167,7 @@ int ic910_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status) } } -int ic910_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) +static int ic910_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) { rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); @@ -182,7 +182,7 @@ int ic910_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) } } -int ic910_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) +static int ic910_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) { rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); diff --git a/rigs/icom/icr30.c b/rigs/icom/icr30.c index 16453423e..783150285 100644 --- a/rigs/icom/icr30.c +++ b/rigs/icom/icr30.c @@ -99,7 +99,7 @@ static int icr30_r2i_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width, * This function handles the -N modes for IC-R30 */ -int icr30_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) +static int icr30_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) { if (mode & (RIG_MODE_AMN | RIG_MODE_FMN)) { diff --git a/rigs/icom/id5100.c b/rigs/icom/id5100.c index deeada4aa..37c28b7b4 100644 --- a/rigs/icom/id5100.c +++ b/rigs/icom/id5100.c @@ -72,9 +72,9 @@ enum #define ID5100_PARM_ALL RIG_PARM_NONE -int id5100_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo); +static int id5100_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo); -int id5100_set_vfo(RIG *rig, vfo_t vfo) +static int id5100_set_vfo(RIG *rig, vfo_t vfo) { struct rig_state *rs = STATE(rig); struct icom_priv_data *priv = (struct icom_priv_data *) rs->priv; @@ -147,7 +147,7 @@ int id5100_set_vfo(RIG *rig, vfo_t vfo) } -int id5100_set_freq(RIG *rig, vfo_t vfo, freq_t freq) +static int id5100_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { int cmd = C_SET_FREQ; int subcmd = -1; @@ -208,7 +208,7 @@ static int id5100_get_freq2(RIG *rig, vfo_t vfo, freq_t *freq) return RIG_OK; } -int id5100_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) +static int id5100_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) { struct rig_state *rs = STATE(rig); struct icom_priv_data *priv = (struct icom_priv_data *) rs->priv; @@ -356,7 +356,7 @@ if (vfo == RIG_VFO_MAIN && priv->dual_watch_main_sub == MAIN_ON_LEFT) */ #define ID5100_STR_CAL UNKNOWN_IC_STR_CAL -int id5100_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) +static int id5100_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) { int retval; unsigned char modebuf; @@ -390,7 +390,7 @@ int id5100_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) return retval; } -int id5100_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) +static int id5100_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) { int retval; int mode_len; @@ -421,7 +421,7 @@ int id5100_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) return RIG_OK; } -int id5100_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) +static int id5100_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) { struct rig_state *rs = STATE(rig); struct icom_priv_data *priv = (struct icom_priv_data *) rs->priv; @@ -463,7 +463,7 @@ int id5100_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) } -int id5100_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) +static int id5100_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) { int freq_len = 5; int retval; @@ -484,7 +484,7 @@ int id5100_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) RETURNFUNC(retval); } -int id5100_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq) +static int id5100_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq) { int retval; //struct rig_state *rs = STATE(rig); diff --git a/rigs/icom/xiegu.c b/rigs/icom/xiegu.c index d1e19a886..7773cc6b7 100644 --- a/rigs/icom/xiegu.c +++ b/rigs/icom/xiegu.c @@ -132,7 +132,7 @@ static int x108g_rig_open(RIG *rig) RETURNFUNC(RIG_OK); } -int xiegu_rig_open(RIG *rig) +static int xiegu_rig_open(RIG *rig) { int retval; unsigned char id[4]; diff --git a/rigs/motorola/micom.c b/rigs/motorola/micom.c index df283b79f..97e2f0660 100644 --- a/rigs/motorola/micom.c +++ b/rigs/motorola/micom.c @@ -24,7 +24,7 @@ #include <iofunc.h> // char* to start of checksum for len bytes -unsigned int checksum(unsigned char *buf, int len) +static unsigned int checksum(const unsigned char *buf, int len) { int checksum = 0; int i; @@ -189,8 +189,8 @@ static int micom_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) static int micom_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) { hamlib_port_t *rp = RIGPORT(rig); - unsigned char on[] = { 0x24, 0x02, 0x81, 0x13, 0x01, 0xBB, 0x03 }; - unsigned char off[] = { 0x24, 0x02, 0x81, 0x14, 0x01, 0xBC, 0x03 }; + static const unsigned char on[] = { 0x24, 0x02, 0x81, 0x13, 0x01, 0xBB, 0x03 }; + static const unsigned char off[] = { 0x24, 0x02, 0x81, 0x14, 0x01, 0xBC, 0x03 }; int retval; set_transaction_active(rig); commit 5087894d7166d121a02bc9347bdd216258fe7f3b Author: George Baltz N3GB <Geo...@gm...> Date: Wed Jun 4 20:19:04 2025 -0400 Check off a few more cppcheck carps. diff --git a/rigs/kenwood/elecraft.c b/rigs/kenwood/elecraft.c index 16ef7c418..4849217b9 100644 --- a/rigs/kenwood/elecraft.c +++ b/rigs/kenwood/elecraft.c @@ -22,6 +22,7 @@ * the complete text of the GNU Lesser Public License version 2.1. * */ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include <string.h> #include <stdio.h> @@ -77,9 +78,9 @@ const struct confparams elecraft_ext_levels[] = /* Private function declarations */ -int verify_kenwood_id(RIG *rig, char *id); -int elecraft_get_extension_level(RIG *rig, const char *cmd, int *ext_level); -int elecraft_get_firmware_revision_level(RIG *rig, const char *cmd, +static int verify_kenwood_id(RIG *rig, char *id); +static int elecraft_get_extension_level(RIG *rig, const char *cmd, int *ext_level); +static int elecraft_get_firmware_revision_level(RIG *rig, const char *cmd, char *fw_rev, size_t fw_rev_sz); /* Shared backend function definitions */ @@ -419,10 +420,10 @@ int elecraft_close(RIG *rig) /* Tests for Kenwood ID string of "017" */ -int verify_kenwood_id(RIG *rig, char *id) +static int verify_kenwood_id(RIG *rig, char *id) { int err; - char *idptr; + const char *idptr; rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); @@ -472,11 +473,11 @@ int verify_kenwood_id(RIG *rig, char *id) /* Determines K2 and K3 extension level */ -int elecraft_get_extension_level(RIG *rig, const char *cmd, int *ext_level) +static int elecraft_get_extension_level(RIG *rig, const char *cmd, int *ext_level) { int err, i; char buf[KENWOOD_MAX_BUF_LEN]; - char *bufptr; + const char *bufptr; rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); @@ -511,7 +512,7 @@ int elecraft_get_extension_level(RIG *rig, const char *cmd, int *ext_level) /* Determine firmware revision level */ -int elecraft_get_firmware_revision_level(RIG *rig, const char *cmd, +static int elecraft_get_firmware_revision_level(RIG *rig, const char *cmd, char *fw_rev, size_t fw_rev_sz) { int err; diff --git a/rigs/kenwood/flex.c b/rigs/kenwood/flex.c index d1f66e483..f5181fc3c 100644 --- a/rigs/kenwood/flex.c +++ b/rigs/kenwood/flex.c @@ -23,6 +23,7 @@ * the complete text of the GNU Lesser Public License version 2.1. * */ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include <string.h> @@ -31,10 +32,10 @@ /* Private helper functions */ -int verify_flexradio_id(RIG *rig, char *id) +static int verify_flexradio_id(RIG *rig, char *id) { int err; - char *idptr; + const char *idptr; rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); diff --git a/rigs/kenwood/flex6xxx.c b/rigs/kenwood/flex6xxx.c index dd145a368..ae13e96d7 100644 --- a/rigs/kenwood/flex6xxx.c +++ b/rigs/kenwood/flex6xxx.c @@ -22,6 +22,7 @@ * the complete text of the GNU Lesser Public License version 2.1. * */ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include <stdlib.h> #include <stdio.h> @@ -321,7 +322,7 @@ static int powersdr_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, static int flex6k_find_width(rmode_t mode, pbwidth_t width, int *ridx) { - int *w_a; // Width array, these are all ordered in descending order! + const int *w_a; // Width array, these are all ordered in descending order! int idx = 0; rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); @@ -372,7 +373,7 @@ static int flex6k_find_width(rmode_t mode, pbwidth_t width, int *ridx) static int powersdr_find_width(rmode_t mode, pbwidth_t width, int *ridx) { - int *w_a; // Width array, these are all ordered in descending order! + const int *w_a; // Width array, these are all ordered in descending order! int idx = 0; rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); @@ -576,7 +577,7 @@ static int powersdr_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) /* * flex6k_get_ptt */ -int flex6k_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) +static int flex6k_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) { const char *ptt_cmd; int err; @@ -604,7 +605,7 @@ int flex6k_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) return RIG_OK; } -int flex6k_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) +static int flex6k_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) { const char *ptt_cmd; char response[16] = ""; @@ -642,7 +643,7 @@ int flex6k_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) /* * powersdr_set_level */ -int powersdr_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) +static int powersdr_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) { char cmd[KENWOOD_MAX_BUF_LEN]; int retval; @@ -741,7 +742,7 @@ int powersdr_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) /* * flek6k_set_level */ -int flex6k_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) +static int flex6k_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) { char cmd[KENWOOD_MAX_BUF_LEN]; int retval; @@ -778,10 +779,10 @@ int flex6k_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) /* * flex6k_get_level */ -int flex6k_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) +static int flex6k_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) { char lvlbuf[KENWOOD_MAX_BUF_LEN]; - char *cmd; + const char *cmd; int retval; int len, ans; @@ -840,10 +841,10 @@ int flex6k_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) /* * powersdr_get_level */ -int powersdr_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) +static int powersdr_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) { char lvlbuf[KENWOOD_MAX_BUF_LEN]; - char *cmd; + const char *cmd; int retval; int len, ans; rmode_t mode; @@ -1143,7 +1144,7 @@ int powersdr_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) return RIG_OK; } -int powersdr_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) +static int powersdr_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) { char cmd[KENWOOD_MAX_BUF_LEN]; @@ -1174,10 +1175,10 @@ int powersdr_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) return kenwood_transaction(rig, cmd, NULL, 0); } -int powersdr_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status) +static int powersdr_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status) { char lvlbuf[KENWOOD_MAX_BUF_LEN]; - char *cmd; + const char *cmd; int retval; int len, ans; @@ -1234,7 +1235,7 @@ int powersdr_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status) return RIG_OK; } -int powersdr_set_parm(RIG *rig, setting_t parm, value_t val) +static int powersdr_set_parm(RIG *rig, setting_t parm, value_t val) { ENTERFUNC; char cmd[KENWOOD_MAX_BUF_LEN]; @@ -1263,7 +1264,7 @@ int powersdr_set_parm(RIG *rig, setting_t parm, value_t val) RETURNFUNC(retval); } -int powersdr_get_parm(RIG *rig, setting_t parm, value_t *val) +static int powersdr_get_parm(RIG *rig, setting_t parm, value_t *val) { char cmd[KENWOOD_MAX_BUF_LEN]; char buf[KENWOOD_MAX_BUF_LEN]; diff --git a/rigs/kenwood/k2.c b/rigs/kenwood/k2.c index ba88c0028..904012efb 100644 --- a/rigs/kenwood/k2.c +++ b/rigs/kenwood/k2.c @@ -21,6 +21,7 @@ * the complete text of the GNU Lesser Public License version 2.1. * */ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include <stdlib.h> #include <string.h> @@ -95,16 +96,16 @@ struct k2_filt_lst_s k2_fwmd_cw; struct k2_filt_lst_s k2_fwmd_rtty; /* K2 specific rig_caps API function declarations */ -int k2_open(RIG *rig); -int k2_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width); -int k2_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width); -int k2_get_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t *val); -int k2_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op); +static int k2_open(RIG *rig); +static int k2_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width); +static int k2_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width); +static int k2_get_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t *val); +static int k2_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op); /* Private function declarations */ -int k2_probe_mdfw(RIG *rig, struct kenwood_priv_data *priv); -int k2_mdfw_rest(RIG *rig, const char *mode, const char *fw); -int k2_pop_fw_lst(RIG *rig, const char *cmd); +static int k2_probe_mdfw(RIG *rig, struct kenwood_priv_data *priv); +static int k2_mdfw_rest(RIG *rig, const char *mode, const char *fw); +static int k2_pop_fw_lst(RIG *rig, const char *cmd); /* @@ -258,7 +259,7 @@ struct rig_caps k2_caps = /* k2_open() * */ -int k2_open(RIG *rig) +static int k2_open(RIG *rig) { int err; struct kenwood_priv_data *priv = STATE(rig)->priv; @@ -289,7 +290,7 @@ int k2_open(RIG *rig) * wider than the passed value and sets the radio accordingly. */ -int k2_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) +static int k2_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) { int err; @@ -425,12 +426,12 @@ int k2_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) * by the radio and returns it to the caller. */ -int k2_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) +static int k2_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) { int err; char buf[KENWOOD_MAX_BUF_LEN]; char tmp[16]; - char *bufptr; + const char *bufptr; pbwidth_t temp_w; rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); @@ -491,7 +492,7 @@ int k2_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) * STRING: val.cs for set, val.s for get * CHECKBUTTON: val.i 0/1 */ -int k2_get_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t *val) +static int k2_get_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t *val) { char buf[KENWOOD_MAX_BUF_LEN]; int err; @@ -544,7 +545,7 @@ int k2_get_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t *val) /* Probes for mode and filter settings, based on information * by Chris Bryant, G3WIE. */ -int k2_probe_mdfw(RIG *rig, struct kenwood_priv_data *priv) +static int k2_probe_mdfw(RIG *rig, struct kenwood_priv_data *priv) { int err, i, c; char buf[KENWOOD_MAX_BUF_LEN]; @@ -678,7 +679,7 @@ int k2_probe_mdfw(RIG *rig, struct kenwood_priv_data *priv) /* Restore mode, filter, and ext_lvl to original values */ -int k2_mdfw_rest(RIG *rig, const char *mode, const char *fw) +static int k2_mdfw_rest(RIG *rig, const char *mode, const char *fw) { int err; @@ -720,7 +721,7 @@ int k2_mdfw_rest(RIG *rig, const char *mode, const char *fw) /* Populate k2_filt_lst_s structure for each mode */ -int k2_pop_fw_lst(RIG *rig, const char *cmd) +static int k2_pop_fw_lst(RIG *rig, const char *cmd) { int err, f; char fcmd[16]; @@ -806,7 +807,7 @@ int k2_pop_fw_lst(RIG *rig, const char *cmd) return RIG_OK; } -int k2_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op) +static int k2_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op) { char buf[32]; diff --git a/rigs/kenwood/k3.c b/rigs/kenwood/k3.c index da0541059..29423315b 100644 --- a/rigs/kenwood/k3.c +++ b/rigs/kenwood/k3.c @@ -21,6 +21,7 @@ * the complete text of the GNU Lesser Public License version 2.1. * */ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include <stdio.h> #include <stdlib.h> @@ -143,47 +144,43 @@ static struct kenwood_priv_caps k3_priv_caps = /* K3 specific function declarations */ -int k3_set_freq(RIG *rig, vfo_t vfo, freq_t freq); -int k3_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width); -int k3_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width); -int k3_get_vfo(RIG *rig, vfo_t *vfo); -int k3_set_vfo(RIG *rig, vfo_t vfo); -int k3_set_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t val); -int k3_get_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t *val); -int k3_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit); -int k3_set_xit(RIG *rig, vfo_t vfo, shortfreq_t rit); -int k3_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width); -int k3_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode, +static int k3_set_freq(RIG *rig, vfo_t vfo, freq_t freq); +static int k3_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width); +static int k3_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width); +static int k3_get_vfo(RIG *rig, vfo_t *vfo); +static int k3_set_vfo(RIG *rig, vfo_t vfo); +static int k3_set_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t val); +static int k3_get_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t *val); +static int k3_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit); +static int k3_set_xit(RIG *rig, vfo_t vfo, shortfreq_t rit); +static int k3_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width); +static int k3_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode, pbwidth_t *tx_width); -int k3_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val); -int k3_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val); -int kx3_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val); -int kx3_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val); -int k3_set_func(RIG *rig, vfo_t vfo, setting_t func, int status); -int k3_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status); -int k3_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op); -int k3_power2mW(RIG *rig, unsigned int *mwpower, float power, freq_t freq, +static int k3_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val); +static int k3_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val); +static int kx3_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val); +static int kx3_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val); +static int k3_set_func(RIG *rig, vfo_t vfo, setting_t func, int status); +static int k3_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status); +static int k3_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op); +static int k3_power2mW(RIG *rig, unsigned int *mwpower, float power, freq_t freq, rmode_t mode); /* Private helper functions */ int set_rit_xit(RIG *rig, shortfreq_t rit); -int k3_set_nb_level(RIG *rig, float dsp_nb, float if_nb); -int k3_get_nb_level(RIG *rig, float *dsp_nb, float *if_nb); -int k3_get_bar_graph_level(RIG *rig, float *smeter, float *pwr, float *alc, +static int k3_set_nb_level(RIG *rig, float dsp_nb, float if_nb); +static int k3_get_nb_level(RIG *rig, float *dsp_nb, float *if_nb); +static int k3_get_bar_graph_level(RIG *rig, float *smeter, float *pwr, float *alc, int *mode_tx); -int k4_get_bar_graph_level(RIG *rig, float *swr, float *pwr, float *alc, +static int k4_get_bar_graph_level(RIG *rig, float *swr, float *pwr, float *alc, int *mode_tx); -int kx3_get_bar_graph_level(RIG *rig, float *level); -int k3_send_voice_mem(RIG *rig, vfo_t vfo, int ch); -int k3_stop_voice_mem(RIG *rig, vfo_t vfo); -int k3_stop_morse(RIG *rig, vfo_t vfo); /* K4 functions */ -int k4_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt); -int k4_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt); -int k4_send_voice_mem(RIG *rig, vfo_t vfo, int ch); -int k4_stop_voice_mem(RIG *rig, vfo_t vfo); -int k4_stop_morse(RIG *rig, vfo_t vfo); +static int k4_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt); +static int k4_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt); +static int k4_send_voice_mem(RIG *rig, vfo_t vfo, int ch); +static int k4_stop_voice_mem(RIG *rig, vfo_t vfo); +static int k4_stop_morse(RIG *rig, vfo_t vfo); /* * K3 rig capabilities. @@ -194,28 +191,11 @@ int k4_stop_morse(RIG *rig, vfo_t vfo); * Part of info comes from http://www.elecraft.com/K2_Manual_Download_Page.htm#K3 * look for K3 Programmer's Reference PDF */ -int kx3_get_bar_graph_level(RIG *rig, float *level); -int k3_send_voice_mem(RIG *rig, vfo_t vfo, int ch); -int k3_stop_voice_mem(RIG *rig, vfo_t vfo); -int k3_stop_morse(RIG *rig, vfo_t vfo); - -/* K4 functions */ -int k4_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt); -int k4_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt); -int k4_send_voice_mem(RIG *rig, vfo_t vfo, int ch); -int k4_stop_voice_mem(RIG *rig, vfo_t vfo); -int k4_stop_morse(RIG *rig, vfo_t vfo); +static int kx3_get_bar_graph_level(RIG *rig, float *level); +static int k3_send_voice_mem(RIG *rig, vfo_t vfo, int ch); +static int k3_stop_voice_mem(RIG *rig, vfo_t vfo); +static int k3_stop_morse(RIG *rig, vfo_t vfo); -/* - * K3 rig capabilities. - * This kit can recognize a large subset of TS-570/K2 commands and has many - * extensions of its own. Extension backend functions to standard Kenwood - * command are defined in elecraft.c (shared with K2) and in this file. - * - * Part of info comes from http://www.elecraft.com/K2_Manual_Download_Page.htm#K3 - * look for K3 Programmer's Reference PDF - * - */ struct rig_caps k3_caps = { RIG_MODEL(RIG_MODEL_K3), @@ -1037,14 +1017,14 @@ struct rig_caps kx2_caps = * RIG_MODE_PKTUSB and RIG_MODE_PKTLSB can be supported. */ -int k3_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) +static int k3_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) { char buf[KENWOOD_MAX_BUF_LEN]; int err; rmode_t temp_m; pbwidth_t temp_w; - char *cmd_data = "DT"; - char *cmd_bw = "BW"; + const char *cmd_data = "DT"; + const char *cmd_bw = "BW"; int cmd_bw_len = 6; const struct kenwood_priv_data *priv = STATE(rig)->priv; @@ -1191,7 +1171,7 @@ int k3_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) * mapping seems most likely to cover the user requirements. */ -int k3_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) +static int k3_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) { int err, err2; char cmd_m[5]; @@ -1396,7 +1376,7 @@ int k3_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) * We just emulate them so rigctl can work correctly. */ -int k3_set_vfo(RIG *rig, vfo_t vfo) +static int k3_set_vfo(RIG *rig, vfo_t vfo) { ENTERFUNC; @@ -1406,7 +1386,7 @@ int k3_set_vfo(RIG *rig, vfo_t vfo) RETURNFUNC(RIG_OK); } -int k3_get_vfo(RIG *rig, vfo_t *vfo) +static int k3_get_vfo(RIG *rig, vfo_t *vfo) { ENTERFUNC; @@ -1427,7 +1407,7 @@ int k3_get_vfo(RIG *rig, vfo_t *vfo) * See Private Elecraft extra levels definitions in elecraft.c and * private token #define in elecraft.h */ -int k3_set_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t val) +static int k3_set_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t val) { char buf[10]; @@ -1476,7 +1456,7 @@ int k3_set_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t val) * STRING: val.cs for set, val.s for get * CHECKBUTTON: val.i 0/1 */ -int k3_get_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t *val) +static int k3_get_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t *val) { char buf[KENWOOD_MAX_BUF_LEN]; int err; @@ -1544,7 +1524,7 @@ int k3_get_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t *val) * k3_set_rit() -- Differs from from generic Kenwood function as K3 can set * RIT to an arbitrary offset. When rit == 0, the RIT offset is cleared. */ -int k3_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit) +static int k3_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit) { int err; @@ -1565,7 +1545,7 @@ int k3_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit) * k3_set_xit() -- Differs from from generic Kenwood function as K3 can set * XIT to an arbitrary offset. When rit == 0, the XIT offset is cleared. */ -int k3_set_xit(RIG *rig, vfo_t vfo, shortfreq_t rit) +static int k3_set_xit(RIG *rig, vfo_t vfo, shortfreq_t rit) { int err; @@ -1585,7 +1565,7 @@ int k3_set_xit(RIG *rig, vfo_t vfo, shortfreq_t rit) /* * The K3 *always* uses VFOB for TX. */ -int k3_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width) +static int k3_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width) { struct kenwood_priv_caps *caps = kenwood_caps(rig); char buf[32]; @@ -1761,7 +1741,7 @@ int k3_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width) /* The K3 *always* uses VFOB for TX. */ -int k3_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode, +static int k3_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode, pbwidth_t *tx_width) { char buf[KENWOOD_MAX_BUF_LEN]; @@ -1919,7 +1899,7 @@ static int k3_get_maxpower(RIG *rig) return maxpower; } -int k3_power2mW(RIG *rig, +static int k3_power2mW(RIG *rig, unsigned int *mwpower, float power, freq_t freq, @@ -1931,7 +1911,7 @@ int k3_power2mW(RIG *rig, return RIG_OK; } -int k3_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) +static int k3_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) { char levelbuf[16]; int kenwood_val; @@ -2050,7 +2030,7 @@ int k3_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) /* * Handle S-meter (SM, SMH) level locally and pass rest to kenwood_get_level() */ -int k3_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) +static int k3_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) { char levelbuf[16]; int retval; @@ -2395,7 +2375,7 @@ int k3_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) return RIG_OK; } -int kx3_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) +static int kx3_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) { int ival; char cmdbuf[32]; @@ -2425,7 +2405,7 @@ int kx3_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) return k3_set_level(rig, vfo, level, val); } -int kx3_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) +static int kx3_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) { int retval; float f; @@ -2515,7 +2495,7 @@ int kx3_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) } -int k3_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) +static int k3_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) { char buf[10]; @@ -2555,7 +2535,7 @@ int k3_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) return kenwood_transaction(rig, buf, NULL, 0); } -int k3_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op) +static int k3_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op) { char buf[32]; ENTERFUNC; @@ -2593,7 +2573,7 @@ int k3_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op) * on the K3. Those functions are handled here and others are passed * through to kenwood_get_func(). */ -int k3_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status) +static int k3_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status) { rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); @@ -2674,7 +2654,7 @@ int set_rit_xit(RIG *rig, shortfreq_t rit) return RIG_OK; } -int k3_set_nb_level(RIG *rig, float dsp_nb, float if_nb) +static int k3_set_nb_level(RIG *rig, float dsp_nb, float if_nb) { char levelbuf[16]; int dsp_nb_raw = 0; @@ -2722,7 +2702,7 @@ int k3_set_nb_level(RIG *rig, float dsp_nb, float if_nb) return kenwood_transaction(rig, levelbuf, NULL, 0); } -int k3_get_nb_level(RIG *rig, float *dsp_nb, float *if_nb) +static int k3_get_nb_level(RIG *rig, float *dsp_nb, float *if_nb) { char levelbuf[16]; int retval; @@ -2780,7 +2760,7 @@ int k4_get_bar_graph_level(RIG *rig, float *swr, float *pwr, float *alc, return RIG_OK; } -int k3_get_bar_graph_level(RIG *rig, float *smeter, float *pwr, float *alc, +static int k3_get_bar_graph_level(RIG *rig, float *smeter, float *pwr, float *alc, int *mode_tx) { char levelbuf[16]; @@ -2878,7 +2858,7 @@ int k3_get_bar_graph_level(RIG *rig, float *smeter, float *pwr, float *alc, return RIG_OK; } -int kx3_get_bar_graph_level(RIG *rig, float *level) +static int kx3_get_bar_graph_level(RIG *rig, float *level) { char levelbuf[16]; int retval; @@ -2992,7 +2972,7 @@ int k4_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) // K3S band memory needs some time to do its thing after freq change // K3 probably does too // But what about the K4? -int k3_set_freq(RIG *rig, vfo_t vfo, freq_t freq) +static int k3_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { int retval; freq_t tfreq; @@ -3012,9 +2992,9 @@ int k3_set_freq(RIG *rig, vfo_t vfo, freq_t freq) return retval; } -int k3_send_voice_mem(RIG *rig, vfo_t vfo, int ch) +static int k3_send_voice_mem(RIG *rig, vfo_t vfo, int ch) { - char *cmd; + const char *cmd; int retval; if (ch < 1 || ch > 4) @@ -3038,7 +3018,7 @@ int k3_send_voice_mem(RIG *rig, vfo_t vfo, int ch) return retval; } -int k3_stop_voice_mem(RIG *rig, vfo_t vfo) +static int k3_stop_voice_mem(RIG *rig, vfo_t vfo) { int retval; retval = kenwood_transaction(rig, "SWT37;", NULL, 0); @@ -3075,7 +3055,7 @@ int k4_stop_morse(RIG *rig, vfo_t vfo) return retval; } -int k3_stop_morse(RIG *rig, vfo_t vfo) +static int k3_stop_morse(RIG *rig, vfo_t vfo) { int retval; char cmd[32]; diff --git a/rigs/kenwood/ts890s.c b/rigs/kenwood/ts890s.c index 74f3c22b5..db9aa255a 100644 --- a/rigs/kenwood/ts890s.c +++ b/rigs/kenwood/ts890s.c @@ -44,7 +44,8 @@ static int kenwood_ts890_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) { - char levelbuf[16], *command_string; + char levelbuf[16]; + const char *command_string; int kenwood_val, retval; gran_t *level_info; @@ -117,7 +118,7 @@ static int kenwood_ts890_get_level(RIG *rig, vfo_t vfo, setting_t level, size_t ack_len, ack_len_expected, len; int levelint; int retval; - char *command_string; + const char *command_string; gran_t *level_info; level_info = &rig->caps->level_gran[rig_setting2idx(level)]; @@ -475,13 +476,13 @@ static int ts890s_get_split_vfo(RIG *rig, vfo_t rxvfo, split_t *split, { char buf[4]; int retval; - vfo_t tvfo; struct rig_state *rs = STATE(rig); struct kenwood_priv_data *priv = rs->priv; if (RIG_OK == (retval = kenwood_safe_transaction(rig, "FT", buf, sizeof(buf), 3))) { + vfo_t tvfo; if ('0' == buf[2]) { tvfo = RIG_VFO_A; diff --git a/src/misc.c b/src/misc.c index 0a59f1499..8b3c0372c 100644 --- a/src/misc.c +++ b/src/misc.c @@ -17,6 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ /** * \addtogroup rig_internal @@ -383,7 +384,7 @@ int millis_to_dot10ths(int millis, int wpm) int HAMLIB_API sprintf_freq(char *str, int str_len, freq_t freq) { double f; - char *hz; + const char *hz; int decplaces = 10; int retval; @@ -2763,7 +2764,7 @@ void errmsg(int err, char *s, const char *func, const char *file, int line) rigerror(err)); } -uint32_t CRC32_function(uint8_t *buf, uint32_t len) +uint32_t CRC32_function(const uint8_t *buf, uint32_t len) { uint32_t crc; @@ -2893,7 +2894,7 @@ const char *rig_get_band_str(RIG *rig, hamlib_band_t band, int which) rig_debug(RIG_DEBUG_VERBOSE, "%s: bandlist=%s\n", __func__, bandlist); int n = 0; char *p = strchr(bandlist, '(') + 1; - char *token; + const char *token; if (p == NULL) { @@ -2941,7 +2942,7 @@ hamlib_band_t rig_get_band(RIG *rig, freq_t freq, int band) rig_debug(RIG_DEBUG_VERBOSE, "%s: bandlist=%s\n", __func__, bandlist); // e.g. BANDSELECT(BAND160M,BAND80M,BANDUNUSED,BAND40M) char *p = strchr(bandlist, '(') + 1; - char *token; + const char *token; if (p == NULL) { @@ -3000,7 +3001,7 @@ int rig_get_band_rig(RIG *rig, freq_t freq, const char *band) } char *p = strchr(bandlist, '(') + 1; - char *token; + const char *token; if (p == NULL) { diff --git a/src/misc.h b/src/misc.h index 31ff966ec..8e2e57001 100644 --- a/src/misc.h +++ b/src/misc.h @@ -18,6 +18,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ #ifndef _MISC_H #define _MISC_H 1 @@ -122,7 +123,7 @@ extern HAMLIB_EXPORT(vfo_t) vfo_fixup2a(RIG *rig, vfo_t vfo, split_t split, cons extern HAMLIB_EXPORT(int) parse_hoststr(char *hoststr, int hoststr_len, char host[256], char port[6]); -extern HAMLIB_EXPORT(uint32_t) CRC32_function(uint8_t *buf, uint32_t len); +extern HAMLIB_EXPORT(uint32_t) CRC32_function(const uint8_t *buf, uint32_t len); extern HAMLIB_EXPORT(char *)date_strget(char *buf, int buflen, int localtime); ----------------------------------------------------------------------- Summary of changes: NEWS | 6 +- cppcheck.sh | 17 +++++- rigs/adat/adat.c | 10 +--- rigs/icom/ic7300.c | 8 +-- rigs/icom/ic7600.c | 4 +- rigs/icom/ic7610.c | 4 +- rigs/icom/ic7700.c | 4 +- rigs/icom/ic7760.c | 4 +- rigs/icom/ic7800.c | 8 +-- rigs/icom/ic785x.c | 8 +-- rigs/icom/ic821h.c | 2 +- rigs/icom/ic910.c | 8 +-- rigs/icom/icr30.c | 2 +- rigs/icom/id5100.c | 18 +++--- rigs/icom/xiegu.c | 2 +- rigs/kenwood/elecraft.c | 17 +++--- rigs/kenwood/flex.c | 5 +- rigs/kenwood/flex6xxx.c | 31 +++++----- rigs/kenwood/k2.c | 35 ++++++------ rigs/kenwood/k3.c | 149 +++++++++++++++++++++--------------------------- rigs/kenwood/ts890s.c | 7 ++- rigs/motorola/micom.c | 6 +- src/misc.c | 11 ++-- src/misc.h | 3 +- src/rig.c | 13 ++--- tests/rigctl.c | 15 +++-- tests/rigctld.c | 6 +- 27 files changed, 202 insertions(+), 201 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-06-07 13:09: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, Hamlib-4.6.3 has been updated via ff72e8eef28045194a9284c1fba8a5f9c71f2ea9 (commit) via 5b4c8c2ea3abbca7f788b0766e7be6aa77db1cd5 (commit) from d901969d351b867ee6a176125c3ac4bdbbbacaaf (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 ff72e8eef28045194a9284c1fba8a5f9c71f2ea9 Author: Nate Bargmann <n0...@n0...> Date: Sat Jun 7 08:05:32 2025 -0500 Update NEWS and advance to 4.6.3~rc3 diff --git a/NEWS b/NEWS index 596fadb61..33f1da732 100644 --- a/NEWS +++ b/NEWS @@ -22,6 +22,7 @@ Version 4.6.3 five years from 2020 to 2025. Mike passed away on March 28, 2025 due to complications from ALS (Lou Gehrig's disease). + * Fix various typos in Doxygen tags. (TNX Daniele Forsi) * JRC: Removed RIG_FUNC_FAGC from 535D as erroneous, Added RIG_FUNC_NB2 functionality to both 535D and 545. (TNX Mark Fine) * Restore IC-7300 spectrum data callback - regression in 4.6 (n3gb) diff --git a/configure.ac b/configure.ac index f7f73afa2..442b8354a 100644 --- a/configure.ac +++ b/configure.ac @@ -14,7 +14,7 @@ dnl Please do not use '-' in the version number, as package managers will fail, dnl however, the use of '~' should be fine as apt (others?) will treat dnl it as an earlier version than the actual release. TNX KA6MAL dnl PACKAGE_NAME + " " + PACKAGE_VERSION must not exceed 20 chars! -AC_INIT([Hamlib],[4.6.3~rc2],[ham...@li...],[hamlib],[http://www.hamlib.org]) +AC_INIT([Hamlib],[4.6.3~rc3],[ham...@li...],[hamlib],[http://www.hamlib.org]) #AC_INIT([PRODUCT_NAME], [Hamlib]) #AC_DEFINE([Hamlib], [PRODUCT_VERSION_RESOURCE]) commit 5b4c8c2ea3abbca7f788b0766e7be6aa77db1cd5 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Mon May 26 22:59:36 2025 +0200 Fix Doxygen tags (cherry picked from commit ea5a5ac312393189c8e46b5315b8a450df7e6a93) diff --git a/rigs/aor/ar7030p.c b/rigs/aor/ar7030p.c index 2d57b0f17..7ed486006 100644 --- a/rigs/aor/ar7030p.c +++ b/rigs/aor/ar7030p.c @@ -352,12 +352,12 @@ static int ar7030p_cleanup(RIG *rig) return (rc); } -/* - * /brief Open I/O to receiver +/** + * \brief Open I/O to receiver * - * /param rig Pointer to rig struct + * \param rig Pointer to rig struct * - * /return 0 on success, < 0 on failure + * \return 0 on success, < 0 on failure */ static int ar7030p_open(RIG *rig) { @@ -422,12 +422,12 @@ static int ar7030p_open(RIG *rig) return (rc); } -/* - * /brief Close I/O to receiver +/** + * \brief Close I/O to receiver * - * /param rig Pointer to rig struct + * \param rig Pointer to rig struct * - * /return 0 on success, < 0 on failure + * \return 0 on success, < 0 on failure */ // cppcheck-suppress * static int ar7030p_close(RIG *rig) @@ -468,11 +468,11 @@ static const char *ar7030p_get_info(RIG *rig) } /* - * /brief Set receiver frequency + * \brief Set receiver frequency * - * /param rig Pointer to rig struct - * /param vfo VFO to operate on - * /param freq Frequency to set + * \param rig Pointer to rig struct + * \param vfo VFO to operate on + * \param freq Frequency to set * */ static int ar7030p_set_freq(RIG *rig, vfo_t vfo, freq_t freq) @@ -528,11 +528,11 @@ static int ar7030p_set_freq(RIG *rig, vfo_t vfo, freq_t freq) } /* - * /brief Get receiver frequency + * \brief Get receiver frequency * - * /param rig Pointer to rig struct - * /param vfo VFO to operate on - * /param freq Pointer to hold frequency value (in Hz) + * \param rig Pointer to rig struct + * \param vfo VFO to operate on + * \param freq Pointer to hold frequency value (in Hz) * */ static int ar7030p_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) @@ -584,12 +584,12 @@ static int ar7030p_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) } /* - * /brief Set receiver mode + * \brief Set receiver mode * - * /param rig Pointer to rig struct - * /param vfo VFO to operate on - * /param mode Mode to set - * /param width Bandwidth to set + * \param rig Pointer to rig struct + * \param vfo VFO to operate on + * \param mode Mode to set + * \param width Bandwidth to set * */ static int ar7030p_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, @@ -650,12 +650,12 @@ static int ar7030p_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, } /* - * /brief Get receiver mode and bandwidth + * \brief Get receiver mode and bandwidth * - * /param rig Pointer to rig struct - * /param vfo VFO to operate on - * /param mode Pointer to value to hold mode - * /param width Pointer to value to hold bandwidth + * \param rig Pointer to rig struct + * \param vfo VFO to operate on + * \param mode Pointer to value to hold mode + * \param width Pointer to value to hold bandwidth * */ static int ar7030p_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, @@ -694,16 +694,16 @@ static int ar7030p_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, } /* - * /brief Get memory channel parameters + * \brief Get memory channel parameters * - * /param rig Pointer to rig struct - * /param chan Channel number (0-399) - * /param freq Pointer to frequency value - * /param mode Pointer to mode value (1-7) - * /param filt Pointer to filter value (1-6) - * /param pbs Pointer to passband tuning value - * /param sql Pointer to squelch value (0-255) - * /param id Pointer to channel ident string (14 chars) + * \param rig Pointer to rig struct + * \param chan Channel number (0-399) + * \param freq Pointer to frequency value + * \param mode Pointer to mode value (1-7) + * \param filt Pointer to filter value (1-6) + * \param pbs Pointer to passband tuning value + * \param sql Pointer to squelch value (0-255) + * \param id Pointer to channel ident string (14 chars) * */ #if 0 /* unused; re-enabled as needed. */ @@ -818,14 +818,14 @@ static void ar7030p_get_memory(RIG *rig, const unsigned int chan, #endif /* unused */ /* - * /brief Set receiver levels + * \brief Set receiver levels * - * /param rig Pointer to rig struct - * /param vfo VFO to operate on - * /param level Level to set - * /param val Value to set level to + * \param rig Pointer to rig struct + * \param vfo VFO to operate on + * \param level Level to set + * \param val Value to set level to * - * /return RIG_OK on success + * \return RIG_OK on success */ static int ar7030p_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) @@ -996,14 +996,14 @@ static int ar7030p_set_level(RIG *rig, vfo_t vfo, setting_t level, /* - * /brief Get receiver levels + * \brief Get receiver levels * - * /param rig Pointer to rig struct - * /param vfo VFO to operate on - * /param level Level to get - * /param val Pointer to value to get + * \param rig Pointer to rig struct + * \param vfo VFO to operate on + * \param level Level to get + * \param val Pointer to value to get * - * /return RIG_OK on success + * \return RIG_OK on success */ static int ar7030p_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) @@ -1469,13 +1469,13 @@ static int ar7030p_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts) } /* - * /brief Get receiver tuning step size + * \brief Get receiver tuning step size * - * /param rig Pointer to rig struct - * /param vfo VFO to operate on - * /param ts Pointer to tuning step value + * \param rig Pointer to rig struct + * \param vfo VFO to operate on + * \param ts Pointer to tuning step value * - * /return RIG_OK on success + * \return RIG_OK on success */ static int ar7030p_get_ts(RIG *rig, vfo_t vfo, shortfreq_t *ts) { @@ -1506,12 +1506,12 @@ static int ar7030p_get_ts(RIG *rig, vfo_t vfo, shortfreq_t *ts) } /* - * /brief Set receiver power status + * \brief Set receiver power status * - * /param rig Pointer to rig struct - * /param status Power status to set + * \param rig Pointer to rig struct + * \param status Power status to set * - * /return RIG_OK on success + * \return RIG_OK on success */ static int ar7030p_set_powerstat(RIG *rig, powerstat_t status) { @@ -1542,12 +1542,12 @@ static int ar7030p_set_powerstat(RIG *rig, powerstat_t status) } /* - * /brief Get receiver power status + * \brief Get receiver power status * - * /param rig Pointer to rig struct - * /param status Pointer to power status value + * \param rig Pointer to rig struct + * \param status Pointer to power status value * - * /return RIG_OK on success + * \return RIG_OK on success */ static int ar7030p_get_powerstat(RIG *rig, powerstat_t *status) { @@ -1581,12 +1581,12 @@ static int ar7030p_get_powerstat(RIG *rig, powerstat_t *status) } /* - * /brief Reset receiver + * \brief Reset receiver * - * /param rig Pointer to rig struct - * /param reset Reset operation to perform + * \param rig Pointer to rig struct + * \param reset Reset operation to perform * - * /return RIG_OK on success + * \return RIG_OK on success */ static int ar7030p_reset(RIG *rig, reset_t reset) { diff --git a/rigs/aor/ar7030p_utils.c b/rigs/aor/ar7030p_utils.c index adeef7b8b..b59a8af44 100644 --- a/rigs/aor/ar7030p_utils.c +++ b/rigs/aor/ar7030p_utils.c @@ -387,11 +387,11 @@ int BUT(RIG *rig, enum BUTTON_e button) #endif // 0 -/* - * /brief Execute routine +/** + * \brief Execute routine * - * /param rig Pointer to rig struct - * /param rtn Receiver routine to execute + * \param rig Pointer to rig struct + * \param rtn Receiver routine to execute * * \return RIG_OK on success, error code on failure * @@ -413,12 +413,12 @@ int execRoutine(RIG *rig, enum ROUTINE_e rtn) return (rc); } -/* - * /brief Set address for I/O with radio +/** + * \brief Set address for I/O with radio * - * /param rig Pointer to rig struct - * /param page Memory page number (0-4, 15) - * /param addr Address offset within page (0-4095, depending on page) + * \param rig Pointer to rig struct + * \param page Memory page number (0-4, 15) + * \param addr Address offset within page (0-4095, depending on page) * * \return RIG_OK on success, error code on failure * @@ -513,12 +513,12 @@ static int setAddr(RIG *rig, enum PAGE_e page, unsigned int addr) } /* - * /brief Write one byte to the receiver + * \brief Write one byte to the receiver * - * /param rig Pointer to rig struct - * /param page Memory page number (0-4, 15) - * /param addr Address offset within page (0-4095, depending on page) - * /param x Value to write to radio + * \param rig Pointer to rig struct + * \param page Memory page number (0-4, 15) + * \param addr Address offset within page (0-4095, depending on page) + * \param x Value to write to radio * * \return RIG_OK on success, error code on failure * @@ -554,12 +554,12 @@ int writeByte(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned char x) } /* - * /brief Write two bytes to the receiver + * \brief Write two bytes to the receiver * - * /param rig Pointer to rig struct - * /param page Memory page number (0-4, 15) - * /param addr Address offset within page (0-4095, depending on page) - * /param x Value to write to radio + * \param rig Pointer to rig struct + * \param page Memory page number (0-4, 15) + * \param addr Address offset within page (0-4095, depending on page) + * \param x Value to write to radio * * \return Number of bytes written, 0 on error. Get error code with getErrno. * @@ -581,12 +581,12 @@ int writeShort(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned short x) } /* - * /brief Write three bytes to the receiver + * \brief Write three bytes to the receiver * - * /param rig Pointer to rig struct - * /param page Memory page number (0-4, 15) - * /param addr Address offset within page (0-4095, depending on page) - * /param x Value to write to radio + * \param rig Pointer to rig struct + * \param page Memory page number (0-4, 15) + * \param addr Address offset within page (0-4095, depending on page) + * \param x Value to write to radio * * \return Number of bytes written, 0 on error. Get error code with getErrno. * @@ -616,12 +616,12 @@ int write3Bytes(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned int x) #ifdef XXREMOVEDXX // this function is not referenced anywhere /* - * /brief Write unsigned int (4 bytes) to the receiver + * \brief Write unsigned int (4 bytes) to the receiver * - * /param rig Pointer to rig struct - * /param page Memory page number (0-4, 15) - * /param addr Address offset within page (0-4095, depending on page) - * /param x Value to write to radio + * \param rig Pointer to rig struct + * \param page Memory page number (0-4, 15) + * \param addr Address offset within page (0-4095, depending on page) + * \param x Value to write to radio * * \return Number of bytes written, 0 on error. Get error code with getErrno. * @@ -656,12 +656,12 @@ int writeInt(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned int x) #endif /* - * /brief Read one byte from the receiver + * \brief Read one byte from the receiver * - * /param rig Pointer to rig struct - * /param page Memory page number (0-4, 15) - * /param addr Address offset within page (0-4095, depending on page) - * /param x Pointer to value to read from radio + * \param rig Pointer to rig struct + * \param page Memory page number (0-4, 15) + * \param addr Address offset within page (0-4095, depending on page) + * \param x Pointer to value to read from radio * * \return RIG_OK on success, error code on failure * @@ -697,12 +697,12 @@ int readByte(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned char *x) } /* - * /brief Read an unsigned short (two bytes) from the receiver + * \brief Read an unsigned short (two bytes) from the receiver * - * /param rig Pointer to rig struct - * /param page Memory page number (0-4, 15) - * /param addr Address offset within page (0-4095, depending on page) - * /param x Pointer to value to read from radio + * \param rig Pointer to rig struct + * \param page Memory page number (0-4, 15) + * \param addr Address offset within page (0-4095, depending on page) + * \param x Pointer to value to read from radio * * \return RIG_OK on success, error code on failure * @@ -734,12 +734,12 @@ int readShort(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned short *x) } /* - * /brief Read an unsigned int (three bytes) from the receiver + * \brief Read an unsigned int (three bytes) from the receiver * - * /param rig Pointer to rig struct - * /param page Memory page number (0-4, 15) - * /param addr Address offset within page (0-4095, depending on page) - * /param x Pointer to value to read from radio + * \param rig Pointer to rig struct + * \param page Memory page number (0-4, 15) + * \param addr Address offset within page (0-4095, depending on page) + * \param x Pointer to value to read from radio * * \return RIG_OK on success, error code on failure * @@ -779,12 +779,12 @@ int read3Bytes(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned int *x) #ifdef XXREMOVEDXX // this function is not referenced anywhere /* - * /brief Read an unsigned int (four bytes) from the receiver + * \brief Read an unsigned int (four bytes) from the receiver * - * /param rig Pointer to rig struct - * /param page Memory page number (0-4, 15) - * /param addr Address offset within page (0-4095, depending on page) - * /param x Pointer to value to read from radio + * \param rig Pointer to rig struct + * \param page Memory page number (0-4, 15) + * \param addr Address offset within page (0-4095, depending on page) + * \param x Pointer to value to read from radio * * \return RIG_OK on success, error code on failure * @@ -827,9 +827,9 @@ int readInt(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned int *x) #endif /* - * /brief Read raw AGC value from the radio + * \brief Read raw AGC value from the radio * - * /param rig Pointer to rig struct + * \param rig Pointer to rig struct * * \return RIG_OK on success, error code on failure */ @@ -858,9 +858,9 @@ int readSignal(RIG *rig, unsigned char *x) #ifdef XXREMOVEDXX // this function is not referenced anywhere /* - * /brief Flush I/O with radio + * \brief Flush I/O with radio * - * /param rig Pointer to rig struct + * \param rig Pointer to rig struct * */ int flushBuffer(RIG *rig) @@ -880,10 +880,10 @@ int flushBuffer(RIG *rig) #endif /* - * /brief Lock receiver for remote operations + * \brief Lock receiver for remote operations * - * /param rig Pointer to rig struct - * /param level Lock level (0-3) + * \param rig Pointer to rig struct + * \param level Lock level (0-3) * */ int lockRx(RIG *rig, enum LOCK_LVL_e level) @@ -1104,11 +1104,11 @@ int getFilterBW(RIG *rig, enum FILTER_e filter) } /* - * /brief Convert DDS steps to frequency in Hz + * \brief Convert DDS steps to frequency in Hz * - * /param steps DDS count + * \param steps DDS count * - * /return Frequency in Hz or 0 on failure + * \return Frequency in Hz or 0 on failure */ freq_t ddsToHz(const unsigned int steps) { @@ -1120,11 +1120,11 @@ freq_t ddsToHz(const unsigned int steps) } /* - * /brief Convert frequency in Hz to DDS steps + * \brief Convert frequency in Hz to DDS steps * - * /param freq Frequency in Hz + * \param freq Frequency in Hz * - * /return DDS steps (24 bits) or 0 on failure + * \return DDS steps (24 bits) or 0 on failure */ unsigned int hzToDDS(const freq_t freq) { @@ -1156,11 +1156,11 @@ unsigned int hzToDDS(const freq_t freq) } /* - * /brief Convert PBS/BFO steps to frequency in Hz + * \brief Convert PBS/BFO steps to frequency in Hz * - * /param steps PBS/BFO offset steps + * \param steps PBS/BFO offset steps * - * /return Frequency in Hz or 0 on failure + * \return Frequency in Hz or 0 on failure * * Max +ve offset is 127, max -ve offset is 128 * Min -ve offset is 255 @@ -1187,11 +1187,11 @@ float pbsToHz(const unsigned char steps) #ifdef XXREMOVEDXX // this function is not referenced anywhere /* - * /brief Convert PBS/BFO offset frequency in Hz to steps + * \brief Convert PBS/BFO offset frequency in Hz to steps * - * /param freq Offset frequency in Hz + * \param freq Offset frequency in Hz * - * /return steps (8 bits) or 0 on failure + * \return steps (8 bits) or 0 on failure */ unsigned char hzToPBS(const float freq) { @@ -1229,11 +1229,11 @@ unsigned char hzToPBS(const float freq) #endif /* - * /brief Convert native Mode to Hamlib mode + * \brief Convert native Mode to Hamlib mode * - * /param mode Native mode value + * \param mode Native mode value * - * /return Hamlib mode value + * \return Hamlib mode value */ rmode_t modeToHamlib(const unsigned char mode) { @@ -1280,11 +1280,11 @@ rmode_t modeToHamlib(const unsigned char mode) } /* - * /brief Convert Hamlib Mode to native mode + * \brief Convert Hamlib Mode to native mode * - * /param mode Hamlib mode value + * \param mode Hamlib mode value * - * /return Native mode value + * \return Native mode value */ unsigned char modeToNative(const rmode_t mode) { @@ -1331,11 +1331,11 @@ unsigned char modeToNative(const rmode_t mode) } /* - * /brief Convert native AGC speed to Hamlib AGC speed + * \brief Convert native AGC speed to Hamlib AGC speed * - * /param agc Native AGC speed value + * \param agc Native AGC speed value * - * /return Hamlib AGC speed value + * \return Hamlib AGC speed value */ enum agc_level_e agcToHamlib(const unsigned char agc) { @@ -1370,11 +1370,11 @@ enum agc_level_e agcToHamlib(const unsigned char agc) } /* - * /brief Convert Hamlib AGC speed to native AGC speed + * \brief Convert Hamlib AGC speed to native AGC speed * - * /param agc Hamlib AGC speed value + * \param agc Hamlib AGC speed value * - * /return Native AGC speed value + * \return Native AGC speed value */ unsigned char agcToNative(const enum agc_level_e agc) { @@ -1413,11 +1413,11 @@ unsigned char agcToNative(const enum agc_level_e agc) } /* - * /brief Get page size + * \brief Get page size * - * /param page Page to get size of + * \param page Page to get size of * - * /return Page size, -1 on error + * \return Page size, -1 on error */ int pageSize(const enum PAGE_e page) { @@ -1440,9 +1440,9 @@ int pageSize(const enum PAGE_e page) } /* - * /brief Set and execute IR controller code + * \brief Set and execute IR controller code * - * /param code IR code to execute + * \param code IR code to execute * * \return RIG_OK on success, error code on failure */ diff --git a/src/misc.c b/src/misc.c index 091655dca..fed8cbd8a 100644 --- a/src/misc.c +++ b/src/misc.c @@ -1027,7 +1027,7 @@ static const struct { AMP_LEVEL_NONE, "" }, }; -/* +/** * \brief check input to set_level * \param rig Pointer to rig data * \param level RIG_LEVEL_* trying to set diff --git a/src/rig.c b/src/rig.c index 1be0bad4a..9259f55ce 100644 --- a/src/rig.c +++ b/src/rig.c @@ -2945,7 +2945,7 @@ int HAMLIB_API rig_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) RETURNFUNC(retcode); } -/* +/** * \brief get the mode of the target VFO * \param rig The rig handle * \param vfo The target VFO ----------------------------------------------------------------------- Summary of changes: NEWS | 1 + configure.ac | 2 +- rigs/aor/ar7030p.c | 128 +++++++++++++++++------------------ rigs/aor/ar7030p_utils.c | 170 +++++++++++++++++++++++------------------------ src/misc.c | 2 +- src/rig.c | 2 +- 6 files changed, 153 insertions(+), 152 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-06-07 13:01:29
|
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 7b60cb586dc6b1f76bd85bceba42dac373159914 (commit) via 10180a6dc2433d525d4c3ba75c2f6519f0c55031 (commit) via 721b81d9bed4c23ce74d1140833968c55e6b4d1e (commit) via 72bde6e13171e1c2425e094413598ec88a8397a0 (commit) from ae9556462a2989b8b97af0d6e320558ffa0e1f3e (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 7b60cb586dc6b1f76bd85bceba42dac373159914 Merge: ae9556462 10180a6dc Author: Nate Bargmann <n0...@n0...> Date: Sat Jun 7 07:56:07 2025 -0500 Merge GitHub PR #1751 commit 10180a6dc2433d525d4c3ba75c2f6519f0c55031 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Tue May 27 20:15:34 2025 +0200 Fix sign of error return values All RIG_E* constants should be negated when returned or compared. Fixed with: perl -pe 's/return RIG_E/return -RIG_E/' -i $(grep -lEr "return RIG_E" --include=*.{c,h}) perl -pe 's/= RIG_E/= -RIG_E/g' -i $(grep -lEr "= RIG_E" --include=*.{c,h}) diff --git a/rigs/adat/adat.c b/rigs/adat/adat.c index ad08b58e4..e23002184 100644 --- a/rigs/adat/adat.c +++ b/rigs/adat/adat.c @@ -1565,9 +1565,9 @@ int adat_cmd_recover_from_error(RIG *pRig, int nError) // Recover from communication error - if ((nError == RIG_ETIMEOUT) - || (nError == RIG_EPROTO) - || (nError == RIG_EIO)) + if ((nError == -RIG_ETIMEOUT) + || (nError == -RIG_EPROTO) + || (nError == -RIG_EIO)) { rig_close(pRig); diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index a150e1bc9..4ee7b3de6 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -887,7 +887,7 @@ static int flrig_open(RIG *rig) /* see if get_modeA is available */ retval = flrig_transaction(rig, "rig.get_modeA", NULL, value, sizeof(value)); - if (retval == RIG_ENAVAIL) // must not have it + if (retval == -RIG_ENAVAIL) // must not have it { priv->has_get_modeA = 0; rig_debug(RIG_DEBUG_VERBOSE, "%s: getmodeA is not available=%s\n", __func__, @@ -902,7 +902,7 @@ static int flrig_open(RIG *rig) /* see if get_modeB is available */ retval = flrig_transaction(rig, "rig.get_modeB", NULL, value, sizeof(value)); - if (retval == RIG_ENAVAIL) // must not have it + if (retval == -RIG_ENAVAIL) // must not have it { priv->has_get_modeB = 0; rig_debug(RIG_DEBUG_VERBOSE, "%s: getmodeB is not available=%s\n", __func__, @@ -927,7 +927,7 @@ static int flrig_open(RIG *rig) retval = flrig_transaction(rig, "rig.get_bwA", NULL, value, sizeof(value)); int dummy; - if (retval == RIG_ENAVAIL || value[0] == 0 + if (retval == -RIG_ENAVAIL || value[0] == 0 || sscanf(value, "%d", &dummy) <= 0) // must not have it { priv->has_get_bwA = 0; @@ -946,7 +946,7 @@ static int flrig_open(RIG *rig) /* see if set_bwA is available */ retval = flrig_transaction(rig, "rig.set_bwA", NULL, value, sizeof(value)); - if (retval == RIG_ENAVAIL) // must not have it + if (retval == -RIG_ENAVAIL) // must not have it { priv->has_set_bwA = 0; priv->has_set_bwB = 0; @@ -964,7 +964,7 @@ static int flrig_open(RIG *rig) // see if get_bwB is available FLRig can return empty value too retval = flrig_transaction(rig, "rig.get_bwB", NULL, value, sizeof(value)); - if (retval == RIG_ENAVAIL || strlen(value) == 0) // must not have it + if (retval == -RIG_ENAVAIL || strlen(value) == 0) // must not have it { priv->has_get_bwB = 0; rig_debug(RIG_DEBUG_VERBOSE, "%s: get_bwB is not available=%s\n", __func__, @@ -979,7 +979,7 @@ static int flrig_open(RIG *rig) /* see if set_bwB is available */ retval = flrig_transaction(rig, "rig.set_bwB", NULL, value, sizeof(value)); - if (retval == RIG_ENAVAIL) // must not have it + if (retval == -RIG_ENAVAIL) // must not have it { priv->has_set_bwB = 0; rig_debug(RIG_DEBUG_VERBOSE, "%s: set_bwB is not available=%s\n", __func__, @@ -2383,7 +2383,7 @@ static int flrig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) retval = flrig_transaction(rig, cmd, NULL, value, sizeof(value)); - if (retval == RIG_ENAVAIL && strcmp(cmd, "rig.get_SWR") == 0) + if (retval == -RIG_ENAVAIL && strcmp(cmd, "rig.get_SWR") == 0) { priv->get_SWR = 0; cmd = "rig.get_swrmeter"; // revert to old flrig method diff --git a/rigs/dummy/quisk.c b/rigs/dummy/quisk.c index 4f8007af8..c3fb30b0e 100644 --- a/rigs/dummy/quisk.c +++ b/rigs/dummy/quisk.c @@ -2070,7 +2070,7 @@ static int quisk_get_powerstat(RIG *rig, powerstat_t *status) // a return of 1 should indicate there is no powerstat command available // so we fake the ON status // also a problem with Flex 6xxx and Log4OM not working due to lack of PS command - if (ret != RIG_ETIMEOUT) + if (ret != -RIG_ETIMEOUT) { rig_debug(RIG_DEBUG_VERBOSE, "%s: PS command failed (ret=%d) so returning RIG_POWER_ON\n", __func__, ret); diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 38e12e82b..7cb8cf81a 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -1232,7 +1232,7 @@ retry_open: { // maybe we need power on? rig_debug(RIG_DEBUG_VERBOSE, "%s trying power on\n", __func__); - retval = abs(rig_set_powerstat(rig, 1)); + retval = rig_set_powerstat(rig, 1); // this is only a fatal error if powerstat is implemented // if not implemented than we're at an error here @@ -1243,7 +1243,7 @@ retry_open: rig_debug(RIG_DEBUG_ERR, "%s: rig_set_powerstat failed: %s\n", __func__, rigerror(retval)); - if (retval == RIG_ENIMPL || retval == RIG_ENAVAIL) + if (retval == -RIG_ENIMPL || retval == -RIG_ENAVAIL) { rig_debug(RIG_DEBUG_ERR, "%s: rig_set_powerstat not implemented for rig\n", __func__); @@ -1316,11 +1316,11 @@ int icom_rig_close(RIG *rig) { // maybe we need power off? rig_debug(RIG_DEBUG_VERBOSE, "%s trying power off\n", __func__); - int retval = abs(rig_set_powerstat(rig, 0)); + int retval = rig_set_powerstat(rig, 0); // this is only a fatal error if powerstat is implemented // if not implemented than we're at an error here - if (retval != RIG_OK && retval != RIG_ENIMPL && retval != RIG_ENAVAIL) + if (retval != RIG_OK && retval != -RIG_ENIMPL && retval != -RIG_ENAVAIL) { rig_debug(RIG_DEBUG_WARN, "%s: unexpected retval here: %s\n", __func__, rigerror(retval)); diff --git a/rigs/kenwood/ic10.c b/rigs/kenwood/ic10.c index ac57db4b8..c2c75e13a 100644 --- a/rigs/kenwood/ic10.c +++ b/rigs/kenwood/ic10.c @@ -152,7 +152,7 @@ static int get_ic10_if(RIG *rig, char *data) { const struct kenwood_priv_caps *priv = (struct kenwood_priv_caps *) rig->caps->priv; - int i, data_len, retval = RIG_EINVAL; + int i, data_len, retval = -RIG_EINVAL; rig_debug(RIG_DEBUG_TRACE, "%s: called\n", __func__); diff --git a/rigs/kenwood/k3.c b/rigs/kenwood/k3.c index 4f129a1a3..da0541059 100644 --- a/rigs/kenwood/k3.c +++ b/rigs/kenwood/k3.c @@ -2352,7 +2352,7 @@ int k3_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) } else { - return RIG_EPROTO; + return -RIG_EPROTO; } // extended K22 format PCnnnx where 0=.1W units and 1=1W units diff --git a/rigs/pcr/pcr.c b/rigs/pcr/pcr.c index 12a8ae12d..f0c73f673 100644 --- a/rigs/pcr/pcr.c +++ b/rigs/pcr/pcr.c @@ -589,7 +589,7 @@ pcr_open(RIG *rig) rig_flush(rp); - /* return RIG_ERJCTED if power is off */ + /* return -RIG_ERJCTED if power is off */ err = pcr_transaction(rig, "H1?"); if (err != RIG_OK) @@ -1939,7 +1939,7 @@ int pcr_get_powerstat(RIG *rig, powerstat_t *status) struct pcr_priv_data *priv = (struct pcr_priv_data *) STATE(rig)->priv; int err; - /* return RIG_ERJCTED if power is off */ + /* return -RIG_ERJCTED if power is off */ err = pcr_transaction(rig, "H1?"); if (err != RIG_OK && err != -RIG_ERJCTED) diff --git a/rigs/tentec/orion.c b/rigs/tentec/orion.c index 2ad454553..d497eefe0 100644 --- a/rigs/tentec/orion.c +++ b/rigs/tentec/orion.c @@ -425,7 +425,7 @@ int tt565_set_freq(RIG *rig, vfo_t vfo, freq_t freq) * matches the VFO A/B setting. c.f. rig_get_range(). * Recall VFOA = ham only, VFOB = gen coverage for Hamlib. * (We assume VFOA = Main RXTX and VFOB = Sub RX.) - * If outside range, return RIG_ERJECTED for compatibility vs icom.c etc. + * If outside range, return -RIG_ERJECTED for compatibility vs icom.c etc. */ in_range = FALSE; diff --git a/rigs/yaesu/ft757gx.c b/rigs/yaesu/ft757gx.c index d7bdf5518..4189e8bc7 100644 --- a/rigs/yaesu/ft757gx.c +++ b/rigs/yaesu/ft757gx.c @@ -508,7 +508,7 @@ static int ft757gx_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) return RIG_OK; } - return RIG_ENAVAIL; + return -RIG_ENAVAIL; } /* diff --git a/rotators/grbltrk/grbltrk.c b/rotators/grbltrk/grbltrk.c index 9227206fb..abf398765 100644 --- a/rotators/grbltrk/grbltrk.c +++ b/rotators/grbltrk/grbltrk.c @@ -133,7 +133,7 @@ grbl_request(ROT *rot, char *request, uint32_t req_size, char *response, rot_debug(RIG_DEBUG_ERR, "%s write_block fail!\n", __func__); //exit(-1); fail_count++; - //return RIG_EIO; + //return -RIG_EIO; } else { @@ -150,7 +150,7 @@ grbl_request(ROT *rot, char *request, uint32_t req_size, char *response, rot_debug(RIG_DEBUG_ERR, "%s read_string fail! (%d) \n", __func__, retval); //exit(-1); fail_count++; - //return RIG_EIO; + //return -RIG_EIO; } else { @@ -205,7 +205,7 @@ grbl_init(ROT *rot) if (retval != RIG_OK) { rot_debug(RIG_DEBUG_ERR, "grbl_request [%s] fail\n", grbl_init_list[i]); - return RIG_EIO; + return -RIG_EIO; } } @@ -447,7 +447,7 @@ grbltrk_rot_set_conf(ROT *rot, hamlib_token_t token, const char *val) if (retval < 0) { rot_debug(RIG_DEBUG_ERR, "grbl_request [%s] fail\n", val); - return RIG_EIO; + return -RIG_EIO; } } diff --git a/rotators/meade/meade.c b/rotators/meade/meade.c index e36a075fd..997ec24cc 100644 --- a/rotators/meade/meade.c +++ b/rotators/meade/meade.c @@ -310,7 +310,7 @@ static int meade_set_position(ROT *rot, azimuth_t az, elevation_t el) { rig_debug(RIG_DEBUG_VERBOSE, "%s: expected 110, got %s\n", __func__, return_str); - return RIG_EINVAL; + return -RIG_EINVAL; } } diff --git a/rotators/skywatcher/skywatcher.c b/rotators/skywatcher/skywatcher.c index 4cd6e6da6..43a38a54a 100644 --- a/rotators/skywatcher/skywatcher.c +++ b/rotators/skywatcher/skywatcher.c @@ -93,7 +93,7 @@ static int skywatcher_cmd(ROT *rot, const char *cmd, char *response, rig_debug(RIG_DEBUG_ERR, "Error response: '%s'\n", response); } - return RIG_EPROTO; + return -RIG_EPROTO; } // remove leading '=' @@ -204,7 +204,7 @@ int skywatcher_set_motor_position(ROT *rot, int motor_index, float angle) if (status & 0b10) { rig_debug(RIG_DEBUG_ERR, "%s: motor is blocked\n", __func__); - return RIG_EPROTO; + return -RIG_EPROTO; } if (status & 0b1) @@ -221,7 +221,7 @@ int skywatcher_set_motor_position(ROT *rot, int motor_index, float angle) if (!stopped) { - return RIG_EPROTO; + return -RIG_EPROTO; } SNPRINTF(req, sizeof(req), ":G%d00\r", motor_index); diff --git a/src/rig.c b/src/rig.c index e479f0c46..5d83546eb 100644 --- a/src/rig.c +++ b/src/rig.c @@ -7448,7 +7448,7 @@ int HAMLIB_API rig_send_morse(RIG *rig, vfo_t vfo, const char *msg) { const struct rig_caps *caps; struct rig_state *rs; - int retcode = RIG_EINTERNAL, rc2; + int retcode = -RIG_EINTERNAL, rc2; vfo_t curr_vfo; if (CHECK_RIG_ARG(rig)) diff --git a/tests/ampctl_parse.c b/tests/ampctl_parse.c index 62e3ac080..66499bd40 100644 --- a/tests/ampctl_parse.c +++ b/tests/ampctl_parse.c @@ -1393,7 +1393,7 @@ int ampctl_parse(AMP *my_amp, FILE *fin, FILE *fout, char *argv[], int argc) pthread_mutex_unlock(&_mutex); #endif - if (retcode == RIG_EIO) { return retcode; } + if (retcode == -RIG_EIO) { return retcode; } if (retcode != RIG_OK) { @@ -1608,7 +1608,7 @@ int set_conf(AMP *my_amp, char *conf_parms) if (!q) { - return RIG_EINVAL; + return -RIG_EINVAL; } *q++ = '\0'; diff --git a/tests/rigmem.c b/tests/rigmem.c index 54de7fbdb..8bc44abc8 100644 --- a/tests/rigmem.c +++ b/tests/rigmem.c @@ -421,7 +421,7 @@ static int set_conf(RIG *rig, char *conf_parms) if (!q) { - return RIG_EINVAL; + return -RIG_EINVAL; } *q++ = '\0'; diff --git a/tests/rigsmtr.c b/tests/rigsmtr.c index 26132d3b8..21533f6de 100644 --- a/tests/rigsmtr.c +++ b/tests/rigsmtr.c @@ -394,7 +394,7 @@ int set_conf_rig(RIG *rig, char *conf_parms) if (!q) { - return RIG_EINVAL; + return -RIG_EINVAL; *q++ = '\0'; n = strchr(q, ','); diff --git a/tests/rigswr.c b/tests/rigswr.c index af0a186f9..a3f0a592a 100644 --- a/tests/rigswr.c +++ b/tests/rigswr.c @@ -346,7 +346,7 @@ static int set_conf(RIG *rig, char *conf_parms) if (!q) { - return RIG_EINVAL; + return -RIG_EINVAL; } *q++ = '\0'; diff --git a/tests/rotctl_parse.c b/tests/rotctl_parse.c index c47457645..5b843f03a 100644 --- a/tests/rotctl_parse.c +++ b/tests/rotctl_parse.c @@ -1472,7 +1472,7 @@ int rotctl_parse(ROT *my_rot, FILE *fin, FILE *fout, const char *argv[], pthread_mutex_unlock(&rot_mutex); #endif - if (retcode == RIG_EIO) { return retcode; } + if (retcode == -RIG_EIO) { return retcode; } if (retcode != RIG_OK) { commit 721b81d9bed4c23ce74d1140833968c55e6b4d1e Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Fri May 30 23:03:03 2025 +0200 Fix sign of return values Doxygen comments All RIG_E* constants are negated when returned. Fied with: perl -pe 's/return RIG_E/return -RIG_E/' -i src/vent.c perl -pe 's/retval RIG_E/retval -RIG_E/g' -i $(grep -lEr "retval RIG_E" --include=*.{c,h}) diff --git a/src/amp_conf.c b/src/amp_conf.c index 14f53d62c..22738866a 100644 --- a/src/amp_conf.c +++ b/src/amp_conf.c @@ -102,7 +102,7 @@ static const struct confparams ampfrontend_serial_cfg_params[] = * \return RIG_OK or a **negative value** error. * * \retval RIG_OK TOK_... value set successfully. - * \retval RIG_EINVAL TOK_.. value not set. + * \retval -RIG_EINVAL TOK_.. value not set. * * \sa frontamp_get_conf() */ @@ -365,7 +365,7 @@ int frontamp_set_conf(AMP *amp, hamlib_token_t token, const char *val) * \return RIG_OK or a **negative value** on error. * * \retval RIG_OK TOK_... value queried successfully. - * \retval RIG_EINVAL TOK_.. value not queried. + * \retval -RIG_EINVAL TOK_.. value not queried. * * \sa frontamp_set_conf() */ @@ -517,7 +517,7 @@ int frontamp_get_conf2(AMP *amp, hamlib_token_t token, char *val, int val_len) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The \a cfunc action completed successfully. - * \retval RIG_EINVAL \a amp is NULL or inconsistent or \a cfunc is NULL. + * \retval -RIG_EINVAL \a amp is NULL or inconsistent or \a cfunc is NULL. */ int HAMLIB_API amp_token_foreach(AMP *amp, int (*cfunc)(const struct confparams *, @@ -673,8 +673,8 @@ hamlib_token_t HAMLIB_API amp_token_lookup(AMP *amp, const char *name) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The parameter was set successfully. - * \retval RIG_EINVAL \a amp is NULL or inconsistent or \a token is invalid. - * \retval RIG_ENAVAIL amp_caps#set_conf() capability is not available. + * \retval -RIG_EINVAL \a amp is NULL or inconsistent or \a token is invalid. + * \retval -RIG_ENAVAIL amp_caps#set_conf() capability is not available. * * \sa amp_get_conf() */ @@ -729,8 +729,8 @@ int HAMLIB_API amp_set_conf(AMP *amp, hamlib_token_t token, const char *val) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK Querying the parameter was successful. - * \retval RIG_EINVAL \a amp is NULL or inconsistent. - * \retval RIG_ENAVAIL amp_caps#get_conf() capability is not available. + * \retval -RIG_EINVAL \a amp is NULL or inconsistent. + * \retval -RIG_ENAVAIL amp_caps#get_conf() capability is not available. * * \sa amp_set_conf() */ diff --git a/src/amplifier.c b/src/amplifier.c index b34a1d617..9be99e0e0 100644 --- a/src/amplifier.c +++ b/src/amplifier.c @@ -304,7 +304,7 @@ AMP *HAMLIB_API amp_init(amp_model_t amp_model) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK Communication channel successfully opened. - * \retval RIG_EINVAL \a amp is NULL or inconsistent. + * \retval -RIG_EINVAL \a amp is NULL or inconsistent. * * \sa amp_init(), amp_close() */ @@ -463,7 +463,7 @@ int HAMLIB_API amp_open(AMP *amp) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK Communication channel successfully closed. - * \retval RIG_EINVAL \a amp is NULL or inconsistent. + * \retval -RIG_EINVAL \a amp is NULL or inconsistent. * * \sa amp_cleanup(), amp_open() */ @@ -555,7 +555,7 @@ int HAMLIB_API amp_close(AMP *amp) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK #AMP handle successfully released. - * \retval RIG_EINVAL \a amp is NULL or inconsistent. + * \retval -RIG_EINVAL \a amp is NULL or inconsistent. * * \sa amp_init(), amp_close() */ @@ -602,8 +602,8 @@ int HAMLIB_API amp_cleanup(AMP *amp) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The reset command was successful. - * \retval RIG_EINVAL \a amp is NULL or inconsistent. - * \retval RIG_ENAVAIL amp_caps#reset() capability is not available. + * \retval -RIG_EINVAL \a amp is NULL or inconsistent. + * \retval -RIG_ENAVAIL amp_caps#reset() capability is not available. */ int HAMLIB_API amp_reset(AMP *amp, amp_reset_t reset) { @@ -639,8 +639,8 @@ int HAMLIB_API amp_reset(AMP *amp, amp_reset_t reset) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The query was successful. - * \retval RIG_EINVAL \a amp is NULL or inconsistent. - * \retval RIG_ENAVAIL amp_caps#get_freq() capability is not available. + * \retval -RIG_EINVAL \a amp is NULL or inconsistent. + * \retval -RIG_ENAVAIL amp_caps#get_freq() capability is not available. * * \sa amp_set_freq() */ @@ -679,8 +679,8 @@ int HAMLIB_API amp_get_freq(AMP *amp, freq_t *freq) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK Setting the frequency was successful. - * \retval RIG_EINVAL \a amp is NULL or inconsistent. - * \retval RIG_ENAVAIL amp_caps#set_freq() capability is not available. + * \retval -RIG_EINVAL \a amp is NULL or inconsistent. + * \retval -RIG_ENAVAIL amp_caps#set_freq() capability is not available. * * \sa amp_get_freq() */ @@ -752,8 +752,8 @@ const char *HAMLIB_API amp_get_info(AMP *amp) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The query was successful. - * \retval RIG_EINVAL \a amp is NULL or inconsistent. - * \retval RIG_ENAVAIL amp_caps#get_level() capability is not available. + * \retval -RIG_EINVAL \a amp is NULL or inconsistent. + * \retval -RIG_ENAVAIL amp_caps#get_level() capability is not available. * * \sa amp_set_ext_level() */ @@ -789,8 +789,8 @@ int HAMLIB_API amp_set_level(AMP *amp, setting_t level, value_t val) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The query was successful. - * \retval RIG_EINVAL \a amp is NULL or inconsistent. - * \retval RIG_ENAVAIL amp_caps#get_level() capability is not available. + * \retval -RIG_EINVAL \a amp is NULL or inconsistent. + * \retval -RIG_ENAVAIL amp_caps#get_level() capability is not available. * * \sa amp_get_ext_level() */ @@ -825,8 +825,8 @@ int HAMLIB_API amp_get_level(AMP *amp, setting_t level, value_t *val) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The query was successful. - * \retval RIG_EINVAL \a amp is NULL or inconsistent. - * \retval RIG_ENAVAIL amp_caps#set_ext_level() capability is not available. + * \retval -RIG_EINVAL \a amp is NULL or inconsistent. + * \retval -RIG_ENAVAIL amp_caps#set_ext_level() capability is not available. * * \sa amp_set_level() */ @@ -860,8 +860,8 @@ int HAMLIB_API amp_set_ext_level(AMP *amp, hamlib_token_t level, value_t val) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The query was successful. - * \retval RIG_EINVAL \a amp is NULL or inconsistent. - * \retval RIG_ENAVAIL amp_caps#get_ext_level() capability is not available. + * \retval -RIG_EINVAL \a amp is NULL or inconsistent. + * \retval -RIG_ENAVAIL amp_caps#get_ext_level() capability is not available. * * \sa amp_get_level() */ @@ -898,8 +898,8 @@ int HAMLIB_API amp_get_ext_level(AMP *amp, hamlib_token_t level, value_t *val) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The requested power/standby state was successful. - * \retval RIG_EINVAL \a amp is NULL or inconsistent. - * \retval RIG_ENAVAIL amp_caps#set_powerstat() capability is not available. + * \retval -RIG_EINVAL \a amp is NULL or inconsistent. + * \retval -RIG_ENAVAIL amp_caps#set_powerstat() capability is not available. * * \sa amp_get_powerstat() */ @@ -935,8 +935,8 @@ int HAMLIB_API amp_set_powerstat(AMP *amp, powerstat_t status) * if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK Querying the power/standby state was successful. - * \retval RIG_EINVAL \a amp is NULL or inconsistent. - * \retval RIG_ENAVAIL amp_caps#get_powerstat() capability is not available. + * \retval -RIG_EINVAL \a amp is NULL or inconsistent. + * \retval -RIG_ENAVAIL amp_caps#get_powerstat() capability is not available. * * \sa amp_set_powerstat() */ diff --git a/src/cm108.c b/src/cm108.c index 340282eeb..9fd36c1e3 100644 --- a/src/cm108.c +++ b/src/cm108.c @@ -165,8 +165,8 @@ const char *get_usb_device_class_string(int device_class) * \return File descriptor, otherwise a **negative value** if an error * occurred (in which case, cause is set appropriately). * - * \retval RIG_EINVAL The port pathname is empty or no CM108 device detected. - * \retval RIG_EIO The `open`(2) system call returned a **negative value**. + * \retval -RIG_EINVAL The port pathname is empty or no CM108 device detected. + * \retval -RIG_EIO The `open`(2) system call returned a **negative value**. */ int cm108_open(hamlib_port_t *port) { @@ -263,9 +263,9 @@ int cm108_close(hamlib_port_t *port) * occurred (in which case, cause is set appropriately). * * \retval RIG_OK Setting or unsetting the PTT was successful. - * \retval RIG_EINVAL The file descriptor is invalid or the PTT type is + * \retval -RIG_EINVAL The file descriptor is invalid or the PTT type is * unsupported. - * \retval RIG_EIO The `write`(2) system call returned a **negative value**. + * \retval -RIG_EIO The `write`(2) system call returned a **negative value**. */ int cm108_ptt_set(hamlib_port_t *p, ptt_t pttx) { @@ -347,8 +347,8 @@ int cm108_ptt_set(hamlib_port_t *p, ptt_t pttx) * occurred (in which case, cause is set appropriately). * * \retval RIG_OK Getting the PTT state was successful. - * \retval RIG_ENIMPL Getting the state is not yet implemented. - * \retval RIG_ENAVAIL Getting the state is not available for this PTT type. + * \retval -RIG_ENIMPL Getting the state is not yet implemented. + * \retval -RIG_ENAVAIL Getting the state is not available for this PTT type. */ int cm108_ptt_get(hamlib_port_t *p, ptt_t *pttx) { diff --git a/src/event.c b/src/event.c index 10a47ff88..84b4d2649 100644 --- a/src/event.c +++ b/src/event.c @@ -577,7 +577,7 @@ int HAMLIB_API rig_set_spectrum_callback(RIG *rig, spectrum_cb_t cb, * \sa rig_get_trn() * * \deprecated This functionality has never worked correctly and it is now disabled in favor of new async data handling capabilities. - * The command will always return RIG_EDEPRECATED until the command will be removed eventually. + * The command will always return -RIG_EDEPRECATED until the command will be removed eventually. */ int HAMLIB_API rig_set_trn(RIG *rig, int trn) { @@ -601,7 +601,7 @@ int HAMLIB_API rig_set_trn(RIG *rig, int trn) * \sa rig_set_trn() * * \deprecated This functionality has never worked correctly and it is now disabled in favor of new async data handling capabilities. - * The command will always return RIG_EDEPRECATED until the command will be removed eventually. + * The command will always return -RIG_EDEPRECATED until the command will be removed eventually. */ int HAMLIB_API rig_get_trn(RIG *rig, int *trn) { diff --git a/src/extamp.c b/src/extamp.c index 278e308bf..0fda44911 100644 --- a/src/extamp.c +++ b/src/extamp.c @@ -66,7 +66,7 @@ * **negative value** which means an abnormal end, * * \retval RIG_OK All extension levels elements successfully processed. - * \retval RIG_EINVAL \a amp or \a cfunc is NULL or inconsistent. + * \retval -RIG_EINVAL \a amp or \a cfunc is NULL or inconsistent. */ int HAMLIB_API amp_ext_level_foreach(AMP *amp, int (*cfunc)(AMP *, @@ -117,7 +117,7 @@ int HAMLIB_API amp_ext_level_foreach(AMP *amp, * **negative value** which means an abnormal end. * * \retval RIG_OK All extension parameters elements successfully processed. - * \retval RIG_EINVAL \a amp or \a cfunc is NULL or inconsistent. + * \retval -RIG_EINVAL \a amp or \a cfunc is NULL or inconsistent. */ int HAMLIB_API amp_ext_parm_foreach(AMP *amp, int (*cfunc)(AMP *, diff --git a/src/locator.c b/src/locator.c index 0fc9aaa5f..652ca007b 100644 --- a/src/locator.c +++ b/src/locator.c @@ -290,7 +290,7 @@ double HAMLIB_API dmmm2dec(int degrees, double minutes, double seconds, int sw) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The conversion was successful. - * \retval RIG_EINVAL Either of the pointers are NULL. + * \retval -RIG_EINVAL Either of the pointers are NULL. * * \sa dms2dec() */ @@ -388,7 +388,7 @@ int HAMLIB_API dec2dms(double dec, * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The conversion was successful. - * \retval RIG_EINVAL Either of the pointers are NULL. + * \retval -RIG_EINVAL Either of the pointers are NULL. * * \sa dmmm2dec() */ @@ -438,7 +438,7 @@ int HAMLIB_API dec2dmmm(double dec, int *degrees, double *minutes, int *sw) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The conversion was successful. - * \retval RIG_EINVAL The QRA locator exceeds RR99xx99xx99 or exceeds length + * \retval -RIG_EINVAL The QRA locator exceeds RR99xx99xx99 or exceeds length * limit--currently 1 to 6 lon/lat pairs--or is otherwise malformed. * * \bug The fifth pair ranges from aa to xx, there is another convention @@ -531,7 +531,7 @@ int HAMLIB_API locator2longlat(double *longitude, * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The conversion was successful. - * \retval RIG_EINVAL if \a locator is NULL or \a pair_count exceeds length + * \retval -RIG_EINVAL if \a locator is NULL or \a pair_count exceeds length * limit. Currently 1 to 6 lon/lat pairs. * * \bug \a locator is not tested for overflow. @@ -611,7 +611,7 @@ int HAMLIB_API longlat2locator(double longitude, * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The calculations were successful. - * \retval RIG_EINVAL If a NULL pointer passed or \a lat and \a lon values + * \retval -RIG_EINVAL If a NULL pointer passed or \a lat and \a lon values * exceed -90 to 90 or -180 to 180. * * \sa distance_long_path(), azimuth_long_path() diff --git a/src/rig.c b/src/rig.c index 5fff46aae..e479f0c46 100644 --- a/src/rig.c +++ b/src/rig.c @@ -984,8 +984,8 @@ RIG *HAMLIB_API rig_init(rig_model_t rig_model) * a negative value if an error occurred (in which case, cause is * set appropriately). * - * \retval RIG_EINVAL \a rig is NULL or inconsistent. - * \retval RIG_ENIMPL port type communication is not implemented yet. + * \retval -RIG_EINVAL \a rig is NULL or inconsistent. + * \retval -RIG_ENIMPL port type communication is not implemented yet. * * \sa rig_init(), rig_close() */ diff --git a/src/rot_conf.c b/src/rot_conf.c index 6e5cc7ec4..44e2f467e 100644 --- a/src/rot_conf.c +++ b/src/rot_conf.c @@ -133,7 +133,7 @@ static const struct confparams rotfrontend_serial_cfg_params[] = * \return RIG_OK or a **negative value** on error. * * \retval RIG_OK TOK_... value set successfully. - * \retval RIG_EINVAL TOK_.. value not set. + * \retval -RIG_EINVAL TOK_.. value not set. * * \sa frontrot_get_conf() */ @@ -402,7 +402,7 @@ int frontrot_set_conf(ROT *rot, hamlib_token_t token, const char *val) * \return RIG_OK or a **negative value** on error. * * \retval RIG_OK TOK_... value queried successfully. - * \retval RIG_EINVAL TOK_.. value not queried. + * \retval -RIG_EINVAL TOK_.. value not queried. * * \sa frontrot_set_conf() */ @@ -577,7 +577,7 @@ int frontrot_get_conf(ROT *rot, hamlib_token_t token, char *val, int val_len) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The \a cfunc action completed successfully. - * \retval RIG_EINVAL \a rot is NULL or inconsistent or \a cfunc is NULL. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent or \a cfunc is NULL. */ int HAMLIB_API rot_token_foreach(ROT *rot, int (*cfunc)(const struct confparams *, @@ -738,8 +738,8 @@ hamlib_token_t HAMLIB_API rot_token_lookup(ROT *rot, const char *name) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The parameter was set successfully. - * \retval RIG_EINVAL \a rot is NULL or inconsistent or \a token is invalid. - * \retval RIG_ENAVAIL rot_caps#set_conf() capability is not available. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent or \a token is invalid. + * \retval -RIG_ENAVAIL rot_caps#set_conf() capability is not available. * * \sa rot_get_conf() */ @@ -794,8 +794,8 @@ int HAMLIB_API rot_set_conf(ROT *rot, hamlib_token_t token, const char *val) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK Querying the parameter was successful. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENAVAIL rot_caps#get_conf() capability is not available. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENAVAIL rot_caps#get_conf() capability is not available. * * \sa rot_set_conf() */ diff --git a/src/rot_ext.c b/src/rot_ext.c index 63915b7ed..c6bbd9538 100644 --- a/src/rot_ext.c +++ b/src/rot_ext.c @@ -87,7 +87,7 @@ static int rot_has_ext_token(ROT *rot, hamlib_token_t token) * value** which means an abnormal end. * * \retval RIG_OK All extension functions elements successfully processed. - * \retval RIG_EINVAL \a rot or \a cfunc is NULL or inconsistent. + * \retval -RIG_EINVAL \a rot or \a cfunc is NULL or inconsistent. */ int HAMLIB_API rot_ext_func_foreach(ROT *rot, int (*cfunc)(ROT *, @@ -143,7 +143,7 @@ int HAMLIB_API rot_ext_func_foreach(ROT *rot, * **negative value** which means an abnormal end. * * \retval RIG_OK All extension levels elements successfully processed. - * \retval RIG_EINVAL \a rot or \a cfunc is NULL or inconsistent. + * \retval -RIG_EINVAL \a rot or \a cfunc is NULL or inconsistent. */ int HAMLIB_API rot_ext_level_foreach(ROT *rot, int (*cfunc)(ROT *, @@ -199,7 +199,7 @@ int HAMLIB_API rot_ext_level_foreach(ROT *rot, * **negative value** which means an abnormal end. * * \retval RIG_OK All extension parameters elements successfully processed. - * \retval RIG_EINVAL \a rot or \a cfunc is NULL or inconsistent. + * \retval -RIG_EINVAL \a rot or \a cfunc is NULL or inconsistent. */ int HAMLIB_API rot_ext_parm_foreach(ROT *rot, int (*cfunc)(ROT *, diff --git a/src/rot_settings.c b/src/rot_settings.c index bee4a8f29..ed366401e 100644 --- a/src/rot_settings.c +++ b/src/rot_settings.c @@ -69,8 +69,8 @@ * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK Setting the level was successful. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENAVAIL rot_caps#set_level() capability is not available. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENAVAIL rot_caps#set_level() capability is not available. * * \sa rot_has_set_level(), rot_get_level() */ @@ -113,8 +113,8 @@ int HAMLIB_API rot_set_level(ROT *rot, setting_t level, value_t val) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The query was successful. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENAVAIL rot_caps#get_level() capability is not available. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENAVAIL rot_caps#get_level() capability is not available. * * \sa rot_has_get_level(), rot_set_level() */ @@ -158,8 +158,8 @@ int HAMLIB_API rot_get_level(ROT *rot, setting_t level, value_t *val) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The parameter was set successfully. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENAVAIL rot_caps#set_parm() capability is not available. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENAVAIL rot_caps#set_parm() capability is not available. * * \sa rot_has_set_parm(), rot_get_parm() */ @@ -198,8 +198,8 @@ int HAMLIB_API rot_set_parm(ROT *rot, setting_t parm, value_t val) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The parameter was queried successfully. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENAVAIL rot_caps#get_parm() capability is not available. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENAVAIL rot_caps#get_parm() capability is not available. * * \sa rot_has_get_parm(), rot_set_parm() */ @@ -461,8 +461,8 @@ setting_t HAMLIB_API rot_has_set_func(ROT *rot, setting_t func) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The function was activated or deactivated successfully. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENAVAIL rot_caps#set_func() capability is not available or + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENAVAIL rot_caps#set_func() capability is not available or * \a func is not supported. * * \sa rot_get_func() @@ -505,8 +505,8 @@ int HAMLIB_API rot_set_func(ROT *rot, setting_t func, int status) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The function status was queried successfully. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENAVAIL rot_caps#get_func() capability is not available or + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENAVAIL rot_caps#get_func() capability is not available or * \a func is not supported. * * \sa rot_set_func() @@ -549,8 +549,8 @@ int HAMLIB_API rot_get_func(ROT *rot, setting_t func, int *status) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The extension level was set successfully. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENAVAIL rot_caps#set_ext_level() capability is not available. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENAVAIL rot_caps#set_ext_level() capability is not available. * * \sa rot_get_ext_level() */ @@ -589,8 +589,8 @@ int HAMLIB_API rot_set_ext_level(ROT *rot, hamlib_token_t token, value_t val) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The extension level was queried successfully. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENAVAIL rot_caps#get_ext_level() capability is not available. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENAVAIL rot_caps#get_ext_level() capability is not available. * * \sa rot_set_ext_level() */ @@ -633,8 +633,8 @@ int HAMLIB_API rot_get_ext_level(ROT *rot, hamlib_token_t token, value_t *val) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The extension function status was set successfully. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENAVAIL rot_caps#get_ext_func() capability is not available. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENAVAIL rot_caps#get_ext_func() capability is not available. * * \sa rot_get_ext_func() */ @@ -676,8 +676,8 @@ int HAMLIB_API rot_set_ext_func(ROT *rot, hamlib_token_t token, int status) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The extension function status was queried successfully. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENAVAIL rot_caps#get_ext_func() capability is not available or + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENAVAIL rot_caps#get_ext_func() capability is not available or * \a token is not supported. * * \sa rot_set_ext_func() @@ -719,8 +719,8 @@ int HAMLIB_API rot_get_ext_func(ROT *rot, hamlib_token_t token, int *status) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The extension parameter was set successfully. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENAVAIL rot_caps#set_ext_parm() capability is not available. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENAVAIL rot_caps#set_ext_parm() capability is not available. * * \sa rot_get_ext_parm() */ @@ -757,8 +757,8 @@ int HAMLIB_API rot_set_ext_parm(ROT *rot, hamlib_token_t token, value_t val) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The extension parameter was queried successfully. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENAVAIL rot_caps#get_ext_parm() capability is not available. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENAVAIL rot_caps#get_ext_parm() capability is not available. * * \sa rot_set_ext_parm() */ diff --git a/src/rotator.c b/src/rotator.c index f92695d6e..d09606f66 100644 --- a/src/rotator.c +++ b/src/rotator.c @@ -364,8 +364,8 @@ ROT *HAMLIB_API rot_init(rot_model_t rot_model) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK Communication channel successfully opened. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENIMPL Communication port type is not implemented yet. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENIMPL Communication port type is not implemented yet. * * \sa rot_init(), rot_close() */ @@ -603,7 +603,7 @@ int HAMLIB_API rot_open(ROT *rot) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK Communication channel successfully closed. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. * * \sa rot_cleanup(), rot_open() */ @@ -692,7 +692,7 @@ int HAMLIB_API rot_close(ROT *rot) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK #ROT handle successfully released. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. * * \sa rot_init(), rot_close() */ @@ -746,9 +746,9 @@ int HAMLIB_API rot_cleanup(ROT *rot) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK Either or both parameters set successfully. - * \retval RIG_EINVAL \a rot is NULL or inconsistent \b or either \a azimuth + * \retval -RIG_EINVAL \a rot is NULL or inconsistent \b or either \a azimuth * or \a elevation is out of range for this rotator. - * \retval RIG_ENAVAIL rot_caps#set_position() capability is not available. + * \retval -RIG_ENAVAIL rot_caps#set_position() capability is not available. * * \sa rot_get_position() */ @@ -819,8 +819,8 @@ int HAMLIB_API rot_set_position(ROT *rot, * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK Either or both parameters queried and stored successfully. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENAVAIL rot_caps#get_position() capability is not available. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENAVAIL rot_caps#get_position() capability is not available. * * \sa rot_set_position() */ @@ -880,8 +880,8 @@ int HAMLIB_API rot_get_position(ROT *rot, * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The rotator was parked successfully. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENAVAIL rot_caps#park() capability is not available. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENAVAIL rot_caps#park() capability is not available. * */ int HAMLIB_API rot_park(ROT *rot) @@ -917,8 +917,8 @@ int HAMLIB_API rot_park(ROT *rot) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The rotator was stopped successfully. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENAVAIL rot_caps#stop() capability is not available. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENAVAIL rot_caps#stop() capability is not available. * * \sa rot_move() */ @@ -956,8 +956,8 @@ int HAMLIB_API rot_stop(ROT *rot) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The rotator was reset successfully. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENAVAIL rot_caps#reset() capability is not available. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENAVAIL rot_caps#reset() capability is not available. */ int HAMLIB_API rot_reset(ROT *rot, rot_reset_t reset) { @@ -995,8 +995,8 @@ int HAMLIB_API rot_reset(ROT *rot, rot_reset_t reset) * The \a speed is a value between 1 and 100 or #ROT_SPEED_NOCHANGE. * * \retval RIG_OK The rotator move was successful. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENAVAIL rot_caps#move() capability is not available. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENAVAIL rot_caps#move() capability is not available. * * \sa rot_stop() */ @@ -1065,8 +1065,8 @@ const char *HAMLIB_API rot_get_info(ROT *rot) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The query was successful. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENAVAIL rot_caps#get_status() capability is not available. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENAVAIL rot_caps#get_status() capability is not available. */ int HAMLIB_API rot_get_status(ROT *rot, rot_status_t *status) { commit 72bde6e13171e1c2425e094413598ec88a8397a0 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Fri May 30 22:56:37 2025 +0200 Fix sign of error return values All RIG_E* constants should be negated when returned or compared. Change the usages of RIG_IS_SOFT_ERRCODE() for consistency. diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 6656c5aeb..8f6326d01 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -222,10 +222,10 @@ enum rig_errcode_e { * Soft errors are caused by invalid parameters and software/hardware features * and cannot be fixed by retries or by re-initializing hardware. */ -#define RIG_IS_SOFT_ERRCODE(errcode) (errcode == RIG_EINVAL || errcode == RIG_ENIMPL || errcode == RIG_ERJCTED \ - || errcode == RIG_ETRUNC || errcode == RIG_ENAVAIL || errcode == RIG_ENTARGET \ - || errcode == RIG_EVFO || errcode == RIG_EDOM || errcode == RIG_EDEPRECATED \ - || errcode == RIG_ESECURITY || errcode == RIG_EPOWER) +#define RIG_IS_SOFT_ERRCODE(errcode) (errcode == -RIG_EINVAL || errcode == -RIG_ENIMPL || errcode == -RIG_ERJCTED \ + || errcode == -RIG_ETRUNC || errcode == -RIG_ENAVAIL || errcode == -RIG_ENTARGET \ + || errcode == -RIG_EVFO || errcode == -RIG_EDOM || errcode == -RIG_EDEPRECATED \ + || errcode == -RIG_ESECURITY || errcode == -RIG_EPOWER) /** * \brief Token in the netrigctl protocol for returning error code diff --git a/tests/rigctl.c b/tests/rigctl.c index a262d32f3..e04ff7e8f 100644 --- a/tests/rigctl.c +++ b/tests/rigctl.c @@ -816,7 +816,7 @@ int main(int argc, char *argv[]) // if we get a hard error we try to reopen the rig again // this should cover short dropouts that can occur - if (retcode < 0 && !RIG_IS_SOFT_ERRCODE(-retcode)) + if (retcode < 0 && !RIG_IS_SOFT_ERRCODE(retcode)) { int retry = 3; rig_debug(RIG_DEBUG_ERR, "%s: i/o error\n", __func__); @@ -833,7 +833,7 @@ int main(int argc, char *argv[]) while (retry-- > 0 && retcode != RIG_OK); } } - while (!ctrl_c && (retcode == RIG_OK || RIG_IS_SOFT_ERRCODE(-retcode))); + while (!ctrl_c && (retcode == RIG_OK || RIG_IS_SOFT_ERRCODE(retcode))); if (interactive && prompt) { diff --git a/tests/rigctld.c b/tests/rigctld.c index 9ffb01a6f..4435c26ca 100644 --- a/tests/rigctld.c +++ b/tests/rigctld.c @@ -1282,7 +1282,7 @@ void *handle_socket(void *arg) // if we get a hard error we try to reopen the rig again // this should cover short dropouts that can occur - if (retcode < 0 && !RIG_IS_SOFT_ERRCODE(-retcode)) + if (retcode < 0 && !RIG_IS_SOFT_ERRCODE(retcode)) { int retry = 3; rig_debug(RIG_DEBUG_ERR, "%s: i/o error\n", __func__); @@ -1312,7 +1312,7 @@ void *handle_socket(void *arg) while (!ctrl_c && !rig_opened && retry-- > 0 && retcode != RIG_OK); } } - while (!ctrl_c && (retcode == RIG_OK || RIG_IS_SOFT_ERRCODE(-retcode))); + while (!ctrl_c && (retcode == RIG_OK || RIG_IS_SOFT_ERRCODE(retcode))); #if defined(HAVE_PTHREAD) diff --git a/tests/rigctltcp.c b/tests/rigctltcp.c index a9eaa9dc7..17d40be6e 100644 --- a/tests/rigctltcp.c +++ b/tests/rigctltcp.c @@ -1283,7 +1283,7 @@ void *handle_socket(void *arg) // if we get a hard error we try to reopen the rig again // this should cover short dropouts that can occur - if (retcode < 0 && !RIG_IS_SOFT_ERRCODE(-retcode)) + if (retcode < 0 && !RIG_IS_SOFT_ERRCODE(retcode)) { int retry = 3; rig_debug(RIG_DEBUG_ERR, "%s: i/o error\n", __func__); @@ -1313,7 +1313,7 @@ void *handle_socket(void *arg) while (!ctrl_c && !rig_opened && retry-- > 0 && retcode != RIG_OK); } } - while (!ctrl_c && (retcode == RIG_OK || RIG_IS_SOFT_ERRCODE(-retcode))); + while (!ctrl_c && (retcode == RIG_OK || RIG_IS_SOFT_ERRCODE(retcode))); client_done: ----------------------------------------------------------------------- Summary of changes: include/hamlib/rig.h | 8 +++---- rigs/adat/adat.c | 6 ++--- rigs/dummy/flrig.c | 14 ++++++------ rigs/dummy/quisk.c | 2 +- rigs/icom/icom.c | 8 +++---- rigs/kenwood/ic10.c | 2 +- rigs/kenwood/k3.c | 2 +- rigs/pcr/pcr.c | 4 ++-- rigs/tentec/orion.c | 2 +- rigs/yaesu/ft757gx.c | 2 +- rotators/grbltrk/grbltrk.c | 8 +++---- rotators/meade/meade.c | 2 +- rotators/skywatcher/skywatcher.c | 6 ++--- src/amp_conf.c | 14 ++++++------ src/amplifier.c | 42 +++++++++++++++++------------------ src/cm108.c | 12 +++++----- src/event.c | 4 ++-- src/extamp.c | 4 ++-- src/locator.c | 10 ++++----- src/rig.c | 6 ++--- src/rot_conf.c | 14 ++++++------ src/rot_ext.c | 6 ++--- src/rot_settings.c | 48 ++++++++++++++++++++-------------------- src/rotator.c | 36 +++++++++++++++--------------- tests/ampctl_parse.c | 4 ++-- tests/rigctl.c | 4 ++-- tests/rigctld.c | 4 ++-- tests/rigctltcp.c | 4 ++-- tests/rigmem.c | 2 +- tests/rigsmtr.c | 2 +- tests/rigswr.c | 2 +- tests/rotctl_parse.c | 2 +- 32 files changed, 143 insertions(+), 143 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-06-07 12:32:26
|
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 ae9556462a2989b8b97af0d6e320558ffa0e1f3e (commit) from 355d237ffe974371091865fe73bd1bce42a4c085 (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 ae9556462a2989b8b97af0d6e320558ffa0e1f3e Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Wed May 7 22:27:07 2025 +0200 Fix debug messages shown even from disabled levels Messages from ENTERFUNC and RETURNFUNC where stored in an internal buffer even whe debug_level wasn't TRACE and were returned when calling rigerror(). diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 6656c5aeb..57c067b59 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -3770,11 +3770,10 @@ extern HAMLIB_EXPORT_VAR(char) debugmsgsave2[DEBUGMSGSAVE_SIZE]; // last-1 debu // debugmsgsave3 is deprecated extern HAMLIB_EXPORT_VAR(char) debugmsgsave3[DEBUGMSGSAVE_SIZE]; // last-2 debug msg #define rig_debug_clear() { debugmsgsave[0] = debugmsgsave2[0] = debugmsgsave3[0] = 0; }; -#ifndef __cplusplus -#ifdef __GNUC__ -// doing the debug macro with a dummy sprintf allows gcc to check the format string -#define rig_debug(debug_level,fmt,...) do { snprintf(debugmsgsave2,sizeof(debugmsgsave2),fmt,__VA_ARGS__);rig_debug(debug_level,fmt,##__VA_ARGS__); add2debugmsgsave(debugmsgsave2); } while(0) -#endif +#if !defined(__cplusplus) && defined(__GNUC__) +#define ATTRIBUTE_FORMAT_PRINTF __attribute__((__format__ (__printf__, 2, 3))) +#else +#define ATTRIBUTE_FORMAT_PRINTF #endif // Measuring elapsed time -- local variable inside function when macro is used @@ -3786,7 +3785,7 @@ extern HAMLIB_EXPORT_VAR(char) debugmsgsave3[DEBUGMSGSAVE_SIZE]; // last-2 debu extern HAMLIB_EXPORT(void) rig_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level, - const char *fmt, ...)); + const char *fmt, ...)) ATTRIBUTE_FORMAT_PRINTF; extern HAMLIB_EXPORT(vprintf_cb_t) rig_set_debug_callback HAMLIB_PARAMS((vprintf_cb_t cb, diff --git a/src/debug.c b/src/debug.c index de66c0879..a57685535 100644 --- a/src/debug.c +++ b/src/debug.c @@ -202,7 +202,6 @@ void HAMLIB_API rig_set_debug_time_stamp(int flag) * The formatted character string is passed to the `vfprintf`(3) C library * call and follows its format specification. */ -#undef rig_debug void HAMLIB_API rig_debug(enum rig_debug_level_e debug_level, const char *fmt, ...) { ----------------------------------------------------------------------- Summary of changes: include/hamlib/rig.h | 11 +++++------ src/debug.c | 1 - 2 files changed, 5 insertions(+), 7 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-06-07 02:23:03
|
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 355d237ffe974371091865fe73bd1bce42a4c085 (commit) via ea5a5ac312393189c8e46b5315b8a450df7e6a93 (commit) from 778edf7757966c6e8df1089c8536f81fad64288b (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 355d237ffe974371091865fe73bd1bce42a4c085 Merge: 778edf775 ea5a5ac31 Author: Nate Bargmann <n0...@n0...> Date: Fri Jun 6 21:18:35 2025 -0500 Merge GitHub PR #1758 commit ea5a5ac312393189c8e46b5315b8a450df7e6a93 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Mon May 26 22:59:36 2025 +0200 Fix Doxygen tags diff --git a/rigs/aor/ar7030p.c b/rigs/aor/ar7030p.c index 2d57b0f17..7ed486006 100644 --- a/rigs/aor/ar7030p.c +++ b/rigs/aor/ar7030p.c @@ -352,12 +352,12 @@ static int ar7030p_cleanup(RIG *rig) return (rc); } -/* - * /brief Open I/O to receiver +/** + * \brief Open I/O to receiver * - * /param rig Pointer to rig struct + * \param rig Pointer to rig struct * - * /return 0 on success, < 0 on failure + * \return 0 on success, < 0 on failure */ static int ar7030p_open(RIG *rig) { @@ -422,12 +422,12 @@ static int ar7030p_open(RIG *rig) return (rc); } -/* - * /brief Close I/O to receiver +/** + * \brief Close I/O to receiver * - * /param rig Pointer to rig struct + * \param rig Pointer to rig struct * - * /return 0 on success, < 0 on failure + * \return 0 on success, < 0 on failure */ // cppcheck-suppress * static int ar7030p_close(RIG *rig) @@ -468,11 +468,11 @@ static const char *ar7030p_get_info(RIG *rig) } /* - * /brief Set receiver frequency + * \brief Set receiver frequency * - * /param rig Pointer to rig struct - * /param vfo VFO to operate on - * /param freq Frequency to set + * \param rig Pointer to rig struct + * \param vfo VFO to operate on + * \param freq Frequency to set * */ static int ar7030p_set_freq(RIG *rig, vfo_t vfo, freq_t freq) @@ -528,11 +528,11 @@ static int ar7030p_set_freq(RIG *rig, vfo_t vfo, freq_t freq) } /* - * /brief Get receiver frequency + * \brief Get receiver frequency * - * /param rig Pointer to rig struct - * /param vfo VFO to operate on - * /param freq Pointer to hold frequency value (in Hz) + * \param rig Pointer to rig struct + * \param vfo VFO to operate on + * \param freq Pointer to hold frequency value (in Hz) * */ static int ar7030p_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) @@ -584,12 +584,12 @@ static int ar7030p_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) } /* - * /brief Set receiver mode + * \brief Set receiver mode * - * /param rig Pointer to rig struct - * /param vfo VFO to operate on - * /param mode Mode to set - * /param width Bandwidth to set + * \param rig Pointer to rig struct + * \param vfo VFO to operate on + * \param mode Mode to set + * \param width Bandwidth to set * */ static int ar7030p_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, @@ -650,12 +650,12 @@ static int ar7030p_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, } /* - * /brief Get receiver mode and bandwidth + * \brief Get receiver mode and bandwidth * - * /param rig Pointer to rig struct - * /param vfo VFO to operate on - * /param mode Pointer to value to hold mode - * /param width Pointer to value to hold bandwidth + * \param rig Pointer to rig struct + * \param vfo VFO to operate on + * \param mode Pointer to value to hold mode + * \param width Pointer to value to hold bandwidth * */ static int ar7030p_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, @@ -694,16 +694,16 @@ static int ar7030p_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, } /* - * /brief Get memory channel parameters + * \brief Get memory channel parameters * - * /param rig Pointer to rig struct - * /param chan Channel number (0-399) - * /param freq Pointer to frequency value - * /param mode Pointer to mode value (1-7) - * /param filt Pointer to filter value (1-6) - * /param pbs Pointer to passband tuning value - * /param sql Pointer to squelch value (0-255) - * /param id Pointer to channel ident string (14 chars) + * \param rig Pointer to rig struct + * \param chan Channel number (0-399) + * \param freq Pointer to frequency value + * \param mode Pointer to mode value (1-7) + * \param filt Pointer to filter value (1-6) + * \param pbs Pointer to passband tuning value + * \param sql Pointer to squelch value (0-255) + * \param id Pointer to channel ident string (14 chars) * */ #if 0 /* unused; re-enabled as needed. */ @@ -818,14 +818,14 @@ static void ar7030p_get_memory(RIG *rig, const unsigned int chan, #endif /* unused */ /* - * /brief Set receiver levels + * \brief Set receiver levels * - * /param rig Pointer to rig struct - * /param vfo VFO to operate on - * /param level Level to set - * /param val Value to set level to + * \param rig Pointer to rig struct + * \param vfo VFO to operate on + * \param level Level to set + * \param val Value to set level to * - * /return RIG_OK on success + * \return RIG_OK on success */ static int ar7030p_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) @@ -996,14 +996,14 @@ static int ar7030p_set_level(RIG *rig, vfo_t vfo, setting_t level, /* - * /brief Get receiver levels + * \brief Get receiver levels * - * /param rig Pointer to rig struct - * /param vfo VFO to operate on - * /param level Level to get - * /param val Pointer to value to get + * \param rig Pointer to rig struct + * \param vfo VFO to operate on + * \param level Level to get + * \param val Pointer to value to get * - * /return RIG_OK on success + * \return RIG_OK on success */ static int ar7030p_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) @@ -1469,13 +1469,13 @@ static int ar7030p_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts) } /* - * /brief Get receiver tuning step size + * \brief Get receiver tuning step size * - * /param rig Pointer to rig struct - * /param vfo VFO to operate on - * /param ts Pointer to tuning step value + * \param rig Pointer to rig struct + * \param vfo VFO to operate on + * \param ts Pointer to tuning step value * - * /return RIG_OK on success + * \return RIG_OK on success */ static int ar7030p_get_ts(RIG *rig, vfo_t vfo, shortfreq_t *ts) { @@ -1506,12 +1506,12 @@ static int ar7030p_get_ts(RIG *rig, vfo_t vfo, shortfreq_t *ts) } /* - * /brief Set receiver power status + * \brief Set receiver power status * - * /param rig Pointer to rig struct - * /param status Power status to set + * \param rig Pointer to rig struct + * \param status Power status to set * - * /return RIG_OK on success + * \return RIG_OK on success */ static int ar7030p_set_powerstat(RIG *rig, powerstat_t status) { @@ -1542,12 +1542,12 @@ static int ar7030p_set_powerstat(RIG *rig, powerstat_t status) } /* - * /brief Get receiver power status + * \brief Get receiver power status * - * /param rig Pointer to rig struct - * /param status Pointer to power status value + * \param rig Pointer to rig struct + * \param status Pointer to power status value * - * /return RIG_OK on success + * \return RIG_OK on success */ static int ar7030p_get_powerstat(RIG *rig, powerstat_t *status) { @@ -1581,12 +1581,12 @@ static int ar7030p_get_powerstat(RIG *rig, powerstat_t *status) } /* - * /brief Reset receiver + * \brief Reset receiver * - * /param rig Pointer to rig struct - * /param reset Reset operation to perform + * \param rig Pointer to rig struct + * \param reset Reset operation to perform * - * /return RIG_OK on success + * \return RIG_OK on success */ static int ar7030p_reset(RIG *rig, reset_t reset) { diff --git a/rigs/aor/ar7030p_utils.c b/rigs/aor/ar7030p_utils.c index adeef7b8b..b59a8af44 100644 --- a/rigs/aor/ar7030p_utils.c +++ b/rigs/aor/ar7030p_utils.c @@ -387,11 +387,11 @@ int BUT(RIG *rig, enum BUTTON_e button) #endif // 0 -/* - * /brief Execute routine +/** + * \brief Execute routine * - * /param rig Pointer to rig struct - * /param rtn Receiver routine to execute + * \param rig Pointer to rig struct + * \param rtn Receiver routine to execute * * \return RIG_OK on success, error code on failure * @@ -413,12 +413,12 @@ int execRoutine(RIG *rig, enum ROUTINE_e rtn) return (rc); } -/* - * /brief Set address for I/O with radio +/** + * \brief Set address for I/O with radio * - * /param rig Pointer to rig struct - * /param page Memory page number (0-4, 15) - * /param addr Address offset within page (0-4095, depending on page) + * \param rig Pointer to rig struct + * \param page Memory page number (0-4, 15) + * \param addr Address offset within page (0-4095, depending on page) * * \return RIG_OK on success, error code on failure * @@ -513,12 +513,12 @@ static int setAddr(RIG *rig, enum PAGE_e page, unsigned int addr) } /* - * /brief Write one byte to the receiver + * \brief Write one byte to the receiver * - * /param rig Pointer to rig struct - * /param page Memory page number (0-4, 15) - * /param addr Address offset within page (0-4095, depending on page) - * /param x Value to write to radio + * \param rig Pointer to rig struct + * \param page Memory page number (0-4, 15) + * \param addr Address offset within page (0-4095, depending on page) + * \param x Value to write to radio * * \return RIG_OK on success, error code on failure * @@ -554,12 +554,12 @@ int writeByte(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned char x) } /* - * /brief Write two bytes to the receiver + * \brief Write two bytes to the receiver * - * /param rig Pointer to rig struct - * /param page Memory page number (0-4, 15) - * /param addr Address offset within page (0-4095, depending on page) - * /param x Value to write to radio + * \param rig Pointer to rig struct + * \param page Memory page number (0-4, 15) + * \param addr Address offset within page (0-4095, depending on page) + * \param x Value to write to radio * * \return Number of bytes written, 0 on error. Get error code with getErrno. * @@ -581,12 +581,12 @@ int writeShort(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned short x) } /* - * /brief Write three bytes to the receiver + * \brief Write three bytes to the receiver * - * /param rig Pointer to rig struct - * /param page Memory page number (0-4, 15) - * /param addr Address offset within page (0-4095, depending on page) - * /param x Value to write to radio + * \param rig Pointer to rig struct + * \param page Memory page number (0-4, 15) + * \param addr Address offset within page (0-4095, depending on page) + * \param x Value to write to radio * * \return Number of bytes written, 0 on error. Get error code with getErrno. * @@ -616,12 +616,12 @@ int write3Bytes(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned int x) #ifdef XXREMOVEDXX // this function is not referenced anywhere /* - * /brief Write unsigned int (4 bytes) to the receiver + * \brief Write unsigned int (4 bytes) to the receiver * - * /param rig Pointer to rig struct - * /param page Memory page number (0-4, 15) - * /param addr Address offset within page (0-4095, depending on page) - * /param x Value to write to radio + * \param rig Pointer to rig struct + * \param page Memory page number (0-4, 15) + * \param addr Address offset within page (0-4095, depending on page) + * \param x Value to write to radio * * \return Number of bytes written, 0 on error. Get error code with getErrno. * @@ -656,12 +656,12 @@ int writeInt(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned int x) #endif /* - * /brief Read one byte from the receiver + * \brief Read one byte from the receiver * - * /param rig Pointer to rig struct - * /param page Memory page number (0-4, 15) - * /param addr Address offset within page (0-4095, depending on page) - * /param x Pointer to value to read from radio + * \param rig Pointer to rig struct + * \param page Memory page number (0-4, 15) + * \param addr Address offset within page (0-4095, depending on page) + * \param x Pointer to value to read from radio * * \return RIG_OK on success, error code on failure * @@ -697,12 +697,12 @@ int readByte(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned char *x) } /* - * /brief Read an unsigned short (two bytes) from the receiver + * \brief Read an unsigned short (two bytes) from the receiver * - * /param rig Pointer to rig struct - * /param page Memory page number (0-4, 15) - * /param addr Address offset within page (0-4095, depending on page) - * /param x Pointer to value to read from radio + * \param rig Pointer to rig struct + * \param page Memory page number (0-4, 15) + * \param addr Address offset within page (0-4095, depending on page) + * \param x Pointer to value to read from radio * * \return RIG_OK on success, error code on failure * @@ -734,12 +734,12 @@ int readShort(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned short *x) } /* - * /brief Read an unsigned int (three bytes) from the receiver + * \brief Read an unsigned int (three bytes) from the receiver * - * /param rig Pointer to rig struct - * /param page Memory page number (0-4, 15) - * /param addr Address offset within page (0-4095, depending on page) - * /param x Pointer to value to read from radio + * \param rig Pointer to rig struct + * \param page Memory page number (0-4, 15) + * \param addr Address offset within page (0-4095, depending on page) + * \param x Pointer to value to read from radio * * \return RIG_OK on success, error code on failure * @@ -779,12 +779,12 @@ int read3Bytes(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned int *x) #ifdef XXREMOVEDXX // this function is not referenced anywhere /* - * /brief Read an unsigned int (four bytes) from the receiver + * \brief Read an unsigned int (four bytes) from the receiver * - * /param rig Pointer to rig struct - * /param page Memory page number (0-4, 15) - * /param addr Address offset within page (0-4095, depending on page) - * /param x Pointer to value to read from radio + * \param rig Pointer to rig struct + * \param page Memory page number (0-4, 15) + * \param addr Address offset within page (0-4095, depending on page) + * \param x Pointer to value to read from radio * * \return RIG_OK on success, error code on failure * @@ -827,9 +827,9 @@ int readInt(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned int *x) #endif /* - * /brief Read raw AGC value from the radio + * \brief Read raw AGC value from the radio * - * /param rig Pointer to rig struct + * \param rig Pointer to rig struct * * \return RIG_OK on success, error code on failure */ @@ -858,9 +858,9 @@ int readSignal(RIG *rig, unsigned char *x) #ifdef XXREMOVEDXX // this function is not referenced anywhere /* - * /brief Flush I/O with radio + * \brief Flush I/O with radio * - * /param rig Pointer to rig struct + * \param rig Pointer to rig struct * */ int flushBuffer(RIG *rig) @@ -880,10 +880,10 @@ int flushBuffer(RIG *rig) #endif /* - * /brief Lock receiver for remote operations + * \brief Lock receiver for remote operations * - * /param rig Pointer to rig struct - * /param level Lock level (0-3) + * \param rig Pointer to rig struct + * \param level Lock level (0-3) * */ int lockRx(RIG *rig, enum LOCK_LVL_e level) @@ -1104,11 +1104,11 @@ int getFilterBW(RIG *rig, enum FILTER_e filter) } /* - * /brief Convert DDS steps to frequency in Hz + * \brief Convert DDS steps to frequency in Hz * - * /param steps DDS count + * \param steps DDS count * - * /return Frequency in Hz or 0 on failure + * \return Frequency in Hz or 0 on failure */ freq_t ddsToHz(const unsigned int steps) { @@ -1120,11 +1120,11 @@ freq_t ddsToHz(const unsigned int steps) } /* - * /brief Convert frequency in Hz to DDS steps + * \brief Convert frequency in Hz to DDS steps * - * /param freq Frequency in Hz + * \param freq Frequency in Hz * - * /return DDS steps (24 bits) or 0 on failure + * \return DDS steps (24 bits) or 0 on failure */ unsigned int hzToDDS(const freq_t freq) { @@ -1156,11 +1156,11 @@ unsigned int hzToDDS(const freq_t freq) } /* - * /brief Convert PBS/BFO steps to frequency in Hz + * \brief Convert PBS/BFO steps to frequency in Hz * - * /param steps PBS/BFO offset steps + * \param steps PBS/BFO offset steps * - * /return Frequency in Hz or 0 on failure + * \return Frequency in Hz or 0 on failure * * Max +ve offset is 127, max -ve offset is 128 * Min -ve offset is 255 @@ -1187,11 +1187,11 @@ float pbsToHz(const unsigned char steps) #ifdef XXREMOVEDXX // this function is not referenced anywhere /* - * /brief Convert PBS/BFO offset frequency in Hz to steps + * \brief Convert PBS/BFO offset frequency in Hz to steps * - * /param freq Offset frequency in Hz + * \param freq Offset frequency in Hz * - * /return steps (8 bits) or 0 on failure + * \return steps (8 bits) or 0 on failure */ unsigned char hzToPBS(const float freq) { @@ -1229,11 +1229,11 @@ unsigned char hzToPBS(const float freq) #endif /* - * /brief Convert native Mode to Hamlib mode + * \brief Convert native Mode to Hamlib mode * - * /param mode Native mode value + * \param mode Native mode value * - * /return Hamlib mode value + * \return Hamlib mode value */ rmode_t modeToHamlib(const unsigned char mode) { @@ -1280,11 +1280,11 @@ rmode_t modeToHamlib(const unsigned char mode) } /* - * /brief Convert Hamlib Mode to native mode + * \brief Convert Hamlib Mode to native mode * - * /param mode Hamlib mode value + * \param mode Hamlib mode value * - * /return Native mode value + * \return Native mode value */ unsigned char modeToNative(const rmode_t mode) { @@ -1331,11 +1331,11 @@ unsigned char modeToNative(const rmode_t mode) } /* - * /brief Convert native AGC speed to Hamlib AGC speed + * \brief Convert native AGC speed to Hamlib AGC speed * - * /param agc Native AGC speed value + * \param agc Native AGC speed value * - * /return Hamlib AGC speed value + * \return Hamlib AGC speed value */ enum agc_level_e agcToHamlib(const unsigned char agc) { @@ -1370,11 +1370,11 @@ enum agc_level_e agcToHamlib(const unsigned char agc) } /* - * /brief Convert Hamlib AGC speed to native AGC speed + * \brief Convert Hamlib AGC speed to native AGC speed * - * /param agc Hamlib AGC speed value + * \param agc Hamlib AGC speed value * - * /return Native AGC speed value + * \return Native AGC speed value */ unsigned char agcToNative(const enum agc_level_e agc) { @@ -1413,11 +1413,11 @@ unsigned char agcToNative(const enum agc_level_e agc) } /* - * /brief Get page size + * \brief Get page size * - * /param page Page to get size of + * \param page Page to get size of * - * /return Page size, -1 on error + * \return Page size, -1 on error */ int pageSize(const enum PAGE_e page) { @@ -1440,9 +1440,9 @@ int pageSize(const enum PAGE_e page) } /* - * /brief Set and execute IR controller code + * \brief Set and execute IR controller code * - * /param code IR code to execute + * \param code IR code to execute * * \return RIG_OK on success, error code on failure */ diff --git a/src/misc.c b/src/misc.c index b65722182..0a59f1499 100644 --- a/src/misc.c +++ b/src/misc.c @@ -1028,7 +1028,7 @@ static const struct { AMP_LEVEL_NONE, "" }, }; -/* +/** * \brief check input to set_level * \param rig Pointer to rig data * \param level RIG_LEVEL_* trying to set diff --git a/src/rig.c b/src/rig.c index 71944b292..5fff46aae 100644 --- a/src/rig.c +++ b/src/rig.c @@ -2976,7 +2976,7 @@ int HAMLIB_API rig_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) RETURNFUNC(retcode); } -/* +/** * \brief get the mode of the target VFO * \param rig The rig handle * \param vfo The target VFO ----------------------------------------------------------------------- Summary of changes: rigs/aor/ar7030p.c | 128 +++++++++++++++++------------------ rigs/aor/ar7030p_utils.c | 170 +++++++++++++++++++++++------------------------ src/misc.c | 2 +- src/rig.c | 2 +- 4 files changed, 151 insertions(+), 151 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-06-07 02:15:52
|
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 778edf7757966c6e8df1089c8536f81fad64288b (commit) via 4ce5763cb96444225e4ebe6d95c4420f110a375e (commit) from 98d1d4f57b0d0a297dc3e082cb693dfdae74efe5 (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 778edf7757966c6e8df1089c8536f81fad64288b Merge: 98d1d4f57 4ce5763cb Author: Nate Bargmann <n0...@n0...> Date: Fri Jun 6 21:11:36 2025 -0500 Merge GitHub PR #1757 commit 4ce5763cb96444225e4ebe6d95c4420f110a375e Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Fri Jun 6 19:05:38 2025 +0200 Fix exit statuses Exit status 2 is for invalid command line options or arguments. Exit status 2 is for errors returned by Hamlib. diff --git a/tests/rigctlcom.c b/tests/rigctlcom.c index a9d4e0142..09eb14a3b 100644 --- a/tests/rigctlcom.c +++ b/tests/rigctlcom.c @@ -413,7 +413,7 @@ int main(int argc, char *argv[]) if (argc == 1) { usage(); - exit(2); + exit(1); } my_rig = rig_init(my_model); @@ -443,7 +443,7 @@ int main(int argc, char *argv[]) if (my_model > 5 && !rig_file) { fprintf(stderr, "-r rig com port not provided\n"); - exit(2); + exit(1); } if (rig_file) @@ -454,7 +454,7 @@ int main(int argc, char *argv[]) if (!rig_file2) { fprintf(stderr, "-R com port not provided\n"); - exit(2); + exit(1); } strncpy(my_com.pathname, rig_file2, HAMLIB_FILPATHLEN - 1); diff --git a/tests/rigctld.c b/tests/rigctld.c index ae7fbf0cc..9ffb01a6f 100644 --- a/tests/rigctld.c +++ b/tests/rigctld.c @@ -783,7 +783,7 @@ int main(int argc, char *argv[]) else { fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(retcode)); - exit(2); + exit(1); } saved_result = result; @@ -798,7 +798,7 @@ int main(int argc, char *argv[]) { handle_error(RIG_DEBUG_ERR, "socket"); freeaddrinfo(saved_result); /* No longer needed */ - exit(2); + exit(1); } const int optval = 1; diff --git a/tests/rotctld.c b/tests/rotctld.c index 744dff685..d8a44d420 100644 --- a/tests/rotctld.c +++ b/tests/rotctld.c @@ -423,7 +423,7 @@ int main(int argc, char *argv[]) if (retcode != 0) { fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(retcode)); - exit(2); + exit(1); } saved_result = result; ----------------------------------------------------------------------- Summary of changes: tests/rigctlcom.c | 6 +++--- tests/rigctld.c | 4 ++-- tests/rotctld.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-06-07 02:10:05
|
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 d901969d351b867ee6a176125c3ac4bdbbbacaaf (commit) via 8a4e550978fd0a499781710ed0fd581e6099dde8 (commit) from bb8b764412e033b30a07c2b28aaf5bda29580180 (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 d901969d351b867ee6a176125c3ac4bdbbbacaaf Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Fri Jun 6 21:00:40 2025 +0200 Fix typo Do the same change as in commit 42f41773 (cherry picked from commit 0123cce1356b99ff15d9d3a400556bd0b8de7e8b) diff --git a/doc/man1/rigctl.1 b/doc/man1/rigctl.1 index 2fec9b6a9..557b3028c 100644 --- a/doc/man1/rigctl.1 +++ b/doc/man1/rigctl.1 @@ -538,7 +538,7 @@ option above) only a single VFO parameter is required: .IP .in +4n .EX -.RB $ " rigctl -m 229 -r /dev/rig -o" +.RB $ " rigctl -m 2029 -r /dev/rig -o" Rig command: V VFO: VFOB commit 8a4e550978fd0a499781710ed0fd581e6099dde8 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Fri Jun 6 19:19:39 2025 +0200 Fix syntax error Fixes an error that happens when trying to run the example: $ nc -w 1 localhost 4532P nc: port number invalid: 4532P (cherry picked from commit 2967945e327d91eb08413140fc80759527ae0c56) diff --git a/doc/man1/rigctld.1 b/doc/man1/rigctld.1 index 187ecfce1..b8bd84949 100644 --- a/doc/man1/rigctld.1 +++ b/doc/man1/rigctld.1 @@ -1741,7 +1741,7 @@ default protocol from the shell prompt: .PP .in +4n .EX -$ \fBecho "\\set_freq 14266000" | nc -w 1 localhost 4532\P +$ \fBecho "\\set_freq 14266000" | nc -w 1 localhost 4532\fP .EE .in . ----------------------------------------------------------------------- Summary of changes: doc/man1/rigctl.1 | 2 +- doc/man1/rigctld.1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-06-07 02:08:17
|
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 98d1d4f57b0d0a297dc3e082cb693dfdae74efe5 (commit) via 0123cce1356b99ff15d9d3a400556bd0b8de7e8b (commit) via 2967945e327d91eb08413140fc80759527ae0c56 (commit) from b17644d4e3d53b36ec168574cec8b5a770c7fe46 (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 98d1d4f57b0d0a297dc3e082cb693dfdae74efe5 Merge: b17644d4e 0123cce13 Author: Nate Bargmann <n0...@n0...> Date: Fri Jun 6 21:05:04 2025 -0500 Merge GitHub PR #1756 commit 0123cce1356b99ff15d9d3a400556bd0b8de7e8b Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Fri Jun 6 21:00:40 2025 +0200 Fix typo Do the same change as in commit 42f41773 diff --git a/doc/man1/rigctl.1 b/doc/man1/rigctl.1 index 2fec9b6a9..557b3028c 100644 --- a/doc/man1/rigctl.1 +++ b/doc/man1/rigctl.1 @@ -538,7 +538,7 @@ option above) only a single VFO parameter is required: .IP .in +4n .EX -.RB $ " rigctl -m 229 -r /dev/rig -o" +.RB $ " rigctl -m 2029 -r /dev/rig -o" Rig command: V VFO: VFOB commit 2967945e327d91eb08413140fc80759527ae0c56 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Fri Jun 6 19:19:39 2025 +0200 Fix syntax error Fixes an error that happens when trying to run the example: $ nc -w 1 localhost 4532P nc: port number invalid: 4532P diff --git a/doc/man1/rigctld.1 b/doc/man1/rigctld.1 index 187ecfce1..b8bd84949 100644 --- a/doc/man1/rigctld.1 +++ b/doc/man1/rigctld.1 @@ -1741,7 +1741,7 @@ default protocol from the shell prompt: .PP .in +4n .EX -$ \fBecho "\\set_freq 14266000" | nc -w 1 localhost 4532\P +$ \fBecho "\\set_freq 14266000" | nc -w 1 localhost 4532\fP .EE .in . ----------------------------------------------------------------------- Summary of changes: doc/man1/rigctl.1 | 2 +- doc/man1/rigctld.1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-06-07 01:52:16
|
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 bb8b764412e033b30a07c2b28aaf5bda29580180 (commit) from 26340d9a8a2f98d10b0477c4b70f584ae313ec23 (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 bb8b764412e033b30a07c2b28aaf5bda29580180 Author: markjfine <mar...@fi...> Date: Fri Jun 6 15:50:55 2025 -0400 Kill warnings Kills some warnings in jrc_set_func when compiling on Mac that weren't seen in Linux. (cherry picked from commit b17644d4e3d53b36ec168574cec8b5a770c7fe46) diff --git a/rigs/jrc/jrc.c b/rigs/jrc/jrc.c index 8f24f1e41..40cd79ff0 100644 --- a/rigs/jrc/jrc.c +++ b/rigs/jrc/jrc.c @@ -466,7 +466,7 @@ int jrc_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) int jrc_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) { char cmdbuf[BUFSZ]; - int blanker; + int blanker = 0; /* Optimize: * sort the switch cases with the most frequent first @@ -485,7 +485,7 @@ int jrc_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) blanker = 0; else if (func == RIG_FUNC_NB) blanker = 1; - else if (func == RIG_FUNC_NB2) + else //if (func == RIG_FUNC_NB2) blanker = 2; SNPRINTF(cmdbuf, sizeof(cmdbuf), "N%d" EOM, blanker); ----------------------------------------------------------------------- Summary of changes: rigs/jrc/jrc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-06-07 01:50:34
|
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 b17644d4e3d53b36ec168574cec8b5a770c7fe46 (commit) from 04a8503eab7fbf4cabd11766b01dc84603fb258b (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 b17644d4e3d53b36ec168574cec8b5a770c7fe46 Author: markjfine <mar...@fi...> Date: Fri Jun 6 15:50:55 2025 -0400 Kill warnings Kills some warnings in jrc_set_func when compiling on Mac that weren't seen in Linux. diff --git a/rigs/jrc/jrc.c b/rigs/jrc/jrc.c index 8f24f1e41..40cd79ff0 100644 --- a/rigs/jrc/jrc.c +++ b/rigs/jrc/jrc.c @@ -466,7 +466,7 @@ int jrc_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) int jrc_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) { char cmdbuf[BUFSZ]; - int blanker; + int blanker = 0; /* Optimize: * sort the switch cases with the most frequent first @@ -485,7 +485,7 @@ int jrc_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) blanker = 0; else if (func == RIG_FUNC_NB) blanker = 1; - else if (func == RIG_FUNC_NB2) + else //if (func == RIG_FUNC_NB2) blanker = 2; SNPRINTF(cmdbuf, sizeof(cmdbuf), "N%d" EOM, blanker); ----------------------------------------------------------------------- Summary of changes: rigs/jrc/jrc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-06-06 02:53:44
|
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 04a8503eab7fbf4cabd11766b01dc84603fb258b (commit) from c92fee947abdd74b1043ce46514694ca521d6272 (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 04a8503eab7fbf4cabd11766b01dc84603fb258b Author: Nate Bargmann <n0...@n0...> Date: Thu Jun 5 21:52:14 2025 -0500 Update NEWS diff --git a/NEWS b/NEWS index d11a05a6e..ab7ec0bc7 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,7 @@ Version 5.x -- future Version 4.7.0 * 2025-12-01 (target) + * Remove dead getopt code. GitHub PR #1709. (TNX Daniele Forsi) * Move rig_cache to separate(calloc) storage. Prepare for other moves. Issue #1420 @@ -24,6 +25,8 @@ Version 4.6.3 five years from 2020 to 2025. Mike passed away on March 28, 2025 due to complications from ALS (Lou Gehrig's disease). + * JRC: Removed RIG_FUNC_FAGC from 535D as erroneous, Added RIG_FUNC_NB2 + functionality to both 535D and 545. (TNX Mark Fine) * Restore IC-7300 spectrum data callback - regression in 4.6 (n3gb) * Add locking to rig_[gs]et_level() - fixes sending CW from tlf (n3gb) * Fix attempt to use memory returned by setlocale() after being freed (TNX Mooneer Salem) ----------------------------------------------------------------------- Summary of changes: NEWS | 3 +++ 1 file changed, 3 insertions(+) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-06-06 02:47:27
|
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 c92fee947abdd74b1043ce46514694ca521d6272 (commit) via 20b92ea1157af1ce97c28c3e71ec7d5eedd7c0ad (commit) from 735e1810dff3ddd10c54ccee303ccf9b9478f289 (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 c92fee947abdd74b1043ce46514694ca521d6272 Merge: 735e1810d 20b92ea11 Author: Nate Bargmann <n0...@n0...> Date: Thu Jun 5 21:42:20 2025 -0500 Merge GitHub PR #1709 commit 20b92ea1157af1ce97c28c3e71ec7d5eedd7c0ad Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Mon Apr 21 22:34:11 2025 +0200 Remove dead code The code removed could never be executed because getopt()/getopt_long() detect a missing argument only if it is at the end of the command line and return '?' which is handled by the default case of the switch which prints an error message to stderr. diff --git a/tests/ampctl.c b/tests/ampctl.c index 6a0cf29b3..4f4af3b9f 100644 --- a/tests/ampctl.c +++ b/tests/ampctl.c @@ -160,32 +160,14 @@ int main(int argc, char *argv[]) exit(0); case 'm': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - my_model = atoi(optarg); break; case 'r': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - amp_file = optarg; break; case 's': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) { fprintf(stderr, "Invalid baud rate of %s\n", optarg); @@ -195,12 +177,6 @@ int main(int argc, char *argv[]) break; case 'C': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (*conf_parms != '\0') { strcat(conf_parms, ","); @@ -217,12 +193,6 @@ int main(int argc, char *argv[]) break; case 't': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (strlen(optarg) > 1) { send_cmd_term = strtol(optarg, NULL, 0); diff --git a/tests/ampctld.c b/tests/ampctld.c index 079eb068b..bf065a257 100644 --- a/tests/ampctld.c +++ b/tests/ampctld.c @@ -203,32 +203,14 @@ int main(int argc, char *argv[]) exit(0); case 'm': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - my_model = atoi(optarg); break; case 'r': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - amp_file = optarg; break; case 's': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) { fprintf(stderr, "Invalid baud rate of %s\n", optarg); @@ -238,12 +220,6 @@ int main(int argc, char *argv[]) break; case 'C': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (*conf_parms != '\0') { strcat(conf_parms, ","); @@ -260,22 +236,10 @@ int main(int argc, char *argv[]) break; case 't': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - portno = optarg; break; case 'T': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - src_addr = optarg; break; diff --git a/tests/rigctl.c b/tests/rigctl.c index 35d1241b3..98e737afc 100644 --- a/tests/rigctl.c +++ b/tests/rigctl.c @@ -276,52 +276,22 @@ int main(int argc, char *argv[]) exit(0); case 'm': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - my_model = atoi(optarg); break; case 'r': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - rig_file = optarg; break; case 'p': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - ptt_file = optarg; break; case 'd': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - dcd_file = optarg; break; case 'P': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (!strcmp(optarg, "RIG")) { ptt_type = RIG_PTT_RIG; @@ -363,12 +333,6 @@ int main(int argc, char *argv[]) break; case 'D': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (!strcmp(optarg, "RIG")) { dcd_type = RIG_DCD_RIG; @@ -414,22 +378,10 @@ int main(int argc, char *argv[]) break; case 'c': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - civaddr = optarg; break; case 't': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (strlen(optarg) > 1) { send_cmd_term = strtol(optarg, NULL, 0); @@ -442,12 +394,6 @@ int main(int argc, char *argv[]) break; case 's': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) { fprintf(stderr, "Invalid baud rate of %s\n", optarg); @@ -457,12 +403,6 @@ int main(int argc, char *argv[]) break; case 'C': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (*conf_parms != '\0') { strcat(conf_parms, ","); diff --git a/tests/rigctlcom.c b/tests/rigctlcom.c index e7b8fbf07..63ec30d8c 100644 --- a/tests/rigctlcom.c +++ b/tests/rigctlcom.c @@ -258,63 +258,27 @@ int main(int argc, char *argv[]) break; case 'm': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - my_model = atoi(optarg); break; case 'r': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - rig_file = optarg; break; case 'R': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - rig_file2 = optarg; break; case 'p': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - ptt_file = optarg; break; case 'd': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - dcd_file = optarg; break; case 'P': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (!strcmp(optarg, "RIG")) { ptt_type = RIG_PTT_RIG; @@ -347,12 +311,6 @@ int main(int argc, char *argv[]) break; case 'D': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (!strcmp(optarg, "RIG")) { dcd_type = RIG_DCD_RIG; @@ -385,22 +343,10 @@ int main(int argc, char *argv[]) break; case 'c': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - civaddr = optarg; break; case 's': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) { fprintf(stderr, "Invalid baud rate of %s\n", optarg); @@ -410,23 +356,11 @@ int main(int argc, char *argv[]) break; case 'S': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - serial_rate2 = atoi(optarg); break; case 'C': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (*conf_parms != '\0') { strcat(conf_parms, ","); diff --git a/tests/rigctld.c b/tests/rigctld.c index 8ee613cf1..09cf3fb29 100644 --- a/tests/rigctld.c +++ b/tests/rigctld.c @@ -334,52 +334,22 @@ int main(int argc, char *argv[]) break; case 'm': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - my_model = atoi(optarg); break; case 'r': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - rig_file = optarg; break; case 'p': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - ptt_file = optarg; break; case 'd': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - dcd_file = optarg; break; case 'P': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (!strcmp(optarg, "RIG")) { ptt_type = RIG_PTT_RIG; @@ -421,12 +391,6 @@ int main(int argc, char *argv[]) break; case 'D': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (!strcmp(optarg, "RIG")) { dcd_type = RIG_DCD_RIG; @@ -472,33 +436,15 @@ int main(int argc, char *argv[]) break; case 'c': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - civaddr = optarg; break; case 'S': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - resp_sep = *optarg; rig_debug(RIG_DEBUG_VERBOSE, "%s: resp_sep=%c\n", __func__, resp_sep); break; case 's': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) { fprintf(stderr, "Invalid baud rate of %s\n", optarg); @@ -508,12 +454,6 @@ int main(int argc, char *argv[]) break; case 'C': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (strcmp(optarg, "auto_power_on=0") == 0) { rig_debug(RIG_DEBUG_ERR, "%s: skipping rig_open\n", __func__); @@ -540,22 +480,10 @@ int main(int argc, char *argv[]) break; case 't': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - portno = optarg; break; case 'T': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - src_addr = optarg; break; @@ -581,24 +509,12 @@ int main(int argc, char *argv[]) break; case 'W': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - twiddle_timeout = atoi(optarg); fprintf(stderr, "twiddle_timeout is deprecated...use e.g. --set-conf=twiddle_timeout=5\n"); break; case 'w': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - twiddle_rit = atoi(optarg); fprintf(stderr, "twiddle_rit is deprecated...use e.g. --set-conf=twiddle_rit=1\n"); @@ -606,12 +522,6 @@ int main(int argc, char *argv[]) case 'x': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - uplink = atoi(optarg); break; diff --git a/tests/rigctlsync.c b/tests/rigctlsync.c index a576b3af2..ce1a4a896 100644 --- a/tests/rigctlsync.c +++ b/tests/rigctlsync.c @@ -254,12 +254,6 @@ int main(int argc, char *argv[]) case 'm': case 'M': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (c == 'm') { my_model[0] = atoi(optarg); @@ -272,22 +266,10 @@ int main(int argc, char *argv[]) break; case 'r': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - rig_file = optarg; break; case 'R': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - rig_file2 = optarg; break; @@ -295,12 +277,6 @@ int main(int argc, char *argv[]) #if 0 case 'p': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - ptt_file = optarg; break; #endif @@ -308,12 +284,6 @@ int main(int argc, char *argv[]) #if 0 case 'd': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - dcd_file = optarg; break; #endif @@ -321,12 +291,6 @@ int main(int argc, char *argv[]) #if 0 case 'P': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (!strcmp(optarg, "RIG")) { ptt_type = RIG_PTT_RIG; @@ -362,12 +326,6 @@ int main(int argc, char *argv[]) #if 0 case 'D': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (!strcmp(optarg, "RIG")) { dcd_type = RIG_DCD_RIG; @@ -401,22 +359,10 @@ int main(int argc, char *argv[]) #endif case 'c': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - civaddr = optarg; break; case 's': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) { fprintf(stderr, "Invalid baud rate of %s\n", optarg); @@ -426,23 +372,11 @@ int main(int argc, char *argv[]) break; case 'S': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - serial_rate2 = atoi(optarg); break; case 'C': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (*conf_parms != '\0') { strcat(conf_parms, ","); diff --git a/tests/rigctltcp.c b/tests/rigctltcp.c index cf3a921d4..0450f1835 100644 --- a/tests/rigctltcp.c +++ b/tests/rigctltcp.c @@ -331,52 +331,22 @@ int main(int argc, char *argv[]) break; case 'm': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - my_model = atoi(optarg); break; case 'r': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - rig_file = optarg; break; case 'p': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - ptt_file = optarg; break; case 'd': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - dcd_file = optarg; break; case 'P': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (!strcmp(optarg, "RIG")) { ptt_type = RIG_PTT_RIG; @@ -418,12 +388,6 @@ int main(int argc, char *argv[]) break; case 'D': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (!strcmp(optarg, "RIG")) { dcd_type = RIG_DCD_RIG; @@ -469,33 +433,15 @@ int main(int argc, char *argv[]) break; case 'c': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - civaddr = optarg; break; case 'S': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - resp_sep = *optarg; rig_debug(RIG_DEBUG_VERBOSE, "%s: resp_sep=%c\n", __func__, resp_sep); break; case 's': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) { fprintf(stderr, "Invalid baud rate of %s\n", optarg); @@ -505,12 +451,6 @@ int main(int argc, char *argv[]) break; case 'C': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (*conf_parms != '\0') { strcat(conf_parms, ","); @@ -527,22 +467,10 @@ int main(int argc, char *argv[]) break; case 't': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - portno = optarg; break; case 'T': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - src_addr = optarg; break; @@ -568,24 +496,12 @@ int main(int argc, char *argv[]) break; case 'W': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - twiddle_timeout = atoi(optarg); fprintf(stderr, "twiddle_timeout is deprecated...use e.g. --set-conf=twiddle_timeout=5\n"); break; case 'w': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - twiddle_rit = atoi(optarg); fprintf(stderr, "twiddle_rit is deprecated...use e.g. --set-conf=twiddle_rit=1\n"); @@ -593,12 +509,6 @@ int main(int argc, char *argv[]) case 'x': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - uplink = atoi(optarg); break; @@ -608,22 +518,10 @@ int main(int argc, char *argv[]) break; case 'M': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - multicast_addr = optarg; break; case 'n': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - multicast_port = atoi(optarg); if (multicast_port == 0) diff --git a/tests/rigmem.c b/tests/rigmem.c index bf73e7102..5f134b467 100644 --- a/tests/rigmem.c +++ b/tests/rigmem.c @@ -128,42 +128,18 @@ int main(int argc, char *argv[]) exit(0); case 'm': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - my_model = atoi(optarg); break; case 'r': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - rig_file = optarg; break; case 'c': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - civaddr = optarg; break; case 's': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) { fprintf(stderr, "Invalid baud rate of %s\n", optarg); @@ -173,12 +149,6 @@ int main(int argc, char *argv[]) break; case 'C': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (*conf_parms != '\0') { strcat(conf_parms, ","); @@ -195,12 +165,6 @@ int main(int argc, char *argv[]) break; case 'p': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - csv_sep = optarg[0]; break; diff --git a/tests/rigsmtr.c b/tests/rigsmtr.c index aae17d2ec..88ac36bf4 100644 --- a/tests/rigsmtr.c +++ b/tests/rigsmtr.c @@ -113,42 +113,18 @@ int main(int argc, char *argv[]) exit(0); case 'm': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - rig_model = atoi(optarg); break; case 'r': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - rig_file = optarg; break; case 'c': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - civaddr = optarg; break; case 's': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) { fprintf(stderr, "Invalid baud rate of %s\n", optarg); @@ -158,12 +134,6 @@ int main(int argc, char *argv[]) break; case 'C': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (*rig_conf_parms != '\0') { strcat(rig_conf_parms, ","); @@ -180,42 +150,18 @@ int main(int argc, char *argv[]) break; case 'M': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - rot_model = atoi(optarg); break; case 'R': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - rot_file = optarg; break; case 'S': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - rot_serial_rate = atoi(optarg); break; case 'N': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (*rot_conf_parms != '\0') { strcat(rot_conf_parms, ","); diff --git a/tests/rigswr.c b/tests/rigswr.c index 0caf9bb22..86ce8aa7a 100644 --- a/tests/rigswr.c +++ b/tests/rigswr.c @@ -103,42 +103,18 @@ int main(int argc, char *argv[]) exit(0); case 'm': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - my_model = atoi(optarg); break; case 'r': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - rig_file = optarg; break; case 'c': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - civaddr = optarg; break; case 's': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) { fprintf(stderr, "Invalid baud rate of %s\n", optarg); @@ -148,12 +124,6 @@ int main(int argc, char *argv[]) break; case 'C': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (*conf_parms != '\0') { strcat(conf_parms, ","); @@ -170,22 +140,10 @@ int main(int argc, char *argv[]) break; case 'p': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - ptt_file = optarg; break; case 'P': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (!strcmp(optarg, "RIG")) { ptt_type = RIG_PTT_RIG; diff --git a/tests/rotctl.c b/tests/rotctl.c index 873c9b96e..ac874818d 100644 --- a/tests/rotctl.c +++ b/tests/rotctl.c @@ -168,42 +168,18 @@ int main(int argc, char *argv[]) exit(0); case 'm': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - my_model = atoi(optarg); break; case 'r': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - rot_file = optarg; break; case 'R': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - rot_file2 = optarg; break; case 's': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) { fprintf(stderr, "Invalid baud rate of %s\n", optarg); @@ -213,12 +189,6 @@ int main(int argc, char *argv[]) break; case 'C': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (*conf_parms != '\0') { strcat(conf_parms, ","); @@ -235,12 +205,6 @@ int main(int argc, char *argv[]) break; case 't': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (strlen(optarg) > 1) { send_cmd_term = strtol(optarg, NULL, 0); @@ -253,22 +217,10 @@ int main(int argc, char *argv[]) break; case 'o': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - az_offset = atof(optarg); break; case 'O': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - el_offset = atof(optarg); break; diff --git a/tests/rotctld.c b/tests/rotctld.c index e68227acf..ce6d1a101 100644 --- a/tests/rotctld.c +++ b/tests/rotctld.c @@ -196,42 +196,18 @@ int main(int argc, char *argv[]) exit(0); case 'm': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - my_model = atoi(optarg); break; case 'r': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - rot_file = optarg; break; case 'R': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - rot_file2 = optarg; break; case 's': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) { fprintf(stderr, "Invalid baud rate of %s\n", optarg); @@ -241,12 +217,6 @@ int main(int argc, char *argv[]) break; case 'C': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (*conf_parms != '\0') { strcat(conf_parms, ","); @@ -263,42 +233,18 @@ int main(int argc, char *argv[]) break; case 't': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - portno = optarg; break; case 'T': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - src_addr = optarg; break; case 'o': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - az_offset = atof(optarg); break; case 'O': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - el_offset = atof(optarg); case 'v': ----------------------------------------------------------------------- Summary of changes: tests/ampctl.c | 30 ---------------- tests/ampctld.c | 36 ------------------- tests/rigctl.c | 60 ------------------------------- tests/rigctlcom.c | 66 ---------------------------------- tests/rigctld.c | 90 ---------------------------------------------- tests/rigctlsync.c | 66 ---------------------------------- tests/rigctltcp.c | 102 ----------------------------------------------------- tests/rigmem.c | 36 ------------------- tests/rigsmtr.c | 54 ---------------------------- tests/rigswr.c | 42 ---------------------- tests/rotctl.c | 48 ------------------------- tests/rotctld.c | 54 ---------------------------- 12 files changed, 684 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |