hamlib-cvs-digest Mailing List for Ham Radio Control Libraries
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-10-06 16:59:09
|
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 e992691354fb0d1966660f84314bfa31f3ee39c5 (commit) via bceb1a1fdf42410b876571f0a167d1fa8abefa3f (commit) via 486ec607dd84499f61e07e1d0e6a80633ab0809d (commit) via a7188c201ac552b6155fe25bfab85e44cdd76c62 (commit) via 0546e764afe4fdca95b471d11858e74724333da8 (commit) via 19ce6d30b0ff589d7866fa9c2457cc56d0b64d81 (commit) via 6238a5ef1b605168c06767836a882007fb5fa59c (commit) via c0717e783475e70a2a40f3d08199379f324cc1b4 (commit) from d11d7b2d0029e901e90f62e866e2a3c3e9924c50 (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 e992691354fb0d1966660f84314bfa31f3ee39c5 Merge: d11d7b2d0 bceb1a1fd Author: Nate Bargmann <n0...@n0...> Date: Mon Oct 6 11:43:25 2025 -0500 Merge GitHub PR @1933 commit bceb1a1fdf42410b876571f0a167d1fa8abefa3f Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Oct 5 11:31:58 2025 +0200 Do not use abbreviations where there is enough space diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 386cfae25..a7b83c5ef 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -309,18 +309,18 @@ static struct test_table test_list[] = { 'g', "scan", ACTION(scan), ARG_IN, "Scan Fct", "Scan Channel" }, { 'A', "set_trn", ACTION(set_trn), ARG_IN | ARG_NOVFO, "Transceive" }, { 'a', "get_trn", ACTION(get_trn), ARG_OUT | ARG_NOVFO, "Transceive" }, - { 'R', "set_rptr_shift", ACTION(set_rptr_shift), ARG_IN, "Rptr Shift" }, - { 'r', "get_rptr_shift", ACTION(get_rptr_shift), ARG_OUT, "Rptr Shift" }, - { 'O', "set_rptr_offs", ACTION(set_rptr_offs), ARG_IN, "Rptr Offset" }, - { 'o', "get_rptr_offs", ACTION(get_rptr_offs), ARG_OUT, "Rptr Offset" }, + { 'R', "set_rptr_shift", ACTION(set_rptr_shift), ARG_IN, "Repeater Shift" }, + { 'r', "get_rptr_shift", ACTION(get_rptr_shift), ARG_OUT, "Repeater Shift" }, + { 'O', "set_rptr_offs", ACTION(set_rptr_offs), ARG_IN, "Repeater Offset" }, + { 'o', "get_rptr_offs", ACTION(get_rptr_offs), ARG_OUT, "Repeater Offset" }, { 'C', "set_ctcss_tone", ACTION(set_ctcss_tone), ARG_IN, "CTCSS Tone" }, { 'c', "get_ctcss_tone", ACTION(get_ctcss_tone), ARG_OUT, "CTCSS Tone" }, { 'D', "set_dcs_code", ACTION(set_dcs_code), ARG_IN, "DCS Code" }, { 'd', "get_dcs_code", ACTION(get_dcs_code), ARG_OUT, "DCS Code" }, - { 0x90, "set_ctcss_sql", ACTION(set_ctcss_sql), ARG_IN, "CTCSS Sql" }, - { 0x91, "get_ctcss_sql", ACTION(get_ctcss_sql), ARG_OUT, "CTCSS Sql" }, - { 0x92, "set_dcs_sql", ACTION(set_dcs_sql), ARG_IN, "DCS Sql" }, - { 0x93, "get_dcs_sql", ACTION(get_dcs_sql), ARG_OUT, "DCS Sql" }, + { 0x90, "set_ctcss_sql", ACTION(set_ctcss_sql), ARG_IN, "CTCSS Squelch" }, + { 0x91, "get_ctcss_sql", ACTION(get_ctcss_sql), ARG_OUT, "CTCSS Squelch" }, + { 0x92, "set_dcs_sql", ACTION(set_dcs_sql), ARG_IN, "DCS Squelch" }, + { 0x93, "get_dcs_sql", ACTION(get_dcs_sql), ARG_OUT, "DCS Squelch" }, // //{ 'V', "set_vfo", ACTION(set_vfo), ARG_IN | ARG_NOVFO | ARG_OUT, "VFO" }, { 'V', "set_vfo", ACTION(set_vfo), ARG_IN | ARG_NOVFO, "VFO" }, @@ -343,8 +343,8 @@ static struct test_table test_list[] = { 0x88, "get_powerstat", ACTION(get_powerstat), ARG_OUT | ARG_NOVFO, "Power Status" }, { 0x89, "send_dtmf", ACTION(send_dtmf), ARG_IN | ARG_NOVFO, "Digits" }, { 0x8a, "recv_dtmf", ACTION(recv_dtmf), ARG_OUT | ARG_NOVFO, "Digits" }, - { 'w', "send_cmd", ACTION(send_cmd), ARG_IN1 | ARG_IN_LINE | ARG_OUT2 | ARG_NOVFO, "Cmd", "Reply" }, - { 'W', "send_cmd_rx", ACTION(send_cmd), ARG_IN | ARG_OUT2 | ARG_NOVFO, "Cmd", "Reply"}, + { 'w', "send_cmd", ACTION(send_cmd), ARG_IN1 | ARG_IN_LINE | ARG_OUT2 | ARG_NOVFO, "Command", "Reply" }, + { 'W', "send_cmd_rx", ACTION(send_cmd), ARG_IN | ARG_OUT2 | ARG_NOVFO, "Command", "Reply"}, { '*', "reset", ACTION(reset), ARG_IN | ARG_NOVFO, "Reset" }, { 'b', "send_morse", ACTION(send_morse), ARG_IN | ARG_NOVFO | ARG_IN_LINE, "Morse" }, { 0xbb, "stop_morse", ACTION(stop_morse), ARG_NOVFO}, @@ -358,7 +358,7 @@ static struct test_table test_list[] = { 0x95, "set_cache", ACTION(set_cache), ARG_IN | ARG_NOVFO, "Timeout (msecs)" }, { 0x96, "get_cache", ACTION(get_cache), ARG_OUT | ARG_NOVFO, "Timeout (msecs)" }, { '2', "power2mW", ACTION(power2mW), ARG_IN1 | ARG_IN2 | ARG_IN3 | ARG_OUT1 | ARG_NOVFO, "Power [0.0..1.0]", "Frequency", "Mode", "Power mW" }, - { '4', "mW2power", ACTION(mW2power), ARG_IN1 | ARG_IN2 | ARG_IN3 | ARG_OUT1 | ARG_NOVFO, "Pwr mW", "Freq", "Mode", "Power [0.0..1.0]" }, + { '4', "mW2power", ACTION(mW2power), ARG_IN1 | ARG_IN2 | ARG_IN3 | ARG_OUT1 | ARG_NOVFO, "Power mW", "Freq", "Mode", "Power [0.0..1.0]" }, { '1', "dump_caps", ACTION(dump_caps), ARG_NOVFO }, { '3', "dump_conf", ACTION(dump_conf), ARG_NOVFO }, { 0x8f, "dump_state", ACTION(dump_state), ARG_OUT | ARG_NOVFO }, commit 486ec607dd84499f61e07e1d0e6a80633ab0809d Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Oct 5 11:31:10 2025 +0200 Remove space for consistency with other descriptions diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index aa6b7f269..386cfae25 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -352,7 +352,7 @@ static struct test_table test_list[] = { 0x94, "send_voice_mem", ACTION(send_voice_mem), ARG_NOVFO | ARG_IN, "Voice Mem#" }, { 0xab, "stop_voice_mem", ACTION(stop_voice_mem), ARG_NOVFO}, { 0x8b, "get_dcd", ACTION(get_dcd), ARG_OUT | ARG_NOVFO, "DCD" }, - { 0x97, "uplink", ACTION(set_uplink), ARG_IN | ARG_NOVFO, "1=Sub, 2=Main" }, + { 0x97, "uplink", ACTION(set_uplink), ARG_IN | ARG_NOVFO, "1=Sub,2=Main" }, { 0x8d, "set_twiddle", ACTION(set_twiddle), ARG_IN | ARG_NOVFO, "Timeout (secs)" }, { 0x8e, "get_twiddle", ACTION(get_twiddle), ARG_OUT | ARG_NOVFO, "Timeout (secs)" }, { 0x95, "set_cache", ACTION(set_cache), ARG_IN | ARG_NOVFO, "Timeout (msecs)" }, commit a7188c201ac552b6155fe25bfab85e44cdd76c62 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Oct 5 09:02:00 2025 +0200 Put set_gpio before get_gpio Like other set/get pairs. diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index dbc81b648..aa6b7f269 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -383,8 +383,8 @@ static struct test_table test_list[] = { 0xa4, "send_raw", ACTION(send_raw), ARG_NOVFO | ARG_IN1 | ARG_IN2 | ARG_OUT3, "Terminator", "Command", "Send raw answer" }, { 0xa5, "client_version", ACTION(client_version), ARG_NOVFO | ARG_IN1, "Version", "Client version" }, { 0xa8, "hamlib_version", ACTION(hamlib_version), ARG_NOVFO }, - { 0xa9, "get_gpio", ACTION(cm108_get_bit), ARG_NOVFO | ARG_IN1 | ARG_OUT1, "GPIO#", "0/1" }, { 0xaa, "set_gpio", ACTION(cm108_set_bit), ARG_NOVFO | ARG_IN, "GPIO#", "0/1" }, + { 0xa9, "get_gpio", ACTION(cm108_get_bit), ARG_NOVFO | ARG_IN1 | ARG_OUT1, "GPIO#", "0/1" }, { 0xac, "set_conf", ACTION(set_conf), ARG_NOVFO | ARG_IN, "Token", "Token Value" }, { 0xad, "get_conf", ACTION(get_conf), ARG_NOVFO | ARG_IN1 | ARG_OUT2, "Token", "Value"}, { 0xa7, "test", ACTION(test), ARG_NOVFO | ARG_IN, "routine" }, commit 0546e764afe4fdca95b471d11858e74724333da8 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Oct 4 22:51:38 2025 +0200 Update comments All letters are used now, rig_set/rig_get are added and -W is reserved by POSIX.2 for implementation extensions of get_opt, but it doesn't apply here because this code is using strcmp() and the W command which is implemented is not prefixed by a '-'. diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 25edc4dc3..dbc81b648 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -276,11 +276,7 @@ declare_proto_rig(get_conf); /* * convention: upper case cmd is set, lowercase is get * - * TODO: add missing rig_set_/rig_get_: sql, dcd, etc. * NB: 'q' 'Q' '?' are reserved by interactive mode interface - * do NOT use -W since it's reserved by POSIX. - * - * Available alphabetic letters: -.--------------*-----W-Y- */ static struct test_table test_list[] = { commit 19ce6d30b0ff589d7866fa9c2457cc56d0b64d81 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Oct 4 22:37:09 2025 +0200 Put get_conf near set_conf diff --git a/tests/rotctl_parse.c b/tests/rotctl_parse.c index 18c8ed3d5..c0fb93431 100644 --- a/tests/rotctl_parse.c +++ b/tests/rotctl_parse.c @@ -222,6 +222,7 @@ struct test_table test_list[] = { 'X', "set_parm", ACTION(set_parm), ARG_IN, "Parm", "Parm Value" }, { 'x', "get_parm", ACTION(get_parm), ARG_IN1 | ARG_OUT2, "Parm", "Parm Value" }, { 'C', "set_conf", ACTION(set_conf), ARG_IN, "Token", "Value" }, + { 0xad, "get_conf", ACTION(get_conf), ARG_IN1 | ARG_OUT2, "Token", "Value"}, { '_', "get_info", ACTION(get_info), ARG_OUT, "Info" }, { 's', "get_status", ACTION(get_status), ARG_OUT, "Status flags" }, { 'w', "send_cmd", ACTION(send_cmd), ARG_IN1 | ARG_IN_LINE | ARG_OUT2, "Cmd", "Reply" }, @@ -238,7 +239,6 @@ struct test_table test_list[] = { 'A', "a_sp2a_lp", ACTION(az_sp2az_lp), ARG_IN1 | ARG_OUT1, "Short Path Deg", "Long Path Deg" }, { 'a', "d_sp2d_lp", ACTION(dist_sp2dist_lp), ARG_IN1 | ARG_OUT1, "Short Path km", "Long Path km" }, { 0x8c, "pause", ACTION(pause), ARG_IN, "Seconds" }, - { 0xad, "get_conf", ACTION(get_conf), ARG_IN1 | ARG_OUT2, "Token", "Value"}, { 0x00, "", NULL }, }; commit 6238a5ef1b605168c06767836a882007fb5fa59c Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Oct 4 21:50:20 2025 +0200 Reorder commands in --help output Puts more related get/set commands side by side in the columnar output. diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 0cc20c628..25edc4dc3 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -347,18 +347,18 @@ static struct test_table test_list[] = { 0x88, "get_powerstat", ACTION(get_powerstat), ARG_OUT | ARG_NOVFO, "Power Status" }, { 0x89, "send_dtmf", ACTION(send_dtmf), ARG_IN | ARG_NOVFO, "Digits" }, { 0x8a, "recv_dtmf", ACTION(recv_dtmf), ARG_OUT | ARG_NOVFO, "Digits" }, - { '*', "reset", ACTION(reset), ARG_IN | ARG_NOVFO, "Reset" }, { 'w', "send_cmd", ACTION(send_cmd), ARG_IN1 | ARG_IN_LINE | ARG_OUT2 | ARG_NOVFO, "Cmd", "Reply" }, { 'W', "send_cmd_rx", ACTION(send_cmd), ARG_IN | ARG_OUT2 | ARG_NOVFO, "Cmd", "Reply"}, + { '*', "reset", ACTION(reset), ARG_IN | ARG_NOVFO, "Reset" }, { 'b', "send_morse", ACTION(send_morse), ARG_IN | ARG_NOVFO | ARG_IN_LINE, "Morse" }, { 0xbb, "stop_morse", ACTION(stop_morse), ARG_NOVFO}, { 0xbc, "wait_morse", ACTION(wait_morse), ARG_NOVFO}, { 0x94, "send_voice_mem", ACTION(send_voice_mem), ARG_NOVFO | ARG_IN, "Voice Mem#" }, { 0xab, "stop_voice_mem", ACTION(stop_voice_mem), ARG_NOVFO}, { 0x8b, "get_dcd", ACTION(get_dcd), ARG_OUT | ARG_NOVFO, "DCD" }, + { 0x97, "uplink", ACTION(set_uplink), ARG_IN | ARG_NOVFO, "1=Sub, 2=Main" }, { 0x8d, "set_twiddle", ACTION(set_twiddle), ARG_IN | ARG_NOVFO, "Timeout (secs)" }, { 0x8e, "get_twiddle", ACTION(get_twiddle), ARG_OUT | ARG_NOVFO, "Timeout (secs)" }, - { 0x97, "uplink", ACTION(set_uplink), ARG_IN | ARG_NOVFO, "1=Sub, 2=Main" }, { 0x95, "set_cache", ACTION(set_cache), ARG_IN | ARG_NOVFO, "Timeout (msecs)" }, { 0x96, "get_cache", ACTION(get_cache), ARG_OUT | ARG_NOVFO, "Timeout (msecs)" }, { '2', "power2mW", ACTION(power2mW), ARG_IN1 | ARG_IN2 | ARG_IN3 | ARG_OUT1 | ARG_NOVFO, "Power [0.0..1.0]", "Frequency", "Mode", "Power mW" }, @@ -379,19 +379,19 @@ static struct test_table test_list[] = { 0x8c, "pause", ACTION(pause), ARG_IN | ARG_NOVFO, "Seconds" }, { 0x98, "password", ACTION(password), ARG_IN | ARG_NOVFO, "Password" }, // { 0x99, "set_password", ACTION(set_password), ARG_IN | ARG_NOVFO, "Password" }, - { 0xf7, "get_mode_bandwidths", ACTION(get_mode_bandwidths), ARG_IN | ARG_NOVFO, "Mode" }, { 0xa0, "set_separator", ACTION(set_separator), ARG_IN | ARG_NOVFO, "Separator" }, { 0xa1, "get_separator", ACTION(get_separator), ARG_NOVFO, "Separator" }, { 0xa2, "set_lock_mode", ACTION(set_lock_mode), ARG_IN | ARG_NOVFO, "Locked" }, { 0xa3, "get_lock_mode", ACTION(get_lock_mode), ARG_NOVFO, "Locked" }, + { 0xf7, "get_mode_bandwidths", ACTION(get_mode_bandwidths), ARG_IN | ARG_NOVFO, "Mode" }, { 0xa4, "send_raw", ACTION(send_raw), ARG_NOVFO | ARG_IN1 | ARG_IN2 | ARG_OUT3, "Terminator", "Command", "Send raw answer" }, { 0xa5, "client_version", ACTION(client_version), ARG_NOVFO | ARG_IN1, "Version", "Client version" }, - { 0xa7, "test", ACTION(test), ARG_NOVFO | ARG_IN, "routine" }, { 0xa8, "hamlib_version", ACTION(hamlib_version), ARG_NOVFO }, { 0xa9, "get_gpio", ACTION(cm108_get_bit), ARG_NOVFO | ARG_IN1 | ARG_OUT1, "GPIO#", "0/1" }, { 0xaa, "set_gpio", ACTION(cm108_set_bit), ARG_NOVFO | ARG_IN, "GPIO#", "0/1" }, { 0xac, "set_conf", ACTION(set_conf), ARG_NOVFO | ARG_IN, "Token", "Token Value" }, { 0xad, "get_conf", ACTION(get_conf), ARG_NOVFO | ARG_IN1 | ARG_OUT2, "Token", "Value"}, + { 0xa7, "test", ACTION(test), ARG_NOVFO | ARG_IN, "routine" }, { 0x00, "", NULL }, }; commit c0717e783475e70a2a40f3d08199379f324cc1b4 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Oct 4 21:30:36 2025 +0200 Remove duplicated command from --help output diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 496f148c6..0cc20c628 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -386,7 +386,6 @@ static struct test_table test_list[] = { 0xa3, "get_lock_mode", ACTION(get_lock_mode), ARG_NOVFO, "Locked" }, { 0xa4, "send_raw", ACTION(send_raw), ARG_NOVFO | ARG_IN1 | ARG_IN2 | ARG_OUT3, "Terminator", "Command", "Send raw answer" }, { 0xa5, "client_version", ACTION(client_version), ARG_NOVFO | ARG_IN1, "Version", "Client version" }, - { 0xa6, "get_vfo_list", ACTION(get_vfo_list), ARG_NOVFO }, { 0xa7, "test", ACTION(test), ARG_NOVFO | ARG_IN, "routine" }, { 0xa8, "hamlib_version", ACTION(hamlib_version), ARG_NOVFO }, { 0xa9, "get_gpio", ACTION(cm108_get_bit), ARG_NOVFO | ARG_IN1 | ARG_OUT1, "GPIO#", "0/1" }, ----------------------------------------------------------------------- Summary of changes: tests/rigctl_parse.c | 35 +++++++++++++++-------------------- tests/rotctl_parse.c | 2 +- 2 files changed, 16 insertions(+), 21 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-10-06 16:42:33
|
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 d11d7b2d0029e901e90f62e866e2a3c3e9924c50 (commit) via d3769bf948a8bbe57dd982de2fc2dfbe4dea1d4d (commit) via 4ad91cad0a70d2a50e98317076484f420d2d4414 (commit) via d391e569ce4bb370720376363eacd6ba062f7702 (commit) via 8bd19c4db80d22f0a710c487bfe4acc1a15e9179 (commit) via 00020e6d9d1c7c17544fb3ce8f9ec64ae8ad0be4 (commit) via 22834737075ddbb0a7a36e179a58a8d1439415cf (commit) from 54a5097c7e44148dc5c02ad6194744c60fbd86f4 (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 d11d7b2d0029e901e90f62e866e2a3c3e9924c50 Merge: 54a5097c7 d3769bf94 Author: Nate Bargmann <n0...@n0...> Date: Mon Oct 6 11:26:12 2025 -0500 Merge GitHub PR #1932 commit d3769bf948a8bbe57dd982de2fc2dfbe4dea1d4d Author: George Baltz N3GB <Geo...@gm...> Date: Fri Oct 3 11:56:04 2025 -0400 Don't forget the noise diff --git a/bindings/python/test_Hamlib_class.py b/bindings/python/test_Hamlib_class.py index 0493eb717..3ee2df26d 100755 --- a/bindings/python/test_Hamlib_class.py +++ b/bindings/python/test_Hamlib_class.py @@ -131,7 +131,6 @@ class TestClass: 'HAMLIB_ELAPSED_GET', 'HAMLIB_ELAPSED_INVALIDATE', 'HAMLIB_ELAPSED_SET', -'HAMLIB_FIFO_SIZE', 'HAMLIB_FILPATHLEN', 'HAMLIB_FLTLSTSIZ', 'HAMLIB_FRQRANGESIZ', commit 4ad91cad0a70d2a50e98317076484f420d2d4414 Author: George Baltz N3GB <Geo...@gm...> Date: Fri Oct 3 11:12:06 2025 -0400 Add a fallback function for spaces() This shouldn't be needed, but somebody somewhere sometime is going to use an old rigctl with a new hamlib and get an undefined symbol. Should go away with 5.0. diff --git a/src/misc.c b/src/misc.c index 92469f34f..b3244b737 100644 --- a/src/misc.c +++ b/src/misc.c @@ -2834,6 +2834,21 @@ const char *hl_stars(int len) return &s[MAX_STARS - len]; } +//---Start cut here--- +//! @cond Doxygen_Suppress +/* Dummy definition for mismatched rigctl|rigctld|<whatever> + * that still references old function + * Should go away with 5.0 + * Not prototyped or referenced in any current code + */ +// cppcheck-suppress unusedFunction +const char *spaces(int len) +{ + return hl_stars(len); +} +//! @endcond + +//---End cut here--- //! @cond Doxygen_Suppress char *date_strget(char *buf, int buflen, int localtime) { commit d391e569ce4bb370720376363eacd6ba062f7702 Author: George Baltz N3GB <Geo...@gm...> Date: Tue Sep 30 11:09:18 2025 -0400 Add rig to opened list even if skip_init is set. Just in case someone finishes CHECK_RIG_ARG, or checks status from remove_opened_rig(). diff --git a/src/rig.c b/src/rig.c index a390db1d1..52f81171b 100644 --- a/src/rig.c +++ b/src/rig.c @@ -1593,7 +1593,11 @@ int HAMLIB_API rig_open(RIG *rig) } } - if (skip_init) { RETURNFUNC2(RIG_OK); } + if (skip_init) + { + add_opened_rig(rig); + RETURNFUNC2(RIG_OK); + } status = async_data_handler_start(rig); commit 8bd19c4db80d22f0a710c487bfe4acc1a15e9179 Author: George Baltz N3GB <Geo...@gm...> Date: Mon Sep 22 04:56:32 2025 -0400 Change pseudo-anonymous structure name to convention. diff --git a/include/hamlib/rig_state.h b/include/hamlib/rig_state.h index 99a9396ea..626807489 100644 --- a/include/hamlib/rig_state.h +++ b/include/hamlib/rig_state.h @@ -46,7 +46,7 @@ __BEGIN_DECLS * * Structures pointed to by rig_state and defined elsewhere */ -struct fifo_rig; /* Defined in src/fifo.h */ +struct FIFO_RIG_s; /* Defined in src/fifo.h */ /** * \brief Rig state containing live data and customized fields. @@ -230,7 +230,7 @@ struct rig_state { int spectrum_attenuator[HAMLIB_MAXDBLSTSIZ]; /*!< Spectrum attenuator list in dB, 0 terminated */ volatile int morse_data_handler_thread_run; /*!< Morse data handler thread flag. */ void *morse_data_handler_priv_data; /*!< Morse data handler private structure. */ - struct fifo_rig *fifo_morse; /*!< FIFO queue for Morse Code transmission. */ + struct FIFO_RIG_s *fifo_morse; /*!< FIFO queue for Morse Code transmission. */ int doppler; /*!< True if doppler changing detected */ char *multicast_data_addr; /*!< Multicast data UDP address for publishing rig data and state */ int multicast_data_port; /*!< Multicast data UDP port for publishing rig data and state */ diff --git a/src/fifo.h b/src/fifo.h index c60d55ced..111dc46c7 100644 --- a/src/fifo.h +++ b/src/fifo.h @@ -31,7 +31,7 @@ __BEGIN_DECLS // FIFO currently used for send_morse queue #define HAMLIB_FIFO_SIZE 1024 -typedef struct fifo_rig +typedef struct FIFO_RIG_s { char data[HAMLIB_FIFO_SIZE]; int head; commit 00020e6d9d1c7c17544fb3ce8f9ec64ae8ad0be4 Author: George Baltz N3GB <Geo...@gm...> Date: Fri Sep 19 17:06:05 2025 -0400 Add 'hl_' prefix to names of push(), pop() and peek() to avoid conflict with app code. Add header to fifo.c Drop unused structure member in rig.c diff --git a/src/fifo.c b/src/fifo.c index 19080e217..b7da0637c 100644 --- a/src/fifo.c +++ b/src/fifo.c @@ -1,3 +1,25 @@ +/* + * Hamlib Interface - FIFO routines + * Copyright (c) 2023-2025 by the Hamlib group + * + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ + #include "hamlib/config.h" #include <stdio.h> @@ -23,7 +45,7 @@ void resetFIFO(FIFO_RIG *fifo) // returns RIG_OK if added // return -RIG error if overflow -int push(FIFO_RIG *fifo, const char *msg) +int hl_push(FIFO_RIG *fifo, const char *msg) { pthread_mutex_lock(&fifo->mutex); int len = strlen(msg); @@ -59,7 +81,7 @@ int push(FIFO_RIG *fifo, const char *msg) return RIG_OK; } -int peek(FIFO_RIG *fifo) +int hl_peek(FIFO_RIG *fifo) { if (fifo == NULL) { return -1; } @@ -87,7 +109,7 @@ int peek(FIFO_RIG *fifo) return c; } -int pop(FIFO_RIG *fifo) +int hl_pop(FIFO_RIG *fifo) { if (fifo->tail == fifo->head) { return -1; } @@ -118,12 +140,12 @@ int main() const char *str = "Hello, World!\n"; // Pushing the string onto the FIFO - push(&fifo, str); + hl_push(&fifo, str); // Popping and printing one character at a time int c; - while ((c = pop(&fifo)) != -1) + while ((c = hl_pop(&fifo)) != -1) { printf("%c", c); } diff --git a/src/fifo.h b/src/fifo.h index 888a77218..c60d55ced 100644 --- a/src/fifo.h +++ b/src/fifo.h @@ -43,9 +43,9 @@ typedef struct fifo_rig /* Function prototypes */ void initFIFO(FIFO_RIG *fifo); void resetFIFO(FIFO_RIG *fifo); -int push(FIFO_RIG *fifo, const char *msg); -int pop(FIFO_RIG *fifo); -int peek(FIFO_RIG *fifo); +int hl_push(FIFO_RIG *fifo, const char *msg); +int hl_pop(FIFO_RIG *fifo); +int hl_peek(FIFO_RIG *fifo); __END_DECLS diff --git a/src/rig.c b/src/rig.c index 684a023f3..a390db1d1 100644 --- a/src/rig.c +++ b/src/rig.c @@ -309,7 +309,6 @@ typedef struct morse_data_handler_priv_data_s { pthread_t thread_id; morse_data_handler_args args; - volatile FIFO_RIG fifo_morse; int keyspd; } morse_data_handler_priv_data; @@ -7532,7 +7531,7 @@ int HAMLIB_API rig_send_morse(RIG *rig, vfo_t vfo, const char *msg) retcode = caps->send_morse(rig, vfo, msg); LOCK(0); #else - retcode = push(rs->fifo_morse, msg); + retcode = hl_push(rs->fifo_morse, msg); #endif RETURNFUNC(retcode); } @@ -8614,7 +8613,7 @@ static int morse_data_handler_stop(RIG *rig) hl_usleep(100 * 1000); //HAMLIB_TRACE; - while (peek(rs->fifo_morse) >= 0) + while (hl_peek(rs->fifo_morse) >= 0) { HAMLIB_TRACE; rig_debug(RIG_DEBUG_TRACE, "%s: waiting for fifo queue to flush\n", __func__); @@ -8771,21 +8770,21 @@ static void *morse_data_handler(void *arg) c = calloc(1, qsize + 1); - while (rs->morse_data_handler_thread_run || (peek(rs->fifo_morse) >= 0)) + while (rs->morse_data_handler_thread_run || (hl_peek(rs->fifo_morse) >= 0)) { int n = 0; memset(c, 0, qsize); for (n = 0; n < qsize; n++) { - int d = peek(rs->fifo_morse); + int d = hl_peek(rs->fifo_morse); if (d < 0) { break; } - d = pop(rs->fifo_morse); + d = hl_pop(rs->fifo_morse); c[n] = (char) d; } commit 22834737075ddbb0a7a36e179a58a8d1439415cf Author: George Baltz N3GB <Geo...@gm...> Date: Thu Sep 18 22:19:00 2025 -0400 Move FIFO_RIG from hamlib/rig.h to fifo.h where it belongs. Add header to fifo.h Update structure pointer in rig_state diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index ec6400b19..bc1e8e73f 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -169,19 +169,6 @@ __BEGIN_DECLS -// FIFO currently used for send_morse queue -#define HAMLIB_FIFO_SIZE 1024 - -typedef struct -{ - char data[HAMLIB_FIFO_SIZE]; - int head; - int tail; - int flush; // flush flag for stop_morse - pthread_mutex_t mutex; -} FIFO_RIG; - - /** * \brief size of cookie request buffer * Minimum size of cookie buffer to pass to rig_cookie diff --git a/include/hamlib/rig_state.h b/include/hamlib/rig_state.h index 5d32089d7..99a9396ea 100644 --- a/include/hamlib/rig_state.h +++ b/include/hamlib/rig_state.h @@ -42,6 +42,12 @@ __BEGIN_DECLS * This file contains the live data structure of the rig (radio). */ +/* Forward declarations + * + * Structures pointed to by rig_state and defined elsewhere + */ +struct fifo_rig; /* Defined in src/fifo.h */ + /** * \brief Rig state containing live data and customized fields. * @@ -222,9 +228,9 @@ struct rig_state { freq_t spectrum_spans[HAMLIB_MAX_SPECTRUM_SPANS]; /*!< Supported spectrum scope frequency spans in Hz in center mode. Last entry must be 0. */ struct rig_spectrum_avg_mode spectrum_avg_modes[HAMLIB_MAX_SPECTRUM_AVG_MODES]; /*!< Supported spectrum scope averaging modes. Last entry must have NULL name. */ int spectrum_attenuator[HAMLIB_MAXDBLSTSIZ]; /*!< Spectrum attenuator list in dB, 0 terminated */ - volatile int morse_data_handler_thread_run; /*!< Morse data handler thread flag. */ - void *morse_data_handler_priv_data; /*!< Morse data handler private structure. */ - FIFO_RIG *fifo_morse; /*!< FIFO queue for Morse Code transmission. */ + volatile int morse_data_handler_thread_run; /*!< Morse data handler thread flag. */ + void *morse_data_handler_priv_data; /*!< Morse data handler private structure. */ + struct fifo_rig *fifo_morse; /*!< FIFO queue for Morse Code transmission. */ int doppler; /*!< True if doppler changing detected */ char *multicast_data_addr; /*!< Multicast data UDP address for publishing rig data and state */ int multicast_data_port; /*!< Multicast data UDP port for publishing rig data and state */ diff --git a/src/fifo.h b/src/fifo.h index 2855a00a6..888a77218 100644 --- a/src/fifo.h +++ b/src/fifo.h @@ -1,5 +1,52 @@ +/* + * Hamlib Interface - FIFO support + * Copyright (c) 2023-2025 by the Hamlib group + * + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ + +#ifndef _HL_FIFO_H +#define _HL_FIFO_H + +//#include "hamlib/rig.h" +//#include <pthread.h> + +__BEGIN_DECLS + +// FIFO currently used for send_morse queue +#define HAMLIB_FIFO_SIZE 1024 + +typedef struct fifo_rig +{ + char data[HAMLIB_FIFO_SIZE]; + int head; + int tail; + int flush; // flush flag for stop_morse + pthread_mutex_t mutex; +} FIFO_RIG; + +/* Function prototypes */ void initFIFO(FIFO_RIG *fifo); void resetFIFO(FIFO_RIG *fifo); int push(FIFO_RIG *fifo, const char *msg); int pop(FIFO_RIG *fifo); int peek(FIFO_RIG *fifo); + +__END_DECLS + +#endif /* _HL_FIFO_H */ ----------------------------------------------------------------------- Summary of changes: bindings/python/test_Hamlib_class.py | 1 - include/hamlib/rig.h | 13 --------- include/hamlib/rig_state.h | 12 ++++++-- src/fifo.c | 32 ++++++++++++++++++---- src/fifo.h | 53 ++++++++++++++++++++++++++++++++++-- src/misc.c | 15 ++++++++++ src/rig.c | 17 +++++++----- 7 files changed, 111 insertions(+), 32 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-10-06 16:25:55
|
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 54a5097c7e44148dc5c02ad6194744c60fbd86f4 (commit) from 11be2d6549a3c5f31ebbc0ccf5c586de4df4a833 (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 54a5097c7e44148dc5c02ad6194744c60fbd86f4 Author: David Balharrie <da...@ba...> Date: Wed Oct 1 19:19:34 2025 +0100 Use rot->caps min_az, max_az, min_el, max_el instead of numbers. Fix not being able to move beyond 180 using move CW command. diff --git a/rigs/dummy/rot_dummy.c b/rigs/dummy/rot_dummy.c index 74412c9d2..143a30f9b 100644 --- a/rigs/dummy/rot_dummy.c +++ b/rigs/dummy/rot_dummy.c @@ -427,32 +427,32 @@ static int dummy_rot_move(ROT *rot, int direction, int speed) switch (direction) { case ROT_MOVE_UP: - return dummy_rot_set_position(rot, priv->target_az, 90); + return dummy_rot_set_position(rot, priv->target_az, rot->caps->max_el); case ROT_MOVE_DOWN: - return dummy_rot_set_position(rot, priv->target_az, 0); + return dummy_rot_set_position(rot, priv->target_az, rot->caps->min_el); case ROT_MOVE_CCW: - return dummy_rot_set_position(rot, -180, priv->target_el); + return dummy_rot_set_position(rot, rot->caps->min_az, priv->target_el); case ROT_MOVE_CW: - return dummy_rot_set_position(rot, 180, priv->target_el); + return dummy_rot_set_position(rot, rot->caps->max_az, priv->target_el); case ROT_MOVE_UP_LEFT: - dummy_rot_set_position(rot, priv->target_az, 90); - return dummy_rot_set_position(rot, -180, priv->target_el); + dummy_rot_set_position(rot, priv->target_az, rot->caps->max_el); + return dummy_rot_set_position(rot, rot->caps->min_az, priv->target_el); case ROT_MOVE_UP_RIGHT: - dummy_rot_set_position(rot, priv->target_az, 90); - return dummy_rot_set_position(rot, 180, priv->target_el); + dummy_rot_set_position(rot, priv->target_az, rot->caps->max_el); + return dummy_rot_set_position(rot, rot->caps->max_az, priv->target_el); case ROT_MOVE_DOWN_LEFT: - dummy_rot_set_position(rot, priv->target_az, 0); - return dummy_rot_set_position(rot, -180, priv->target_el); + dummy_rot_set_position(rot, priv->target_az, rot->caps->min_el); + return dummy_rot_set_position(rot, rot->caps->min_az, priv->target_el); case ROT_MOVE_DOWN_RIGHT: - dummy_rot_set_position(rot, priv->target_az, 0); - return dummy_rot_set_position(rot, 180, priv->target_el); + dummy_rot_set_position(rot, priv->target_az, rot->caps->min_el); + return dummy_rot_set_position(rot, rot->caps->max_az, priv->target_el); default: return -RIG_EINVAL; ----------------------------------------------------------------------- Summary of changes: rigs/dummy/rot_dummy.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-10-06 16:13:08
|
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 11be2d6549a3c5f31ebbc0ccf5c586de4df4a833 (commit) from d09f6b5dab19b6fc851b884dbcf8e637529d0a90 (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 11be2d6549a3c5f31ebbc0ccf5c586de4df4a833 Author: telewizoor <not...@gi...> Date: Wed Oct 1 09:44:37 2025 -0700 Support tuning FT-450 notch filter Per GitHub issue #1929, enable use of `L NOTCHF xxxx` command for the Yaesu FT-450D. diff --git a/rigs/yaesu/ft450.h b/rigs/yaesu/ft450.h index d77df8a20..6c25d12a5 100644 --- a/rigs/yaesu/ft450.h +++ b/rigs/yaesu/ft450.h @@ -64,7 +64,7 @@ RIG_LEVEL_KEYSPD|RIG_LEVEL_AF|RIG_LEVEL_AGC|\ RIG_LEVEL_METER|RIG_LEVEL_BKINDL|RIG_LEVEL_SQL|\ RIG_LEVEL_VOXGAIN|RIG_LEVEL_VOXDELAY|\ - RIG_LEVEL_BAND_SELECT) + RIG_LEVEL_BAND_SELECT|RIG_LEVEL_NOTCHF) #define FT450_FUNCS (RIG_FUNC_TONE|RIG_FUNC_TSQL|RIG_FUNC_LOCK|\ RIG_FUNC_MON|RIG_FUNC_NB|RIG_FUNC_NR|RIG_FUNC_VOX|\ ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/ft450.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-09-27 18:29: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 d09f6b5dab19b6fc851b884dbcf8e637529d0a90 (commit) via 0d122f6b1a56a5ed9424dd11ac335cd37093f78f (commit) via 34fa8d0e2fc9eeb21e1d4f86df65dfc7c1c135e4 (commit) via 744fe5a066e3656907ea7f59d08e9ec4545cc993 (commit) from dbea10e65524a41e73017f64ceb88f6b3e6bd59a (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 d09f6b5dab19b6fc851b884dbcf8e637529d0a90 Merge: dbea10e65 0d122f6b1 Author: Nate Bargmann <n0...@n0...> Date: Sat Sep 27 13:23:11 2025 -0500 Merge GitHub PR #1926 commit 0d122f6b1a56a5ed9424dd11ac335cd37093f78f Author: Nate Bargmann <n0...@n0...> Date: Sat Sep 27 11:16:32 2025 -0500 Restore information message from diff Make sure tab preceeds all indented lines. diff --git a/src/Makefile.am b/src/Makefile.am index be81f2588..766fd95b9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -7,12 +7,12 @@ DISTCLEANFILES = hamlibdatetime.h RIGSRC = hamlibdatetime.h rig.c serial.c serial.h misc.c misc.h register.c register.h event.c \ event.h cal.c cal.h conf.c tones.c tones.h rotator.c locator.c rot_reg.c \ rot_conf.c rot_conf.h rot_settings.c rot_ext.c iofunc.c iofunc.h ext.c \ - mem.c settings.c parallel.c parallel.h usb_port.c usb_port.h debug.c \ - network.c network.h cm108.c cm108.h gpio.c gpio.h idx_builtin.h token.h \ - par_nt.h microham.c microham.h amplifier.c amp_reg.c amp_conf.c \ - amp_conf.h amp_settings.c extamp.c sleep.c sleep.h sprintflst.c \ - sprintflst.h cache.c cache.h snapshot_data.c snapshot_data.h fifo.c fifo.h \ - serial_cfg_params.h mutex.h + mem.c settings.c parallel.c parallel.h usb_port.c usb_port.h debug.c \ + network.c network.h cm108.c cm108.h gpio.c gpio.h idx_builtin.h token.h \ + par_nt.h microham.c microham.h amplifier.c amp_reg.c amp_conf.c \ + amp_conf.h amp_settings.c extamp.c sleep.c sleep.h sprintflst.c \ + sprintflst.h cache.c cache.h snapshot_data.c snapshot_data.h fifo.c fifo.h \ + serial_cfg_params.h mutex.h if VERSIONDLL RIGSRC += \ @@ -43,7 +43,7 @@ hamlibdatetime.h: FORCE ${AM_V_at}if test -x $(top_srcdir)/.git ; then \ echo "/* This date time is from the last non-merge commit to Hamlib. */" > $(builddir)/$(@F).tmp ;\ echo "#define HAMLIBDATETIME "\"$$(TZ=UTC git --git-dir=$(top_srcdir)/.git log --no-merges --date='format-local:%Y-%m-%dT%H:%M:%SZ SHA=' --format='%cd' -n 1)$$(git --git-dir=$(top_srcdir)/.git log --no-merges -n 1 --format='%h')\" >> $(builddir)/$(@F).tmp ;\ - if ! diff -qN $(builddir)/$(@F).tmp $(builddir)/$(@F)> /dev/null ; then { echo "Generating SCS header \"$(builddir)/$(@F)\"" ; mv -f $(builddir)/$(@F).tmp $(builddir)/$(@F) ; } fi ;\ + if ! diff -qN $(builddir)/$(@F).tmp $(builddir)/$(@F) ; then { echo "Generating SCS header \"$(builddir)/$(@F)\"" ; mv -f $(builddir)/$(@F).tmp $(builddir)/$(@F) ; } fi ;\ rm -f $(builddir)/$(@F).tmp ;\ touch -c $(top_srcdir)/src/version_dll.rc ;\ else \ commit 34fa8d0e2fc9eeb21e1d4f86df65dfc7c1c135e4 Author: Nate Bargmann <n0...@n0...> Date: Fri Sep 26 18:02:02 2025 -0500 Refactor hamlibdatetime.h target Re: GitHub Issue #1895 Thanks to inspiration from Jan Engelhardt <ej...@in...> via the GNU automake mailing list on Thu, 25 Sep 2025 20:40:21 +0200 (CEST): https://lists.gnu.org/archive/html/automake/2025-09/msg00013.html The 'diff' command has been wrapped inside an 'if' conditional to hopefully hide its return value from FreeBSD make. Also make a couple other small changes. diff --git a/src/Makefile.am b/src/Makefile.am index 122212c87..be81f2588 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -40,10 +40,10 @@ $(libhamlib_la_DEPENDENCIES): # directory before the source directory for the hamlibdatetime.h # header. hamlibdatetime.h: FORCE - @if test -x $(top_srcdir)/.git ; then \ + ${AM_V_at}if test -x $(top_srcdir)/.git ; then \ echo "/* This date time is from the last non-merge commit to Hamlib. */" > $(builddir)/$(@F).tmp ;\ - echo "#define HAMLIBDATETIME "\"$$(TZ=UTC git --git-dir=$(top_srcdir)/.git log --no-merges --date='format-local:%Y-%m-%dT%H:%M:%SZ SHA=' --format='%cd' -n 1)$$(git --git-dir=$(top_srcdir)/.git log --no-merges -n 1 | head -n 1 | cut -c8-13)\" >> $(builddir)/$(@F).tmp ;\ - diff -qN $(builddir)/$(@F).tmp $(builddir)/$(@F) ; test $$? -eq 0 || { echo "Generating SCS header \"$(builddir)/$(@F)\"" ; mv -f $(builddir)/$(@F).tmp $(builddir)/$(@F) ; } ;\ + echo "#define HAMLIBDATETIME "\"$$(TZ=UTC git --git-dir=$(top_srcdir)/.git log --no-merges --date='format-local:%Y-%m-%dT%H:%M:%SZ SHA=' --format='%cd' -n 1)$$(git --git-dir=$(top_srcdir)/.git log --no-merges -n 1 --format='%h')\" >> $(builddir)/$(@F).tmp ;\ + if ! diff -qN $(builddir)/$(@F).tmp $(builddir)/$(@F)> /dev/null ; then { echo "Generating SCS header \"$(builddir)/$(@F)\"" ; mv -f $(builddir)/$(@F).tmp $(builddir)/$(@F) ; } fi ;\ rm -f $(builddir)/$(@F).tmp ;\ touch -c $(top_srcdir)/src/version_dll.rc ;\ else \ commit 744fe5a066e3656907ea7f59d08e9ec4545cc993 Author: Jan Engelhardt <ej...@in...> Date: Wed Sep 24 20:47:46 2025 +0200 Remove redundant path from BUILT_SOURCES Re: GitHub Issue #1895 In response to a query to the automake mailing list, this reply was received: On Wednesday 2025-09-24 19:05, Nate Bargmann wrote: >make[1]: don't know how to make ./hamlibdatetime.h. Stop Something wanted to make "./hamlibdatetime.h", but you only provide a rule for "hamlibdatetime.h": >hamlibdatetime.h: FORCE > @if test -x $(top_srcdir)/.git ; then \ > echo "/* This date time is from the last non-merge commit to Hamlib. */" > $(builddir)/$(@F).tmp ;\ > echo "#define HAMLIBDATETIME "\"$$(TZ=UTC git --git-dir=$(top_srcdir)/.git log --no-merges +--date='format-local:%Y-%m-%dT%H:%M:%SZ SHA=' --format='%cd' -n 1)$$(git --git-dir=$(top_srcdir)/.git log --no-merges -n 1 | head +-n 1 | cut -c8-13)\" >> $(builddir)/$(@F).tmp ;\ The distinction is important. >BUILT_SOURCES = $(builddir)/hamlibdatetime.h All targets are already relative to ${builddir}, so explicitly mentioning ${builddir} is wrong for targets, and redundant in the recipe. ---------------------- Removing "$(builddir)/" allows FreeBSD make to enter the rule. GNU make wasn't bothered by the prepending of the path when comparing to the Makefile target. diff --git a/src/Makefile.am b/src/Makefile.am index 8714ba81e..122212c87 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,6 +1,6 @@ AM_CFLAGS += $(LIBUSB_CFLAGS) -BUILT_SOURCES = $(builddir)/hamlibdatetime.h +BUILT_SOURCES = hamlibdatetime.h DISTCLEANFILES = hamlibdatetime.h ----------------------------------------------------------------------- Summary of changes: src/Makefile.am | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-09-27 13:06:47
|
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 dbea10e65524a41e73017f64ceb88f6b3e6bd59a (commit) via 51969202efe78345a1df22c66e469f03dcab8e9b (commit) from 44eaded28388f4368b938acd5332c51e41b86ff9 (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 dbea10e65524a41e73017f64ceb88f6b3e6bd59a Merge: 44eaded28 51969202e Author: Nate Bargmann <n0...@n0...> Date: Sat Sep 27 07:40:00 2025 -0500 Merge GitHub PR #1924 commit 51969202efe78345a1df22c66e469f03dcab8e9b Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Thu Sep 25 23:01:56 2025 +0200 Fix command to put bandwidth control back to bandwidth knob Adds a missing *. Thanks to @peterdulowsky. Fixes issue #1923. diff --git a/rigs/tentec/orion.c b/rigs/tentec/orion.c index eb635863c..3eb417ded 100644 --- a/rigs/tentec/orion.c +++ b/rigs/tentec/orion.c @@ -743,7 +743,7 @@ int tt565_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) if (rig->caps->rig_model == RIG_MODEL_TT599) { // Additional R%CF0 puts bandwidth control back to bandwidth knob - SNPRINTF(mdbuf, sizeof(mdbuf), "*R%cM%c" EOM "*R%cF%d" EOM "R%cF0" EOM, + SNPRINTF(mdbuf, sizeof(mdbuf), "*R%cM%c" EOM "*R%cF%d" EOM "*R%cF0" EOM, ttreceiver, ttmode, ttreceiver, ----------------------------------------------------------------------- Summary of changes: rigs/tentec/orion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-09-27 12:39:36
|
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 44eaded28388f4368b938acd5332c51e41b86ff9 (commit) via 50fc454a0b6731ffa110a8031ecc777d78d0fcba (commit) from 1ecf72171490ddb493fefb9bce197b5d648783e3 (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 44eaded28388f4368b938acd5332c51e41b86ff9 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Thu Sep 25 00:13:08 2025 +0200 Fix Doxygen description diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 8ab47b8ff..ec6400b19 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -1437,8 +1437,8 @@ typedef uint64_t rmode_t; #define RIG_MODE_USBD2 CONSTANT_64BIT_FLAG (41) /*!< \c USB-D2 for some rigs */ #define RIG_MODE_USBD3 CONSTANT_64BIT_FLAG (42) /*!< \c USB-D3 for some rigs */ #define RIG_MODE_LSBD1 CONSTANT_64BIT_FLAG (43) /*!< \c LSB-D1 for some rigs */ -#define RIG_MODE_LSBD2 CONSTANT_64BIT_FLAG (44) /*!< \c LSB-D1 for some rigs */ -#define RIG_MODE_LSBD3 CONSTANT_64BIT_FLAG (45) /*!< \c LSB-D1 for some rigs */ +#define RIG_MODE_LSBD2 CONSTANT_64BIT_FLAG (44) /*!< \c LSB-D2 for some rigs */ +#define RIG_MODE_LSBD3 CONSTANT_64BIT_FLAG (45) /*!< \c LSB-D3 for some rigs */ #define RIG_MODE_WFMS CONSTANT_64BIT_FLAG (46) /*!< \c broadcast wide FM stereo for some rigs */ #define RIG_MODE_BIT47 CONSTANT_64BIT_FLAG (47) /*!< \c reserved for future expansion */ #define RIG_MODE_BIT48 CONSTANT_64BIT_FLAG (48) /*!< \c reserved for future expansion */ commit 50fc454a0b6731ffa110a8031ecc777d78d0fcba Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Wed Sep 24 20:35:44 2025 +0200 Remove duplicated define Fixes: ../include/hamlib/rotlist.h:237: Warning 322: Redundant redeclaration of identifier 'ROT_MODEL_RT21' ignored, diff --git a/include/hamlib/rotlist.h b/include/hamlib/rotlist.h index e50fdc46d..94e91e6ec 100644 --- a/include/hamlib/rotlist.h +++ b/include/hamlib/rotlist.h @@ -234,7 +234,6 @@ #define ROT_MODEL_ERC ROT_MAKE_MODEL(ROT_ROTOREZ, 4) #define ROT_MODEL_RT21 ROT_MAKE_MODEL(ROT_ROTOREZ, 5) #define ROT_MODEL_YRC1 ROT_MAKE_MODEL(ROT_ROTOREZ, 6) -#define ROT_MODEL_RT21 ROT_MAKE_MODEL(ROT_ROTOREZ, 5) /** The `SARTEK` family. */ ----------------------------------------------------------------------- Summary of changes: include/hamlib/rig.h | 4 ++-- include/hamlib/rotlist.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-09-23 18:11:14
|
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 1ecf72171490ddb493fefb9bce197b5d648783e3 (commit) from 584eddbb6ea7a21a1ddc2306c7773a5d98ca467b (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 1ecf72171490ddb493fefb9bce197b5d648783e3 Author: Nate Bargmann <n0...@n0...> Date: Tue Sep 23 12:49:58 2025 -0500 Update URL for daily snapshots Per a message received from SourceForge, the user Web space is being shut down around 10 Oct 2025. The message can be read from: https://sourceforge.net/p/hamlib/mailman/message/59235022/ diff --git a/README.betatester b/README.betatester index 3013cd83f..ee43cd6d7 100644 --- a/README.betatester +++ b/README.betatester @@ -52,7 +52,7 @@ Daily Git master branch snapshots: Download the latest Git master branch snapshot from: -http://n0nb.users.sourceforge.net +https://hamlib.sourceforge.net/snapshots/ You'll find a tarball with a name like hamlib-4.7~git-20250624-dc12b01ae.tar.gz, i.e. a check out made 24 Jun 2025 diff --git a/README.md b/README.md index bf90fa10d..e95214909 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ applications. The master repository is https://github.com/Hamlib/Hamlib The backup repository is https://sourceforge.net/projects/hamlib/ -Daily snapshots are available at https://n0nb.users.sourceforge.net/ +Daily snapshots are available at https://hamlib.sourceforge.net/snapshots/ Development happens on the GitHub master (often by merging feature branches) and each release has a release branch. diff --git a/doc/man7/hamlib-primer.7 b/doc/man7/hamlib-primer.7 index b8f671e34..d547e6dd3 100644 --- a/doc/man7/hamlib-primer.7 +++ b/doc/man7/hamlib-primer.7 @@ -104,7 +104,7 @@ is replace by a numeral for successive release candidates. .PP Daily snapshots of the development repository are available via the World Wide Web from -.UR http://n0nb.users.sourceforge.net/ +.UR https://hamlib.sourceforge.net/snapshots/ Hamlib Git daily snapshots .UE . . @@ -834,7 +834,7 @@ SourceForge.net file download service . .PP Daily development snapshots are available from the -.UR http://n0nb.users.sourceforge.net/ +.UR https://hamlib.sourceforge.net/snapshots/ daily snapshots page .UE . . ----------------------------------------------------------------------- Summary of changes: README.betatester | 2 +- README.md | 2 +- doc/man7/hamlib-primer.7 | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-09-23 13:35:36
|
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 584eddbb6ea7a21a1ddc2306c7773a5d98ca467b (commit) via 54bd989e72d035422d7bf7be0a6f6bff56d7fec7 (commit) via 8b9e271ce17de367378053cb88123ea72c975cba (commit) via 5f89ab7d569f077ee6384521ba8ee17357648054 (commit) from 1557d848ed6add017f0c5ad5a1efe276bb704e98 (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 584eddbb6ea7a21a1ddc2306c7773a5d98ca467b Merge: 1557d848e 54bd989e7 Author: Nate Bargmann <n0...@n0...> Date: Tue Sep 23 08:15:05 2025 -0500 Merge GitHub PR #1921 commit 54bd989e72d035422d7bf7be0a6f6bff56d7fec7 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Sep 7 08:39:43 2025 +0200 Add various get and set methods for amplifiers to the bindings Adds get_ext_level, has_get_level, has_set_level, set_ext_level, set_level. Brings function coverage of amplifier.c above 90%. diff --git a/bindings/amplifier.swg b/bindings/amplifier.swg index 136e9d5c1..c8ae0167c 100644 --- a/bindings/amplifier.swg +++ b/bindings/amplifier.swg @@ -99,9 +99,17 @@ typedef struct Amp { AMPMETHOD1(token_lookup, const_char_string) /* conf */ - /* set functions */ + /* get and set functions */ + AMP_GENERATE_HAS_GET_SET(level) + +#ifdef SWIGPYTHON + AMP_GET_VALUE_T(ext_level) +#endif + AMPMETHOD1(set_freq, freq_t) AMPMETHOD1(set_powerstat, powerstat_t) + AMPMETHOD2(set_level, setting_t, value_t) + AMPMETHOD2(set_ext_level, hamlib_token_t, value_t) void set_conf(const char *name, const char *val) { hamlib_token_t tok = amp_token_lookup(self->amp, name); diff --git a/bindings/macros.swg b/bindings/macros.swg index 97a69d994..614292698 100644 --- a/bindings/macros.swg +++ b/bindings/macros.swg @@ -27,6 +27,21 @@ Common SWIG macros } %enddef +/* + * Macro AMP_GENERATE_HAS_GET_SET + * + * Creates two methods amp_has_get_*() and amp_has_set_*() + * + * setting: + * the last part of the function name (eg. func, level, ...) + * + * example: AMP_GENERATE_HAS_GET_SET(level) creates the bindings for + * amp_has_get_level() and amp_has_set_level() + */ +%define AMP_GENERATE_HAS_GET_SET(setting) + GENERATE_HAS_GET_SET(amp, setting) +%enddef + /* * Macro ROT_GENERATE_HAS_GET_SET * @@ -107,6 +122,18 @@ PyObject * ##function_name(hamlib_token_t token) } %enddef +/* +* Macro AMP_GET_VALUE_T +* +* function_name: +* the name that will be seen in the bindings when appended to get_ +* and that creates a valid Hamlib function when appended to amp_get_ +* eg. AMP_GET_VALUE_T(level) creates Rot.get_level() that calls amp_get_level() +*/ +%define AMP_GET_VALUE_T(function_name) + GET_VALUE_T(amp_, get_ ##function_name, self->amp, AMP_) +%enddef + /* * Macro ROT_GET_LONG * diff --git a/bindings/python/test_Hamlib_Amp_class.py b/bindings/python/test_Hamlib_Amp_class.py index df2749b31..c90358fe9 100755 --- a/bindings/python/test_Hamlib_Amp_class.py +++ b/bindings/python/test_Hamlib_Amp_class.py @@ -18,14 +18,19 @@ class TestClass: """Check that nothing was added or removed""" expected_callables = ['close', 'get_conf', +'get_ext_level', 'get_freq', 'get_info', 'get_level', 'get_powerstat', +'has_get_level', +'has_set_level', 'open', 'reset', 'set_conf', +'set_ext_level', 'set_freq', +'set_level', 'set_powerstat', 'token_lookup'] assert expected_callables == self.actual_callables diff --git a/bindings/python/test_amp.py b/bindings/python/test_amp.py index f5eeef872..106fe4c2d 100755 --- a/bindings/python/test_amp.py +++ b/bindings/python/test_amp.py @@ -62,6 +62,9 @@ class TestClass: assert amp.set_freq(0) is None assert amp.set_freq(123.45) is None assert amp.get_freq() == 123.45 + + assert amp.has_set_level(Hamlib.AMP_LEVEL_SWR) == Hamlib.AMP_LEVEL_NONE + assert amp.has_get_level(Hamlib.AMP_LEVEL_SWR) == Hamlib.AMP_LEVEL_SWR assert amp.get_level(Hamlib.AMP_LEVEL_NONE) is None level = amp.get_level(Hamlib.AMP_LEVEL_SWR) assert isinstance(level, float) @@ -71,6 +74,13 @@ class TestClass: assert isinstance(level, str) level = amp.get_level(123456) assert level is None + value = Hamlib.value_t() + value.i = 2 + assert amp.set_level(Hamlib.AMP_LEVEL_SWR, value) is None + assert amp.set_ext_level(Hamlib.AMP_LEVEL_SWR, value) is None + level = amp.get_ext_level(Hamlib.AMP_LEVEL_SWR) + assert level is None + assert amp.set_powerstat(Hamlib.RIG_POWER_ON) is None assert amp.get_powerstat() == Hamlib.RIG_POWER_ON commit 8b9e271ce17de367378053cb88123ea72c975cba Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Sep 6 23:06:16 2025 +0200 Add various get and set methods for rotators to the bindings Adds has_get_func, has_get_level, has_get_parm, has_set_func, has_set_level, has_set_parm. Brings tests coverage of rot_settings.c to 100%. diff --git a/bindings/macros.swg b/bindings/macros.swg index b149cf4f5..97a69d994 100644 --- a/bindings/macros.swg +++ b/bindings/macros.swg @@ -27,6 +27,21 @@ Common SWIG macros } %enddef +/* + * Macro ROT_GENERATE_HAS_GET_SET + * + * Creates two methods rot_has_get_*() and rot_has_set_*() + * + * setting: + * the last part of the function name (eg. func, level, ...) + * + * example: ROT_GENERATE_HAS_GET_SET(func) creates the bindings for + * rot_has_get_func() and rot_has_set_func() + */ +%define ROT_GENERATE_HAS_GET_SET(setting) + GENERATE_HAS_GET_SET(rot, setting) +%enddef + /* * Macro GET_TOKEN * diff --git a/bindings/python/test_Hamlib_Rot_class.py b/bindings/python/test_Hamlib_Rot_class.py index 731f5b069..a69508cbb 100755 --- a/bindings/python/test_Hamlib_Rot_class.py +++ b/bindings/python/test_Hamlib_Rot_class.py @@ -26,6 +26,12 @@ class TestClass: 'get_level', 'get_parm', 'get_position', +'has_get_func', +'has_get_level', +'has_get_parm', +'has_set_func', +'has_set_level', +'has_set_parm', 'move', 'open', 'park', diff --git a/bindings/python/test_rot.py b/bindings/python/test_rot.py index 3e0b5c292..a5e94659b 100755 --- a/bindings/python/test_rot.py +++ b/bindings/python/test_rot.py @@ -100,6 +100,8 @@ class TestClass: assert rot.get_ext_parm(self.TOK_EP_ROT_MAGICPARM) == 7 # Dummy rotator doesn't support functions + assert rot.has_set_func(Hamlib.ROT_FUNC_NONE) == Hamlib.ROT_FUNC_NONE + assert rot.has_get_func(Hamlib.ROT_FUNC_NONE) == Hamlib.ROT_FUNC_NONE status = 0 assert rot.set_func(Hamlib.ROT_FUNC_NONE, status) is None assert rot.get_func(Hamlib.ROT_FUNC_NONE) is None diff --git a/bindings/rotator.swg b/bindings/rotator.swg index 8691e4730..22c911d7a 100644 --- a/bindings/rotator.swg +++ b/bindings/rotator.swg @@ -120,6 +120,10 @@ typedef struct Rot { ROTMETHOD2(set_conf, hamlib_token_t, const_char_string) + ROT_GENERATE_HAS_GET_SET(func) + ROT_GENERATE_HAS_GET_SET(level) + ROT_GENERATE_HAS_GET_SET(parm) + #ifdef SWIGPYTHON ROT_GET_LONG(func) ROT_GET_LONG(ext_func) commit 5f89ab7d569f077ee6384521ba8ee17357648054 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Sep 7 08:28:04 2025 +0200 Add a SWIG macro for "has_get" and "has_set" bindings diff --git a/bindings/macros.swg b/bindings/macros.swg index 29396a47a..b149cf4f5 100644 --- a/bindings/macros.swg +++ b/bindings/macros.swg @@ -2,6 +2,31 @@ Common SWIG macros */ +/* + * Macro GENERATE_HAS_GET_SET + * + * Creates two methods *_has_get_*() and *_has_set_*() + * + * function_prefix: + * the first part of the function name (eg. one of: amp_ rig_ rot_) + * this is also the name of the member of the "self" object + * + * setting: + * the last part of the function name (eg. func, level, ...) + * + * example: GENERATE_HAS_GET_SET(rig, func) creates the bindings for + * rig_has_get_func() and rig_has_set_func() + */ +%define GENERATE_HAS_GET_SET(function_prefix, setting) + setting_t has_get_##setting##(setting_t setting) { + return function_prefix##_has_get_##setting##($self->##function_prefix##, setting); + } + + setting_t has_set_##setting##(setting_t setting) { + return function_prefix##_has_set_##setting##($self->##function_prefix##, setting); + } +%enddef + /* * Macro GET_TOKEN * ----------------------------------------------------------------------- Summary of changes: bindings/amplifier.swg | 10 ++++- bindings/macros.swg | 67 ++++++++++++++++++++++++++++++++ bindings/python/test_Hamlib_Amp_class.py | 5 +++ bindings/python/test_Hamlib_Rot_class.py | 6 +++ bindings/python/test_amp.py | 10 +++++ bindings/python/test_rot.py | 2 + bindings/rotator.swg | 4 ++ 7 files changed, 103 insertions(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-09-23 13:14:59
|
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 1557d848ed6add017f0c5ad5a1efe276bb704e98 (commit) via 8d28c579f31ba35acd768b7aa4e46a6d18be2e18 (commit) via b48ff588956b2515bf41b1e2997f6a16157e607b (commit) via 0a30ba6dc70162a76cfa09c20dbdc545e2e58dda (commit) via 194f9d3a626fcbb1be5346f846f671d48cb42216 (commit) from c195d3dd4c66d959119d50a07801836fd6b558da (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 1557d848ed6add017f0c5ad5a1efe276bb704e98 Merge: c195d3dd4 8d28c579f Author: Nate Bargmann <n0...@n0...> Date: Mon Sep 22 21:32:40 2025 -0500 Merge GitHub PR #1920 commit 8d28c579f31ba35acd768b7aa4e46a6d18be2e18 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Sep 21 14:09:01 2025 +0200 Use *_data_pointer() to get pointer to "state" Increases function coverage of functions and makes the bindings more future-proof. diff --git a/bindings/amplifier.swg b/bindings/amplifier.swg index 136e9d5c1..8d34f49cd 100644 --- a/bindings/amplifier.swg +++ b/bindings/amplifier.swg @@ -72,7 +72,7 @@ typedef struct Amp { } /* install shortcuts */ r->caps = r->amp->caps; - r->state = &r->amp->state; + r->state = amp_data_pointer(r->amp, RIG_PTRX_AMPSTATE); r->do_exception = 0; /* default is disabled */ r->error_status = RIG_OK; return r; diff --git a/bindings/rig.swg b/bindings/rig.swg index 285ab8359..a0327243b 100644 --- a/bindings/rig.swg +++ b/bindings/rig.swg @@ -485,7 +485,7 @@ int *rig_spectrum_cb_python(RIG *rig, struct rig_spectrum_line *rig_spectrum_lin #endif /* install shortcuts */ r->caps = r->rig->caps; - r->state = &r->rig->state; + r->state = rig_data_pointer(r->rig, RIG_PTRX_STATE); r->do_exception = 0; /* default is disabled */ r->error_status = RIG_OK; diff --git a/bindings/rotator.swg b/bindings/rotator.swg index 8691e4730..7db389cb9 100644 --- a/bindings/rotator.swg +++ b/bindings/rotator.swg @@ -68,7 +68,7 @@ typedef struct Rot { } /* install shortcuts */ r->caps = r->rot->caps; - r->state = &r->rot->state; + r->state = &r->rot->state; rot_data_pointer(r->rot, RIG_PTRX_ROTSTATE); r->do_exception = 0; /* default is disabled */ r->error_status = RIG_OK; return r; commit b48ff588956b2515bf41b1e2997f6a16157e607b Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Sep 6 21:19:25 2025 +0200 Add rig_has_get_func() and rig_has_get_parm() to the bindings Brings tests coverage of settings.c above 80%. diff --git a/bindings/python/test_Hamlib_Rig_class.py b/bindings/python/test_Hamlib_Rig_class.py index f148f6918..d4268f2fa 100755 --- a/bindings/python/test_Hamlib_Rig_class.py +++ b/bindings/python/test_Hamlib_Rig_class.py @@ -53,7 +53,9 @@ class TestClass: 'get_vfo', 'get_vfo_info', 'get_xit', +'has_get_func', 'has_get_level', +'has_get_parm', 'has_scan', 'has_set_func', 'has_set_parm', diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py index 10b7a3187..91986d615 100755 --- a/bindings/python/test_rig.py +++ b/bindings/python/test_rig.py @@ -262,8 +262,8 @@ class TestClass: assert rig.get_ext_level(0) is None assert rig.get_ext_level(0, 0) is None assert rig.get_ext_parm(0) is None - assert isinstance(rig.get_func(0), int) - assert isinstance(rig.get_func(0, 0), int) + assert isinstance(rig.get_func(Hamlib.RIG_FUNC_BIT63), int) + assert isinstance(rig.get_func(Hamlib.RIG_FUNC_BIT63, 0), int) assert rig.get_info() is None assert rig.get_level(0) is None assert isinstance(rig.get_level_f(0), float) @@ -291,9 +291,9 @@ class TestClass: assert isinstance(rig.get_ts(Hamlib.RIG_VFO_CURR), int) assert len(rig.get_vfo_info()) == 5 assert len(rig.get_vfo_info(Hamlib.RIG_VFO_CURR)) == 5 - # assert rig_has_get_func(0) FIXME not defined + assert rig.has_get_func(Hamlib.RIG_FUNC_BIT63) is None assert rig.has_get_level(0) is None # FIXME should return setting_t - # assert rig_has_get_parm(0) FIXME not defined + assert rig.has_get_parm(0) is None # FIXME should return setting_t assert rig.has_scan(0) is None # FIXME should return scan_t assert rig.has_set_func(0) is None # FIXME should return setting_t # assert rig_has_set_level(0) FIXME not defined @@ -329,7 +329,7 @@ class TestClass: assert rig.set_ext_level(level, value, Hamlib.RIG_VFO_CURR) is None value = Hamlib.value_t() assert rig.set_ext_parm(0, value) is None - assert rig.set_func(0, 0, 0) is None + assert rig.set_func(Hamlib.RIG_FUNC_BIT63, 0, 0) is None assert rig.set_level(0, 0, 0) is None assert rig.set_mem(0, 0) is None assert rig.set_mode(0) is None diff --git a/bindings/rig.swg b/bindings/rig.swg index 9261058f8..285ab8359 100644 --- a/bindings/rig.swg +++ b/bindings/rig.swg @@ -571,7 +571,9 @@ int *rig_spectrum_cb_python(RIG *rig, struct rig_spectrum_line *rig_spectrum_lin METHOD1(set_powerstat, powerstat_t) // METHOD1(set_trn, int) METHOD1(has_get_level, setting_t) + METHOD1(has_get_parm, setting_t) METHOD1(has_set_parm, setting_t) + METHOD1(has_get_func, setting_t) METHOD1(has_set_func, setting_t) METHOD1(reset, reset_t) METHOD1(has_scan, scan_t) commit 0a30ba6dc70162a76cfa09c20dbdc545e2e58dda Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Sep 6 20:17:39 2025 +0200 Add rig_get_debug() and rig_set_debug_time_stamp() to the bindings Brings test coverage of debug.c over 55%. diff --git a/bindings/hamlib.swg b/bindings/hamlib.swg index 04f3968b5..f820ed14a 100644 --- a/bindings/hamlib.swg +++ b/bindings/hamlib.swg @@ -189,6 +189,8 @@ %apply int *OUTPUT { int *degrees, double *minutes, int *sw }; %apply double *OUTPUT { double *longitude, double *latitude }; +%apply unsigned int *OUTPUT { enum rig_debug_level_e * }; + #ifndef SWIGJAVA // If SWIGJAVA ever maps char * we can enable these %apply char *OUTPUT { char *locator_res }; diff --git a/bindings/ignore.swg b/bindings/ignore.swg index 9de6a6fe8..c0f342a35 100644 --- a/bindings/ignore.swg +++ b/bindings/ignore.swg @@ -89,7 +89,9 @@ %rename("$ignore", regexmatch$name="^rot_", %$isfunction) ""; // re-add some methods +%rename("%s") rig_get_debug; %rename("%s") rig_set_debug; +%rename("%s") rig_set_debug_time_stamp; %rename("%s", regexmatch$name="^rig_str", %$isfunction) ""; // remove typedefs diff --git a/bindings/python/test_Hamlib_class.py b/bindings/python/test_Hamlib_class.py index f0323958d..0493eb717 100755 --- a/bindings/python/test_Hamlib_class.py +++ b/bindings/python/test_Hamlib_class.py @@ -54,7 +54,9 @@ class TestClass: 'qrb', 'rig_callbacks', 'rig_caps', +'rig_get_debug', 'rig_set_debug', +'rig_set_debug_time_stamp', 'rig_spectrum_avg_mode', 'rig_spectrum_line', 'rig_spectrum_scope', diff --git a/bindings/python/test_startup.py b/bindings/python/test_startup.py index 8befdd15b..b44c12a9f 100755 --- a/bindings/python/test_startup.py +++ b/bindings/python/test_startup.py @@ -18,6 +18,8 @@ class TestClass: assert isinstance(Hamlib.cvar.hamlib_version, str) Hamlib.rig_set_debug(Hamlib.RIG_DEBUG_NONE) + assert Hamlib.rig_get_debug() == Hamlib.RIG_DEBUG_NONE + assert Hamlib.rig_set_debug_time_stamp(1) is None model = Hamlib.RIG_MODEL_DUMMY my_rig = Hamlib.Rig(model) commit 194f9d3a626fcbb1be5346f846f671d48cb42216 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Sep 6 09:05:26 2025 +0200 Add tests for dmmm2dec() dec2dmmm() azimuth_long_path() Brings function coverage of locator.c to 100%. diff --git a/bindings/python/test_startup.py b/bindings/python/test_startup.py index e38cc355d..8befdd15b 100755 --- a/bindings/python/test_startup.py +++ b/bindings/python/test_startup.py @@ -128,4 +128,13 @@ class TestClass: assert lon3 == approx(-0.0414, abs=1.0e-04) # FIXME why need to override tolerance? assert lat3 == approx(48.1042) + assert Hamlib.dmmm2dec(48, 60.0 * 0.1042, 0) == approx(-Hamlib.dmmm2dec(-48, 60.0 * -0.1042, 1)) + assert Hamlib.dec2dmmm(48.1042) == [0, 48, 6, 0] + + assert Hamlib.azimuth_long_path(0.0) == 180.0 + assert Hamlib.azimuth_long_path(360.0) == 180.0 + assert Hamlib.azimuth_long_path(92.6) == approx(272.6) + assert Hamlib.azimuth_long_path(180.0) == 0.0 + assert Hamlib.azimuth_long_path(285.7) == approx(105.7) + assert my_rig.set_vfo_opt(0) is None ----------------------------------------------------------------------- Summary of changes: bindings/amplifier.swg | 2 +- bindings/hamlib.swg | 2 ++ bindings/ignore.swg | 2 ++ bindings/python/test_Hamlib_Rig_class.py | 2 ++ bindings/python/test_Hamlib_class.py | 2 ++ bindings/python/test_rig.py | 10 +++++----- bindings/python/test_startup.py | 11 +++++++++++ bindings/rig.swg | 4 +++- bindings/rotator.swg | 2 +- 9 files changed, 29 insertions(+), 8 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-09-23 02:32: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, master has been updated via c195d3dd4c66d959119d50a07801836fd6b558da (commit) via b1a673326b152ae763ac49045b267d2be2898710 (commit) via ca638238cb6724d5cf3e0dda0c353b0b430bc413 (commit) via 5e3911b3c32fdddc26af855523d169b6c51bd466 (commit) via 59916293de76d15b4f61023a70900334d60f7d05 (commit) via 6708caa73a0372ebc650cca886df3edf10d8c8f0 (commit) via 942214da6eb95c6309d6d50aa5be52c54a4a5f96 (commit) from 3ea25e6ba072cd1e4c2c2095927ee0e9c805d3c9 (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 c195d3dd4c66d959119d50a07801836fd6b558da Merge: 3ea25e6ba b1a673326 Author: Nate Bargmann <n0...@n0...> Date: Mon Sep 22 21:22:27 2025 -0500 Merge GitHub PR #1882 commit b1a673326b152ae763ac49045b267d2be2898710 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Mon Sep 22 23:53:33 2025 +0200 Wrap wide columns with the list of commands diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index e9c264529..496f148c6 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -1963,6 +1963,7 @@ void usage_rig(FILE *fout) { int i; int column = 1; + int wrapped = 0; fprintf(fout, "Commands (some may not be available for this rig):\n"); @@ -1990,9 +1991,10 @@ void usage_rig(FILE *fout) nbspaces -= fprintf(fout, ",%s", test_list[i].arg3); } - if ((nbspaces < 1) || (column == 2)) + if ((nbspaces < 1) || (column == 2) || wrapped) { fprintf(fout, ")\n"); + wrapped = (nbspaces < 1) && (column == 1); column = 1; } else commit ca638238cb6724d5cf3e0dda0c353b0b430bc413 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Mon Sep 22 22:57:08 2025 +0200 Wrap longer commands in the help text diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 801c259a0..e9c264529 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -1962,14 +1962,15 @@ declare_proto_rig(client_version) void usage_rig(FILE *fout) { int i; + int column = 1; fprintf(fout, "Commands (some may not be available for this rig):\n"); for (i = 0; test_list[i].cmd != 0; i++) { - int nbspaces = 18; + int nbspaces = 20; // longest arguments are 32 chars: "TX Frequency,TX Mode,TX Passband" fprintf(fout, - "%c: %-16s(", + "%c: %-19s(", // longest commands are 19 chars, eg. "set_split_freq_mode" isprint(test_list[i].cmd) ? test_list[i].cmd : '?', test_list[i].name); @@ -1989,13 +1990,15 @@ void usage_rig(FILE *fout) nbspaces -= fprintf(fout, ",%s", test_list[i].arg3); } - if (i % 2) + if ((nbspaces < 1) || (column == 2)) { fprintf(fout, ")\n"); + column = 1; } else { fprintf(fout, ")%*s", nbspaces, " "); + column++; } } commit 5e3911b3c32fdddc26af855523d169b6c51bd466 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Sep 21 19:00:18 2025 +0200 The ampctld and rotctld do not read COMMANDs from their command line Test case: tests/ampctld -h | head -1 tests/rigctld -h | head -1 tests/rotctld -h | head -1 Expected output: Usage: ampctld [OPTION]... Usage: rigctld [OPTION]... Usage: rotctld [OPTION]... diff --git a/tests/ampctld.c b/tests/ampctld.c index 466a8d48a..ba6454ad0 100644 --- a/tests/ampctld.c +++ b/tests/ampctld.c @@ -681,7 +681,7 @@ handle_exit: static void usage(FILE *fout) { - fprintf(fout, "Usage: ampctld [OPTION]... [COMMAND]...\n" + fprintf(fout, "Usage: ampctld [OPTION]...\n" "Daemon serving COMMANDs to a connected amplifier.\n\n"); fprintf(fout, diff --git a/tests/rotctld.c b/tests/rotctld.c index c9b06fa43..43f8b28ab 100644 --- a/tests/rotctld.c +++ b/tests/rotctld.c @@ -705,7 +705,7 @@ handle_exit: static void usage(FILE *fout) { - fprintf(fout, "Usage: rotctld [OPTION]... [COMMAND]...\n" + fprintf(fout, "Usage: rotctld [OPTION]...\n" "Daemon serving COMMANDs to a connected antenna rotator.\n\n"); fprintf(fout, commit 59916293de76d15b4f61023a70900334d60f7d05 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Sep 21 18:54:09 2025 +0200 Make static all usage() and usage_short() functions diff --git a/tests/ampctl.c b/tests/ampctl.c index af0e37e43..73e54930c 100644 --- a/tests/ampctl.c +++ b/tests/ampctl.c @@ -70,8 +70,8 @@ extern int read_history(); /* * Prototypes */ -void usage(FILE *fout); -void short_usage(FILE *fout); +static void usage(FILE *fout); +static void short_usage(FILE *fout); /* * Reminder: when adding long options, @@ -440,7 +440,7 @@ int main(int argc, char *argv[]) } -void usage(FILE *fout) +static void usage(FILE *fout) { fprintf(fout, "Usage: ampctl [OPTION]... [COMMAND]...\n" "Send COMMANDs to a connected amplifier.\n\n"); @@ -470,7 +470,7 @@ void usage(FILE *fout) } -void short_usage(FILE *fout) +static void short_usage(FILE *fout) { fprintf(fout, "Usage: ampctl [OPTION]... [-m ID] [-r DEVICE] [-s BAUD] [COMMAND...|-]\n"); fprintf(fout, "Send COMMANDs to a connected amplifier.\n\n"); diff --git a/tests/ampctld.c b/tests/ampctld.c index 5e09cb1b4..466a8d48a 100644 --- a/tests/ampctld.c +++ b/tests/ampctld.c @@ -70,9 +70,14 @@ struct handle_data socklen_t clilen; }; + +/* + * Prototypes + */ void *handle_socket(void *arg); +static void usage(FILE *fout); +static void short_usage(FILE *fout); -void usage(FILE *fout); /* * Reminder: when adding long options, @@ -674,7 +679,7 @@ handle_exit: } -void usage(FILE *fout) +static void usage(FILE *fout) { fprintf(fout, "Usage: ampctld [OPTION]... [COMMAND]...\n" "Daemon serving COMMANDs to a connected amplifier.\n\n"); @@ -699,7 +704,7 @@ void usage(FILE *fout) } -void short_usage(FILE *fout) +static void short_usage(FILE *fout) { fprintf(fout, "Usage: ampctld [OPTION]... [-m ID] [-r DEVICE] [-s BAUD]\n"); fprintf(fout, "Daemon serving COMMANDs to a connected amplifier.\n\n"); diff --git a/tests/rigctl.c b/tests/rigctl.c index 7fe0e415b..28c321e31 100644 --- a/tests/rigctl.c +++ b/tests/rigctl.c @@ -73,8 +73,11 @@ extern int read_history(); #define MAXNAMSIZ 32 #define MAXNBOPT 100 /* max number of different options */ - +/* + * Prototypes + */ static void usage(FILE *fout); +static void short_usage(FILE *fout); /* * Reminder: when adding long options, @@ -872,7 +875,7 @@ int main(int argc, char *argv[]) } -void usage(FILE *fout) +static void usage(FILE *fout) { fprintf(fout, "Usage: rigctl [OPTION]... [COMMAND]...\n" "Send COMMANDs to a connected radio transceiver or receiver.\n\n"); @@ -912,7 +915,7 @@ void usage(FILE *fout) } -void short_usage(FILE *fout) +static void short_usage(FILE *fout) { fprintf(fout, "Usage: rigctl [OPTION]... [-m ID] [-r DEVICE] [-s BAUD] [COMMAND...|-]\n"); fprintf(fout, "Send COMMANDs to a connected radio transceiver or receiver.\n\n"); diff --git a/tests/rigctlcom.c b/tests/rigctlcom.c index ef2440d0b..94eeae5fb 100644 --- a/tests/rigctlcom.c +++ b/tests/rigctlcom.c @@ -114,7 +114,7 @@ static struct option long_options[] = {0, 0, 0, 0} }; -void usage(FILE *fout); +static void usage(FILE *fout); static int handle_ts2000(void *arg); static RIG *my_rig; /* handle to rig */ @@ -1690,7 +1690,7 @@ static int handle_ts2000(void *arg) } -void usage(FILE *fout) +static void usage(FILE *fout) { char *name = "rigctlcom"; diff --git a/tests/rigctld.c b/tests/rigctld.c index 33e7ba06e..620557f42 100644 --- a/tests/rigctld.c +++ b/tests/rigctld.c @@ -123,9 +123,12 @@ struct handle_data }; +/* + * Prototypes + */ void *handle_socket(void *arg); -void usage(FILE *fout); - +static void usage(FILE *fout); +static void short_usage(FILE *fout); static unsigned client_count; @@ -1364,7 +1367,7 @@ handle_exit: } -void usage(FILE *fout) +static void usage(FILE *fout) { fprintf(fout, "Usage: rigctld [OPTION]...\n" "Daemon serving COMMANDs to a connected radio transceiver or receiver.\n\n"); @@ -1403,7 +1406,7 @@ void usage(FILE *fout) } -void short_usage(FILE *fout) +static void short_usage(FILE *fout) { fprintf(fout, "Usage: rigctld [OPTION]... [-m ID] [-r DEVICE] [-s BAUD]\n"); fprintf(fout, "Daemon serving COMMANDs to a connected radio transceiver or receiver.\n\n"); diff --git a/tests/rigctlsync.c b/tests/rigctlsync.c index c2636003c..0d98d4f79 100644 --- a/tests/rigctlsync.c +++ b/tests/rigctlsync.c @@ -105,7 +105,7 @@ static struct option long_options[] = {0, 0, 0, 0} }; -void usage(FILE *fout); +static void usage(FILE *fout); static RIG *my_rig; /* handle to rig */ static RIG *my_rig_sync; /* rig the gets synchronized -- freq only for now */ @@ -591,7 +591,7 @@ int main(int argc, char *argv[]) return 0; } -void usage(FILE *fout) +static void usage(FILE *fout) { const char *name = "rigctlsync"; diff --git a/tests/rigctltcp.c b/tests/rigctltcp.c index 66a0c0250..5ccccd09b 100644 --- a/tests/rigctltcp.c +++ b/tests/rigctltcp.c @@ -128,7 +128,7 @@ struct handle_data void *handle_socket(void *arg); -void usage(FILE *fout); +static void usage(FILE *fout); static unsigned client_count; @@ -1364,7 +1364,7 @@ handle_exit: } -void usage(FILE *fout) +static void usage(FILE *fout) { fprintf(fout, "Usage: rigctltcp [OPTION]...\n" "Daemon serving COMMANDs to a connected radio transceiver or receiver.\n\n"); diff --git a/tests/rigmem.c b/tests/rigmem.c index 56a605d0b..e26249057 100644 --- a/tests/rigmem.c +++ b/tests/rigmem.c @@ -54,7 +54,7 @@ extern int csv_parm_load(RIG *rig, const char *infilename); /* * Prototypes */ -void usage(FILE *fout); +static void usage(FILE *fout); void version(); static int set_conf(RIG *rig, char *conf_parms); @@ -372,7 +372,7 @@ void version() } -void usage(FILE *fout) +static void usage(FILE *fout) { fprintf(fout, "Usage: rigmem [OPTION]... COMMAND... FILE\n" "Backup/restore COMMANDs to a connected radio transceiver or receiver.\n\n"); diff --git a/tests/rigsmtr.c b/tests/rigsmtr.c index 27bb5e715..da2623e41 100644 --- a/tests/rigsmtr.c +++ b/tests/rigsmtr.c @@ -356,7 +356,7 @@ void version() } -void usage(FILE *fout) +static void usage(FILE *fout) { fprintf(fout, "Usage: rigsmtr [OPTION]... [time]\n" "Input S-Meter vs Azimuth.\n\n"); diff --git a/tests/rigswr.c b/tests/rigswr.c index 7301a9451..f631ba933 100644 --- a/tests/rigswr.c +++ b/tests/rigswr.c @@ -310,7 +310,7 @@ void version() } -void usage(FILE *fout) +static void usage(FILE *fout) { fprintf(fout, "Usage: rigswr [OPTION]... start_freq stop_freq [freq_step]\n" "Output SWR vs Frequency.\n\n"); diff --git a/tests/rotctl.c b/tests/rotctl.c index 49d701604..05a4b05c1 100644 --- a/tests/rotctl.c +++ b/tests/rotctl.c @@ -67,10 +67,13 @@ extern int read_history(); #include "rotctl_parse.h" #include "rotlist.h" + /* * Prototypes */ -void usage(FILE *fout); +static void usage(FILE *fout); +static void short_usage(FILE *fout); + /* * Reminder: when adding long options, @@ -479,7 +482,7 @@ int main(int argc, char *argv[]) } -void usage(FILE *fout) +static void usage(FILE *fout) { fprintf(fout, "Usage: rotctl [OPTION]... [COMMAND]...\n" "Send COMMANDs to a connected antenna rotator.\n\n"); @@ -512,7 +515,7 @@ void usage(FILE *fout) } -void short_usage(FILE *fout) +static void short_usage(FILE *fout) { fprintf(fout, "Usage: rotctl [OPTION]... [-m ID] [-r DEVICE] [-s BAUD] [COMMAND...|-]\n"); fprintf(fout, "Send COMMANDs to a connected antenna rotator.\n\n"); diff --git a/tests/rotctld.c b/tests/rotctld.c index 5efa12771..c9b06fa43 100644 --- a/tests/rotctld.c +++ b/tests/rotctld.c @@ -67,9 +67,14 @@ struct handle_data socklen_t clilen; }; + +/* + * Prototypes + */ void *handle_socket(void *arg); +static void usage(FILE *fout); +static void short_usage(FILE *fout); -void usage(FILE *fout); /* * Reminder: when adding long options, @@ -698,7 +703,7 @@ handle_exit: } -void usage(FILE *fout) +static void usage(FILE *fout) { fprintf(fout, "Usage: rotctld [OPTION]... [COMMAND]...\n" "Daemon serving COMMANDs to a connected antenna rotator.\n\n"); @@ -726,7 +731,7 @@ void usage(FILE *fout) } -void short_usage(FILE *fout) +static void short_usage(FILE *fout) { fprintf(fout, "Usage: rotctld [OPTION]... [-m ID] [-r DEVICE] [-s BAUD]\n"); fprintf(fout, "Daemon serving COMMANDs to a connected antenna rotator.\n\n"); commit 6708caa73a0372ebc650cca886df3edf10d8c8f0 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Sep 21 18:22:39 2025 +0200 Print a shorter usage text for unknown options Test case: tests/ampctl -Q tests/ampctld -Q tests/rigctl -Q tests/rigctld -Q tests/rotctl -Q tests/rotctld -Q Expected output: /home/ham/Hamlib/tests/.libs/ampctl: invalid option -- 'Q' Usage: ampctl [OPTION]... [-m ID] [-r DEVICE] [-s BAUD] [COMMAND...|-] Send COMMANDs to a connected amplifier. Type: ampctl --help for extended usage. /home/ham/Hamlib/tests/.libs/ampctld: invalid option -- 'Q' Usage: ampctld [OPTION]... [-m ID] [-r DEVICE] [-s BAUD] Daemon serving COMMANDs to a connected amplifier. Type: ampctld --help for extended usage. /home/ham/Hamlib/tests/.libs/rigctl: invalid option -- 'Q' Usage: rigctl [OPTION]... [-m ID] [-r DEVICE] [-s BAUD] [COMMAND...|-] Send COMMANDs to a connected radio transceiver or receiver. Type: rigctl --help for extended usage. /home/ham/Hamlib/tests/.libs/rigctld: invalid option -- 'Q' Usage: rigctld [OPTION]... [-m ID] [-r DEVICE] [-s BAUD] Daemon serving COMMANDs to a connected radio transceiver or receiver. Type: rigctld --help for extended usage. /home/ham/Hamlib/tests/.libs/rotctl: invalid option -- 'Q' Usage: rotctl [OPTION]... [-m ID] [-r DEVICE] [-s BAUD] [COMMAND...|-] Send COMMANDs to a connected antenna rotator. Type: rotctl --help for extended usage. /home/ham/Hamlib/tests/.libs/rotctld: invalid option -- 'Q' Usage: rotctld [OPTION]... [-m ID] [-r DEVICE] [-s BAUD] Daemon serving COMMANDs to a connected antenna rotator. Type: rotctld --help for extended usage. diff --git a/tests/ampctl.c b/tests/ampctl.c index 8ccddf025..af0e37e43 100644 --- a/tests/ampctl.c +++ b/tests/ampctl.c @@ -71,6 +71,7 @@ extern int read_history(); * Prototypes */ void usage(FILE *fout); +void short_usage(FILE *fout); /* * Reminder: when adding long options, @@ -237,7 +238,8 @@ int main(int argc, char *argv[]) break; default: - usage(stderr); /* unknown option? */ + /* unknown getopt option */ + short_usage(stderr); exit(1); } } @@ -466,3 +468,11 @@ void usage(FILE *fout) usage_amp(fout); } + + +void short_usage(FILE *fout) +{ + fprintf(fout, "Usage: ampctl [OPTION]... [-m ID] [-r DEVICE] [-s BAUD] [COMMAND...|-]\n"); + fprintf(fout, "Send COMMANDs to a connected amplifier.\n\n"); + fprintf(fout, "Type: ampctl --help for extended usage.\n"); +} diff --git a/tests/ampctld.c b/tests/ampctld.c index 3a2928363..5e09cb1b4 100644 --- a/tests/ampctld.c +++ b/tests/ampctld.c @@ -262,7 +262,8 @@ int main(int argc, char *argv[]) break; default: - usage(stderr); /* unknown option? */ + /* unknown getopt option */ + short_usage(stderr); exit(1); } } @@ -696,3 +697,11 @@ void usage(FILE *fout) usage_amp(fout); } + + +void short_usage(FILE *fout) +{ + fprintf(fout, "Usage: ampctld [OPTION]... [-m ID] [-r DEVICE] [-s BAUD]\n"); + fprintf(fout, "Daemon serving COMMANDs to a connected amplifier.\n\n"); + fprintf(fout, "Type: ampctld --help for extended usage.\n"); +} diff --git a/tests/rigctl.c b/tests/rigctl.c index 5b13e40ae..7fe0e415b 100644 --- a/tests/rigctl.c +++ b/tests/rigctl.c @@ -463,7 +463,8 @@ int main(int argc, char *argv[]) break; default: - usage(stderr); /* unknown option? */ + /* unknown getopt option */ + short_usage(stderr); exit(1); } } @@ -909,3 +910,11 @@ void usage(FILE *fout) usage_rig(fout); } + + +void short_usage(FILE *fout) +{ + fprintf(fout, "Usage: rigctl [OPTION]... [-m ID] [-r DEVICE] [-s BAUD] [COMMAND...|-]\n"); + fprintf(fout, "Send COMMANDs to a connected radio transceiver or receiver.\n\n"); + fprintf(fout, "Type: rigctl --help for extended usage.\n"); +} diff --git a/tests/rigctlcom.c b/tests/rigctlcom.c index 0cd456643..ef2440d0b 100644 --- a/tests/rigctlcom.c +++ b/tests/rigctlcom.c @@ -400,7 +400,7 @@ int main(int argc, char *argv[]) break; default: - usage(stderr); /* unknown option? */ + usage(stderr); exit(1); } } diff --git a/tests/rigctld.c b/tests/rigctld.c index 948c51e85..33e7ba06e 100644 --- a/tests/rigctld.c +++ b/tests/rigctld.c @@ -524,7 +524,8 @@ int main(int argc, char *argv[]) break; default: - usage(stderr); /* unknown option? */ + /* unknown getopt option */ + short_usage(stderr); exit(1); } } @@ -1400,3 +1401,11 @@ void usage(FILE *fout) usage_rig(fout); } + + +void short_usage(FILE *fout) +{ + fprintf(fout, "Usage: rigctld [OPTION]... [-m ID] [-r DEVICE] [-s BAUD]\n"); + fprintf(fout, "Daemon serving COMMANDs to a connected radio transceiver or receiver.\n\n"); + fprintf(fout, "Type: rigctld --help for extended usage.\n"); +} diff --git a/tests/rigctlsync.c b/tests/rigctlsync.c index 7d8dfbcf7..c2636003c 100644 --- a/tests/rigctlsync.c +++ b/tests/rigctlsync.c @@ -409,7 +409,7 @@ int main(int argc, char *argv[]) break; default: - usage(stderr); /* unknown option? */ + usage(stderr); exit(1); } } diff --git a/tests/rigctltcp.c b/tests/rigctltcp.c index 7d53acc0c..66a0c0250 100644 --- a/tests/rigctltcp.c +++ b/tests/rigctltcp.c @@ -525,7 +525,7 @@ int main(int argc, char *argv[]) break; default: - usage(stderr); /* unknown option? */ + usage(stderr); exit(1); } } diff --git a/tests/rigmem.c b/tests/rigmem.c index 1f71444e9..56a605d0b 100644 --- a/tests/rigmem.c +++ b/tests/rigmem.c @@ -187,7 +187,7 @@ int main(int argc, char *argv[]) break; default: - usage(stderr); /* unknown option? */ + usage(stderr); exit(1); } } diff --git a/tests/rigsmtr.c b/tests/rigsmtr.c index 125581a13..27bb5e715 100644 --- a/tests/rigsmtr.c +++ b/tests/rigsmtr.c @@ -177,7 +177,7 @@ int main(int argc, char *argv[]) break; default: - usage(stderr); /* unknown option? */ + usage(stderr); exit(1); } } diff --git a/tests/rigswr.c b/tests/rigswr.c index 99497c146..7301a9451 100644 --- a/tests/rigswr.c +++ b/tests/rigswr.c @@ -178,7 +178,7 @@ int main(int argc, char *argv[]) break; default: - usage(stderr); /* unknown option? */ + usage(stderr); exit(1); } } diff --git a/tests/rotctl.c b/tests/rotctl.c index a0660ef7c..49d701604 100644 --- a/tests/rotctl.c +++ b/tests/rotctl.c @@ -258,7 +258,8 @@ int main(int argc, char *argv[]) break; default: - usage(stderr); /* unknown option? */ + /* unknown getopt option */ + short_usage(stderr); exit(1); } } @@ -509,3 +510,11 @@ void usage(FILE *fout) usage_rot(fout); } + + +void short_usage(FILE *fout) +{ + fprintf(fout, "Usage: rotctl [OPTION]... [-m ID] [-r DEVICE] [-s BAUD] [COMMAND...|-]\n"); + fprintf(fout, "Send COMMANDs to a connected antenna rotator.\n\n"); + fprintf(fout, "Type: rotctl --help for extended usage.\n"); +} diff --git a/tests/rotctld.c b/tests/rotctld.c index 3e98e31c8..5efa12771 100644 --- a/tests/rotctld.c +++ b/tests/rotctld.c @@ -267,7 +267,8 @@ int main(int argc, char *argv[]) break; default: - usage(stderr); /* unknown option? */ + /* unknown getopt option */ + short_usage(stderr); exit(1); } } @@ -723,3 +724,11 @@ void usage(FILE *fout) usage_rot(fout); } + + +void short_usage(FILE *fout) +{ + fprintf(fout, "Usage: rotctld [OPTION]... [-m ID] [-r DEVICE] [-s BAUD]\n"); + fprintf(fout, "Daemon serving COMMANDs to a connected antenna rotator.\n\n"); + fprintf(fout, "Type: rotctld --help for extended usage.\n"); +} commit 942214da6eb95c6309d6d50aa5be52c54a4a5f96 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Fri Aug 15 11:23:17 2025 +0200 Direct usage text to stderr or stdout depending on context Prints usage text to stdout when requested with -h/--help or to stderr otherwise. Test cases: tests/rigctl --help # prints to stdout tests/rigctl -Q # prints to stderr diff --git a/tests/ampctl.c b/tests/ampctl.c index da664c31a..8ccddf025 100644 --- a/tests/ampctl.c +++ b/tests/ampctl.c @@ -70,7 +70,7 @@ extern int read_history(); /* * Prototypes */ -void usage(); +void usage(FILE *fout); /* * Reminder: when adding long options, @@ -153,7 +153,7 @@ int main(int argc, char *argv[]) switch (c) { case 'h': - usage(); + usage(stdout); exit(0); case 'V': @@ -237,7 +237,7 @@ int main(int argc, char *argv[]) break; default: - usage(); /* unknown option? */ + usage(stderr); /* unknown option? */ exit(1); } } @@ -438,12 +438,12 @@ int main(int argc, char *argv[]) } -void usage() +void usage(FILE *fout) { - printf("Usage: ampctl [OPTION]... [COMMAND]...\n" + fprintf(fout, "Usage: ampctl [OPTION]... [COMMAND]...\n" "Send COMMANDs to a connected amplifier.\n\n"); - printf( + fprintf(fout, " -m, --model=ID select amplifier model number. See model list (-l)\n" " -r, --amp-file=DEVICE set device of the amplifier to operate on\n" " -s, --serial-speed=BAUD set serial speed of the serial port\n" @@ -464,5 +464,5 @@ void usage() "\n" ); - usage_amp(stdout); + usage_amp(fout); } diff --git a/tests/ampctld.c b/tests/ampctld.c index 3f0bc8284..3a2928363 100644 --- a/tests/ampctld.c +++ b/tests/ampctld.c @@ -72,7 +72,7 @@ struct handle_data void *handle_socket(void *arg); -void usage(); +void usage(FILE *fout); /* * Reminder: when adding long options, @@ -192,7 +192,7 @@ int main(int argc, char *argv[]) switch (c) { case 'h': - usage(); + usage(stdout); exit(0); case 'V': @@ -262,7 +262,7 @@ int main(int argc, char *argv[]) break; default: - usage(); /* unknown option? */ + usage(stderr); /* unknown option? */ exit(1); } } @@ -673,12 +673,12 @@ handle_exit: } -void usage() +void usage(FILE *fout) { - printf("Usage: ampctld [OPTION]... [COMMAND]...\n" + fprintf(fout, "Usage: ampctld [OPTION]... [COMMAND]...\n" "Daemon serving COMMANDs to a connected amplifier.\n\n"); - printf( + fprintf(fout, " -m, --model=ID select amplifier model number. See model list (-l)\n" " -r, --amp-file=DEVICE set device of the amplifier to operate on\n" " -s, --serial-speed=BAUD set serial speed of the serial port\n" @@ -694,5 +694,5 @@ void usage() " -V, --version output version information and exit\n\n", portno); - usage_amp(stdout); + usage_amp(fout); } diff --git a/tests/rigctl.c b/tests/rigctl.c index e001ab4bc..5b13e40ae 100644 --- a/tests/rigctl.c +++ b/tests/rigctl.c @@ -74,7 +74,7 @@ extern int read_history(); #define MAXNBOPT 100 /* max number of different options */ -static void usage(void); +static void usage(FILE *fout); /* * Reminder: when adding long options, @@ -269,7 +269,7 @@ int main(int argc, char *argv[]) break; case 'h': - usage(); + usage(stdout); exit(0); case 'V': @@ -463,7 +463,7 @@ int main(int argc, char *argv[]) break; default: - usage(); /* unknown option? */ + usage(stderr); /* unknown option? */ exit(1); } } @@ -871,13 +871,12 @@ int main(int argc, char *argv[]) } -void usage(void) +void usage(FILE *fout) { - printf("Usage: rigctl [OPTION]... [COMMAND]...\n" + fprintf(fout, "Usage: rigctl [OPTION]... [COMMAND]...\n" "Send COMMANDs to a connected radio transceiver or receiver.\n\n"); - - printf( + fprintf(fout, " -m, --model=ID select radio model number. See model list (-l)\n" " -r, --rig-file=DEVICE set device of the radio to operate on\n" " -p, --ptt-file=DEVICE set device of the PTT device to operate on\n" @@ -908,5 +907,5 @@ void usage(void) "\n" ); - usage_rig(stdout); + usage_rig(fout); } diff --git a/tests/rigctlcom.c b/tests/rigctlcom.c index 255628cd0..0cd456643 100644 --- a/tests/rigctlcom.c +++ b/tests/rigctlcom.c @@ -114,7 +114,7 @@ static struct option long_options[] = {0, 0, 0, 0} }; -void usage(); +void usage(FILE *fout); static int handle_ts2000(void *arg); static RIG *my_rig; /* handle to rig */ @@ -248,7 +248,7 @@ int main(int argc, char *argv[]) switch (c) { case 'h': - usage(); + usage(stdout); exit(0); case 'V': @@ -400,7 +400,7 @@ int main(int argc, char *argv[]) break; default: - usage(); /* unknown option? */ + usage(stderr); /* unknown option? */ exit(1); } } @@ -411,7 +411,7 @@ int main(int argc, char *argv[]) if (argc == 1) { - usage(); + usage(stderr); exit(1); } @@ -1690,20 +1690,21 @@ static int handle_ts2000(void *arg) } -void usage() +void usage(FILE *fout) { char *name = "rigctlcom"; - printf("Usage: %s -m rignumber -r comport -s baud -R comport [OPTIONS]...\n\n" + + fprintf(fout, "Usage: %s -m rignumber -r comport -s baud -R comport [OPTIONS]...\n\n" "A TS-2000 emulator for rig sharing with programs that don't support Hamlib or FLRig to be able\n" "to use a connected radio transceiver or receiver with FLRig or rigctld via Hamlib.\n\n", name); - printf("Example: Using FLRig with virtual COM5/COM6 and other program:\n"); - printf("\t%s -m 4 -R COM5 -S 115200\n\n", name); - printf("Other program would connect to COM6 and use TS-2000 115200 8N1\n\n"); - printf("See the %s.1 manual page for complete details.\n\n", name); + fprintf(fout, "Example: Using FLRig with virtual COM5/COM6 and other program:\n"); + fprintf(fout, "\t%s -m 4 -R COM5 -S 115200\n\n", name); + fprintf(fout, "Other program would connect to COM6 and use TS-2000 115200 8N1\n\n"); + fprintf(fout, "See the %s.1 manual page for complete details.\n\n", name); - printf( + fprintf(fout, " -m, --model=ID select radio model number. See model list (-l)\n" " -r, --rig-file=DEVICE set device of the radio to operate on\n" " -R, --rig-file2=DEVICE set device of the virtual com port to operate on\n" @@ -1725,6 +1726,5 @@ void usage() " -V, --version output version information and exit\n\n" ); - printf("\nReport bugs to <ham...@li...>.\n"); - + fprintf(fout, "\nReport bugs to <ham...@li...>.\n"); } diff --git a/tests/rigctld.c b/tests/rigctld.c index 9935f5520..948c51e85 100644 --- a/tests/rigctld.c +++ b/tests/rigctld.c @@ -124,7 +124,7 @@ struct handle_data void *handle_socket(void *arg); -void usage(void); +void usage(FILE *fout); static unsigned client_count; @@ -301,7 +301,7 @@ int main(int argc, char *argv[]) switch (c) { case 'h': - usage(); + usage(stdout); exit(0); case 'V': @@ -524,7 +524,7 @@ int main(int argc, char *argv[]) break; default: - usage(); /* unknown option? */ + usage(stderr); /* unknown option? */ exit(1); } } @@ -1363,13 +1363,13 @@ handle_exit: } -void usage(void) +void usage(FILE *fout) { - printf("Usage: rigctld [OPTION]...\n" + fprintf(fout, "Usage: rigctld [OPTION]...\n" "Daemon serving COMMANDs to a connected radio transceiver or receiver.\n\n"); - printf( + fprintf(fout, " -m, --model=ID select radio model number. See model list (-l)\n" " -r, --rig-file=DEVICE set device of the radio to operate on\n" " -p, --ptt-file=DEVICE set device of the PTT device to operate on\n" @@ -1398,5 +1398,5 @@ void usage(void) " -V, --version output version information and exit\n\n", portno); - usage_rig(stdout); + usage_rig(fout); } diff --git a/tests/rigctlsync.c b/tests/rigctlsync.c index 9e332a426..7d8dfbcf7 100644 --- a/tests/rigctlsync.c +++ b/tests/rigctlsync.c @@ -105,7 +105,7 @@ static struct option long_options[] = {0, 0, 0, 0} }; -void usage(); +void usage(FILE *fout); static RIG *my_rig; /* handle to rig */ static RIG *my_rig_sync; /* rig the gets synchronized -- freq only for now */ @@ -236,7 +236,7 @@ int main(int argc, char *argv[]) switch (c) { case 'h': - usage(); + usage(stdout); exit(0); case 'V': @@ -409,7 +409,7 @@ int main(int argc, char *argv[]) break; default: - usage(); /* unknown option? */ + usage(stderr); /* unknown option? */ exit(1); } } @@ -420,7 +420,7 @@ int main(int argc, char *argv[]) if (argc < 3) { - usage(); + usage(stderr); exit(1); } @@ -591,19 +591,20 @@ int main(int argc, char *argv[]) return 0; } -void usage() +void usage(FILE *fout) { const char *name = "rigctlsync"; - printf("Usage: %s -m rignumber -r comport -s baud -M rignumber -R comport [OPTIONS]...\n\n" + + fprintf(fout, "Usage: %s -m rignumber -r comport -s baud -M rignumber -R comport [OPTIONS]...\n\n" "Will copy frequency from -m rig to -M rig\n" "e.g. will keep SDR# synchronized to a rig.\n\n", name); - printf("Example: Sync freq from rigctld to SDR#\n"); - printf("\t%s -m 2 -M 9 -R 127.0.0.1:4532\n\n", name); - printf("See the %s.1 manual page for complete details.\n\n", name); + fprintf(fout, "Example: Sync freq from rigctld to SDR#\n"); + fprintf(fout, "\t%s -m 2 -M 9 -R 127.0.0.1:4532\n\n", name); + fprintf(fout, "See the %s.1 manual page for complete details.\n\n", name); - printf( + fprintf(fout, " -m, --model=ID select radio model number. See model list (-l)\n" " -r, --rig-file=DEVICE set device of the radio to operate on\n" " -R, --rig-file2=DEVICE set device of the virtual com port to operate on\n" @@ -620,6 +621,5 @@ void usage() " -V, --version output version information and exit\n\n" ); - printf("\nReport bugs to <ham...@li...>.\n"); - + fprintf(fout, "\nReport bugs to <ham...@li...>.\n"); } diff --git a/tests/rigctltcp.c b/tests/rigctltcp.c index 5e92f8cf9..7d53acc0c 100644 --- a/tests/rigctltcp.c +++ b/tests/rigctltcp.c @@ -128,7 +128,7 @@ struct handle_data void *handle_socket(void *arg); -void usage(void); +void usage(FILE *fout); static unsigned client_count; @@ -301,7 +301,7 @@ int main(int argc, char *argv[]) switch (c) { case 'h': - usage(); + usage(stdout); exit(0); case 'V': @@ -525,7 +525,7 @@ int main(int argc, char *argv[]) break; default: - usage(); /* unknown option? */ + usage(stderr); /* unknown option? */ exit(1); } } @@ -1364,13 +1364,12 @@ handle_exit: } -void usage(void) +void usage(FILE *fout) { - printf("Usage: rigctltcp [OPTION]...\n" + fprintf(fout, "Usage: rigctltcp [OPTION]...\n" "Daemon serving COMMANDs to a connected radio transceiver or receiver.\n\n"); - - printf( + fprintf(fout, " -m, --model=ID select radio model number. See model list (-l)\n" " -r, --rig-file=DEVICE set device of the radio to operate on\n" " -p, --ptt-file=DEVICE set device of the PTT device to operate on\n" @@ -1400,5 +1399,5 @@ void usage(void) " -V, --version output version information and exit\n\n", portno); - usage_rig(stdout); + usage_rig(fout); } diff --git a/tests/rigmem.c b/tests/rigmem.c index 15154db0a..1f71444e9 100644 --- a/tests/rigmem.c +++ b/tests/rigmem.c @@ -54,7 +54,7 @@ extern int csv_parm_load(RIG *rig, const char *infilename); /* * Prototypes */ -void usage(); +void usage(FILE *fout); void version(); static int set_conf(RIG *rig, char *conf_parms); @@ -122,7 +122,7 @@ int main(int argc, char *argv[]) switch (c) { case 'h': - usage(); + usage(stdout); exit(0); case 'V': @@ -187,7 +187,7 @@ int main(int argc, char *argv[]) break; default: - usage(); /* unknown option? */ + usage(stderr); /* unknown option? */ exit(1); } } @@ -201,7 +201,7 @@ int main(int argc, char *argv[]) if (optind + 1 >= argc) { - usage(); + usage(stderr); exit(1); } @@ -348,7 +348,7 @@ int main(int argc, char *argv[]) } else { - usage(); + usage(stderr); exit(1); } @@ -372,13 +372,13 @@ void version() } -void usage() +void usage(FILE *fout) { - printf("Usage: rigmem [OPTION]... COMMAND... FILE\n" + fprintf(fout, "Usage: rigmem [OPTION]... COMMAND... FILE\n" "Backup/restore COMMANDs to a connected radio transceiver or receiver.\n\n"); - printf( + fprintf(fout, " -m, --model=ID select radio model number. See model list (rigctl -l)\n" " -r, --rig-file=DEVICE set device of the radio to operate on\n" " -s, --serial-speed=BAUD set serial speed of the serial port\n" @@ -394,7 +394,7 @@ void usage() " -V, --version output version information and exit\n\n" ); - printf( + fprintf(fout, "COMMANDs:\n" " load\n" " save\n" @@ -403,8 +403,7 @@ void usage() " clear\n\n" ); - printf("\nReport bugs to <ham...@li...>.\n"); - + fprintf(fout, "\nReport bugs to <ham...@li...>.\n"); } diff --git a/tests/rigsmtr.c b/tests/rigsmtr.c index 132422ccb..125581a13 100644 --- a/tests/rigsmtr.c +++ b/tests/rigsmtr.c @@ -36,7 +36,7 @@ /* * Prototypes */ -static void usage(); +static void usage(FILE *fout); static void version(); static int set_conf_rig(RIG *rig, char *conf_parms); static int set_conf_rot(ROT *rot, char *conf_parms); @@ -106,7 +106,7 @@ int main(int argc, char *argv[]) switch (c) { case 'h': - usage(); + usage(stdout); exit(0); case 'V': @@ -177,7 +177,7 @@ int main(int argc, char *argv[]) break; default: - usage(); /* unknown option? */ + usage(stderr); /* unknown option? */ exit(1); } } @@ -356,12 +356,12 @@ void version() } -void usage() +void usage(FILE *fout) { - printf("Usage: rigsmtr [OPTION]... [time]\n" + fprintf(fout, "Usage: rigsmtr [OPTION]... [time]\n" "Input S-Meter vs Azimuth.\n\n"); - printf( + fprintf(fout, " -m, --model=ID select radio model number. See model list (rigctl -l)\n" " -r, --rig-file=DEVICE set device of the radio to operate on\n" " -s, --serial-speed=BAUD set serial speed of the serial port\n" @@ -376,8 +376,7 @@ void usage() " -V, --version output version information and exit\n\n" ); - printf("\nReport bugs to <ham...@li...>.\n"); - + fprintf(fout, "\nReport bugs to <ham...@li...>.\n"); } diff --git a/tests/rigswr.c b/tests/rigswr.c index e4f64e562..99497c146 100644 --- a/tests/rigswr.c +++ b/tests/rigswr.c @@ -34,7 +34,7 @@ /* * Prototypes */ -static void usage(); +static void usage(FILE *fout); static void version(); static int set_conf(RIG *rig, char *conf_parms); @@ -96,7 +96,7 @@ int main(int argc, char *argv[]) switch (c) { case 'h': - usage(); + usage(stdout); exit(0); case 'V': @@ -178,7 +178,7 @@ int main(int argc, char *argv[]) break; default: - usage(); /* unknown option? */ + usage(stderr); /* unknown option? */ exit(1); } } @@ -191,7 +191,7 @@ int main(int argc, char *argv[]) if (optind + 1 >= argc) { - usage(); + usage(stderr); exit(1); } @@ -310,13 +310,13 @@ void version() } -void usage() +void usage(FILE *fout) { - printf("Usage: rigswr [OPTION]... start_freq stop_freq [freq_step]\n" + fprintf(fout, "Usage: rigswr [OPTION]... start_freq stop_freq [freq_step]\n" "Output SWR vs Frequency.\n\n"); - printf( + fprintf(fout, " -m, --model=ID select radio model number. See model list (rigctl -l)\n" " -r, --rig-file=DEVICE set device of the radio to operate on\n" " -s, --serial-speed=BAUD set serial speed of the serial port\n" @@ -329,8 +329,7 @@ void usage() " -V, --version output version information and exit\n\n" ); - printf("\nReport bugs to <ham...@li...>.\n"); - + fprintf(fout, "\nReport bugs to <ham...@li...>.\n"); } diff --git a/tests/rotctl.c b/tests/rotctl.c index fd740c2d2..a0660ef7c 100644 --- a/tests/rotctl.c +++ b/tests/rotctl.c @@ -70,7 +70,7 @@ extern int read_history(); /* * Prototypes */ -void usage(); +void usage(FILE *fout); /* * Reminder: when adding long options, @@ -161,7 +161,7 @@ int main(int argc, char *argv[]) switch (c) { case 'h': - usage(); + usage(stdout); exit(0); case 'V': @@ -258,7 +258,7 @@ int main(int argc, char *argv[]) break; default: - usage(); /* unknown option? */ + usage(stderr); /* unknown option? */ exit(1); } } @@ -478,12 +478,12 @@ int main(int argc, char *argv[]) } -void usage() +void usage(FILE *fout) { - printf("Usage: rotctl [OPTION]... [COMMAND]...\n" + fprintf(fout, "Usage: rotctl [OPTION]... [COMMAND]...\n" "Send COMMANDs to a connected antenna rotator.\n\n"); - printf( + fprintf(fout, " -m, --model=ID select rotator model number. See model list (-l)\n" " -r, --rot-file=DEVICE set device of the rotator to operate on\n" " -R, --rot-file2=DEVICE set device of the 2nd rotator controller to operate on\n" @@ -507,5 +507,5 @@ void usage() "\n" ); - usage_rot(stdout); + usage_rot(fout); } diff --git a/tests/rotctld.c b/tests/rotctld.c index 9410620ea..3e98e31c8 100644 --- a/tests/rotctld.c +++ b/tests/rotctld.c @@ -69,7 +69,7 @@ struct handle_data void *handle_socket(void *arg); -void usage(); +void usage(FILE *fout); /* * Reminder: when adding long options, @@ -185,7 +185,7 @@ int main(int argc, char *argv[]) switch (c) { case 'h': - usage(); + usage(stdout); exit(0); case 'V': @@ -267,7 +267,7 @@ int main(int argc, char *argv[]) break; default: - usage(); /* unknown option? */ + usage(stderr); /* unknown option? */ exit(1); } } @@ -697,12 +697,12 @@ handle_exit: } -void usage() +void usage(FILE *fout) { - printf("Usage: rotctld [OPTION]... [COMMAND]...\n" + fprintf(fout, "Usage: rotctld [OPTION]... [COMMAND]...\n" "Daemon serving COMMANDs to a connected antenna rotator.\n\n"); - printf( + fprintf(fout, " -m, --model=ID select rotator model number. See model list (-l)\n" " -r, --rot-file=DEVICE set device of the rotator to operate on\n" " -R, --rot-file2=DEVICE set device of the 2nd rotator controller to operate on\n" @@ -721,5 +721,5 @@ void usage() " -V, --version output version information and exit\n\n", portno); - usage_rot(stdout); + usage_rot(fout); } ----------------------------------------------------------------------- Summary of changes: tests/ampctl.c | 24 +++++++++++++++++------- tests/ampctld.c | 28 +++++++++++++++++++++------- tests/rigctl.c | 29 ++++++++++++++++++++--------- tests/rigctl_parse.c | 11 ++++++++--- tests/rigctlcom.c | 26 +++++++++++++------------- tests/rigctld.c | 28 ++++++++++++++++++++-------- tests/rigctlsync.c | 24 ++++++++++++------------ tests/rigctltcp.c | 15 +++++++-------- tests/rigmem.c | 21 ++++++++++----------- tests/rigsmtr.c | 15 +++++++-------- tests/rigswr.c | 17 ++++++++--------- tests/rotctl.c | 26 +++++++++++++++++++------- tests/rotctld.c | 28 +++++++++++++++++++++------- 13 files changed, 183 insertions(+), 109 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-09-21 23:19:40
|
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 3ea25e6ba072cd1e4c2c2095927ee0e9c805d3c9 (commit) via df975aaf12cc60686909535f5b8208895a35f1c6 (commit) via aa665d1e1976131d78df7203893d57b6b004cf4a (commit) via 4c3cf66d84f606b4f339a6f615c16532b1fcb0c4 (commit) from 15d1fab7e889db8594ca07ee34607e3c97372727 (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 3ea25e6ba072cd1e4c2c2095927ee0e9c805d3c9 Merge: 15d1fab7e df975aaf1 Author: Nate Bargmann <n0...@n0...> Date: Sat Sep 20 12:45:55 2025 -0500 Merge GitHub PR #1918 commit df975aaf12cc60686909535f5b8208895a35f1c6 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Sep 20 18:34:08 2025 +0200 Fix compiler warnings issued by clang Fixes: hamlibpy_wrap.c:4692:35: warning: passing 'char *' to parameter of type 'const unsigned char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign] 4692 | count = rig_send_raw(self->rig, send, send_len, reply_buffer, reply_len, term); | ^~~~ ../include/hamlib/rig.h:3466:71: note: passing argument to parameter 'send' here 3466 | extern HAMLIB_EXPORT(int) rig_send_raw(RIG *rig, const unsigned char* send, int send_len, unsigned char* reply, int reply_len, unsigned char *term); | ^ hamlibpy_wrap.c:4692:76: warning: passing 'char *' to parameter of type 'unsigned char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign] 4692 | count = rig_send_raw(self->rig, send, send_len, reply_buffer, reply_len, term); | ^~~~ ../include/hamlib/rig.h:3466:143: note: passing argument to parameter 'term' here 3466 | extern HAMLIB_EXPORT(int) rig_send_raw(RIG *rig, const unsigned char* send, int send_len, unsigned char* reply, int reply_len, unsigned char *term); | ^ hamlibpy_wrap.c:4696:39: warning: passing 'unsigned char[256]' to parameter of type 'const char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign] 4696 | return PyUnicode_FromStringAndSize(reply_buffer, count); | ^~~~~~~~~~~~ /usr/include/python3.13/unicodeobject.h:123:17: note: passing argument to parameter 'u' here 123 | const char *u, /* UTF-8 encoded string */ | ^ hamlibpy_wrap.c:4698:37: warning: passing 'unsigned char[256]' to parameter of type 'const char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign] 4698 | return PyBytes_FromStringAndSize(reply_buffer, count); | ^~~~~~~~~~~~ /usr/include/python3.13/bytesobject.h:31:62: note: passing argument to parameter here 31 | PyAPI_FUNC(PyObject *) PyBytes_FromStringAndSize(const char *, Py_ssize_t); | ^ diff --git a/bindings/rig.swg b/bindings/rig.swg index eca597902..663a1c77f 100644 --- a/bindings/rig.swg +++ b/bindings/rig.swg @@ -742,7 +742,7 @@ int rig_spectrum_cb_python(RIG *rig, struct rig_spectrum_line *rig_spectrum_line PyObject *bytes_obj; Py_ssize_t send_len; int reply_len = MAX_RETURNSTR; - unsigned char reply_buffer[MAX_RETURNSTR]; + char reply_buffer[MAX_RETURNSTR]; int count; if (PyUnicode_Check(send_obj)) { @@ -771,7 +771,7 @@ int rig_spectrum_cb_python(RIG *rig, struct rig_spectrum_line *rig_spectrum_line return NULL; } - count = rig_send_raw(self->rig, send, send_len, reply_buffer, reply_len, term); + count = rig_send_raw(self->rig, (unsigned char *)send, send_len, (unsigned char *)reply_buffer, reply_len, (unsigned char *)term); self->error_status = count < 0 ? count : RIG_OK; if (PyUnicode_Check(send_obj)) { commit aa665d1e1976131d78df7203893d57b6b004cf4a Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Thu Sep 18 21:33:29 2025 +0200 Fix compiler warning issued by clang Fixes: hamlibpy_wrap.c:4668:46: warning: passing 'size_t *' (aka 'unsigned long *') to parameter of type 'Py_ssize_t *' (aka 'long *') converts between pointers to integer types with different sign [-Wpointer-sign] 4668 | PyBytes_AsStringAndSize(bytes_obj, &send, &send_len); | ^~~~~~~~~ diff --git a/bindings/rig.swg b/bindings/rig.swg index 76ef22df7..eca597902 100644 --- a/bindings/rig.swg +++ b/bindings/rig.swg @@ -740,7 +740,7 @@ int rig_spectrum_cb_python(RIG *rig, struct rig_spectrum_line *rig_spectrum_line { char *send, *term; PyObject *bytes_obj; - size_t send_len; + Py_ssize_t send_len; int reply_len = MAX_RETURNSTR; unsigned char reply_buffer[MAX_RETURNSTR]; int count; commit 4c3cf66d84f606b4f339a6f615c16532b1fcb0c4 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Thu Sep 18 21:28:35 2025 +0200 Fix compiler warnings issued by clang Fixes: hamlibpy_wrap.c:4194:12: warning: expression which evaluates to zero treated as a null pointer constant of type 'int *' [-Wnon-literal-null-conversion] 4194 | return RIG_OK; | ^~~~~~ hamlibpy_wrap.c:4213:12: warning: expression which evaluates to zero treated as a null pointer constant of type 'int *' [-Wnon-literal-null-conversion] 4213 | return RIG_OK; | ^~~~~~ hamlibpy_wrap.c:4230:12: warning: expression which evaluates to zero treated as a null pointer constant of type 'int *' [-Wnon-literal-null-conversion] 4230 | return RIG_OK; | ^~~~~~ hamlibpy_wrap.c:4248:12: warning: expression which evaluates to zero treated as a null pointer constant of type 'int *' [-Wnon-literal-null-conversion] 4248 | return RIG_OK; | ^~~~~~ hamlibpy_wrap.c:4266:12: warning: expression which evaluates to zero treated as a null pointer constant of type 'int *' [-Wnon-literal-null-conversion] 4266 | return RIG_OK; | ^~~~~~ hamlibpy_wrap.c:4282:12: warning: expression which evaluates to zero treated as a null pointer constant of type 'int *' [-Wnon-literal-null-conversion] 4282 | return RIG_OK; | ^~~~~~ hamlibpy_wrap.c:4298:12: warning: expression which evaluates to zero treated as a null pointer constant of type 'int *' [-Wnon-literal-null-conversion] 4298 | return RIG_OK; | ^~~~~~ diff --git a/bindings/rig.swg b/bindings/rig.swg index 9261058f8..76ef22df7 100644 --- a/bindings/rig.swg +++ b/bindings/rig.swg @@ -82,7 +82,7 @@ typedef channel_t * channel_t_p; typedef channel_t * const_channel_t_p; #ifdef SWIGPYTHON -int *rig_freq_cb_python(RIG *rig, vfo_t vfo, freq_t freq, rig_ptr_t arg) +int rig_freq_cb_python(RIG *rig, vfo_t vfo, freq_t freq, rig_ptr_t arg) { Rig *self = arg; PyObject *python_arguments; @@ -99,7 +99,7 @@ int *rig_freq_cb_python(RIG *rig, vfo_t vfo, freq_t freq, rig_ptr_t arg) return RIG_OK; } -int *rig_mode_cb_python(RIG *rig, vfo_t vfo, rmode_t rmode, pbwidth_t pbwidth, rig_ptr_t arg) +int rig_mode_cb_python(RIG *rig, vfo_t vfo, rmode_t rmode, pbwidth_t pbwidth, rig_ptr_t arg) { Rig *self = arg; PyObject *python_arguments; @@ -118,7 +118,7 @@ int *rig_mode_cb_python(RIG *rig, vfo_t vfo, rmode_t rmode, pbwidth_t pbwidth, r return RIG_OK; } -int *rig_vfo_cb_python(RIG *rig, vfo_t vfo, rig_ptr_t arg) +int rig_vfo_cb_python(RIG *rig, vfo_t vfo, rig_ptr_t arg) { Rig *self = arg; PyObject *python_arguments; @@ -135,7 +135,7 @@ int *rig_vfo_cb_python(RIG *rig, vfo_t vfo, rig_ptr_t arg) return RIG_OK; } -int *rig_ptt_cb_python(RIG *rig, vfo_t vfo, ptt_t ptt, rig_ptr_t arg) +int rig_ptt_cb_python(RIG *rig, vfo_t vfo, ptt_t ptt, rig_ptr_t arg) { Rig *self = arg; PyObject *python_arguments; @@ -153,7 +153,7 @@ int *rig_ptt_cb_python(RIG *rig, vfo_t vfo, ptt_t ptt, rig_ptr_t arg) return RIG_OK; } -int *rig_dcd_cb_python(RIG *rig, vfo_t vfo, dcd_t dcd, rig_ptr_t arg) +int rig_dcd_cb_python(RIG *rig, vfo_t vfo, dcd_t dcd, rig_ptr_t arg) { Rig *self = arg; PyObject *python_arguments; @@ -171,7 +171,7 @@ int *rig_dcd_cb_python(RIG *rig, vfo_t vfo, dcd_t dcd, rig_ptr_t arg) return RIG_OK; } -int *rig_pltune_cb_python(RIG *rig, vfo_t vfo, freq_t *freq, rmode_t *rmode, pbwidth_t *pbwidth, rig_ptr_t arg) +int rig_pltune_cb_python(RIG *rig, vfo_t vfo, freq_t *freq, rmode_t *rmode, pbwidth_t *pbwidth, rig_ptr_t arg) { Rig *self = arg; PyObject *python_arguments; @@ -187,7 +187,7 @@ int *rig_pltune_cb_python(RIG *rig, vfo_t vfo, freq_t *freq, rmode_t *rmode, pbw return RIG_OK; } -int *rig_spectrum_cb_python(RIG *rig, struct rig_spectrum_line *rig_spectrum_line, rig_ptr_t arg) +int rig_spectrum_cb_python(RIG *rig, struct rig_spectrum_line *rig_spectrum_line, rig_ptr_t arg) { Rig *self = arg; PyObject *python_arguments; ----------------------------------------------------------------------- Summary of changes: bindings/rig.swg | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-09-19 17:10:21
|
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 15d1fab7e889db8594ca07ee34607e3c97372727 (commit) via d13b041131b9211dea24134fdac89f508c413676 (commit) via 48dbe7e80a7a0190d7b88cb08f9581d55c868444 (commit) via 2e548f7de4e1198d73faafaec570a2ad49b00441 (commit) via e1dc6ee59a29f1f0da4857a31526c4927459159d (commit) via fcbd504b595a1f5070541a60c3652041d1bba76d (commit) via 39e7138469c3c7a9964f8f4cdfbc23e287f93085 (commit) via 2953d0f2c313a035563bd4144219716f47ccd05c (commit) via dead86d2906ea6295bb5db629114dd51ca67ea2d (commit) via a647c90c9e308d687b94e24b8debc6c5b2855678 (commit) via c367b2c138cf2e6e6d65b9907802603bc0b460fe (commit) from 95cd7391a22cf9963bfc984d8ad2fbec9659d3f8 (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 15d1fab7e889db8594ca07ee34607e3c97372727 Merge: 95cd7391a d13b04113 Author: Nate Bargmann <n0...@n0...> Date: Fri Sep 19 08:52:40 2025 -0500 Merge GitHub PR #1919 commit d13b041131b9211dea24134fdac89f508c413676 Merge: 48dbe7e80 d4401112d Author: markjfine <mar...@fi...> Date: Thu Sep 18 21:11:37 2025 -0400 Merge branch 'Hamlib:master' into test_gpredict commit 48dbe7e80a7a0190d7b88cb08f9581d55c868444 Merge: 2e548f7de 2a01ecdc5 Author: markjfine <mar...@fi...> Date: Tue Sep 16 16:18:54 2025 -0400 Merge branch 'Hamlib:master' into test_gpredict commit 2e548f7de4e1198d73faafaec570a2ad49b00441 Merge: e1dc6ee59 410c172ed Author: markjfine <mar...@fi...> Date: Sat Sep 13 09:18:22 2025 -0400 Merge branch 'Hamlib:master' into test_gpredict commit e1dc6ee59a29f1f0da4857a31526c4927459159d Merge: fcbd504b5 bae995413 Author: markjfine <mar...@fi...> Date: Thu Sep 11 06:41:58 2025 -0400 Merge branch 'Hamlib:master' into test_gpredict commit fcbd504b595a1f5070541a60c3652041d1bba76d Merge: 39e713846 8f33228a1 Author: markjfine <mar...@fi...> Date: Mon Sep 8 16:01:58 2025 -0400 Merge branch 'Hamlib:master' into test_gpredict commit 39e7138469c3c7a9964f8f4cdfbc23e287f93085 Merge: 2953d0f2c 0a06af1dd Author: markjfine <mar...@fi...> Date: Thu Aug 28 06:41:04 2025 -0400 Merge branch 'Hamlib:master' into test_gpredict commit 2953d0f2c313a035563bd4144219716f47ccd05c Merge: dead86d29 989623ec5 Author: markjfine <mar...@fi...> Date: Sat Aug 2 05:53:16 2025 -0400 Merge branch 'Hamlib:master' into test_gpredict commit dead86d2906ea6295bb5db629114dd51ca67ea2d Merge: a647c90c9 a9ecd5032 Author: markjfine <mar...@fi...> Date: Fri Aug 1 11:15:47 2025 -0400 Merge branch 'Hamlib:master' into test_gpredict commit a647c90c9e308d687b94e24b8debc6c5b2855678 Merge: c367b2c13 b4f0a3b4b Author: Mark J. Fine <mar...@fi...> Date: Thu Jul 31 14:35:31 2025 -0400 Merge branch 'test_gpredict' of https://github.com/markjfine/Hamlib into test_gpredict commit c367b2c138cf2e6e6d65b9907802603bc0b460fe Author: Mark J. Fine <mar...@fi...> Date: Thu Jul 31 14:32:01 2025 -0400 Initial rework of sdr#/gpredict backend diff --git a/rigs/dummy/sdrsharp.c b/rigs/dummy/sdrsharp.c index 19c6057de..1d7acf4b9 100644 --- a/rigs/dummy/sdrsharp.c +++ b/rigs/dummy/sdrsharp.c @@ -22,13 +22,15 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <math.h> +#include <stdbool.h> #include "hamlib/rig.h" #include "iofunc.h" #include "misc.h" -#define DEBUG 1 -#define DEBUG_TRACE DEBUG_VERBOSE +#define BACKEND_VER "20230127.0" + #define TRUE 1 #define FALSE 0 @@ -41,31 +43,15 @@ #define DEFAULTPATH "127.0.0.1:4532" #define SDRSHARP_VFOS (RIG_VFO_A) - +#define SDRSHARP_ANTS (RIG_ANT_1) #define SDRSHARP_MODES (RIG_MODE_NONE) struct sdrsharp_priv_data { - vfo_t curr_vfo; - char bandwidths[MAXBANDWIDTHLEN]; /* pipe delimited set */ - int nbandwidths; - char info[8192]; - ptt_t ptt; - split_t split; - rmode_t curr_modeA; - rmode_t curr_modeB; - freq_t curr_freqA; - freq_t curr_freqB; - pbwidth_t curr_widthA; - pbwidth_t curr_widthB; - int has_get_modeA; /* True if this function is available */ - int has_get_bwA; /* True if this function is available */ - int has_set_bwA; /* True if this function is available */ - float powermeter_scale; /* So we can scale power meter to 0-1 */ - value_t parms[RIG_SETTING_MAX]; - struct ext_list *ext_parms; + freq_t curr_freq; }; + /* * check_vfo * No assumptions @@ -91,6 +77,7 @@ static int check_vfo(vfo_t vfo) return (TRUE); } + /* * read_transaction * Assumes rig!=NULL, xml!=NULL, xml_len>=MAXXMLLEN @@ -151,7 +138,6 @@ static int read_transaction(RIG *rig, char *xml, int xml_len) if (strstr(xml, terminator)) { -// rig_debug(RIG_DEBUG_TRACE, "%s: got %s\n", __func__, terminator); retval = RIG_OK; } else @@ -163,6 +149,7 @@ static int read_transaction(RIG *rig, char *xml, int xml_len) RETURNFUNC(retval); } + /* * write_transaction * Assumes rig!=NULL, xml!=NULL, xml_len=total size of xml for response @@ -203,6 +190,7 @@ static int write_transaction(RIG *rig, char *xml, int xml_len) RETURNFUNC(retval); } + static int sdrsharp_transaction(RIG *rig, char *cmd, char *value, int value_len) { @@ -236,7 +224,10 @@ static int sdrsharp_transaction(RIG *rig, char *cmd, char *value, // if we get RIG_EIO the socket has probably disappeared // so bubble up the error so port can re re-opened - if (retval == -RIG_EIO) { set_transaction_inactive(rig); RETURNFUNC(retval); } + if (retval == -RIG_EIO) + { + set_transaction_inactive(rig); RETURNFUNC(retval); + } hl_usleep(50 * 1000); // 50ms sleep if error } @@ -254,7 +245,10 @@ static int sdrsharp_transaction(RIG *rig, char *cmd, char *value, if (value && strlen(value) == 0) { rig_debug(RIG_DEBUG_ERR, "%s: no value returned\n", __func__); - set_transaction_inactive(rig); RETURNFUNC(-RIG_EPROTO); + + set_transaction_inactive(rig); + + RETURNFUNC(-RIG_EPROTO); } ELAPSED2; @@ -262,6 +256,7 @@ static int sdrsharp_transaction(RIG *rig, char *cmd, char *value, RETURNFUNC(RIG_OK); } + /* * sdrsharp_init * Assumes rig!=NULL @@ -274,8 +269,7 @@ static int sdrsharp_init(RIG *rig) ENTERFUNC; rig_debug(RIG_DEBUG_TRACE, "%s version %s\n", __func__, rig->caps->version); - STATE(rig)->priv = (struct sdrsharp_priv_data *)calloc(1, sizeof( - struct sdrsharp_priv_data)); + STATE(rig)->priv = (struct sdrsharp_priv_data *)calloc(1, sizeof(struct sdrsharp_priv_data)); if (!STATE(rig)->priv) { @@ -285,18 +279,12 @@ static int sdrsharp_init(RIG *rig) priv = STATE(rig)->priv; memset(priv, 0, sizeof(struct sdrsharp_priv_data)); - memset(priv->parms, 0, RIG_SETTING_MAX * sizeof(value_t)); /* * set arbitrary initial status */ STATE(rig)->current_vfo = RIG_VFO_A; - priv->split = 0; - priv->ptt = 0; - priv->curr_modeA = -1; - priv->curr_modeB = -1; - priv->curr_widthA = -1; - priv->curr_widthB = -1; + priv->curr_freq = 0.0; if (!rig->caps) { @@ -305,9 +293,12 @@ static int sdrsharp_init(RIG *rig) strncpy(rp->pathname, DEFAULTPATH, sizeof(rp->pathname)); + rig_debug(RIG_DEBUG_TRACE, "%s pathanme %s\n", __func__, rp->pathname); + RETURNFUNC(RIG_OK); } + /* * sdrsharp_get_freq * Assumes rig!=NULL, STATE(rig)->priv!=NULL, freq!=NULL @@ -315,14 +306,12 @@ static int sdrsharp_init(RIG *rig) static int sdrsharp_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) { char value[MAXARGLEN]; - struct sdrsharp_priv_data *priv = (struct sdrsharp_priv_data *) STATE( - rig)->priv; + struct sdrsharp_priv_data *priv = (struct sdrsharp_priv_data *) STATE(rig)->priv; ENTERFUNC; rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s\n", __func__, rig_strvfo(vfo)); - if (check_vfo(vfo) == FALSE) { rig_debug(RIG_DEBUG_ERR, "%s: unsupported VFO %s\n", @@ -333,7 +322,7 @@ static int sdrsharp_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) if (vfo == RIG_VFO_CURR) { vfo = STATE(rig)->current_vfo; - rig_debug(RIG_DEBUG_TRACE, "%s: get_freq2 vfo=%s\n", + rig_debug(RIG_DEBUG_TRACE, "%s: get_freq vfo=%s\n", __func__, rig_strvfo(vfo)); } @@ -366,11 +355,7 @@ static int sdrsharp_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) if (vfo == RIG_VFO_A) { - priv->curr_freqA = *freq; - } - else // future support in SDRSHARP maybe? - { - priv->curr_freqB = *freq; + priv->curr_freq = *freq; } RETURNFUNC(RIG_OK); @@ -378,7 +363,7 @@ static int sdrsharp_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) /* * sdrsharp_open -* Assumes rig!=NULL, STATE(rig)->priv!=NULL +* Assumes rig!=NULL */ static int sdrsharp_open(RIG *rig) { @@ -405,6 +390,7 @@ static int sdrsharp_open(RIG *rig) RETURNFUNC(retval); } + /* * sdrsharp_close * Assumes rig!=NULL @@ -416,14 +402,14 @@ static int sdrsharp_close(RIG *rig) RETURNFUNC(RIG_OK); } + /* * sdrsharp_cleanup * Assumes rig!=NULL, STATE(rig)->priv!=NULL */ static int sdrsharp_cleanup(RIG *rig) { - struct sdrsharp_priv_data *priv; - + ENTERFUNC; rig_debug(RIG_DEBUG_TRACE, "%s\n", __func__); if (!rig) @@ -431,9 +417,6 @@ static int sdrsharp_cleanup(RIG *rig) RETURNFUNC2(-RIG_EINVAL); } - priv = (struct sdrsharp_priv_data *)STATE(rig)->priv; - - free(priv->ext_parms); free(STATE(rig)->priv); STATE(rig)->priv = NULL; @@ -462,6 +445,20 @@ static int sdrsharp_cleanup(RIG *rig) } +/* +* sdrsharp_get_vfo +* assumes rig!=NULL, vfo != NULL +*/ +static int sdrsharp_get_vfo(RIG *rig, vfo_t *vfo) +{ + ENTERFUNC; + + *vfo = RIG_VFO_A; + + RETURNFUNC(RIG_OK); +} + + /* * sdrsharp_set_freq * assumes rig!=NULL, STATE(rig)->priv!=NULL @@ -472,8 +469,7 @@ static int sdrsharp_set_freq(RIG *rig, vfo_t vfo, freq_t freq) char cmd[MAXARGLEN]; char value[1024]; - //struct sdrsharp_priv_data *priv = (struct sdrsharp_priv_data *) STATE(rig)->priv; - + ENTERFUNC; rig_debug(RIG_DEBUG_TRACE, "%s\n", __func__); rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s freq=%.0f\n", __func__, rig_strvfo(vfo), freq); @@ -485,16 +481,14 @@ static int sdrsharp_set_freq(RIG *rig, vfo_t vfo, freq_t freq) RETURNFUNC2(-RIG_EINVAL); } -#if 0 - if (vfo == RIG_VFO_CURR) { vfo = STATE(rig)->current_vfo; + rig_debug(RIG_DEBUG_TRACE, "%s: set_freq vfo=%s\n", + __func__, rig_strvfo(vfo)); } -#endif - - SNPRINTF(cmd, sizeof(cmd), "F %.0lf\n", freq); + SNPRINTF(cmd, sizeof(cmd), "F %lf\n", freq); retval = sdrsharp_transaction(rig, cmd, value, sizeof(value)); @@ -508,65 +502,73 @@ static int sdrsharp_set_freq(RIG *rig, vfo_t vfo, freq_t freq) RETURNFUNC2(retval); } -/* -* sdrsharp_get_vfo -* assumes rig!=NULL, vfo != NULL -*/ -static int sdrsharp_get_vfo(RIG *rig, vfo_t *vfo) -{ - ENTERFUNC; - - *vfo = RIG_VFO_A; - - RETURNFUNC(RIG_OK); -} struct rig_caps sdrsharp_caps = { RIG_MODEL(RIG_MODEL_SDRSHARP), .model_name = "SDR#/gpredict", .mfg_name = "Airspy", - .version = "20230127.0", + .version = BACKEND_VER, .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_RECEIVER, - //.targetable_vfo = RIG_TARGETABLE_FREQ | RIG_TARGETABLE_MODE, - .ptt_type = RIG_PTT_RIG, + .ptt_type = RIG_PTT_NONE, + .dcd_type = RIG_DCD_NONE, .port_type = RIG_PORT_NETWORK, - .write_delay = 0, - .post_write_delay = 0, + .write_delay = 1, + .post_write_delay = 100, .timeout = 1000, .retry = 2, - .filters = { - {RIG_MODE_ALL, RIG_FLT_ANY}, - RIG_FLT_END - }, - - .rx_range_list1 = {{ - .startf = kHz(1), .endf = GHz(10), .modes = SDRSHARP_MODES, - .low_power = -1, .high_power = -1, SDRSHARP_VFOS, RIG_ANT_1 - }, + .has_get_func = false, + .has_set_func = false, + .has_get_level = false, + .has_set_level = false, + .has_get_parm = false, + .has_set_parm = false, + .level_gran = {}, + .parm_gran = {}, + .ctcss_list = NULL, + .dcs_list = NULL, + .max_rit = Hz(0), + .max_xit = Hz(0), + .max_ifshift = Hz(0), + .targetable_vfo = 0, + .transceive = RIG_TRN_OFF, + .vfo_ops = 0, + .scan_ops = 0, + .bank_qty = 0, + .chan_desc_sz = 0, + .priv = NULL, + + .chan_list = {RIG_CHAN_END,}, + + .rx_range_list1 = { + { Hz(1), GHz(10), SDRSHARP_MODES, -1, -1, SDRSHARP_VFOS, SDRSHARP_ANTS}, RIG_FRNG_END, }, .tx_range_list1 = {RIG_FRNG_END,}, - .rx_range_list2 = {{ - .startf = kHz(1), .endf = GHz(10), .modes = SDRSHARP_MODES, - .low_power = -1, .high_power = -1, SDRSHARP_VFOS, RIG_ANT_1 - }, + .rx_range_list2 = { + { Hz(1), GHz(10), SDRSHARP_MODES, -1, -1, SDRSHARP_VFOS, SDRSHARP_ANTS}, RIG_FRNG_END, }, .tx_range_list2 = {RIG_FRNG_END,}, - .tuning_steps = { {SDRSHARP_MODES, 1}, {SDRSHARP_MODES, RIG_TS_ANY}, RIG_TS_END, }, - .priv = NULL, /* priv */ + .tuning_steps = { + {SDRSHARP_MODES, 1}, + {SDRSHARP_MODES, RIG_TS_ANY}, + RIG_TS_END, }, + .filters = { + {RIG_MODE_ALL, RIG_FLT_ANY}, + RIG_FLT_END + }, .rig_init = sdrsharp_init, .rig_open = sdrsharp_open, .rig_close = sdrsharp_close, .rig_cleanup = sdrsharp_cleanup, - .get_vfo = sdrsharp_get_vfo, - .set_freq = sdrsharp_set_freq, - .get_freq = sdrsharp_get_freq, + .get_vfo = sdrsharp_get_vfo, //always RIG_VFO_A + .set_freq = sdrsharp_set_freq, //F <frequency Hz>\n + .get_freq = sdrsharp_get_freq, //f\n .hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS }; ----------------------------------------------------------------------- Summary of changes: rigs/dummy/sdrsharp.c | 182 +++++++++++++++++++++++++------------------------- 1 file changed, 92 insertions(+), 90 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-09-19 13:37: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, master has been updated via 95cd7391a22cf9963bfc984d8ad2fbec9659d3f8 (commit) via 567d6f27f496d4680fa84e831033a57b360e4138 (commit) via 7ed63e2e20e15d71429310edc02791853c5a7580 (commit) via fb04375e3689506529e334b514fd36bc2d579f0d (commit) from d4401112d06d1a85440ed216684d44f579cc15fe (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 95cd7391a22cf9963bfc984d8ad2fbec9659d3f8 Merge: d4401112d 567d6f27f Author: Nate Bargmann <n0...@n0...> Date: Fri Sep 19 08:07:16 2025 -0500 Merge GitHub PR #1917 commit 567d6f27f496d4680fa84e831033a57b360e4138 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Thu Sep 18 19:18:15 2025 +0200 Add rule to build libmisc.la diff --git a/c++/Makefile.am b/c++/Makefile.am index b1e9d03a7..51b8fab8e 100644 --- a/c++/Makefile.am +++ b/c++/Makefile.am @@ -16,4 +16,7 @@ TESTS = $(check_PROGRAMS) $(top_builddir)/src/libhamlib.la: $(MAKE) -C $(top_builddir)/src/ libhamlib.la +$(top_builddir)/lib/libmisc.la: + $(MAKE) -C $(top_builddir)/lib/ libmisc.la + endif commit 7ed63e2e20e15d71429310edc02791853c5a7580 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Thu Sep 18 18:52:33 2025 +0200 Fix build failure when trying to build simulators on a clean tree Fixes: make[1]: *** No rule to make target '../lib/libmisc.la', needed by 'simatd578'. Stop. Steps to reproduce: make clean make -j12 -C simulators check diff --git a/simulators/Makefile.am b/simulators/Makefile.am index 2dd759f64..a87f73f67 100644 --- a/simulators/Makefile.am +++ b/simulators/Makefile.am @@ -101,3 +101,6 @@ EXTRA_DIST = sim.h simft990.dat $(top_builddir)/src/libhamlib.la: $(MAKE) -C $(top_builddir)/src/ libhamlib.la + +$(top_builddir)/lib/libmisc.la: + $(MAKE) -C $(top_builddir)/lib/ libmisc.la commit fb04375e3689506529e334b514fd36bc2d579f0d Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Wed Sep 17 21:47:36 2025 +0200 Fix build failure when trying to build tests on a clean tree Fixes: make: *** No rule to make target '../lib/libmisc.la', needed by 'rigctl'. Steps to reproduce: make clean make -j12 -C tests diff --git a/tests/Makefile.am b/tests/Makefile.am index bfc57de9c..f46194546 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -127,6 +127,9 @@ TESTS = $(check_SCRIPTS) $(top_builddir)/src/libhamlib.la: $(MAKE) -C $(top_builddir)/src/ libhamlib.la +$(top_builddir)/lib/libmisc.la: + $(MAKE) -C $(top_builddir)/lib/ libmisc.la + testrig.sh: echo 'LD_LIBRARY_PATH=$(top_builddir)/src/.libs:$(top_builddir)/dummy/.libs ./testrig 1' > testrig.sh chmod +x ./testrig.sh ----------------------------------------------------------------------- Summary of changes: c++/Makefile.am | 3 +++ simulators/Makefile.am | 3 +++ tests/Makefile.am | 3 +++ 3 files changed, 9 insertions(+) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-09-18 16:11: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 branch, master has been updated via d4401112d06d1a85440ed216684d44f579cc15fe (commit) via fa72d4fe9d30a8ad875d40a20a75520c7bfc44a3 (commit) from 5b9ce8c5d10133f3b84775307ebf0ecf15253c7b (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 d4401112d06d1a85440ed216684d44f579cc15fe Author: Nate Bargmann <n0...@n0...> Date: Thu Sep 18 11:08:14 2025 -0500 Update Windows build scripts for pkg-config Add values for LIBUSB_CFLAGS and LIBUSB_LIBS to override pkg-config search for libusb-1.0. The scripts were tested with the prior AC_CHECK_HEADERS detection and pkg-config. diff --git a/scripts/build-w32.sh b/scripts/build-w32.sh index ea6fc8904..5c4c11b68 100755 --- a/scripts/build-w32.sh +++ b/scripts/build-w32.sh @@ -252,7 +252,10 @@ END_OF_README --without-cxx-binding \ --disable-static \ CPPFLAGS="-I${LIBUSB_1_0_BIN_PATH}/include" \ - LDFLAGS="-L${LIBUSB_1_0_BIN_PATH}/MinGW32/dll" + LDFLAGS="-L${LIBUSB_1_0_BIN_PATH}/MinGW32/dll" \ + LIBUSB_CFLAGS="-I${LIBUSB_1_0_BIN_PATH}/include/libusb-1.0" \ + LIBUSB_LIBS="-lusb-1.0" + make -j 4 --no-print-directory install diff --git a/scripts/build-w64.sh b/scripts/build-w64.sh index 0fa2addb8..54d19746c 100755 --- a/scripts/build-w64.sh +++ b/scripts/build-w64.sh @@ -245,14 +245,20 @@ http://www.hamlib.org END_OF_README +echo $PKG_CONFIG_PATH + # Configure and build hamlib for x86_64-w64-mingw32, with libusb-1.0 ./configure --host=${HOST_ARCH} \ + --build=$(uname -m) \ + --target=${HOST_ARCH} \ --prefix=${INST_DIR} \ --without-cxx-binding \ --disable-static \ CPPFLAGS="-I${LIBUSB_1_0_BIN_PATH}/include" \ - LDFLAGS="-L${LIBUSB_1_0_BIN_PATH}/MinGW64/dll" + LDFLAGS="-L${LIBUSB_1_0_BIN_PATH}/MinGW64/dll" \ + LIBUSB_CFLAGS="-I${LIBUSB_1_0_BIN_PATH}/include/libusb-1.0" \ + LIBUSB_LIBS="-lusb-1.0" make -j 4 --no-print-directory install commit fa72d4fe9d30a8ad875d40a20a75520c7bfc44a3 Author: Philip Rose <gm...@bt...> Date: Wed Sep 10 22:17:43 2025 +0100 Use proper syntax for MS Windows command line options Phil, GM3ZZA, writes: I have finally got round to building my app with 4.6.5 on Windows. My previous instructions for building the .lib for MSVC are slightly wrong. It has the wrong flavour slash for the Windows switch indicator. 73 Phil GM3ZZA. diff --git a/scripts/build-w32.sh b/scripts/build-w32.sh index e518d27b8..ea6fc8904 100755 --- a/scripts/build-w32.sh +++ b/scripts/build-w32.sh @@ -214,7 +214,7 @@ correct directory to the path and allows update of "C:\Program Files" with the Then (in my case). cd "C:\Program Files\hamlib-w32-${RELEASE}\lib\msvc" -lib \def:libhamlib-4.def \machine:x86 +lib /def:libhamlib-4.def /machine:x86 If you use any other terminal then the full path to lib.exe is needed (today it is diff --git a/scripts/build-w64.sh b/scripts/build-w64.sh index 40f0643ce..0fa2addb8 100755 --- a/scripts/build-w64.sh +++ b/scripts/build-w64.sh @@ -214,7 +214,7 @@ correct directory to the path and allows update of "C:\Program Files" with the Then (in my case). cd "C:\Program Files\hamlib-w64-${RELEASE}\lib\msvc" -lib \def:libhamlib-4.def \machine:x64 +lib /def:libhamlib-4.def /machine:x64 If you use any other terminal then the full path to lib.exe is needed (today it is ----------------------------------------------------------------------- Summary of changes: scripts/build-w32.sh | 7 +++++-- scripts/build-w64.sh | 10 ++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-09-18 15:43:55
|
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 5b9ce8c5d10133f3b84775307ebf0ecf15253c7b (commit) from 709b89da5867cec689bf72b4742b8a25eb6adb17 (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 5b9ce8c5d10133f3b84775307ebf0ecf15253c7b Author: Nate Bargmann <n0...@n0...> Date: Thu Sep 18 10:38:40 2025 -0500 Partially revert commit 9ecd50 Per request from Uwe, DG2YCB, partially revert the commit to close GitHub issue #1013. Ref https://sourceforge.net/p/hamlib/mailman/message/59234352/ diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index 6343fb352..94a039b08 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -144,8 +144,8 @@ struct rig_caps flrig_caps = { RIG_MODEL(RIG_MODEL_FLRIG), .model_name = "FLRig", - .mfg_name = "W1HKJ", - .version = "20250107.1", + .mfg_name = "FLRig", + .version = "20250107.2", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, diff --git a/rigs/dummy/gqrx.c b/rigs/dummy/gqrx.c index b8b8d1b32..cf1f43ca3 100644 --- a/rigs/dummy/gqrx.c +++ b/rigs/dummy/gqrx.c @@ -32,7 +32,7 @@ #include <cal.h> #include "idx_builtin.h" -#define BACKEND_VER "20250718.1" +#define BACKEND_VER "20250718.2" #define TRUE 1 #define FALSE 0 @@ -938,7 +938,7 @@ struct rig_caps gqrx_caps = { RIG_MODEL(RIG_MODEL_GQRX), .model_name = "GQRX", - .mfg_name = "OZ9AEC", + .mfg_name = "GQRX", .version = BACKEND_VER, .copyright = "LGPL", .status = RIG_STATUS_NEW, ----------------------------------------------------------------------- Summary of changes: rigs/dummy/flrig.c | 4 ++-- rigs/dummy/gqrx.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-09-18 14:32:13
|
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 709b89da5867cec689bf72b4742b8a25eb6adb17 (commit) from ee439484d4748b82e6a7fddbaf3ad3a584d4bd09 (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 709b89da5867cec689bf72b4742b8a25eb6adb17 Author: Nate Bargmann <n0...@n0...> Date: Thu Sep 18 09:25:16 2025 -0500 Test for the presence of pkg-config in bootstrap Test the version of pkg-config during autoreconf. Document the requirement for pkg-config for bootstrap. diff --git a/README.developer b/README.developer index 614dc4579..7910296d1 100644 --- a/README.developer +++ b/README.developer @@ -251,10 +251,16 @@ differ). * automake 1.16 # automake --version * libtool 2.4.6 # libtool --version * Git 2.30 # git --version +* pkg-config 0.29.2 # pkg-config --version (libusb) As of Hamlib 4.7.0 (commit e09007a), POSIX thread support (pthreads) is required to compile or run Hamlib. +As of Hamlib 4.7.0 (commit d04364e), pkg-config (replaced by pkgconf for the +most part) is required for bootstrap to install the pkg.m4 file which enables +the pkg-config facility (bootstrap will now fail if some version of pkg-config +is not found; its version will be checked during the autoreconf stage). + Optional, but highly recommended: * GNU C++ # Build C++ binding and INDI backend * swig (for bindings) # Generate wrappers for the bindings @@ -269,7 +275,6 @@ Optional, but highly recommended: * libnova devel * libusb-1.0 devel # 1.0.24 or newer * libreadline devel # ver 5.2 or newer -* pkg-config # pkg-config --version (libxml and USRP) * zlib1g devel # (rigmatrix) N.B.: The libusb-1.0 package is required for building most of the 'kit' diff --git a/bootstrap b/bootstrap index db85b1e9d..15ced7cc1 100755 --- a/bootstrap +++ b/bootstrap @@ -8,6 +8,7 @@ LIBTOOLIZE=libtoolize AUTORECONF=autoreconf AUTOMAKE=automake +PKGCONFIG=pkg-config # Check if we compile on OSX and resolve the name conflict with # Apple's tool for creating Mach-O dynamic libraries. @@ -48,6 +49,14 @@ DIE=0 DIE=1 } +("$PKGCONFIG" --version) > /dev/null 2>&1 || { + echo + echo "You must have pkg-config 0.29.2 or newer (replaced by pkgconf" + echo "for the most part) installed to compile $PROJECT." + echo "Download the appropriate package for your distribution." + DIE=1 +} + if test "$DIE" -eq 1; then exit 1 fi diff --git a/configure.ac b/configure.ac index 327e3823f..5e55c1d0f 100644 --- a/configure.ac +++ b/configure.ac @@ -447,6 +447,11 @@ dnl available. At least pkg-config/pkgconf version 0.29.2 or newer is required dnl for support of these modules. If pkg-config or pkgconf is not installed, dnl their support will be gracefully disabled. +dnl Ensure that the PKG_PREREQ macro is defined: +m4_ifndef([PKG_PREREQ], + [m4_fatal([must install pkg-config (or pkgconf) 0.29.2 or later before running bootstrap])]) + +PKG_PREREQ([0.29.2]) PKG_PROG_PKG_CONFIG([0.29.2]) dnl Check for libusb, treat LIBUSB_LIBS and LIBUSB_CFLAGS as precious variables. ----------------------------------------------------------------------- Summary of changes: README.developer | 7 ++++++- bootstrap | 9 +++++++++ configure.ac | 5 +++++ 3 files changed, 20 insertions(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-09-18 02:51:33
|
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 ee439484d4748b82e6a7fddbaf3ad3a584d4bd09 (commit) via 48a53a0492b2d4b761003b44c9a2984c2e6977a1 (commit) via d04364e685e9a020afc907e86dfab66423a014ad (commit) via 65c766e1b33c718e2e25079f469d1751e256c336 (commit) via 33706f8a733efd06001fe599bdbdf15cf1626628 (commit) via 8196e9ccd9731c2e9a1e71c452bb28e15f31c132 (commit) from fd68f3874353e415a7b177f45379a75bb656909b (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 ee439484d4748b82e6a7fddbaf3ad3a584d4bd09 Merge: 48a53a049 33706f8a7 Author: Nate Bargmann <n0...@n0...> Date: Wed Sep 17 21:39:00 2025 -0500 Merge branch 'N0NB-issue-1892' of github.com:N0NB/Hamlib into N0NB-issue-1892 commit 48a53a0492b2d4b761003b44c9a2984c2e6977a1 Author: Nate Bargmann <n0...@n0...> Date: Wed Sep 17 21:36:26 2025 -0500 Update NEWS for libusb detection via pkg-config Use spaces for indentation. diff --git a/NEWS b/NEWS index 23b9189fe..0a1c50f4f 100644 --- a/NEWS +++ b/NEWS @@ -14,11 +14,12 @@ Version 5.x -- future Version 4.7.0 * 2025-12-01 (target) - * Some internal functions change names to avoid conflicts with apps. - * POSIX threads are required to build and run Hamlib. Note that it was - actually the case for 4.6.x, but now the configuration step will - fail instead of the compilation. - * Functions rig_get_conf, rot_get_conf, amp_get_conf deprecated; + * libusb is now detected using the pkg-config facility. + * Some internal functions change names to avoid conflicts with apps. + * POSIX threads are required to build and run Hamlib. Note that it was + actually the case for 4.6.x, but now the configuration step will + fail instead of the compilation. + * Functions rig_get_conf, rot_get_conf, amp_get_conf deprecated; use *_get_conf2() instead. Also rig_set_trn and rig_get_trn deprecated. * 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. commit d04364e685e9a020afc907e86dfab66423a014ad Author: Nate Bargmann <n0...@n0...> Date: Tue Sep 9 18:59:59 2025 -0500 Use pkgconf/pkg-config to test for libusb-1.0 As reported in GitHub issue #1892, configure on FreeBSD failed to search for the name of the library correctly which is libusb. As pkg-config correctly holds the library name for linking, modify the search for libusb-1.0 to use the pkg-config capability. If pkg-config (now largely replaced by pkgconf) is not installed or found, the modules depending on it will be gracefull disabled, i.e. the configure script will complete with those modules disabled. Modify the output summary to use spaces instead of tabs as things were not lining up nicely in my FreeBSD terminal. Rename the Automake substituted variable 'HAVE_LIBUSB' to 'TESTS_HAVE_LIBUSB' to avoid confusion with identically named variable written to include/hamlib/config.h. Likewise, rename the AutoConf substituted name 'LIBUSB' to 'HAMLIB_PC_LIBUSB' to avoid confusion with the 'LIBUSB' string passed to PKG_CHECK_MODULES. Update hamlib.pc.in and tests/Makefile.am to use the new variable names. Make sure all source files no longer reference HAVE_LIBUSB_H or HAVE_LIBUSB_1_0_LIBUSB_H as these variables no longer exist. Fix src/Makefile.am to provide include path for usb_port.c. diff --git a/android/config.h b/android/config.h index 9163a5a47..1487c89e9 100644 --- a/android/config.h +++ b/android/config.h @@ -82,6 +82,9 @@ /* Define to 1 if you have the `syslog' library (-lsyslog). */ /* #undef HAVE_LIBSYSLOG */ +/* Define if libusb-1.0 is available */ +//#define HAVE_LIBUSB 1 + /* Define to 1 if you have the <linux/ioctl.h> header file. */ #define HAVE_LINUX_IOCTL_H 1 @@ -222,12 +225,6 @@ /* Define to 1 if you have the <unistd.h> header file. */ #define HAVE_UNISTD_H 1 -/* Define to 1 if you have the <libusb.h> header file. */ -//#define HAVE_LIBUSB_H 1 - -/* Define to 1 if you have the <libusb-1.0/libusb.h> header file. */ -//#define HAVE_LIBUSB_1_0_LIBUSB_H 1 - /* Define to 1 if you have the `usleep' function. */ #define HAVE_USLEEP 1 diff --git a/configure.ac b/configure.ac index e9fc775b8..327e3823f 100644 --- a/configure.ac +++ b/configure.ac @@ -347,42 +347,6 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], "Have you considered GCC lately?."]) ]) -dnl Check for libusb, treat LIBUSB_LIBS and LIBUSB_CFLAGS as precious variables -AC_MSG_CHECKING([whether to build USB dependent backends]) -AC_ARG_WITH([libusb], - [AS_HELP_STRING([--without-libusb], - [disable USB dependent backends @<:@default=yes@:>@])], - [cf_with_libusb=$with_libusb], - [cf_with_libusb=yes] - ) - -AC_MSG_RESULT([$cf_with_libusb]) - -LIBUSB="" -AC_ARG_VAR([LIBUSB_CFLAGS], [C compiler flags for libusb, overriding configure defaults]) -AC_ARG_VAR([LIBUSB_LIBS], [linker flags for libusb, overriding configure check (useful for specifying static libusb-1.0.a (see INSTALL))]) - -AS_IF([test x"${cf_with_libusb}" = "xyes"], [ - AS_IF([test -z $LIBUSB_LIBS], - [AC_CHECK_LIB([usb-1.0], [libusb_init], [LIBUSB_LIBS="-lusb-1.0"], - [AC_MSG_WARN([libusb_init was not found in libusb-1.0--USB backends will be disabled])] - [cf_with_libusb="no"]) - ], [cf_with_libusb="yes"]) - - AS_IF([test x"${cf_with_libusb}" = "xyes"], - [AC_CHECK_HEADERS([libusb.h libusb-1.0/libusb.h]) - AC_DEFINE([HAVE_LIBUSB], - [1], - [Define if libusb-1.0 is available]) - LIBUSB="libusb-1.0"])]) - -AM_CONDITIONAL([HAVE_LIBUSB], [test x"${cf_with_libusb}" = "xyes"]) -AC_SUBST([HAVE_LIBUSB]) - -# Only used in hamlib.pc.in -AC_SUBST([LIBUSB]) - - dnl Check if readline support in rigctl/rotctl is wanted AC_MSG_CHECKING([whether to use readline in rigctl/rotctl]) AC_ARG_WITH([readline], @@ -478,10 +442,46 @@ AM_CONDITIONAL([HTML_MATRIX], [test x"${cf_enable_html_matrix}" = "xyes"]) ## PKG Config support ## ## ------------------ ## -dnl These features rely on the external pkg-config functionality being available. -dnl Test for pkg-config only when these features are enabled. +dnl These features rely on the external pkg-config/pkgconf functionality being +dnl available. At least pkg-config/pkgconf version 0.29.2 or newer is required +dnl for support of these modules. If pkg-config or pkgconf is not installed, +dnl their support will be gracefully disabled. + +PKG_PROG_PKG_CONFIG([0.29.2]) + +dnl Check for libusb, treat LIBUSB_LIBS and LIBUSB_CFLAGS as precious variables. +AC_MSG_CHECKING([whether to build USB dependent backends]) +AC_ARG_WITH([libusb], + [AS_HELP_STRING([--without-libusb], + [disable USB dependent backends @<:@default=yes@:>@])], + [cf_with_libusb=$with_libusb], + [cf_with_libusb=yes] + ) + +AC_MSG_RESULT([$cf_with_libusb]) + +dnl Only used in hamlib.pc.in +HAMLIB_PC_LIBUSB="" + +AS_IF([test x"${cf_with_libusb}" = "xyes"], [ + PKG_CHECK_MODULES([LIBUSB], + [libusb-1.0], + [AC_DEFINE([HAVE_LIBUSB], + [1], + [Define if libusb-1.0 is available]) + HAMLIB_PC_LIBUSB="libusb-1.0"], + [AC_MSG_WARN([libusb-1.0 or pkg_config not found, USB backend support will be disabled]) + cf_with_libusb=no + ]) + ]) + +AC_SUBST([HAMLIB_PC_LIBUSB]) + +dnl Configure the tests/Makefile.am conditional +AM_CONDITIONAL([TESTS_HAVE_LIBUSB], [test x"${cf_with_libusb}" = "xyes"]) -# libxml2 required rigmem xml support, make it user optional + +dnl libxml2 required for rigmem XML support; make it build time optional. AC_MSG_CHECKING([whether to build rigmem XML support]) AC_ARG_WITH([xml-support], [AS_HELP_STRING([--with-xml-support], @@ -490,8 +490,19 @@ AC_ARG_WITH([xml-support], [cf_with_xml_support=no]) AC_MSG_RESULT([$cf_with_xml_support]) +AS_IF([test x"${cf_with_xml_support}" = "xyes"], [ + PKG_CHECK_MODULES([LIBXML2], + [libxml-2.0], + [AC_DEFINE([HAVE_XML2], + [1], + [Define if libxml2 is available])], + [AC_MSG_WARN([libxml-2.0 or pkgconf/pkg-config not found, XML support will be disabled]) + ]) + ]) + -# USRP needs a C++ compiler, tested for presence above. +dnl USRP needs a C++ compiler, tested for presence above. +dnl Default is to not build USRP support. AS_IF([test x"${cf_with_cxx}" = "xyes"], [ AC_MSG_CHECKING([whether to build USRP backend]) AC_ARG_ENABLE([usrp], @@ -502,39 +513,6 @@ AS_IF([test x"${cf_with_cxx}" = "xyes"], [ AC_MSG_RESULT([$cf_with_usrp]) ]) -dnl Only check for pkg-config when either of the dependent features are enabled. - -AS_IF([test x"${cf_with_xml_support}" = "xyes" || test x"${cf_with_usrp}" = "xyes"], [ -dnl Check for pkg-config presence and if not installed define a dummy macro -dnl to disable libxml2 and USRP use. Code borrowed from: -dnl http://lists.gnu.org/archive/html/automake/2011-03/msg00008.html -dnl -dnl Check for pkg-config program, used for configuring some libraries. - m4_define_default([PKG_PROG_PKG_CONFIG], - [AC_MSG_CHECKING([pkg-config]) - AC_MSG_RESULT([no])]) - - PKG_PROG_PKG_CONFIG - -dnl If the pkg-config autoconf support isn't installed, define its -dnl autoconf macro to disable any packages depending on it. - m4_define_default([PKG_CHECK_MODULES], - [AC_MSG_CHECKING([$1]) - AC_MSG_RESULT([no]) - $4]) - ]) - - -AS_IF([test x"${cf_with_xml_support}" = "xyes"], [ - PKG_CHECK_MODULES([LIBXML2], - [libxml-2.0], - [AC_DEFINE([HAVE_XML2], - [1], - [Define if libxml2 is available])], - [AC_MSG_WARN([libxml-2.0 pkg-config not found, XML support will be disabled]) - ]) - ]) - AC_SUBST([LIBXML2_LIBS]) AC_SUBST([LIBXML2_CFLAGS]) @@ -990,28 +968,28 @@ echo \ ${PACKAGE_NAME} Version ${PACKAGE_VERSION} configuration: - Prefix ${prefix} - Preprocessor ${CPP} ${CPPFLAGS} - C Compiler ${CC} ${CFLAGS} - C++ Compiler ${CXX} ${CXXFLAGS} + Prefix ${prefix} + Preprocessor ${CPP} ${CPPFLAGS} + C Compiler ${CC} ${CFLAGS} + C++ Compiler ${CXX} ${CXXFLAGS} Package features: - With C++ binding ${cf_with_cxx_binding} - With Perl binding ${cf_with_perl_binding} - With Python binding ${cf_with_python_binding} - With TCL binding ${build_tcl} - With Lua binding ${cf_with_lua_binding} - With rigmem XML support ${cf_with_xml_support} - With Readline support ${cf_with_readline_support} - With INDI support ${cf_with_indi_support} + With C++ binding ${cf_with_cxx_binding} + With Perl binding ${cf_with_perl_binding} + With Python binding ${cf_with_python_binding} + With TCL binding ${build_tcl} + With Lua binding ${cf_with_lua_binding} + With rigmem XML support ${cf_with_xml_support} + With Readline support ${cf_with_readline_support} + With INDI support ${cf_with_indi_support} Enable HTML rig feature matrix ${cf_enable_html_matrix} - Enable WinRadio ${cf_with_winradio} - Enable Parallel ${cf_with_parallel} - Enable USRP ${cf_with_usrp} - Enable USB backends ${cf_with_libusb} - Enable shared libs ${enable_shared} - Enable static libs ${enable_static} - Enable Python tests ${enable_pytest} + Enable WinRadio ${cf_with_winradio} + Enable Parallel ${cf_with_parallel} + Enable USRP ${cf_with_usrp} + Enable USB backends ${cf_with_libusb} + Enable shared libs ${enable_shared} + Enable static libs ${enable_static} + Enable Python tests ${enable_pytest} -----------------------------------------------------------------------" diff --git a/hamlib.pc.in b/hamlib.pc.in index a08b29726..f6b8d1af9 100644 --- a/hamlib.pc.in +++ b/hamlib.pc.in @@ -7,7 +7,7 @@ Name: @PACKAGE_NAME@ Description: Library to control radio and rotator equipment. URL: @PACKAGE_URL@ Version: @PACKAGE_VERSION@ -Requires.private: @LIBUSB@ +Requires.private: @HAMLIB_PC_LIBUSB@ Cflags: -I${includedir} @PTHREAD_CFLAGS@ Libs: -L${libdir} -lhamlib Libs.private: @MATH_LIBS@ @DL_LIBS@ @NET_LIBS@ @PTHREAD_LIBS@ diff --git a/rigs/kit/dwt.c b/rigs/kit/dwt.c index afbdb4274..3416998f6 100644 --- a/rigs/kit/dwt.c +++ b/rigs/kit/dwt.c @@ -503,13 +503,12 @@ static const char *dwtdll_get_info(RIG *rig) } -#elif defined(HAVE_LIBUSB) && (defined(HAVE_LIBUSB_H) || defined(HAVE_LIBUSB_1_0_LIBUSB_H)) +#elif defined(HAVE_LIBUSB) -#ifdef HAVE_LIBUSB_H +// LIBUSB_CFLAGS set by pkg-config should set the include path appropriately. +#ifdef HAVE_LIBUSB # include <libusb.h> -#elif defined HAVE_LIBUSB_1_0_LIBUSB_H -# include <libusb-1.0/libusb.h> #endif diff --git a/rigs/kit/elektor507.c b/rigs/kit/elektor507.c index fa26b0680..00a768f30 100644 --- a/rigs/kit/elektor507.c +++ b/rigs/kit/elektor507.c @@ -29,7 +29,7 @@ #ifdef _WIN32 #define USE_FTDI_DLL -#elif defined(HAVE_LIBUSB) && (defined(HAVE_LIBUSB_H) || defined(HAVE_LIBUSB_1_0_LIBUSB_H)) +#elif defined(HAVE_LIBUSB) #define USE_LIBUSB #endif @@ -148,12 +148,8 @@ struct elektor507_extra_priv_data #elif defined(USE_LIBUSB) - -#ifdef HAVE_LIBUSB_H +// LIBUSB_CFLAGS set by pkg-config should set the include path appropriately. # include <libusb.h> -#elif defined HAVE_LIBUSB_1_0_LIBUSB_H -# include <libusb-1.0/libusb.h> -#endif #define USB_VID_FTDI 0x0403 /* Future Technology Devices International */ diff --git a/rigs/kit/fifisdr.c b/rigs/kit/fifisdr.c index 14eb4da98..2d28d65e2 100644 --- a/rigs/kit/fifisdr.c +++ b/rigs/kit/fifisdr.c @@ -37,14 +37,11 @@ /* * Compile this model only if libusb is available */ -#if defined(HAVE_LIBUSB) && (defined(HAVE_LIBUSB_H) || defined(HAVE_LIBUSB_1_0_LIBUSB_H)) +#if defined(HAVE_LIBUSB) -#ifdef HAVE_LIBUSB_H +// LIBUSB_CFLAGS set by pkg-config should set the include path appropriately. # include <libusb.h> -#elif defined HAVE_LIBUSB_1_0_LIBUSB_H -# include <libusb-1.0/libusb.h> -#endif /* Selected request codes of the original AVR USB Si570 firmware */ @@ -836,4 +833,4 @@ static int fifisdr_get_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, return ret; } -#endif /* defined(HAVE_LIBUSB) && defined(HAVE_LIBUSB_H) */ +#endif /* defined(HAVE_LIBUSB) */ diff --git a/rigs/kit/funcube.c b/rigs/kit/funcube.c index 6989d2b84..0e1561e86 100644 --- a/rigs/kit/funcube.c +++ b/rigs/kit/funcube.c @@ -34,14 +34,11 @@ /* * Compile this model only if libusb is available */ -#if defined(HAVE_LIBUSB) && (defined(HAVE_LIBUSB_H) || defined(HAVE_LIBUSB_1_0_LIBUSB_H)) +#if defined(HAVE_LIBUSB) -#ifdef HAVE_LIBUSB_H +// LIBUSB_CFLAGS set by pkg-config should set the include path appropriately. # include <libusb.h> -#elif defined HAVE_LIBUSB_1_0_LIBUSB_H -# include <libusb-1.0/libusb.h> -#endif #include "funcube.h" @@ -954,4 +951,4 @@ static int funcube_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, return RIG_OK; } -#endif /* defined(HAVE_LIBUSB) && defined(HAVE_LIBUSB_H) */ +#endif /* defined(HAVE_LIBUSB) */ diff --git a/rigs/kit/kit.c b/rigs/kit/kit.c index 2124c4962..27077c584 100644 --- a/rigs/kit/kit.c +++ b/rigs/kit/kit.c @@ -40,7 +40,7 @@ DECLARE_INITRIG_BACKEND(kit) rig_register(&hiqsdr_caps); rig_register(&rshfiq_caps); -#if (defined(HAVE_LIBUSB) && (defined(HAVE_LIBUSB_H) || defined(HAVE_LIBUSB_1_0_LIBUSB_H))) +#if defined(HAVE_LIBUSB) rig_register(&si570avrusb_caps); rig_register(&si570picusb_caps); rig_register(&si570peaberry1_caps); @@ -50,7 +50,7 @@ DECLARE_INITRIG_BACKEND(kit) rig_register(&fasdr_caps); rig_register(&funcubeplus_caps); #endif -#if (defined(HAVE_LIBUSB) && (defined(HAVE_LIBUSB_H) || defined(HAVE_LIBUSB_1_0_LIBUSB_H))) || defined(_WIN32) +#if (defined(HAVE_LIBUSB) || defined(_WIN32)) /* rigs with alternate DLL support on Win32 */ rig_register(&dwt_caps); rig_register(&elektor507_caps); diff --git a/rigs/kit/si570avrusb.c b/rigs/kit/si570avrusb.c index 926af28d2..287a1e28d 100644 --- a/rigs/kit/si570avrusb.c +++ b/rigs/kit/si570avrusb.c @@ -39,14 +39,11 @@ /* * Compile this model only if libusb is available */ -#if defined(HAVE_LIBUSB) && (defined(HAVE_LIBUSB_H) || defined(HAVE_LIBUSB_1_0_LIBUSB_H)) +#if defined(HAVE_LIBUSB) -#ifdef HAVE_LIBUSB_H +// LIBUSB_CFLAGS set by pkg-config should set the include path appropriately. # include <libusb.h> -#elif defined HAVE_LIBUSB_1_0_LIBUSB_H -# include <libusb-1.0/libusb.h> -#endif #include "si570avrusb.h" @@ -1418,4 +1415,4 @@ int si570xxxusb_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) return RIG_OK; } -#endif /* defined(HAVE_LIBUSB) && defined(HAVE_LIBUSB_H) */ +#endif /* defined(HAVE_LIBUSB) */ diff --git a/src/Makefile.am b/src/Makefile.am index a1a92ba23..8714ba81e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,3 +1,4 @@ +AM_CFLAGS += $(LIBUSB_CFLAGS) BUILT_SOURCES = $(builddir)/hamlibdatetime.h diff --git a/src/iofunc.c b/src/iofunc.c index 99e75414f..65a8d5009 100644 --- a/src/iofunc.c +++ b/src/iofunc.c @@ -335,7 +335,7 @@ int HAMLIB_API port_open(hamlib_port_t *p) p->fd = status; break; -#if defined(HAVE_LIBUSB_H) || defined (HAVE_LIBUSB_1_0_LIBUSB_H) +#if defined(HAVE_LIBUSB) case RIG_PORT_USB: status = usb_port_open(p); @@ -393,7 +393,7 @@ int HAMLIB_API port_close(hamlib_port_t *p, rig_port_t port_type) ret = ser_close(p); break; -#if defined(HAVE_LIBUSB_H) || defined (HAVE_LIBUSB_1_0_LIBUSB_H) +#if defined(HAVE_LIBUSB) case RIG_PORT_USB: ret = usb_port_close(p); diff --git a/src/usb_port.c b/src/usb_port.c index 80c9bc9f9..7e7a3333e 100644 --- a/src/usb_port.c +++ b/src/usb_port.c @@ -41,10 +41,9 @@ #include "hamlib/rig.h" #include "hamlib/port.h" -#ifdef HAVE_LIBUSB_H -# include <libusb.h> -#elif defined HAVE_LIBUSB_1_0_LIBUSB_H -# include <libusb-1.0/libusb.h> +// LIBUSB_CFLAGS set by pkg-config should set the include path appropriately. +#ifdef HAVE_LIBUSB +#include <libusb.h> #endif #include "usb_port.h" @@ -52,7 +51,7 @@ /* * Compile only if libusb is available */ -#if defined(HAVE_LIBUSB) && (defined(HAVE_LIBUSB_H) || defined(HAVE_LIBUSB_1_0_LIBUSB_H)) +#if defined(HAVE_LIBUSB) /** * \brief Find and open USB device @@ -423,6 +422,6 @@ int usb_port_close(hamlib_port_t *port) } //! @endcond -#endif /* defined(HAVE_LIBUSB) && defined(HAVE_LIBUSB_H) */ +#endif /* defined(HAVE_LIBUSB) */ /** @} */ diff --git a/tests/Makefile.am b/tests/Makefile.am index f657e15f8..81c86953a 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -4,7 +4,7 @@ # AUTOMAKE_OPTIONS = dejagnu # DEJATOOL = testfreq testbcd testloc rigctl -if HAVE_LIBUSB +if TESTS_HAVE_LIBUSB TESTLIBUSB = rigtestlibusb else TESTLIBUSB = @@ -32,7 +32,7 @@ rotctld_SOURCES = rotctld.c $(ROTCOMMONSRC) ampctl_SOURCES = ampctl.c $(AMPCOMMONSRC) ampctld_SOURCES = ampctld.c $(AMPCOMMONSRC) rigmem_SOURCES = rigmem.c memsave.c memload.c memcsv.c -if HAVE_LIBUSB +if TESTS_HAVE_LIBUSB rigtestlibusb_SOURCES = rigtestlibusb.c endif @@ -51,7 +51,7 @@ ampctld_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -I$(top_builddir)/src rigctlcom_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -I$(top_builddir)/security rigctltcp_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -I$(top_builddir)/security rigctlsync_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -I$(top_builddir)/security -if HAVE_LIBUSB +if TESTS_HAVE_LIBUSB rigtestlibusb_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) $(LIBUSB_CFLAGS) endif @@ -68,7 +68,7 @@ rigmem_LDADD = $(LIBXML2_LIBS) $(LDADD) rigctlcom_LDADD = $(NET_LIBS) $(PTHREAD_LIBS) $(LDADD) $(READLINE_LIBS) rigctltcp_LDADD = $(NET_LIBS) $(PTHREAD_LIBS) $(LDADD) $(READLINE_LIBS) rigctlsync_LDADD = $(NET_LIBS) $(PTHREAD_LIBS) $(LDADD) $(READLINE_LIBS) -if HAVE_LIBUSB +if TESTS_HAVE_LIBUSB rigtestlibusb_LDADD = $(LIBUSB_LIBS) endif @@ -88,7 +88,7 @@ ampctld_LDFLAGS = $(WINEXELDFLAGS) rigctlcom_LDFLAGS = $(WINEXELDFLAGS) rigctltcp_LDFLAGS = $(WINEXELDFLAGS) rigctlsync_LDFLAGS = $(WINEXELDFLAGS) -if HAVE_LIBUSB +if TESTS_HAVE_LIBUSB rigtestlibusb_LDFLAGS = $(WINEXELDFLAGS) endif diff --git a/tests/rigtestlibusb.c b/tests/rigtestlibusb.c index 119625152..315d56ca0 100644 --- a/tests/rigtestlibusb.c +++ b/tests/rigtestlibusb.c @@ -26,10 +26,10 @@ #include <stdio.h> #include <string.h> #include <hamlib/config.h> -#if defined(HAVE_LIBUSB_H) + +#ifdef HAVE_LIBUSB +// LIBUSB_CFLAGS set by pkg-config should set the include path appropriately. #include <libusb.h> -#elif defined(HAVE_LIBUSB_1_0_LIBUSB_H) -#include <libusb-1.0/libusb.h> #endif #ifdef __FreeBSD__ commit 65c766e1b33c718e2e25079f469d1751e256c336 Author: Larry Gadallah <lga...@gm...> Date: Sun Sep 7 08:48:31 2025 -0700 Include needed headers in rigs/dummy/rot_pstrotator.c Per GitHub issue #1894, This file failed to build on FreeBSD. Closes GitHub #1894. diff --git a/rigs/dummy/rot_pstrotator.c b/rigs/dummy/rot_pstrotator.c index a4b31d675..da8a2a0d5 100644 --- a/rigs/dummy/rot_pstrotator.c +++ b/rigs/dummy/rot_pstrotator.c @@ -23,6 +23,17 @@ #include <sys/time.h> #include <errno.h> +#include "hamlib/config.h" +#ifdef HAVE_SYS_SOCKET_H +#include <sys/socket.h> +#endif +#ifdef HAVE_NETINET_IN_H +#include <netinet/in.h> +#endif +#ifdef HAVE_ARPA_INET_H +#include <arpa/inet.h> +#endif + #include "hamlib/rotator.h" #include "dummy_common.h" #include "rig.h" commit 33706f8a733efd06001fe599bdbdf15cf1626628 Author: Nate Bargmann <n0...@n0...> Date: Tue Sep 9 18:59:59 2025 -0500 Use pkgconf/pkg-config to test for libusb-1.0 As reported in GitHub issue #1892, configure on FreeBSD failed to search for the name of the library correctly which is libusb. As pkg-config correctly holds the library name for linking, modify the search for libusb-1.0 to use the pkg-config capability. If pkg-config (now largely replaced by pkgconf) is not installed or found, the modules depending on it will be gracefull disabled, i.e. the configure script will complete with those modules disabled. Modify the output summary to use spaces instead of tabs as things were not lining up nicely in my FreeBSD terminal. Rename the Automake substituted variable 'HAVE_LIBUSB' to 'TESTS_HAVE_LIBUSB' to avoid confusion with identically named variable written to include/hamlib/config.h. Likewise, rename the AutoConf substituted name 'LIBUSB' to 'HAMLIB_PC_LIBUSB' to avoid confusion with the 'LIBUSB' string passed to PKG_CHECK_MODULES. Update hamlib.pc.in and tests/Makefile.am to use the new variable names. Make sure all source files no longer reference HAVE_LIBUSB_H or HAVE_LIBUSB_1_0_LIBUSB_H as these variables no longer exist. Fix src/Makefile.am to provide include path for usb_port.c. diff --git a/android/config.h b/android/config.h index 9163a5a47..1487c89e9 100644 --- a/android/config.h +++ b/android/config.h @@ -82,6 +82,9 @@ /* Define to 1 if you have the `syslog' library (-lsyslog). */ /* #undef HAVE_LIBSYSLOG */ +/* Define if libusb-1.0 is available */ +//#define HAVE_LIBUSB 1 + /* Define to 1 if you have the <linux/ioctl.h> header file. */ #define HAVE_LINUX_IOCTL_H 1 @@ -222,12 +225,6 @@ /* Define to 1 if you have the <unistd.h> header file. */ #define HAVE_UNISTD_H 1 -/* Define to 1 if you have the <libusb.h> header file. */ -//#define HAVE_LIBUSB_H 1 - -/* Define to 1 if you have the <libusb-1.0/libusb.h> header file. */ -//#define HAVE_LIBUSB_1_0_LIBUSB_H 1 - /* Define to 1 if you have the `usleep' function. */ #define HAVE_USLEEP 1 diff --git a/configure.ac b/configure.ac index e9fc775b8..327e3823f 100644 --- a/configure.ac +++ b/configure.ac @@ -347,42 +347,6 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], "Have you considered GCC lately?."]) ]) -dnl Check for libusb, treat LIBUSB_LIBS and LIBUSB_CFLAGS as precious variables -AC_MSG_CHECKING([whether to build USB dependent backends]) -AC_ARG_WITH([libusb], - [AS_HELP_STRING([--without-libusb], - [disable USB dependent backends @<:@default=yes@:>@])], - [cf_with_libusb=$with_libusb], - [cf_with_libusb=yes] - ) - -AC_MSG_RESULT([$cf_with_libusb]) - -LIBUSB="" -AC_ARG_VAR([LIBUSB_CFLAGS], [C compiler flags for libusb, overriding configure defaults]) -AC_ARG_VAR([LIBUSB_LIBS], [linker flags for libusb, overriding configure check (useful for specifying static libusb-1.0.a (see INSTALL))]) - -AS_IF([test x"${cf_with_libusb}" = "xyes"], [ - AS_IF([test -z $LIBUSB_LIBS], - [AC_CHECK_LIB([usb-1.0], [libusb_init], [LIBUSB_LIBS="-lusb-1.0"], - [AC_MSG_WARN([libusb_init was not found in libusb-1.0--USB backends will be disabled])] - [cf_with_libusb="no"]) - ], [cf_with_libusb="yes"]) - - AS_IF([test x"${cf_with_libusb}" = "xyes"], - [AC_CHECK_HEADERS([libusb.h libusb-1.0/libusb.h]) - AC_DEFINE([HAVE_LIBUSB], - [1], - [Define if libusb-1.0 is available]) - LIBUSB="libusb-1.0"])]) - -AM_CONDITIONAL([HAVE_LIBUSB], [test x"${cf_with_libusb}" = "xyes"]) -AC_SUBST([HAVE_LIBUSB]) - -# Only used in hamlib.pc.in -AC_SUBST([LIBUSB]) - - dnl Check if readline support in rigctl/rotctl is wanted AC_MSG_CHECKING([whether to use readline in rigctl/rotctl]) AC_ARG_WITH([readline], @@ -478,10 +442,46 @@ AM_CONDITIONAL([HTML_MATRIX], [test x"${cf_enable_html_matrix}" = "xyes"]) ## PKG Config support ## ## ------------------ ## -dnl These features rely on the external pkg-config functionality being available. -dnl Test for pkg-config only when these features are enabled. +dnl These features rely on the external pkg-config/pkgconf functionality being +dnl available. At least pkg-config/pkgconf version 0.29.2 or newer is required +dnl for support of these modules. If pkg-config or pkgconf is not installed, +dnl their support will be gracefully disabled. + +PKG_PROG_PKG_CONFIG([0.29.2]) + +dnl Check for libusb, treat LIBUSB_LIBS and LIBUSB_CFLAGS as precious variables. +AC_MSG_CHECKING([whether to build USB dependent backends]) +AC_ARG_WITH([libusb], + [AS_HELP_STRING([--without-libusb], + [disable USB dependent backends @<:@default=yes@:>@])], + [cf_with_libusb=$with_libusb], + [cf_with_libusb=yes] + ) + +AC_MSG_RESULT([$cf_with_libusb]) + +dnl Only used in hamlib.pc.in +HAMLIB_PC_LIBUSB="" + +AS_IF([test x"${cf_with_libusb}" = "xyes"], [ + PKG_CHECK_MODULES([LIBUSB], + [libusb-1.0], + [AC_DEFINE([HAVE_LIBUSB], + [1], + [Define if libusb-1.0 is available]) + HAMLIB_PC_LIBUSB="libusb-1.0"], + [AC_MSG_WARN([libusb-1.0 or pkg_config not found, USB backend support will be disabled]) + cf_with_libusb=no + ]) + ]) + +AC_SUBST([HAMLIB_PC_LIBUSB]) + +dnl Configure the tests/Makefile.am conditional +AM_CONDITIONAL([TESTS_HAVE_LIBUSB], [test x"${cf_with_libusb}" = "xyes"]) -# libxml2 required rigmem xml support, make it user optional + +dnl libxml2 required for rigmem XML support; make it build time optional. AC_MSG_CHECKING([whether to build rigmem XML support]) AC_ARG_WITH([xml-support], [AS_HELP_STRING([--with-xml-support], @@ -490,8 +490,19 @@ AC_ARG_WITH([xml-support], [cf_with_xml_support=no]) AC_MSG_RESULT([$cf_with_xml_support]) +AS_IF([test x"${cf_with_xml_support}" = "xyes"], [ + PKG_CHECK_MODULES([LIBXML2], + [libxml-2.0], + [AC_DEFINE([HAVE_XML2], + [1], + [Define if libxml2 is available])], + [AC_MSG_WARN([libxml-2.0 or pkgconf/pkg-config not found, XML support will be disabled]) + ]) + ]) + -# USRP needs a C++ compiler, tested for presence above. +dnl USRP needs a C++ compiler, tested for presence above. +dnl Default is to not build USRP support. AS_IF([test x"${cf_with_cxx}" = "xyes"], [ AC_MSG_CHECKING([whether to build USRP backend]) AC_ARG_ENABLE([usrp], @@ -502,39 +513,6 @@ AS_IF([test x"${cf_with_cxx}" = "xyes"], [ AC_MSG_RESULT([$cf_with_usrp]) ]) -dnl Only check for pkg-config when either of the dependent features are enabled. - -AS_IF([test x"${cf_with_xml_support}" = "xyes" || test x"${cf_with_usrp}" = "xyes"], [ -dnl Check for pkg-config presence and if not installed define a dummy macro -dnl to disable libxml2 and USRP use. Code borrowed from: -dnl http://lists.gnu.org/archive/html/automake/2011-03/msg00008.html -dnl -dnl Check for pkg-config program, used for configuring some libraries. - m4_define_default([PKG_PROG_PKG_CONFIG], - [AC_MSG_CHECKING([pkg-config]) - AC_MSG_RESULT([no])]) - - PKG_PROG_PKG_CONFIG - -dnl If the pkg-config autoconf support isn't installed, define its -dnl autoconf macro to disable any packages depending on it. - m4_define_default([PKG_CHECK_MODULES], - [AC_MSG_CHECKING([$1]) - AC_MSG_RESULT([no]) - $4]) - ]) - - -AS_IF([test x"${cf_with_xml_support}" = "xyes"], [ - PKG_CHECK_MODULES([LIBXML2], - [libxml-2.0], - [AC_DEFINE([HAVE_XML2], - [1], - [Define if libxml2 is available])], - [AC_MSG_WARN([libxml-2.0 pkg-config not found, XML support will be disabled]) - ]) - ]) - AC_SUBST([LIBXML2_LIBS]) AC_SUBST([LIBXML2_CFLAGS]) @@ -990,28 +968,28 @@ echo \ ${PACKAGE_NAME} Version ${PACKAGE_VERSION} configuration: - Prefix ${prefix} - Preprocessor ${CPP} ${CPPFLAGS} - C Compiler ${CC} ${CFLAGS} - C++ Compiler ${CXX} ${CXXFLAGS} + Prefix ${prefix} + Preprocessor ${CPP} ${CPPFLAGS} + C Compiler ${CC} ${CFLAGS} + C++ Compiler ${CXX} ${CXXFLAGS} Package features: - With C++ binding ${cf_with_cxx_binding} - With Perl binding ${cf_with_perl_binding} - With Python binding ${cf_with_python_binding} - With TCL binding ${build_tcl} - With Lua binding ${cf_with_lua_binding} - With rigmem XML support ${cf_with_xml_support} - With Readline support ${cf_with_readline_support} - With INDI support ${cf_with_indi_support} + With C++ binding ${cf_with_cxx_binding} + With Perl binding ${cf_with_perl_binding} + With Python binding ${cf_with_python_binding} + With TCL binding ${build_tcl} + With Lua binding ${cf_with_lua_binding} + With rigmem XML support ${cf_with_xml_support} + With Readline support ${cf_with_readline_support} + With INDI support ${cf_with_indi_support} Enable HTML rig feature matrix ${cf_enable_html_matrix} - Enable WinRadio ${cf_with_winradio} - Enable Parallel ${cf_with_parallel} - Enable USRP ${cf_with_usrp} - Enable USB backends ${cf_with_libusb} - Enable shared libs ${enable_shared} - Enable static libs ${enable_static} - Enable Python tests ${enable_pytest} + Enable WinRadio ${cf_with_winradio} + Enable Parallel ${cf_with_parallel} + Enable USRP ${cf_with_usrp} + Enable USB backends ${cf_with_libusb} + Enable shared libs ${enable_shared} + Enable static libs ${enable_static} + Enable Python tests ${enable_pytest} -----------------------------------------------------------------------" diff --git a/hamlib.pc.in b/hamlib.pc.in index a08b29726..f6b8d1af9 100644 --- a/hamlib.pc.in +++ b/hamlib.pc.in @@ -7,7 +7,7 @@ Name: @PACKAGE_NAME@ Description: Library to control radio and rotator equipment. URL: @PACKAGE_URL@ Version: @PACKAGE_VERSION@ -Requires.private: @LIBUSB@ +Requires.private: @HAMLIB_PC_LIBUSB@ Cflags: -I${includedir} @PTHREAD_CFLAGS@ Libs: -L${libdir} -lhamlib Libs.private: @MATH_LIBS@ @DL_LIBS@ @NET_LIBS@ @PTHREAD_LIBS@ diff --git a/rigs/kit/dwt.c b/rigs/kit/dwt.c index afbdb4274..3416998f6 100644 --- a/rigs/kit/dwt.c +++ b/rigs/kit/dwt.c @@ -503,13 +503,12 @@ static const char *dwtdll_get_info(RIG *rig) } -#elif defined(HAVE_LIBUSB) && (defined(HAVE_LIBUSB_H) || defined(HAVE_LIBUSB_1_0_LIBUSB_H)) +#elif defined(HAVE_LIBUSB) -#ifdef HAVE_LIBUSB_H +// LIBUSB_CFLAGS set by pkg-config should set the include path appropriately. +#ifdef HAVE_LIBUSB # include <libusb.h> -#elif defined HAVE_LIBUSB_1_0_LIBUSB_H -# include <libusb-1.0/libusb.h> #endif diff --git a/rigs/kit/elektor507.c b/rigs/kit/elektor507.c index fa26b0680..00a768f30 100644 --- a/rigs/kit/elektor507.c +++ b/rigs/kit/elektor507.c @@ -29,7 +29,7 @@ #ifdef _WIN32 #define USE_FTDI_DLL -#elif defined(HAVE_LIBUSB) && (defined(HAVE_LIBUSB_H) || defined(HAVE_LIBUSB_1_0_LIBUSB_H)) +#elif defined(HAVE_LIBUSB) #define USE_LIBUSB #endif @@ -148,12 +148,8 @@ struct elektor507_extra_priv_data #elif defined(USE_LIBUSB) - -#ifdef HAVE_LIBUSB_H +// LIBUSB_CFLAGS set by pkg-config should set the include path appropriately. # include <libusb.h> -#elif defined HAVE_LIBUSB_1_0_LIBUSB_H -# include <libusb-1.0/libusb.h> -#endif #define USB_VID_FTDI 0x0403 /* Future Technology Devices International */ diff --git a/rigs/kit/fifisdr.c b/rigs/kit/fifisdr.c index 14eb4da98..2d28d65e2 100644 --- a/rigs/kit/fifisdr.c +++ b/rigs/kit/fifisdr.c @@ -37,14 +37,11 @@ /* * Compile this model only if libusb is available */ -#if defined(HAVE_LIBUSB) && (defined(HAVE_LIBUSB_H) || defined(HAVE_LIBUSB_1_0_LIBUSB_H)) +#if defined(HAVE_LIBUSB) -#ifdef HAVE_LIBUSB_H +// LIBUSB_CFLAGS set by pkg-config should set the include path appropriately. # include <libusb.h> -#elif defined HAVE_LIBUSB_1_0_LIBUSB_H -# include <libusb-1.0/libusb.h> -#endif /* Selected request codes of the original AVR USB Si570 firmware */ @@ -836,4 +833,4 @@ static int fifisdr_get_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, return ret; } -#endif /* defined(HAVE_LIBUSB) && defined(HAVE_LIBUSB_H) */ +#endif /* defined(HAVE_LIBUSB) */ diff --git a/rigs/kit/funcube.c b/rigs/kit/funcube.c index 6989d2b84..0e1561e86 100644 --- a/rigs/kit/funcube.c +++ b/rigs/kit/funcube.c @@ -34,14 +34,11 @@ /* * Compile this model only if libusb is available */ -#if defined(HAVE_LIBUSB) && (defined(HAVE_LIBUSB_H) || defined(HAVE_LIBUSB_1_0_LIBUSB_H)) +#if defined(HAVE_LIBUSB) -#ifdef HAVE_LIBUSB_H +// LIBUSB_CFLAGS set by pkg-config should set the include path appropriately. # include <libusb.h> -#elif defined HAVE_LIBUSB_1_0_LIBUSB_H -# include <libusb-1.0/libusb.h> -#endif #include "funcube.h" @@ -954,4 +951,4 @@ static int funcube_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, return RIG_OK; } -#endif /* defined(HAVE_LIBUSB) && defined(HAVE_LIBUSB_H) */ +#endif /* defined(HAVE_LIBUSB) */ diff --git a/rigs/kit/kit.c b/rigs/kit/kit.c index 2124c4962..27077c584 100644 --- a/rigs/kit/kit.c +++ b/rigs/kit/kit.c @@ -40,7 +40,7 @@ DECLARE_INITRIG_BACKEND(kit) rig_register(&hiqsdr_caps); rig_register(&rshfiq_caps); -#if (defined(HAVE_LIBUSB) && (defined(HAVE_LIBUSB_H) || defined(HAVE_LIBUSB_1_0_LIBUSB_H))) +#if defined(HAVE_LIBUSB) rig_register(&si570avrusb_caps); rig_register(&si570picusb_caps); rig_register(&si570peaberry1_caps); @@ -50,7 +50,7 @@ DECLARE_INITRIG_BACKEND(kit) rig_register(&fasdr_caps); rig_register(&funcubeplus_caps); #endif -#if (defined(HAVE_LIBUSB) && (defined(HAVE_LIBUSB_H) || defined(HAVE_LIBUSB_1_0_LIBUSB_H))) || defined(_WIN32) +#if (defined(HAVE_LIBUSB) || defined(_WIN32)) /* rigs with alternate DLL support on Win32 */ rig_register(&dwt_caps); rig_register(&elektor507_caps); diff --git a/rigs/kit/si570avrusb.c b/rigs/kit/si570avrusb.c index 926af28d2..287a1e28d 100644 --- a/rigs/kit/si570avrusb.c +++ b/rigs/kit/si570avrusb.c @@ -39,14 +39,11 @@ /* * Compile this model only if libusb is available */ -#if defined(HAVE_LIBUSB) && (defined(HAVE_LIBUSB_H) || defined(HAVE_LIBUSB_1_0_LIBUSB_H)) +#if defined(HAVE_LIBUSB) -#ifdef HAVE_LIBUSB_H +// LIBUSB_CFLAGS set by pkg-config should set the include path appropriately. # include <libusb.h> -#elif defined HAVE_LIBUSB_1_0_LIBUSB_H -# include <libusb-1.0/libusb.h> -#endif #include "si570avrusb.h" @@ -1418,4 +1415,4 @@ int si570xxxusb_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) return RIG_OK; } -#endif /* defined(HAVE_LIBUSB) && defined(HAVE_LIBUSB_H) */ +#endif /* defined(HAVE_LIBUSB) */ diff --git a/src/Makefile.am b/src/Makefile.am index a1a92ba23..8714ba81e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,3 +1,4 @@ +AM_CFLAGS += $(LIBUSB_CFLAGS) BUILT_SOURCES = $(builddir)/hamlibdatetime.h diff --git a/src/iofunc.c b/src/iofunc.c index 99e75414f..65a8d5009 100644 --- a/src/iofunc.c +++ b/src/iofunc.c @@ -335,7 +335,7 @@ int HAMLIB_API port_open(hamlib_port_t *p) p->fd = status; break; -#if defined(HAVE_LIBUSB_H) || defined (HAVE_LIBUSB_1_0_LIBUSB_H) +#if defined(HAVE_LIBUSB) case RIG_PORT_USB: status = usb_port_open(p); @@ -393,7 +393,7 @@ int HAMLIB_API port_close(hamlib_port_t *p, rig_port_t port_type) ret = ser_close(p); break; -#if defined(HAVE_LIBUSB_H) || defined (HAVE_LIBUSB_1_0_LIBUSB_H) +#if defined(HAVE_LIBUSB) case RIG_PORT_USB: ret = usb_port_close(p); diff --git a/src/usb_port.c b/src/usb_port.c index 80c9bc9f9..7e7a3333e 100644 --- a/src/usb_port.c +++ b/src/usb_port.c @@ -41,10 +41,9 @@ #include "hamlib/rig.h" #include "hamlib/port.h" -#ifdef HAVE_LIBUSB_H -# include <libusb.h> -#elif defined HAVE_LIBUSB_1_0_LIBUSB_H -# include <libusb-1.0/libusb.h> +// LIBUSB_CFLAGS set by pkg-config should set the include path appropriately. +#ifdef HAVE_LIBUSB +#include <libusb.h> #endif #include "usb_port.h" @@ -52,7 +51,7 @@ /* * Compile only if libusb is available */ -#if defined(HAVE_LIBUSB) && (defined(HAVE_LIBUSB_H) || defined(HAVE_LIBUSB_1_0_LIBUSB_H)) +#if defined(HAVE_LIBUSB) /** * \brief Find and open USB device @@ -423,6 +422,6 @@ int usb_port_close(hamlib_port_t *port) } //! @endcond -#endif /* defined(HAVE_LIBUSB) && defined(HAVE_LIBUSB_H) */ +#endif /* defined(HAVE_LIBUSB) */ /** @} */ diff --git a/tests/Makefile.am b/tests/Makefile.am index bfc57de9c..d95942b23 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -4,7 +4,7 @@ # AUTOMAKE_OPTIONS = dejagnu # DEJATOOL = testfreq testbcd testloc rigctl -if HAVE_LIBUSB +if TESTS_HAVE_LIBUSB TESTLIBUSB = rigtestlibusb else TESTLIBUSB = @@ -32,7 +32,7 @@ rotctld_SOURCES = rotctld.c $(ROTCOMMONSRC) ampctl_SOURCES = ampctl.c $(AMPCOMMONSRC) ampctld_SOURCES = ampctld.c $(AMPCOMMONSRC) rigmem_SOURCES = rigmem.c memsave.c memload.c memcsv.c -if HAVE_LIBUSB +if TESTS_HAVE_LIBUSB rigtestlibusb_SOURCES = rigtestlibusb.c endif @@ -51,7 +51,7 @@ ampctld_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -I$(top_builddir)/src rigctlcom_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -I$(top_builddir)/security rigctltcp_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -I$(top_builddir)/security rigctlsync_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -I$(top_builddir)/security -if HAVE_LIBUSB +if TESTS_HAVE_LIBUSB rigtestlibusb_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) $(LIBUSB_CFLAGS) endif @@ -68,7 +68,7 @@ rigmem_LDADD = $(LIBXML2_LIBS) $(LDADD) rigctlcom_LDADD = $(NET_LIBS) $(PTHREAD_LIBS) $(LDADD) $(READLINE_LIBS) rigctltcp_LDADD = $(NET_LIBS) $(PTHREAD_LIBS) $(LDADD) $(READLINE_LIBS) rigctlsync_LDADD = $(NET_LIBS) $(PTHREAD_LIBS) $(LDADD) $(READLINE_LIBS) -if HAVE_LIBUSB +if TESTS_HAVE_LIBUSB rigtestlibusb_LDADD = $(LIBUSB_LIBS) endif @@ -88,7 +88,7 @@ ampctld_LDFLAGS = $(WINEXELDFLAGS) rigctlcom_LDFLAGS = $(WINEXELDFLAGS) rigctltcp_LDFLAGS = $(WINEXELDFLAGS) rigctlsync_LDFLAGS = $(WINEXELDFLAGS) -if HAVE_LIBUSB +if TESTS_HAVE_LIBUSB rigtestlibusb_LDFLAGS = $(WINEXELDFLAGS) endif diff --git a/tests/rigtestlibusb.c b/tests/rigtestlibusb.c index 119625152..315d56ca0 100644 --- a/tests/rigtestlibusb.c +++ b/tests/rigtestlibusb.c @@ -26,10 +26,10 @@ #include <stdio.h> #include <string.h> #include <hamlib/config.h> -#if defined(HAVE_LIBUSB_H) + +#ifdef HAVE_LIBUSB +// LIBUSB_CFLAGS set by pkg-config should set the include path appropriately. #include <libusb.h> -#elif defined(HAVE_LIBUSB_1_0_LIBUSB_H) -#include <libusb-1.0/libusb.h> #endif #ifdef __FreeBSD__ commit 8196e9ccd9731c2e9a1e71c452bb28e15f31c132 Author: Larry Gadallah <lga...@gm...> Date: Sun Sep 7 08:48:31 2025 -0700 Include needed headers in rigs/dummy/rot_pstrotator.c Per GitHub issue #1894, This file failed to build on FreeBSD. Closes GitHub #1894. diff --git a/rigs/dummy/rot_pstrotator.c b/rigs/dummy/rot_pstrotator.c index a4b31d675..da8a2a0d5 100644 --- a/rigs/dummy/rot_pstrotator.c +++ b/rigs/dummy/rot_pstrotator.c @@ -23,6 +23,17 @@ #include <sys/time.h> #include <errno.h> +#include "hamlib/config.h" +#ifdef HAVE_SYS_SOCKET_H +#include <sys/socket.h> +#endif +#ifdef HAVE_NETINET_IN_H +#include <netinet/in.h> +#endif +#ifdef HAVE_ARPA_INET_H +#include <arpa/inet.h> +#endif + #include "hamlib/rotator.h" #include "dummy_common.h" #include "rig.h" ----------------------------------------------------------------------- Summary of changes: NEWS | 11 +-- android/config.h | 9 +-- configure.ac | 162 +++++++++++++++++++------------------------- hamlib.pc.in | 2 +- rigs/dummy/rot_pstrotator.c | 11 +++ rigs/kit/dwt.c | 7 +- rigs/kit/elektor507.c | 8 +-- rigs/kit/fifisdr.c | 9 +-- rigs/kit/funcube.c | 9 +-- rigs/kit/kit.c | 4 +- rigs/kit/si570avrusb.c | 9 +-- src/Makefile.am | 1 + src/iofunc.c | 4 +- src/usb_port.c | 11 ++- tests/Makefile.am | 10 +-- tests/rigtestlibusb.c | 6 +- 16 files changed, 123 insertions(+), 150 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-09-18 01:39: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 fd68f3874353e415a7b177f45379a75bb656909b (commit) via 409949194e710698328469be7c5700c8f9c869ec (commit) via 4e6bcb11c9e7c4c217648fa0fa7a9cf206fd75d1 (commit) via 25a7c25a0f784ff2333ebb19775c56b1bbafeb6a (commit) via 8cb93e4b9c652bd9e45a1e348ddc559f76a21f37 (commit) via ee7d43fcf2119ace850269653ea68c699d86ebab (commit) via 00fb4bba71bdb93fa72f296f96819725d6ae77f8 (commit) via 5f845e92cbd3b41c31709b25cf6a34194824ca9d (commit) via 11ca4382224129734ce5244dd83758ed30865f9a (commit) via 7e572fcdd004b02f0f15972e90d21d25569c9ccd (commit) via f7a127dbdc42a700bb21518eba93e476dd6d42e6 (commit) from 2a01ecdc5d6ca848502397043f01058aa9af76ef (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 fd68f3874353e415a7b177f45379a75bb656909b Merge: 2a01ecdc5 409949194 Author: Nate Bargmann <n0...@n0...> Date: Wed Sep 17 20:12:20 2025 -0500 Merge GitHub PR #1914 commit 409949194e710698328469be7c5700c8f9c869ec Author: George Baltz N3GB <Geo...@gm...> Date: Wed Sep 17 21:08:30 2025 -0400 Once more into the breech... diff --git a/tests/Makefile.am b/tests/Makefile.am index 6a01d8684..f32952bc8 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -16,7 +16,7 @@ DISTCLEANFILES = rigctl.log rigctl.sum testbcd.log testbcd.sum bin_PROGRAMS = rigctl rigctld rigmem rigsmtr rigswr rotctl rotctld rigctlcom rigctltcp rigctlsync ampctl ampctld rigtestmcast rigtestmcastrx $(TESTLIBUSB) rigfreqwalk -check_PROGRAMS = dumpmem testrig testrigopen testrigcaps testtrn testbcd testfreq listrigs testloc rig_bench testcache cachetest cachetest2 testcookie testgrid hamlibmodels testmW2power test2038 +check_PROGRAMS = dumpmem testrig testrigopen testrigcaps testbcd testfreq listrigs testloc rig_bench testcache cachetest cachetest2 testcookie testgrid hamlibmodels testmW2power test2038 # Document building testsecurity ### check_PROGRAMS += testsecurity diff --git a/tests/README b/tests/README index 407aba27a..36cef9d30 100644 --- a/tests/README +++ b/tests/README @@ -28,7 +28,6 @@ rigmatrix - Output the HTML table of supported rigs, with .png files for freqs testbcd - Simple program to test BCD conversion, takes a number as arg. testfreq - Simple program to test Freq conversion, takes a number as arg. testrig - Sample program calling common API calls, uses rig_probe -testtrn - Sample program using event notification (transceive mode) rigctl - Combined tool to execute any call of the API, see man page rigmem - Combined tool to load/save content of rig memory, see man page rotctl - Similar to 'rigctl' but for rotators, see man page diff --git a/tests/testtrn.c b/tests/testtrn.c deleted file mode 100644 index b0330955a..000000000 --- a/tests/testtrn.c +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Hamlib sample program to test transceive mode (async event) - */ - -#include <stdio.h> -#include <string.h> -#include <unistd.h> -#include <stdlib.h> - -#include "hamlib/rig.h" - -#include "hamlib/config.h" - -#define SERIAL_PORT "/dev/ttyS0" - - -static int myfreq_event(RIG *rig, vfo_t vfo, freq_t freq, rig_ptr_t arg) -{ - int *count_ptr = (int *) arg; - - printf("Rig changed freq to %"PRIfreq"Hz\n", freq); - *count_ptr += 1; - - return 0; -} - - -int main(int argc, const char *argv[]) -{ - RIG *my_rig; /* handle to rig (instance) */ - int retcode; /* generic return code from functions */ - int i, count = 0; - - if (argc != 2) - { - fprintf(stderr, "%s <rig_num>\n", argv[0]); - exit(1); - } - - printf("testrig: Hello, I am your main() !\n"); - - /* - * allocate memory, setup & open port - */ - - my_rig = rig_init(atoi(argv[1])); - - if (!my_rig) - { - fprintf(stderr, "Unknown rig num: %d\n", atoi(argv[1])); - fprintf(stderr, "Please check riglist.h\n"); - exit(1); /* whoops! something went wrong (mem alloc?) */ - } - - rig_set_conf(my_rig, rig_token_lookup(my_rig, "rig_pathname"), SERIAL_PORT); - - if (rig_open(my_rig)) - { - exit(2); - } - - printf("Port %s opened ok\n", SERIAL_PORT); - - /* - * Below are examples of set/get routines. - * Must add checking of functionality map prior to command execution -- FS - * - */ - - retcode = rig_set_freq(my_rig, RIG_VFO_CURR, 439700000); - - if (retcode != RIG_OK) - { - printf("rig_set_freq: error = %s \n", rigerror(retcode)); - } - - rig_set_freq_callback(my_rig, myfreq_event, (rig_ptr_t)&count); - - retcode = rig_set_trn(my_rig, RIG_TRN_RIG); - - if (retcode != RIG_OK) - { - printf("rig_set_trn: error = %s \n", rigerror(retcode)); - } - - - for (i = 0; i < 12; i++) - { - printf("Loop count: %d\n", i); - sleep(10); /* or anything smarter */ - } - - printf("Frequency changed %d times\n", count); - - rig_close(my_rig); /* close port */ - rig_cleanup(my_rig); /* if you care about memory */ - - printf("port %s closed ok \n", SERIAL_PORT); - - return 0; -} commit 4e6bcb11c9e7c4c217648fa0fa7a9cf206fd75d1 Author: George Baltz N3GB <Geo...@gm...> Date: Mon Sep 15 18:08:44 2025 -0400 Yet another variation on the name diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py index a4659c3c7..10b7a3187 100755 --- a/bindings/python/test_rig.py +++ b/bindings/python/test_rig.py @@ -286,7 +286,7 @@ class TestClass: assert isinstance(rig.get_split_freq(Hamlib.RIG_VFO_CURR), float) assert len(rig.get_split_mode()) == 2 assert len(rig.get_split_mode(Hamlib.RIG_VFO_CURR)) == 2 - assert isinstance(rig.get_trn(), int) # deprecated + # assert isinstance(rig.get_trn(), int) # deprecated assert isinstance(rig.get_ts(), int) assert isinstance(rig.get_ts(Hamlib.RIG_VFO_CURR), int) assert len(rig.get_vfo_info()) == 5 @@ -349,7 +349,7 @@ class TestClass: assert rig.set_split_mode(0, 0, 0) is None assert rig.set_split_vfo(0, 0) is None assert rig.set_split_vfo(0, 0, 0) is None - assert rig.set_trn(0) is None # deprecated + # assert rig.set_trn(0) is None # deprecated assert rig.set_ts(0, 0) is None assert rig.set_vfo_opt(0) is None assert rig.token_lookup("") is None commit 25a7c25a0f784ff2333ebb19775c56b1bbafeb6a Author: George Baltz N3GB <Geo...@gm...> Date: Mon Sep 15 17:46:43 2025 -0400 This did nothing locally, maybe needed remotely diff --git a/bindings/ignore.swg b/bindings/ignore.swg index 4765a41b9..9de6a6fe8 100644 --- a/bindings/ignore.swg +++ b/bindings/ignore.swg @@ -116,6 +116,8 @@ // others %rename("$ignore", regexmatch$name="python_callbacks") ""; // internal structs and methods used by bindings %ignore rig_state::cache; // deprecated +%ignore rig_set_trn; // deprecated +%ignore rig_get_trn; // deprecated #ifdef SWIGLUA %ignore Rig::set_level(setting_t,int,vfo_t); commit 8cb93e4b9c652bd9e45a1e348ddc559f76a21f37 Author: George Baltz N3GB <Geo...@gm...> Date: Mon Sep 15 17:12:25 2025 -0400 Generate required noise diff --git a/bindings/python/test_Hamlib_Rig_class.py b/bindings/python/test_Hamlib_Rig_class.py index 83387836f..f148f6918 100755 --- a/bindings/python/test_Hamlib_Rig_class.py +++ b/bindings/python/test_Hamlib_Rig_class.py @@ -49,7 +49,6 @@ class TestClass: 'get_split_freq', 'get_split_mode', 'get_split_vfo', -'get_trn', 'get_ts', 'get_vfo', 'get_vfo_info', @@ -103,7 +102,6 @@ class TestClass: 'set_split_freq_mode', 'set_split_mode', 'set_split_vfo', -'set_trn', 'set_ts', 'set_vfo', 'set_vfo_callback', commit ee7d43fcf2119ace850269653ea68c699d86ebab Author: George Baltz N3GB <Geo...@gm...> Date: Mon Sep 15 15:55:00 2025 -0400 Update documentation diff --git a/NEWS b/NEWS index c1905dc47..23b9189fe 100644 --- a/NEWS +++ b/NEWS @@ -14,16 +14,17 @@ Version 5.x -- future Version 4.7.0 * 2025-12-01 (target) + * Some internal functions change names to avoid conflicts with apps. * POSIX threads are required to build and run Hamlib. Note that it was actually the case for 4.6.x, but now the configuration step will fail instead of the compilation. * Functions rig_get_conf, rot_get_conf, amp_get_conf deprecated; - use *_get_conf2() instead. + use *_get_conf2() instead. Also rig_set_trn and rig_get_trn deprecated. * 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: 642 + Output from `wc -l cppcheck.log` - 4.6.2: 981 now: 595 * Remove dead getopt code. GitHub PR #1709. (TNX Daniele Forsi) * Move rig_cache to separate(calloc) storage. Prepare for other moves. Issue #1420 diff --git a/ReleaseNotes_4.7.md b/ReleaseNotes_4.7.md index 18c1323d5..2e1229d7d 100644 --- a/ReleaseNotes_4.7.md +++ b/ReleaseNotes_4.7.md @@ -17,6 +17,7 @@ changes to ease transition to 5.0 - Functions `rig_get_conf()`, `rot_get_conf()` and `amp_get_conf()` are deprecated and will be removed in 5.0. Use `..._get_conf2()` instead. See issue [#924](https://github.com/Hamlib/Hamlib/issues/924). +- Functions `rig_set_trn()` & `rig_get_trn()` deprecated; operation now handled internally. - Documentation brought up to date. - (TBD) commit 00fb4bba71bdb93fa72f296f96819725d6ae77f8 Author: George Baltz N3GB <Geo...@gm...> Date: Mon Sep 15 14:58:38 2025 -0400 Remove dependency on misc.h from sim.h Include string.h to declare strerror Remove rig.h from simic705.c From first principles, none of the simulators should use *ANY* of the code from Hamlib. Using the same code on both sides of a simulation gives the equivalent of a math "X = X" proof; guaranteed to work, but useless for proving anything else. diff --git a/simulators/sim.h b/simulators/sim.h index 10aa5403f..d4030bb7b 100644 --- a/simulators/sim.h +++ b/simulators/sim.h @@ -2,8 +2,7 @@ #include <fcntl.h> #include <stdlib.h> #include <unistd.h> - -#include "../src/misc.h" +#include <string.h> /* ID 0310 == 310, Must drop leading zero */ typedef enum nc_rigid_e @@ -44,7 +43,7 @@ int write_sim(int fd, const unsigned char *buf, int buflen, const char *func, int linenum) { int n; - dump_hex(buf, buflen); + dumphex(buf, buflen); n = write(fd, buf, buflen); if (n <= 0) @@ -111,7 +110,7 @@ getmyline(int fd, char *buf) if (c == ';') { return i; } } - if (i == 0) { hl_usleep(10 * 1000); } + if (i == 0) { sleep(1); } return i; } @@ -128,13 +127,16 @@ getmyline5(int fd, unsigned char *buf) buf[i++] = c; } +#if 0 if (i > 0) { printf("n=%d %02x %02x %02x %02x %02x\n", i, buf[0], buf[1], buf[2], buf[3], buf[4]); } +#endif if (i == 0) { - hl_usleep(10 * 1000); + //hl_usleep(10 * 1000); + sleep(1); } return i; diff --git a/simulators/simic705.c b/simulators/simic705.c index 1ab2cd567..724fcfe03 100644 --- a/simulators/simic705.c +++ b/simulators/simic705.c @@ -8,7 +8,6 @@ #include <unistd.h> #include <errno.h> -#include "hamlib/rig.h" #include "misc.h" #include "sim.h" /* Simulators really shouldn't be using ANY of the definitions @@ -585,7 +584,6 @@ int main(int argc, char **argv) unsigned char buf[BUFSIZE]; int fd = openPort(argv[1]); - printf("%s: %s\n", argv[0], rig_version()); #ifdef X25 printf("x25/x26 command recognized\n"); #else @@ -622,7 +620,7 @@ int main(int argc, char **argv) } else { - hl_usleep(1000 * 1000); + sleep(1); } rigStatus(); commit 5f845e92cbd3b41c31709b25cf6a34194824ca9d Author: George Baltz N3GB <Geo...@gm...> Date: Wed Sep 10 20:54:46 2025 -0400 Get rid of more cppcheck fluff Turn off -x option in cppcheck.sh, fix missing '\'. This fixes all the "error" messages from cppcheck except those due to its own inability to handle concatenated format strings. diff --git a/cppcheck.sh b/cppcheck.sh index aeb2115a8..ce41e7dae 100755 --- a/cppcheck.sh +++ b/cppcheck.sh @@ -1,5 +1,5 @@ #!/bin/sh -set -x +# set -x # Author Michael Black W9MDB # This SUPPRESS setting results in no warnings as of 2020-01-14 # There are things that could still be done...especially in the C++ area @@ -63,7 +63,7 @@ CHECK="\ -D DECLARE_INITRIG_BACKEND \ -D DECLARE_INITROT_BACKEND \ -D DECLARE_INITAMP_BACKEND \ --D B230400 +-D B230400 \ -U RIG_LEVEL_LINEOUT \ -U O_ASYNC \ -U F_SETSIG \ diff --git a/rigs/dummy/gqrx.c b/rigs/dummy/gqrx.c index e4ccb49d5..b8b8d1b32 100644 --- a/rigs/dummy/gqrx.c +++ b/rigs/dummy/gqrx.c @@ -840,6 +840,7 @@ static int gqrx_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) if (vfo == RIG_VFO_A) { + int tempi; switch(level) { case RIG_LEVEL_AF: @@ -851,12 +852,17 @@ static int gqrx_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) break; case RIG_LEVEL_STRENGTH: - val->i = round(rig_raw2val(round(val->f), &rig->caps->str_cal)); + // Overlapping read/write from one member of a union to another + // is technically undefined behavior, according to the C + // standard; use a temp to avoid cppcheck error. + tempi = round(rig_raw2val(round(val->f), &rig->caps->str_cal)); + val->i = tempi; priv->curr_meter = val->i; break; case RIG_LEVEL_RAWSTR: - val->i = round(val->f); + tempi = round(val->f); + val->i = tempi; break; default : diff --git a/rotators/apex/sharedloop.c b/rotators/apex/sharedloop.c index 5fa8eb865..edd889f63 100644 --- a/rotators/apex/sharedloop.c +++ b/rotators/apex/sharedloop.c @@ -5,7 +5,7 @@ #include "iofunc.h" #include "apex.h" -int apex_shared_loop_get_position(ROT *rot, float *az, float *el) +static int apex_shared_loop_get_position(ROT *rot, float *az, float *el) { int loop = 10; @@ -21,7 +21,7 @@ int apex_shared_loop_get_position(ROT *rot, float *az, float *el) return RIG_OK; } -int apex_shared_loop_set_position(ROT *rot, float az, float dummy) +static int apex_shared_loop_set_position(ROT *rot, float az, float dummy) { char cmdstr[16]; int retval; diff --git a/src/settings.c b/src/settings.c index 5120c17e3..ca5485524 100644 --- a/src/settings.c +++ b/src/settings.c @@ -1059,6 +1059,7 @@ HAMLIB_EXPORT(int) rig_settings_get_path(char *path, int pathlen) home = "?HOME"; } + // cppcheck-suppress nullPointerRedundantCheck snprintf(path, pathlen, "%s/.config", home); if (xdgpath) @@ -1098,13 +1099,13 @@ HAMLIB_EXPORT(int) rig_settings_save(const char *setting, void *value, FILE *fptmp; char path[4096]; char buf[4096]; - char *cvalue = (char *)value; - int *ivalue = (int *)value; + const char *cvalue = (char *)value; + const int *ivalue = (int *)value; int n = 0; - long *lvalue = (long *) value; - float *fvalue = (float *) value; - double *dvalue = (double *) value; - char *vformat = "Unknown format??"; + const long *lvalue = (long *) value; + const float *fvalue = (float *) value; + const double *dvalue = (double *) value; + const char *vformat = "Unknown format??"; char template[64]; rig_settings_get_path(path, sizeof(path)); commit 11ca4382224129734ce5244dd83758ed30865f9a Author: George Baltz N3GB <Geo...@gm...> Date: Wed Sep 10 13:42:16 2025 -0400 Deprecate rig_get_trn() and rig_set_trn() They have been marked as deprecated in doxygen for years. They both do nothing but return -RIG_EDEPRECATED. Remove them from the bindings. AFAICT adding them to bindings/ignore.swg has no effect. diff --git a/bindings/rig.swg b/bindings/rig.swg index d0757effe..9261058f8 100644 --- a/bindings/rig.swg +++ b/bindings/rig.swg @@ -569,7 +569,7 @@ int *rig_spectrum_cb_python(RIG *rig, struct rig_spectrum_line *rig_spectrum_lin #define _VFO_DECL METHOD1(set_vfo, vfo_t) /* particular case */ METHOD1(set_powerstat, powerstat_t) - METHOD1(set_trn, int) +// METHOD1(set_trn, int) METHOD1(has_get_level, setting_t) METHOD1(has_set_parm, setting_t) METHOD1(has_set_func, setting_t) @@ -637,7 +637,7 @@ int *rig_spectrum_cb_python(RIG *rig, struct rig_spectrum_line *rig_spectrum_lin { self->error_status = rig_get_vfo_info(self->rig, vfo, freq, mode, width, split, satmode); } METHOD1VGET(get_mem, int) METHOD1GET(get_powerstat, powerstat_t) - METHOD1GET(get_trn, int) +// METHOD1GET(get_trn, int) METHOD1VGET(get_dcd, dcd_t) // Handling of event callbacks diff --git a/c++/rigclass.cc b/c++/rigclass.cc index db473e2f1..703db8a47 100644 --- a/c++/rigclass.cc +++ b/c++/rigclass.cc @@ -616,20 +616,6 @@ float Rig::mW2power (unsigned int mwpower, freq_t freq, rmode_t mode) return power; } -void Rig::setTrn (int trn) -{ - CHECK_RIG( rig_set_trn(theRig, trn) ); -} - -int Rig::getTrn () -{ - int trn; - - CHECK_RIG( rig_get_trn(theRig, &trn) ); - - return trn; -} - void Rig::setBank (int bank, vfo_t vfo) { CHECK_RIG( rig_set_ts(theRig, vfo, bank) ); diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 7f0b08710..8ab47b8ff 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -3235,9 +3235,11 @@ rig_lookup_mem_caps HAMLIB_PARAMS((RIG *rig, extern HAMLIB_EXPORT(int) rig_mem_count HAMLIB_PARAMS((RIG *rig)); +HL_DEPRECATED extern HAMLIB_EXPORT(int) rig_set_trn HAMLIB_PARAMS((RIG *rig, int trn)); +HL_DEPRECATED extern HAMLIB_EXPORT(int) rig_get_trn HAMLIB_PARAMS((RIG *rig, int *trn)); commit 7e572fcdd004b02f0f15972e90d21d25569c9ccd Author: George Baltz N3GB <Geo...@gm...> Date: Tue Sep 9 11:41:21 2025 -0400 Rename spaces() -> hl_stars() Resolves conflict with function of same name in cqrlog. Makes future conflicts less likely. Add it to doxygen. diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index f55ccf740..7f0b08710 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -35,7 +35,7 @@ // Our shared secret password #define HAMLIB_SECRET_LENGTH 32 -#define HAMLIB_TRACE rig_debug(RIG_DEBUG_TRACE,"%s%s(%d) trace\n",spaces(STATE(rig)->depth), __FILE__, __LINE__) +#define HAMLIB_TRACE rig_debug(RIG_DEBUG_TRACE,"%s%s(%d) trace\n",hl_stars(STATE(rig)->depth), __FILE__, __LINE__) #define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__) #include <stdio.h> @@ -3356,7 +3356,7 @@ extern HAMLIB_EXPORT_VAR(char) debugmsgsave3[DEBUGMSGSAVE_SIZE]; // last-2 debu // Measuring elapsed time -- local variable inside function when macro is used #define ELAPSED1 struct timespec __begin; elapsed_ms(&__begin, HAMLIB_ELAPSED_SET); -#define ELAPSED2 rig_debug(RIG_DEBUG_VERBOSE, "%s%d:%s: elapsed=%.0lfms\n", spaces(STATE(rig)->depth), STATE(rig)->depth, __func__, elapsed_ms(&__begin, HAMLIB_ELAPSED_GET)); +#define ELAPSED2 rig_debug(RIG_DEBUG_VERBOSE, "%s%d:%s: elapsed=%.0lfms\n", hl_stars(STATE(rig)->depth), STATE(rig)->depth, __func__, elapsed_ms(&__begin, HAMLIB_ELAPSED_GET)); // use this instead of snprintf for automatic detection of buffer limit #define SNPRINTF(s,n,...) { if (snprintf(s,n,##__VA_ARGS__) >= (n)) fprintf(stderr,"***** %s(%d): message truncated *****\n", __func__, __LINE__); } diff --git a/src/misc.c b/src/misc.c index 92f5c0cba..92469f34f 100644 --- a/src/misc.c +++ b/src/misc.c @@ -2812,6 +2812,28 @@ static struct tm *gmtime_r(const time_t *t, struct tm *r) #endif // gmtime_r #endif // _WIN32 +/** + * \brief Get a string of stars for indenting messages + * \ingroup lib_internal + * + * \param len number of stars (sounds kinda like a rating) + * \return pointer to an appropriate string + */ +const char *hl_stars(int len) +{ +#define MAX_STARS 128 + static const char s[MAX_STARS + 1] = + "****************************************************************" + "****************************************************************"; + + if (len < 0 || len > MAX_STARS) + { + len = 0; + } + + return &s[MAX_STARS - len]; +} + //! @cond Doxygen_Suppress char *date_strget(char *buf, int buflen, int localtime) { @@ -2855,23 +2877,6 @@ char *rig_date_strget(char *buf, int buflen, int localtime) return date_strget(buf, buflen, localtime); } -#define MAX_SPACES 256 -const char *spaces(int len) -{ - static const char s[MAX_SPACES + 1] = - "****************************************************************" - "****************************************************************" - "****************************************************************" - "****************************************************************"; - - if (len < 0 || len > MAX_SPACES) - { - len = 0; - } - - return &s[MAX_SPACES - len]; -} - // if which==0 rig_band_select str will be returned // if which!=0 the rig_parm_gran band str will be returned const char *rig_get_band_str(RIG *rig, hamlib_band_t band, int which) diff --git a/src/misc.h b/src/misc.h index 25ad442f9..59c8e2e4a 100644 --- a/src/misc.h +++ b/src/misc.h @@ -35,12 +35,12 @@ __BEGIN_DECLS -// a function to return just a string of spaces for indenting rig debug lines -HAMLIB_EXPORT (const char *) spaces(int len); +// a function to return just a string of stars for indenting rig debug lines +HAMLIB_EXPORT (const char *) hl_stars(int len); + /* * Do a hex dump of the unsigned char array. */ - void dump_hex(const unsigned char ptr[], size_t size); /* @@ -154,7 +154,7 @@ extern HAMLIB_EXPORT(char *)date_strget(char *buf, int buflen, int localtime); void errmsg(int err, char *s, const char *func, const char *file, int line); #define ERRMSG(err, s) errmsg(err, s, __func__, __FILENAME__, __LINE__) #define ENTERFUNC { ++STATE(rig)->depth; \ - rig_debug(RIG_DEBUG_VERBOSE, "%s%d:%s(%d):%s entered\n", spaces(STATE(rig)->depth), STATE(rig)->depth, __FILENAME__, __LINE__, __func__); \ + rig_debug(RIG_DEBUG_VERBOSE, "%s%d:%s(%d):%s entered\n", hl_stars(STATE(rig)->depth), STATE(rig)->depth, __FILENAME__, __LINE__, __func__); \ } #define ENTERFUNC2 { rig_debug(RIG_DEBUG_VERBOSE, "%s(%d):%s entered\n", __FILENAME__, __LINE__, __func__); \ } @@ -162,7 +162,7 @@ void errmsg(int err, char *s, const char *func, const char *file, int line); // could be a function call #define RETURNFUNC(rc) {do { \ int rctmp = rc; \ - rig_debug(RIG_DEBUG_VERBOSE, "%s%d:%s(%d):%s returning(%ld) %s\n", spaces(STATE(rig)->depth), STATE(rig)->depth, __FILENAME__, __LINE__, __func__, (long int) (rctmp), rctmp<0?rigerror2(rctmp):""); \ + rig_debug(RIG_DEBUG_VERBOSE, "%s%d:%s(%d):%s returning(%ld) %s\n", hl_stars(STATE(rig)->depth), STATE(rig)->depth, __FILENAME__, __LINE__, __func__, (long int) (rctmp), rctmp<0?rigerror2(rctmp):""); \ --STATE(rig)->depth; \ return (rctmp); \ } while(0);} commit f7a127dbdc42a700bb21518eba93e476dd6d42e6 Author: George Baltz N3GB <Geo...@gm...> Date: Tue Sep 9 10:30:53 2025 -0400 Doxygen updates. diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index b78d4ca0c..f55ccf740 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -2244,7 +2244,7 @@ struct rig_caps { int (*set_lock_mode)(RIG *rig, int mode); int (*get_lock_mode)(RIG *rig, int *mode); short timeout_retry; /*!< number of retries to make in case of read timeout errors, some serial interfaces may require this, 0 to use default value, -1 to disable */ - short morse_qsize; /* max length of morse */ + short morse_qsize; /*!< max length of morse message rig can accept in one command */ // int (*bandwidth2rig)(RIG *rig, enum bandwidth_t bandwidth); // enum bandwidth_t (*rig2bandwidth)(RIG *rig, int rigbandwidth); }; @@ -2683,10 +2683,10 @@ struct s_rig { struct rig_callbacks callbacks; /*!< registered event callbacks */ // state should really be a pointer but that's a LOT of changes involved struct rig_state state; /*!< Rig state */ -/* Data beyond this line is for hamlib internal use only, +/* Data after this line is for hamlib internal use only, * and should *NOT* be referenced by applications, as layout will change! */ - struct rig_cache *cache_addr; + struct rig_cache *cache_addr; /*!< address of rig_cache buffer */ }; diff --git a/src/misc.c b/src/misc.c index d363f0f1b..92f5c0cba 100644 --- a/src/misc.c +++ b/src/misc.c @@ -1031,11 +1031,13 @@ static const struct }; /** - * \brief check input to set_level + * \brief Check the input to rig_set_level + * \ingroup lib_internal + * * \param rig The rig handle * \param level RIG_LEVEL_* trying to set * \param val Raw input from the caller - * \param gran If not NULL, set to location of level_gran data + * \param[out] gran If not NULL, set to location of level_gran data * * \return RIG_OK if value is in range for this level, -RIG_EINVAL if not */ ----------------------------------------------------------------------- Summary of changes: NEWS | 5 +- ReleaseNotes_4.7.md | 1 + bindings/ignore.swg | 2 + bindings/python/test_Hamlib_Rig_class.py | 2 - bindings/python/test_rig.py | 4 +- bindings/rig.swg | 4 +- c++/rigclass.cc | 14 ----- cppcheck.sh | 4 +- include/hamlib/rig.h | 12 ++-- rigs/dummy/gqrx.c | 10 ++- rotators/apex/sharedloop.c | 4 +- simulators/sim.h | 12 ++-- simulators/simic705.c | 4 +- src/misc.c | 45 ++++++++------ src/misc.h | 10 +-- src/settings.c | 13 ++-- tests/Makefile.am | 2 +- tests/README | 1 - tests/testtrn.c | 101 ------------------------------- 19 files changed, 76 insertions(+), 174 deletions(-) delete mode 100644 tests/testtrn.c hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-09-15 14:02:49
|
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 2a01ecdc5d6ca848502397043f01058aa9af76ef (commit) from 55253f704338ef5aebdb694d79caabd0b092812f (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 2a01ecdc5d6ca848502397043f01058aa9af76ef Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Sep 14 17:09:09 2025 +0200 Fix setting the variable HAVE_LIBUSB for makefiles diff --git a/configure.ac b/configure.ac index 150954246..e9fc775b8 100644 --- a/configure.ac +++ b/configure.ac @@ -357,7 +357,6 @@ AC_ARG_WITH([libusb], ) AC_MSG_RESULT([$cf_with_libusb]) -AM_CONDITIONAL([HAVE_LIBUSB], [test x"${cf_with_libusb}" = "xyes"]) LIBUSB="" AC_ARG_VAR([LIBUSB_CFLAGS], [C compiler flags for libusb, overriding configure defaults]) @@ -377,6 +376,9 @@ AS_IF([test x"${cf_with_libusb}" = "xyes"], [ [Define if libusb-1.0 is available]) LIBUSB="libusb-1.0"])]) +AM_CONDITIONAL([HAVE_LIBUSB], [test x"${cf_with_libusb}" = "xyes"]) +AC_SUBST([HAVE_LIBUSB]) + # Only used in hamlib.pc.in AC_SUBST([LIBUSB]) diff --git a/tests/Makefile.am b/tests/Makefile.am index 6a01d8684..bfc57de9c 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -4,8 +4,6 @@ # AUTOMAKE_OPTIONS = dejagnu # DEJATOOL = testfreq testbcd testloc rigctl -# For some reason this "if" is not working -- rigtestlibusb is still being included -# Fix for now is to change rigtestlibusb.c instead if HAVE_LIBUSB TESTLIBUSB = rigtestlibusb else ----------------------------------------------------------------------- Summary of changes: configure.ac | 4 +++- tests/Makefile.am | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-09-13 23:22: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, master has been updated via 55253f704338ef5aebdb694d79caabd0b092812f (commit) via 77f7f174adf4fa3eb4b5f32c9e5621efb4d64239 (commit) from 3a10a363dc8a4358ace228620a1e3cdc185f459e (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 55253f704338ef5aebdb694d79caabd0b092812f Merge: 3a10a363d 77f7f174a Author: Nate Bargmann <n0...@n0...> Date: Sat Sep 13 18:14:06 2025 -0500 Merge GitHub PR #1910 commit 77f7f174adf4fa3eb4b5f32c9e5621efb4d64239 Author: David Balharrie <da...@ba...> Date: Sat Sep 13 17:15:36 2025 +0100 added voice mem to the following Yaesu Radios FT710, FT891, FTDX10, FTDX101, FTDX101MP diff --git a/rigs/yaesu/ft710.c b/rigs/yaesu/ft710.c index 12989b530..6489a5a27 100644 --- a/rigs/yaesu/ft710.c +++ b/rigs/yaesu/ft710.c @@ -185,6 +185,7 @@ struct rig_caps ft710_caps = .comp_meter_cal = FT710_COMP_CAL, .chan_list = { { 1, 99, RIG_MTYPE_MEM, NEWCAT_MEM_CAP }, + { 1, 5, RIG_MTYPE_VOICE }, { 1, 5, RIG_MTYPE_MORSE }, RIG_CHAN_END, }, @@ -314,6 +315,7 @@ struct rig_caps ft710_caps = .set_clock = newcat_set_clock, .get_clock = newcat_get_clock, .scan = newcat_scan, + .send_voice_mem = newcat_send_voice_mem, .morse_qsize = 50, .hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS }; diff --git a/rigs/yaesu/ft891.c b/rigs/yaesu/ft891.c index 9597f667a..a1bb095f5 100644 --- a/rigs/yaesu/ft891.c +++ b/rigs/yaesu/ft891.c @@ -194,6 +194,7 @@ struct rig_caps ft891_caps = .str_cal = FT891_STR_CAL, .chan_list = { { 1, 99, RIG_MTYPE_MEM, NEWCAT_MEM_CAP }, + { 1, 5, RIG_MTYPE_VOICE }, { 1, 5, RIG_MTYPE_MORSE }, RIG_CHAN_END, }, @@ -338,6 +339,7 @@ struct rig_caps ft891_caps = .set_clock = newcat_set_clock, .get_clock = newcat_get_clock, .scan = newcat_scan, + .send_voice_mem = newcat_send_voice_mem, .morse_qsize = 50, .hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS }; diff --git a/rigs/yaesu/ftdx10.c b/rigs/yaesu/ftdx10.c index c9f2b892e..4320565ae 100644 --- a/rigs/yaesu/ftdx10.c +++ b/rigs/yaesu/ftdx10.c @@ -198,6 +198,7 @@ struct rig_caps ftdx10_caps = .chan_list = { { 1, 99, RIG_MTYPE_MEM, NEWCAT_MEM_CAP }, { 501, 510, RIG_MTYPE_BAND, NEWCAT_MEM_CAP }, /* 60M Channels, 5-01 - 5-10, if available */ + { 1, 5, RIG_MTYPE_VOICE }, { 1, 5, RIG_MTYPE_MORSE }, RIG_CHAN_END, }, @@ -327,6 +328,7 @@ struct rig_caps ftdx10_caps = .set_clock = newcat_set_clock, .get_clock = newcat_get_clock, .scan = newcat_scan, + .send_voice_mem = newcat_send_voice_mem, .morse_qsize = 50, .hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS }; diff --git a/rigs/yaesu/ftdx101.c b/rigs/yaesu/ftdx101.c index 81f00b89a..c71a220f8 100644 --- a/rigs/yaesu/ftdx101.c +++ b/rigs/yaesu/ftdx101.c @@ -245,6 +245,7 @@ struct rig_caps ftdx101d_caps = { 1, 99, RIG_MTYPE_MEM, NEWCAT_MEM_CAP }, { 100, 117, RIG_MTYPE_MEM, NEWCAT_MEM_CAP }, // P1L-P9U PMS channels { 501, 510, RIG_MTYPE_MEM, NEWCAT_MEM_CAP }, // 5xx 5 MHz band + { 1, 5, RIG_MTYPE_VOICE }, { 1, 5, RIG_MTYPE_MORSE }, RIG_CHAN_END, }, @@ -374,6 +375,7 @@ struct rig_caps ftdx101d_caps = .set_clock = newcat_set_clock, .get_clock = newcat_get_clock, .scan = newcat_scan, + .send_voice_mem = newcat_send_voice_mem, .morse_qsize = 50, .hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS }; diff --git a/rigs/yaesu/ftdx101mp.c b/rigs/yaesu/ftdx101mp.c index d0fd514af..b6202e8a9 100644 --- a/rigs/yaesu/ftdx101mp.c +++ b/rigs/yaesu/ftdx101mp.c @@ -145,6 +145,7 @@ struct rig_caps ftdx101mp_caps = { 1, 99, RIG_MTYPE_MEM, NEWCAT_MEM_CAP }, { 100, 117, RIG_MTYPE_MEM, NEWCAT_MEM_CAP }, // P1L-P9U PMS channels { 501, 510, RIG_MTYPE_MEM, NEWCAT_MEM_CAP }, // 5xx 5 MHz band + { 1, 5, RIG_MTYPE_VOICE }, { 1, 5, RIG_MTYPE_MORSE }, RIG_CHAN_END, }, @@ -274,6 +275,7 @@ struct rig_caps ftdx101mp_caps = .set_clock = newcat_set_clock, .get_clock = newcat_get_clock, .scan = newcat_scan, + .send_voice_mem = newcat_send_voice_mem, .morse_qsize = 50, .hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS }; ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/ft710.c | 2 ++ rigs/yaesu/ft891.c | 2 ++ rigs/yaesu/ftdx10.c | 2 ++ rigs/yaesu/ftdx101.c | 2 ++ rigs/yaesu/ftdx101mp.c | 2 ++ 5 files changed, 10 insertions(+) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-09-13 20:56:11
|
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 3a10a363dc8a4358ace228620a1e3cdc185f459e (commit) via 410c172ed67da2dd3b9b001df524698e05d72805 (commit) via 85bd4882dd2ea8f9fc398b440219bb965c48911c (commit) via b90e1d10b1063fd608f1694f920f43e512a1ceeb (commit) via bae995413d339978c7e9469fccd4821965189431 (commit) via d64520a086ec2e7cb585e9c1c730f50c5bd81114 (commit) via dd6bc97ae5230e4dc83aabd2f3d5373157cceb67 (commit) via 2c5d2a6d1156a39707319d7525b00d45ec8e81c3 (commit) via 4c64c21580219232ff87b0b17db828c1658851aa (commit) via 623ae3d5cee26f2c952d05653445cb97b0b4af7b (commit) via f694eca0dcc0c747cf7e1adab0340df79a6769cf (commit) via a9afa8d4d90ae3744a66528b72bfa98f987d7ff2 (commit) via 911169d7943cb84a21e45631d93b1c382c4c14da (commit) via e1761827d91aa86389112c735eb287c64583758b (commit) via d507e815a32df03d81b2e4eaa445a7d55dfd496e (commit) from d74581f6fee747037e18a7d46430827710d1200c (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 3a10a363dc8a4358ace228620a1e3cdc185f459e Merge: 410c172ed a9afa8d4d Author: Nate Bargmann <n0...@n0...> Date: Sat Sep 13 15:01:40 2025 -0500 Merge GitHub PR #1902 commit 410c172ed67da2dd3b9b001df524698e05d72805 Author: Nate Bargmann <n0...@n0...> Date: Fri Sep 12 18:13:40 2025 -0500 First cut at MacOS workflows with tar'd artifacts Unfortunately, unlike with Ubuntu, MacOS is not available in act, so these are not tested until they get pushed to master on GitHub. The objective of these files is to generate a tarball of all build artifacts so that a build failure can be more fully investigated. I ran out of time to figure out how to come up with a way to have unique tar file names. Separate files will do for now. diff --git a/.github/workflows/macos-latest-features.yml b/.github/workflows/macos-latest-features.yml new file mode 100644 index 000000000..184cd675a --- /dev/null +++ b/.github/workflows/macos-latest-features.yml @@ -0,0 +1,64 @@ +name: MacOS latest C/C++ (features) + +on: + push: + branches: [ master, feature/* ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-latest] + configure_args: + - >- + --enable-html-matrix=yes + --enable-parallel=yes + --enable-pytest=yes + --enable-shared=yes + --enable-silent-rules + --enable-static=yes + --enable-usrp=no + --enable-winradio=yes + --with-cxx-binding=yes + --with-indi=yes + --with-libusb=yes + --with-lua-binding=yes + --with-perl-binding=yes + --with-python-binding=yes + --with-readline=yes + --with-tcl-binding=yes + --with-xml-support=yes + + steps: + - uses: actions/checkout@v4 + - name: Install dependencies on MacOS + run: | + brew install autoconf + brew install automake + brew install libnova + brew install libtool + brew install grep + brew install swig + brew install tcl-tk + - name: bootstrap + run: | + pwd + ./bootstrap + - name: Suppress -Winitializer-overrides on MacOS + run: | + export CFLAGS="$CFLAGS -Wno-initializer-overrides" + export CXXFLAGS="$CXXFLAGS -Wno-initializer-overrides" + - name: configure on MacOS + run: ./configure ${{ matrix.configure_args }} --with-indi=detect --without-lua-binding PYTHON=/opt/homebrew/bin/python3 + - name: make distcheck + run: make distcheck V=0 --no-print-directory AM_DISTCHECK_CONFIGURE_FLAGS="${{ matrix.configure_args }} --with-indi=detect --without-perl-binding --without-lua-binding --without-tcl-binding PYTHON=/opt/homebrew/bin/python3" + - name: 'tar files' + run: tar -cvf macos_latest_features.tar $(pwd) + - name: 'Upload Build Artifact' + uses: actions/upload-artifact@v4.6.2 + with: + name: 'Macos_latest_features' + path: macos_latest_features.tar diff --git a/.github/workflows/macos-latest-no-features.yml b/.github/workflows/macos-latest-no-features.yml new file mode 100644 index 000000000..0b6570acc --- /dev/null +++ b/.github/workflows/macos-latest-no-features.yml @@ -0,0 +1,64 @@ +name: MacOS latest C/C++ (no features) + +on: + push: + branches: [ master, feature/* ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-latest] + configure_args: + - >- + --enable-html-matrix=no + --enable-parallel=no + --enable-pytest=no + --enable-shared=yes + --enable-silent-rules + --enable-static=yes + --enable-usrp=no + --enable-winradio=no + --with-cxx-binding=no + --with-indi=no + --with-libusb=no + --with-lua-binding=no + --with-perl-binding=no + --with-python-binding=no + --with-readline=no + --with-tcl-binding=no + --with-xml-support=no + + steps: + - uses: actions/checkout@v4 + - name: Install dependencies on MacOS + run: | + brew install autoconf + brew install automake + brew install libnova + brew install libtool + brew install grep + brew install swig + brew install tcl-tk + - name: bootstrap + run: | + pwd + ./bootstrap + - name: Suppress -Winitializer-overrides on MacOS + run: | + export CFLAGS="$CFLAGS -Wno-initializer-overrides" + export CXXFLAGS="$CXXFLAGS -Wno-initializer-overrides" + - name: configure on MacOS + run: ./configure ${{ matrix.configure_args }} --with-indi=detect --without-lua-binding PYTHON=/opt/homebrew/bin/python3 + - name: make distcheck + run: make distcheck V=0 --no-print-directory AM_DISTCHECK_CONFIGURE_FLAGS="${{ matrix.configure_args }} --with-indi=detect --without-perl-binding --without-lua-binding --without-tcl-binding PYTHON=/opt/homebrew/bin/python3" + - name: 'tar files' + run: tar -cvf macos_latest_no_features.tar $(pwd) + - name: 'Upload Build Artifact' + uses: actions/upload-artifact@v4.6.2 + with: + name: 'Macos_latest_no_features' + path: macos_latest_no_features.tar commit 85bd4882dd2ea8f9fc398b440219bb965c48911c Author: Nate Bargmann <n0...@n0...> Date: Fri Sep 12 17:00:24 2025 -0500 Add the Ubuntu workflow with all features enabled. Perhaps this can be merged with the no-features variant once a way to give unique names to the resulting tar files is configured. diff --git a/.github/workflows/ubuntu-latest-features.yml b/.github/workflows/ubuntu-latest-features.yml new file mode 100644 index 000000000..421b04d9e --- /dev/null +++ b/.github/workflows/ubuntu-latest-features.yml @@ -0,0 +1,62 @@ +name: Ubuntu latest C/C++ (features) + +on: + push: + branches: [ master, feature/* ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + configure_args: + - >- + --enable-html-matrix=yes + --enable-parallel=yes + --enable-pytest=yes + --enable-shared=yes + --enable-silent-rules + --enable-static=yes + --enable-usrp=no + --enable-winradio=yes + --with-cxx-binding=yes + --with-indi=yes + --with-libusb=yes + --with-lua-binding=yes + --with-perl-binding=yes + --with-python-binding=yes + --with-readline=yes + --with-tcl-binding=yes + --with-xml-support=yes + + steps: + - uses: actions/checkout@v4 + - name: Install dependencies on Ubuntu latest + run: | + sudo apt update + sudo apt -y install libusb-1.0-0-dev + sudo apt -y install libgd-dev + sudo apt -y install libgpiod-dev + sudo apt -y install libindi-dev libnova-dev + sudo apt -y install grep + sudo apt -y install python3-dev python3-pytest + sudo apt -y install lua5.4 liblua5.4-dev libperl-dev tcl-dev + sudo apt -y install swig + - name: bootstrap + run: | + pwd + ./bootstrap + - name: configure + run: ./configure ${{ matrix.configure_args }} + - name: make distcheck + run: make distcheck V=0 --no-print-directory AM_DISTCHECK_CONFIGURE_FLAGS="${{ matrix.configure_args }} --without-perl-binding" + - name: 'tar files' + run: tar -cvf ubuntu_latest_features.tar $(pwd) + - name: 'Upload Build Artifact' + uses: actions/upload-artifact@v4.6.2 + with: + name: 'Ubuntu_latest_features' + path: ubuntu_latest_features.tar commit b90e1d10b1063fd608f1694f920f43e512a1ceeb Author: Nate Bargmann <n0...@n0...> Date: Fri Sep 12 16:51:09 2025 -0500 Need to add '-y' to apt commands in images used by act Using act to locally test workflow runs downloads a Ubuntu image that is not configured to assume "yes" to apt commands. While this is extra clutter for the GitHub image, its presence should be useful for others want to locally test the workflow using act. https://github.com/nektos/act diff --git a/.github/workflows/ubuntu-latest-no-features.yml b/.github/workflows/ubuntu-latest-no-features.yml index 38f0b908f..44539e455 100644 --- a/.github/workflows/ubuntu-latest-no-features.yml +++ b/.github/workflows/ubuntu-latest-no-features.yml @@ -37,25 +37,23 @@ jobs: - name: Install dependencies on Ubuntu latest run: | sudo apt update - sudo apt install libusb-1.0-0-dev - sudo apt install libgd-dev - sudo apt install libgpiod-dev - sudo apt install libindi-dev libnova-dev - sudo apt install grep - sudo apt install python3-dev python3-pytest - sudo apt install lua5.4 liblua5.4-dev libperl-dev tcl-dev + sudo apt -y install libusb-1.0-0-dev + sudo apt -y install libgd-dev + sudo apt -y install libgpiod-dev + sudo apt -y install libindi-dev libnova-dev + sudo apt -y install grep + sudo apt -y install python3-dev python3-pytest + sudo apt -y install lua5.4 liblua5.4-dev libperl-dev tcl-dev - name: bootstrap run: | pwd ./bootstrap - name: configure run: ./configure ${{ matrix.configure_args }} - - name: make - run: make -j 4 V=0 --no-print-directory - name: make distcheck - run: make distcheck V=0 --no-print-directory AM_DISTCHECK_CONFIGURE_FLAGS="${{ matrix.configure_args }}" + run: make distcheck V=0 --no-print-directory AM_DISTCHECK_CONFIGURE_FLAGS="${{ matrix.configure_args }} --without-perl-binding" - name: 'tar files' - run: tar -cvf ubuntu_latest_no_features.tar /home/runner/work/Hamlib/Hamlib + run: tar -cvf ubuntu_latest_no_features.tar $(pwd) - name: 'Upload Build Artifact' uses: actions/upload-artifact@v4.6.2 with: commit bae995413d339978c7e9469fccd4821965189431 Author: Nate Bargmann <n0...@n0...> Date: Wed Sep 10 14:22:49 2025 -0500 Try to fix the tar upload failure diff --git a/.github/workflows/ubuntu-latest-no-features.yml b/.github/workflows/ubuntu-latest-no-features.yml index 380f1b92a..38f0b908f 100644 --- a/.github/workflows/ubuntu-latest-no-features.yml +++ b/.github/workflows/ubuntu-latest-no-features.yml @@ -48,18 +48,16 @@ jobs: run: | pwd ./bootstrap - - name: README Debug - run: grep README Makefile.am - name: configure run: ./configure ${{ matrix.configure_args }} - name: make run: make -j 4 V=0 --no-print-directory - name: make distcheck run: make distcheck V=0 --no-print-directory AM_DISTCHECK_CONFIGURE_FLAGS="${{ matrix.configure_args }}" - - name: 'Tar files' - run: tar -cvf ubuntu_latest_no_features.tar . - - name: 'Upload Build Artifacts' + - name: 'tar files' + run: tar -cvf ubuntu_latest_no_features.tar /home/runner/work/Hamlib/Hamlib + - name: 'Upload Build Artifact' uses: actions/upload-artifact@v4.6.2 with: name: 'Ubuntu_latest_no_features' - path: Hamlib + path: ubuntu_latest_no_features.tar commit d64520a086ec2e7cb585e9c1c730f50c5bd81114 Author: Nate Bargmann <n0...@n0...> Date: Wed Sep 10 14:06:16 2025 -0500 Try again diff --git a/.github/workflows/ubuntu-latest-no-features.yml b/.github/workflows/ubuntu-latest-no-features.yml index 2e91a7f6b..380f1b92a 100644 --- a/.github/workflows/ubuntu-latest-no-features.yml +++ b/.github/workflows/ubuntu-latest-no-features.yml @@ -11,7 +11,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: ubuntu-latest + os: [ubuntu-latest] configure_args: - >- --enable-html-matrix=no commit dd6bc97ae5230e4dc83aabd2f3d5373157cceb67 Author: Nate Bargmann <n0...@n0...> Date: Wed Sep 10 14:05:02 2025 -0500 One more try... diff --git a/.github/workflows/ubuntu-latest-no-features.yml b/.github/workflows/ubuntu-latest-no-features.yml index ee4ff15e0..2e91a7f6b 100644 --- a/.github/workflows/ubuntu-latest-no-features.yml +++ b/.github/workflows/ubuntu-latest-no-features.yml @@ -8,7 +8,29 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: ubuntu-latest + configure_args: + - >- + --enable-html-matrix=no + --enable-parallel=no + --enable-pytest=no + --enable-shared=yes + --enable-silent-rules + --enable-static=yes + --enable-usrp=no + --enable-winradio=no + --with-cxx-binding=no + --with-indi=no + --with-libusb=no + --with-lua-binding=no + --with-perl-binding=no + --with-python-binding=no + --with-readline=no + --with-tcl-binding=no + --with-xml-support=no steps: - uses: actions/checkout@v4 @@ -22,27 +44,6 @@ jobs: sudo apt install grep sudo apt install python3-dev python3-pytest sudo apt install lua5.4 liblua5.4-dev libperl-dev tcl-dev - - name: Set configure arguments - - run: >- - --enable-html-matrix=no - --enable-parallel=no - --enable-pytest=no - --enable-shared=yes - --enable-silent-rules - --enable-static=yes - --enable-usrp=no - --enable-winradio=no - --with-cxx-binding=no - --with-indi=no - --with-libusb=no - --with-lua-binding=no - --with-perl-binding=no - --with-python-binding=no - --with-readline=no - --with-tcl-binding=no - --with-xml-support=no - - id: configure_args - - name: bootstrap run: | pwd @@ -50,11 +51,11 @@ jobs: - name: README Debug run: grep README Makefile.am - name: configure - run: ./configure ${{ configure_args }} + run: ./configure ${{ matrix.configure_args }} - name: make run: make -j 4 V=0 --no-print-directory - name: make distcheck - run: make distcheck V=0 --no-print-directory AM_DISTCHECK_CONFIGURE_FLAGS="${{ configure_args }}" + run: make distcheck V=0 --no-print-directory AM_DISTCHECK_CONFIGURE_FLAGS="${{ matrix.configure_args }}" - name: 'Tar files' run: tar -cvf ubuntu_latest_no_features.tar . - name: 'Upload Build Artifacts' commit 2c5d2a6d1156a39707319d7525b00d45ec8e81c3 Author: Nate Bargmann <n0...@n0...> Date: Wed Sep 10 13:52:24 2025 -0500 Update ubuntu-latest-no-features.yml Move configure_args into the "steps" section per https://trstringer.com/github-actions-multiline-strings/ diff --git a/.github/workflows/ubuntu-latest-no-features.yml b/.github/workflows/ubuntu-latest-no-features.yml index 5611206ec..ee4ff15e0 100644 --- a/.github/workflows/ubuntu-latest-no-features.yml +++ b/.github/workflows/ubuntu-latest-no-features.yml @@ -9,25 +9,6 @@ on: jobs: build: runs-on: ubuntu-latest - configure_args: - - >- - --enable-html-matrix=no - --enable-parallel=no - --enable-pytest=no - --enable-shared=yes - --enable-silent-rules - --enable-static=yes - --enable-usrp=no - --enable-winradio=no - --with-cxx-binding=no - --with-indi=no - --with-libusb=no - --with-lua-binding=no - --with-perl-binding=no - --with-python-binding=no - --with-readline=no - --with-tcl-binding=no - --with-xml-support=no steps: - uses: actions/checkout@v4 @@ -41,6 +22,27 @@ jobs: sudo apt install grep sudo apt install python3-dev python3-pytest sudo apt install lua5.4 liblua5.4-dev libperl-dev tcl-dev + - name: Set configure arguments + - run: >- + --enable-html-matrix=no + --enable-parallel=no + --enable-pytest=no + --enable-shared=yes + --enable-silent-rules + --enable-static=yes + --enable-usrp=no + --enable-winradio=no + --with-cxx-binding=no + --with-indi=no + --with-libusb=no + --with-lua-binding=no + --with-perl-binding=no + --with-python-binding=no + --with-readline=no + --with-tcl-binding=no + --with-xml-support=no + - id: configure_args + - name: bootstrap run: | pwd commit 4c64c21580219232ff87b0b17db828c1658851aa Author: Nate Bargmann <n0...@n0...> Date: Wed Sep 10 13:38:38 2025 -0500 Break out Ubuntu latest to a "no feature" workflow diff --git a/.github/workflows/ubuntu-latest-no-features.yml b/.github/workflows/ubuntu-latest-no-features.yml new file mode 100644 index 000000000..5611206ec --- /dev/null +++ b/.github/workflows/ubuntu-latest-no-features.yml @@ -0,0 +1,62 @@ +name: Ubuntu latest C/C++ (no features) + +on: + push: + branches: [ master, feature/* ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + configure_args: + - >- + --enable-html-matrix=no + --enable-parallel=no + --enable-pytest=no + --enable-shared=yes + --enable-silent-rules + --enable-static=yes + --enable-usrp=no + --enable-winradio=no + --with-cxx-binding=no + --with-indi=no + --with-libusb=no + --with-lua-binding=no + --with-perl-binding=no + --with-python-binding=no + --with-readline=no + --with-tcl-binding=no + --with-xml-support=no + + steps: + - uses: actions/checkout@v4 + - name: Install dependencies on Ubuntu latest + run: | + sudo apt update + sudo apt install libusb-1.0-0-dev + sudo apt install libgd-dev + sudo apt install libgpiod-dev + sudo apt install libindi-dev libnova-dev + sudo apt install grep + sudo apt install python3-dev python3-pytest + sudo apt install lua5.4 liblua5.4-dev libperl-dev tcl-dev + - name: bootstrap + run: | + pwd + ./bootstrap + - name: README Debug + run: grep README Makefile.am + - name: configure + run: ./configure ${{ configure_args }} + - name: make + run: make -j 4 V=0 --no-print-directory + - name: make distcheck + run: make distcheck V=0 --no-print-directory AM_DISTCHECK_CONFIGURE_FLAGS="${{ configure_args }}" + - name: 'Tar files' + run: tar -cvf ubuntu_latest_no_features.tar . + - name: 'Upload Build Artifacts' + uses: actions/upload-artifact@v4.6.2 + with: + name: 'Ubuntu_latest_no_features' + path: Hamlib diff --git a/.github/workflows/ubuntu-latest.yml b/.github/workflows/ubuntu-latest.yml deleted file mode 100644 index c0c269bff..000000000 --- a/.github/workflows/ubuntu-latest.yml +++ /dev/null @@ -1,83 +0,0 @@ -name: C/C++ CI on Ubuntu latest - -on: - push: - branches: [ master, feature/* ] - pull_request: - branches: [ master ] - -jobs: - build: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest] - configure_args: - - >- - --enable-html-matrix=no - --enable-parallel=no - --enable-pytest=no - --enable-shared=yes - --enable-silent-rules - --enable-static=yes - --enable-usrp=no - --enable-winradio=no - --with-cxx-binding=no - --with-indi=no - --with-libusb=no - --with-lua-binding=no - --with-perl-binding=no - --with-python-binding=no - --with-readline=no - --with-tcl-binding=no - --with-xml-support=no - - >- - --enable-html-matrix=yes - --enable-parallel=yes - --enable-pytest=yes - --enable-shared=yes - --enable-silent-rules - --enable-static=yes - --enable-usrp=no - --enable-winradio=yes - --with-cxx-binding=yes - --with-indi=yes - --with-libusb=yes - --with-lua-binding=yes - --with-perl-binding=yes - --with-python-binding=yes - --with-readline=yes - --with-tcl-binding=yes - --with-xml-support=yes - - steps: - - uses: actions/checkout@v4 - - name: Install dependencies on Ubuntu latest - run: | - sudo apt update - sudo apt install libusb-1.0-0-dev - sudo apt install libgd-dev - sudo apt install libgpiod-dev - sudo apt install libindi-dev libnova-dev - sudo apt install grep - sudo apt install python3-dev python3-pytest - sudo apt install lua5.4 liblua5.4-dev libperl-dev tcl-dev - - name: bootstrap - run: | - pwd - ./bootstrap - - name: README Debug - run: grep README Makefile.am - - name: configure - run: ./configure ${{ matrix.configure_args }} - - name: make - run: make -j 4 V=0 --no-print-directory - - name: make distcheck - run: make distcheck V=0 --no-print-directory AM_DISTCHECK_CONFIGURE_FLAGS="${{ matrix.configure_args }} --without-perl-binding" - - name: 'Tar files' - run: tar -cvf hamlib_artifacts /home/runner/work/Hamlib/Hamlib - - name: 'Upload Build Artifacts' - uses: actions/upload-artifact@v4.6.2 - with: - name: 'Hamlib build artifacts' - path: hamlib_artifacts commit 623ae3d5cee26f2c952d05653445cb97b0b4af7b Author: Nate Bargmann <n0...@n0...> Date: Wed Sep 10 09:54:05 2025 -0500 Fix 'path' indentation diff --git a/.github/workflows/ubuntu-latest.yml b/.github/workflows/ubuntu-latest.yml index 87a6b409b..c0c269bff 100644 --- a/.github/workflows/ubuntu-latest.yml +++ b/.github/workflows/ubuntu-latest.yml @@ -80,5 +80,4 @@ jobs: uses: actions/upload-artifact@v4.6.2 with: name: 'Hamlib build artifacts' - path: hamlib_artifacts - + path: hamlib_artifacts commit f694eca0dcc0c747cf7e1adab0340df79a6769cf Author: Nate Bargmann <n0...@n0...> Date: Wed Sep 10 08:55:31 2025 -0500 First cut at separating CIs with Ubuntu latest Includes runs without and with language bindings. Should create a build artifact tar file. References GitHub issue #1870. diff --git a/.github/workflows/ubuntu-latest.yml b/.github/workflows/ubuntu-latest.yml new file mode 100644 index 000000000..87a6b409b --- /dev/null +++ b/.github/workflows/ubuntu-latest.yml @@ -0,0 +1,84 @@ +name: C/C++ CI on Ubuntu latest + +on: + push: + branches: [ master, feature/* ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + configure_args: + - >- + --enable-html-matrix=no + --enable-parallel=no + --enable-pytest=no + --enable-shared=yes + --enable-silent-rules + --enable-static=yes + --enable-usrp=no + --enable-winradio=no + --with-cxx-binding=no + --with-indi=no + --with-libusb=no + --with-lua-binding=no + --with-perl-binding=no + --with-python-binding=no + --with-readline=no + --with-tcl-binding=no + --with-xml-support=no + - >- + --enable-html-matrix=yes + --enable-parallel=yes + --enable-pytest=yes + --enable-shared=yes + --enable-silent-rules + --enable-static=yes + --enable-usrp=no + --enable-winradio=yes + --with-cxx-binding=yes + --with-indi=yes + --with-libusb=yes + --with-lua-binding=yes + --with-perl-binding=yes + --with-python-binding=yes + --with-readline=yes + --with-tcl-binding=yes + --with-xml-support=yes + + steps: + - uses: actions/checkout@v4 + - name: Install dependencies on Ubuntu latest + run: | + sudo apt update + sudo apt install libusb-1.0-0-dev + sudo apt install libgd-dev + sudo apt install libgpiod-dev + sudo apt install libindi-dev libnova-dev + sudo apt install grep + sudo apt install python3-dev python3-pytest + sudo apt install lua5.4 liblua5.4-dev libperl-dev tcl-dev + - name: bootstrap + run: | + pwd + ./bootstrap + - name: README Debug + run: grep README Makefile.am + - name: configure + run: ./configure ${{ matrix.configure_args }} + - name: make + run: make -j 4 V=0 --no-print-directory + - name: make distcheck + run: make distcheck V=0 --no-print-directory AM_DISTCHECK_CONFIGURE_FLAGS="${{ matrix.configure_args }} --without-perl-binding" + - name: 'Tar files' + run: tar -cvf hamlib_artifacts /home/runner/work/Hamlib/Hamlib + - name: 'Upload Build Artifacts' + uses: actions/upload-artifact@v4.6.2 + with: + name: 'Hamlib build artifacts' + path: hamlib_artifacts + commit a9afa8d4d90ae3744a66528b72bfa98f987d7ff2 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Sep 6 12:01:26 2025 +0200 Handle --rot-file and --serial_speed in bindings tests This allow to run the tests for a specific model, eg. PYTHONPATH=bindings/:bindings/.libs bindings/python/test_rot.py --model 2 diff --git a/bindings/python/conftest.py b/bindings/python/conftest.py index c664bc1b6..713616236 100644 --- a/bindings/python/conftest.py +++ b/bindings/python/conftest.py @@ -43,6 +43,10 @@ def amp_file(request): def rig_file(request): return request.config.getoption("--rig-file") +...@py...xture +def rot_file(request): + return request.config.getoption("--rot-file") + @pytest.fixture def serial_speed(request): return request.config.getoption("--serial-speed") diff --git a/bindings/python/test_rot.py b/bindings/python/test_rot.py index 73cce79af..3e0b5c292 100755 --- a/bindings/python/test_rot.py +++ b/bindings/python/test_rot.py @@ -5,6 +5,7 @@ Running this script directly will use the installed bindings. For an in-tree run use "make check", or set PYTHONPATH to point to the directories containing Hamlib.py and _Hamlib.so. """ +import pytest from pytest import raises import Hamlib @@ -49,12 +50,18 @@ class TestClass: assert rot.token_lookup("") is None - def test_with_open(self, model): + @pytest.mark.skipif('config.getoption("model") != Hamlib.ROT_MODEL_DUMMY') + def test_with_open(self, model, rot_file, serial_speed): """Call all the methods that depend on open()""" rot = Hamlib.Rot(model) assert rot is not None assert rot.state.comm_state == 0 + # first try a known string because rot_file is None during "make check" + assert rot.set_conf("rot_pathname", "foo") is None + assert rot.get_conf("rot_pathname") == "foo" + assert rot.set_conf("rot_pathname", rot_file) is None + assert rot.set_conf("serial_speed", str(serial_speed)) is None assert rot.open() is None assert rot.state.comm_state == 1 info = rot.get_info() @@ -108,6 +115,7 @@ class TestClass: assert info is None + @pytest.mark.skipif('config.getoption("model") != Hamlib.ROT_MODEL_DUMMY') def test_object_creation(self, model): """Create all objects available""" rot = Hamlib.Rig(model) commit 911169d7943cb84a21e45631d93b1c382c4c14da Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Sep 6 09:06:24 2025 +0200 Handle --amp-file and --serial_speed in bindings tests This allow to run the tests for a specific model, eg. PYTHONPATH=bindings/:bindings/.libs bindings/python/test_amp.py --model 2 diff --git a/bindings/python/conftest.py b/bindings/python/conftest.py index 9ce2517cd..c664bc1b6 100644 --- a/bindings/python/conftest.py +++ b/bindings/python/conftest.py @@ -35,6 +35,10 @@ def pytest_addoption(parser): def model(request): return request.config.getoption("--model") +...@py...xture +def amp_file(request): + return request.config.getoption("--amp-file") + @pytest.fixture def rig_file(request): return request.config.getoption("--rig-file") diff --git a/bindings/python/test_amp.py b/bindings/python/test_amp.py index 4f8608761..f5eeef872 100755 --- a/bindings/python/test_amp.py +++ b/bindings/python/test_amp.py @@ -5,6 +5,8 @@ Running this script directly will use the installed bindings. For an in-tree run use "make check", or set PYTHONPATH to point to the directories containing Hamlib.py and _Hamlib.so. """ +import pytest + import Hamlib Hamlib.rig_set_debug(Hamlib.RIG_DEBUG_NONE) @@ -40,12 +42,18 @@ class TestClass: assert amp.token_lookup("") is None - def test_with_open(self, model): + @pytest.mark.skipif('config.getoption("model") != Hamlib.AMP_MODEL_DUMMY') + def test_with_open(self, model, amp_file, serial_speed): """Call all the methods that depend on open()""" amp = Hamlib.Amp(model) assert amp is not None assert amp.state.comm_state == 0 + # first try a known string because amp_file is None during "make check" + assert amp.set_conf("amp_pathname", "foo") is None + assert amp.get_conf("amp_pathname") == "foo" + assert amp.set_conf("amp_pathname", amp_file) is None + assert amp.set_conf("serial_speed", str(serial_speed)) is None assert amp.open() is None assert amp.state.comm_state == 1 info = amp.get_info() @@ -72,6 +80,7 @@ class TestClass: assert info is None + @pytest.mark.skipif('config.getoption("model") != Hamlib.AMP_MODEL_DUMMY') def test_object_creation(self, model): """Create all objects available""" amp = Hamlib.Rig(model) commit e1761827d91aa86389112c735eb287c64583758b Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Tue Sep 9 19:30:37 2025 +0200 Fix handling of command line parameters for pytests diff --git a/bindings/python/conftest.py b/bindings/python/conftest.py index a91d7684d..9ce2517cd 100644 --- a/bindings/python/conftest.py +++ b/bindings/python/conftest.py @@ -10,7 +10,7 @@ def pytest_addoption(parser): metavar='ID', help='select amplifier model number') parser.addoption('--amp-file', default=None, metavar='DEVICE', help='set device of the amplifier to operate on') - if sys.argv[1].endswith("rig.py"): + elif sys.argv[1].endswith("rig.py"): parser.addoption('--model', type=int, default=1, metavar='ID', help='select radio model number') parser.addoption('--rig-file', default=None, commit d507e815a32df03d81b2e4eaa445a7d55dfd496e Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Sep 6 09:16:00 2025 +0200 Also check the "val" parameter in amp_set_conf() and rot_set_conf() Avoids a segfault in lower level functions that can more easily happen when using the bindings. Simmetric with amp_get_conf() via amp_get_conf2() and rot_get_conf() via rot_get_conf2(). This is a followup of commit ede84bfce41bf8da3dafea7c585666259a5e4b71 that made the same change to conf.c diff --git a/src/amp_conf.c b/src/amp_conf.c index 481786b3f..d60496412 100644 --- a/src/amp_conf.c +++ b/src/amp_conf.c @@ -683,7 +683,7 @@ int HAMLIB_API amp_set_conf(AMP *amp, hamlib_token_t token, const char *val) { amp_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); - if (!amp || !amp->caps) + if (!amp || !amp->caps || !val) { return -RIG_EINVAL; } diff --git a/src/rot_conf.c b/src/rot_conf.c index 5f204aed7..008a8f048 100644 --- a/src/rot_conf.c +++ b/src/rot_conf.c @@ -748,7 +748,7 @@ int HAMLIB_API rot_set_conf(ROT *rot, hamlib_token_t token, const char *val) { rot_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); - if (!rot || !rot->caps) + if (!rot || !rot->caps || !val) { return -RIG_EINVAL; } ----------------------------------------------------------------------- Summary of changes: .github/workflows/macos-latest-features.yml | 64 +++++++++++++++++++++++++ .github/workflows/macos-latest-no-features.yml | 64 +++++++++++++++++++++++++ .github/workflows/ubuntu-latest-features.yml | 62 ++++++++++++++++++++++++ .github/workflows/ubuntu-latest-no-features.yml | 61 +++++++++++++++++++++++ bindings/python/conftest.py | 10 +++- bindings/python/test_amp.py | 11 ++++- bindings/python/test_rot.py | 10 +++- src/amp_conf.c | 2 +- src/rot_conf.c | 2 +- 9 files changed, 281 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/macos-latest-features.yml create mode 100644 .github/workflows/macos-latest-no-features.yml create mode 100644 .github/workflows/ubuntu-latest-features.yml create mode 100644 .github/workflows/ubuntu-latest-no-features.yml hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-09-09 11:23: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, master has been updated via d74581f6fee747037e18a7d46430827710d1200c (commit) via 717d3e14915278f14b990ac283300b8691460a4b (commit) from a9313260c2c578b16aa01772c85016f75e71ac1d (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 d74581f6fee747037e18a7d46430827710d1200c Merge: a9313260c 717d3e149 Author: Nate Bargmann <n0...@n0...> Date: Tue Sep 9 06:06:07 2025 -0500 Merge GitHub PR #1891 diff --cc src/rig.c index 288968ffd,4807011db..684a023f3 --- a/src/rig.c +++ b/src/rig.c @@@ -45,13 -50,9 +45,14 @@@ * \example ../tests/testrig.c */ +/** + * \addtogroup rig + * @{ + */ + #include "hamlib/config.h" #include "hamlib/rig.h" + #include "hamlib/port.h" #include "hamlib/rig_state.h" #include "fifo.h" commit 717d3e14915278f14b990ac283300b8691460a4b Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Sep 7 11:42:12 2025 +0200 Partially revert "[src] Remove unused includes" This partially reverts commit 83ed5abeb44e21c1e13a7a57e0f02eb8a1dece6e. diff --git a/src/amp_conf.c b/src/amp_conf.c index 6d47da6ea..481786b3f 100644 --- a/src/amp_conf.c +++ b/src/amp_conf.c @@ -37,6 +37,7 @@ #include <string.h> /* String function definitions */ #include "hamlib/amplifier.h" +#include "hamlib/port.h" #include "hamlib/amp_state.h" #include "amp_conf.h" diff --git a/src/amplifier.c b/src/amplifier.c index 8a278f190..ff321fe76 100644 --- a/src/amplifier.c +++ b/src/amplifier.c @@ -58,6 +58,7 @@ #include <fcntl.h> #include "hamlib/amplifier.h" +#include "hamlib/port.h" #include "hamlib/amp_state.h" #include "serial.h" #include "parallel.h" diff --git a/src/conf.c b/src/conf.c index fba988229..ef845dcde 100644 --- a/src/conf.c +++ b/src/conf.c @@ -38,6 +38,7 @@ #include <strings.h> #include "hamlib/rig.h" +#include "hamlib/port.h" #include "hamlib/rig_state.h" #include "token.h" diff --git a/src/gpio.c b/src/gpio.c index 3f9ed0c20..721501649 100644 --- a/src/gpio.c +++ b/src/gpio.c @@ -25,6 +25,7 @@ #include <fcntl.h> #include "gpio.h" +#include "hamlib/port.h" int gpio_open(hamlib_port_t *port, int output, int on_value) diff --git a/src/iofunc.c b/src/iofunc.c index c01be13f2..99e75414f 100644 --- a/src/iofunc.c +++ b/src/iofunc.c @@ -41,6 +41,7 @@ #include <sys/time.h> #include <sys/types.h> +#include "hamlib/port.h" #include "iofunc.h" #include "misc.h" diff --git a/src/network.c b/src/network.c index 31e3760bf..848a45eae 100644 --- a/src/network.c +++ b/src/network.c @@ -74,6 +74,7 @@ #endif #include "hamlib/rig.h" +#include "hamlib/port.h" #include "hamlib/rig_state.h" #include "network.h" #include "misc.h" diff --git a/src/parallel.c b/src/parallel.c index de6c8d606..181ef892b 100644 --- a/src/parallel.c +++ b/src/parallel.c @@ -53,6 +53,7 @@ # include <winbase.h> #endif +#include "hamlib/port.h" #include "parallel.h" #ifdef HAVE_LINUX_PPDEV_H diff --git a/src/register.h b/src/register.h index 472598b27..148f16945 100644 --- a/src/register.h +++ b/src/register.h @@ -23,6 +23,8 @@ #include "hamlib/rig.h" +#include "hamlib/rotator.h" +#include "hamlib/amplifier.h" #include "hamlib/config.h" #ifdef __cplusplus diff --git a/src/rig.c b/src/rig.c index 977919e82..4807011db 100644 --- a/src/rig.c +++ b/src/rig.c @@ -52,6 +52,7 @@ #include "hamlib/config.h" #include "hamlib/rig.h" +#include "hamlib/port.h" #include "hamlib/rig_state.h" #include "fifo.h" diff --git a/src/rot_conf.c b/src/rot_conf.c index 22c315e05..5f204aed7 100644 --- a/src/rot_conf.c +++ b/src/rot_conf.c @@ -38,6 +38,7 @@ #include <string.h> /* String function definitions */ #include "hamlib/rotator.h" +#include "hamlib/port.h" #include "hamlib/rot_state.h" #include "rot_conf.h" diff --git a/src/rotator.c b/src/rotator.c index 5d71cd236..a1db1dc69 100644 --- a/src/rotator.c +++ b/src/rotator.c @@ -56,6 +56,7 @@ #include <fcntl.h> #include "hamlib/rotator.h" +#include "hamlib/port.h" #include "hamlib/rot_state.h" #include "serial.h" #include "parallel.h" @@ -64,7 +65,6 @@ #endif #include "network.h" - #ifndef DOC_HIDDEN #if defined(WIN32) && !defined(__CYGWIN__) diff --git a/src/serial.c b/src/serial.c index 3dfce1ec1..71d3c68c8 100644 --- a/src/serial.c +++ b/src/serial.c @@ -59,6 +59,7 @@ #endif #include "hamlib/rig.h" +#include "hamlib/port.h" //! @cond Doxygen_Suppress #if defined(WIN32) && !defined(HAVE_TERMIOS_H) diff --git a/src/snapshot_data.c b/src/snapshot_data.c index bc5c4e80b..8664deb0e 100644 --- a/src/snapshot_data.c +++ b/src/snapshot_data.c @@ -2,6 +2,7 @@ #include <unistd.h> #include "hamlib/config.h" #include "hamlib/rig.h" +#include "hamlib/port.h" #include "hamlib/rig_state.h" #include "misc.h" #include "cache.h" diff --git a/src/usb_port.c b/src/usb_port.c index 09fa3d9c5..80c9bc9f9 100644 --- a/src/usb_port.c +++ b/src/usb_port.c @@ -39,6 +39,7 @@ #include <strings.h> #include "hamlib/rig.h" +#include "hamlib/port.h" #ifdef HAVE_LIBUSB_H # include <libusb.h> ----------------------------------------------------------------------- Summary of changes: src/amp_conf.c | 1 + src/amplifier.c | 1 + src/conf.c | 1 + src/gpio.c | 1 + src/iofunc.c | 1 + src/network.c | 1 + src/parallel.c | 1 + src/register.h | 2 ++ src/rig.c | 1 + src/rot_conf.c | 1 + src/rotator.c | 2 +- src/serial.c | 1 + src/snapshot_data.c | 1 + src/usb_port.c | 1 + 14 files changed, 15 insertions(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-09-09 11:04: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, master has been updated via a9313260c2c578b16aa01772c85016f75e71ac1d (commit) from 8f33228a1ae07a8ff9fe10603f99dbbb076b25d2 (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 a9313260c2c578b16aa01772c85016f75e71ac1d Author: Daniele Forsi <iu...@gm...> Date: Sun Sep 7 13:19:54 2025 -0700 Replace INT_MAX with FLT_MAX in indi_wrapper.cpp Closes GitHub issue #1868. diff --git a/rotators/indi/indi_wrapper.cpp b/rotators/indi/indi_wrapper.cpp index 0861fd7d0..48c923bfb 100644 --- a/rotators/indi/indi_wrapper.cpp +++ b/rotators/indi/indi_wrapper.cpp @@ -22,7 +22,7 @@ #include "indi_wrapper.hpp" #include <math.h> -#include <limits.h> +#include <float.h> #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) @@ -479,8 +479,8 @@ void RotINDIClient::newProperty(INDI::Property *property) connectDevice(mTelescope->getDeviceName()); } - mDstAz = INT_MAX; - mDstEl = INT_MAX; + mDstAz = FLT_MAX; + mDstEl = FLT_MAX; } if (name == "HORIZONTAL_COORD") ----------------------------------------------------------------------- Summary of changes: rotators/indi/indi_wrapper.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-09-07 23:44:50
|
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 8f33228a1ae07a8ff9fe10603f99dbbb076b25d2 (commit) via ed39ebb5eed395521dcd50ebde4725a5fb334d57 (commit) from 9f4e4d38467fb50e00e79a38fe1fd34f00dbc19d (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 8f33228a1ae07a8ff9fe10603f99dbbb076b25d2 Merge: 9f4e4d384 ed39ebb5e Author: Nate Bargmann <n0...@n0...> Date: Sun Sep 7 18:10:15 2025 -0500 Merge GitHub PR #1893 commit ed39ebb5eed395521dcd50ebde4725a5fb334d57 Author: Christoph Berg <my...@de...> Date: Sun Sep 7 17:41:52 2025 +0200 lib/precise_time.c: Remove dead code The last branch of `#if _POSIX_TIMERS` was missing a declaration of "showme". Since that variable is not used anywhere, just drop it. diff --git a/lib/precise_time.c b/lib/precise_time.c index 677c516b5..5cc2c4d49 100644 --- a/lib/precise_time.c +++ b/lib/precise_time.c @@ -53,15 +53,8 @@ double monotonic_seconds() #include <time.h> -static int showme = 0; - double monotonic_seconds() { - if (showme) - { - showme = 0; - } - struct timespec time; // Note: Make sure to link with -lrt to define clock_gettime. @@ -170,11 +163,6 @@ static void __attribute__((constructor)) init_rdtsc_per_sec() double monotonic_seconds() { - if (showme) - { - showme = false; - } - return (double) rdtsc() / (double) rdtsc_per_sec; } ----------------------------------------------------------------------- Summary of changes: lib/precise_time.c | 12 ------------ 1 file changed, 12 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |