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-08-12 16:59:17
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, Hamlib-4.6.3 has been updated via 8aca7436b539406bf9df1f7543a606c73227865b (commit) via 9141b47057e4ebf20f1f0fafd8a1f2a3cfd2ae49 (commit) via f88beb1a8e2902b44da0d1f7c05083a8596c82cb (commit) from 2d63d05da7d80132392b25a8405844fceea4480f (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 8aca7436b539406bf9df1f7543a606c73227865b Author: Nate Bargmann <n0...@n0...> Date: Tue Aug 12 11:57:10 2025 -0500 Update Segfault-award for netrigctl_open() fix Congrats, Daniele! diff --git a/Segfault-award b/Segfault-award index e775238db..69234e7f6 100644 --- a/Segfault-award +++ b/Segfault-award @@ -7,6 +7,8 @@ A developer cannot apply for HSHR for segfaults on his/her own code. Here is the list of the brave fellows: +* Daniele Forsi, IU5HKX, v4.6.4, Improper indexing in netrigctl_open(). + * Christoph Berg DF7CB python with Hamlib.rig_parse(None) * Saku Nyland OH1KH v4.5.1, 10/2022, rigctld.c using ptt_type=RTS commit 9141b47057e4ebf20f1f0fafd8a1f2a3cfd2ae49 Author: Nate Bargmann <n0...@n0...> Date: Tue Aug 12 11:56:41 2025 -0500 Update NEWS with seg fault fix diff --git a/NEWS b/NEWS index 1b9c5c1e1..7f207bc23 100644 --- a/NEWS +++ b/NEWS @@ -19,6 +19,7 @@ Version 4.6.5 * 2025-??-?? * Update Kenwood CW buffer max message size, fix one byte buffer overrun in icom.c. (TNX George Baltz). + * Fix Segmentation Fault in rigs/dummy/netrigctl.c. (TNX Daniele Forsi) Version 4.6.4 * 2025-07-18--Hamlib's 25th birthday!!! commit f88beb1a8e2902b44da0d1f7c05083a8596c82cb Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Tue Aug 12 14:01:30 2025 +0200 Fix segfault when executing the dump_caps command Need to convert the level number 0..63 to the level bit mask. Steps to reproduce tests/rigctld -m 1 & tests/rigctl -m 2 dump_caps Fixes: Thread 1 "rigctl" received signal SIGSEGV, Segmentation fault. [..] (gdb) bt #0 __strlen_sse2 () at ../sysdeps/x86_64/multiarch/strlen-sse2.S:174 #1 0x00007f532c46e300 in __printf_buffer (buf=buf@entry=0x7ffc320ad970, format=0x7f532c8aba22 "%s(%s) ", ap=0x7ffc320ada30, mode_flags=0) at ./stdio-common/vfprintf-process-arg.c:435 #2 0x00007f532c491daf in __vsnprintf_internal (string=<optimized out>, maxlen=<optimized out>, format=<optimized out>, args=args@entry=0x7ffc320ada30, mode_flags=mode_flags@entry=0) at ./libio/vsnprintf.c:96 #3 0x00007f532c469642 in __GI___snprintf ( s=s@entry=0x7ffc320aec94 "BANDSELECT(00000..0.000000/0.000000) NR(0.000000..0.000000/0.000000) PBT_IN(0.000000..0.000000/0.000000) PBT_OUT(0.000000..0.000000/0.000000) CWPITCH(0..0/10) RFPOWER(0.050000..1.000000/0.001957) MICG"..., maxlen=maxlen@entry=3948, format=format@entry=0x7f532c8aba22 "%s(%s) ") at ./stdio-common/snprintf.c:31 #4 0x00007f532c6dc14a in rig_sprintf_parm_gran ( str=str@entry=0x7ffc320aec00 "ANN(0..0/0) APO(0..0/0) BACKLIGHT(0..0/0) BEEP(0..1316880384/1315832322) TIME(0..0/0) BAT(0..0/0) KEYLIGHT(0..0/0) SCREENSAVER(0..4/0) AFIF(0..0/0) BANDSELECT(00000..0.000000/0.000000) NR(0.000000..0."..., nlen=nlen@entry=4096, parm=9223372036854775807, gran=gran@entry=0x55f1f3cac338) at sprintflst.c:646 #5 0x000055f1eb6cd487 in dumpstate (rig=rig@entry=0x55f1f3ca5b20, fout=fout@entry=0x7f532c5f25c0 <_IO_2_1_stdout_>) at dumpstate.c:408 #6 0x000055f1eb6b4b81 in rigctl_dump_caps (rig=0x55f1f3ca5b20, fout=0x7f532c5f25c0 <_IO_2_1_stdout_>, fin=<optimized out>, interactive=<optimized out>, prompt=<optimized out>, vfo_opt=<optimized out>, send_cmd_term=13 '\r', ext_resp=0, resp_sep=10 '\n', cmd=0x55f1eb6dc0e0 <test_list+5760>, vfo=536870912, arg1=0x0, arg2=0x55f1eb6d1ce8 "", arg3=0x55f1eb6d1ce8 "") at rigctl_parse.c:4622 #7 0x000055f1eb6c65f6 in rigctl_parse (my_rig=<optimized out>, fin=<optimized out>, fout=<optimized out>, argv=argv@entry=0x7ffc320b2138, argc=argc@entry=3, sync_cb=sync_cb@entry=0x0, interactive=<optimized out>, prompt=<optimized out>, vfo_opt=<optimized out>, send_cmd_term=<optimized out>, ext_resp_ptr=<optimized out>, resp_sep_ptr=<optimized out>, use_password=<optimized out>) at rigctl_parse.c:1847 #8 0x000055f1eb6b0adc in main (argc=<optimized out>, argv=0x7ffc320b2138) at rigctl.c:801 diff --git a/rigs/dummy/netrigctl.c b/rigs/dummy/netrigctl.c index 382f5f039..e57c3eab8 100644 --- a/rigs/dummy/netrigctl.c +++ b/rigs/dummy/netrigctl.c @@ -861,8 +861,9 @@ static int netrigctl_open(RIG *rig) for (i = 0; p != NULL && i < RIG_SETTING_MAX; ++i) { - int level; - sscanf(p, "%d", &level); + int idx, level; + sscanf(p, "%d", &idx); + level = rig_idx2setting(idx); rig->caps->parm_gran[i].step.s = 0; ----------------------------------------------------------------------- Summary of changes: NEWS | 1 + Segfault-award | 2 ++ rigs/dummy/netrigctl.c | 5 +++-- 3 files changed, 6 insertions(+), 2 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-08-12 12:41:10
|
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 c51357388cb8b52456e2c8561f2f3f329d12cb86 (commit) via 3b79b13f6d521a955faeac4274237478dcaeb57e (commit) via e2feb1d1d07c1e66b75c1e3d4d0414d790fce7e7 (commit) via 19dce9dc3256a1cac13dca2c43e11fef1462e3e5 (commit) via 6dec5791443a1d5e5bdb4684cfeaeb1cf37c8f04 (commit) via 65439c671961f589258427c4fbfd8ddc596ee744 (commit) from 5e13d102af3f90a16515982ccf5f23b93ea6a2dc (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 c51357388cb8b52456e2c8561f2f3f329d12cb86 Merge: 5e13d102a 3b79b13f6 Author: Nate Bargmann <n0...@n0...> Date: Tue Aug 12 07:04:50 2025 -0500 Merge GitHub PR #1841 commit 3b79b13f6d521a955faeac4274237478dcaeb57e Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Mon Aug 11 23:41:39 2025 +0200 Make the tests for set_conf() and get_conf() more meaningful diff --git a/bindings/python/test_amp.py b/bindings/python/test_amp.py index 1a0b5eac3..4f8608761 100755 --- a/bindings/python/test_amp.py +++ b/bindings/python/test_amp.py @@ -27,11 +27,15 @@ class TestClass: assert amp.set_conf("", "") is None assert amp.get_conf("") == "" assert amp.get_conf(0) == "" - conf = amp.get_conf("mcfg") - assert isinstance(conf, str) - assert amp.set_conf("mcfg", "foo") is None - conf = amp.get_conf("mcfg") - assert conf == "" # FIXME: should return "foo" + if model == Hamlib.AMP_MODEL_DUMMY: + conf = amp.get_conf("mcfg") + assert conf == "" + assert amp.set_conf("mcfg", "foobar") is None + conf = amp.get_conf("mcfg") + assert conf == "" # FIXME: should return "foobar" + else: + conf = amp.get_conf("mcfg") + assert conf == "" assert amp.token_lookup("") is None diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py index 5c0c305ec..a7545bd8e 100755 --- a/bindings/python/test_rig.py +++ b/bindings/python/test_rig.py @@ -29,13 +29,14 @@ class TestClass: assert rig.set_conf("", "") is None assert rig.get_conf("") == "" assert rig.get_conf(0) == "" - conf = rig.get_conf("mcfg") - assert isinstance(conf, str) - assert rig.set_conf("mcfg", "foo") is None - conf = rig.get_conf("mcfg") if model == Hamlib.RIG_MODEL_DUMMY: - assert conf == "foo" + conf = rig.get_conf("mcfg") + assert conf == "DX" + assert rig.set_conf("mcfg", "foobar") is None + conf = rig.get_conf("mcfg") + assert conf == "foobar" else: + conf = rig.get_conf("mcfg") assert conf == "" assert rig.token_lookup("") is None diff --git a/bindings/python/test_rot.py b/bindings/python/test_rot.py index c87835534..73cce79af 100755 --- a/bindings/python/test_rot.py +++ b/bindings/python/test_rot.py @@ -36,13 +36,14 @@ class TestClass: assert rot.set_conf("", "") is None assert rot.get_conf("") == "" assert rot.get_conf(0) == "" - conf = rot.get_conf("mcfg") - assert isinstance(conf, str) - assert rot.set_conf("mcfg", "foo") is None - conf = rot.get_conf("mcfg") if model == Hamlib.ROT_MODEL_DUMMY: - assert conf == "foo" + conf = rot.get_conf("mcfg") + assert conf == "ROTATOR" + assert rot.set_conf("mcfg", "foobar") is None + conf = rot.get_conf("mcfg") + assert conf == "foobar" else: + conf = rot.get_conf("mcfg") assert conf == "" assert rot.token_lookup("") is None commit e2feb1d1d07c1e66b75c1e3d4d0414d790fce7e7 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Mon Aug 11 23:40:01 2025 +0200 Fix "val_len" paramenter for rot_get_conf2() and amp_get_conf2() Thanks to @GeoBaltz. diff --git a/bindings/amplifier.swg b/bindings/amplifier.swg index 00ab8d533..136e9d5c1 100644 --- a/bindings/amplifier.swg +++ b/bindings/amplifier.swg @@ -124,7 +124,7 @@ typedef struct Amp { const char *get_conf(hamlib_token_t tok) { static char s[128] = ""; - self->error_status = amp_get_conf2(self->amp, tok, s, sizeof *s); + self->error_status = amp_get_conf2(self->amp, tok, s, sizeof s); return s; } @@ -134,7 +134,7 @@ typedef struct Amp { if (tok == RIG_CONF_END) self->error_status = -RIG_EINVAL; else - self->error_status = amp_get_conf2(self->amp, tok, s, sizeof *s); + self->error_status = amp_get_conf2(self->amp, tok, s, sizeof s); return s; } diff --git a/bindings/rotator.swg b/bindings/rotator.swg index 0cfa13cbe..8691e4730 100644 --- a/bindings/rotator.swg +++ b/bindings/rotator.swg @@ -133,7 +133,7 @@ typedef struct Rot { const char *get_conf(hamlib_token_t tok) { static char s[128] = ""; - self->error_status = rot_get_conf2(self->rot, tok, s, sizeof *s); + self->error_status = rot_get_conf2(self->rot, tok, s, sizeof s); return s; } @@ -143,7 +143,7 @@ typedef struct Rot { if (tok == RIG_CONF_END) self->error_status = -RIG_EINVAL; else - self->error_status = rot_get_conf2(self->rot, tok, s, sizeof *s); + self->error_status = rot_get_conf2(self->rot, tok, s, sizeof s); return s; } commit 19dce9dc3256a1cac13dca2c43e11fef1462e3e5 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Mon Aug 11 15:29:11 2025 +0200 Remove deprecated functions and methods from the bindings diff --git a/bindings/ignore.swg b/bindings/ignore.swg index 34f634034..4765a41b9 100644 --- a/bindings/ignore.swg +++ b/bindings/ignore.swg @@ -5,6 +5,7 @@ %rename("$ignore", regexmatch$name="^AMP_") ""; %rename("$ignore", regexmatch$name="^RIG_") ""; %rename("$ignore", regexmatch$name="^ROT_") ""; +%rename("$ignore", regexmatch$name="deprecated") ""; // re-add useful defines @@ -86,6 +87,7 @@ %rename("$ignore", regexmatch$name="^amp_", %$isfunction) ""; %rename("$ignore", regexmatch$name="^rig_", %$isfunction) ""; %rename("$ignore", regexmatch$name="^rot_", %$isfunction) ""; + // re-add some methods %rename("%s") rig_set_debug; %rename("%s", regexmatch$name="^rig_str", %$isfunction) ""; @@ -111,7 +113,9 @@ %ignore PRIfreq; %ignore SCNfreq; +// others %rename("$ignore", regexmatch$name="python_callbacks") ""; // internal structs and methods used by bindings +%ignore rig_state::cache; // deprecated #ifdef SWIGLUA %ignore Rig::set_level(setting_t,int,vfo_t); diff --git a/bindings/python/test_Hamlib_class.py b/bindings/python/test_Hamlib_class.py index 98f767f7e..f0323958d 100755 --- a/bindings/python/test_Hamlib_class.py +++ b/bindings/python/test_Hamlib_class.py @@ -52,7 +52,6 @@ class TestClass: 'multicast_s', 'netrigctl_get_vfo_mode', 'qrb', -'rig_cache_deprecated', 'rig_callbacks', 'rig_caps', 'rig_set_debug', @@ -60,7 +59,6 @@ class TestClass: 'rig_spectrum_line', 'rig_spectrum_scope', 'rig_state', -'rig_state_deprecated', 'rig_stragclevel', 'rig_strcommstatus', 'rig_strfunc', commit 6dec5791443a1d5e5bdb4684cfeaeb1cf37c8f04 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Mon Aug 11 15:09:49 2025 +0200 Replace library functions deprecated in Hamlib diff --git a/bindings/amplifier.swg b/bindings/amplifier.swg index ed28c8046..00ab8d533 100644 --- a/bindings/amplifier.swg +++ b/bindings/amplifier.swg @@ -124,7 +124,7 @@ typedef struct Amp { const char *get_conf(hamlib_token_t tok) { static char s[128] = ""; - self->error_status = amp_get_conf(self->amp, tok, s); + self->error_status = amp_get_conf2(self->amp, tok, s, sizeof *s); return s; } @@ -134,7 +134,7 @@ typedef struct Amp { if (tok == RIG_CONF_END) self->error_status = -RIG_EINVAL; else - self->error_status = amp_get_conf(self->amp, tok, s); + self->error_status = amp_get_conf2(self->amp, tok, s, sizeof *s); return s; } diff --git a/bindings/rig.swg b/bindings/rig.swg index a062bcfef..61f8674f3 100644 --- a/bindings/rig.swg +++ b/bindings/rig.swg @@ -699,7 +699,7 @@ int *rig_spectrum_cb_python(RIG *rig, struct rig_spectrum_line *rig_spectrum_lin void get_conf(hamlib_token_t tok, char *returnstr) { returnstr[0] = '\0'; - self->error_status = rig_get_conf(self->rig, tok, returnstr); + self->error_status = rig_get_conf2(self->rig, tok, returnstr, MAX_RETURNSTR); } void get_conf(const char *name, char *returnstr) { @@ -708,7 +708,7 @@ int *rig_spectrum_cb_python(RIG *rig, struct rig_spectrum_line *rig_spectrum_lin if (tok == RIG_CONF_END) self->error_status = -RIG_EINVAL; else - self->error_status = rig_get_conf(self->rig, tok, returnstr); + self->error_status = rig_get_conf2(self->rig, tok, returnstr, MAX_RETURNSTR); } void recv_dtmf(char *returnstr, vfo_t vfo = RIG_VFO_CURR) { diff --git a/bindings/rotator.swg b/bindings/rotator.swg index eb615319b..0cfa13cbe 100644 --- a/bindings/rotator.swg +++ b/bindings/rotator.swg @@ -133,7 +133,7 @@ typedef struct Rot { const char *get_conf(hamlib_token_t tok) { static char s[128] = ""; - self->error_status = rot_get_conf(self->rot, tok, s); + self->error_status = rot_get_conf2(self->rot, tok, s, sizeof *s); return s; } @@ -143,7 +143,7 @@ typedef struct Rot { if (tok == RIG_CONF_END) self->error_status = -RIG_EINVAL; else - self->error_status = rot_get_conf(self->rot, tok, s); + self->error_status = rot_get_conf2(self->rot, tok, s, sizeof *s); return s; } commit 65439c671961f589258427c4fbfd8ddc596ee744 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Mon Aug 11 14:47:06 2025 +0200 Fix typo diff --git a/rigs/drake/drake.c b/rigs/drake/drake.c index 028128eeb..88af10a99 100644 --- a/rigs/drake/drake.c +++ b/rigs/drake/drake.c @@ -618,7 +618,7 @@ int drake_report_all(RIG *rig, char* owner) // strings show mem off, ch 00, NB off, AGC fast, RF off, MN off, ant 1, AM mode, 6.0 bw, VFOA, sync off, not scanning // r8 //char testbuf[25] = {' ','0','0',' ','2','0','2','<','8',' ',' ','1','5','.','0','0','0','0','0','#','m','H','z', 0x0d, 0x0a }; - // r8a/b - TODO Note 7-char channel name that eitehr starts at [25] or [26] + // r8a/b - TODO Note 7-char channel name that either starts at [25] or [26] //char testbuf[35] = {' ','0','0','0',' ','2','0','2','<','8',' ',' ','1','5','.','0','0','0','0','0','#','m','H','z',' ','M','E','M','N','A','M','E',' ', 0x0d, 0x0a }; //drake_trans_rept(owner, "RA" EOM, 3, mdbuf, mdbuf_len, retval); ----------------------------------------------------------------------- Summary of changes: bindings/amplifier.swg | 4 ++-- bindings/ignore.swg | 4 ++++ bindings/python/test_Hamlib_class.py | 2 -- bindings/python/test_amp.py | 14 +++++++++----- bindings/python/test_rig.py | 11 ++++++----- bindings/python/test_rot.py | 11 ++++++----- bindings/rig.swg | 4 ++-- bindings/rotator.swg | 4 ++-- rigs/drake/drake.c | 2 +- 9 files changed, 32 insertions(+), 24 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-08-12 12:04:02
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 5e13d102af3f90a16515982ccf5f23b93ea6a2dc (commit) via e16f4077e75e70b461bbeb8608af17aa62c642b5 (commit) via 289a3952cefb259da0e39bc3db8b58a31001581c (commit) via 12ec55c3d7493c60a3444beb2a976fe12de2c650 (commit) via 5e336b90c1bef2b972e9e5c0b68177b47554d3c3 (commit) from 0d1481d86f9ebf889525cc53b0f02e14d340361a (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 5e13d102af3f90a16515982ccf5f23b93ea6a2dc Merge: 0d1481d86 e16f4077e Author: Nate Bargmann <n0...@n0...> Date: Mon Aug 11 08:31:20 2025 -0500 Merge merge GitHub PR #1840 commit e16f4077e75e70b461bbeb8608af17aa62c642b5 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Mon Aug 11 12:32:46 2025 +0200 Implement the Python bindings and the tests for rig_send_raw() Allows to send either string or bytes and to receive a response converted to the same datatype. Also the "term" argument can be of either type (but it can't contain NULs, it's a single char or byte anyway). Closes #1624. diff --git a/bindings/python/test_Hamlib_Rig_class.py b/bindings/python/test_Hamlib_Rig_class.py index 3f60f0ce6..83387836f 100755 --- a/bindings/python/test_Hamlib_Rig_class.py +++ b/bindings/python/test_Hamlib_Rig_class.py @@ -70,6 +70,7 @@ class TestClass: 'scan', 'send_dtmf', 'send_morse', +'send_raw', 'set_ant', 'set_bank', 'set_channel', diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py index 5c0c305ec..ee3c28e31 100755 --- a/bindings/python/test_rig.py +++ b/bindings/python/test_rig.py @@ -190,6 +190,23 @@ class TestClass: assert rig.set_spectrum_callback(None) is None + def do_test_send_raw(self, rig): + """rig_send_raw() tests""" + + # When using the Dummy driver, rig.c replies with a copy of the data + test_string_1 = "test string 012\n" + test_string_2 = test_string_1 * 2 + assert rig.send_raw(test_string_1) == test_string_1 + assert rig.send_raw(test_string_2, "\n") == test_string_1 + assert rig.send_raw(test_string_2, bytes([10])) == test_string_1 + + test_bytes_1 = bytes("test bytes\x00\x01\x02", "ASCII") + test_bytes_2 = test_bytes_1 * 2 + assert rig.send_raw(test_bytes_1) == test_bytes_1 + assert rig.send_raw(test_bytes_1, "s") == b"tes" + assert rig.send_raw(test_bytes_2, b"\x02") == test_bytes_1 + + def test_with_open(self, model, rig_file, serial_speed): """Call all the methods that depend on open()""" rig = Hamlib.Rig(model) @@ -211,6 +228,9 @@ class TestClass: self.do_test_antenna(rig) self.do_test_squelch(rig) self.do_test_callback(rig) + # When using the Dummy driver, rig.c replies with a copy of the data + if model == Hamlib.RIG_MODEL_DUMMY: + self.do_test_send_raw(rig) assert rig.close() is None assert rig.state.comm_state == 0 diff --git a/bindings/rig.swg b/bindings/rig.swg index a062bcfef..7d577afc3 100644 --- a/bindings/rig.swg +++ b/bindings/rig.swg @@ -735,6 +735,48 @@ int *rig_spectrum_cb_python(RIG *rig, struct rig_spectrum_line *rig_spectrum_lin return status; } +#ifdef SWIGPYTHON + PyObject *send_raw(PyObject *send_obj, PyObject *term_obj=NULL) + { + char *send, *term; + size_t send_len; + int reply_len = MAX_RETURNSTR; + unsigned char reply_buffer[MAX_RETURNSTR]; + int count; + + if (PyUnicode_Check(send_obj)) { + send = PyUnicode_AsUTF8AndSize(send_obj, &send_len); + } else if (PyBytes_Check(send_obj)) { + PyBytes_AsStringAndSize(send_obj, &send, &send_len); + } else { + SWIG_Python_RaiseOrModifyTypeError("Expected string or bytes for send argument"); + return NULL; + } + + // Using NULL for length in PyUnicode_AsUTF8AndSize() and PyBytes_AsStringAndSize() + // because we can't accept '\0' because there is no length for term in rig_send_raw() + if (PyUnicode_Check(term_obj)) { + term = PyUnicode_AsUTF8AndSize(term_obj, NULL); + } else if (PyBytes_Check(term_obj)) { + PyBytes_AsStringAndSize(term_obj, &term, NULL); + } else if (term_obj == Py_None) { + term = NULL; + } else { + SWIG_Python_RaiseOrModifyTypeError("Expected string or bytes or NULL for term argument"); + return NULL; + } + + count = rig_send_raw(self->rig, send, send_len, reply_buffer, reply_len, term); + self->error_status = count < 0 ? count : RIG_OK; + + if (PyUnicode_Check(send_obj)) { + return PyUnicode_FromStringAndSize(reply_buffer, count); + } else { + return PyBytes_FromStringAndSize(reply_buffer, count); + } + } +#endif + //#ifndef SWIGJAVA /* TODO */ void get_level(setting_t level, vfo_t vfo = RIG_VFO_CURR) commit 289a3952cefb259da0e39bc3db8b58a31001581c Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Mon Aug 11 12:16:33 2025 +0200 Change the dummy implementation of rig_send_raw() Makes it more similar to the regular version handling also the reply and term arguments. diff --git a/src/rig.c b/src/rig.c index ab800d884..4807011db 100644 --- a/src/rig.c +++ b/src/rig.c @@ -8923,13 +8923,9 @@ HAMLIB_EXPORT(int) rig_send_raw(RIG *rig, const unsigned char *send, if (simulate) { - rig_debug(RIG_DEBUG_VERBOSE, "%s: simulating response for model %s\n", - __func__, rig->caps->model_name); - memcpy(reply, send, send_len); - retval = send_len; - set_transaction_inactive(rig); - ELAPSED2; - RETURNFUNC(retval); + rig_debug(RIG_DEBUG_VERBOSE, "%s: simulating write for model %s\n", + __func__, rig->caps->model_name); + retval = RIG_OK; } else { @@ -8950,8 +8946,18 @@ HAMLIB_EXPORT(int) rig_send_raw(RIG *rig, const unsigned char *send, if (simulate) { // Simulate a response by copying the command - memcpy(buf, send, send_len); - nbytes = send_len + 1; + rig_debug(RIG_DEBUG_VERBOSE, "%s: simulating response for model %s\n", + __func__, rig->caps->model_name); + + nbytes = send_len < reply_len ? send_len : reply_len; + for (int i = 0; i < nbytes; i++) + { + buf[i] = send[i]; + if (term && memchr(term, send[i], 1)) { + nbytes = i + 1; + break; + } + } } else { commit 12ec55c3d7493c60a3444beb2a976fe12de2c650 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Aug 10 21:39:15 2025 +0200 Add missing set_transaction_inactive() Otherwise no other command will be executed afterwards. diff --git a/src/rig.c b/src/rig.c index a27e511c7..ab800d884 100644 --- a/src/rig.c +++ b/src/rig.c @@ -8927,6 +8927,7 @@ HAMLIB_EXPORT(int) rig_send_raw(RIG *rig, const unsigned char *send, __func__, rig->caps->model_name); memcpy(reply, send, send_len); retval = send_len; + set_transaction_inactive(rig); ELAPSED2; RETURNFUNC(retval); } commit 5e336b90c1bef2b972e9e5c0b68177b47554d3c3 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Aug 10 11:42:50 2025 +0200 Improve Doxygen comments diff --git a/rigs/tentec/orion.c b/rigs/tentec/orion.c index c2c30d31f..eb635863c 100644 --- a/rigs/tentec/orion.c +++ b/rigs/tentec/orion.c @@ -228,7 +228,7 @@ static int tt565_transaction(RIG *rig, const char *cmd, int cmd_len, char *data, } /** - * \param rig + * \param rig The rig handle * \returns RIG_OK or < 0 * \brief Basically, it just sets up *priv */ @@ -257,7 +257,7 @@ int tt565_close(RIG *rig) } /** - * \param rig + * \param rig The rig handle * \brief tt565_cleanup routine * * the serial port is closed by the frontend @@ -309,7 +309,7 @@ static void start_thread(RIG *rig) } /** - * \param rig + * \param rig The rig handle * \brief tt565_open routine * * Open the rig - check firmware version issues @@ -342,7 +342,7 @@ int tt565_open(RIG *rig) } /** - * \param rig + * \param rig The rig handle * \param vfo RIG_VFO_MAIN or RIG_VFO_SUB * \returns 'M' or 'S' for main or subreceiver or <0 error * \brief vfo must be RIG_VFO_MAIN or RIG_VFO_SUB @@ -375,7 +375,7 @@ static char which_receiver(const RIG *rig, vfo_t vfo) } } /** - * \param rig + * \param rig The rig handle * \param vfo RIG_VFO_A, RIG_VFO_B, or RIG_VFO_NONE * \returns 'A' or 'B' or 'N' for VFO A, B, or null VFO, or <0 error * \brief vfo must be RIG_VFO_A, RIG_VFO_B, or RIG_VFO_NONE. @@ -1972,7 +1972,7 @@ int tt565_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op) } /** - * \param rig + * \param rig The rig handle * \param vfo * \param msg A message string (<= 20 char) * \returns RIG_OK diff --git a/src/ext.c b/src/ext.c index 710748d4b..7236f1d79 100644 --- a/src/ext.c +++ b/src/ext.c @@ -218,7 +218,7 @@ int HAMLIB_API rig_ext_parm_foreach(RIG *rig, /** - * \param rig + * \param rig The rig handle * \param name * \brief lookup ext token by its name, return pointer to confparams struct. * @@ -267,7 +267,7 @@ const struct confparams *HAMLIB_API rig_ext_lookup(RIG *rig, const char *name) } /** - * \param rig + * \param rig The rig handle * \param token * \brief lookup ext token, return pointer to confparams struct. * @@ -316,7 +316,7 @@ const struct confparams *HAMLIB_API rig_ext_lookup_tok(RIG *rig, /** - * \param rig + * \param rig The rig handle * \param name * \brief Simple lookup returning token id associated with name */ diff --git a/src/misc.c b/src/misc.c index 1e3e3665b..8d448d2a2 100644 --- a/src/misc.c +++ b/src/misc.c @@ -1031,7 +1031,7 @@ static const struct /** * \brief check input to set_level - * \param rig Pointer to rig data + * \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 diff --git a/src/rig.c b/src/rig.c index 8e0ca4e00..a27e511c7 100644 --- a/src/rig.c +++ b/src/rig.c @@ -8887,9 +8887,23 @@ extern int read_icom_frame(hamlib_port_t *p, const unsigned char rxbuffer[], size_t rxbuffer_len); -// Returns # of bytes read -// reply_len should be max bytes expected + 1 -// if term is null then will read reply_len bytes exactly and reply will not be null terminated +/** + * \brief Send verbatim data + * + * \a reply_len should be max bytes expected + 1 + * + * If \a term is NULL then will read \a reply_len bytes exactly and reply will not be '\0' terminated. + * \param rig The rig handle + * \param send The buffer containing the data to be sent + * \param send_len The length of send buffer + * \param reply The buffer that will contain the data to be received + * \param reply_len The length of the reply buffer + * \param term The optional 1-char string that will terminate the read + * + * \return the number of bytes read if the operation has been successful, otherwise + * a negative value if an error occurred (in which case, cause is + * set appropriately). + */ HAMLIB_EXPORT(int) rig_send_raw(RIG *rig, const unsigned char *send, int send_len, unsigned char *reply, int reply_len, unsigned char *term) { ----------------------------------------------------------------------- Summary of changes: bindings/python/test_Hamlib_Rig_class.py | 1 + bindings/python/test_rig.py | 20 +++++++++++++++ bindings/rig.swg | 42 +++++++++++++++++++++++++++++++ rigs/tentec/orion.c | 12 ++++----- src/ext.c | 6 ++--- src/misc.c | 2 +- src/rig.c | 43 ++++++++++++++++++++++++-------- 7 files changed, 105 insertions(+), 21 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-08-10 23:14:39
|
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 0d1481d86f9ebf889525cc53b0f02e14d340361a (commit) from c1aaeba5acd6f1a78163d7b9fc86d4f268ef78d4 (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 0d1481d86f9ebf889525cc53b0f02e14d340361a Author: Nate Bargmann <n0...@n0...> Date: Sun Aug 10 10:39:54 2025 -0500 Update W32 and W64 build scripts Renaming the lib\gcc directory to lib\gcc-mingw broke the build of WSJT-X. See (yes, the archive sucks): https://sourceforge.net/p/hamlib/mailman/message/59215755/ diff --git a/scripts/build-w32.sh b/scripts/build-w32.sh index 76c766a4a..e518d27b8 100755 --- a/scripts/build-w32.sh +++ b/scripts/build-w32.sh @@ -100,7 +100,7 @@ hamlib-w32-4.7~git ├── include │ └── hamlib └── lib - ├── gcc-mingw + ├── gcc └── msvc The 'bin' and 'doc' directories will be of interest to users while developers @@ -198,8 +198,8 @@ program is not considered a "derivative work" when using the published Hamlib API and normal linking to the front-end library, and may be of a license of your choosing. -As of 21 Jul 2025 a .lib file is generated using the MinGW dlltool utility. -This file is now installed to the lib\gcc-mingw directory. As it is generated +As of 04 Aug 2025 a .lib file is generated using the MinGW dlltool utility. +This file is now installed to the lib\gcc directory. As it is generated by the MinGW dlltool utility, it is only suitable for use with MinGW/GCC. For developers using Microsoft Visual Studio, the following recipe is @@ -255,9 +255,9 @@ END_OF_README LDFLAGS="-L${LIBUSB_1_0_BIN_PATH}/MinGW32/dll" -make -j 4 install +make -j 4 --no-print-directory install -mkdir -p ${ZIP_DIR}/bin ${ZIP_DIR}/lib/msvc ${ZIP_DIR}/lib/gcc-mingw ${ZIP_DIR}/include ${ZIP_DIR}/doc +mkdir -p ${ZIP_DIR}/bin ${ZIP_DIR}/lib/msvc ${ZIP_DIR}/lib/gcc ${ZIP_DIR}/include ${ZIP_DIR}/doc cp -a src/libhamlib.def ${ZIP_DIR}/lib/msvc/libhamlib-4.def todos ${ZIP_DIR}/lib/msvc/libhamlib-4.def cp -a ${INST_DIR}/include/hamlib ${ZIP_DIR}/include/. @@ -291,7 +291,7 @@ do done cp -a ${INST_DIR}/bin/libhamlib-?.dll ${ZIP_DIR}/bin/. -cp -a ${INST_DIR}/lib/libhamlib.dll.a ${ZIP_DIR}/lib/gcc-mingw/. +cp -a ${INST_DIR}/lib/libhamlib.dll.a ${ZIP_DIR}/lib/gcc/. # NB: Strip Hamlib DLLs and EXEs ${HOST_ARCH_STRIP} ${ZIP_DIR}/bin/*.exe ${ZIP_DIR}/bin/*hamlib-*.dll @@ -337,6 +337,6 @@ fi # Generate .lib file for GCC on MinGW per Jonathan Yong from mingw-w64 # https://sourceforge.net/p/mingw-w64/discussion/723798/thread/e23dceba20/?limit=25#51dd/3df2/3708/e62b -${HOST_ARCH_DLLTOOL} --input-def ${ZIP_DIR}/lib/msvc/libhamlib-4.def --output-lib ${ZIP_DIR}/lib/gcc-mingw/libhamlib-4.lib +${HOST_ARCH_DLLTOOL} --input-def ${ZIP_DIR}/lib/msvc/libhamlib-4.def --output-lib ${ZIP_DIR}/lib/gcc/libhamlib-4.lib /usr/bin/zip -r ${HL_FILENAME}.zip $(basename ${ZIP_DIR}) diff --git a/scripts/build-w64.sh b/scripts/build-w64.sh index 12a116cc6..40f0643ce 100755 --- a/scripts/build-w64.sh +++ b/scripts/build-w64.sh @@ -100,7 +100,7 @@ hamlib-w64-4.7~git ├── include │ └── hamlib └── lib - ├── gcc-mingw + ├── gcc └── msvc The 'bin' and 'doc' directories will be of interest to users while developers @@ -188,7 +188,7 @@ There is a libhamlib-4.def definition file for MS Visual C++/Visual Studio in lib\msvc. Refer to the recipe below to generate a local libhamlib-4.lib file for use with the VC++/VS linker. -Simply '#include <hamlib/rig.h>' (pr any other header) (add directory to +Simply '#include <hamlib/rig.h>' (or any other header) (add directory to include path), include libhamlib-4.lib in your project and you are done. Note: VC++/VS cannot compile all the Hamlib code, but the API defined by rig.h has been made MSVC friendly :-) @@ -198,8 +198,8 @@ program is not considered a "derivative work" when using the published Hamlib API and normal linking to the front-end library, and may be of a license of your choosing. -As of 21 Jul 2025 a .lib file is generated using the MinGW dlltool utility. -This file is now installed to the lib\gcc-mingw directory. As it is generated +As of 04 Aug 2025 a .lib file is generated using the MinGW dlltool utility. +This file is now installed to the lib\gcc directory. As it is generated by the MinGW dlltool utility, it is only suitable for use with MinGW/GCC. For developers using Microsoft Visual Studio, the following recipe is @@ -255,9 +255,9 @@ END_OF_README LDFLAGS="-L${LIBUSB_1_0_BIN_PATH}/MinGW64/dll" -make -j 4 install +make -j 4 --no-print-directory install -mkdir -p ${ZIP_DIR}/bin ${ZIP_DIR}/lib/msvc ${ZIP_DIR}/lib/gcc-mingw ${ZIP_DIR}/include ${ZIP_DIR}/doc +mkdir -p ${ZIP_DIR}/bin ${ZIP_DIR}/lib/msvc ${ZIP_DIR}/lib/gcc ${ZIP_DIR}/include ${ZIP_DIR}/doc cp -a src/libhamlib.def ${ZIP_DIR}/lib/msvc/libhamlib-4.def todos ${ZIP_DIR}/lib/msvc/libhamlib-4.def cp -a ${INST_DIR}/include/hamlib ${ZIP_DIR}/include/. @@ -291,7 +291,7 @@ do done cp -a ${INST_DIR}/bin/libhamlib-?.dll ${ZIP_DIR}/bin/. -cp -a ${INST_DIR}/lib/libhamlib.dll.a ${ZIP_DIR}/lib/gcc-mingw/. +cp -a ${INST_DIR}/lib/libhamlib.dll.a ${ZIP_DIR}/lib/gcc/. # NB: Strip Hamlib DLLs and EXEs ${HOST_ARCH_STRIP} ${ZIP_DIR}/bin/*.exe ${ZIP_DIR}/bin/*hamlib-*.dll @@ -337,6 +337,6 @@ fi # Generate .lib file for GCC on MinGW per Jonathan Yong from mingw-w64 # https://sourceforge.net/p/mingw-w64/discussion/723798/thread/e23dceba20/?limit=25#51dd/3df2/3708/e62b -${HOST_ARCH_DLLTOOL} --input-def ${ZIP_DIR}/lib/msvc/libhamlib-4.def --output-lib ${ZIP_DIR}/lib/gcc-mingw/libhamlib-4.lib +${HOST_ARCH_DLLTOOL} --input-def ${ZIP_DIR}/lib/msvc/libhamlib-4.def --output-lib ${ZIP_DIR}/lib/gcc/libhamlib-4.lib /usr/bin/zip -r ${HL_FILENAME}.zip $(basename ${ZIP_DIR}) ----------------------------------------------------------------------- Summary of changes: scripts/build-w32.sh | 14 +++++++------- scripts/build-w64.sh | 16 ++++++++-------- 2 files changed, 15 insertions(+), 15 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-08-09 23:52:29
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via c1aaeba5acd6f1a78163d7b9fc86d4f268ef78d4 (commit) via 221cc512bc7f87c540f55fbda8c4482cfc5e527d (commit) from 10303d58038e4b35c00d94c35c417ca7cc2fb73c (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 c1aaeba5acd6f1a78163d7b9fc86d4f268ef78d4 Merge: 10303d580 221cc512b Author: Nate Bargmann <n0...@n0...> Date: Sat Aug 9 18:43:57 2025 -0500 Merge GitHub PR #1837 commit 221cc512bc7f87c540f55fbda8c4482cfc5e527d Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Aug 9 22:31:17 2025 +0200 Fix setting antenna number 3 for Yaesu FTDX3000 The argument ant_t ant is a bit mask, not a scalar. Also use the defines instead of magic numbers. diff --git a/rigs/yaesu/ft3000.c b/rigs/yaesu/ft3000.c index 159197d63..9ca8d37a5 100644 --- a/rigs/yaesu/ft3000.c +++ b/rigs/yaesu/ft3000.c @@ -155,20 +155,21 @@ static int ft3000_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option) switch (ant) { - case 1: + case RIG_ANT_1: cmd = "AN01;"; // R3/1 ANT1/ANT3 break; - case 2: + case RIG_ANT_2: cmd = "AN02;"; // RE/2 ANT2/ANT3 break; - case 3: + case RIG_ANT_3: cmd = "AN03;"; // TRX ANT3 break; default: - rig_debug(RIG_DEBUG_ERR, "%s: expected 1,2,3 got %u\n", __func__, ant); + rig_debug(RIG_DEBUG_ERR, "%s: expected one of %u,%u,%u got %u\n", __func__, + RIG_ANT_1, RIG_ANT_2, RIG_ANT_3, ant); RETURNFUNC(-RIG_EINVAL); } ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/ft3000.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-08-09 23:43: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 10303d58038e4b35c00d94c35c417ca7cc2fb73c (commit) via 81cb260670471689d7a3543153bb5c56cc26b5ce (commit) via e2214fd2f18f326c0325f2e7abb7c892d13885aa (commit) via 2890da9d79fdcdd070fbc924cd326a5d35d0b53d (commit) via 8e4bcbcede1c42a39b74371c5b337bac2c49ff16 (commit) via 9e1c7b5ec1f33dea1cf5a263c2ec8e12f791ac06 (commit) via 3bc1cc8744e973e314882f1c43a58478c1346e4c (commit) via 8324c85487c416025f6907a920f3528e36c07b8e (commit) from 2462ab0a135ca0274a069e27c319c90957d70ac1 (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 10303d58038e4b35c00d94c35c417ca7cc2fb73c Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Aug 9 18:09:17 2025 +0200 Fix function signature of spectrum_callback() diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py index 474fe1d1f..5c0c305ec 100755 --- a/bindings/python/test_rig.py +++ b/bindings/python/test_rig.py @@ -181,8 +181,8 @@ class TestClass: assert rig.set_pltune_callback(None) is None # spectrum event callback - def spectrum_callback(vfo, ptt, arg): - print("spectrum_callback", vfo, ptt, arg) + def spectrum_callback(rig_spectrum_line, arg): + print("spectrum_callback", rig_spectrum_line, arg) assert (1, 5000, 2345678901) == (vfo, arg) assert rig.set_spectrum_callback(spectrum_callback, 7890123456) is None commit 81cb260670471689d7a3543153bb5c56cc26b5ce Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Aug 9 14:54:31 2025 +0200 Fix ptt_callback() diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py index 315b8c5d2..474fe1d1f 100755 --- a/bindings/python/test_rig.py +++ b/bindings/python/test_rig.py @@ -153,8 +153,7 @@ class TestClass: # PTT event callback def ptt_callback(vfo, ptt, arg): - print("ptt_callback", vfo, ptt, arg) - assert (1, 5000, 4567890123) == (vfo, arg) + assert (Hamlib.RIG_VFO_CURR, Hamlib.RIG_PTT_ON, 4567890123) == (vfo, ptt, arg) assert rig.set_ptt_callback(ptt_callback, 4567890123) is None assert rig.set_ptt(Hamlib.RIG_VFO_CURR, Hamlib.RIG_PTT_ON) is None commit e2214fd2f18f326c0325f2e7abb7c892d13885aa Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Aug 9 14:32:59 2025 +0200 Change .ptt_type to RIG_PTT_RIG for RIG_MODEL_DUMMY With the old value of RIG_PTT_NONE, dummy_get_ptt() and dummy_set_ptt() were never called because rig_get_ptt() and rig_set_ptt() do check .ptt_type and return -RIG_ENAVAIL in that case. Do not change .ptt_type for RIG_MODEL_DUMMY_NOVFO so that both cases can be tested if needed. diff --git a/rigs/dummy/dummy.c b/rigs/dummy/dummy.c index 3f54a655e..544de59cc 100644 --- a/rigs/dummy/dummy.c +++ b/rigs/dummy/dummy.c @@ -2460,7 +2460,7 @@ struct rig_caps dummy_caps = .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_OTHER, .targetable_vfo = RIG_TARGETABLE_PTT | RIG_TARGETABLE_RITXIT | RIG_TARGETABLE_FREQ | RIG_TARGETABLE_MODE | RIG_TARGETABLE_SPECTRUM, - .ptt_type = RIG_PTT_NONE, + .ptt_type = RIG_PTT_RIG, .dcd_type = RIG_DCD_RIG, .port_type = RIG_PORT_NONE, .has_get_func = DUMMY_FUNC, commit 2890da9d79fdcdd070fbc924cd326a5d35d0b53d Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Aug 9 10:50:10 2025 +0200 Split the tests It makes it easier in future to conditionally run some tests(eg. to not test PTT for receiver-only rigs), or to run tests in isolation (after renaming them). It makes it easier to look at failing tests because pytest prints the code of the failing test up to the failure including any function that called the failed test (in this case would print everything from def test_with_open() up to the line with the failed assert. diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py index e7966139b..315b8c5d2 100755 --- a/bindings/python/test_rig.py +++ b/bindings/python/test_rig.py @@ -41,23 +41,10 @@ class TestClass: assert rig.token_lookup("") is None - def test_with_open(self, model, rig_file, serial_speed): - """Call all the methods that depend on open()""" - rig = Hamlib.Rig(model) - assert rig is not None - - assert rig.state.comm_state == 0 - assert rig.state.comm_status == Hamlib.RIG_COMM_STATUS_DISCONNECTED - assert rig.set_conf("rig_pathname", rig_file) is None - assert rig.set_conf("serial_speed", str(serial_speed)) is None - assert rig.open() is None - assert rig.state.comm_state == 1 - assert rig.state.comm_status == Hamlib.RIG_COMM_STATUS_OK - info = rig.get_info() - assert isinstance(info, str) - - # Frequency + def do_test_frequency(self, rig): + """Frequency tests""" + # TODO use a frequency suitable for the VFO frequency = 5700000000 assert rig.set_freq(Hamlib.RIG_VFO_CURR, frequency) is None assert rig.get_freq() == 5700000000.0 @@ -66,7 +53,9 @@ class TestClass: assert isinstance(rig.get_freq(Hamlib.RIG_VFO_CURR), float) assert rig.get_freq(Hamlib.RIG_VFO_CURR) == 5700000000.5 - # VFO + + def do_test_vfo(self, rig): + """VFO tests""" assert rig.set_vfo(Hamlib.RIG_VFO_A) is None assert rig.get_vfo() == Hamlib.RIG_VFO_A @@ -78,7 +67,9 @@ class TestClass: assert rig.get_split_vfo() == [Hamlib.RIG_SPLIT_OFF, Hamlib.RIG_VFO_B] assert rig.get_split_vfo(Hamlib.RIG_VFO_CURR) == [Hamlib.RIG_SPLIT_OFF, Hamlib.RIG_VFO_B] - # RIT and XIT + + def do_test_rit_xit(self, rig): + """RIT and XIT tests""" assert rig.set_rit(Hamlib.RIG_VFO_CURR, 100) is None assert rig.get_rit() == 100 @@ -87,7 +78,9 @@ class TestClass: assert rig.get_xit() == 200 assert rig.get_xit(Hamlib.RIG_VFO_CURR) == 200 - # Antenna + + def do_test_antenna(self, rig): + """Antenna tests""" # FIXME should use a RIG_ANT_* constant but they aren't available in the bindings RIG_ANT_1 = 1<<0 @@ -101,7 +94,9 @@ class TestClass: assert rig.set_ant(RIG_ANT_1, option, Hamlib.RIG_VFO_CURR) is None assert rig.get_ant(RIG_ANT_CURR, Hamlib.RIG_VFO_A) == expected - # Squelch codes and tones + + def do_test_squelch(self, rig): + """Squelch codes and tones""" assert rig.set_ctcss_sql(Hamlib.RIG_VFO_CURR, 885) is None assert rig.get_ctcss_sql() == 885 @@ -116,16 +111,10 @@ class TestClass: assert rig.get_dcs_sql() == 134 assert rig.get_dcs_sql(Hamlib.RIG_VFO_CURR) == 134 - # Callbacks - self.do_test_callbacks(rig) - assert rig.close() is None - assert rig.state.comm_state == 0 - assert rig.state.comm_status == Hamlib.RIG_COMM_STATUS_DISCONNECTED - info = rig.get_info() - assert info is None + def do_test_callback(self, rig): + """Callback tests""" - def do_test_callbacks(self, rig): # Frequency event callback def freq_callback(vfo, freq, arg): assert (1, 144200000.5, 1234567890) == (vfo, freq, arg) @@ -202,6 +191,35 @@ class TestClass: assert rig.set_spectrum_callback(None) is None + def test_with_open(self, model, rig_file, serial_speed): + """Call all the methods that depend on open()""" + rig = Hamlib.Rig(model) + assert rig is not None + + assert rig.state.comm_state == 0 + assert rig.state.comm_status == Hamlib.RIG_COMM_STATUS_DISCONNECTED + assert rig.set_conf("rig_pathname", rig_file) is None + assert rig.set_conf("serial_speed", str(serial_speed)) is None + assert rig.open() is None + assert rig.state.comm_state == 1 + assert rig.state.comm_status == Hamlib.RIG_COMM_STATUS_OK + info = rig.get_info() + assert isinstance(info, str) + + self.do_test_frequency(rig) + self.do_test_vfo(rig) + self.do_test_rit_xit(rig) + self.do_test_antenna(rig) + self.do_test_squelch(rig) + self.do_test_callback(rig) + + assert rig.close() is None + assert rig.state.comm_state == 0 + assert rig.state.comm_status == Hamlib.RIG_COMM_STATUS_DISCONNECTED + info = rig.get_info() + assert info is None + + @pytest.mark.skipif('config.getoption("model") != Hamlib.RIG_MODEL_DUMMY') def test_misc(self, model): """Just call all the methods""" commit 8e4bcbcede1c42a39b74371c5b337bac2c49ff16 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Fri Aug 8 23:26:18 2025 +0200 Add another cross-reference in a Doxygen comment diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index a6f472bda..72eb3d105 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -2652,7 +2652,8 @@ typedef int (*spectrum_cb_t)(RIG *, * really appropriate in a GUI. * * \sa rig_set_dcd_callback(), rig_set_freq_callback(), rig_set_mode_callback(), - * rig_set_ptt_callback(), rig_set_spectrum_callback(), rig_set_vfo_callback() + * rig_set_pltune_callback(), rig_set_ptt_callback(), rig_set_spectrum_callback(), + * rig_set_vfo_callback() */ // Do NOT add/remove from this structure -- it will break DLL backwards compatibility struct rig_callbacks { commit 9e1c7b5ec1f33dea1cf5a263c2ec8e12f791ac06 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Fri Aug 8 23:36:38 2025 +0200 Allocate zereod memory for struct python_callbacks Otherwise Py_XDECREF() would randomly segfault trying to use uninitialized memory that by chance is not zeroed. diff --git a/bindings/ignore.swg b/bindings/ignore.swg index 4114aabc4..34f634034 100644 --- a/bindings/ignore.swg +++ b/bindings/ignore.swg @@ -68,7 +68,6 @@ %rename("%s", regexmatch$name="^RIG_VFO_") ""; %ignore RIG_EK; // an internal macro %ignore RIG_ELAD; // an internal macro -%rename("$ignore", regexmatch$name="python_callbacks$") ""; // internal structs and methods used by bindings // Rotators @@ -112,6 +111,8 @@ %ignore PRIfreq; %ignore SCNfreq; +%rename("$ignore", regexmatch$name="python_callbacks") ""; // internal structs and methods used by bindings + #ifdef SWIGLUA %ignore Rig::set_level(setting_t,int,vfo_t); %ignore Rig::set_ext_level(setting_t,value_t,vfo_t); diff --git a/bindings/macros.swg b/bindings/macros.swg index 888991858..29396a47a 100644 --- a/bindings/macros.swg +++ b/bindings/macros.swg @@ -122,13 +122,13 @@ void set_ ## event_name ## _callback(PyObject *cb, PyObject *arg=NULL) }; Py_XINCREF(cb); - Py_XDECREF(self->python_callbacks. ## event_name ## _event); + Py_XDECREF(self->python_callbacks-> ## event_name ## _event); Py_XINCREF(arg); - Py_XDECREF(self->python_callbacks. ## event_name ## _arg); + Py_XDECREF(self->python_callbacks-> ## event_name ## _arg); - self->python_callbacks. ## event_name ## _event = cb; - self->python_callbacks. ## event_name ## _arg = arg; + self->python_callbacks-> ## event_name ## _event = cb; + self->python_callbacks-> ## event_name ## _arg = arg; self->error_status = function_prefix ## set_ ## event_name ## _callback(class_pointer, callback, self); return; diff --git a/bindings/rig.swg b/bindings/rig.swg index 2be00320a..a062bcfef 100644 --- a/bindings/rig.swg +++ b/bindings/rig.swg @@ -45,16 +45,9 @@ #pragma SWIG nowarn=451 -typedef struct Rig { - RIG *rig; - struct rig_caps *caps; /* shortcut to RIG->caps */ - struct rig_state *state; /* shortcut to RIG->state */ - int error_status; - int do_exception; - // Handling of event callbacks #ifdef SWIGPYTHON // This mirrors "struct rig_callbacks" from rig.h using Python types - struct { + typedef struct { PyObject *freq_event; /*!< Frequency change event */ PyObject *freq_arg; /*!< Frequency change argument */ PyObject *mode_event; /*!< Mode change event */ @@ -70,7 +63,17 @@ typedef struct Rig { PyObject *spectrum_event; /*!< Spectrum line reception event */ PyObject *spectrum_arg; /*!< Spectrum line reception argument */ /* etc.. */ - } python_callbacks; + } python_callbacks_t; +#endif + +typedef struct Rig { + RIG *rig; + struct rig_caps *caps; /* shortcut to RIG->caps */ + struct rig_state *state; /* shortcut to RIG->state */ + int error_status; + int do_exception; +#ifdef SWIGPYTHON + python_callbacks_t *python_callbacks; #endif } Rig; @@ -87,10 +90,10 @@ int *rig_freq_cb_python(RIG *rig, vfo_t vfo, freq_t freq, rig_ptr_t arg) python_arguments = PyTuple_Pack(3, PyLong_FromLong(vfo), PyFloat_FromDouble(freq), - self->python_callbacks.freq_arg + self->python_callbacks->freq_arg ); - PyObject_CallObject(self->python_callbacks.freq_event, python_arguments); + PyObject_CallObject(self->python_callbacks->freq_event, python_arguments); Py_XDECREF(python_arguments); return RIG_OK; @@ -105,10 +108,10 @@ int *rig_mode_cb_python(RIG *rig, vfo_t vfo, rmode_t rmode, pbwidth_t pbwidth, r PyLong_FromLong(vfo), PyLong_FromLong(rmode), PyLong_FromLong(pbwidth), - self->python_callbacks.mode_arg + self->python_callbacks->mode_arg ); - PyObject_CallObject(self->python_callbacks.mode_event, python_arguments); + PyObject_CallObject(self->python_callbacks->mode_event, python_arguments); Py_XDECREF(python_arguments); @@ -120,11 +123,12 @@ int *rig_vfo_cb_python(RIG *rig, vfo_t vfo, rig_ptr_t arg) Rig *self = arg; PyObject *python_arguments; - python_arguments = PyTuple_Pack(1, - self->python_callbacks.vfo_arg + python_arguments = PyTuple_Pack(2, + PyLong_FromLong(vfo), + self->python_callbacks->vfo_arg ); - PyObject_CallObject(self->python_callbacks.vfo_event, python_arguments); + PyObject_CallObject(self->python_callbacks->vfo_event, python_arguments); Py_XDECREF(python_arguments); @@ -136,27 +140,31 @@ int *rig_ptt_cb_python(RIG *rig, vfo_t vfo, ptt_t ptt, rig_ptr_t arg) Rig *self = arg; PyObject *python_arguments; - python_arguments = PyTuple_Pack(1, - self->python_callbacks.ptt_arg + python_arguments = PyTuple_Pack(3, + PyLong_FromLong(vfo), + PyLong_FromLong(ptt), + self->python_callbacks->ptt_arg ); - PyObject_CallObject(self->python_callbacks.ptt_event, python_arguments); + PyObject_CallObject(self->python_callbacks->ptt_event, python_arguments); Py_XDECREF(python_arguments); return RIG_OK; } -int *rig_dcd_cb_python(RIG *rig, vfo_t vfo, dcd_t, 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; - python_arguments = PyTuple_Pack(1, - self->python_callbacks.dcd_arg + python_arguments = PyTuple_Pack(3, + PyLong_FromLong(vfo), + PyLong_FromLong(dcd), + self->python_callbacks->dcd_arg ); - PyObject_CallObject(self->python_callbacks.dcd_event, python_arguments); + PyObject_CallObject(self->python_callbacks->dcd_event, python_arguments); Py_XDECREF(python_arguments); @@ -169,10 +177,10 @@ int *rig_pltune_cb_python(RIG *rig, vfo_t vfo, freq_t *freq, rmode_t *rmode, pbw PyObject *python_arguments; python_arguments = PyTuple_Pack(1, - self->python_callbacks.pltune_arg + self->python_callbacks->pltune_arg ); - PyObject_CallObject(self->python_callbacks.pltune_event, python_arguments); + PyObject_CallObject(self->python_callbacks->pltune_event, python_arguments); Py_XDECREF(python_arguments); @@ -185,10 +193,10 @@ int *rig_spectrum_cb_python(RIG *rig, struct rig_spectrum_line *rig_spectrum_lin PyObject *python_arguments; python_arguments = PyTuple_Pack(1, - self->python_callbacks.spectrum_arg + self->python_callbacks->spectrum_arg ); - PyObject_CallObject(self->python_callbacks.spectrum_event, python_arguments); + PyObject_CallObject(self->python_callbacks->spectrum_event, python_arguments); Py_XDECREF(python_arguments); @@ -468,6 +476,13 @@ int *rig_spectrum_cb_python(RIG *rig, struct rig_spectrum_line *rig_spectrum_lin free(r); return NULL; } +#ifdef SWIGPYTHON + r->python_callbacks = calloc(1, sizeof(python_callbacks_t)); + if (!r->python_callbacks) { + free(r); + return NULL; + } +#endif /* install shortcuts */ r->caps = r->rig->caps; r->state = &r->rig->state; @@ -478,6 +493,9 @@ int *rig_spectrum_cb_python(RIG *rig, struct rig_spectrum_line *rig_spectrum_lin } ~Rig () { rig_cleanup(self->rig); +#ifdef SWIGPYTHON + free(self->python_callbacks); +#endif free(self); } commit 3bc1cc8744e973e314882f1c43a58478c1346e4c Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Fri Aug 8 12:00:57 2025 +0200 Implement remaining event callbacks Implements: rig_set_dcd_callback(), rig_set_freq_callback(), rig_set_mode_callback(), rig_pltune_callback(), rig_set_ptt_callback(), rig_set_spectrum_callback(), rig_set_vfo_callback() diff --git a/bindings/python/test_Hamlib_Rig_class.py b/bindings/python/test_Hamlib_Rig_class.py index 3ebbc8c5b..3f60f0ce6 100755 --- a/bindings/python/test_Hamlib_Rig_class.py +++ b/bindings/python/test_Hamlib_Rig_class.py @@ -76,6 +76,7 @@ class TestClass: 'set_conf', 'set_ctcss_sql', 'set_ctcss_tone', +'set_dcd_callback', 'set_dcs_code', 'set_dcs_sql', 'set_ext_func', @@ -87,12 +88,16 @@ class TestClass: 'set_level', 'set_mem', 'set_mode', +'set_mode_callback', 'set_parm', +'set_pltune_callback', 'set_powerstat', 'set_ptt', +'set_ptt_callback', 'set_rit', 'set_rptr_offs', 'set_rptr_shift', +'set_spectrum_callback', 'set_split_freq', 'set_split_freq_mode', 'set_split_mode', @@ -100,6 +105,7 @@ class TestClass: 'set_trn', 'set_ts', 'set_vfo', +'set_vfo_callback', 'set_vfo_opt', 'set_xit', 'token_lookup', diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py index 2b5dd863e..e7966139b 100755 --- a/bindings/python/test_rig.py +++ b/bindings/python/test_rig.py @@ -137,6 +137,70 @@ class TestClass: assert rig.set_freq(Hamlib.RIG_VFO_CURR, 144210000) is None # TODO assert that freq_callback() is called once + # Mode event callback + def mode_callback(vfo, mode, pbwidth, arg): + assert (1, 32, 5000, 2345678901) == (vfo, mode, pbwidth, arg) + + # FIXME should use a Hamlib.RIG_PASSBAND_* constant but they aren't available in the bindings + RIG_PASSBAND_NOCHANGE = -1 + assert rig.set_mode_callback(mode_callback, 2345678901) is None + assert rig.set_mode(Hamlib.RIG_MODE_FM, 5000) is None + # TODO assert that mode_callback() is called once + assert rig.set_mode_callback(None) is None + assert rig.set_mode(Hamlib.RIG_MODE_FM, 15000) is None + # TODO assert that mode_callback() is called once + + # VFO event callback + def vfo_callback(vfo, arg): + assert (1, 3456789012) == (vfo, arg) + + assert rig.set_vfo(Hamlib.RIG_VFO_B) is None + assert rig.set_vfo_callback(vfo_callback, 3456789012) is None + assert rig.set_vfo(Hamlib.RIG_VFO_A) is None + # TODO assert that vfo_callback() is called once + assert rig.set_vfo_callback(None) is None + assert rig.set_vfo(Hamlib.RIG_VFO_CURR) is None + # TODO assert that vfo_callback() is called once + + # PTT event callback + def ptt_callback(vfo, ptt, arg): + print("ptt_callback", vfo, ptt, arg) + assert (1, 5000, 4567890123) == (vfo, arg) + + assert rig.set_ptt_callback(ptt_callback, 4567890123) is None + assert rig.set_ptt(Hamlib.RIG_VFO_CURR, Hamlib.RIG_PTT_ON) is None + # TODO assert that ptt_callback() is called once + assert rig.set_ptt_callback(None) is None + assert rig.set_ptt(Hamlib.RIG_VFO_CURR, Hamlib.RIG_PTT_OFF) is None + # TODO assert that ptt_callback() is called once + + # DCD event callback + def dcd_callback(vfo, ptt, arg): + print("dcd_callback", vfo, dcd, arg) + assert (1, 5000, 2345678901) == (vfo, arg) + + assert rig.set_dcd_callback(dcd_callback, 5678901234) is None + # TODO simulate dcd events in dummy.c + assert rig.set_dcd_callback(None) is None + + # PLtune event callback + def pltune_callback(vfo, ptt, arg): + print("pltune_callback", vfo, ptt, arg) + assert (1, 5000, 2345678901) == (vfo, arg) + + assert rig.set_pltune_callback(pltune_callback, 6789012345) is None + # TODO simulate pltune events in dummy.c + assert rig.set_pltune_callback(None) is None + + # spectrum event callback + def spectrum_callback(vfo, ptt, arg): + print("spectrum_callback", vfo, ptt, arg) + assert (1, 5000, 2345678901) == (vfo, arg) + + assert rig.set_spectrum_callback(spectrum_callback, 7890123456) is None + # TODO simulate spectrum events in dummy.c + assert rig.set_spectrum_callback(None) is None + @pytest.mark.skipif('config.getoption("model") != Hamlib.RIG_MODEL_DUMMY') def test_misc(self, model): diff --git a/bindings/rig.swg b/bindings/rig.swg index 76a393e18..2be00320a 100644 --- a/bindings/rig.swg +++ b/bindings/rig.swg @@ -65,7 +65,7 @@ typedef struct Rig { PyObject *ptt_arg; /*!< PTT change argument */ PyObject *dcd_event; /*!< DCD change event */ PyObject *dcd_arg; /*!< DCD change argument */ - PyObject *pltune; /*!< Pipeline tuning module freq/mode/width callback */ + PyObject *pltune_event; /*!< Pipeline tuning module freq/mode/width callback NOTE: the C struct doesn't have the _event suffix*/ PyObject *pltune_arg; /*!< Pipeline tuning argument */ PyObject *spectrum_event; /*!< Spectrum line reception event */ PyObject *spectrum_arg; /*!< Spectrum line reception argument */ @@ -95,6 +95,105 @@ 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) +{ + Rig *self = arg; + PyObject *python_arguments; + + python_arguments = PyTuple_Pack(4, + PyLong_FromLong(vfo), + PyLong_FromLong(rmode), + PyLong_FromLong(pbwidth), + self->python_callbacks.mode_arg + ); + + PyObject_CallObject(self->python_callbacks.mode_event, python_arguments); + + Py_XDECREF(python_arguments); + + return RIG_OK; +} + +int *rig_vfo_cb_python(RIG *rig, vfo_t vfo, rig_ptr_t arg) +{ + Rig *self = arg; + PyObject *python_arguments; + + python_arguments = PyTuple_Pack(1, + self->python_callbacks.vfo_arg + ); + + PyObject_CallObject(self->python_callbacks.vfo_event, python_arguments); + + Py_XDECREF(python_arguments); + + return RIG_OK; +} + +int *rig_ptt_cb_python(RIG *rig, vfo_t vfo, ptt_t ptt, rig_ptr_t arg) +{ + Rig *self = arg; + PyObject *python_arguments; + + python_arguments = PyTuple_Pack(1, + self->python_callbacks.ptt_arg + ); + + PyObject_CallObject(self->python_callbacks.ptt_event, python_arguments); + + Py_XDECREF(python_arguments); + + return RIG_OK; +} + +int *rig_dcd_cb_python(RIG *rig, vfo_t vfo, dcd_t, rig_ptr_t arg) +{ + Rig *self = arg; + PyObject *python_arguments; + + python_arguments = PyTuple_Pack(1, + self->python_callbacks.dcd_arg + ); + + PyObject_CallObject(self->python_callbacks.dcd_event, python_arguments); + + Py_XDECREF(python_arguments); + + 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) +{ + Rig *self = arg; + PyObject *python_arguments; + + python_arguments = PyTuple_Pack(1, + self->python_callbacks.pltune_arg + ); + + PyObject_CallObject(self->python_callbacks.pltune_event, python_arguments); + + Py_XDECREF(python_arguments); + + return RIG_OK; +} + +int *rig_spectrum_cb_python(RIG *rig, struct rig_spectrum_line *rig_spectrum_line, rig_ptr_t arg) +{ + Rig *self = arg; + PyObject *python_arguments; + + python_arguments = PyTuple_Pack(1, + self->python_callbacks.spectrum_arg + ); + + PyObject_CallObject(self->python_callbacks.spectrum_event, python_arguments); + + Py_XDECREF(python_arguments); + + return RIG_OK; +} #endif %} @@ -374,6 +473,7 @@ int *rig_freq_cb_python(RIG *rig, vfo_t vfo, freq_t freq, rig_ptr_t arg) r->state = &r->rig->state; r->do_exception = 0; /* default is disabled */ r->error_status = RIG_OK; + return r; } ~Rig () { @@ -525,6 +625,12 @@ int *rig_freq_cb_python(RIG *rig, vfo_t vfo, freq_t freq, rig_ptr_t arg) // Handling of event callbacks #ifdef SWIGPYTHON RIG_SET_CALLBACK(freq) + RIG_SET_CALLBACK(mode) + RIG_SET_CALLBACK(vfo) + RIG_SET_CALLBACK(ptt) + RIG_SET_CALLBACK(dcd) + RIG_SET_CALLBACK(pltune) + RIG_SET_CALLBACK(spectrum) #endif int mem_count(void) { diff --git a/rigs/dummy/dummy.c b/rigs/dummy/dummy.c index 7c0a2cb64..3f54a655e 100644 --- a/rigs/dummy/dummy.c +++ b/rigs/dummy/dummy.c @@ -638,6 +638,12 @@ static int dummy_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) case RIG_VFO_C: priv->vfo_c.width = width; break; } + if (rig->callbacks.mode_event) + { + rig_debug(RIG_DEBUG_TRACE, "%s callbacks.mode_event(%p, %p)\n", __func__, rig->callbacks.mode_event, rig->callbacks.mode_arg); + rig->callbacks.mode_event(rig, vfo, mode, width, rig->callbacks.mode_arg); + } + RETURNFUNC(RIG_OK); } @@ -737,6 +743,12 @@ static int dummy_set_vfo(RIG *rig, vfo_t vfo) RETURNFUNC(-RIG_EINVAL); } + if (rig->callbacks.vfo_event) + { + rig_debug(RIG_DEBUG_TRACE, "%s callbacks.vfo_event(%p, %p)\n", __func__, rig->callbacks.vfo_event, rig->callbacks.vfo_arg); + rig->callbacks.vfo_event(rig, vfo, rig->callbacks.vfo_arg); + } + priv->last_vfo = priv->curr_vfo; priv->curr_vfo = vfo; STATE(rig)->current_vfo = vfo; @@ -762,6 +774,12 @@ static int dummy_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) struct dummy_priv_data *priv = (struct dummy_priv_data *)STATE(rig)->priv; ENTERFUNC; + if (rig->callbacks.ptt_event) + { + rig_debug(RIG_DEBUG_TRACE, "%s callbacks.ptt_event(%p, %p)\n", __func__, rig->callbacks.ptt_event, rig->callbacks.ptt_arg); + rig->callbacks.ptt_event(rig, vfo, ptt, rig->callbacks.ptt_arg); + } + priv->ptt = ptt; RETURNFUNC(RIG_OK); commit 8324c85487c416025f6907a920f3528e36c07b8e Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Fri Aug 8 08:45:45 2025 +0200 Implement the Python callback for freq_event Fixes #481. diff --git a/bindings/ignore.swg b/bindings/ignore.swg index d09b1a232..4114aabc4 100644 --- a/bindings/ignore.swg +++ b/bindings/ignore.swg @@ -68,6 +68,7 @@ %rename("%s", regexmatch$name="^RIG_VFO_") ""; %ignore RIG_EK; // an internal macro %ignore RIG_ELAD; // an internal macro +%rename("$ignore", regexmatch$name="python_callbacks$") ""; // internal structs and methods used by bindings // Rotators diff --git a/bindings/macros.swg b/bindings/macros.swg index 9f16b9f30..888991858 100644 --- a/bindings/macros.swg +++ b/bindings/macros.swg @@ -90,3 +90,61 @@ PyObject * ##function_name(hamlib_token_t token) %define ROT_GET_VALUE_T(function_name) GET_VALUE_T(rot_, get_ ##function_name, self->rot, ROT_) %enddef + +/* + * Macro SET_CALLBACK + * + * Creates a method that stores the Python arguments and sets the C callback. + * + * function_prefix: + * the first part of the function name (eg. one of: amp_ rig_ rot_) + * + * class_pointer: + * the pointer to the instance of the class (eg. one of self->amp self->rig self->rot) + * + * event_name: + * the name that creates a valid Hamlib function name when used together + * with the function_prefix and some predefined parts + * eg. SET_CALLBACK("rig_", "freq") creates rig_set_freq_callback() + */ +%define SET_CALLBACK(function_prefix, class_pointer, event_name) +void set_ ## event_name ## _callback(PyObject *cb, PyObject *arg=NULL) +{ + void *callback; + + if (cb == Py_None) { + callback = NULL; + } else if (!PyCallable_Check(cb)) { + SWIG_Python_RaiseOrModifyTypeError("The callback isn't a Python callable object"); + return; + } else { + callback = function_prefix ## event_name ## _cb_python; + }; + + Py_XINCREF(cb); + Py_XDECREF(self->python_callbacks. ## event_name ## _event); + + Py_XINCREF(arg); + Py_XDECREF(self->python_callbacks. ## event_name ## _arg); + + self->python_callbacks. ## event_name ## _event = cb; + self->python_callbacks. ## event_name ## _arg = arg; + self->error_status = function_prefix ## set_ ## event_name ## _callback(class_pointer, callback, self); + + return; +} +%enddef + +/* + * Macro RIG_SET_CALLBACK + * + * Creates a method that stores the Python arguments and sets the C callback. + * + * event_name: + * the name that creates a valid Hamlib function name when used together + * with the function_prefix and some predefined parts + * eg. RIG_SET_CALLBACK("freq") creates rig_set_freq_callback() + */ +%define RIG_SET_CALLBACK(event_name) + SET_CALLBACK(rig_, self->rig, event_name) +%enddef diff --git a/bindings/python/test_Hamlib_Rig_class.py b/bindings/python/test_Hamlib_Rig_class.py index f8f9898ce..3ebbc8c5b 100755 --- a/bindings/python/test_Hamlib_Rig_class.py +++ b/bindings/python/test_Hamlib_Rig_class.py @@ -82,6 +82,7 @@ class TestClass: 'set_ext_level', 'set_ext_parm', 'set_freq', +'set_freq_callback', 'set_func', 'set_level', 'set_mem', diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py index 111311978..2b5dd863e 100755 --- a/bindings/python/test_rig.py +++ b/bindings/python/test_rig.py @@ -116,12 +116,27 @@ class TestClass: assert rig.get_dcs_sql() == 134 assert rig.get_dcs_sql(Hamlib.RIG_VFO_CURR) == 134 + # Callbacks + self.do_test_callbacks(rig) + assert rig.close() is None assert rig.state.comm_state == 0 assert rig.state.comm_status == Hamlib.RIG_COMM_STATUS_DISCONNECTED info = rig.get_info() assert info is None + def do_test_callbacks(self, rig): + # Frequency event callback + def freq_callback(vfo, freq, arg): + assert (1, 144200000.5, 1234567890) == (vfo, freq, arg) + + assert rig.set_freq_callback(freq_callback, 1234567890) is None + assert rig.set_freq(Hamlib.RIG_VFO_CURR, 144200000.5) is None + # TODO assert that freq_callback() is called once + assert rig.set_freq_callback(None) is None + assert rig.set_freq(Hamlib.RIG_VFO_CURR, 144210000) is None + # TODO assert that freq_callback() is called once + @pytest.mark.skipif('config.getoption("model") != Hamlib.RIG_MODEL_DUMMY') def test_misc(self, model): diff --git a/bindings/rig.swg b/bindings/rig.swg index 2245d0155..76a393e18 100644 --- a/bindings/rig.swg +++ b/bindings/rig.swg @@ -22,6 +22,7 @@ #include <hamlib/rig.h> %} +%include macros.swg %immutable rig_caps::model_name; %immutable rig_caps::mfg_name; %immutable rig_caps::version; @@ -50,12 +51,51 @@ typedef struct Rig { struct rig_state *state; /* shortcut to RIG->state */ int error_status; int do_exception; + // Handling of event callbacks +#ifdef SWIGPYTHON + // This mirrors "struct rig_callbacks" from rig.h using Python types + struct { + PyObject *freq_event; /*!< Frequency change event */ + PyObject *freq_arg; /*!< Frequency change argument */ + PyObject *mode_event; /*!< Mode change event */ + PyObject *mode_arg; /*!< Mode change argument */ + PyObject *vfo_event; /*!< VFO change event */ + PyObject *vfo_arg; /*!< VFO change argument */ + PyObject *ptt_event; /*!< PTT change event */ + PyObject *ptt_arg; /*!< PTT change argument */ + PyObject *dcd_event; /*!< DCD change event */ + PyObject *dcd_arg; /*!< DCD change argument */ + PyObject *pltune; /*!< Pipeline tuning module freq/mode/width callback */ + PyObject *pltune_arg; /*!< Pipeline tuning argument */ + PyObject *spectrum_event; /*!< Spectrum line reception event */ + PyObject *spectrum_arg; /*!< Spectrum line reception argument */ + /* etc.. */ + } python_callbacks; +#endif } Rig; typedef char * char_string; 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) +{ + Rig *self = arg; + PyObject *python_arguments; + + python_arguments = PyTuple_Pack(3, + PyLong_FromLong(vfo), + PyFloat_FromDouble(freq), + self->python_callbacks.freq_arg + ); + + PyObject_CallObject(self->python_callbacks.freq_event, python_arguments); + Py_XDECREF(python_arguments); + + return RIG_OK; +} +#endif %} %extend channel { @@ -482,6 +522,11 @@ typedef channel_t * const_channel_t_p; METHOD1GET(get_trn, int) METHOD1VGET(get_dcd, dcd_t) + // Handling of event callbacks +#ifdef SWIGPYTHON + RIG_SET_CALLBACK(freq) +#endif + int mem_count(void) { return rig_mem_count(self->rig); } @@ -648,5 +693,4 @@ struct channel *Rig_get_chan_all(Rig *self) return chans; } - %} diff --git a/rigs/dummy/dummy.c b/rigs/dummy/dummy.c index 020fdaeb2..7c0a2cb64 100644 --- a/rigs/dummy/dummy.c +++ b/rigs/dummy/dummy.c @@ -488,6 +488,12 @@ static int dummy_set_freq(RIG *rig, vfo_t vfo, freq_t freq) case RIG_VFO_C: priv->vfo_c.freq = freq; break; } + if (rig->callbacks.freq_event) + { + rig_debug(RIG_DEBUG_TRACE, "%s callbacks.freq_event(%p, %p)\n", __func__, rig->callbacks.freq_event, rig->callbacks.freq_arg); + rig->callbacks.freq_event(rig, vfo, freq, rig->callbacks.freq_arg); + } + if (!priv->split) { priv->curr->tx_freq = freq; ----------------------------------------------------------------------- Summary of changes: bindings/ignore.swg | 2 + bindings/macros.swg | 58 +++++++++++ bindings/python/test_Hamlib_Rig_class.py | 7 ++ bindings/python/test_rig.py | 136 +++++++++++++++++++++---- bindings/rig.swg | 170 ++++++++++++++++++++++++++++++- include/hamlib/rig.h | 3 +- rigs/dummy/dummy.c | 26 ++++- 7 files changed, 379 insertions(+), 23 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-08-08 19:17:15
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 2462ab0a135ca0274a069e27c319c90957d70ac1 (commit) from 93a24356e5ad79a12865967b32f4524080f044dd (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 2462ab0a135ca0274a069e27c319c90957d70ac1 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Mon Aug 4 20:51:19 2025 +0200 Improve Doxygen comments Adds missing cross-references. Fix tagging of comment blocks in "aor" even if the rigs aren't included in the generated documentation. diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index a5a7901bb..a6f472bda 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -2646,13 +2646,13 @@ typedef int (*spectrum_cb_t)(RIG *, * Events from the rig are received through async io, * so callback functions will be called from the SIGIO sighandler context. * - * Don't set these fields directly, use rig_set_freq_callback et. al. instead. + * Don't set these fields directly, use rig_set_freq_callback() et. al. instead. * * Callbacks suit event based programming very well, * really appropriate in a GUI. * - * \sa rig_set_freq_callback(), rig_set_mode_callback(), rig_set_vfo_callback(), - * rig_set_ptt_callback(), rig_set_dcd_callback() + * \sa rig_set_dcd_callback(), rig_set_freq_callback(), rig_set_mode_callback(), + * rig_set_ptt_callback(), rig_set_spectrum_callback(), rig_set_vfo_callback() */ // Do NOT add/remove from this structure -- it will break DLL backwards compatibility struct rig_callbacks { diff --git a/rigs/aor/ar7030p.c b/rigs/aor/ar7030p.c index 7ed486006..264a76342 100644 --- a/rigs/aor/ar7030p.c +++ b/rigs/aor/ar7030p.c @@ -467,7 +467,7 @@ static const char *ar7030p_get_info(RIG *rig) return (p); } -/* +/** * \brief Set receiver frequency * * \param rig Pointer to rig struct @@ -527,7 +527,7 @@ static int ar7030p_set_freq(RIG *rig, vfo_t vfo, freq_t freq) return (rc); } -/* +/** * \brief Get receiver frequency * * \param rig Pointer to rig struct @@ -583,7 +583,7 @@ static int ar7030p_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) return (rc); } -/* +/** * \brief Set receiver mode * * \param rig Pointer to rig struct @@ -649,7 +649,7 @@ static int ar7030p_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, return (rc); } -/* +/** * \brief Get receiver mode and bandwidth * * \param rig Pointer to rig struct @@ -693,7 +693,7 @@ static int ar7030p_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, return (rc); } -/* +/** * \brief Get memory channel parameters * * \param rig Pointer to rig struct @@ -817,7 +817,7 @@ static void ar7030p_get_memory(RIG *rig, const unsigned int chan, } #endif /* unused */ -/* +/** * \brief Set receiver levels * * \param rig Pointer to rig struct @@ -995,7 +995,7 @@ static int ar7030p_set_level(RIG *rig, vfo_t vfo, setting_t level, } -/* +/** * \brief Get receiver levels * * \param rig Pointer to rig struct @@ -1468,7 +1468,7 @@ static int ar7030p_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts) return (rc); } -/* +/** * \brief Get receiver tuning step size * * \param rig Pointer to rig struct @@ -1505,7 +1505,7 @@ static int ar7030p_get_ts(RIG *rig, vfo_t vfo, shortfreq_t *ts) return (rc); } -/* +/** * \brief Set receiver power status * * \param rig Pointer to rig struct @@ -1541,7 +1541,7 @@ static int ar7030p_set_powerstat(RIG *rig, powerstat_t status) return (-RIG_ENIMPL); } -/* +/** * \brief Get receiver power status * * \param rig Pointer to rig struct @@ -1580,7 +1580,7 @@ static int ar7030p_get_powerstat(RIG *rig, powerstat_t *status) return (rc); } -/* +/** * \brief Reset receiver * * \param rig Pointer to rig struct diff --git a/rigs/aor/ar7030p_utils.c b/rigs/aor/ar7030p_utils.c index d63504ede..f5688fdf4 100644 --- a/rigs/aor/ar7030p_utils.c +++ b/rigs/aor/ar7030p_utils.c @@ -512,7 +512,7 @@ static int setAddr(RIG *rig, enum PAGE_e page, unsigned int addr) return (rc); } -/* +/** * \brief Write one byte to the receiver * * \param rig Pointer to rig struct @@ -553,8 +553,8 @@ int writeByte(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned char x) return (rc); } -/* - * \brief Write two bytes to the receiver +/** + * brief Write two bytes to the receiver * * \param rig Pointer to rig struct * \param page Memory page number (0-4, 15) @@ -580,7 +580,7 @@ int writeShort(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned short x) return (rc); } -/* +/** * \brief Write three bytes to the receiver * * \param rig Pointer to rig struct @@ -615,7 +615,7 @@ int write3Bytes(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned int x) #ifdef XXREMOVEDXX // this function is not referenced anywhere -/* +/** * \brief Write unsigned int (4 bytes) to the receiver * * \param rig Pointer to rig struct @@ -655,7 +655,7 @@ int writeInt(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned int x) } #endif -/* +/** * \brief Read one byte from the receiver * * \param rig Pointer to rig struct @@ -696,7 +696,7 @@ int readByte(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned char *x) return (rc); } -/* +/** * \brief Read an unsigned short (two bytes) from the receiver * * \param rig Pointer to rig struct @@ -733,7 +733,7 @@ int readShort(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned short *x) return (rc); } -/* +/** * \brief Read an unsigned int (three bytes) from the receiver * * \param rig Pointer to rig struct @@ -778,7 +778,7 @@ int read3Bytes(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned int *x) #ifdef XXREMOVEDXX // this function is not referenced anywhere -/* +/** * \brief Read an unsigned int (four bytes) from the receiver * * \param rig Pointer to rig struct @@ -826,7 +826,7 @@ int readInt(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned int *x) } #endif -/* +/** * \brief Read raw AGC value from the radio * * \param rig Pointer to rig struct @@ -857,7 +857,7 @@ int readSignal(RIG *rig, unsigned char *x) #ifdef XXREMOVEDXX // this function is not referenced anywhere -/* +/** * \brief Flush I/O with radio * * \param rig Pointer to rig struct @@ -879,7 +879,7 @@ int flushBuffer(RIG *rig) } #endif -/* +/** * \brief Lock receiver for remote operations * * \param rig Pointer to rig struct @@ -919,7 +919,7 @@ int lockRx(RIG *rig, enum LOCK_LVL_e level) return (rc); } -/* +/** * \brief Convert one byte BCD value to int * * \param bcd BCD value (0-99) @@ -949,7 +949,7 @@ int bcd2Int(const unsigned char bcd) return (rc); } -/* +/** * \brief Convert raw AGC value to calibrated level in dBm * * \param rig Pointer to rig struct @@ -1073,7 +1073,7 @@ int getCalLevel(RIG *rig, unsigned char rawAgc, int *dbm) return (rc); } -/* +/** * \brief Get bandwidth of given filter * * \param rig Pointer to rig struct @@ -1103,7 +1103,7 @@ int getFilterBW(RIG *rig, enum FILTER_e filter) return (rc); } -/* +/** * \brief Convert DDS steps to frequency in Hz * * \param steps DDS count @@ -1119,7 +1119,7 @@ freq_t ddsToHz(const unsigned int steps) return (rc); } -/* +/** * \brief Convert frequency in Hz to DDS steps * * \param freq Frequency in Hz @@ -1155,7 +1155,7 @@ unsigned int hzToDDS(const freq_t freq) return (rc); } -/* +/** * \brief Convert PBS/BFO steps to frequency in Hz * * \param steps PBS/BFO offset steps @@ -1186,8 +1186,8 @@ float pbsToHz(const unsigned char steps) #ifdef XXREMOVEDXX // this function is not referenced anywhere -/* - * \brief Convert PBS/BFO offset frequency in Hz to steps +/** + * brief Convert PBS/BFO offset frequency in Hz to steps * * \param freq Offset frequency in Hz * @@ -1228,8 +1228,8 @@ unsigned char hzToPBS(const float freq) } #endif -/* - * \brief Convert native Mode to Hamlib mode +/** + * brief Convert native Mode to Hamlib mode * * \param mode Native mode value * @@ -1279,8 +1279,8 @@ rmode_t modeToHamlib(const unsigned char mode) return (rc); } -/* - * \brief Convert Hamlib Mode to native mode +/** + * brief Convert Hamlib Mode to native mode * * \param mode Hamlib mode value * @@ -1330,8 +1330,8 @@ unsigned char modeToNative(const rmode_t mode) return (rc); } -/* - * \brief Convert native AGC speed to Hamlib AGC speed +/** + * brief Convert native AGC speed to Hamlib AGC speed * * \param agc Native AGC speed value * @@ -1369,8 +1369,8 @@ enum agc_level_e agcToHamlib(const unsigned char agc) return (rc); } -/* - * \brief Convert Hamlib AGC speed to native AGC speed +/** + * brief Convert Hamlib AGC speed to native AGC speed * * \param agc Hamlib AGC speed value * @@ -1412,8 +1412,8 @@ unsigned char agcToNative(const enum agc_level_e agc) return (rc); } -/* - * \brief Get page size +/** + * brief Get page size * * \param page Page to get size of * @@ -1439,8 +1439,8 @@ int pageSize(const enum PAGE_e page) return (rc); } -/* - * \brief Set and execute IR controller code +/** + * brief Set and execute IR controller code * * \param code IR code to execute * diff --git a/src/amplifier.c b/src/amplifier.c index 4863b8046..e6dceb5a5 100644 --- a/src/amplifier.c +++ b/src/amplifier.c @@ -962,7 +962,7 @@ int HAMLIB_API amp_get_powerstat(AMP *amp, powerstat_t *status) /** * \brief Get the address of amplifier data structure(s) * - * \sa rig_data_pointer + * \sa rig_data_pointer(), rot_data_pointer() * */ void *HAMLIB_API amp_data_pointer(AMP *amp, rig_ptrx_t idx) diff --git a/src/extamp.c b/src/extamp.c index c00ccec31..1510d140b 100644 --- a/src/extamp.c +++ b/src/extamp.c @@ -62,7 +62,7 @@ * not strictly positive. * * \returns A zero value which means a normal end of iteration, or a - * **negative value** which means an abnormal end, + * **negative value** which means an abnormal end. * * \retval RIG_OK All extension levels elements successfully processed. * \retval -RIG_EINVAL \a amp or \a cfunc is NULL or inconsistent. diff --git a/src/rig.c b/src/rig.c index 706ca4d91..8e0ca4e00 100644 --- a/src/rig.c +++ b/src/rig.c @@ -9056,7 +9056,7 @@ int morse_data_handler_set_keyspd(RIG *rig, int keyspd) } #endif -/* +/** * \brief Get the address of a Hamlib data structure * \param rig Pointer to main data anchor * \param idx enum for which pointer requested @@ -9069,7 +9069,7 @@ int morse_data_handler_set_keyspd(RIG *rig, int keyspd) * Note: This is meant for use by the HAMLIB_???PORT macros mostly. Only * compatibility with them is supported. * - * \sa amp_data_pointer, rot_data_pointer + * \sa amp_data_pointer(), rot_data_pointer() */ HAMLIB_EXPORT(void *) rig_data_pointer(RIG *rig, rig_ptrx_t idx) { diff --git a/src/rotator.c b/src/rotator.c index ecb7422bf..1b9b2b0de 100644 --- a/src/rotator.c +++ b/src/rotator.c @@ -1089,7 +1089,7 @@ int HAMLIB_API rot_get_status(ROT *rot, rot_status_t *status) /** * \brief Get the address of rotator data structure(s) * - * \sa rig_data_pointer + * \sa amp_data_pointer(), rig_data_pointer() * */ void *HAMLIB_API rot_data_pointer(ROT *rot, rig_ptrx_t idx) ----------------------------------------------------------------------- Summary of changes: include/hamlib/rig.h | 6 ++--- rigs/aor/ar7030p.c | 22 ++++++++--------- rigs/aor/ar7030p_utils.c | 64 ++++++++++++++++++++++++------------------------ src/amplifier.c | 2 +- src/extamp.c | 2 +- src/rig.c | 4 +-- src/rotator.c | 2 +- 7 files changed, 51 insertions(+), 51 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-08-07 13:11:32
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 93a24356e5ad79a12865967b32f4524080f044dd (commit) via 891070941f30bf474dfeb9c913aa6387f48fe49c (commit) via 5b1517778e20f04f18ca0e9a89c32f0a01b78783 (commit) via 8887294cd85a1c53bd6fef428b735b7eaee6c6ae (commit) via 5b87b3870432b7492558c686f3a3e4c13321db0a (commit) via 4251c50b7fda0fe2710a4ba28776ec4c7fe579a8 (commit) via 49c78edb80a992d69940a31139a0b49a53f795ce (commit) via 59acdb791eaa594193ae17213aa23a8e1efdd02f (commit) via 032e78826e05ee09ab761ee1abdac26dc3ea4ca8 (commit) via d5c5eeff15df9c520ad71c1a8ebdeb04f3dae59e (commit) via af4c6ec8061dc876ccb3c4cb746db2f3b9f09546 (commit) via 9dd0009f9e14100adf10cc4abe058237f4eb1a6c (commit) via 816d6d9befa3c14f4859257ab60fd0292d1319a0 (commit) via 249a99363363fab3b37eac66c9f83323988427af (commit) via 8064da81214c66374cf864942c3b8692f50cc0cf (commit) via d9532a9c62a6b31948968838b870bdc7e2b0e396 (commit) via f691a68c069bbd32c938249f3dbd4a1d112e5c97 (commit) via 725fcee0048c6554d8c4c5393f52c350bb662e48 (commit) via 151549bb3b828596dc5b67d02bd446842655608a (commit) via 790820ab22cde0b8a251356d3513ad41f20f1f3c (commit) via b809937395457fadb9fa3ab98ad8a4ff52e9fa7d (commit) via 498b45f5b08f5b2b207b9f5f0d6b6da3f116f31b (commit) via a5467f403305f1ae925dc458e6a010caa4f7ac3c (commit) via 10f65048976741ae10dff7a148eb557a2836c37a (commit) via f8881f9bb9a3180f97a87f098dc8a76e74238f20 (commit) via 9e51419ab8a147573fa718896ac59d18eb257bc0 (commit) via c26f0333958e80d70c3f23535b895bb8075b394b (commit) via 99df93067c15dc02c59618d268a970c130adf4c2 (commit) via f89ebfd226c91cda8bd29de8ac6fddf00dad51e5 (commit) via df7fbbec9bff75398064e5c7fba4453d84fb5436 (commit) via 3b2a95053bd529883e76cc973b0f374f506ac98d (commit) via 1568a6c7fc1548ba2b590aa48fca70a550d61179 (commit) via 98a81a507400867065dd257524a9357cdb9b3397 (commit) via 7fc222dc8852eb88749202727278fe259b3a2463 (commit) via ecece62828fa0d9a5629fb0e5b0025c20e1f5b18 (commit) via 16a69722e26baa131bca2b176404d0748ea34419 (commit) via b5d136ff083ae5a07cda98ff1bf3218456da635b (commit) via f3e2ea9e3d0f0c9cd3a200a7a1fe60d5fff8b4f7 (commit) via 3009ec86b772a4d6ed2b0005466f61ff437f8b91 (commit) via 17b301a371e201019fe4decedece3be3bc74c351 (commit) via e8467032ad8e948aa3f03777c043b42b9a3d96b0 (commit) from 70d50d0efbbdd84157c9cd89043744f07d15bfd8 (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 93a24356e5ad79a12865967b32f4524080f044dd Merge: 70d50d0ef 891070941 Author: Nate Bargmann <n0...@n0...> Date: Thu Aug 7 07:26:47 2025 -0500 Merge GitHub PR #1831 commit 891070941f30bf474dfeb9c913aa6387f48fe49c Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Thu Aug 7 14:14:58 2025 +0200 Fix compiler warnings Fixes: simic905.c:108:9: warning: label followed by a declaration is a C23 extension [-Wc23-extensions] simic910.c:112:9: warning: label followed by a declaration is a C23 extension [-Wc23-extensions] diff --git a/simulators/simic905.c b/simulators/simic905.c index 581d45f08..962d6fc97 100644 --- a/simulators/simic905.c +++ b/simulators/simic905.c @@ -84,6 +84,7 @@ frameGet(int fd, unsigned char *buf) void frameParse(int fd, unsigned char *frame, int len) { double freq; + int freq_len = 5; if (len == 0) { @@ -105,7 +106,6 @@ void frameParse(int fd, unsigned char *frame, int len) case 0x03: //from_bcd(frameackbuf[2], (civ_731_mode ? 4 : 5) * 2); - int freq_len = 5; if (current_vfo == RIG_VFO_A || current_vfo == RIG_VFO_MAIN) { diff --git a/simulators/simic910.c b/simulators/simic910.c index ac3bb8759..2b6b3f255 100644 --- a/simulators/simic910.c +++ b/simulators/simic910.c @@ -85,6 +85,7 @@ frameGet(int fd, unsigned char *buf) void frameParse(int fd, unsigned char *frame, int len) { double freq; + int freq_len = 5; if (len == 0) { @@ -109,7 +110,6 @@ void frameParse(int fd, unsigned char *frame, int len) case 0x03: //from_bcd(frameackbuf[2], (civ_731_mode ? 4 : 5) * 2); - int freq_len = 5; if (current_vfo == RIG_VFO_A || current_vfo == RIG_VFO_MAIN) { commit 5b1517778e20f04f18ca0e9a89c32f0a01b78783 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Thu Aug 7 11:38:12 2025 +0200 Replace "goto again" with "continue" (third case) When the software on the other side of the pty closes the device, the simulator would close and reopen its side but it is unneeded because it can continue to call read() without doing anything special. diff --git a/simulators/simatd578.c b/simulators/simatd578.c index ad897ebec..b6d5e43de 100644 --- a/simulators/simatd578.c +++ b/simulators/simatd578.c @@ -53,7 +53,6 @@ int main(int argc, char *argv[]) { unsigned char buf[BUFSIZE], buf2[256]; -again: int fd = openPort(argv[1]); while (1) @@ -63,8 +62,7 @@ again: if (bytes == 0) { - close(fd); - goto again; + continue; } if (bytes != 8) diff --git a/simulators/simft1000.c b/simulators/simft1000.c index 14485a74d..30e2429e3 100644 --- a/simulators/simft1000.c +++ b/simulators/simft1000.c @@ -21,7 +21,6 @@ int main(int argc, char *argv[]) { unsigned char buf[BUFSIZE]; -again: int fd = openPort(argv[1]); while (1) @@ -30,8 +29,7 @@ again: if (bytes == 0) { - close(fd); - goto again; + continue; } if (bytes != 5) diff --git a/simulators/simft736.c b/simulators/simft736.c index 28b7c77b4..c10614dfc 100644 --- a/simulators/simft736.c +++ b/simulators/simft736.c @@ -21,7 +21,6 @@ int main(int argc, char *argv[]) { unsigned char buf[BUFSIZE]; -again: int fd = openPort(argv[1]); while (1) @@ -30,8 +29,7 @@ again: if (bytes == 0) { - close(fd); - goto again; + continue; } if (bytes != 5) diff --git a/simulators/simft747gx.c b/simulators/simft747gx.c index a52076cb5..5fca30362 100644 --- a/simulators/simft747gx.c +++ b/simulators/simft747gx.c @@ -23,7 +23,6 @@ int main(int argc, char *argv[]) { unsigned char buf[BUFSIZE]; -again: int fd = openPort(argv[1]); while (1) @@ -32,8 +31,7 @@ again: if (bytes == 0) { - close(fd); - goto again; + continue; } if (bytes != 5) diff --git a/simulators/simft817.c b/simulators/simft817.c index 583c24f16..cd9ebeaa2 100644 --- a/simulators/simft817.c +++ b/simulators/simft817.c @@ -22,7 +22,6 @@ int main(int argc, char *argv[]) { unsigned char buf[BUFSIZE]; -again: int fd = openPort(argv[1]); while (1) @@ -31,8 +30,7 @@ again: if (bytes == 0) { - close(fd); - goto again; + continue; } if (bytes != 5) diff --git a/simulators/simft847.c b/simulators/simft847.c index c3c6befd0..a8800012a 100644 --- a/simulators/simft847.c +++ b/simulators/simft847.c @@ -24,7 +24,6 @@ int main(int argc, char *argv[]) unsigned char buf[BUFSIZE]; int freq, i, n; -again: int fd = openPort(argv[1]); while (1) @@ -33,8 +32,7 @@ again: if (bytes == 0) { - close(fd); - goto again; + continue; } if (bytes != 5) diff --git a/simulators/simft897.c b/simulators/simft897.c index 0e2d2210e..0af8f83c8 100644 --- a/simulators/simft897.c +++ b/simulators/simft897.c @@ -25,7 +25,6 @@ int main(int argc, char *argv[]) unsigned char buf[BUFSIZE]; int n; -again: int fd = openPort(argv[1]); while (1) @@ -34,8 +33,7 @@ again: if (bytes == 0) { - close(fd); - goto again; + continue; } if (bytes != 5) diff --git a/simulators/simjupiter.c b/simulators/simjupiter.c index 706546cae..9c96078d0 100644 --- a/simulators/simjupiter.c +++ b/simulators/simjupiter.c @@ -21,7 +21,6 @@ int main(int argc, char *argv[]) { unsigned char buf[BUFSIZE]; -again: int fd = openPort(argv[1]); while (1) @@ -30,8 +29,7 @@ again: if (bytes == 0) { - close(fd); - goto again; + continue; } if (bytes != 5) diff --git a/simulators/simmicom.c b/simulators/simmicom.c index 4b03e03d5..3b25b6c0b 100644 --- a/simulators/simmicom.c +++ b/simulators/simmicom.c @@ -50,7 +50,6 @@ int main(int argc, char *argv[]) { unsigned char buf[BUFSIZE]; -again: int fd = openPort(argv[1]); while (1) @@ -59,8 +58,7 @@ again: if (bytes == 0) { - close(fd); - goto again; + continue; } switch (buf[3]) diff --git a/simulators/simorion.c b/simulators/simorion.c index 36de57b65..642e40b1e 100644 --- a/simulators/simorion.c +++ b/simulators/simorion.c @@ -40,7 +40,6 @@ int main(int argc, char *argv[]) { char buf[BUFSIZE], reply[256]; -again: int fd = openPort(argv[1]); while (1) @@ -49,8 +48,7 @@ again: if (bytes == 0) { - close(fd); - goto again; + continue; } if (strncmp(buf, "?V", 2) == 0) diff --git a/simulators/simpmr171.c b/simulators/simpmr171.c index 14cd5b488..adf726425 100644 --- a/simulators/simpmr171.c +++ b/simulators/simpmr171.c @@ -56,7 +56,6 @@ int main(int argc, char *argv[]) { unsigned char buf[BUFSIZE]; -again: int fd = openPort(argv[1]); while (1) @@ -65,8 +64,7 @@ again: if (bytes == 0) { - close(fd); - goto again; + continue; } switch (buf[5]) diff --git a/simulators/simspid.c b/simulators/simspid.c index 706546cae..9c96078d0 100644 --- a/simulators/simspid.c +++ b/simulators/simspid.c @@ -21,7 +21,6 @@ int main(int argc, char *argv[]) { unsigned char buf[BUFSIZE]; -again: int fd = openPort(argv[1]); while (1) @@ -30,8 +29,7 @@ again: if (bytes == 0) { - close(fd); - goto again; + continue; } if (bytes != 5) commit 8887294cd85a1c53bd6fef428b735b7eaee6c6ae Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Thu Aug 7 11:22:44 2025 +0200 Replace "goto again" with "continue" (second case) Does the same thing with more structured control flow. It also silences compiler warnings. diff --git a/simulators/simeasycomm.c b/simulators/simeasycomm.c index a774e5fcc..da5647650 100644 --- a/simulators/simeasycomm.c +++ b/simulators/simeasycomm.c @@ -111,7 +111,6 @@ static void *rotorez_thread(void *arg) int fd = *(int *)arg; float az = 123; float el = 45; -again: while (1) { @@ -120,10 +119,8 @@ again: if (bytes == 0) { - //close(fd); hl_usleep(100 * 1000); - //printf("again\n"); - goto again; + continue; } printf("line[%d]=%s\n", fd, buf); diff --git a/simulators/simrotorez.c b/simulators/simrotorez.c index 48b0042ba..7b4ba21d5 100644 --- a/simulators/simrotorez.c +++ b/simulators/simrotorez.c @@ -111,7 +111,6 @@ static void *rotorez_thread(void *arg) int fd = *(int *)arg; float az = 123; float el = 45; -again: while (1) { @@ -120,10 +119,8 @@ again: if (bytes == 0) { - //close(fd); hl_usleep(100 * 1000); - //printf("again\n"); - goto again; + continue; } printf("line[%d]=%s\n", fd, buf); commit 5b87b3870432b7492558c686f3a3e4c13321db0a Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Thu Aug 7 11:10:31 2025 +0200 Replace "goto again" with "continue" (first case) Does the same thing with more structured control flow. It also silences compiler warnings. diff --git a/simulators/simic2730.c b/simulators/simic2730.c index 441fa311a..a509ba01f 100644 --- a/simulators/simic2730.c +++ b/simulators/simic2730.c @@ -47,8 +47,6 @@ frameGet(int fd, unsigned char *buf) memset(buf, 0, BUFSIZE); unsigned char c; -again: - while (read(fd, &c, 1) > 0) { buf[i++] = c; @@ -79,7 +77,7 @@ again: } i = 0; - goto again; + continue; } } diff --git a/simulators/simic275.c b/simulators/simic275.c index 9b5abe810..8d8b1e7ff 100644 --- a/simulators/simic275.c +++ b/simulators/simic275.c @@ -47,8 +47,6 @@ frameGet(int fd, unsigned char *buf) memset(buf, 0, BUFSIZE); unsigned char c; -again: - while (read(fd, &c, 1) > 0) { buf[i++] = c; @@ -79,7 +77,7 @@ again: } i = 0; - goto again; + continue; } } diff --git a/simulators/simic7000.c b/simulators/simic7000.c index cb4ff005a..fb3a76572 100644 --- a/simulators/simic7000.c +++ b/simulators/simic7000.c @@ -46,8 +46,6 @@ frameGet(int fd, unsigned char *buf) memset(buf, 0, BUFSIZE); unsigned char c; -again: - while (read(fd, &c, 1) > 0) { buf[i++] = c; @@ -77,7 +75,7 @@ again: } i = 0; - goto again; + continue; } } diff --git a/simulators/simic705.c b/simulators/simic705.c index 277af171e..1ab2cd567 100644 --- a/simulators/simic705.c +++ b/simulators/simic705.c @@ -54,8 +54,6 @@ frameGet(int fd, unsigned char *buf) memset(buf, 0, BUFSIZE); unsigned char c; -again: - while (read(fd, &c, 1) > 0) { buf[i++] = c; @@ -79,7 +77,7 @@ again: } i = 0; - goto again; + continue; } } diff --git a/simulators/simic7100.c b/simulators/simic7100.c index 368fc0dc5..2dc1c3ddf 100644 --- a/simulators/simic7100.c +++ b/simulators/simic7100.c @@ -46,8 +46,6 @@ frameGet(int fd, unsigned char *buf) memset(buf, 0, BUFSIZE); unsigned char c; -again: - while (read(fd, &c, 1) > 0) { buf[i++] = c; @@ -78,7 +76,7 @@ again: } i = 0; - goto again; + continue; } } diff --git a/simulators/simic7200.c b/simulators/simic7200.c index c717cb9d2..90ab1e47a 100644 --- a/simulators/simic7200.c +++ b/simulators/simic7200.c @@ -57,8 +57,6 @@ frameGet(int fd, unsigned char *buf) memset(buf, 0, BUFSIZE); unsigned char c; -again: - while (read(fd, &c, 1) > 0) { buf[i++] = c; @@ -91,7 +89,7 @@ again: } i = 0; - goto again; + continue; } } diff --git a/simulators/simic7300.c b/simulators/simic7300.c index 89c4d4238..2f9d6152f 100644 --- a/simulators/simic7300.c +++ b/simulators/simic7300.c @@ -47,8 +47,6 @@ frameGet(int fd, unsigned char *buf) memset(buf, 0, BUFSIZE); unsigned char c; -again: - while (read(fd, &c, 1) > 0) { buf[i++] = c; @@ -78,7 +76,7 @@ again: } i = 0; - goto again; + continue; } } diff --git a/simulators/simic7600.c b/simulators/simic7600.c index f72390d80..610c4524b 100644 --- a/simulators/simic7600.c +++ b/simulators/simic7600.c @@ -45,8 +45,6 @@ frameGet(int fd, unsigned char *buf) memset(buf, 0, BUFSIZE); unsigned char c; -again: - while (read(fd, &c, 1) > 0) { buf[i++] = c; @@ -70,7 +68,7 @@ again: } i = 0; - goto again; + continue; } } diff --git a/simulators/simic7610.c b/simulators/simic7610.c index 65d294bae..9bc14af39 100644 --- a/simulators/simic7610.c +++ b/simulators/simic7610.c @@ -48,8 +48,6 @@ frameGet(int fd, unsigned char *buf) memset(buf, 0, BUFSIZE); unsigned char c; -again: - while (read(fd, &c, 1) > 0) { buf[i++] = c; @@ -73,7 +71,7 @@ again: } i = 0; - goto again; + continue; } } diff --git a/simulators/simic7700.c b/simulators/simic7700.c index 88faef544..4f7b671c0 100644 --- a/simulators/simic7700.c +++ b/simulators/simic7700.c @@ -48,8 +48,6 @@ frameGet(int fd, unsigned char *buf) memset(buf, 0, BUFSIZE); unsigned char c; -again: - while (read(fd, &c, 1) > 0) { buf[i++] = c; @@ -73,7 +71,7 @@ again: } i = 0; - goto again; + continue; } } diff --git a/simulators/simic7851.c b/simulators/simic7851.c index 04202ccc5..07074c256 100644 --- a/simulators/simic7851.c +++ b/simulators/simic7851.c @@ -51,8 +51,6 @@ frameGet(int fd, unsigned char *buf) memset(buf, 0, BUFSIZE); unsigned char c = 0xff; -again: - while (read(fd, &c, 1) > 0) { buf[i++] = c; @@ -77,7 +75,7 @@ again: } i = 0; - goto again; + continue; } } diff --git a/simulators/simic905.c b/simulators/simic905.c index c39a67e00..581d45f08 100644 --- a/simulators/simic905.c +++ b/simulators/simic905.c @@ -49,8 +49,6 @@ frameGet(int fd, unsigned char *buf) memset(buf, 0, BUFSIZE); unsigned char c; -again: - while (read(fd, &c, 1) > 0) { buf[i++] = c; @@ -74,7 +72,7 @@ again: } i = 0; - goto again; + continue; } } diff --git a/simulators/simic910.c b/simulators/simic910.c index 3d04e3091..ac3bb8759 100644 --- a/simulators/simic910.c +++ b/simulators/simic910.c @@ -50,8 +50,6 @@ frameGet(int fd, unsigned char *buf) memset(buf, 0, BUFSIZE); unsigned char c; -again: - while (read(fd, &c, 1) > 0) { buf[i++] = c; @@ -75,7 +73,7 @@ again: } i = 0; - goto again; + continue; } } diff --git a/simulators/simic9100.c b/simulators/simic9100.c index 0329fe1b5..82c9efd6d 100644 --- a/simulators/simic9100.c +++ b/simulators/simic9100.c @@ -44,8 +44,6 @@ frameGet(int fd, unsigned char *buf) memset(buf, 0, BUFSIZE); unsigned char c; -again: - while (read(fd, &c, 1) > 0) { buf[i++] = c; @@ -69,7 +67,7 @@ again: } i = 0; - goto again; + continue; } } diff --git a/simulators/simic9700.c b/simulators/simic9700.c index 5f6c3165e..61d26aba2 100644 --- a/simulators/simic9700.c +++ b/simulators/simic9700.c @@ -46,8 +46,6 @@ frameGet(int fd, unsigned char *buf) memset(buf, 0, BUFSIZE); unsigned char c; -again: - while (read(fd, &c, 1) > 0) { buf[i++] = c; @@ -71,7 +69,7 @@ again: } i = 0; - goto again; + continue; } } diff --git a/simulators/simid5100.c b/simulators/simid5100.c index 262ecc362..b6d4b47d6 100644 --- a/simulators/simid5100.c +++ b/simulators/simid5100.c @@ -42,8 +42,6 @@ frameGet(int fd, unsigned char *buf) memset(buf, 0, BUFSIZE); unsigned char c; -again: - while (read(fd, &c, 1) > 0) { buf[i++] = c; @@ -67,7 +65,7 @@ again: } i = 0; - goto again; + continue; } } commit 4251c50b7fda0fe2710a4ba28776ec4c7fe579a8 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Wed Aug 6 22:48:20 2025 +0200 Fix reading line when the client (eg. rigctl) closes Fixes an infinite stream of debug output because it erroneously appeared to have read 1 byte instead of 0: n=1 00 Not 8 bytes? bytes=1 Unknown cmd=00 Tested with: tests/rigctl -m 37001 -r /dev/pts/6 f (however it doesn't read the frequency because it looks like the protocol is different or incomplete, rigs/anytone/d578.c is still in beta) diff --git a/simulators/simatd578.c b/simulators/simatd578.c index 661338c6c..ad897ebec 100644 --- a/simulators/simatd578.c +++ b/simulators/simatd578.c @@ -5,6 +5,8 @@ #include <string.h> #include <unistd.h> +#include "sim.h" + #define BUFSIZE 256 float freqA = 14074000; @@ -36,20 +38,15 @@ _getmyline(int fd, unsigned char *buf) { buf[i++] = c; } - - n++; } while (c != 0x0a); - printf("n=%d \n", n); - - for (i = 0; i < n; ++i) { printf("%02x ", buf[i]); } - + printf("n=%d", i); + for (n = 0; n < i; ++n) { printf(" %02x", buf[n]); } printf("\n"); - return n; -} -#include "sim.h" + return i; +} int main(int argc, char *argv[]) commit 49c78edb80a992d69940a31139a0b49a53f795ce Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Wed Aug 6 21:49:17 2025 +0200 Make code more uniform diff --git a/simulators/simft847.c b/simulators/simft847.c index d05f4c721..c3c6befd0 100644 --- a/simulators/simft847.c +++ b/simulators/simft847.c @@ -24,7 +24,6 @@ int main(int argc, char *argv[]) unsigned char buf[BUFSIZE]; int freq, i, n; - again: int fd = openPort(argv[1]); diff --git a/simulators/simft897.c b/simulators/simft897.c index 336e1951d..0e2d2210e 100644 --- a/simulators/simft897.c +++ b/simulators/simft897.c @@ -25,7 +25,6 @@ int main(int argc, char *argv[]) unsigned char buf[BUFSIZE]; int n; - again: int fd = openPort(argv[1]); diff --git a/simulators/simmicom.c b/simulators/simmicom.c index dfc80ea99..4b03e03d5 100644 --- a/simulators/simmicom.c +++ b/simulators/simmicom.c @@ -50,7 +50,6 @@ int main(int argc, char *argv[]) { unsigned char buf[BUFSIZE]; - again: int fd = openPort(argv[1]); diff --git a/simulators/simspid.c b/simulators/simspid.c index 1218d13f2..706546cae 100644 --- a/simulators/simspid.c +++ b/simulators/simspid.c @@ -21,7 +21,6 @@ int main(int argc, char *argv[]) { unsigned char buf[BUFSIZE]; - again: int fd = openPort(argv[1]); commit 59acdb791eaa594193ae17213aa23a8e1efdd02f Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Wed Aug 6 09:34:04 2025 +0200 Fix compiler warning Move both initialization outside of the conditional. Fixes: simyaesu.c:364:12: warning: ‘pbuf’ may be used uninitialized [-Wmaybe-uninitialized] diff --git a/simulators/simyaesu.c b/simulators/simyaesu.c index 40b179c6e..fd610c6b5 100644 --- a/simulators/simyaesu.c +++ b/simulators/simyaesu.c @@ -42,8 +42,6 @@ int main(int argc, char *argv[]) if (getmyline(fd, buf)) { printf("Cmd:%s\n", buf); - resp[0] = 0; - pbuf = NULL; } //else { return 0; } @@ -55,6 +53,9 @@ int main(int argc, char *argv[]) if (power == 0 && strcmp(buf, "PS1;") != 0) { continue; } + resp[0] = 0; + pbuf = NULL; + if (strcmp(buf, "PS;") == 0) { sprintf(resp, "PS%d;", power); commit 032e78826e05ee09ab761ee1abdac26dc3ea4ca8 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Tue Aug 5 23:42:06 2025 +0200 Fix BC and FO commands The following command work from rigctl: get_freq get_ctcss_tone get_rig_info. Uses the information from the manual linked at the top of rig/kenwood/tmd710.c. Fixes: simtmd710.c:64:44: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘double’ [-Wformat=] simtmd710.c:68:44: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘double’ [-Wformat=] diff --git a/simulators/simtmd710.c b/simulators/simtmd710.c index 3cc216b17..3e5a8b9e7 100644 --- a/simulators/simtmd710.c +++ b/simulators/simtmd710.c @@ -52,21 +52,26 @@ int main(int argc, char *argv[]) if (strncmp(buf, "BC", 2) == 0) { - SNPRINTF(buf, sizeof(buf), "BC %d %d%c", vfo, vfo_tx, 0x0d); + SNPRINTF(buf, sizeof(buf), "BC %d,%d%c", vfo, vfo_tx, 0x0d); printf("R:%s\n", buf); write(fd, buf, strlen(buf)); continue; } else if (strncmp(buf, "FO", 2) == 0) { - if (buf[3] == '0') - { - SNPRINTF(buf, sizeof(buf), "FO 0 %d%c", freqA, 0x0d); - } - else - { - SNPRINTF(buf, sizeof(buf), "FO 1 %d%c", freqB, 0x0d); + char vfo = buf[3]; + int frequency; + char tone_frequency[] = "10"; // 94.8 + char ctcss_frequency[] = "05"; // 79,7 + char dcs_frequency[] = "016"; // 114 + + if (vfo == '0') { + frequency = (int)freqA; + } else { + frequency = (int)freqB; } + SNPRINTF(buf, sizeof(buf), "FO %c,%.10d,0,0,0,0,0,0,%.2s,%.2s,%.3s,00000000,0%c", + vfo, frequency, tone_frequency, ctcss_frequency, dcs_frequency, 0x0d); printf("R:%s\n", buf); write(fd, buf, strlen(buf)); commit d5c5eeff15df9c520ad71c1a8ebdeb04f3dae59e Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Tue Aug 5 22:18:54 2025 +0200 No need to use strlen() because the i variable counted the chars read diff --git a/simulators/sim.h b/simulators/sim.h index e1cc194cc..206f45686 100644 --- a/simulators/sim.h +++ b/simulators/sim.h @@ -102,17 +102,17 @@ getmyline(int fd, char *buf) char c; int i = 0; memset(buf, 0, BUFSIZE); - + while (read(fd, &c, 1) > 0) { buf[i++] = c; - - if (c == ';') { return strlen(buf); } + + if (c == ';') { return i; } } - - if (strlen(buf) == 0) { hl_usleep(10 * 1000); } - - return strlen(buf); + + if (i == 0) { hl_usleep(10 * 1000); } + + return i; } int commit af4c6ec8061dc876ccb3c4cb746db2f3b9f09546 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Tue Aug 5 22:16:48 2025 +0200 Make the output of simft990 more friendly diff --git a/simulators/simft990.c b/simulators/simft990.c index 6f3a91256..0e22bea25 100644 --- a/simulators/simft990.c +++ b/simulators/simft990.c @@ -7,6 +7,7 @@ #include <string.h> #include <unistd.h> +#include "sim.h" float freqA = 14074000; float freqB = 14074500; @@ -44,14 +45,11 @@ static void load_dat(const char *filename, unsigned char buf[ALL_DATA_SIZE]) } fclose(fp); - printf("%d bytes read\n", n); + printf("%d bytes read from file %s\n", n, filename); } static unsigned char alldata[ALL_DATA_SIZE]; -#include "sim.h" - - int main(int argc, char *argv[]) { unsigned char buf[BUFSIZE]; @@ -68,8 +66,11 @@ int main(int argc, char *argv[]) if (bytes != 5) { printf("Not 5 bytes? bytes=%d\n", bytes); + continue; } + // Protocol of rigs/yaesu/ft990v12.c + if (buf[4] == 0x10) { write(fd, alldata, ALL_DATA_SIZE); commit 9dd0009f9e14100adf10cc4abe058237f4eb1a6c Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Tue Aug 5 21:56:26 2025 +0200 Remove unused define diff --git a/simulators/simelecraft.c b/simulators/simelecraft.c index a7740ac11..acc931d09 100644 --- a/simulators/simelecraft.c +++ b/simulators/simelecraft.c @@ -10,7 +10,6 @@ #include "sim.h" #include "misc.h" -#define BUFSIZE 256 float freqA = 14074000; float freqB = 14074500; diff --git a/simulators/simelecraftk4.c b/simulators/simelecraftk4.c index 2b5e67e09..edd31061b 100644 --- a/simulators/simelecraftk4.c +++ b/simulators/simelecraftk4.c @@ -9,7 +9,6 @@ #include "sim.h" #include "misc.h" -#define BUFSIZE 256 int freqA = 14074000; int freqB = 14074500; diff --git a/simulators/simft450.c b/simulators/simft450.c index 50b73f823..f97c6631f 100644 --- a/simulators/simft450.c +++ b/simulators/simft450.c @@ -8,7 +8,6 @@ #include "hamlib/rig.h" #include "misc.h" -#define BUFSIZE 256 float freqA = 14074000; float freqB = 14074500; diff --git a/simulators/simft710.c b/simulators/simft710.c index d3f01e6f4..525f49bbb 100644 --- a/simulators/simft710.c +++ b/simulators/simft710.c @@ -8,7 +8,6 @@ #include "hamlib/rig.h" #include "misc.h" -#define BUFSIZE 256 float freqA = 14074000; float freqB = 14074500; diff --git a/simulators/simft818.c b/simulators/simft818.c index e9843b2c8..79813b509 100644 --- a/simulators/simft818.c +++ b/simulators/simft818.c @@ -9,7 +9,6 @@ #include "hamlib/rig.h" #include "misc.h" -#define BUFSIZE 256 float freqA = 14074000; float freqB = 14074500; diff --git a/simulators/simft990.c b/simulators/simft990.c index 9d1b1ab67..6f3a91256 100644 --- a/simulators/simft990.c +++ b/simulators/simft990.c @@ -7,7 +7,6 @@ #include <string.h> #include <unistd.h> -#define BUFSIZE 256 float freqA = 14074000; float freqB = 14074500; diff --git a/simulators/simft991.c b/simulators/simft991.c index 603007d85..fb1d9e829 100644 --- a/simulators/simft991.c +++ b/simulators/simft991.c @@ -8,7 +8,6 @@ #include "hamlib/rig.h" #include "misc.h" -#define BUFSIZE 256 float freqA = 14074000; float freqB = 14074500; diff --git a/simulators/simftdx101.c b/simulators/simftdx101.c index 1304f7f40..eb240a300 100644 --- a/simulators/simftdx101.c +++ b/simulators/simftdx101.c @@ -8,7 +8,6 @@ #include "hamlib/rig.h" #include "misc.h" -#define BUFSIZE 256 float freqA = 14074000; float freqB = 14074500; diff --git a/simulators/simftdx1200.c b/simulators/simftdx1200.c index a53c8e0c7..f6b56820f 100644 --- a/simulators/simftdx1200.c +++ b/simulators/simftdx1200.c @@ -8,7 +8,6 @@ #include "hamlib/rig.h" #include "misc.h" -#define BUFSIZE 256 float freqA = 14074000; float freqB = 14074500; diff --git a/simulators/simftdx3000.c b/simulators/simftdx3000.c index 8e7917062..d4cd4f851 100644 --- a/simulators/simftdx3000.c +++ b/simulators/simftdx3000.c @@ -8,7 +8,6 @@ #include "hamlib/rig.h" #include "misc.h" -#define BUFSIZE 256 float freqA = 14074000; float freqB = 14074500; diff --git a/simulators/simftdx5000.c b/simulators/simftdx5000.c index 034e528d1..121542f4c 100644 --- a/simulators/simftdx5000.c +++ b/simulators/simftdx5000.c @@ -8,7 +8,6 @@ #include "hamlib/rig.h" #include "misc.h" -#define BUFSIZE 256 float freqA = 14074000; float freqB = 14074500; diff --git a/simulators/simic2730.c b/simulators/simic2730.c index fa044eefe..441fa311a 100644 --- a/simulators/simic2730.c +++ b/simulators/simic2730.c @@ -14,7 +14,6 @@ #include "sim.h" -#define BUFSIZE 256 #define X25 int civ_731_mode = 0; diff --git a/simulators/simic275.c b/simulators/simic275.c index 11023c0a9..9b5abe810 100644 --- a/simulators/simic275.c +++ b/simulators/simic275.c @@ -14,7 +14,6 @@ #include "sim.h" -#define BUFSIZE 256 #define X25 int civ_731_mode = 0; diff --git a/simulators/simic7000.c b/simulators/simic7000.c index d02aa2142..cb4ff005a 100644 --- a/simulators/simic7000.c +++ b/simulators/simic7000.c @@ -13,7 +13,6 @@ #include "misc.h" #include "sim.h" -#define BUFSIZE 256 #define X25 int civ_731_mode = 0; diff --git a/simulators/simic705.c b/simulators/simic705.c index 47abe673f..277af171e 100644 --- a/simulators/simic705.c +++ b/simulators/simic705.c @@ -19,7 +19,6 @@ */ #include "../rigs/icom/icom_defs.h" -#define BUFSIZE 256 #define X25 #undef SATMODE diff --git a/simulators/simic7100.c b/simulators/simic7100.c index e2502f52e..368fc0dc5 100644 --- a/simulators/simic7100.c +++ b/simulators/simic7100.c @@ -15,7 +15,6 @@ #undef ECHO -#define BUFSIZE 256 #define X25 int civ_731_mode = 0; diff --git a/simulators/simic7200.c b/simulators/simic7200.c index e33c22543..c717cb9d2 100644 --- a/simulators/simic7200.c +++ b/simulators/simic7200.c @@ -14,7 +14,6 @@ #include "sim.h" -#define BUFSIZE 256 #define X25 int civ_731_mode = 0; diff --git a/simulators/simic7300.c b/simulators/simic7300.c index f6f0b8687..89c4d4238 100644 --- a/simulators/simic7300.c +++ b/simulators/simic7300.c @@ -14,7 +14,6 @@ #include "sim.h" -#define BUFSIZE 256 #define X25 int civ_731_mode = 0; diff --git a/simulators/simic7600.c b/simulators/simic7600.c index eb9232e00..f72390d80 100644 --- a/simulators/simic7600.c +++ b/simulators/simic7600.c @@ -14,7 +14,6 @@ #include "sim.h" -#define BUFSIZE 256 //#define X25 int civ_731_mode = 0; diff --git a/simulators/simic7610.c b/simulators/simic7610.c index f38f36cf3..65d294bae 100644 --- a/simulators/simic7610.c +++ b/simulators/simic7610.c @@ -12,7 +12,6 @@ #include "misc.h" #include "sim.h" -#define BUFSIZE 256 #define X25 int civ_731_mode = 0; diff --git a/simulators/simic7700.c b/simulators/simic7700.c index bf69128af..88faef544 100644 --- a/simulators/simic7700.c +++ b/simulators/simic7700.c @@ -14,7 +14,6 @@ #include "sim.h" -#define BUFSIZE 256 #define X25 int civ_731_mode = 0; diff --git a/simulators/simic7851.c b/simulators/simic7851.c index 031febe46..04202ccc5 100644 --- a/simulators/simic7851.c +++ b/simulators/simic7851.c @@ -13,7 +13,6 @@ #include "sim.h" -#define BUFSIZE 256 #define X25 int civ_731_mode = 0; diff --git a/simulators/simic905.c b/simulators/simic905.c index d439b2419..c39a67e00 100644 --- a/simulators/simic905.c +++ b/simulators/simic905.c @@ -14,7 +14,6 @@ #include "misc.h" #include "sim.h" -#define BUFSIZE 256 #define X25 int civ_731_mode = 0; diff --git a/simulators/simic910.c b/simulators/simic910.c index 38fec3e08..3d04e3091 100644 --- a/simulators/simic910.c +++ b/simulators/simic910.c @@ -15,7 +15,6 @@ #include "sim.h" -#define BUFSIZE 256 //#define X25 int civ_731_mode = 0; diff --git a/simulators/simic9100.c b/simulators/simic9100.c index 1fbb23b1d..0329fe1b5 100644 --- a/simulators/simic9100.c +++ b/simulators/simic9100.c @@ -13,7 +13,6 @@ #include "sim.h" #include "misc.h" -#define BUFSIZE 256 //#define X25 int civ_731_mode = 0; diff --git a/simulators/simic9700.c b/simulators/simic9700.c index 88113a902..5f6c3165e 100644 --- a/simulators/simic9700.c +++ b/simulators/simic9700.c @@ -14,7 +14,6 @@ #include "sim.h" -#define BUFSIZE 256 #define X25 int civ_731_mode = 0; diff --git a/simulators/simicgeneric.c b/simulators/simicgeneric.c index 91e584796..98996f6ea 100644 --- a/simulators/simicgeneric.c +++ b/simulators/simicgeneric.c @@ -13,7 +13,6 @@ #include "misc.h" #include "sim.h" -#define BUFSIZE 256 //#define X25 int civ_731_mode = 0; diff --git a/simulators/simicr8600.c b/simulators/simicr8600.c index d2b6a8e32..5ab35dbe1 100644 --- a/simulators/simicr8600.c +++ b/simulators/simicr8600.c @@ -13,7 +13,6 @@ #include "misc.h" #include "sim.h" -#define BUFSIZE 256 //#define X25 int civ_731_mode = 0; diff --git a/simulators/simid5100.c b/simulators/simid5100.c index a3aaf7da1..262ecc362 100644 --- a/simulators/simid5100.c +++ b/simulators/simid5100.c @@ -14,7 +14,6 @@ #include "sim.h" -#define BUFSIZE 256 int civ_731_mode = 0; vfo_t current_vfo = RIG_VFO_A; diff --git a/simulators/simkenwood.c b/simulators/simkenwood.c index bdf1b780f..fd9e6d4ba 100644 --- a/simulators/simkenwood.c +++ b/simulators/simkenwood.c @@ -8,7 +8,6 @@ #include "hamlib/rig.h" #include "misc.h" -#define BUFSIZE 256 int mysleep = 20; diff --git a/simulators/simpowersdr.c b/simulators/simpowersdr.c index d38276929..8c7d8ca38 100644 --- a/simulators/simpowersdr.c +++ b/simulators/simpowersdr.c @@ -8,7 +8,6 @@ #include "hamlib/rig.h" #include "misc.h" -#define BUFSIZE 256 float freqA = 14074000; float freqB = 14074500; diff --git a/simulators/simqrplabs.c b/simulators/simqrplabs.c index be177e2e3..f9f44e5a4 100644 --- a/simulators/simqrplabs.c +++ b/simulators/simqrplabs.c @@ -9,7 +9,6 @@ #include "hamlib/rig.h" #include "misc.h" -#define BUFSIZE 256 int mysleep = 20; diff --git a/simulators/simtrusdx.c b/simulators/simtrusdx.c index ac51c0bbf..58241c19a 100644 --- a/simulators/simtrusdx.c +++ b/simulators/simtrusdx.c @@ -9,7 +9,6 @@ #include "hamlib/rig.h" #include "misc.h" -#define BUFSIZE 256 int mysleep = 20; diff --git a/simulators/simts450.c b/simulators/simts450.c index 6d159eafc..be89a2398 100644 --- a/simulators/simts450.c +++ b/simulators/simts450.c @@ -9,7 +9,6 @@ #include "hamlib/rig.h" #include "misc.h" -#define BUFSIZE 256 int mysleep = 20; diff --git a/simulators/simts590.c b/simulators/simts590.c index 316eb0c27..5a51e309b 100644 --- a/simulators/simts590.c +++ b/simulators/simts590.c @@ -10,7 +10,6 @@ #include "sim.h" #include "misc.h" -#define BUFSIZE 256 int mysleep = 20; diff --git a/simulators/simts890.c b/simulators/simts890.c index a022cd357..d7e6a81a2 100644 --- a/simulators/simts890.c +++ b/simulators/simts890.c @@ -44,8 +44,6 @@ * app is only using the latest-and-greatest, comment out the next define. */ #define LEGACY -// Size of command buffer -#define BUFSIZE 256 // Number of selectable bands #define NBANDS 11 /* Type we're emulating - K=The Americas(default), E=Europe */ diff --git a/simulators/simts950.c b/simulators/simts950.c index 50cc626af..70ace6062 100644 --- a/simulators/simts950.c +++ b/simulators/simts950.c @@ -9,7 +9,6 @@ #include "hamlib/rig.h" #include "misc.h" -#define BUFSIZE 256 int mysleep = 20; diff --git a/simulators/simts990.c b/simulators/simts990.c index a65aea203..d2b96b5af 100644 --- a/simulators/simts990.c +++ b/simulators/simts990.c @@ -9,7 +9,6 @@ #include "hamlib/rig.h" #include "misc.h" -#define BUFSIZE 256 int mysleep = 20; diff --git a/simulators/simxiegug90.c b/simulators/simxiegug90.c index 7530b46c6..755ff2ebf 100644 --- a/simulators/simxiegug90.c +++ b/simulators/simxiegug90.c @@ -12,7 +12,6 @@ #include "misc.h" #include "sim.h" -#define BUFSIZE 256 #define X25 int civ_731_mode = 0; diff --git a/simulators/simxiegux108g.c b/simulators/simxiegux108g.c index d9aff1763..501e56b46 100644 --- a/simulators/simxiegux108g.c +++ b/simulators/simxiegux108g.c @@ -12,7 +12,6 @@ #include "misc.h" #include "sim.h" -#define BUFSIZE 256 #define X25 int civ_731_mode = 0; diff --git a/simulators/simxiegux6100.c b/simulators/simxiegux6100.c index c4c01a492..9d0726d89 100644 --- a/simulators/simxiegux6100.c +++ b/simulators/simxiegux6100.c @@ -12,7 +12,6 @@ #include "misc.h" #include "sim.h" -#define BUFSIZE 256 #define X25 int civ_731_mode = 0; diff --git a/simulators/simyaesu.c b/simulators/simyaesu.c index 9a79ee759..40b179c6e 100644 --- a/simulators/simyaesu.c +++ b/simulators/simyaesu.c @@ -8,7 +8,6 @@ #include "hamlib/rig.h" #include "misc.h" -#define BUFSIZE 256 float freqA = 14074000; float freqB = 14074500; commit 816d6d9befa3c14f4859257ab60fd0292d1319a0 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Tue Aug 5 21:41:32 2025 +0200 Replace magic number with a defined constant diff --git a/simulators/simft990.c b/simulators/simft990.c index cfdcb18c2..9d1b1ab67 100644 --- a/simulators/simft990.c +++ b/simulators/simft990.c @@ -18,8 +18,9 @@ char modeB = '1'; int width_main = 500; int width_sub = 700; +#define ALL_DATA_SIZE 1492 -static void load_dat(const char *filename, unsigned char buf[1492]) +static void load_dat(const char *filename, unsigned char buf[ALL_DATA_SIZE]) { FILE *fp = fopen(filename, "r"); char line[4096]; @@ -47,7 +48,7 @@ static void load_dat(const char *filename, unsigned char buf[1492]) printf("%d bytes read\n", n); } -static unsigned char alldata[1492]; +static unsigned char alldata[ALL_DATA_SIZE]; #include "sim.h" @@ -72,7 +73,7 @@ int main(int argc, char *argv[]) if (buf[4] == 0x10) { - write(fd, alldata, 1492); + write(fd, alldata, ALL_DATA_SIZE); } } commit 249a99363363fab3b37eac66c9f83323988427af Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Tue Aug 5 22:19:46 2025 +0200 Avoid spamming the terminal with 0's diff --git a/simulators/sim.h b/simulators/sim.h index d09108016..e1cc194cc 100644 --- a/simulators/sim.h +++ b/simulators/sim.h @@ -120,21 +120,21 @@ getmyline5(int fd, unsigned char *buf) { unsigned char c; int i = 0; - int n = 0; memset(buf, 0, BUFSIZE); while (i < 5 && read(fd, &c, 1) > 0) { buf[i++] = c; - n++; } - printf("n=%d %02x %02x %02x %02x %02x\n", n, buf[0], buf[1], buf[2], buf[3], - buf[4]); + if (i > 0) { + printf("n=%d %02x %02x %02x %02x %02x\n", i, + buf[0], buf[1], buf[2], buf[3], buf[4]); + } if (i == 0) { hl_usleep(10 * 1000); } - return n; + return i; } commit 8064da81214c66374cf864942c3b8692f50cc0cf Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Tue Aug 5 21:16:33 2025 +0200 Avoid burning 100% CPU Adds hl_usleep() like in the other version of getmyline(). diff --git a/simulators/sim.h b/simulators/sim.h index 6d0122ec3..d09108016 100644 --- a/simulators/sim.h +++ b/simulators/sim.h @@ -131,5 +131,10 @@ getmyline5(int fd, unsigned char *buf) printf("n=%d %02x %02x %02x %02x %02x\n", n, buf[0], buf[1], buf[2], buf[3], buf[4]); + + if (i == 0) { + hl_usleep(10 * 1000); + } + return n; } commit d9532a9c62a6b31948968838b870bdc7e2b0e396 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Tue Aug 5 20:49:41 2025 +0200 Fix compiler warning Fixes: simft990.c:64:36: warning: pointer targets in passing argument 2 of ‘getmyline5’ differ in signedness [-Wpointer-sign] diff --git a/simulators/simft990.c b/simulators/simft990.c index 0ad0c0d8f..cfdcb18c2 100644 --- a/simulators/simft990.c +++ b/simulators/simft990.c @@ -54,7 +54,7 @@ static unsigned char alldata[1492]; int main(int argc, char *argv[]) { - char buf[BUFSIZE]; + unsigned char buf[BUFSIZE]; int fd = openPort(argv[1]); load_dat("simft990.dat", alldata); commit f691a68c069bbd32c938249f3dbd4a1d112e5c97 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Tue Aug 5 20:38:57 2025 +0200 Fix compiler warning Fixes: simft990.c:39:16: warning: suggest parentheses around assignment used as truth value [-Wparentheses] diff --git a/simulators/simft990.c b/simulators/simft990.c index f10cf27fb..0ad0c0d8f 100644 --- a/simulators/simft990.c +++ b/simulators/simft990.c @@ -36,7 +36,7 @@ static void load_dat(const char *filename, unsigned char buf[1492]) sscanf(p, "%x", &val); buf[n++] = val; } - while (p = strtok(NULL, " \r\n")); + while ((p = strtok(NULL, " \r\n"))); strtok(s, "\r\n"); //printf("n=%d, %s\n",n,s); commit 725fcee0048c6554d8c4c5393f52c350bb662e48 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Tue Aug 5 20:22:41 2025 +0200 Fix compiler warning Fixes: simatd578.c:143:9: warning: ‘n’ may be used uninitialized [-Wmaybe-uninitialized] diff --git a/simulators/simatd578.c b/simulators/simatd578.c index 06de3e511..661338c6c 100644 --- a/simulators/simatd578.c +++ b/simulators/simatd578.c @@ -55,7 +55,6 @@ _getmyline(int fd, unsigned char *buf) int main(int argc, char *argv[]) { unsigned char buf[BUFSIZE], buf2[256]; - int n; again: int fd = openPort(argv[1]); @@ -63,6 +62,7 @@ again: while (1) { int bytes = _getmyline(fd, buf); + int n = 0; if (bytes == 0) { commit 151549bb3b828596dc5b67d02bd446842655608a Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Mon Aug 4 10:49:58 2025 +0200 Remove disabled code None of these simulators does multicast networking. diff --git a/simulators/simelecraft.c b/simulators/simelecraft.c index 38164ecb0..a7740ac11 100644 --- a/simulators/simelecraft.c +++ b/simulators/simelecraft.c @@ -1,13 +1,6 @@ // can run this using rigctl/rigctld and socat pty devices #define _XOPEN_SOURCE 700 // since we are POSIX here we need this -#if 0 -struct ip_mreq -{ - int dummy; -}; -#endif - #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/simulators/simelecraftk4.c b/simulators/simelecraftk4.c index bfb8d482e..2b5e67e09 100644 --- a/simulators/simelecraftk4.c +++ b/simulators/simelecraftk4.c @@ -1,13 +1,6 @@ // can run this using rigctl/rigctld and socat pty devices #define _XOPEN_SOURCE 700 // since we are POSIX here we need this -#if 0 -struct ip_mreq -{ - int dummy; -}; -#endif - #include <stdio.h> #include <string.h> #include <unistd.h> diff --git a/simulators/simtmd700.c b/simulators/simtmd700.c index 44918b897..2abf667cd 100644 --- a/simulators/simtmd700.c +++ b/simulators/simtmd700.c @@ -1,13 +1,6 @@ // can run this using rigctl/rigctld and socat pty devices #define _XOPEN_SOURCE 700 // since we are POSIX here we need this -#if 0 -struct ip_mreq -{ - int dummy; -}; -#endif - #include <stdio.h> #include <string.h> #include <unistd.h> diff --git a/simulators/simts890.c b/simulators/simts890.c index 4d78c3a83..a022cd357 100644 --- a/simulators/simts890.c +++ b/simulators/simts890.c @@ -27,13 +27,6 @@ // can run this using rigctl/rigctld and socat pty devices #define _XOPEN_SOURCE 700 // since we are POSIX here we need this -#if 0 -struct ip_mreq -{ - int dummy; -}; -#endif - #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/simulators/simts990.c b/simulators/simts990.c index 5285dbcda..a65aea203 100644 --- a/simulators/simts990.c +++ b/simulators/simts990.c @@ -1,13 +1,6 @@ // can run this using rigctl/rigctld and socat pty devices #define _XOPEN_SOURCE 700 // since we are POSIX here we need this -#if 0 -struct ip_mreq -{ - int dummy; -}; -#endif - #include <stdio.h> #include <string.h> #include <unistd.h> diff --git a/simulators/simxiegug90.c b/simulators/simxiegug90.c index 2664511de..7530b46c6 100644 --- a/simulators/simxiegug90.c +++ b/simulators/simxiegug90.c @@ -3,13 +3,6 @@ // Needs a lot of improvement to work on all Icoms #define _XOPEN_SOURCE 700 // since we are POSIX here we need this -#if 0 -struct ip_mreq -{ - int dummy; -}; -#endif - #include <stdio.h> #include <string.h> #include <unistd.h> diff --git a/simulators/simxiegux108g.c b/simulators/simxiegux108g.c index 35f34d9ee..d9aff1763 100644 --- a/simulators/simxiegux108g.c +++ b/simulators/simxiegux108g.c @@ -3,13 +3,6 @@ // Needs a lot of improvement to work on all Icoms #define _XOPEN_SOURCE 700 // since we are POSIX here we need this -#if 0 -struct ip_mreq -{ - int dummy; -}; -#endif - #include <stdio.h> #include <string.h> #include <unistd.h> diff --git a/simulators/simxiegux6100.c b/simulators/simxiegux6100.c index 27b686765..c4c01a492 100644 --- a/simulators/simxiegux6100.c +++ b/simulators/simxiegux6100.c @@ -3,13 +3,6 @@ // Needs a lot of improvement to work on all Icoms #define _XOPEN_SOURCE 700 // since we are POSIX here we need this -#if 0 -struct ip_mreq -{ - int dummy; -}; -#endif - #include <stdio.h> #include <string.h> #include <unistd.h> commit 790820ab22cde0b8a251356d3513ad41f20f1f3c Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Mon Aug 4 10:47:02 2025 +0200 Refactor to remove code duplication of one version of getmyline() diff --git a/simulators/sim.h b/simulators/sim.h index afb889042..6d0122ec3 100644 --- a/simulators/sim.h +++ b/simulators/sim.h @@ -96,6 +96,25 @@ int openPort(char *comport) // doesn't matter for using pts devices // Size of command buffer #define BUFSIZE 256 +int +getmyline(int fd, char *buf) +{ + char c; + int i = 0; + memset(buf, 0, BUFSIZE); + + while (read(fd, &c, 1) > 0) + { + buf[i++] = c; + + if (c == ';') { return strlen(buf); } + } + + if (strlen(buf) == 0) { hl_usleep(10 * 1000); } + + return strlen(buf); +} + int getmyline5(int fd, unsigned char *buf) { diff --git a/simulators/simelecraft.c b/simulators/simelecraft.c index 500c5e1e2..38164ecb0 100644 --- a/simulators/simelecraft.c +++ b/simulators/simelecraft.c @@ -39,24 +39,6 @@ int modea = 2; int modeb = 2; int ptt = 0; -int -getmyline(int fd, char *buf) -{ - char c; - int i = 0; - memset(buf, 0, BUFSIZE); - - while (read(fd, &c, 1) > 0) - { - buf[i++] = c; - - if (c == ';') { return strlen(buf); } - } - - if (strlen(buf) == 0) { hl_usleep(10 * 1000); } - - return strlen(buf); -} diff --git a/simulators/simelecraftk4.c b/simulators/simelecraftk4.c index 2b63b0e78..bfb8d482e 100644 --- a/simulators/simelecraftk4.c +++ b/simulators/simelecraftk4.c @@ -39,24 +39,6 @@ int modeB = 2; int ptt = 0; // int freqa = 14074000, freqb = 14073500; -int -getmyline(int fd, char *buf) -{ - char c; - int i = 0; - memset(buf, 0, BUFSIZE); - - while (read(fd, &c, 1) > 0) - { - buf[i++] = c; - - if (c == ';') { return strlen(buf); } - } - - if (strlen(buf) == 0) { hl_usleep(10 * 1000); } - - return strlen(buf); -} diff --git a/simulators/simft450.c b/simulators/simft450.c index 8456e13dd..50b73f823 100644 --- a/simulators/simft450.c +++ b/simulators/simft450.c @@ -45,24 +45,6 @@ int gt = 0; int ex016 = 0; int ex020 = 0; -int -getmyline(int fd, char *buf) -{ - char c; - int i = 0; - memset(buf, 0, BUFSIZE); - - while (read(fd, &c, 1) > 0) - { - buf[i++] = c; - - if (c == ';') { return strlen(buf); } - } - - if (strlen(buf) == 0) { hl_usleep(10 * 1000); } - - return strlen(buf); -} #include "sim.h" diff --git a/simulators/simft710.c b/simulators/simft710.c index 83471fdfb..d3f01e6f4 100644 --- a/simulators/simft710.c +++ b/simulators/simft710.c @@ -46,24 +46,6 @@ int ex016 = 0; int ex020 = 0; int st = 0; -int -getmyline(int fd, char *buf) -{ - char c; - int i = 0; - memset(buf, 0, BUFSIZE); - - while (read(fd, &c, 1) > 0) - { - buf[i++] = c; - - if (c == ';') { return strlen(buf); } - } - - if (strlen(buf) == 0) { hl_usleep(10 * 1000); } - - return strlen(buf); -} #include "sim.h" diff --git a/simulators/simft818.c b/simulators/simft818.c index f14e7e002..e9843b2c8 100644 --- a/simulators/simft818.c +++ b/simulators/simft818.c @@ -21,24 +21,6 @@ char modeB = '1'; int width = 0; int ptt; -int -getmyline(int fd, char *buf) -{ - char c; - int i = 0; - memset(buf, 0, BUFSIZE); - - while (read(fd, &c, 1) > 0) - { - buf[i++] = c; - - if (c == ';') { return strlen(buf); } - } - - if (strlen(buf) == 0) { hl_usleep(10 * 1000); } - - return strlen(buf); -} #include "sim.h" diff --git a/simulators/simft991.c b/simulators/simft991.c index b9e4b9448..603007d85 100644 --- a/simulators/simft991.c +++ b/simulators/simft991.c @@ -24,24 +24,6 @@ int vd = 0; int sm0 = 0; int sm1 = 0; -int -getmyline(int fd, char *buf) -{ - char c; - int i = 0; - memset(buf, 0, BUFSIZE); - - while (read(fd, &c, 1) > 0) - { - buf[i++] = c; - - if (c == ';') { return strlen(buf); } - } - - if (strlen(buf) == 0) { hl_usleep(10 * 1000); } - - return strlen(buf); -} #include "sim.h" diff --git a/simulators/simftdx101.c b/simulators/simftdx101.c index 6bbde4374..1304f7f40 100644 --- a/simulators/simftdx101.c +++ b/simulators/simftdx101.c @@ -32,24 +32,6 @@ int rport_gain_psk = 50; int syncvfo = 0; int ant = 1; -int -getmyline(int fd, char *buf) -{ - char c; - int i = 0; - memset(buf, 0, BUFSIZE); - - while (read(fd, &c, 1) > 0) - { - buf[i++] = c; - - if (c == ';') { return strlen(buf); } - } - - if (strlen(buf) == 0) { hl_usleep(10 * 1000); } - - return strlen(buf); -} #include "sim.h" diff --git a/simulators/simftdx1200.c b/simulators/simftdx1200.c index d91db1c79..a53c8e0c7 100644 --- a/simulators/simftdx1200.c +++ b/simulators/simftdx1200.c @@ -23,24 +23,6 @@ int na = 0; int ex039 = 0; int keyspd = 20; -int -getmyline(int fd, char *buf) -{ - char c; - int i = 0; - memset(buf, 0, BUFSIZE); - - while (read(fd, &c, 1) > 0) - { - buf[i++] = c; - - if (c == ';') { return strlen(buf); } - } - - if (strlen(buf) == 0) { hl_usleep(10 * 1000); } - - return strlen(buf); -} #include "sim.h" diff --git a/simulators/simftdx3000.c b/simulators/simftdx3000.c index dbfa63d51..8e7917062 100644 --- a/simulators/simftdx3000.c +++ b/simulators/simftdx3000.c @@ -22,24 +22,6 @@ int sh = 25; int na = 0; int ex039 = 0; -int -getmyline(int fd, char *buf) -{ - char c; - int i = 0; - memset(buf, 0, BUFSIZE); - - while (read(fd, &c, 1) > 0) - { - buf[i++] = c; - - if (c == ';') { return strlen(buf); } - } - - if (strlen(buf) == 0) { hl_usleep(10 * 1000); } - - return strlen(buf); -} #include "sim.h" diff --git a/simulators/simftdx5000.c b/simulators/simftdx5000.c index a60d39380..034e528d1 100644 --- a/simulators/simftdx5000.c +++ b/simulators/simftdx5000.c @@ -24,24 +24,6 @@ int na = 0; int ex039 = 0; int ex103 = 0; -int -getmyline(int fd, char *buf) -{ - char c; - int i = 0; - memset(buf, 0, BUFSIZE); - - while (read(fd, &c, 1) > 0) - { - buf[i++] = c; - - if (c == ';') { return strlen(buf); } - } - - if (strlen(buf) == 0) { hl_usleep(10 * 1000); } - - return strlen(buf); -} #include "sim.h" diff --git a/simulators/simkenwood.c b/simulators/simkenwood.c index 0ec10f0c7..bdf1b780f 100644 --- a/simulators/simkenwood.c +++ b/simulators/simkenwood.c @@ -18,24 +18,6 @@ int filternum = 7; int datamode = 0; int vfo, vfo_tx, ptt, ptt_data, ptt_mic, ptt_tune; -int -getmyline(int fd, char *buf) -{ - char c; - int i = 0; - memset(buf, 0, BUFSIZE); - - while (read(fd, &c, 1) > 0) - { - buf[i++] = c; - - if (c == ';') { return strlen(buf); } - } - - if (strlen(buf) == 0) { hl_usleep(10 * 1000); } - - return strlen(buf); -} #include "sim.h" diff --git a/simulators/simpowersdr.c b/simulators/simpowersdr.c index 5049702f5..d38276929 100644 --- a/simulators/simpowersdr.c +++ b/simulators/simpowersdr.c @@ -19,24 +19,6 @@ int keyspd = 20; double alc = 0; int tx; -int -getmyline(int fd, char *buf) -{ - char c; - int i = 0; - memset(buf, 0, BUFSIZE); - - while (read(fd, &c, 1) > 0) - { - buf[i++] = c; - - if (c == ';') { return strlen(buf); } - } - - if (strlen(buf) == 0) { hl_usleep(10 * 1000); } - - return strlen(buf); -} #include "sim.h" diff --git a/simulators/simqrplabs.c b/simulators/simqrplabs.c index 4492e28f1..be177e2e3 100644 --- a/simulators/simqrplabs.c +++ b/simulators/simqrplabs.c @@ -20,24 +20,6 @@ int datamode = 0; int vfo, vfo_tx, ptt, ptt_data, ptt_mic, ptt_tune; int tomode = 0; -int -getmyline(int fd, char *buf) -{ - char c; - int i = 0; - memset(buf, 0, BUFSIZE); - - while (read(fd, &c, 1) > 0) - { - buf[i++] = c; - - if (c == ';') { return strlen(buf); } - } - - if (strlen(buf) == 0) { hl_usleep(10 * 1000); } - - return strlen(buf); -} #include "sim.h" diff --git a/simulators/simtrusdx.c b/simulators/simtrusdx.c index c666f012f..ac51c0bbf 100644 --- a/simulators/simtrusdx.c +++ b/simulators/simtrusdx.c @@ -21,24 +21,6 @@ int vfo, vfo_tx, ptt, ptt_data, ptt_mic, ptt_tune; int tomode = 0; int keyspd = 25; -int -getmyline(int fd, char *buf) -{ - char c; - int i = 0; - memset(buf, 0, BUFSIZE); - - while (read(fd, &c, 1) > 0) - { - buf[i++] = c; - - if (c == ';') { return strlen(buf); } - } - - if (strlen(buf) == 0) { hl_usleep(10 * 1000); } - - return strlen(buf); -} #include "sim.h" diff --git a/simulators/simts450.c b/simulators/simts450.c index 7e5b87bd1..6d159eafc 100644 --- a/simulators/simts450.c +++ b/simulators/simts450.c @@ -21,24 +21,6 @@ int vfo, vfo_tx, ptt, ptt_data, ptt_mic, ptt_tune; int tomode = 0; int keyspd = 25; -int -getmyline(int fd, char *buf) -{ - char c; - int i = 0; - memset(buf, 0, BUFSIZE); - - while (read(fd, &c, 1) > 0) - { - buf[i++] = c; - - if (c == ';') { return strlen(buf); } - } - - if (strlen(buf) == 0) { hl_usleep(10 * 1000); } - - return strlen(buf); -} #include "sim.h" diff --git a/simulators/simts890.c b/simulators/simts890.c index 25d6f357a..4d78c3a83 100644 --- a/simulators/simts890.c +++ b/simulators/simts890.c @@ -212,24 +212,6 @@ int hl_usleep(unsigned long usec); // Until it's replaced #include "sim.h" -int -getmyline(int fd, char *buf) -{ - char c; - int i = 0; - memset(buf, 0, BUFSIZE); - - while (read(fd, &c, 1) > 0) - { - buf[i++] = c; - - if (c == ';') { return strlen(buf); } - } - - if (strlen(buf) == 0) { hl_usleep(10 * 1000); } - - return strlen(buf); -} int main(int argc, char *argv[]) { diff --git a/simulators/simts950.c b/simulators/simts950.c index 5baaabdc2..50cc626af 100644 --- a/simulators/simts950.c +++ b/simulators/simts950.c @@ -20,24 +20,6 @@ int filternum2 = 8; int datamode = 0; int vfo, vfo_tx, ptt, ptt_data, ptt_mic, ptt_tune; -int -getmyline(int fd, char *buf) -{ - char c; - int i = 0; - memset(buf, 0, BUFSIZE); - - while (read(fd, &c, 1) > 0) - { - buf[i++] = c; - - if (c == ';') { return strlen(buf); } - } - - if (strlen(buf) == 0) { hl_usleep(10 * 1000); } - - return strlen(buf); -} #include "sim.h" diff --git a/simulators/simts990.c b/simulators/simts990.c index c321f9ccb..5285dbcda 100644 --- a/simulators/simts990.c +++ b/simulators/simts990.c @@ -62,24 +62,6 @@ int pc = 50; #include "sim.h" -int -getmyline(int fd, char *buf) -{ - char c; - int i = 0; - memset(buf, 0, BUFSIZE); - - while (read(fd, &c, 1) > 0) - { - buf[i++] = c; - - if (c == ';') { return strlen(buf); } - } - - if (strlen(buf) == 0) { hl_usleep(10 * 1000); } - - return strlen(buf); -} diff --git a/simulators/simyaesu.c b/simulators/simyaesu.c index ea126f8fd..9a79ee759 100644 --- a/simulators/simyaesu.c +++ b/simulators/simyaesu.c @@ -26,24 +26,6 @@ int width_sub = 0; int ex039 = 0; int lk = 0; -int -getmyline(int fd, char *buf) -{ - char c; - int i = 0; - memset(buf, 0, BUFSIZE); - - while (read(fd, &c, 1) > 0) - { - buf[i++] = c; - - if (c == ';') { return strlen(buf); } - } - - if (strlen(buf) == 0) { hl_usleep(10 * 1000); } - - return strlen(buf); -} #include "sim.h" commit b809937395457fadb9fa3ab98ad8a4ff52e9fa7d Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Mon Aug 4 10:46:23 2025 +0200 Rename in preparation of conflicting changes diff --git a/simulators/simatd578.c b/simulators/simatd578.c index 8f5a4dd5c..06de3e511 100644 --- a/simulators/simatd578.c +++ b/simulators/simatd578.c @@ -20,7 +20,7 @@ int curr_vfo = 0; int -getmyline(int fd, unsigned char *buf) +_getmyline(int fd, unsigned char *buf) { unsigned char c; int i = 0; @@ -62,7 +62,7 @@ again: while (1) { - int bytes = getmyline(fd, buf); + int bytes = _getmyline(fd, buf); if (bytes == 0) { diff --git a/simulators/simeasycomm.c b/simulators/simeasycomm.c index 8089277bb..a774e5fcc 100644 --- a/simulators/simeasycomm.c +++ b/simulators/simeasycomm.c @@ -14,7 +14,7 @@ static void *rotorez_thread(void *arg); int -getmyline(int fd, char *buf) +_getmyline(int fd, char *buf) { unsigned char c = 0; int i = 0; @@ -61,8 +61,8 @@ int main(int argc, char *argv[]) while (1) { int bytes; - if (!flag) bytes = getmyline(fd, buf); - else bytes = getmyline(fd2, buf); + if (!flag) bytes = _getmyline(fd, buf); + else bytes = _getmyline(fd2, buf); flag = !flag; if (bytes == 0) @@ -116,7 +116,7 @@ again: while (1) { int bytes; - bytes = getmyline(fd, buf); + bytes = _getmyline(fd, buf); if (bytes == 0) { diff --git a/simul... [truncated message content] |
From: n0nb <n0...@us...> - 2025-08-06 18:53:39
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, Hamlib-4.6.3 has been updated via 2d63d05da7d80132392b25a8405844fceea4480f (commit) via 201f69bf3cbf46859920b920ed4df194c0d803eb (commit) via 566d56bb29eaaaa5737411524fbc8ebee77ff7c3 (commit) from 59e3d1b307504440837c3a5c24a15d7038e59f69 (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 2d63d05da7d80132392b25a8405844fceea4480f Author: Nate Bargmann <n0...@n0...> Date: Wed Aug 6 13:51:11 2025 -0500 Advance to 4.6.5 No proposed release date as of yet. diff --git a/NEWS b/NEWS index c52a25d13..1b9c5c1e1 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,11 @@ Version 5.x -- future Version 4.7.0 * 2025-12-01 (target) +Version 4.6.5 + * 2025-??-?? + * Update Kenwood CW buffer max message size, fix one byte buffer + overrun in icom.c. (TNX George Baltz). + Version 4.6.4 * 2025-07-18--Hamlib's 25th birthday!!! * Fix handling of unprintable characters in kenwood.c that broke radios diff --git a/configure.ac b/configure.ac index 3b17e222c..4facb20b9 100644 --- a/configure.ac +++ b/configure.ac @@ -14,7 +14,7 @@ dnl Please do not use '-' in the version number, as package managers will fail, dnl however, the use of '~' should be fine as apt (others?) will treat dnl it as an earlier version than the actual release. TNX KA6MAL dnl PACKAGE_NAME + " " + PACKAGE_VERSION must not exceed 20 chars! -AC_INIT([Hamlib],[4.6.4],[ham...@li...],[hamlib],[http://www.hamlib.org]) +AC_INIT([Hamlib],[4.6.5~rc],[ham...@li...],[hamlib],[http://www.hamlib.org]) #AC_INIT([PRODUCT_NAME], [Hamlib]) #AC_DEFINE([Hamlib], [PRODUCT_VERSION_RESOURCE]) @@ -76,7 +76,7 @@ dnl See README.release on setting these values # Set them here to keep c++/Makefile and src/Makefile in sync. ABI_VERSION=4 ABI_REVISION=6 -ABI_PATCH=4 +ABI_PATCH=5 ABI_AGE=0 AC_DEFINE_UNQUOTED([ABI_VERSION], [$ABI_VERSION], [Frontend ABI version]) commit 201f69bf3cbf46859920b920ed4df194c0d803eb Author: George Baltz N3GB <Geo...@gm...> Date: Wed Aug 6 04:59:50 2025 -0400 Fix one byte buffer overrun All the pictures in manuals show message as 4 bytes, but they don't include the major command (0x26). Found by `gcc -fanalyzer` diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 9f753ebf1..cdbc37e50 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -2372,7 +2372,7 @@ static int icom_set_mode_x26(RIG *rig, vfo_t vfo, rmode_t mode, int ack_len = sizeof(ackbuf); int buf_len = 3; int mode_len; - unsigned char mode_buf[4]; + unsigned char mode_buf[5]; if (priv->x26cmdfails > 0 && !priv_caps->x25x26_always) { commit 566d56bb29eaaaa5737411524fbc8ebee77ff7c3 Author: George Baltz N3GB <Geo...@gm...> Date: Wed Jul 30 12:51:50 2025 -0400 Update Kenwood max CW message size. diff --git a/rigs/kenwood/ts590.c b/rigs/kenwood/ts590.c index 4ed0c94af..49557657d 100644 --- a/rigs/kenwood/ts590.c +++ b/rigs/kenwood/ts590.c @@ -1922,6 +1922,7 @@ struct rig_caps ts590_caps = .get_mem = kenwood_get_mem, .vfo_ops = TS590_VFO_OPS, .vfo_op = kenwood_vfo_op, + .morse_qsize = 24, .hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS }; @@ -2352,5 +2353,6 @@ struct rig_caps ts590sg_caps = .get_mem = kenwood_get_mem, .vfo_ops = TS590_VFO_OPS, .vfo_op = kenwood_vfo_op, + .morse_qsize = 24, .hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS }; diff --git a/rigs/kenwood/ts890s.c b/rigs/kenwood/ts890s.c index 32d8c4533..db03f4368 100644 --- a/rigs/kenwood/ts890s.c +++ b/rigs/kenwood/ts890s.c @@ -720,5 +720,6 @@ struct rig_caps ts890s_caps = .get_func = ts890_get_func, .get_clock = kenwood_get_clock, .set_clock = kenwood_set_clock, + .morse_qsize = 24, .hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS }; diff --git a/rigs/kenwood/ts990s.c b/rigs/kenwood/ts990s.c index 0deda6bed..1ffcafd73 100644 --- a/rigs/kenwood/ts990s.c +++ b/rigs/kenwood/ts990s.c @@ -382,6 +382,7 @@ struct rig_caps ts990s_caps = .reset = kenwood_reset, .get_clock = kenwood_get_clock, .set_clock = kenwood_set_clock, + .morse_qsize = 24, .hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS }; ----------------------------------------------------------------------- Summary of changes: NEWS | 5 +++++ configure.ac | 4 ++-- rigs/icom/icom.c | 2 +- rigs/kenwood/ts590.c | 2 ++ rigs/kenwood/ts890s.c | 1 + rigs/kenwood/ts990s.c | 1 + 6 files changed, 12 insertions(+), 3 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-08-06 18:07:20
|
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 70d50d0efbbdd84157c9cd89043744f07d15bfd8 (commit) via 1e5adb9fde600354dbac2dfbae1775fc28725c49 (commit) via 96bc67d993647208060e443dd9953cff3255cfa4 (commit) via c26113c5cc6e9e2027111bb019ce36d635bbf602 (commit) via c1132a77b5883207147e3ebbf56152389467bb8e (commit) via c1e6dcf0105b2b1affe7aa1d794af7f09f017002 (commit) via 8ce51d13aa7e70a4b563b1218160fbb8b5d2cd25 (commit) from 1e310b7958bcb0c3246837e3cf8e2a497bcc6e48 (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 70d50d0efbbdd84157c9cd89043744f07d15bfd8 Author: George Baltz N3GB <Geo...@gm...> Date: Wed Aug 6 04:59:50 2025 -0400 Fix one byte buffer overrun All the pictures in manuals show message as 4 bytes, but they don't include the major command (0x26). Found by `gcc -fanalyzer` diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 995a25a0c..e22cadfe7 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -2373,7 +2373,7 @@ static int icom_set_mode_x26(RIG *rig, vfo_t vfo, rmode_t mode, int ack_len = sizeof(ackbuf); int buf_len = 3; int mode_len; - unsigned char mode_buf[4]; + unsigned char mode_buf[5]; if (priv->x26cmdfails > 0 && !priv_caps->x25x26_always) { commit 1e5adb9fde600354dbac2dfbae1775fc28725c49 Author: George Baltz N3GB <Geo...@gm...> Date: Wed Aug 6 04:56:02 2025 -0400 Fix errors in error cases Leak FDs in error exits, seg faults if RIG missing. Found by `gcc -fanalyzer` diff --git a/rigs/yaesu/ft100.c b/rigs/yaesu/ft100.c index 911ec8b7c..de3bcea2a 100644 --- a/rigs/yaesu/ft100.c +++ b/rigs/yaesu/ft100.c @@ -971,8 +971,7 @@ int ft100_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) { int ret; - int split = CACHE(rig)->split; - int ptt = CACHE(rig)->ptt; + int split, ptt; FT100_METER_INFO ft100_meter; @@ -980,6 +979,9 @@ int ft100_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) if (!val) { return -RIG_EINVAL; } + split = CACHE(rig)->split; + ptt = CACHE(rig)->ptt; + rig_debug(RIG_DEBUG_VERBOSE, "%s: %s\n", __func__, rig_strlevel(level)); // if in split have to switch to VFOB to read power and back to VFOA diff --git a/rotators/gs232a/gs232.c b/rotators/gs232a/gs232.c index 26b6c125e..34d66bd8b 100644 --- a/rotators/gs232a/gs232.c +++ b/rotators/gs232a/gs232.c @@ -198,7 +198,7 @@ gs232_rot_set_position(ROT *rot, azimuth_t az, elevation_t el) static int gs232_rot_get_position(ROT *rot, azimuth_t *az, elevation_t *el) { - char posbuf[32]; + char posbuf[BUFSZ]; // these really shouldn't be static but it's fixing faulty firmware -- see below static int expected = 12; static int expected_flag = 0; diff --git a/src/network.c b/src/network.c index 4c6242712..848a45eae 100644 --- a/src/network.c +++ b/src/network.c @@ -1348,7 +1348,7 @@ int is_wireless() static void *multicast_receiver(void *arg) { char data[4096]; - char ip4[INET6_ADDRSTRLEN]; + char ip4[INET6_ADDRSTRLEN] = ""; struct multicast_receiver_args_s *args = (struct multicast_receiver_args_s *) arg; diff --git a/src/settings.c b/src/settings.c index 9573bc9dd..500708c83 100644 --- a/src/settings.c +++ b/src/settings.c @@ -1266,6 +1266,8 @@ HAMLIB_EXPORT(int) rig_settings_load_all(char *settings_file) } } + fclose(fp); + return RIG_OK; } commit 96bc67d993647208060e443dd9953cff3255cfa4 Author: George Baltz N3GB <Geo...@gm...> Date: Tue Aug 5 11:29:01 2025 -0400 Fix FD leak in AESStringCrypt.c Found by `gcc -fanalyzer`, which then spent the next 20+ minutes trying to analyze md5.c, at which point I gave up. diff --git a/security/AESStringCrypt.c b/security/AESStringCrypt.c index 908b1ab41..819eb4817 100644 --- a/security/AESStringCrypt.c +++ b/security/AESStringCrypt.c @@ -222,6 +222,7 @@ unsigned long long AESStringCrypt(unsigned char *password, { if (fread(buffer, 1, 32, randfp) != 32) { + fclose(randfp); return AESSTRINGCRYPT_ERROR; } commit c26113c5cc6e9e2027111bb019ce36d635bbf602 Author: George Baltz N3GB <Geo...@gm...> Date: Mon Aug 4 18:43:39 2025 -0400 Fix more cppcheck messages Suppress non-errors in rx331.c and rx340.c Mark runflag(s) as volatile diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index f2bf347d1..a5a7901bb 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -2580,7 +2580,7 @@ struct multicast_s int multicast_running; int sock; int seqnumber; - int runflag; // = 0; + volatile int runflag; // = 0; pthread_t threadid; // this mutex is needed to control serial access // as of 2023-05-13 we have main thread and multicast thread needing it diff --git a/rigs/anytone/anytone.h b/rigs/anytone/anytone.h index d8ca681dc..18f64e38a 100644 --- a/rigs/anytone/anytone.h +++ b/rigs/anytone/anytone.h @@ -24,7 +24,7 @@ typedef struct _anytone_priv_data { ptt_t ptt; vfo_t vfo_curr; - int runflag; // thread control + volatile int runflag; // thread control char buf[64]; pthread_mutex_t mutex; } anytone_priv_data_t, diff --git a/rigs/tentec/omnivii.c b/rigs/tentec/omnivii.c index cd2f23654..5a0e4abe7 100644 --- a/rigs/tentec/omnivii.c +++ b/rigs/tentec/omnivii.c @@ -274,7 +274,7 @@ static int tt588_transaction(RIG *rig, const char *cmd, int cmd_len, char *data, if (retval == RIG_OK) { // All responses except from "XX" terminate with EOM (i.e. \r) so that is our stop char - char *term = EOM; + const char *term = EOM; if (cmd[0] == 'X') // we'll let the timeout take care of this as it shouldn't happen anyways diff --git a/rigs/tentec/paragon.c b/rigs/tentec/paragon.c index 220540b72..2b0ededa2 100644 --- a/rigs/tentec/paragon.c +++ b/rigs/tentec/paragon.c @@ -326,7 +326,7 @@ int tt585_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) { struct tt585_priv_data *priv = (struct tt585_priv_data *)STATE(rig)->priv; int ret; - unsigned char *p; + const unsigned char *p; ret = tt585_get_status_data(rig); diff --git a/rigs/tentec/rx331.c b/rigs/tentec/rx331.c index af252d861..e0eac210a 100644 --- a/rigs/tentec/rx331.c +++ b/rigs/tentec/rx331.c @@ -69,6 +69,7 @@ static int rx331_init(RIG *rig); static int rx331_cleanup(RIG *rig); static int rx331_set_conf(RIG *rig, hamlib_token_t token, const char *val); static int rx331_get_conf(RIG *rig, hamlib_token_t token, char *val); +static int rx331_get_conf2(RIG *rig, hamlib_token_t token, char *val, int len); static int rx331_open(RIG *rig); static int rx331_close(RIG *rig); static int rx331_set_freq(RIG *rig, vfo_t vfo, freq_t freq); @@ -178,6 +179,7 @@ struct rig_caps rx331_caps = .rig_close = rx331_close, .set_conf = rx331_set_conf, .get_conf = rx331_get_conf, + .get_conf2 = rx331_get_conf2, .set_freq = rx331_set_freq, .get_freq = rx331_get_freq, .set_mode = rx331_set_mode, @@ -428,6 +430,8 @@ int rx331_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) return -RIG_EPROTO; } + // cppcheck doesn't grok num_sscanf() + // cppcheck-suppress uninitvar *freq = f * 1e6; return RIG_OK; @@ -547,6 +551,7 @@ int rx331_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) return -RIG_EPROTO; } + // cppcheck-suppress uninitvar *width = f * 1e3; return RIG_OK; diff --git a/rigs/tentec/rx340.c b/rigs/tentec/rx340.c index 0d97cda26..dab9cab35 100644 --- a/rigs/tentec/rx340.c +++ b/rigs/tentec/rx340.c @@ -325,6 +325,7 @@ int rx340_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) return -RIG_EPROTO; } + // cppcheck-suppress uninitvar *freq = f * 1e6; return RIG_OK; @@ -443,6 +444,7 @@ int rx340_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) return -RIG_EPROTO; } + // cppcheck-suppress uninitvar *width = f * 1e3; return RIG_OK; commit c1132a77b5883207147e3ebbf56152389467bb8e Author: George Baltz N3GB <Geo...@gm...> Date: Mon Aug 4 10:20:46 2025 -0400 Mark cache structure in rig_state as deprecated. It is no longer being initialized or updated, so anyone referencing it is being misled. diff --git a/include/hamlib/rig_state.h b/include/hamlib/rig_state.h index 15d7cff05..bd1c727c1 100644 --- a/include/hamlib/rig_state.h +++ b/include/hamlib/rig_state.h @@ -126,6 +126,7 @@ struct rig_state { int twiddle_timeout; /*!< timeout to resume from twiddling */ // uplink allows gpredict to behave better by no reading the uplink VFO int uplink; /*!< uplink=1 will not read Sub, uplink=2 will not read Main */ + HL_DEPRECATED struct rig_cache_deprecated cache; /*!< \deprecated Only here for backward compatibility */ int vfo_opt; /*!< Is -o switch turned on? */ int auto_power_on; /*!< Allow Hamlib to power on rig commit c1e6dcf0105b2b1affe7aa1d794af7f09f017002 Author: George Baltz N3GB <Geo...@gm...> Date: Wed Jul 30 15:11:53 2025 -0400 More cppcheck stuff in amplifiers/ and rotators/ diff --git a/amplifiers/elecraft/kpa.c b/amplifiers/elecraft/kpa.c index f0b0eab55..4b9a6a79b 100644 --- a/amplifiers/elecraft/kpa.c +++ b/amplifiers/elecraft/kpa.c @@ -566,7 +566,7 @@ int kpa_get_powerstat(AMP *amp, powerstat_t *status) int kpa_set_powerstat(AMP *amp, powerstat_t status) { int retval; - char *cmd = NULL; + const char *cmd = NULL; rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); diff --git a/amplifiers/gemini/gemini.c b/amplifiers/gemini/gemini.c index b95b77200..58da33581 100644 --- a/amplifiers/gemini/gemini.c +++ b/amplifiers/gemini/gemini.c @@ -134,7 +134,7 @@ const char *gemini_get_info(AMP *amp) return rc->model_name; } -int gemini_status_parse(AMP *amp) +static int gemini_status_parse(AMP *amp) { int retval, n = 0; char *p; @@ -204,7 +204,7 @@ int gemini_get_freq(AMP *amp, freq_t *freq) int gemini_set_freq(AMP *amp, freq_t freq) { int retval; - char *cmd; + const char *cmd; rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); @@ -268,7 +268,7 @@ int gemini_get_level(AMP *amp, setting_t level, value_t *val) int gemini_set_level(AMP *amp, setting_t level, value_t val) { - char *cmd = "?"; + const char *cmd = "?"; int retval; rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); @@ -340,7 +340,7 @@ int gemini_get_powerstat(AMP *amp, powerstat_t *status) int gemini_set_powerstat(AMP *amp, powerstat_t status) { int retval; - char *cmd = NULL; + const char *cmd = NULL; rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); diff --git a/rotators/apex/apex.c b/rotators/apex/apex.c index e85d62012..aa9fe89ca 100644 --- a/rotators/apex/apex.c +++ b/rotators/apex/apex.c @@ -43,12 +43,12 @@ static int apex_get_string(ROT *rot, char *s, int maxlen) static void *apex_read(void *arg) { ROT *rot = arg; - int retval = 0; char data[64]; int expected_return_length = 63; while (1) { + int retval; retval = apex_get_string(rot, data, expected_return_length); if (strstr(data, "<VER>")) diff --git a/rotators/easycomm/easycomm.c b/rotators/easycomm/easycomm.c index 4f7113e12..70d1b5f65 100644 --- a/rotators/easycomm/easycomm.c +++ b/rotators/easycomm/easycomm.c @@ -50,9 +50,9 @@ static int easycomm_transaction(ROT *rot, const char *cmdstr, char *data, size_t data_len) { - hamlib_port_t *rotp = ROTPORT(rot); + hamlib_port_t *rotp; int retval; - int retry = rot->caps->retry; + int retry; rig_debug(RIG_DEBUG_TRACE, "%s called: %s\n", __func__, cmdstr); @@ -61,6 +61,9 @@ easycomm_transaction(ROT *rot, const char *cmdstr, char *data, size_t data_len) return -RIG_EINVAL; } + rotp = ROTPORT(rot); + retry = rot->caps->retry; + do { rig_flush(rotp); diff --git a/rotators/gs232a/gs232.c b/rotators/gs232a/gs232.c index bc95989c5..26b6c125e 100644 --- a/rotators/gs232a/gs232.c +++ b/rotators/gs232a/gs232.c @@ -225,7 +225,6 @@ gs232_rot_get_position(ROT *rot, azimuth_t *az, elevation_t *el) { rig_debug(RIG_DEBUG_WARN, "%s: rotor didn't send CR...assuming it won't in the future\n", __func__); - retval = RIG_OK; expected = 11; // we won't expect the CR ROTPORT(rot)->retry = 3; } diff --git a/rotators/gs232a/gs232a.c b/rotators/gs232a/gs232a.c index 068ed3052..7b73fa84d 100644 --- a/rotators/gs232a/gs232a.c +++ b/rotators/gs232a/gs232a.c @@ -276,7 +276,7 @@ static int gs232a_rot_set_level(ROT *rot, setting_t level, value_t val) } /* between 1 (slowest) and 4 (fastest) */ - SNPRINTF(cmdstr, sizeof(cmdstr), "X%u" EOM, speed); + SNPRINTF(cmdstr, sizeof(cmdstr), "X%d" EOM, speed); retval = gs232a_transaction(rot, cmdstr, NULL, 0, 1); if (retval != RIG_OK) diff --git a/rotators/gs232a/gs232b.c b/rotators/gs232a/gs232b.c index 8275a9ca8..030205816 100644 --- a/rotators/gs232a/gs232b.c +++ b/rotators/gs232a/gs232b.c @@ -294,10 +294,10 @@ static int gs232b_rot_set_level(ROT *rot, setting_t level, value_t val) switch (level) { - int retval; case ROT_LEVEL_SPEED: { + int retval; int speed = val.i; if (speed < 1) @@ -310,7 +310,7 @@ static int gs232b_rot_set_level(ROT *rot, setting_t level, value_t val) } /* between 1 (slowest) and 4 (fastest) */ - SNPRINTF(cmdstr, sizeof(cmdstr), "X%u" EOM, speed); + SNPRINTF(cmdstr, sizeof(cmdstr), "X%d" EOM, speed); retval = gs232b_transaction(rot, cmdstr, NULL, 0, 1); if (retval != RIG_OK) commit 8ce51d13aa7e70a4b563b1218160fbb8b5d2cd25 Author: George Baltz N3GB <Geo...@gm...> Date: Wed Jul 30 12:51:50 2025 -0400 Update Kenwood max CW message size. diff --git a/rigs/kenwood/ts590.c b/rigs/kenwood/ts590.c index 9f2e3c464..168f100a4 100644 --- a/rigs/kenwood/ts590.c +++ b/rigs/kenwood/ts590.c @@ -1923,6 +1923,7 @@ struct rig_caps ts590_caps = .get_mem = kenwood_get_mem, .vfo_ops = TS590_VFO_OPS, .vfo_op = kenwood_vfo_op, + .morse_qsize = 24, .hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS }; @@ -2353,5 +2354,6 @@ struct rig_caps ts590sg_caps = .get_mem = kenwood_get_mem, .vfo_ops = TS590_VFO_OPS, .vfo_op = kenwood_vfo_op, + .morse_qsize = 24, .hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS }; diff --git a/rigs/kenwood/ts890s.c b/rigs/kenwood/ts890s.c index b6316523e..033aa4de9 100644 --- a/rigs/kenwood/ts890s.c +++ b/rigs/kenwood/ts890s.c @@ -721,5 +721,6 @@ struct rig_caps ts890s_caps = .get_func = ts890_get_func, .get_clock = kenwood_get_clock, .set_clock = kenwood_set_clock, + .morse_qsize = 24, .hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS }; diff --git a/rigs/kenwood/ts990s.c b/rigs/kenwood/ts990s.c index e9da3e54a..3e667711d 100644 --- a/rigs/kenwood/ts990s.c +++ b/rigs/kenwood/ts990s.c @@ -381,6 +381,7 @@ struct rig_caps ts990s_caps = .reset = kenwood_reset, .get_clock = kenwood_get_clock, .set_clock = kenwood_set_clock, + .morse_qsize = 24, .hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS }; ----------------------------------------------------------------------- Summary of changes: amplifiers/elecraft/kpa.c | 2 +- amplifiers/gemini/gemini.c | 8 ++++---- include/hamlib/rig.h | 2 +- include/hamlib/rig_state.h | 1 + rigs/anytone/anytone.h | 2 +- rigs/icom/icom.c | 2 +- rigs/kenwood/ts590.c | 2 ++ rigs/kenwood/ts890s.c | 1 + rigs/kenwood/ts990s.c | 1 + rigs/tentec/omnivii.c | 2 +- rigs/tentec/paragon.c | 2 +- rigs/tentec/rx331.c | 5 +++++ rigs/tentec/rx340.c | 2 ++ rigs/yaesu/ft100.c | 6 ++++-- rotators/apex/apex.c | 2 +- rotators/easycomm/easycomm.c | 7 +++++-- rotators/gs232a/gs232.c | 3 +-- rotators/gs232a/gs232a.c | 2 +- rotators/gs232a/gs232b.c | 4 ++-- security/AESStringCrypt.c | 1 + src/network.c | 2 +- src/settings.c | 2 ++ 22 files changed, 40 insertions(+), 21 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-08-04 13:41:27
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 1e310b7958bcb0c3246837e3cf8e2a497bcc6e48 (commit) via c881bc713231d3505a5021338d1406edfedd470f (commit) via fbe9803777f7b41fca075d8a371a33e5b3ad9607 (commit) via 8d8d0328bfb9fe7fae5c2d273f4adc04e44ae1ca (commit) from 8ccc197b7c01efdb0b22774d0b2210b6bec28e92 (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 1e310b7958bcb0c3246837e3cf8e2a497bcc6e48 Merge: c881bc713 fbe980377 Author: Nate Bargmann <n0...@n0...> Date: Mon Aug 4 08:04:15 2025 -0500 Merge GitHub PR #1828 commit c881bc713231d3505a5021338d1406edfedd470f Merge: 8ccc197b7 8d8d0328b Author: Nate Bargmann <n0...@n0...> Date: Mon Aug 4 07:49:28 2025 -0500 Merge GitHub PR #1827 commit fbe9803777f7b41fca075d8a371a33e5b3ad9607 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Aug 3 13:18:09 2025 +0200 Fix initialization of comm_status The function rig_init() doesn't touch the hardware, it's rig_open() that initiates the connection and in fact the first use of comm_status in rig_open() is when it gets the value RIG_COMM_STATUS_CONNECTING and rig_close() sets it to RIG_COMM_STATUS_DISCONNECTED. diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py index 65ddc82a3..111311978 100755 --- a/bindings/python/test_rig.py +++ b/bindings/python/test_rig.py @@ -47,10 +47,12 @@ class TestClass: assert rig is not None assert rig.state.comm_state == 0 + assert rig.state.comm_status == Hamlib.RIG_COMM_STATUS_DISCONNECTED assert rig.set_conf("rig_pathname", rig_file) is None assert rig.set_conf("serial_speed", str(serial_speed)) is None assert rig.open() is None assert rig.state.comm_state == 1 + assert rig.state.comm_status == Hamlib.RIG_COMM_STATUS_OK info = rig.get_info() assert isinstance(info, str) @@ -116,6 +118,7 @@ class TestClass: assert rig.close() is None assert rig.state.comm_state == 0 + assert rig.state.comm_status == Hamlib.RIG_COMM_STATUS_DISCONNECTED info = rig.get_info() assert info is None diff --git a/src/rig.c b/src/rig.c index 63019fdf8..706ca4d91 100644 --- a/src/rig.c +++ b/src/rig.c @@ -669,7 +669,7 @@ RIG *HAMLIB_API rig_init(rig_model_t rig_model) rs->async_data_enabled = 0; // rs->depth = 1; rs->comm_state = 0; - rs->comm_status = RIG_COMM_STATUS_CONNECTING; + rs->comm_status = RIG_COMM_STATUS_DISCONNECTED; rs->tuner_control_pathname = DEFAULT_TUNER_CONTROL_PATHNAME; strncpy(rs->client_version, "Hamlib", sizeof(rs->client_version)); commit 8d8d0328bfb9fe7fae5c2d273f4adc04e44ae1ca Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Aug 2 16:10:20 2025 +0200 Fix typos diff --git a/amplifiers/elecraft/kpa.c b/amplifiers/elecraft/kpa.c index 431eb7735..f0b0eab55 100644 --- a/amplifiers/elecraft/kpa.c +++ b/amplifiers/elecraft/kpa.c @@ -365,7 +365,7 @@ int kpa_get_level(AMP *amp, setting_t level, value_t *val) return -RIG_EPROTO; } - rig_debug(RIG_DEBUG_VERBOSE, "%s freq range=%dKHz,%dKHz\n", __func__, + rig_debug(RIG_DEBUG_VERBOSE, "%s freq range=%dkHz,%dkHz\n", __func__, int_value, int_value2); // diff --git a/amplifiers/expert/expert.c b/amplifiers/expert/expert.c index 73f706eaa..6d0a6c94e 100644 --- a/amplifiers/expert/expert.c +++ b/amplifiers/expert/expert.c @@ -398,7 +398,7 @@ int expert_get_level(AMP *amp, setting_t level, value_t *val) return -RIG_EPROTO; } - rig_debug(RIG_DEBUG_VERBOSE, "%s freq range=%dKHz,%dKHz\n", __func__, + rig_debug(RIG_DEBUG_VERBOSE, "%s freq range=%dkHz,%dkHz\n", __func__, int_value, int_value2); // diff --git a/extra/kylix/hamlib_rigapi.pas b/extra/kylix/hamlib_rigapi.pas index b9cec3ee3..a2eba70e8 100644 --- a/extra/kylix/hamlib_rigapi.pas +++ b/extra/kylix/hamlib_rigapi.pas @@ -56,7 +56,7 @@ const HAMLIB_RIGVERSIZ = 8; HAMLIB_FILPATHLEN = 512; HAMLIB_FRQRANGESIZ = 30; - HAMLIB_MAXCHANDESC = 30; {* describe channel eg: "WWV 5Mhz" *} + HAMLIB_MAXCHANDESC = 30; {* describe channel eg: "WWV 5 MHz" *} HAMLIB_TSLSTSIZ = 20; {* max tuning step list size, zero ended *} HAMLIB_FLTLSTSIZ = 16; {* max mode/filter list size, zero ended *} HAMLIB_MAXDBLSTSIZ = 8; {* max preamp/att levels supported, zero ended *} diff --git a/include/hamlib/amplist.h b/include/hamlib/amplist.h index a123f8841..363cba450 100644 --- a/include/hamlib/amplist.h +++ b/include/hamlib/amplist.h @@ -126,7 +126,7 @@ /** * \brief A macro that returns the model number of `DX1200`. * - * The Gemini DX1200 covers 160 trhough 4 meters. + * The Gemini DX1200 covers 160 through 4 meters. */ #define AMP_MODEL_GEMINI_DX1200 AMP_MAKE_MODEL(AMP_GEMINI, 1) diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 7c79443a7..f2bf347d1 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -303,7 +303,7 @@ typedef struct s_rig RIG; #define HAMLIB_RIGVERSIZ 8 #define HAMLIB_FILPATHLEN 512 #define HAMLIB_FRQRANGESIZ 30 -#define HAMLIB_MAXCHANDESC 30 /* describe channel eg: "WWV 5Mhz" */ +#define HAMLIB_MAXCHANDESC 30 /* describe channel eg: "WWV 5 MHz" */ #define HAMLIB_TSLSTSIZ 20 /* max tuning step list size, zero ended */ #define HAMLIB_FLTLSTSIZ 60 /* max mode/filter list size, zero ended */ #define HAMLIB_MAXDBLSTSIZ 8 /* max preamp/att levels supported, zero ended */ diff --git a/rigs/aor/aor.c b/rigs/aor/aor.c index 9c70437d9..1ea435dbe 100644 --- a/rigs/aor/aor.c +++ b/rigs/aor/aor.c @@ -152,7 +152,7 @@ static int format_freq(char *buf, int buf_len, freq_t freq) /* * actually, frequency must be like nnnnnnnnm0, - * where m must be 0 or 5 (for 50Hz). + * where m must be 0 or 5 (for 50 Hz). */ lowhz = f % 100; f /= 100; @@ -595,7 +595,7 @@ int aor_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts) /* * actually, tuning step must be like nnnnm0, - * where m must be 0 or 5 (for 50Hz). + * where m must be 0 or 5 (for 50 Hz). */ SNPRINTF(tsbuf, sizeof(tsbuf), "ST%06ld" EOM, ts); diff --git a/rigs/aor/ar3000.c b/rigs/aor/ar3000.c index cd067642b..1a6fe26f5 100644 --- a/rigs/aor/ar3000.c +++ b/rigs/aor/ar3000.c @@ -232,7 +232,7 @@ int ar3k_set_freq(RIG *rig, vfo_t vfo, freq_t freq) /* * actually, frequency must be like nnnn.nnnnm, - * where m must be 0 or 5 (for 50Hz). + * where m must be 0 or 5 (for 50 Hz). */ lowhz = ((unsigned)freq) % 100; freq /= 100; @@ -400,7 +400,7 @@ int ar3k_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts) /* * actually, frequency must be like nnn.nm, - * where m must be 0 or 5 (for 50Hz). + * where m must be 0 or 5 (for 50 Hz). */ lowhz = ts % 100; ts /= 100; diff --git a/rigs/aor/ar5000.c b/rigs/aor/ar5000.c index ccee0e476..cc4fd6839 100644 --- a/rigs/aor/ar5000.c +++ b/rigs/aor/ar5000.c @@ -41,7 +41,7 @@ #define AR5000_VFO (RIG_VFO_A | RIG_VFO_B | RIG_VFO_C | RIG_VFO_N(3) | RIG_VFO_N(4)) /* As reported with rigctl 'l RAWSTR' for AR5000A S/n: 171218 - on 7040kHz / CW / 3kHz Bw. + on 7040 kHz / CW / 3 kHz Bw. The data available on http://www.aoruk.com did not match very well on HF */ #define AR5000_STR_CAL { 16, { \ diff --git a/rigs/aor/ar7030.c b/rigs/aor/ar7030.c index e5a4fafed..1536158fe 100644 --- a/rigs/aor/ar7030.c +++ b/rigs/aor/ar7030.c @@ -540,7 +540,7 @@ static int ar7030_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) case RIG_LEVEL_CWPITCH : // bfoval Mem_Page=0 Address=36 - // BFO offset in Hz (x33.19Hz)(values -4248.320 to 4215.130kHz). + // BFO offset in Hz (x33.19 Hz)(values -4248.320 to 4215.130 kHz). val.i = val.i * 100 / 3319; if (val.i < -128) {val.i = -128;} @@ -619,7 +619,7 @@ static int ar7030_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) case RIG_LEVEL_CWPITCH : // bfoval Mem_Page=0 Address=36 - // BFO offset in Hz (x33.19Hz)(values -4248.320 to 4215.130kHz). + // BFO offset in Hz (x33.19 Hz)(values -4248.320 to 4215.130 kHz). setMemPtr(rig, 0, 0x36); val->i = ((char)rxr_readByte(rig) * 3319) / 100; return RIG_OK; diff --git a/rigs/aor/ar7030p.h b/rigs/aor/ar7030p.h index 33e38d167..0e604f053 100644 --- a/rigs/aor/ar7030p.h +++ b/rigs/aor/ar7030p.h @@ -685,7 +685,7 @@ processor. - Keep out (by order). byte 2 bit 4 rx_aux Aux relay enable byte 2 bit 5 rx_fs5 Filter select : FS5 byte 2 bit 6 rx_fs6 Filter select : FS6 - byte 2 bit 7 rx_ibw IF b/w : 0 = 4kHz / 1 = 10kHz + byte 2 bit 7 rx_ibw IF b/w : 0 = 4 kHz / 1 = 10 kHz byte 3 bit 0 rx_chg Fast charge enable byte 3 bit 1 rx_pwr PSU enable byte 3 bit 2 rx_svi Sync VCO inhibit diff --git a/rigs/aor/ar8000.c b/rigs/aor/ar8000.c index e1e483022..fa8334747 100644 --- a/rigs/aor/ar8000.c +++ b/rigs/aor/ar8000.c @@ -145,7 +145,7 @@ struct rig_caps ar8000_caps = /* mode/filter list, .remember = order matters! */ {RIG_MODE_SSB | RIG_MODE_CW, kHz(2)}, {RIG_MODE_FM | RIG_MODE_AM, kHz(12)}, - {RIG_MODE_WFM, kHz(180)}, /* 50kHz at -3dB, 380kHz at -20dB */ + {RIG_MODE_WFM, kHz(180)}, /* 50 kHz at -3dB, 380 kHz at -20dB */ RIG_FLT_END, }, diff --git a/rigs/aor/ar8200.c b/rigs/aor/ar8200.c index 18e4cda19..5c7c65c32 100644 --- a/rigs/aor/ar8200.c +++ b/rigs/aor/ar8200.c @@ -170,7 +170,7 @@ struct rig_caps ar8200_caps = {RIG_MODE_AM, kHz(3)}, {RIG_MODE_FM | RIG_MODE_AM, kHz(12)}, {RIG_MODE_FM, kHz(9)}, - {RIG_MODE_WFM, kHz(230)}, /* 50kHz at -3dB, 380kHz at -20dB */ + {RIG_MODE_WFM, kHz(230)}, /* 50 kHz at -3dB, 380 kHz at -20dB */ RIG_FLT_END, }, diff --git a/rigs/aor/ar8600.c b/rigs/aor/ar8600.c index 1c05bbc05..dd68fd605 100644 --- a/rigs/aor/ar8600.c +++ b/rigs/aor/ar8600.c @@ -171,7 +171,7 @@ struct rig_caps ar8600_caps = {RIG_MODE_SSB | RIG_MODE_CW | RIG_MODE_AM, kHz(3)}, {RIG_MODE_FM | RIG_MODE_AM, kHz(12)}, {RIG_MODE_FM, kHz(9)}, - {RIG_MODE_WFM, kHz(230)}, /* 150kHz at -3dB, 380kHz at -20dB */ + {RIG_MODE_WFM, kHz(230)}, /* 150 kHz at -3dB, 380 kHz at -20dB */ RIG_FLT_END, }, diff --git a/rigs/barrett/950.c b/rigs/barrett/950.c index 73525fe78..121b8713f 100644 --- a/rigs/barrett/950.c +++ b/rigs/barrett/950.c @@ -164,7 +164,7 @@ int barrett950_set_freq(RIG *rig, vfo_t vfo, freq_t freq) for (i = 0; i < 10; ++i) { - rig_debug(RIG_DEBUG_VERBOSE, "%s: Mhz=%lg, lo=%lg, hi=%lg\n", __func__, + rig_debug(RIG_DEBUG_VERBOSE, "%s: MHz=%lg, lo=%lg, hi=%lg\n", __func__, freq_MHz, chan_map[i].lo, chan_map[i].hi); if (freq_MHz >= chan_map[i].lo && freq_MHz <= chan_map[i].hi) diff --git a/rigs/commradio/commradio.c b/rigs/commradio/commradio.c index 560419438..b9a7d9acf 100644 --- a/rigs/commradio/commradio.c +++ b/rigs/commradio/commradio.c @@ -178,7 +178,7 @@ int commradio_set_freq(RIG *rig, vfo_t vfo, freq_t freq) } } // CTX-10 returns 11 02 30 00 00 00 01 if we try to go out of its - // general-coverage frequency range 150kHz - 30MHz. I'm not sure why Hamlib + // general-coverage frequency range 150 kHz - 30 MHz. I'm not sure why Hamlib // even tries to do this, since its defined in the caps... else { diff --git a/rigs/drake/drake.c b/rigs/drake/drake.c index 0fe7d5f66..028128eeb 100644 --- a/rigs/drake/drake.c +++ b/rigs/drake/drake.c @@ -102,7 +102,7 @@ void drake_fix_string(char* inStr) * sentLen - the length of sentSt * recdStr - the radio's response string * recdLen - the length of recdStr - * res - The transaction reposnse + * res - The transaction response */ void drake_trans_rept(char* hdrStr, char* sentStr, int sentLen, char* recdStr, int recdLen, int res) { @@ -112,7 +112,7 @@ void drake_trans_rept(char* hdrStr, char* sentStr, int sentLen, char* recdStr, i int i; //in most cases each string is a buffer, so we need to ensure both command and response - //are not NULL and null-terminated before duplicastion and conversion. + //are not NULL and null-terminated before duplication and conversion. if ((sentStr != NULL) && (sentLen > 0)) { @@ -253,7 +253,7 @@ int drake_report_signal(RIG *rig, char* owner) * Common routine to decode the frequency block * * inputs: rig - pointer to RIG structure - * freqbuf - buffer containung radio's response string + * freqbuf - buffer containing radio's response string * offset - offset to beginning of string due to differences in R8 vs. R8A/B * Note: strings are virtually identical. offset is provided as a failsafe. * @@ -331,7 +331,7 @@ int drake_report_frequency(RIG *rig, char* owner) * Common routine to break out the 5-character mode string * * inputs: rig - pointer to RIG structure - * mdbuf - buffer containung radio's response string + * mdbuf - buffer containing radio's response string * offset - offset to beginning of string due to differences in R8 vs. R8A/B * * Assumes rig!=NULL @@ -510,7 +510,7 @@ int drake_report_mode(RIG *rig, char* owner) * Common routine to break out the 3 or 4-character mem string * * inputs: rig - pointer to RIG structure - * mdbuf - buffer containung radio's response string + * mdbuf - buffer containing radio's response string * offset - offset to beginning of string due to differences in R8 vs. R8A/B * Note: except for channel number size, strings are virtually identical. offset is provided as a failsafe. * @@ -716,7 +716,7 @@ int drake_set_freq(RIG *rig, vfo_t vfo, freq_t freq) int ack_len; int retval; - // 10Hz resolution - TODO: round nearest? + // 10 Hz resolution - TODO: round nearest? SNPRINTF((char *) freqbuf, sizeof(freqbuf), "F%07u" EOM, (unsigned int)freq / 10); retval = drake_transaction(rig, freqbuf, strlen(freqbuf), ackbuf, &ack_len); diff --git a/rigs/dummy/dummy.c b/rigs/dummy/dummy.c index e25d0bbf3..020fdaeb2 100644 --- a/rigs/dummy/dummy.c +++ b/rigs/dummy/dummy.c @@ -463,7 +463,7 @@ static int dummy_set_freq(RIG *rig, vfo_t vfo, freq_t freq) // if needed for testing enable this to emulate a rig with 100hz resolution #if 0 - // we emulate a rig with 100Hz set freq interval limits -- truncation + // we emulate a rig with 100 Hz set freq interval limits -- truncation freq = freq - fmod(freq, 100); #endif usleep(CMDSLEEP); diff --git a/rigs/elad/elad.c b/rigs/elad/elad.c index 87e8f71b6..5938baa2c 100644 --- a/rigs/elad/elad.c +++ b/rigs/elad/elad.c @@ -425,7 +425,7 @@ transaction_quit: * * Parameters: * cmd Same as elad_transaction() cmdstr - * buf Same as kenwwod_transaction() data + * buf Same as kenwood_transaction() data * buf_size Same as elad_transaction() datasize * expected Value of expected string length * diff --git a/rigs/icom/ic7000.c b/rigs/icom/ic7000.c index f052881b3..713463c20 100644 --- a/rigs/icom/ic7000.c +++ b/rigs/icom/ic7000.c @@ -156,10 +156,10 @@ static int ic7000_r2i_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width, return err; } - // CAT section of manual says: nn = 0 -40 > bw = 50Hz > 3600Hz + // CAT section of manual says: nn = 0 -40 > bw = 50 Hz > 3600 Hz // Tested by Ian G3VPX 20201029 - // 0 - 9 > bw 50Hz to 500Hz in 50Hz steps - // 10 - 40 > bw 600Hz to 3600Hz in 100Hz steps + // 0 - 9 > bw 50 Hz to 500 Hz in 50 Hz steps + // 10 - 40 > bw 600 Hz to 3600 Hz in 100 Hz steps if (width != RIG_PASSBAND_NOCHANGE) { if (width <= 500) { *pd = width / 50 - 1; } @@ -277,7 +277,7 @@ struct rig_caps ic7000_caps = .rx_range_list2 = { {kHz(30), MHz(199.999999), IC7000_ALL_RX_MODES, -1, -1, IC7000_VFOS}, {MHz(400), MHz(470), IC7000_ALL_RX_MODES, -1, -1, IC7000_VFOS}, RIG_FRNG_END, }, - .tx_range_list2 = { /* needs the 5 mhz channels added */ + .tx_range_list2 = { /* needs the 5 MHz channels added */ FRQ_RNG_HF(2, IC7000_OTHER_TX_MODES, W(2), W(100), IC7000_VFOS, RIG_ANT_1), FRQ_RNG_6m(2, IC7000_OTHER_TX_MODES, W(2), W(100), IC7000_VFOS, RIG_ANT_1), FRQ_RNG_2m(2, IC7000_OTHER_TX_MODES, W(2), W(50), IC7000_VFOS, RIG_ANT_2), diff --git a/rigs/icom/ic7200.c b/rigs/icom/ic7200.c index 9124f35ed..48b7b998f 100644 --- a/rigs/icom/ic7200.c +++ b/rigs/icom/ic7200.c @@ -204,7 +204,7 @@ struct rig_caps ic7200_caps = }, .rx_range_list2 = { {kHz(30), MHz(60), IC7200_ALL_RX_MODES, -1, -1, IC7200_VFOS}, RIG_FRNG_END, }, - .tx_range_list2 = { /* needs the 5 mhz channels added */ + .tx_range_list2 = { /* needs the 5 MHz channels added */ FRQ_RNG_HF(2, IC7200_OTHER_TX_MODES, W(2), W(100), IC7200_VFOS, RIG_ANT_1), FRQ_RNG_6m(2, IC7200_OTHER_TX_MODES, W(2), W(100), IC7200_VFOS, RIG_ANT_1), FRQ_RNG_HF(2, IC7200_AM_TX_MODES, W(1), W(40), IC7200_VFOS, RIG_ANT_1), /* AM class */ diff --git a/rigs/icom/ic746.c b/rigs/icom/ic746.c index 53adfc32f..610a1b684 100644 --- a/rigs/icom/ic746.c +++ b/rigs/icom/ic746.c @@ -348,19 +348,19 @@ struct rig_caps ic746_caps = #define S_MEM_BEEP 0x506 /* Button confirmation */ #define S_MEM_SQL_CTL 0x508 /* RF/SQL ctl set 0=auto; 1 = sql; 2 = RF+SQL */ #define S_MEM_QSPLT 0x511 /* enable quick split mode */ -/* values -9.999 MHz to + 9.999 Mhz */ +/* values -9.999 MHz to + 9.999 MHz */ #define S_MEM_SPLT_OFST 0x512 /* default split offset 4 bytes little endian last byte sign*/ #define S_MEM_SPLT_LOCK 0x513 /* split lock set */ -/* values 0.000 MHz to + 9.999 Mhz */ +/* values 0.000 MHz to + 9.999 MHz */ #define S_MEM_HF_DUP_OFST 0x514 /* default HF band duplex offset 3 byte little endian */ -#define S_MEM_6M_DUP_OFST 0x515 /* default 50 mHz duplex offset 3 byte little endian */ +#define S_MEM_6M_DUP_OFST 0x515 /* default 50 MHz duplex offset 3 byte little endian */ #define S_MEM_2M_DUP_OFST 0x516 /* default 144 MHz duplex offset 3 byte little endian */ #define S_MEM_AUTO_RPTR 0x518 /* auto repeater set 0=OFF; 1=ON-1; 2=ON-2 */ #define S_MEM_LANG 0x523 /* 0=English 1=Japanese for voice announcer */ #define S_MEM_TRCV 0x536 /* CI-V transceive mode */ #define S_MEM_CMP_LVL 0x538 /* speech compressor level 0-10 */ #define S_MEM_SBASS 0x539 /* SSB TX tone bass level */ -#define S_MEM_RTTY_FL_PB 0x562 /* 0=250 Hz, 1=300' 2 = 350, 3 = 500, 4 = 1 KHz */ +#define S_MEM_RTTY_FL_PB 0x562 /* 0=250 Hz, 1=300' 2 = 350, 3 = 500, 4 = 1 kHz */ #define S_MEM_RTTY_TWNPK 0x563 /* rtty twin peak filter off/on */ #define S_MEM_SCN_SPD 0x570 /* 0 = low; 1 = high */ #define S_MEM_NB_LVL 0x572 /* NB level 0-255 */ diff --git a/rigs/icom/ic756.c b/rigs/icom/ic756.c index bbf870866..5a13c6cb5 100644 --- a/rigs/icom/ic756.c +++ b/rigs/icom/ic756.c @@ -528,7 +528,7 @@ static const struct confparams ic756pro2_ext_parms[] = #define S_MEM_TRCV 0x532 /* CI-V transceive mode */ #define S_MEM_LANG 0x536 /* 0=English 1=Japanese for voice announcer */ #define S_MEM_SCN_SPD 0x556 /* 0 = low; 1 = high */ -#define S_MEM_RTTY_FL_PB 0x561 /* 0=250 Hz, 1=300' 2 = 350, 3 = 500, 4 = 1 KHz */ +#define S_MEM_RTTY_FL_PB 0x561 /* 0=250 Hz, 1=300' 2 = 350, 3 = 500, 4 = 1 kHz */ #define S_MEM_RTTY_TWNPK 0x562 /* rtty twin peak filter off/on */ diff --git a/rigs/icom/ic820h.c b/rigs/icom/ic820h.c index 24bc2bec7..e4674d008 100644 --- a/rigs/icom/ic820h.c +++ b/rigs/icom/ic820h.c @@ -84,7 +84,7 @@ struct rig_caps ic820h_caps = .dcs_list = NULL, .preamp = { RIG_DBLST_END, }, .attenuator = { RIG_DBLST_END, }, /* Attenuator 15dB for each band. manual button */ - .max_rit = Hz(0), /* SSB,CW: +-1.0kHz FM: +-5.0kHz */ + .max_rit = Hz(0), /* SSB,CW: +-1.0 kHz FM: +-5.0 kHz */ .max_xit = Hz(0), .max_ifshift = Hz(0), /* 1.2kHz manual knob */ .targetable_vfo = 0, diff --git a/rigs/icom/ic821h.c b/rigs/icom/ic821h.c index 62cdfee2e..bed53514c 100644 --- a/rigs/icom/ic821h.c +++ b/rigs/icom/ic821h.c @@ -121,7 +121,7 @@ struct rig_caps ic821h_caps = .dcs_list = NULL, .preamp = { RIG_DBLST_END, }, .attenuator = { RIG_DBLST_END, }, /* Attenuator 15dB for each band. manual button */ - .max_rit = Hz(0), /* SSB,CW: +-1.0kHz FM: +-5.0kHz */ + .max_rit = Hz(0), /* SSB,CW: +-1.0 kHz FM: +-5.0 kHz */ .max_xit = Hz(0), .max_ifshift = Hz(0), /* 1.2kHz manual knob */ .targetable_vfo = 0, diff --git a/rigs/icom/ic910.c b/rigs/icom/ic910.c index a1738bdad..5ca4f46b8 100644 --- a/rigs/icom/ic910.c +++ b/rigs/icom/ic910.c @@ -236,7 +236,7 @@ struct rig_caps ic910_caps = .dcs_list = NULL, .preamp = { 20, RIG_DBLST_END, }, .attenuator = { 20, RIG_DBLST_END, }, - .max_rit = Hz(0), /* SSB,CW: +-1.0kHz FM: +-5.0kHz */ + .max_rit = Hz(0), /* SSB,CW: +-1.0 kHz FM: +-5.0 kHz */ .max_xit = Hz(0), .max_ifshift = Hz(0), /* 1.2kHz manual knob */ // .targetable_vfo = RIG_TARGETABLE_FREQ, diff --git a/rigs/icom/ic970.c b/rigs/icom/ic970.c index 57ed988b4..26a47cd51 100644 --- a/rigs/icom/ic970.c +++ b/rigs/icom/ic970.c @@ -99,7 +99,7 @@ struct rig_caps ic970_caps = .rx_range_list1 = { {MHz(144), MHz(146), IC970_MODES, -1, -1, IC970_VFO_ALL}, {MHz(430), MHz(440), IC970_MODES, -1, -1, IC970_VFO_ALL}, - /* 1200MHz band module is optional */ + /* 1200 MHz band module is optional */ // {MHz(1240),MHz(1300),IC970_MODES,-1,-1,IC970_VFO_ALL}, RIG_FRNG_END, }, @@ -113,7 +113,7 @@ struct rig_caps ic970_caps = .rx_range_list2 = { {MHz(144), MHz(150), IC970_MODES, -1, -1, IC970_VFO_ALL}, {MHz(430), MHz(450), IC970_MODES, -1, -1, IC970_VFO_ALL}, - /* 1200MHz band module is optional */ + /* 1200 MHz band module is optional */ // {MHz(1240),MHz(1300),IC970_MODES,-1,-1,IC970_VFO_ALL}, RIG_FRNG_END, }, diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index e1a00ea67..995a25a0c 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -1920,7 +1920,7 @@ int icom_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) *freq = from_bcd(freqbuf + freqbuf_offset, freq_len * 2); - // 3-byte freq for ID5100 is in 10000Hz units so convert to Hz + // 3-byte freq for ID5100 is in 10000 Hz units so convert to Hz if (freq_len == 3) { *freq *= 10000; } if (vfo == RIG_VFO_MEM && civ_731_mode_save) { priv->civ_731_mode = 1; } @@ -5665,7 +5665,7 @@ int icom_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t rptr_offs) offs_len = (priv_caps->offs_len) ? priv_caps->offs_len : OFFS_LEN; /* - * Icoms are using a 100Hz unit (at least on 706MKIIg) -- SF + * Icoms are using a 100 Hz unit (at least on 706MKIIg) -- SF */ to_bcd(offsbuf, rptr_offs / 100, offs_len * 2); @@ -5721,7 +5721,7 @@ int icom_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *rptr_offs) } /* - * Icoms are using a 100Hz unit (at least on 706MKIIg) -- SF + * Icoms are using a 100 Hz unit (at least on 706MKIIg) -- SF */ *rptr_offs = from_bcd(offsbuf + 1, buf_len * 2) * 100; diff --git a/rigs/icom/icom_defs.h b/rigs/icom/icom_defs.h index 6313ec2de..129637439 100644 --- a/rigs/icom/icom_defs.h +++ b/rigs/icom/icom_defs.h @@ -134,7 +134,7 @@ #define S_NXDNVN 0x19 /* Set to NXDN_VN */ #define S_NXDN_N 0x20 /* Set to NXDN-N */ #define S_DCR 0x21 /* Set to DCR */ -#define S_DD 0x22 /* Set to DD 1200Mhz only? */ +#define S_DD 0x22 /* Set to DD 1200 MHz only? */ #define S_R7000_SSB 0x05 /* Set to SSB on R-7000 */ diff --git a/rigs/icom/xiegu.c b/rigs/icom/xiegu.c index b31920bbd..31beb8d57 100644 --- a/rigs/icom/xiegu.c +++ b/rigs/icom/xiegu.c @@ -267,7 +267,7 @@ struct rig_caps x108g_caps = .rx_range_list2 = { {kHz(30), MHz(199.999999), X108G_ALL_RX_MODES, -1, -1, X108G_VFOS}, {MHz(400), MHz(470), X108G_ALL_RX_MODES, -1, -1, X108G_VFOS}, RIG_FRNG_END, }, - .tx_range_list2 = { /* needs the 5 mhz channels added */ + .tx_range_list2 = { /* needs the 5 MHz channels added */ FRQ_RNG_HF(2, X108G_OTHER_TX_MODES, W(2), W(100), X108G_VFOS, RIG_ANT_1), FRQ_RNG_6m(2, X108G_OTHER_TX_MODES, W(2), W(100), X108G_VFOS, RIG_ANT_1), FRQ_RNG_2m(2, X108G_OTHER_TX_MODES, W(2), W(50), X108G_VFOS, RIG_ANT_2), @@ -458,7 +458,7 @@ struct rig_caps x6100_caps = .rx_range_list2 = { {kHz(30), MHz(199.999999), X108G_ALL_RX_MODES, -1, -1, X108G_VFOS}, {MHz(400), MHz(470), X108G_ALL_RX_MODES, -1, -1, X108G_VFOS}, RIG_FRNG_END, }, - .tx_range_list2 = { /* needs the 5 mhz channels added */ + .tx_range_list2 = { /* needs the 5 MHz channels added */ FRQ_RNG_HF(2, X108G_OTHER_TX_MODES, W(2), W(100), X108G_VFOS, RIG_ANT_1), FRQ_RNG_6m(2, X108G_OTHER_TX_MODES, W(2), W(100), X108G_VFOS, RIG_ANT_1), FRQ_RNG_2m(2, X108G_OTHER_TX_MODES, W(2), W(50), X108G_VFOS, RIG_ANT_2), @@ -634,7 +634,7 @@ struct rig_caps x6200_caps = .rx_range_list2 = { {kHz(30), MHz(199.999999), X108G_ALL_RX_MODES, -1, -1, X108G_VFOS}, {MHz(400), MHz(470), X108G_ALL_RX_MODES, -1, -1, X108G_VFOS}, RIG_FRNG_END, }, - .tx_range_list2 = { /* needs the 5 mhz channels added */ + .tx_range_list2 = { /* needs the 5 MHz channels added */ FRQ_RNG_HF(2, X108G_OTHER_TX_MODES, W(2), W(100), X108G_VFOS, RIG_ANT_1), FRQ_RNG_6m(2, X108G_OTHER_TX_MODES, W(2), W(100), X108G_VFOS, RIG_ANT_1), FRQ_RNG_2m(2, X108G_OTHER_TX_MODES, W(2), W(50), X108G_VFOS, RIG_ANT_2), @@ -825,7 +825,7 @@ struct rig_caps g90_caps = .rx_range_list2 = { {kHz(30), MHz(199.999999), X108G_ALL_RX_MODES, -1, -1, X108G_VFOS}, {MHz(400), MHz(470), X108G_ALL_RX_MODES, -1, -1, X108G_VFOS}, RIG_FRNG_END, }, - .tx_range_list2 = { /* needs the 5 mhz channels added */ + .tx_range_list2 = { /* needs the 5 MHz channels added */ FRQ_RNG_HF(2, X108G_OTHER_TX_MODES, W(2), W(100), X108G_VFOS, RIG_ANT_1), FRQ_RNG_6m(2, X108G_OTHER_TX_MODES, W(2), W(100), X108G_VFOS, RIG_ANT_1), FRQ_RNG_2m(2, X108G_OTHER_TX_MODES, W(2), W(50), X108G_VFOS, RIG_ANT_2), @@ -1000,7 +1000,7 @@ struct rig_caps x5105_caps = .rx_range_list2 = { {kHz(30), MHz(199.999999), X108G_ALL_RX_MODES, -1, -1, X108G_VFOS}, {MHz(400), MHz(470), X108G_ALL_RX_MODES, -1, -1, X108G_VFOS}, RIG_FRNG_END, }, - .tx_range_list2 = { /* needs the 5 mhz channels added */ + .tx_range_list2 = { /* needs the 5 MHz channels added */ FRQ_RNG_HF(2, X108G_OTHER_TX_MODES, W(2), W(100), X108G_VFOS, RIG_ANT_1), FRQ_RNG_6m(2, X108G_OTHER_TX_MODES, W(2), W(100), X108G_VFOS, RIG_ANT_1), FRQ_RNG_2m(2, X108G_OTHER_TX_MODES, W(2), W(50), X108G_VFOS, RIG_ANT_2), diff --git a/rigs/kachina/kachina.c b/rigs/kachina/kachina.c index 01eac0384..b7abd2b6f 100644 --- a/rigs/kachina/kachina.c +++ b/rigs/kachina/kachina.c @@ -126,7 +126,7 @@ static int kachina_trans_n(RIG *rig, unsigned char cmd1, const char *data, } /* - * convert a frequency in Hz in the range of 30kHz to 30MHz + * convert a frequency in Hz in the range of 30 kHz to 30 MHz * to DDS value, as expected by the Kachina. */ static void freq2dds(freq_t freq, int ant_port, unsigned char fbuf[4]) diff --git a/rigs/kenwood/flex6xxx.c b/rigs/kenwood/flex6xxx.c index f2d117e54..fcb587196 100644 --- a/rigs/kenwood/flex6xxx.c +++ b/rigs/kenwood/flex6xxx.c @@ -547,7 +547,7 @@ static int powersdr_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) case RIG_VFO_A: if ((mode == RIG_MODE_PKTUSB || mode == RIG_MODE_PKTLSB) && width > 3000) { - // 150Hz on the low end should be enough + // 150 Hz on the low end should be enough // Set high to the width requested SNPRINTF(buf, sizeof(buf), "ZZFL00150;ZZFH%05d;", (int)width); } diff --git a/rigs/kenwood/k3.c b/rigs/kenwood/k3.c index 9ef8f03b4..780ff36e3 100644 --- a/rigs/kenwood/k3.c +++ b/rigs/kenwood/k3.c @@ -1245,7 +1245,7 @@ static int k3_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) break; case RIG_MODE_PSK: - mode = RIG_MODE_PSK; // in "DT3" subband RIG_MODE_PSK = USB # kenwood.c mode but may need kenwwod.c mode table review. + mode = RIG_MODE_PSK; // in "DT3" subband RIG_MODE_PSK = USB # kenwood.c mode but may need kenwood.c mode table review. SNPRINTF(cmd_m, sizeof(cmd_m), "%s3", dtcmd); /* PSK D Mode - direct PSK keying, USB is "normal", VFO dial is MARK */ break; @@ -1333,7 +1333,7 @@ static int k3_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) } #endif - width += 9; // rounds to 10Hz + width += 9; // rounds to 10 Hz if (width > 99999) { width = 99999; } diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index 3d67090a7..03cbe0d12 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -726,7 +726,7 @@ transaction_quit: * * Parameters: * cmd Same as kenwood_transaction() cmdstr - * buf Same as kenwwod_transaction() data + * buf Same as kenwood_transaction() data * buf_size Same as kenwood_transaction() datasize * expected Value of expected string length * @@ -1918,7 +1918,7 @@ int kenwood_set_freq(RIG *rig, vfo_t vfo, freq_t freq) if (RIG_OK != err) { RETURNFUNC2(err); } } - // Malchite is so slow we don't do the get_freq + // Malachite is so slow we don't do the get_freq // And when we have detected Doppler operations we just set the freq all the time // This should provide stable timing for set_ptt operation so relay delays are consistent if (!RIG_IS_MALACHITE && STATE(rig)->doppler == 0) @@ -2265,7 +2265,7 @@ int kenwood_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit) { SNPRINTF(buf, sizeof(buf), "R%c", (rit > 0) ? 'U' : 'D'); diff = labs(((curr_rit - rit) + (curr_rit - rit) >= 0 ? 5 : -5) / - 10); // round to nearest 10Hz + 10); // round to nearest 10 Hz rig_debug(RIG_DEBUG_TRACE, "%s: rit=%ld, curr_rit=%ld, diff=%d\n", __func__, rit, curr_rit, diff); rig_debug(RIG_DEBUG_TRACE, "%s: rit change loop=%d\n", __func__, diff); diff --git a/rigs/kenwood/th.c b/rigs/kenwood/th.c index f4fea37dd..91d53b521 100644 --- a/rigs/kenwood/th.c +++ b/rigs/kenwood/th.c @@ -233,7 +233,7 @@ th_set_freq(RIG *rig, vfo_t vfo, freq_t freq) freq_sent = freq625; } - /* Step needs to be at least 10kHz on higher band, otherwise 5 kHz */ + /* Step needs to be at least 10 kHz on higher band, otherwise 5 kHz */ step = freq_sent >= MHz(470) ? 4 : step; freq_sent = freq_sent >= MHz(470) ? (round(freq_sent / 10000) * 10000) : freq_sent; diff --git a/rigs/kenwood/thd72.c b/rigs/kenwood/thd72.c index fb164decf..1abaf28e7 100644 --- a/rigs/kenwood/thd72.c +++ b/rigs/kenwood/thd72.c @@ -63,8 +63,8 @@ static rmode_t thd72_mode_table[3] = static pbwidth_t thd72_width_table[3] = { - [0] = 10000, // +-5KHz - [1] = 5000, // +-2.5KHz + [0] = 10000, // +-5 kHz + [1] = 5000, // +-2.5 kHz [2] = 10000, // what should this be? }; diff --git a/rigs/kenwood/thd74.c b/rigs/kenwood/thd74.c index 5ae158f9f..ab1040a6a 100644 --- a/rigs/kenwood/thd74.c +++ b/rigs/kenwood/thd74.c @@ -64,8 +64,8 @@ static rmode_t thd74_mode_table[10] = static pbwidth_t thd74_width_table[10] = { - [0] = 10000, // +-5KHz - [1] = 5000, // +-2.5KHz + [0] = 10000, // +-5 kHz + [1] = 5000, // +-2.5 kHz [2] = 10000, // FIXME: what should this be? [3] = 10000, // FIXME: what should this be? [4] = 10000, // FIXME: what should this be? diff --git a/rigs/kenwood/thf6a.c b/rigs/kenwood/thf6a.c index c9aa67d45..e299b4505 100644 --- a/rigs/kenwood/thf6a.c +++ b/rigs/kenwood/thf6a.c @@ -209,7 +209,7 @@ struct rig_caps thf6a_caps = .tuning_steps = { /* This table is ordered according to protocol, from '0' to 'b' */ - /* The steps are not available on every band/frequency limit 470MHz */ + /* The steps are not available on every band/frequency limit 470 MHz */ {THF6_ALL_MODES, kHz(5)}, {THF6_ALL_MODES, kHz(6.25)}, {THF6_ALL_MODES, kHz(8.33)}, diff --git a/rigs/kenwood/thf7.c b/rigs/kenwood/thf7.c index 2440e50a5..252bcc159 100644 --- a/rigs/kenwood/thf7.c +++ b/rigs/kenwood/thf7.c @@ -203,7 +203,7 @@ struct rig_caps thf7e_caps = .tuning_steps = { /* This table is ordered according to protocol, from '0' to 'b' */ - /* The steps are not available on every band/frequency limit 470MHz */ + /* The steps are not available on every band/frequency limit 470 MHz */ {THF7_ALL_MODES, kHz(5)}, {THF7_ALL_MODES, kHz(6.25)}, {THF7_ALL_MODES, kHz(8.33)}, diff --git a/rigs/kenwood/tmd710.c b/rigs/kenwood/tmd710.c index ab77a24fc..baadeb82c 100644 --- a/rigs/kenwood/tmd710.c +++ b/rigs/kenwood/tmd710.c @@ -1221,7 +1221,7 @@ int tmd710_do_set_freq(RIG *rig, vfo_t vfo, freq_t freq) freq_sent = freq625; } - /* Step needs to be at least 10kHz on higher band, otherwise 5 kHz */ + /* Step needs to be at least 10 kHz on higher band, otherwise 5 kHz */ fo_struct.step = freq_sent >= MHz(470) ? 4 : step; fo_struct.freq = freq_sent >= MHz(470) ? (round(freq_sent / 10000) * 10000) : freq_sent; @@ -1858,7 +1858,7 @@ int tmd710_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t freq) freq_sent = freq625; } - /* Step needs to be at least 10kHz on higher band, otherwise 5 kHz */ + /* Step needs to be at least 10 kHz on higher band, otherwise 5 kHz */ fo_struct.offset = freq_sent >= MHz(470) ? (round(freq_sent / 10000) * 10000) : freq_sent; diff --git a/rigs/kenwood/ts480.c b/rigs/kenwood/ts480.c index e8e37ad1e..a96a4ab22 100644 --- a/rigs/kenwood/ts480.c +++ b/rigs/kenwood/ts480.c @@ -2368,7 +2368,7 @@ static int malachite_init(RIG *rig) priv = STATE(rig)->priv; - priv->no_id = 1; // the Malchite doesn't like the ID; verify cmd + priv->no_id = 1; // the Malachite doesn't like the ID; verify cmd if (retval != RIG_OK) { RETURNFUNC(retval); } @@ -2447,7 +2447,7 @@ struct rig_caps malachite_caps = .serial_parity = RIG_PARITY_NONE, .serial_handshake = RIG_HANDSHAKE_NONE, .write_delay = 0, - // Malchite needs 125ms unless going from low to high band -- see malachite_set_freq + // Malachite needs 125ms unless going from low to high band -- see malachite_set_freq // Do not change this without checking the 300ms delay in malachite_set_freq .post_write_delay = 250, .timeout = 3000, diff --git a/rigs/kit/elektor507.c b/rigs/kit/elektor507.c index 650326644..fa26b0680 100644 --- a/rigs/kit/elektor507.c +++ b/rigs/kit/elektor507.c @@ -836,7 +836,7 @@ static void find_P_Q_DIV1N(struct elektor507_priv_data *priv, freq_t freq) * P:8..2055, best 16..1023 (because of Pump) For stable operation: - + REF/Qtotal must not fall below 250kHz ( + + REF/Qtotal must not fall below 250 kHz ( + P*(REF/Qtotal) must not be above 400 MHz or below 100 MHz */ #if 1 @@ -885,7 +885,7 @@ static void find_P_Q_DIV1N(struct elektor507_priv_data *priv, freq_t freq) * P:8..2055, best 16..1023 (because of Pump) For stable operation: - + REF/Qtotal must not fall below 250kHz ( + + REF/Qtotal must not fall below 250 kHz ( + P*(REF/Qtotal) must not be above 400 MHz or below 100 MHz */ #if 1 @@ -977,7 +977,7 @@ static void find_P_Q_DIV1N( double newdelta, delta = fabs((priv->P * (Ref / priv->Q) / priv->Div1N) - freq4); - /* For stable operation: Ref/Qtotal must not fall below 250kHz */ + /* For stable operation: Ref/Qtotal must not fall below 250 kHz */ /* Qmax = (int) ( Ref / 250000); */ for (Qtotal = 2; Qtotal <= Qmax; Qtotal++) { diff --git a/rigs/pcr/pcr.c b/rigs/pcr/pcr.c index f0c73f673..656b34cc7 100644 --- a/rigs/pcr/pcr.c +++ b/rigs/pcr/pcr.c @@ -55,7 +55,7 @@ #define MD_P25 '8' /* PCR-2500 Only */ -/* define 2.8kHz, 6kHz, 15kHz, 50kHz, and 230kHz */ +/* define 2.8 kHz, 6 kHz, 15 kHz, 50 kHz, and 230 kHz */ #define FLT_2_8kHz '0' #define FLT_6kHz '1' #define FLT_15kHz '2' @@ -726,7 +726,7 @@ pcr_get_vfo(RIG *rig, vfo_t *vfo) * Assumes rig!=NULL * * K0GMMMKKKHHHmmff00 - * GMMMKKKHHH is frequency GHz.MHz.KHz.Hz + * GMMMKKKHHH is frequency GHz.MHz.kHz.Hz * mm is the mode setting * 00 = LSB * 01 = USB @@ -736,11 +736,11 @@ pcr_get_vfo(RIG *rig, vfo_t *vfo) * 05 = NFM * 06 = WFM * ff is the filter setting - * 00 = 2.8 Khz (CW USB LSB AM) - * 01 = 6.0 Khz (CW USB LSB AM NFM) - * 02 = 15 Khz (AM NFM) - * 03 = 50 Khz (AM NFM WFM) - * 04 = 230 Khz (WFM) + * 00 = 2.8 kHz (CW USB LSB AM) + * 01 = 6.0 kHz (CW USB LSB AM NFM) + * 02 = 15 kHz (AM NFM) + * 03 = 50 kHz (AM NFM WFM) + * 04 = 230 kHz (WFM) * */ diff --git a/rigs/tentec/orion.c b/rigs/tentec/orion.c index d81a00666..c2c30d31f 100644 --- a/rigs/tentec/orion.c +++ b/rigs/tentec/orion.c @@ -312,8 +312,7 @@ static void start_thread(RIG *rig) * \param rig * \brief tt565_open routine * - * Open the rig - check f * This backend supports the Ten-Tec Orion (565) and Orion II (566) transceivers. -irmware version issues + * Open the rig - check firmware version issues */ int tt565_open(RIG *rig) { diff --git a/rigs/tentec/orion.h b/rigs/tentec/orion.h index 3adeea11b..76772a4c2 100644 --- a/rigs/tentec/orion.h +++ b/rigs/tentec/orion.h @@ -335,8 +335,8 @@ RIG_MODEL(RIG_MODEL_TT565), }, /* mode/filter list, remember: order matters! */ .filters = { - /* 9MHz IF filters: 15kHz, 6kHz, 2.4kHz, 1.0kHz */ - /* opt: 1.8kHz, 500Hz, 250Hz */ + /* 9 MHz IF filters: 15 kHz, 6 kHz, 2.4 kHz, 1.0 kHz */ + /* opt: 1.8 kHz, 500 Hz, 250 Hz */ {RIG_MODE_CW|RIG_MODE_CWR|RIG_MODE_SSB|RIG_MODE_RTTY, kHz(2.4)}, {RIG_MODE_CW|RIG_MODE_CWR|RIG_MODE_SSB|RIG_MODE_RTTY, 100}, {RIG_MODE_CW|RIG_MODE_CWR|RIG_MODE_SSB|RIG_MODE_RTTY, kHz(6)}, @@ -525,8 +525,8 @@ RIG_MODEL(RIG_MODEL_TT599), }, /* mode/filter list, remember: order matters! */ .filters = { - /* 15kHz, 6kHz, 2.4kHz, 1.0kHz */ - /* 9MHz IF filters: 2.4K standard */ + /* 15 kHz, 6 kHz, 2.4 kHz, 1.0 kHz */ + /* 9 MHz IF filters: 2.4K standard */ /* optional = 300, 600, 1.8k, 6k, 15k */ {RIG_MODE_CW|RIG_MODE_CWR|RIG_MODE_SSB, kHz(2.4)}, {RIG_MODE_CW|RIG_MODE_CWR|RIG_MODE_SSB, 600}, diff --git a/rigs/tentec/tt550.c b/rigs/tentec/tt550.c index 69a002fc4..4857e189b 100644 --- a/rigs/tentec/tt550.c +++ b/rigs/tentec/tt550.c @@ -379,7 +379,7 @@ tt550_init(RIG *rig) priv->tx_cwbfo = priv->cwbfo = kHz(0.7); priv->agc = 2; /* medium */ priv->lineout = priv->spkvol = 0.0; /* mute */ - priv->stepsize = 100; /* default to 100Hz tuning step */ + priv->stepsize = 100; /* default to 100 Hz tuning step */ return RIG_OK; } @@ -1744,7 +1744,7 @@ tt550_decode_event(RIG *rig) { case KEY_F1_DOWN: - /* F1 changes the Step size from 1hz to 1mhz */ + /* F1 changes the Step size from 1 Hz to 1 MHz */ if (priv->stepsize < 10000) { /* In powers of ten */ diff --git a/rigs/winradio/winradio.c b/rigs/winradio/winradio.c index 9e7c273a1..3c47b77e3 100644 --- a/rigs/winradio/winradio.c +++ b/rigs/winradio/winradio.c @@ -132,9 +132,9 @@ int wr_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) case RMD_FMN: *mode = RIG_MODE_FM; break; /* 15kHz or 17kHz on WR-3100 */ - case RMD_FM6: *mode = RIG_MODE_FM; break; /* 6kHz */ + case RMD_FM6: *mode = RIG_MODE_FM; break; /* 6 kHz */ - case RMD_FMM: *mode = RIG_MODE_FM; break; /* 50kHz */ + case RMD_FMM: *mode = RIG_MODE_FM; break; /* 50 kHz */ case RMD_FMW: *mode = RIG_MODE_WFM; break; diff --git a/rigs/wj/wj.c b/rigs/wj/wj.c index 51ee82520..ace3a5be4 100644 --- a/rigs/wj/wj.c +++ b/rigs/wj/wj.c @@ -159,7 +159,7 @@ static int wj_transaction(RIG *rig, int monitor) buf[5] |= wj_mode & 0x7; /* BFO frequency, not sure though */ - wj_bfo = (priv->ifshift.i / 10) + 0x400; /* LSBit is 10Hz, +455kHz */ + wj_bfo = (priv->ifshift.i / 10) + 0x400; /* LSBit is 10 Hz, +455 kHz */ buf[6] |= (wj_bfo >> 5) & 0x3f; buf[7] |= (wj_bfo & 0x1f) << 2; diff --git a/rigs/yaesu/frg8800.c b/rigs/yaesu/frg8800.c index 4cba501b7..73cde2e48 100644 --- a/rigs/yaesu/frg8800.c +++ b/rigs/yaesu/frg8800.c @@ -185,7 +185,7 @@ int frg8800_set_freq(RIG *rig, vfo_t vfo, freq_t freq) /* store bcd format in cmd (LSB) */ to_bcd(cmd, freq / 10, 8); - /* Byte1: 100Hz's and 25Hz step code */ + /* Byte1: 100 Hz's and 25 Hz step code */ cmd[0] = (cmd[0] & 0xf0) | (1 << ((((long long)freq) % 100) / 25)); /* Frequency set */ diff --git a/rigs/yaesu/ft100.c b/rigs/yaesu/ft100.c index e42aa5605..911ec8b7c 100644 --- a/rigs/yaesu/ft100.c +++ b/rigs/yaesu/ft100.c @@ -603,7 +603,7 @@ int ft100_set_freq(RIG *rig, vfo_t vfo, freq_t freq) memcpy(p_cmd, &ncmd[cmd_index].nseq, YAESU_CMD_LENGTH); - /* fixed 10Hz bug by OH2MMY */ + /* fixed 10 Hz bug by OH2MMY */ freq = (int) freq / 10; to_bcd(p_cmd, freq, 8); /* store bcd format in in p_cmd */ @@ -645,7 +645,7 @@ int ft100_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) priv->status.freq[3]); d1 = strtol(freq_str, NULL, 16); - d2 = (d1 * 1.25); /* fixed 10Hz bug by OH2MMY */ + d2 = (d1 * 1.25); /* fixed 10 Hz bug by OH2MMY */ rig_debug(RIG_DEBUG_VERBOSE, "ft100: d1=%"PRIfreq" d2=%"PRIfreq"\n", d1, d2); diff --git a/rigs/yaesu/ft1000d.c b/rigs/yaesu/ft1000d.c index 3e0b7b072..2677fe98d 100644 --- a/rigs/yaesu/ft1000d.c +++ b/rigs/yaesu/ft1000d.c @@ -184,10 +184,10 @@ static const yaesu_cmd_set_t ncmd[] = { 1, { 0x00, 0x00, 0x00, 0x00, 0x05 } }, /* Select VFO (A) */ { 1, { 0x00, 0x00, 0x00, 0x01, 0x05 } }, /* Select VFO (B) */ { 0, { 0x00, 0x00, 0x00, 0x00, 0x06 } }, /* Copy Memory Data to VFO A */ - { 1, { 0x00, 0x00, 0x00, 0x00, 0x07 } }, /* OP Freq Up 0.1MHz */ - { 1, { 0x00, 0x00, 0x01, 0x00, 0x07 } }, /* OP Freq Up 1MHz */ - { 1, { 0x00, 0x00, 0x00, 0x00, 0x08 } }, /* OP Freq Down 0.1MHz */ - { 1, { 0x00, 0x00, 0x01, 0x00, 0x08 } }, /* OP Freq Down 1MHz */ + { 1, { 0x00, 0x00, 0x00, 0x00, 0x07 } }, /* OP Freq Up 0.1 MHz */ + { 1, { 0x00, 0x00, 0x01, 0x00, 0x07 } }, /* OP Freq Up 1 MHz */ + { 1, { 0x00, 0x00, 0x00, 0x00, 0x08 } }, /* OP Freq Down 0.1 MHz */ + { 1, { 0x00, 0x00, 0x01, 0x00, 0x08 } }, /* OP Freq Down 1 MHz */ { 1, { 0x00, 0x00, 0x00, 0x00, 0x09 } }, /* RX Clarifier (OFF) */ { 1, { 0x00, 0x00, 0x00, 0x01, 0x09 } }, /* RX Clarifier (ON) */ { 1, { 0x00, 0x00, 0x00, 0x80, 0x09 } }, /* TX Clarifier (OFF) */ @@ -197,10 +197,10 @@ static const yaesu_cmd_set_t ncmd[] = { 0, { 0x00, 0x00, 0x00, 0x00, 0x0a } }, /* Set Op Freq */ { 1, { 0x00, 0x00, 0x00, 0x00, 0x0c } }, /* OP Mode Set LSB */ { 1, { 0x00, 0x00, 0x00, 0x01, 0x0c } }, /* OP Mode Set USB */ - { 1, { 0x00, 0x00, 0x00, 0x02, 0x0c } }, /* OP Mode Set CW 2.4KHz */ - { 1, { 0x00, 0x00, 0x00, 0x03, 0x0c } }, /* OP Mode Set CW 500Hz */ - { 1, { 0x00, 0x00, 0x00, 0x04, 0x0c } }, /* OP Mode Set AM 6KHz */ - { 1, { 0x00, 0x00, 0x00, 0x05, 0x0c } }, /* OP Mode Set AM 2.4KHz */ + { 1, { 0x00, 0x00, 0x00, 0x02, 0x0c } }, /* OP Mode Set CW 2.4 kHz */ + { 1, { 0x00, 0x00, 0x00, 0x03, 0x0c } }, /* OP Mode Set CW 500 Hz */ + { 1, { 0x00, 0x00, 0x00, 0x04, 0x0c } }, /* OP Mode Set AM 6 kHz */ + { 1, { 0x00, 0x00, 0x00, 0x05, 0x0c } }, /* OP Mode Set AM 2.4 kHz */ { 1, { 0x00, 0x00, 0x00, 0x06, 0x0c } }, /* OP Mode Set FM */ { 1, { 0x00, 0x00, 0x00, 0x08, 0x0c } }, /* OP Mode Set RTTY LSB */ { 1, { 0x00, 0x00, 0x00, 0x09, 0x0c } }, /* OP Mode Set RTTY USB */ @@ -208,10 +208,10 @@ static const yaesu_cmd_set_t ncmd[] = { 1, { 0x00, 0x00, 0x00, 0x0b, 0x0c } }, /* OP Mode Set PKT FM */ { 1, { 0x00, 0x00, 0x00, 0x80, 0x0c } }, /* Sub VFOB OP Mode Set LSB Added December 2016 */ { 1, { 0x00, 0x00, 0x00, 0x81, 0x0c } }, /* Sub VFOB OP Mode Set USB Added December 2016 */ - { 1, { 0x00, 0x00, 0x00, 0x82, 0x0c } }, /* Sub VFOB OP Mode Set CW 2.4KHz Added December 2016 */ - { 1, { 0x00, 0x00, 0x00, 0x83, 0x0c } }, /* Sub VFOB OP Mode Set CW 500Hz Added December 2016 */ - { 1, { 0x00, 0x00, 0x00, 0x84, 0x0c } }, /* Sub VFOB OP Mode Set AM 6KHz Added December 2016 */ - { 1, { 0x00, 0x00, 0x00, 0x85, 0x0c } }, /* Sub VFOB OP Mode Set AM 2.4KHz Added December 2016 */ + { 1, { 0x00, 0x00, 0x00, 0x82, 0x0c } }, /* Sub VFOB OP Mode Set CW 2.4 kHz Added December 2016 */ + { 1, { 0x00, 0x00, 0x00, 0x83, 0x0c } }, /* Sub VFOB OP Mode Set CW 500 Hz Added December 2016 */ + { 1, { 0x00, 0x00, 0x00, 0x84, 0x0c } }, /* Sub VFOB OP Mode Set AM 6 kHz Added December 2016 */ + { 1, { 0x00, 0x00, 0x00, 0x85, 0x0c } }, /* Sub VFOB OP Mode Set AM 2.4 kHz Added December 2016 */ { 1, { 0x00, 0x00, 0x00, 0x86, 0x0c } }, /* Sub VFOB OP Mode Set FM Added December 2016*/ { 1, { 0x00, 0x00, 0x00, 0x88, 0x0c } }, /* Sub VFOB OP Mode Set RTTY LSB Added December 2016 */ { 1, { 0x00, 0x00, 0x00, 0x89, 0x0c } }, /* Sub VFOB OP Mode Set RTTY USB Added December 2016 */ @@ -2365,7 +2365,7 @@ static int ft1000d_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, rig_strrmode(*mode)); // The FT1000D firmware appears to have a bug since the - // AM bandwidth for 2400Hz and 6000Hz are interchanged. + // AM bandwidth for 2400 Hz and 6000 Hz are interchanged. switch (*fl & (~FT1000D_BW_FMPKTRTTY)) { case FT1000D_BW_F2400: @@ -3130,7 +3130,7 @@ static int ft1000d_get_channel(RIG *rig, vfo_t vfo, channel_t *chan, * Get RX bandwidth selection * * The FT1000D firmware appears to have a bug since the - * AM bandwidth for 2400Hz and 6000Hz are interchanged. + * AM bandwidth for 2400 Hz and 6000 Hz are interchanged. */ switch (p->filter & (~FT1000D_BW_FMPKTRTTY)) { @@ -3305,7 +3305,7 @@ static int ft1000d_get_channel(RIG *rig, vfo_t vfo, channel_t *chan, * Get RX bandwidth selection * * The FT1000D firmware appears to have a bug since the - * AM bandwidth for 2400Hz and 6000Hz are interchanged. + * AM bandwidth for 2400 Hz and 6000 Hz are interchanged. */ switch (p->filter & (~FT1000D_BW_FMPKTRTTY)) { diff --git a/rigs/yaesu/ft1000mp.c b/rigs/yaesu/ft1000mp.c index 5f19b55a7..e34d15666 100644 --- a/rigs/yaesu/ft1000mp.c +++ b/rigs/yaesu/ft1000mp.c @@ -850,7 +850,7 @@ static int ft1000mp_set_freq(RIG *rig, vfo_t vfo, freq_t freq) vfo = STATE(rig)->current_vfo; } - // round freq to 10Hz intervals due to rig restriction + // round freq to 10 Hz intervals due to rig restriction freq = round(freq / 10.0) * 10.0; switch (vfo) @@ -1487,7 +1487,7 @@ static int ft1000mp_set_rxit(RIG *rig, vfo_t vfo, shortfreq_t rit) priv->p_cmd[0] = rit_freq[0]; // 10 hz to_bcd_be(rit_freq, rit / 1000, 2); - priv->p_cmd[1] = rit_freq[0]; // Khz + priv->p_cmd[1] = rit_freq[0]; // kHz priv->p_cmd[2] = direction; diff --git a/rigs/yaesu/ft747.c b/rigs/yaesu/ft747.c index fdb6526f7..e36328c3a 100644 --- a/rigs/yaesu/ft747.c +++ b/rigs/yaesu/ft747.c @@ -205,8 +205,8 @@ static const yaesu_cmd_set_t ft747_ncmd[] = { 1, { 0x00, 0x00, 0x00, 0x00, 0x05 } }, /* select vfo A */ { 1, { 0x00, 0x00, 0x00, 0x01, 0x05 } }, /* select vfo B */ { 0, { 0x00, 0x00, 0x00, 0x00, 0x06 } }, /* memory to vfo*/ - { 1, { 0x00, 0x00, 0x00, 0x00, 0x07 } }, /* up 500 khz */ - { 1, { 0x00, 0x00, 0x00, 0x00, 0x08 } }, /* down 500 khz */ + { 1, { 0x00, 0x00, 0x00, 0x00, 0x07 } }, /* up 500 kHz */ + { 1, { 0x00, 0x00, 0x00, 0x00, 0x08 } }, /* down 500 kHz */ { 1, { 0x00, 0x00, 0x00, 0x00, 0x09 } }, /* clarify off */ { 1, { 0x00, 0x00, 0x00, 0x01, 0x09 } }, /* clarify on */ { 0, { 0x00, 0x00, 0x00, 0x00, 0x0a } }, /* set freq */ diff --git a/rigs/yaesu/ft817.c b/rigs/yaesu/ft817.c index 0ca3a6bd8..4520a9c6c 100644 --- a/rigs/yaesu/ft817.c +++ b/rigs/yaesu/ft817.c @@ -1324,7 +1324,7 @@ static int ft818_817_get_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t *option, eeprom_ant[0] &= 1 << 1; break; - case 0xB: /* FM BCB 76Mhz - 108Mhz, bit 2 */ + case 0xB: /* FM BCB 76 MHz - 108 MHz, bit 2 */ eeprom_ant[0] &= 1 << 2; break; diff --git a/rigs/yaesu/ft847.c b/rigs/yaesu/ft847.c index a166070d3..ed57a0682 100644 --- a/rigs/yaesu/ft847.c +++ b/rigs/yaesu/ft847.c @@ -37,7 +37,7 @@ * Notes on limitations in RIG control capabilities. These are * related to the Yaesu's FT847 design, not my program :-) * - * 1. Rig opcodes allow only 10Hz resolution. + * 1. Rig opcodes allow only 10 Hz resolution. * 2. Cannot select VFO B * 3. Using CAT and Tuner controls simultaneously can * cause problems. @@ -1285,7 +1285,7 @@ static int get_freq_and_mode(RIG *rig, vfo_t vfo, freq_t *freq, rmode_t *mode, return n < 0 ? n : -RIG_EPROTO; } - /* Remember, this is 10Hz resolution */ + /* Remember, this is 10 Hz resolution */ *freq = 10 * from_bcd_be(data, 8); *width = RIG_PASSBAND_NORMAL; diff --git a/rigs/yaesu/ft891.c b/rigs/yaesu/ft891.c index 63449314c..9597f667a 100644 --- a/rigs/yaesu/ft891.c +++ b/rigs/yaesu/ft891.c @@ -455,7 +455,7 @@ static int ft891_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, } // Get split mode status - *split = priv->ret_data[2] != '0'; // 1=split, 2=split + 5khz + *split = priv->ret_data[2] != '0'; // 1=split, 2=split + 5kHz rig_debug(RIG_DEBUG_TRACE, "%s: get split = 0x%02x\n", __func__, *split); *tx_vfo = RIG_VFO_A; diff --git a/rigs/yaesu/ft950.c b/rigs/yaesu/ft950.c index ec7cf7bf4..dce1410ce 100644 --- a/rigs/yaesu/ft950.c +++ b/rigs/yaesu/ft950.c @@ -147,7 +147,7 @@ struct rig_caps ft950_caps = { 100, 117, RIG_MTYPE_EDGE, NEWCAT_MEM_CAP }, /* two by two */ { 125, 128, RIG_MTYPE_BAND, NEWCAT_MEM_CAP }, /* 60M Channels U51-U54 or US1-US4, if available */ { 130, 130, RIG_MTYPE_BAND, NEWCAT_MEM_CAP }, /* 60M Channel U55 or US5, if available */ - { 131, 131, RIG_MTYPE_BAND, NEWCAT_MEM_CAP }, /* EU5, 5167.5 KHz Alaska Emergency Freq, if available */ + { 131, 131, RIG_MTYPE_BAND, NEWCAT_MEM_CAP }, /* EU5, 5167.5 kHz Alaska Emergency Freq, if available */ { 1, 5, RIG_MTYPE_MORSE }, RIG_CHAN_END, }, diff --git a/rigs/yaesu/ft990.c b/rigs/yaesu/ft990.c index 0d5ff078b..5de58d7d9 100755 --- a/rigs/yaesu/ft990.c +++ b/rigs/yaesu/ft990.c @@ -160,10 +160,10 @@ static const yaesu_cmd_set_t ncmd[] = { 1, { 0x00, 0x00, 0x00, 0x00, 0x05 } }, /* Select VFO (A) */ { 1, { 0x00, 0x00, 0x00, 0x01, 0x05 } }, /* Select VFO (B) */ { 0, { 0x00, 0x00, 0x00, 0x00, 0x06 } }, /* Copy Memory Data to VFO A */ - { 1, { 0x00, 0x00, 0x00, 0x00, 0x07 } }, /* OP Freq Up 0.1MHz */ - { 1, { 0x00, 0x00, 0x01, 0x00, 0x07 } }, /* OP Freq Up 1MHz */ - { 1, { 0x00, 0x00, 0x00, 0x00, 0x08 } }, /* OP Freq Down 0.1MHz */ - { 1, { 0x00, 0x00, 0x01, 0x00, 0x08 } }, /* OP Freq Down 1MHz */ + { 1, { 0x00, 0x00, 0x00, 0x00, 0x07 } }, /* OP Freq Up 0.1 MHz */ + { 1, { 0x00, 0x00, 0x01, 0x00, 0x07 } }, /* OP Freq Up 1 MHz */ + { 1, { 0x00, 0x00, 0x00, 0x00, 0x08 } }, /* OP Freq Down 0.1 MHz */ + { 1, { 0x00, 0x00, 0x01, 0x00, 0x08 } }, /* OP Freq Down 1 MHz */ { 1, { 0x00, 0x00, 0x00, 0x00, 0x09 } }, /* RX Clarifier (OFF) */ { 1, { 0x00, 0x00, 0x00, 0x01, 0x09 } }, /* RX Clarifier (ON) */ { 1, { 0x00, 0x00, 0x00, 0x80, 0x09 } }, /* TX Clarifier (OFF) */ @@ -173,10 +173,10 @@ static const yaesu_cmd_set_t ncmd[] = { 0, { 0x00, 0x00, 0x00, 0x00, 0x0a } }, /* Set Op Freq */ { 1, { 0x00, 0x00, 0x00, 0x00, 0x0c } }, /* OP Mode Set LSB */ { 1, { 0x00, 0x00, 0x00, 0x01, 0x0c } }, /* OP Mode Set USB */ - { 1, { 0x00, 0x00, 0x00, 0x02, 0x0c } }, /* OP Mode Set CW 2.4KHz */ - { 1, { 0x00, 0x00, 0x00, 0x03, 0x0c } }, /* OP Mode Set CW 500Hz */ - { 1, { 0x00, 0x00, 0x00, 0x04, 0x0c } }, /* OP Mode Set AM 6KHz */ - { 1, { 0x00, 0x00, 0x00, 0x05, 0x0c } }, /* OP Mode Set AM 2.4KHz */ + { 1, { 0x00, 0x00, 0x00, 0x02, 0x0c } }, /* OP Mode Set CW 2.4 kHz */ + { 1, { 0x00, 0x00, 0x00, 0x03, 0x0c } }, /* OP Mode Set CW 500 Hz */ + { 1, { 0x00, 0x00, 0x00, 0x04, 0x0c } }, /* OP Mode Set AM 6 kHz */ + { 1, { 0x00, 0x00, 0x00, 0x05, 0x0c } }, /* OP Mode Set AM 2.4 kHz */ { 1, { 0x00, 0x00, 0x00, 0x06, 0x0c } }, /* OP Mode Set FM */ { 1, { 0x00, 0x00, 0x00, 0x08, 0x0c } }, /* OP Mode Set RTTY LSB */ { 1, { 0x00, 0x00, 0x00, 0x09, 0x0c } }, /* OP Mode Set RTTY USB */ @@ -2155,7 +2155,7 @@ int ft990_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) rig_strrmode(*mode)); // The FT990 firmware appears to have a bug since the - // AM bandwidth for 2400Hz and 6000Hz are interchanged. + // AM bandwidth for 2400 Hz and 6000 Hz are interchanged. switch (*fl & (~FT990_BW_FMPKTRTTY)) { case FT990_BW_F2400: @@ -2909,7 +2909,7 @@ int ft990_get_channel(RIG *rig, vfo_t vfo, channel_t *chan, int read_only) * Get RX bandwidth selection * * The FT990 firmware appears to have a bug since the - * AM bandwidth for 2400Hz and 6000Hz are interchanged. + * AM bandwidth for 2400 Hz and 6000 Hz are interchanged. */ switch (p->filter & (~FT990_BW_FMPKTRTTY)) { @@ -3084,7 +3084,7 @@ int ft990_get_channel(RIG *rig, vfo_t vfo, channel_t *chan, int read_only) * Get RX bandwidth selection * * The FT990 firmware appears to have a bug since the - * AM bandwidth for 2400Hz and 6000Hz are interchanged. + * AM bandwidth for 2400 Hz and 6000 Hz are interchanged. */ switch (p->filter & (~FT990_BW_FMPKTRTTY)) { diff --git a/rigs/yaesu/ft990v12.c b/rigs/yaesu/ft990v12.c index 8e7a50552..3208cc7bd 100644 --- a/rigs/yaesu/ft990v12.c +++ b/rigs/yaesu/ft990v12.c @@ -175,10 +175,10 @@ static const yaesu_cmd_set_t ncmd[] = { 1, { 0x00, 0x00, 0x00, 0x00, 0x05 } }, /* 06 06 Select VFO (A) */ { 1, { 0x00, 0x00, 0x00, 0x01, 0x05 } }, /* 07 07 Select VFO (B) */ { 0, { 0x00, 0x00, 0x00, 0x00, 0x06 } }, /* 08 08 Copy Memory Data to VFO A */ - { 1, { 0x00, 0x00, 0x00, 0x00, 0x07 } }, /* 09 09 OP Freq Up 0.1MHz */ - { 1, { 0x00, 0x00, 0x01, 0x00, 0x07 } }, /* 10 0a OP Freq Up 1MHz */ - { 1, { 0x00, 0x00, 0x00, 0x00, 0x08 } }, /* 11 0b OP Freq Down 0.1MHz */ - { 1, { 0x00, 0x00, 0x01, 0x00, 0x08 } }, /* 12 0c OP Freq Down 1MHz */ + { 1, { 0x00, 0x00, 0x00, 0x00, 0x07 } }, /* 09 09 OP Freq Up 0.1 MHz */ + { 1, { 0x00, 0x00, 0x01, 0x00, 0x07 } }, /* 10 0a OP Freq Up 1 MHz */ + { 1, { 0x00, 0x00, 0x00, 0x00, 0x08 } }, /* 11 0b OP Freq Down 0.1 MHz */ + { 1, { 0x00, 0x00, 0x01, 0x00, 0x08 } }, /* 12 0c OP Freq Down 1 MHz */ { 1, { 0x00, 0x00, 0x00, 0x00, 0x09 } }, /* 13 0d RX Clarifier (OFF) */ { 1, { 0x00, 0x00, 0x00, 0x01, 0x09 } }, /* 14 0e RX Clarifier (ON) */ { 1, { 0x00, 0x00, 0x00, 0x80, 0x09 } }, /* 15 0f TX Clarifier (OFF) */ @@ -188,10 +188,10 @@ static const yaesu_cmd_set_t ncmd[] = { 0, { 0x00, 0x00, 0x00, 0x00, 0x0a } }, /* 19 13 Set Op Freq */ { 1, { 0x00, 0x00, 0x00, 0x00, 0x0c } }, /* 20 14 OP Mode Set LSB */ { 1, { 0x00, 0x00, 0x00, 0x01, 0x0c } }, /* 21 15 OP Mode Set USB */ - { 1, { 0x00, 0x00, 0x00, 0x02, 0x0c } }, /* 22 16 OP Mode Set CW 2.4KHz */ - { 1, { 0x00, 0x00, 0x00, 0x03, 0x0c } }, /* 23 17 OP Mode Set CW 500Hz */ - { 1, { 0x00, 0x00, 0x00, 0x04, 0x0c } }, /* 24 18 OP Mode Set AM 6KHz */ - { 1, { 0x00, 0x00, 0x00, 0x05, 0x0c } }, /* 25 19 OP Mode Set AM 2.4KHz */ + { 1, { 0x00, 0x00, 0x00, 0x02, 0x0c } }, /* 22 16 OP Mode Set CW 2.4 kHz */ + { 1, { 0x00, 0x00, 0x00, 0x03, 0x0c } }, /* 23 17 OP Mode Set CW 500 Hz */ + { 1, { 0x00, 0x00, 0x00, 0x04, 0x0c } }, /* 24 18 OP Mode Set AM 6 kHz */ + { 1, { 0x00, 0x00, 0x00, 0x05, 0x0c } }, /* 25 19 OP Mode Set AM 2.4 kHz */ { 1, { 0x00, 0x00, 0x00, 0x06, 0x0c } }, /* 26 1a OP Mode Set FM */ { 1, { 0x00, 0x00, 0x00, 0x08, 0x0c } }, /* 27 1b OP Mode Set RTTY LSB */ { 1, { 0x00, 0x00, 0x00, 0x09, 0x0c } }, /* 28 1c OP Mode Set RTTY USB */ @@ -2188,7 +2188,7 @@ int ft990v12_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) rig_strrmode(*mode)); // The FT990 firmware appears to have a bug since the - // AM bandwidth for 2400Hz and 6000Hz are interchanged. + // AM bandwidth for 2400 Hz and 6000 Hz are interchanged. switch (*fl & (~FT990_BW_FMPKTRTTY)) { case FT990_BW_F2400: @@ -2942,7 +2942,7 @@ int ft990v12_get_channel(RIG *rig, vfo_t vfo, channel_t *chan, int read_only) * Get RX bandwidth selection * * The FT990 firmware appears to have a bug since the - * AM bandwidth for 2400Hz and 6000Hz are interchanged. + * AM bandwidth for 2400 Hz and 6000 Hz are interchanged. */ switch (p->filter & (~FT990_BW_FMPKTRTTY)) { @@ -3118,7 +3118,7 @@ int ft990v12_get_channel(RIG *rig, vfo_t vfo, channel_t *chan, int read_only) * Get RX bandwidth selection * * The FT990 firmware appears to have a bug since the - * AM bandwidth for 2400Hz and 6000Hz are interchanged. + * AM bandwidth for 2400 Hz and 6000 Hz are interchanged. */ switch (p->filter & (~FT990_BW_FMPKTRTTY)) { diff --git a/rigs/yaesu/ft991.c b/rigs/yaesu/ft991.c index 6417d523e..e87c933bf 100644 --- a/rigs/yaesu/ft991.c +++ b/rigs/yaesu/ft991.c @@ -6,7 +6,7 @@ * (C) Terry Embry 2008-2009 * (C) Michael Black W9MDB 2015 -- taken from ft950.c * - * The FT991 is very much like the FT950 except freq max increases for 440MHz + * The FT991 is very much like the FT950 except freq max increases for 440 MHz * So most of this code is a duplicate of the FT950 * * This shared library provides an API for communicating @@ -241,7 +241,7 @@ struct rig_caps ft991_caps = .chan_list = { { 1, 99, RIG_MTYPE_MEM, NEWCAT_MEM_CAP }, { 100, 117, RIG_MTYPE_MEM, NEWCAT_MEM_CAP }, // P1L-P9U PMS channels - { 118, 127, RIG_MTYPE_MEM, NEWCAT_MEM_CAP }, // 5xx 5MHz band + { 118, 127, RIG_MTYPE_MEM, NEWCAT_MEM_CAP }, // 5xx 5 MHz band { 1, 5, RIG_MTYPE_VOICE }, { 1, 5, RIG_MTYPE_MORSE }, RIG_CHAN_END, diff --git a/rigs/yaesu/ftdx101.c b/rigs/yaesu/ftdx101.c index 1ae7918c6..81f00b89a 100644 --- a/rigs/yaesu/ftdx101.c +++ b/rigs/yaesu/ftdx101.c @@ -244,7 +244,7 @@ struct rig_caps ftdx101d_caps = .chan_list = { { 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 5MHz band + { 501, 510, RIG_MTYPE_MEM, NEWCAT_MEM_CAP }, // 5xx 5 MHz band { 1, 5, RIG_MTYPE_MORSE }, RIG_CHAN_END, }, diff --git a/rigs/yaesu/ftdx101mp.c b/rigs/yaesu/ftdx101mp.c index 4ceafd0d9..d0fd514af 100644 --- a/rigs/yaesu/ftdx101... [truncated message content] |
From: n0nb <n0...@us...> - 2025-08-04 12:36:56
|
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 8ccc197b7c01efdb0b22774d0b2210b6bec28e92 (commit) via 182597ebc46c1d99eefe08ba3682c8538a18d133 (commit) via 0d079d2338c53d4b48bd8db5592749f28d9069c6 (commit) via 971ab5e1264aef5dd0a900ab02639ffcdb66a7f5 (commit) via bb070edfa3e68eb08a928266fc85a90673057b5f (commit) from 989623ec511e6f428aa8998e88df3f69f9e11d79 (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 8ccc197b7c01efdb0b22774d0b2210b6bec28e92 Author: jeremybox <gi...@je...> Date: Sun Aug 3 20:52:29 2025 -0400 ftx1: implement tuning step functionality and cleanup - Add ftx1_get_ts() and ftx1_set_ts() functions using EX0306 commands - Support mode-specific tuning step values: * SSB/CW & RTTY/PSK: 5Hz, 10Hz, 20Hz * FM: 5kHz, 6.25kHz, 10kHz, 12.5kHz, 20kHz, 25kHz, Auto - Remove unused functions: ftx1_handle_cat_error, ftx1_get_split, ftx1_set_split - Remove unused variable in ftx1_set_freq - Update header file to remove unused function declarations - Fix format specifiers (%d -> %ld) for shortfreq_t type Tested with real FTX-1 hardware using rigctl commands. Tuning step functionality verified in LSB mode with 20Hz step. diff --git a/rigs/yaesu/ftx1.c b/rigs/yaesu/ftx1.c index 39636b83b..8486dc17f 100644 --- a/rigs/yaesu/ftx1.c +++ b/rigs/yaesu/ftx1.c @@ -631,7 +631,7 @@ static void debug_ftx1info_data(const ftx1info *rdata) * VFO B mode directly so we'll just set A and swap A * into B but we must preserve the VFO A mode and VFO B * frequency. - * + * [TODO] This is inaccurate and based on copying the FT991A code to build this. Remove the above and implement it correctly. */ static int ftx1_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, @@ -1364,17 +1364,171 @@ static int ftx1_set_xit(RIG *rig, vfo_t vfo, shortfreq_t xit) /* Tuning step functions */ static int ftx1_get_ts(RIG *rig, vfo_t vfo, shortfreq_t *ts) { - // FTX-1 doesn't have a direct tuning step query command - // Return a default value - *ts = 100; + struct newcat_priv_data *priv = (struct newcat_priv_data *)STATE(rig)->priv; + int err; + char response[32]; + + rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + + if (!rig || !ts) + { + return -RIG_EINVAL; + } + + // Get current mode to determine which tuning step setting to query + rmode_t mode; + pbwidth_t width; + if (RIG_OK != (err = rig_get_mode(rig, vfo, &mode, &width))) + { + return err; + } + + // Determine which tuning step setting to query based on mode + int setting_num; + if (mode == RIG_MODE_FM || mode == RIG_MODE_FMN) + { + setting_num = 3; // FM DIAL STEP + } + else if (mode == RIG_MODE_RTTY || mode == RIG_MODE_RTTYR || + mode == RIG_MODE_PKTLSB || mode == RIG_MODE_PKTUSB) + { + setting_num = 2; // RTTY/PSK DIAL STEP + } + else + { + setting_num = 1; // SSB/CW DIAL STEP + } + + // Send EX0306[setting_num]; to query current tuning step + // The radio returns the current value in the response + SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "EX0306%02d;", setting_num); + + if (RIG_OK != (err = newcat_get_cmd(rig))) + { + return err; + } + + // Parse response like "EX0306012;" or "EX0306021;" or "EX0306033;" + strncpy(response, priv->ret_data, sizeof(response) - 1); + response[sizeof(response) - 1] = '\0'; + + if (strlen(response) >= 9 && strncmp(response, "EX0306", 6) == 0) + { + // Extract the step value from the response (last digit before semicolon) + char step_str[2]; + int len = strlen(response); + if (len >= 9) { + step_str[0] = response[len - 2]; // Get the digit before semicolon + step_str[1] = '\0'; + } else { + step_str[0] = '1'; // Default to 1 (10Hz) + step_str[1] = '\0'; + } + + int step_value = atoi(step_str); + + // Convert step value to frequency based on mode + if (mode == RIG_MODE_FM || mode == RIG_MODE_FMN) + { + // FM DIAL STEP values: 0:5kHz, 1:6.25kHz, 2:10kHz, 3:12.5kHz, 4:20kHz, 5:25kHz, 6:Auto + switch (step_value) { + case 0: *ts = 5000; break; + case 1: *ts = 6250; break; + case 2: *ts = 10000; break; + case 3: *ts = 12500; break; + case 4: *ts = 20000; break; + case 5: *ts = 25000; break; + case 6: *ts = 0; break; // Auto - return 0 to indicate auto mode + default: *ts = 10000; break; + } + } + else if (mode == RIG_MODE_RTTY || mode == RIG_MODE_RTTYR || + mode == RIG_MODE_PKTLSB || mode == RIG_MODE_PKTUSB) + { + // RTTY/PSK DIAL STEP values: 0:5Hz, 1:10Hz, 2:20Hz + switch (step_value) { + case 0: *ts = 5; break; + case 1: *ts = 10; break; + case 2: *ts = 20; break; + default: *ts = 10; break; + } + } + else + { + // SSB/CW DIAL STEP values: 0:5Hz, 1:10Hz, 2:20Hz + switch (step_value) { + case 0: *ts = 5; break; + case 1: *ts = 10; break; + case 2: *ts = 20; break; + default: *ts = 10; break; + } + } + + rig_debug(RIG_DEBUG_TRACE, "%s: response=%s, setting=%d, step_value=%d, ts=%ld\n", + __func__, response, setting_num, step_value, *ts); + + return RIG_OK; + } + + // If parsing failed, return default + *ts = 10; return RIG_OK; } static int ftx1_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts) { - // FTX-1 doesn't have a direct tuning step set command - // This would need to be implemented via mode-specific commands - return -RIG_ENIMPL; + struct newcat_priv_data *priv = (struct newcat_priv_data *)STATE(rig)->priv; + int step_value, setting_num; + rmode_t mode; + pbwidth_t width; + int err; + + rig_debug(RIG_DEBUG_VERBOSE, "%s called with ts=%ld\n", __func__, ts); + + // Get current mode to determine which tuning step setting to modify + if (RIG_OK != (err = rig_get_mode(rig, vfo, &mode, &width))) + { + return err; + } + + // Determine which tuning step setting to modify based on mode + if (mode == RIG_MODE_FM || mode == RIG_MODE_FMN) + { + setting_num = 3; // FM DIAL STEP + // Convert frequency to FM step value: 0:5kHz, 1:6.25kHz, 2:10kHz, 3:12.5kHz, 4:20kHz, 5:25kHz, 6:Auto + if (ts == 0) step_value = 6; // Auto mode + else if (ts <= 5000) step_value = 0; + else if (ts <= 6250) step_value = 1; + else if (ts <= 10000) step_value = 2; + else if (ts <= 12500) step_value = 3; + else if (ts <= 20000) step_value = 4; + else step_value = 5; + } + else if (mode == RIG_MODE_RTTY || mode == RIG_MODE_RTTYR || + mode == RIG_MODE_PKTLSB || mode == RIG_MODE_PKTUSB) + { + setting_num = 2; // RTTY/PSK DIAL STEP + // Convert frequency to RTTY step value: 0:5Hz, 1:10Hz, 2:20Hz + if (ts <= 5) step_value = 0; + else if (ts <= 10) step_value = 1; + else step_value = 2; + } + else + { + setting_num = 1; // SSB/CW DIAL STEP + // Convert frequency to SSB/CW step value: 0:5Hz, 1:10Hz, 2:20Hz + if (ts <= 5) step_value = 0; + else if (ts <= 10) step_value = 1; + else step_value = 2; + } + + // Format: EX0306[setting_num][step_value]; + SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "EX0306%02d%d;", setting_num, step_value); + + rig_debug(RIG_DEBUG_TRACE, "%s: cmd_str = %s (setting=%d, step_value=%d)\n", + __func__, priv->cmd_str, setting_num, step_value); + + return newcat_set_cmd(rig); } /* diff --git a/rigs/yaesu/ftx1.h b/rigs/yaesu/ftx1.h index d6f96ef43..63251bd74 100644 --- a/rigs/yaesu/ftx1.h +++ b/rigs/yaesu/ftx1.h @@ -164,12 +164,12 @@ /* Delay between bytes sent to FTX-1 * Should not exceed value set in CAT TOT menu (rig default is 10 mSec) */ -#define FTX1_WRITE_DELAY 0 +#define FTX1_WRITE_DELAY 5 /* Delay sequential fast writes */ -#define FTX1_POST_WRITE_DELAY 2 +#define FTX1_POST_WRITE_DELAY 5 typedef struct { diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 31ce67d01..2a0ae172e 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -249,7 +249,7 @@ static ncboolean is_ftdx9000Old; static const yaesu_newcat_commands_t valid_commands[] = { /* Command FT-450 FT-950 FT-891 FT-991 FT-2000 FT-9000 FT-5000 FT-1200 FT-3000 FTDX101D FTDX10 FTDX101MP FT710 FTX1 FT9000Old*/ - {"AB", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE }, + {"AB", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"AC", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"AG", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"AI", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, @@ -324,8 +324,8 @@ static const yaesu_newcat_commands_t valid_commands[] = {"PL", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"PR", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"PS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"QI", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE }, - {"QR", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE }, + {"QI", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"QR", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"QS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"RA", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"RC", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, diff --git a/rigs/yaesu/yaesu.c b/rigs/yaesu/yaesu.c index db9916d2b..d01b95c3c 100644 --- a/rigs/yaesu/yaesu.c +++ b/rigs/yaesu/yaesu.c @@ -2,7 +2,7 @@ * hamlib - (C) Frank Singleton 2000 (vk...@ix...) * * yaesu.c - (C) Stephane Fillod 2001-2010 - * (C) Jeremy Miller KO4SSD 2025 (ko4ssd at ko4ssd.com) + * (C) Jeremy Miller KO4SSD 2025 (ko4ssd at ko4ssd.com) * * This shared library provides an API for communicating * via serial interface to a Yaesu rig commit 182597ebc46c1d99eefe08ba3682c8538a18d133 Author: jeremybox <gi...@je...> Date: Sun Aug 3 18:20:06 2025 -0400 Clean up unused functions in FTX-1 driver - Remove unused ftx1_handle_cat_error function - Remove unused ftx1_get_split and ftx1_set_split functions - Remove unused variable 'err' in ftx1_set_freq - Remove corresponding function declarations from ftx1.h - Eliminates all compiler warnings for clean build diff --git a/rigs/yaesu/ftx1.c b/rigs/yaesu/ftx1.c index f65e27a9b..39636b83b 100644 --- a/rigs/yaesu/ftx1.c +++ b/rigs/yaesu/ftx1.c @@ -1218,17 +1218,7 @@ static int ftx1_get_vfo(RIG *rig, vfo_t *vfo) RETURNFUNC2(RIG_OK); } -/* Error handling function */ -static int ftx1_handle_cat_error(RIG *rig, const char *response) -{ - if (strstr(response, "?;")) { - return -RIG_EPROTO; // Protocol error - } - if (strstr(response, "N;")) { - return -RIG_ERJCTED; // Command rejected - } - return RIG_OK; -} + @@ -1369,46 +1359,7 @@ static int ftx1_set_xit(RIG *rig, vfo_t vfo, shortfreq_t xit) return RIG_OK; } -/* Split functions */ -static int ftx1_get_split(RIG *rig, vfo_t vfo, split_t *split) -{ - int err; - split_t is_split; - - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); - - if (!rig || !split) - { - return -RIG_EINVAL; - } - - err = ftx1_get_tx_split(rig, &is_split); - if (err != RIG_OK) - { - return err; - } - - *split = is_split; - return RIG_OK; -} - -static int ftx1_set_split(RIG *rig, vfo_t vfo, split_t split) -{ - int err; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); - - if (split == RIG_SPLIT_ON) - { - err = newcat_set_tx_vfo(rig, RIG_VFO_B); - } - else - { - err = newcat_set_tx_vfo(rig, RIG_VFO_A); - } - - return err; -} /* Tuning step functions */ static int ftx1_get_ts(RIG *rig, vfo_t vfo, shortfreq_t *ts) @@ -1533,7 +1484,6 @@ int ftx1_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { struct newcat_priv_data *priv = (struct newcat_priv_data *)STATE(rig)->priv; char c; - int err; ENTERFUNC; diff --git a/rigs/yaesu/ftx1.h b/rigs/yaesu/ftx1.h index efbfa37dd..d6f96ef43 100644 --- a/rigs/yaesu/ftx1.h +++ b/rigs/yaesu/ftx1.h @@ -197,11 +197,8 @@ static int ftx1_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit); static int ftx1_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit); static int ftx1_get_xit(RIG *rig, vfo_t vfo, shortfreq_t *xit); static int ftx1_set_xit(RIG *rig, vfo_t vfo, shortfreq_t xit); -static int ftx1_get_split(RIG *rig, vfo_t vfo, split_t *split); -static int ftx1_set_split(RIG *rig, vfo_t vfo, split_t split); static int ftx1_get_ts(RIG *rig, vfo_t vfo, shortfreq_t *ts); static int ftx1_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts); -static int ftx1_handle_cat_error(RIG *rig, const char *response); /* FTX-1 specific power control function */ int ftx1_set_power_control(RIG *rig, vfo_t vfo, setting_t level, value_t val); commit 0d079d2338c53d4b48bd8db5592749f28d9069c6 Author: jeremybox <gi...@je...> Date: Sat Aug 2 22:18:36 2025 -0400 Restore tests/Makefile.am to match master branch exactly diff --git a/tests/Makefile.am b/tests/Makefile.am index 44117eb1c..c120165ff 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -39,8 +39,6 @@ if HAVE_LIBUSB rigtestlibusb_SOURCES = rigtestlibusb.c endif - - # include generated include files ahead of any in sources rigctl_CPPFLAGS = -I$(top_builddir)/tests -I$(top_builddir)/src -I$(srcdir) -I$(top_builddir)/security $(AM_CPPFLAGS) commit 971ab5e1264aef5dd0a900ab02639ffcdb66a7f5 Author: jeremybox <gi...@je...> Date: Sat Aug 2 22:12:46 2025 -0400 Remove test_ftx1 from Makefile to fix build issues - Removed test_ftx1 from check_PROGRAMS list - Removed test_ftx1_SOURCES definition - This prevents build failures on systems without the test file diff --git a/tests/Makefile.am b/tests/Makefile.am index 141c2cab4..44117eb1c 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -17,7 +17,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 testsecurity -check_PROGRAMS = dumpmem testrig testrigopen testrigcaps testtrn testbcd testfreq listrigs testloc rig_bench testcache cachetest cachetest2 testcookie testgrid hamlibmodels testmW2power test2038 test_ftx1 +check_PROGRAMS = dumpmem testrig testrigopen testrigcaps testtrn testbcd testfreq listrigs testloc rig_bench testcache cachetest cachetest2 testcookie testgrid hamlibmodels testmW2power test2038 RIGCOMMONSRC = rigctl_parse.c rigctl_parse.h dumpcaps.c dumpstate.c uthash.h rig_tests.c rig_tests.h dumpcaps.h ROTCOMMONSRC = rotctl_parse.c rotctl_parse.h dumpcaps_rot.c uthash.h dumpcaps_rot.h @@ -39,7 +39,7 @@ if HAVE_LIBUSB rigtestlibusb_SOURCES = rigtestlibusb.c endif -test_ftx1_SOURCES = test_ftx1.c + # include generated include files ahead of any in sources rigctl_CPPFLAGS = -I$(top_builddir)/tests -I$(top_builddir)/src -I$(srcdir) -I$(top_builddir)/security $(AM_CPPFLAGS) commit bb070edfa3e68eb08a928266fc85a90673057b5f Author: jeremybox <gi...@je...> Date: Sat Aug 2 22:02:05 2025 -0400 Enhanced FTX-1 support with comprehensive improvements diff --git a/rigs/yaesu/ftx1.c b/rigs/yaesu/ftx1.c index db87a3989..f65e27a9b 100644 --- a/rigs/yaesu/ftx1.c +++ b/rigs/yaesu/ftx1.c @@ -35,6 +35,8 @@ #include "yaesu.h" #include "ftx1.h" +static const char cat_term = ';'; /* Yaesu command terminator */ + /* Prototypes */ static int ftx1_init(RIG *rig); static int ftx1_set_vfo(RIG *rig, vfo_t vfo); @@ -55,6 +57,11 @@ static int ftx1_get_ctcss_sql(RIG *rig, vfo_t vfo, tone_t *tone); static int ftx1_get_dcs_sql(RIG *rig, vfo_t vfo, tone_t *code); static int ftx1_set_dcs_sql(RIG *rig, vfo_t vfo, tone_t code); +/* Configuration parameters */ +const struct confparams ftx1_cfg_params[] = { + { RIG_CONF_END, NULL, } +}; + const struct confparams ftx1_ext_levels[] = { { @@ -154,6 +161,7 @@ const struct confparams ftx1_ext_levels[] = RIG_CONF_NUMERIC, { .n = { .min = 5, .max = 50, .step = 1 } }, }, + { RIG_CONF_END, NULL, } }; @@ -278,70 +286,71 @@ struct rig_caps ftx1_caps = /* mode/filter list, .remember = order matters! */ .filters = { - {FTX1_RTTY_DATA_RX_MODES, Hz(500)}, /* Normal RTTY, DATA */ - {FTX1_RTTY_DATA_RX_MODES, Hz(300)}, /* Narrow RTTY, DATA */ - {FTX1_RTTY_DATA_RX_MODES, Hz(3000)}, /* Wide RTTY, DATA */ - {FTX1_RTTY_DATA_RX_MODES, Hz(2400)}, /* RTTY, DATA */ - {FTX1_RTTY_DATA_RX_MODES, Hz(2000)}, /* RTTY, DATA */ - {FTX1_RTTY_DATA_RX_MODES, Hz(1700)}, /* RTTY, DATA */ - {FTX1_RTTY_DATA_RX_MODES, Hz(1400)}, /* RTTY, DATA */ - {FTX1_RTTY_DATA_RX_MODES, Hz(1200)}, /* RTTY, DATA */ - {FTX1_RTTY_DATA_RX_MODES, Hz(800)}, /* RTTY, DATA */ - {FTX1_RTTY_DATA_RX_MODES, Hz(450)}, /* RTTY, DATA */ - {FTX1_RTTY_DATA_RX_MODES, Hz(400)}, /* RTTY, DATA */ - {FTX1_RTTY_DATA_RX_MODES, Hz(350)}, /* RTTY, DATA */ - {FTX1_RTTY_DATA_RX_MODES, Hz(250)}, /* RTTY, DATA */ - {FTX1_RTTY_DATA_RX_MODES, Hz(200)}, /* RTTY, DATA */ - {FTX1_RTTY_DATA_RX_MODES, Hz(150)}, /* RTTY, DATA */ - {FTX1_RTTY_DATA_RX_MODES, Hz(100)}, /* RTTY, DATA */ - {FTX1_RTTY_DATA_RX_MODES, Hz(50)}, /* RTTY, DATA */ - {FTX1_CW_RX_MODES, Hz(2400)}, /* Normal CW */ - {FTX1_CW_RX_MODES, Hz(500)}, /* Narrow CW */ - {FTX1_CW_RX_MODES, Hz(3000)}, /* Wide CW */ - {FTX1_CW_RX_MODES, Hz(2000)}, /* CW */ - {FTX1_CW_RX_MODES, Hz(1700)}, /* CW */ - {FTX1_CW_RX_MODES, Hz(1400)}, /* CW */ - {FTX1_CW_RX_MODES, Hz(1200)}, /* CW */ - {FTX1_CW_RX_MODES, Hz(800)}, /* CW */ - {FTX1_CW_RX_MODES, Hz(450)}, /* CW */ - {FTX1_CW_RX_MODES, Hz(400)}, /* CW */ - {FTX1_CW_RX_MODES, Hz(350)}, /* CW */ - {FTX1_CW_RX_MODES, Hz(300)}, /* CW */ - {FTX1_CW_RX_MODES, Hz(250)}, /* CW */ - {FTX1_CW_RX_MODES, Hz(200)}, /* CW */ - {FTX1_CW_RX_MODES, Hz(150)}, /* CW */ - {FTX1_CW_RX_MODES, Hz(100)}, /* CW */ - {FTX1_CW_RX_MODES, Hz(50)}, /* CW */ - {RIG_MODE_SSB, Hz(2400)}, /* Normal SSB */ - {RIG_MODE_SSB, Hz(1500)}, /* Narrow SSB */ - {RIG_MODE_SSB, Hz(3200)}, /* Wide SSB */ - {RIG_MODE_SSB, Hz(3000)}, /* SSB */ - {RIG_MODE_SSB, Hz(2900)}, /* SSB */ - {RIG_MODE_SSB, Hz(2800)}, /* SSB */ - {RIG_MODE_SSB, Hz(2700)}, /* SSB */ - {RIG_MODE_SSB, Hz(2600)}, /* SSB */ - {RIG_MODE_SSB, Hz(2500)}, /* SSB */ - {RIG_MODE_SSB, Hz(2300)}, /* SSB */ - {RIG_MODE_SSB, Hz(2200)}, /* SSB */ - {RIG_MODE_SSB, Hz(2100)}, /* SSB */ - {RIG_MODE_SSB, Hz(1950)}, /* SSB */ - {RIG_MODE_SSB, Hz(1650)}, /* SSB */ - {RIG_MODE_SSB, Hz(1350)}, /* SSB */ - {RIG_MODE_SSB, Hz(1100)}, /* SSB */ - {RIG_MODE_SSB, Hz(850)}, /* SSB */ - {RIG_MODE_SSB, Hz(600)}, /* SSB */ - {RIG_MODE_SSB, Hz(400)}, /* SSB */ - {RIG_MODE_SSB, Hz(200)}, /* SSB */ - {RIG_MODE_AM, Hz(9000)}, /* Normal AM */ - {RIG_MODE_AMN, Hz(6000)}, /* Narrow AM */ - {FTX1_FM_WIDE_RX_MODES, Hz(16000)}, /* Normal FM, PKTFM, C4FM */ - {RIG_MODE_FMN, Hz(9000)}, /* Narrow FM */ + {RIG_MODE_SSB, Hz(2400)}, /* Normal SSB */ + {RIG_MODE_SSB, Hz(1500)}, /* Narrow SSB */ + {RIG_MODE_SSB, Hz(3200)}, /* Wide SSB */ + {RIG_MODE_CW, Hz(500)}, /* Normal CW */ + {RIG_MODE_CW, Hz(300)}, /* Narrow CW */ + {RIG_MODE_CW, Hz(2400)}, /* Wide CW */ + {RIG_MODE_FM, Hz(16000)}, /* Normal FM */ + {RIG_MODE_FMN, Hz(9000)}, /* Narrow FM */ + {RIG_MODE_AM, Hz(9000)}, /* Normal AM */ + {RIG_MODE_AMN, Hz(6000)}, /* Narrow AM */ + {FTX1_RTTY_DATA_RX_MODES, Hz(500)}, /* Normal RTTY, DATA */ + {FTX1_RTTY_DATA_RX_MODES, Hz(300)}, /* Narrow RTTY, DATA */ + {FTX1_RTTY_DATA_RX_MODES, Hz(3000)}, /* Wide RTTY, DATA */ + {FTX1_RTTY_DATA_RX_MODES, Hz(2400)}, /* RTTY, DATA */ + {FTX1_RTTY_DATA_RX_MODES, Hz(2000)}, /* RTTY, DATA */ + {FTX1_RTTY_DATA_RX_MODES, Hz(1700)}, /* RTTY, DATA */ + {FTX1_RTTY_DATA_RX_MODES, Hz(1400)}, /* RTTY, DATA */ + {FTX1_RTTY_DATA_RX_MODES, Hz(1200)}, /* RTTY, DATA */ + {FTX1_RTTY_DATA_RX_MODES, Hz(800)}, /* RTTY, DATA */ + {FTX1_RTTY_DATA_RX_MODES, Hz(450)}, /* RTTY, DATA */ + {FTX1_RTTY_DATA_RX_MODES, Hz(400)}, /* RTTY, DATA */ + {FTX1_RTTY_DATA_RX_MODES, Hz(350)}, /* RTTY, DATA */ + {FTX1_RTTY_DATA_RX_MODES, Hz(250)}, /* RTTY, DATA */ + {FTX1_RTTY_DATA_RX_MODES, Hz(200)}, /* RTTY, DATA */ + {FTX1_RTTY_DATA_RX_MODES, Hz(150)}, /* RTTY, DATA */ + {FTX1_RTTY_DATA_RX_MODES, Hz(100)}, /* RTTY, DATA */ + {FTX1_RTTY_DATA_RX_MODES, Hz(50)}, /* RTTY, DATA */ + {FTX1_CW_RX_MODES, Hz(2000)}, /* CW */ + {FTX1_CW_RX_MODES, Hz(1700)}, /* CW */ + {FTX1_CW_RX_MODES, Hz(1400)}, /* CW */ + {FTX1_CW_RX_MODES, Hz(1200)}, /* CW */ + {FTX1_CW_RX_MODES, Hz(800)}, /* CW */ + {FTX1_CW_RX_MODES, Hz(450)}, /* CW */ + {FTX1_CW_RX_MODES, Hz(400)}, /* CW */ + {FTX1_CW_RX_MODES, Hz(350)}, /* CW */ + {FTX1_CW_RX_MODES, Hz(300)}, /* CW */ + {FTX1_CW_RX_MODES, Hz(250)}, /* CW */ + {FTX1_CW_RX_MODES, Hz(200)}, /* CW */ + {FTX1_CW_RX_MODES, Hz(150)}, /* CW */ + {FTX1_CW_RX_MODES, Hz(100)}, /* CW */ + {FTX1_CW_RX_MODES, Hz(50)}, /* CW */ + {RIG_MODE_SSB, Hz(3000)}, /* SSB */ + {RIG_MODE_SSB, Hz(2900)}, /* SSB */ + {RIG_MODE_SSB, Hz(2800)}, /* SSB */ + {RIG_MODE_SSB, Hz(2700)}, /* SSB */ + {RIG_MODE_SSB, Hz(2600)}, /* SSB */ + {RIG_MODE_SSB, Hz(2500)}, /* SSB */ + {RIG_MODE_SSB, Hz(2300)}, /* SSB */ + {RIG_MODE_SSB, Hz(2200)}, /* SSB */ + {RIG_MODE_SSB, Hz(2100)}, /* SSB */ + {RIG_MODE_SSB, Hz(1950)}, /* SSB */ + {RIG_MODE_SSB, Hz(1650)}, /* SSB */ + {RIG_MODE_SSB, Hz(1350)}, /* SSB */ + {RIG_MODE_SSB, Hz(1100)}, /* SSB */ + {RIG_MODE_SSB, Hz(850)}, /* SSB */ + {RIG_MODE_SSB, Hz(600)}, /* SSB */ + {RIG_MODE_SSB, Hz(400)}, /* SSB */ + {RIG_MODE_SSB, Hz(200)}, /* SSB */ RIG_FLT_END, }, .ext_tokens = ftx1_ext_tokens, .extlevels = ftx1_ext_levels, + .cfgparams = ftx1_cfg_params, .priv = NULL, /* private data FIXME: */ @@ -350,7 +359,7 @@ struct rig_caps ftx1_caps = .rig_open = newcat_open, /* port opened */ .rig_close = newcat_close, /* port closed */ - .set_freq = newcat_set_freq, + .set_freq = ftx1_set_freq, .get_freq = newcat_get_freq, .set_mode = newcat_set_mode, .get_mode = newcat_get_mode, @@ -364,16 +373,16 @@ struct rig_caps ftx1_caps = .get_split_freq = ftx1_get_split_freq, .get_split_mode = ftx1_get_split_mode, .set_split_mode = ftx1_set_split_mode, - .set_rit = newcat_set_rit, - .get_rit = newcat_get_rit, - .set_xit = newcat_set_xit, - .get_xit = newcat_get_xit, + .set_rit = ftx1_set_rit, + .get_rit = ftx1_get_rit, + .set_xit = ftx1_set_xit, + .get_xit = ftx1_get_xit, .get_func = newcat_get_func, .set_func = newcat_set_func, .get_parm = newcat_get_parm, .set_parm = newcat_set_parm, - .get_level = newcat_get_level, - .set_level = newcat_set_level, + .get_level = ftx1_get_power_control, + .set_level = ftx1_set_power_control, .get_mem = newcat_get_mem, .set_mem = newcat_set_mem, .vfo_op = newcat_vfo_op, @@ -394,8 +403,8 @@ struct rig_caps ftx1_caps = .get_dcs_sql = ftx1_get_dcs_sql, .set_powerstat = newcat_set_powerstat, .get_powerstat = newcat_get_powerstat, - .set_ts = newcat_set_ts, - .get_ts = newcat_get_ts, + .set_ts = ftx1_set_ts, + .get_ts = ftx1_get_ts, .set_trn = newcat_set_trn, .get_trn = newcat_get_trn, .set_channel = newcat_set_channel, @@ -1207,4 +1216,351 @@ static int ftx1_get_vfo(RIG *rig, vfo_t *vfo) { *vfo = STATE(rig)->current_vfo; RETURNFUNC2(RIG_OK); +} + +/* Error handling function */ +static int ftx1_handle_cat_error(RIG *rig, const char *response) +{ + if (strstr(response, "?;")) { + return -RIG_EPROTO; // Protocol error + } + if (strstr(response, "N;")) { + return -RIG_ERJCTED; // Command rejected + } + return RIG_OK; +} + + + +/* RIT/XIT functions */ +static int ftx1_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit) +{ + struct newcat_priv_data *priv = (struct newcat_priv_data *)STATE(rig)->priv; + int err; + ftx1info *rdata; + + rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + + if (!rig || !rit) + { + return -RIG_EINVAL; + } + + rdata = (ftx1info *)priv->ret_data; + + SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "IF;"); + + if (RIG_OK != (err = newcat_get_cmd(rig))) + { + return err; + } + + debug_ftx1info_data(rdata); + + if (rdata->rx_clarifier == '1') + { + *rit = atoi(rdata->clarifier); + if (rdata->clarifier[0] == '-') + { + *rit = -*rit; + } + } + else + { + *rit = 0; + } + + return RIG_OK; +} + +static int ftx1_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit) +{ + struct newcat_priv_data *priv = (struct newcat_priv_data *)STATE(rig)->priv; + int err; + + rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + + if (rit == 0) + { + SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "RC0;"); + } + else if (rit > 0) + { + SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "RC+%04ld;", rit); + } + else + { + SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "RC%05ld;", rit); + } + + if (RIG_OK != (err = newcat_set_cmd(rig))) + { + return err; + } + + return RIG_OK; +} + +static int ftx1_get_xit(RIG *rig, vfo_t vfo, shortfreq_t *xit) +{ + struct newcat_priv_data *priv = (struct newcat_priv_data *)STATE(rig)->priv; + int err; + ftx1info *rdata; + + rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + + if (!rig || !xit) + { + return -RIG_EINVAL; + } + + rdata = (ftx1info *)priv->ret_data; + + SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "IF;"); + + if (RIG_OK != (err = newcat_get_cmd(rig))) + { + return err; + } + + debug_ftx1info_data(rdata); + + if (rdata->tx_clarifier == '1') + { + *xit = atoi(rdata->clarifier); + if (rdata->clarifier[0] == '-') + { + *xit = -*xit; + } + } + else + { + *xit = 0; + } + + return RIG_OK; +} + +static int ftx1_set_xit(RIG *rig, vfo_t vfo, shortfreq_t xit) +{ + struct newcat_priv_data *priv = (struct newcat_priv_data *)STATE(rig)->priv; + int err; + + rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + + if (xit == 0) + { + SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "TC0;"); + } + else if (xit > 0) + { + SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "TC+%04ld;", xit); + } + else + { + SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "TC%05ld;", xit); + } + + if (RIG_OK != (err = newcat_set_cmd(rig))) + { + return err; + } + + return RIG_OK; +} + +/* Split functions */ +static int ftx1_get_split(RIG *rig, vfo_t vfo, split_t *split) +{ + int err; + split_t is_split; + + rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + + if (!rig || !split) + { + return -RIG_EINVAL; + } + + err = ftx1_get_tx_split(rig, &is_split); + if (err != RIG_OK) + { + return err; + } + + *split = is_split; + return RIG_OK; +} + +static int ftx1_set_split(RIG *rig, vfo_t vfo, split_t split) +{ + int err; + + rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + + if (split == RIG_SPLIT_ON) + { + err = newcat_set_tx_vfo(rig, RIG_VFO_B); + } + else + { + err = newcat_set_tx_vfo(rig, RIG_VFO_A); + } + + return err; +} + +/* Tuning step functions */ +static int ftx1_get_ts(RIG *rig, vfo_t vfo, shortfreq_t *ts) +{ + // FTX-1 doesn't have a direct tuning step query command + // Return a default value + *ts = 100; + return RIG_OK; +} + +static int ftx1_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts) +{ + // FTX-1 doesn't have a direct tuning step set command + // This would need to be implemented via mode-specific commands + return -RIG_ENIMPL; +} + +/* + * FTX-1 specific power control function + * The FTX-1 uses PC command with format: PC[amp][power] where: + * amp: 1 = radio only, 2 = amplifier + * power: 3-digit percentage (005-010 for radio, 005-100 for amp) + */ +int ftx1_set_power_control(RIG *rig, vfo_t vfo, setting_t level, value_t val) +{ + struct newcat_priv_data *priv = (struct newcat_priv_data *)STATE(rig)->priv; + int amp_setting = 2; // Default to amp on (2) + int power_percent; + + ENTERFUNC; + + // Only handle RIG_LEVEL_RFPOWER + if (level != RIG_LEVEL_RFPOWER) + { + // For other levels, use the standard newcat function + return newcat_set_level(rig, vfo, level, val); + } + + // Convert power value (0.0-1.0) to percentage (0-100) + power_percent = (int)(val.f * 100.0f + 0.5f); + + // Ensure power is within valid range for amp (5-100) + if (power_percent < 5) power_percent = 5; + if (power_percent > 100) power_percent = 100; + + // Format: PC[amp][power] where amp=2 for amplifier, power=3 digits + SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "PC%d%03d%c", amp_setting, power_percent, cat_term); + + rig_debug(RIG_DEBUG_TRACE, "%s: cmd_str = %s\n", __func__, priv->cmd_str); + + RETURNFUNC(newcat_set_cmd(rig)); +} + +/* + * FTX-1 specific power reading function + * The FTX-1 returns PC command responses in format: PC[amp][power] where: + * amp: 1 = radio only, 2 = amplifier + * power: 3-digit percentage (005-010 for radio, 005-100 for amp) + */ +int ftx1_get_power_control(RIG *rig, vfo_t vfo, setting_t level, value_t *val) +{ + struct newcat_priv_data *priv = (struct newcat_priv_data *)STATE(rig)->priv; + int amp_setting, power_percent; + char response[16]; + int err; + + ENTERFUNC; + + // Only handle RIG_LEVEL_RFPOWER + if (level != RIG_LEVEL_RFPOWER) + { + // For other levels, use the standard newcat function + return newcat_get_level(rig, vfo, level, val); + } + + // Send PC; command to get current power setting + SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "PC%c", cat_term); + + if (RIG_OK != (err = newcat_get_cmd(rig))) + { + RETURNFUNC(err); + } + + // Parse response like "PC2075;" or "PC1004;" + // Extract the numeric part (2075 or 1004) + strncpy(response, priv->ret_data, sizeof(response) - 1); + response[sizeof(response) - 1] = '\0'; + + // Remove "PC" prefix and ";" suffix + if (strlen(response) >= 4 && strncmp(response, "PC", 2) == 0) + { + char *numeric_part = response + 2; // Skip "PC" + char *semicolon = strchr(numeric_part, ';'); + if (semicolon) *semicolon = '\0'; + + if (strlen(numeric_part) == 4) + { + amp_setting = numeric_part[0] - '0'; // First digit (1 or 2) + power_percent = atoi(numeric_part + 1); // Last 3 digits + + // Convert to 0.0-1.0 range + val->f = (float)power_percent / 100.0f; + + rig_debug(RIG_DEBUG_TRACE, "%s: response=%s, amp=%d, power=%d, val=%.3f\n", + __func__, response, amp_setting, power_percent, val->f); + + RETURNFUNC(RIG_OK); + } + } + + // If parsing failed, return error + RETURNFUNC(-RIG_EPROTO); +} + +/* + * FTX-1 specific frequency setting function + * The FTX-1 requires FA command with format: FA[11 digits]; where: + * frequency is formatted as 11 digits with leading zeros + * e.g., FA007200000; for 7.2 MHz + */ +int ftx1_set_freq(RIG *rig, vfo_t vfo, freq_t freq) +{ + struct newcat_priv_data *priv = (struct newcat_priv_data *)STATE(rig)->priv; + char c; + int err; + + ENTERFUNC; + + // Determine VFO letter (A or B) + if (vfo == RIG_VFO_A || vfo == RIG_VFO_MAIN) + { + c = 'A'; + } + else if (vfo == RIG_VFO_B || vfo == RIG_VFO_SUB) + { + c = 'B'; + } + else + { + // For other VFOs, default to A + c = 'A'; + } + + // Format: F[VFO][10 digits]; where 10 digits include leading zeros + // Radio returns: FA028100000; (10 digits after FA) + // We should send: FA028200000; (10 digits after FA, not 11) + // The frequency needs to be formatted as 10 digits with proper leading zeros + char freq_str[16]; + SNPRINTF(freq_str, sizeof(freq_str), "%09"PRIll, (int64_t)freq); + SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "F%c%s%c", c, freq_str, cat_term); + + rig_debug(RIG_DEBUG_TRACE, "%s: cmd_str = %s\n", __func__, priv->cmd_str); + + RETURNFUNC(newcat_set_cmd(rig)); } \ No newline at end of file diff --git a/rigs/yaesu/ftx1.h b/rigs/yaesu/ftx1.h index 142d93b46..efbfa37dd 100644 --- a/rigs/yaesu/ftx1.h +++ b/rigs/yaesu/ftx1.h @@ -64,11 +64,11 @@ RIG_FUNC_MON|RIG_FUNC_NB|RIG_FUNC_NR|RIG_FUNC_VOX|\ RIG_FUNC_FBKIN|RIG_FUNC_COMP|RIG_FUNC_ANF|RIG_FUNC_MN|\ RIG_FUNC_RIT|RIG_FUNC_XIT|\ - RIG_FUNC_TUNER|RIG_FUNC_APF) + RIG_FUNC_TUNER|RIG_FUNC_APF|RIG_FUNC_MUTE) #define FTX1_VFO_OPS (RIG_OP_TUNE|RIG_OP_CPY|RIG_OP_XCHG|\ RIG_OP_UP|RIG_OP_DOWN|RIG_OP_BAND_UP|RIG_OP_BAND_DOWN|\ - RIG_OP_TO_VFO|RIG_OP_FROM_VFO) + RIG_OP_TO_VFO|RIG_OP_FROM_VFO|RIG_OP_MCL) // Borrowed from FLRig -- Thanks to Dave W1HKJ #define FTX1_RFPOWER_METER_CAL \ @@ -192,4 +192,22 @@ typedef struct char terminator; /* ';' */ } ftx1info; +/* Function prototypes for new commands */ +static int ftx1_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit); +static int ftx1_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit); +static int ftx1_get_xit(RIG *rig, vfo_t vfo, shortfreq_t *xit); +static int ftx1_set_xit(RIG *rig, vfo_t vfo, shortfreq_t xit); +static int ftx1_get_split(RIG *rig, vfo_t vfo, split_t *split); +static int ftx1_set_split(RIG *rig, vfo_t vfo, split_t split); +static int ftx1_get_ts(RIG *rig, vfo_t vfo, shortfreq_t *ts); +static int ftx1_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts); +static int ftx1_handle_cat_error(RIG *rig, const char *response); + +/* FTX-1 specific power control function */ +int ftx1_set_power_control(RIG *rig, vfo_t vfo, setting_t level, value_t val); +int ftx1_get_power_control(RIG *rig, vfo_t vfo, setting_t level, value_t *val); + +/* FTX-1 specific frequency setting function */ +int ftx1_set_freq(RIG *rig, vfo_t vfo, freq_t freq); + #endif /* _FTX1_H */ \ No newline at end of file diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index ccdc9c605..31ce67d01 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -6,6 +6,7 @@ * (C) Stephane Fillod 2008-2010 * (C) Terry Embry 2008-2010 * (C) David Fannin (kk6df at arrl.net) + * (C) Jeremy Miller KO4SSD 2025 (ko4ssd at ko4ssd.com) * * This shared library provides an API for communicating * via serial interface to any newer Yaesu radio using the @@ -248,23 +249,23 @@ static ncboolean is_ftdx9000Old; static const yaesu_newcat_commands_t valid_commands[] = { /* Command FT-450 FT-950 FT-891 FT-991 FT-2000 FT-9000 FT-5000 FT-1200 FT-3000 FTDX101D FTDX10 FTDX101MP FT710 FTX1 FT9000Old*/ - {"AB", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"AB", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE }, {"AC", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"AG", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"AI", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"AM", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"AN", FALSE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, FALSE, TRUE }, - {"AO", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE }, - {"BA", FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE }, + {"AO", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"BA", FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"BC", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"BD", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"BI", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"BM", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE }, + {"BM", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"BP", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"BS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"BU", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"BY", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"CF", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE }, + {"CF", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE }, {"CH", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"CN", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"CO", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, @@ -274,7 +275,7 @@ static const yaesu_newcat_commands_t valid_commands[] = {"DN", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"DP", FALSE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE }, {"DS", TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE }, - {"DT", FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE }, + {"DT", FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"ED", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"EK", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, TRUE }, {"EM", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, TRUE, FALSE }, @@ -284,7 +285,7 @@ static const yaesu_newcat_commands_t valid_commands[] = {"FA", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"FB", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"FK", FALSE, TRUE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE }, - {"FN", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE }, + {"FN", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"FR", FALSE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"FS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, FALSE, TRUE }, {"FT", TRUE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, @@ -300,7 +301,7 @@ static const yaesu_newcat_commands_t valid_commands[] = {"LK", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"LM", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"MA", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"MB", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE }, + {"MB", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"MC", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"MD", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"MG", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, @@ -308,10 +309,10 @@ static const yaesu_newcat_commands_t valid_commands[] = {"ML", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"MR", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"MS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"MT", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE }, + {"MT", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"MW", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"MX", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"NA", TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE }, + {"NA", TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"NB", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"NL", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"NR", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, @@ -323,8 +324,8 @@ static const yaesu_newcat_commands_t valid_commands[] = {"PL", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"PR", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"PS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"QI", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"QR", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"QI", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE }, + {"QR", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE }, {"QS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"RA", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"RC", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, @@ -345,13 +346,13 @@ static const yaesu_newcat_commands_t valid_commands[] = {"SH", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"SM", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"SQ", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"SS", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE }, + {"SS", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE }, // ST command has two meanings Step or Split Status // If new rig is added that has ST ensure it means Split // Otherwise modify newcat_(set|get)_split - {"ST", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE }, + {"ST", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"SV", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"SY", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, FALSE}, + {"SY", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE }, {"TS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"TX", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"UL", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, @@ -361,12 +362,12 @@ static const yaesu_newcat_commands_t valid_commands[] = {"VG", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"VM", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"VR", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE }, - {"VS", TRUE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE }, - {"VT", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE }, - {"VV", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE }, + {"VS", TRUE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"VT", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, TRUE }, + {"VV", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE }, {"VX", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, {"XT", FALSE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE }, - {"ZI", FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE }, + {"ZI", FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE }, } ; int valid_commands_count = sizeof(valid_commands) / sizeof( diff --git a/rigs/yaesu/yaesu.c b/rigs/yaesu/yaesu.c index ac9923ab6..db9916d2b 100644 --- a/rigs/yaesu/yaesu.c +++ b/rigs/yaesu/yaesu.c @@ -2,6 +2,7 @@ * hamlib - (C) Frank Singleton 2000 (vk...@ix...) * * yaesu.c - (C) Stephane Fillod 2001-2010 + * (C) Jeremy Miller KO4SSD 2025 (ko4ssd at ko4ssd.com) * * This shared library provides an API for communicating * via serial interface to a Yaesu rig diff --git a/rigs/yaesu/yaesu.h b/rigs/yaesu/yaesu.h index 049e2f678..7685d3664 100644 --- a/rigs/yaesu/yaesu.h +++ b/rigs/yaesu/yaesu.h @@ -3,6 +3,7 @@ * * yaesu.h - (C) Frank Singleton 2000 (vk...@ix...) * (C) Stephane Fillod 2001-2010 + * (C) Jeremy Miller KO4SSD 2025 (ko4ssd at ko4ssd.com) * * Common yaesu declarations for hamlib * diff --git a/tests/Makefile.am b/tests/Makefile.am index c120165ff..141c2cab4 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -17,7 +17,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 testsecurity -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 testtrn testbcd testfreq listrigs testloc rig_bench testcache cachetest cachetest2 testcookie testgrid hamlibmodels testmW2power test2038 test_ftx1 RIGCOMMONSRC = rigctl_parse.c rigctl_parse.h dumpcaps.c dumpstate.c uthash.h rig_tests.c rig_tests.h dumpcaps.h ROTCOMMONSRC = rotctl_parse.c rotctl_parse.h dumpcaps_rot.c uthash.h dumpcaps_rot.h @@ -39,6 +39,8 @@ if HAVE_LIBUSB rigtestlibusb_SOURCES = rigtestlibusb.c endif +test_ftx1_SOURCES = test_ftx1.c + # include generated include files ahead of any in sources rigctl_CPPFLAGS = -I$(top_builddir)/tests -I$(top_builddir)/src -I$(srcdir) -I$(top_builddir)/security $(AM_CPPFLAGS) ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/ftx1.c | 596 ++++++++++++++++++++++++++++++++++++++++++++++------ rigs/yaesu/ftx1.h | 23 +- rigs/yaesu/newcat.c | 33 +-- rigs/yaesu/yaesu.c | 1 + rigs/yaesu/yaesu.h | 1 + 5 files changed, 566 insertions(+), 88 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-08-02 01:15:43
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 989623ec511e6f428aa8998e88df3f69f9e11d79 (commit) via b4eb1bdb12bd475927ec1c05d25a539eae5fa3df (commit) via 0c57ccad264d0f1b54a943795ab47ac199a08f27 (commit) via 094b5e741a63c7310983ee6e77da6d46de73c819 (commit) via 200b2aaecc89cfcfdce416d7f7a9439bd8758c2b (commit) via 6af3b3a94e55d69aad55f4a36818f41dec0aef05 (commit) via 5f78c54bae8502b3ec1e0f1c43643b7857b6e62f (commit) via f8c3d6b614597b8cc24c3b443a9fd1984ebf16a6 (commit) from a9ecd503294b60aed1874cd962c23a9655f3432d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 989623ec511e6f428aa8998e88df3f69f9e11d79 Merge: b4eb1bdb1 0c57ccad2 Author: Nate Bargmann <n0...@n0...> Date: Fri Aug 1 18:31:38 2025 -0500 Merge GitHub PR #1824 commit b4eb1bdb12bd475927ec1c05d25a539eae5fa3df Author: Nate Bargmann <n0...@n0...> Date: Fri Aug 1 18:25:16 2025 -0500 Quell warning from clang This warning was seen on MacOS and on Debian 12 and 13 using clang: CC kenwood.lo kenwood.c:2293:9: warning: absolute value function 'abs' given an argument of type 'shortfreq_t' (aka 'long') but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value] 2293 | if (abs(rit) > 9999) { RETURNFUNC(-RIG_EINVAL); } | ^ kenwood.c:2293:9: note: use function 'labs' instead 2293 | if (abs(rit) > 9999) { RETURNFUNC(-RIG_EINVAL); } | ^~~ | labs 1 warning generated. Closes issue #1806 on GitHub diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index ccb13c65a..3d67090a7 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -2290,7 +2290,7 @@ int kenwood_set_rit_new(RIG *rig, vfo_t vfo, shortfreq_t rit) char rdbuf[10]; ENTERFUNC; - if (abs(rit) > 9999) { RETURNFUNC(-RIG_EINVAL); } + if (labs(rit) > 9999) { RETURNFUNC(-RIG_EINVAL); } retval = kenwood_get_rit_new(rig, vfo, &oldrit); if (retval != RIG_OK) { RETURNFUNC(retval); } if (rit == oldrit) // if the new value is the same commit 0c57ccad264d0f1b54a943795ab47ac199a08f27 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Tue Jul 29 23:26:34 2025 +0200 Add missing include file Otherwise it isn't added to the distribution archive created by "make distcheck". diff --git a/simulators/Makefile.am b/simulators/Makefile.am index 2c7cb7f04..b9d58619e 100644 --- a/simulators/Makefile.am +++ b/simulators/Makefile.am @@ -32,7 +32,7 @@ simkenwood_LDFLAGS = $(WINEXELDFLAGS) simyaesu_LDFLAGS = $(WINEXELDFLAGS) simid5100_LDFLAGS = $(WINEXELDFLAGS) -EXTRA_DIST = +EXTRA_DIST = sim.h # Support 'make check' target for simple tests #check_SCRIPTS = commit 094b5e741a63c7310983ee6e77da6d46de73c819 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Tue Jul 29 21:07:54 2025 +0200 Remove unused variables diff --git a/simulators/simic7000.c b/simulators/simic7000.c index 693971b7a..06673d9fa 100644 --- a/simulators/simic7000.c +++ b/simulators/simic7000.c @@ -60,7 +60,7 @@ void dumphex(const unsigned char *buf, int n) int frameGet(int fd, unsigned char *buf) { - int i = 0, n; + int i = 0; memset(buf, 0, BUFSIZE); unsigned char c; diff --git a/simulators/simtmd710.c b/simulators/simtmd710.c index 6cea1853b..9cd53ebc1 100644 --- a/simulators/simtmd710.c +++ b/simulators/simtmd710.c @@ -87,10 +87,7 @@ int openPort(char *comport) // doesn't matter for using pts devices int main(int argc, char *argv[]) { char buf[256]; - char *pbuf; int fd = openPort(argv[1]); - int freqa = 14074000, freqb = 140735000; - int modeA = 0; // , modeB = 0; while (1) { commit 200b2aaecc89cfcfdce416d7f7a9439bd8758c2b Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Tue Jul 29 20:56:29 2025 +0200 Remove unneeded typedef It's only used by Yeasu simulators. diff --git a/simulators/simelecraft.c b/simulators/simelecraft.c index 2ddcfab85..f52903254 100644 --- a/simulators/simelecraft.c +++ b/simulators/simelecraft.c @@ -38,27 +38,6 @@ int modea = 2; int modeb = 2; int ptt = 0; -// ID 0310 == 310, Must drop leading zero -typedef enum nc_rigid_e -{ - NC_RIGID_NONE = 0, - NC_RIGID_FT450 = 241, - NC_RIGID_FT450D = 244, - NC_RIGID_FT950 = 310, - NC_RIGID_FT891 = 135, - NC_RIGID_FT991 = 135, - NC_RIGID_FT2000 = 251, - NC_RIGID_FT2000D = 252, - NC_RIGID_FTDX1200 = 583, - NC_RIGID_FTDX9000D = 101, - NC_RIGID_FTDX9000Contest = 102, - NC_RIGID_FTDX9000MP = 103, - NC_RIGID_FTDX5000 = 362, - NC_RIGID_FTDX3000 = 460, - NC_RIGID_FTDX101D = 681, - NC_RIGID_FTDX101MP = 682 -} nc_rigid_t; - int getmyline(int fd, char *buf) { diff --git a/simulators/simelecraftk4.c b/simulators/simelecraftk4.c index 33399b91c..fae2f2cb7 100644 --- a/simulators/simelecraftk4.c +++ b/simulators/simelecraftk4.c @@ -39,27 +39,6 @@ int modeB = 2; int ptt = 0; // int freqa = 14074000, freqb = 14073500; -// ID 0310 == 310, Must drop leading zero -typedef enum nc_rigid_e -{ - NC_RIGID_NONE = 0, - NC_RIGID_FT450 = 241, - NC_RIGID_FT450D = 244, - NC_RIGID_FT950 = 310, - NC_RIGID_FT891 = 135, - NC_RIGID_FT991 = 135, - NC_RIGID_FT2000 = 251, - NC_RIGID_FT2000D = 252, - NC_RIGID_FTDX1200 = 583, - NC_RIGID_FTDX9000D = 101, - NC_RIGID_FTDX9000Contest = 102, - NC_RIGID_FTDX9000MP = 103, - NC_RIGID_FTDX5000 = 362, - NC_RIGID_FTDX3000 = 460, - NC_RIGID_FTDX101D = 681, - NC_RIGID_FTDX101MP = 682 -} nc_rigid_t; - int getmyline(int fd, char *buf) { diff --git a/simulators/simkenwood.c b/simulators/simkenwood.c index 208d3a464..daa7575f1 100644 --- a/simulators/simkenwood.c +++ b/simulators/simkenwood.c @@ -25,27 +25,6 @@ int filternum = 7; int datamode = 0; int vfo, vfo_tx, ptt, ptt_data, ptt_mic, ptt_tune; -// ID 0310 == 310, Must drop leading zero -typedef enum nc_rigid_e -{ - NC_RIGID_NONE = 0, - NC_RIGID_FT450 = 241, - NC_RIGID_FT450D = 244, - NC_RIGID_FT950 = 310, - NC_RIGID_FT891 = 135, - NC_RIGID_FT991 = 135, - NC_RIGID_FT2000 = 251, - NC_RIGID_FT2000D = 252, - NC_RIGID_FTDX1200 = 583, - NC_RIGID_FTDX9000D = 101, - NC_RIGID_FTDX9000Contest = 102, - NC_RIGID_FTDX9000MP = 103, - NC_RIGID_FTDX5000 = 362, - NC_RIGID_FTDX3000 = 460, - NC_RIGID_FTDX101D = 681, - NC_RIGID_FTDX101MP = 682 -} nc_rigid_t; - int getmyline(int fd, char *buf) { diff --git a/simulators/simpowersdr.c b/simulators/simpowersdr.c index b603ae0c3..a3701831c 100644 --- a/simulators/simpowersdr.c +++ b/simulators/simpowersdr.c @@ -26,27 +26,6 @@ int keyspd = 20; double alc = 0; int tx; -// ID 0310 == 310, Must drop leading zero -typedef enum nc_rigid_e -{ - NC_RIGID_NONE = 0, - NC_RIGID_FT450 = 241, - NC_RIGID_FT450D = 244, - NC_RIGID_FT950 = 310, - NC_RIGID_FT891 = 135, - NC_RIGID_FT991 = 135, - NC_RIGID_FT2000 = 251, - NC_RIGID_FT2000D = 252, - NC_RIGID_FTDX1200 = 583, - NC_RIGID_FTDX9000D = 101, - NC_RIGID_FTDX9000Contest = 102, - NC_RIGID_FTDX9000MP = 103, - NC_RIGID_FTDX5000 = 362, - NC_RIGID_FTDX3000 = 460, - NC_RIGID_FTDX101D = 681, - NC_RIGID_FTDX101MP = 682 -} nc_rigid_t; - int getmyline(int fd, char *buf) { diff --git a/simulators/simtmd700.c b/simulators/simtmd700.c index 2e6876a37..5bb363533 100644 --- a/simulators/simtmd700.c +++ b/simulators/simtmd700.c @@ -25,27 +25,6 @@ char modeB = '0'; int band = 0; int control = 1; -// ID 0310 == 310, Must drop leading zero -typedef enum nc_rigid_e -{ - NC_RIGID_NONE = 0, - NC_RIGID_FT450 = 241, - NC_RIGID_FT450D = 244, - NC_RIGID_FT950 = 310, - NC_RIGID_FT891 = 135, - NC_RIGID_FT991 = 135, - NC_RIGID_FT2000 = 251, - NC_RIGID_FT2000D = 252, - NC_RIGID_FTDX1200 = 583, - NC_RIGID_FTDX9000D = 101, - NC_RIGID_FTDX9000Contest = 102, - NC_RIGID_FTDX9000MP = 103, - NC_RIGID_FTDX5000 = 362, - NC_RIGID_FTDX3000 = 460, - NC_RIGID_FTDX101D = 681, - NC_RIGID_FTDX101MP = 682 -} nc_rigid_t; - int getmyline(int fd, char *buf) { diff --git a/simulators/simtmd710.c b/simulators/simtmd710.c index f00d5ae3b..6cea1853b 100644 --- a/simulators/simtmd710.c +++ b/simulators/simtmd710.c @@ -25,27 +25,6 @@ int filternum = 7; int datamode = 0; int vfo, vfo_tx, ptt, ptt_data, ptt_mic, ptt_tune; -// ID 0310 == 310, Must drop leading zero -typedef enum nc_rigid_e -{ - NC_RIGID_NONE = 0, - NC_RIGID_FT450 = 241, - NC_RIGID_FT450D = 244, - NC_RIGID_FT950 = 310, - NC_RIGID_FT891 = 135, - NC_RIGID_FT991 = 135, - NC_RIGID_FT2000 = 251, - NC_RIGID_FT2000D = 252, - NC_RIGID_FTDX1200 = 583, - NC_RIGID_FTDX9000D = 101, - NC_RIGID_FTDX9000Contest = 102, - NC_RIGID_FTDX9000MP = 103, - NC_RIGID_FTDX5000 = 362, - NC_RIGID_FTDX3000 = 460, - NC_RIGID_FTDX101D = 681, - NC_RIGID_FTDX101MP = 682 -} nc_rigid_t; - int getmyline(int fd, char *buf) { commit 6af3b3a94e55d69aad55f4a36818f41dec0aef05 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Tue Jul 29 19:33:36 2025 +0200 Remove DECLARE_INITRIG_BACKEND() This code is uneeded. diff --git a/rigs/commradio/commradio.c b/rigs/commradio/commradio.c index c14c20fb8..560419438 100644 --- a/rigs/commradio/commradio.c +++ b/rigs/commradio/commradio.c @@ -226,12 +226,3 @@ DECLARE_INITRIG_BACKEND(commradio) return (RIG_OK); } - -/* - * For some reason, I can't get this to even link without this function. - */ -DECLARE_PROBERIG_BACKEND(commradio) -{ - return (RIG_MODEL_NONE); -} - diff --git a/src/register.c b/src/register.c index 2169e192d..fd6419e57 100644 --- a/src/register.c +++ b/src/register.c @@ -154,7 +154,7 @@ static struct { RIG_MDS, RIG_BACKEND_MDS, RIG_FUNCNAMA(mds) }, { RIG_ANYTONE, RIG_BACKEND_ANYTONE, RIG_FUNCNAMA(anytone) }, { RIG_MOTOROLA, RIG_BACKEND_MOTOROLA, RIG_FUNCNAMA(motorola) }, - { RIG_COMMRADIO, RIG_BACKEND_COMMRADIO, RIG_FUNCNAM(commradio) }, + { RIG_COMMRADIO, RIG_BACKEND_COMMRADIO, RIG_FUNCNAMA(commradio) }, { 0, NULL }, /* end */ }; commit 5f78c54bae8502b3ec1e0f1c43643b7857b6e62f Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Tue Jul 29 19:18:49 2025 +0200 Remove DECLARE_INITRIG_BACKEND() Breaks rig_probe() for rigs probed later (eg. Kenwood). diff --git a/rigs/gomspace/gs100.c b/rigs/gomspace/gs100.c index 647d11d69..86782c90a 100644 --- a/rigs/gomspace/gs100.c +++ b/rigs/gomspace/gs100.c @@ -578,11 +578,4 @@ DECLARE_INITRIG_BACKEND(gomspace) return (RIG_OK); } - -/* Probe RIG backend function */ -DECLARE_PROBERIG_BACKEND(gomspace) -{ - return (RIG_MODEL_GS100); -} - /*----------------------------------------------------------------------------*/ diff --git a/src/register.c b/src/register.c index aa476412e..2169e192d 100644 --- a/src/register.c +++ b/src/register.c @@ -150,7 +150,7 @@ static struct { RIG_BARRETT, RIG_BACKEND_BARRETT, RIG_FUNCNAMA(barrett) }, { RIG_ELAD, RIG_BACKEND_ELAD, RIG_FUNCNAMA(elad) }, { RIG_CODAN, RIG_BACKEND_CODAN, RIG_FUNCNAMA(codan) }, - { RIG_GOMSPACE, RIG_BACKEND_GOMSPACE, RIG_FUNCNAM(gomspace) }, + { RIG_GOMSPACE, RIG_BACKEND_GOMSPACE, RIG_FUNCNAMA(gomspace) }, { RIG_MDS, RIG_BACKEND_MDS, RIG_FUNCNAMA(mds) }, { RIG_ANYTONE, RIG_BACKEND_ANYTONE, RIG_FUNCNAMA(anytone) }, { RIG_MOTOROLA, RIG_BACKEND_MOTOROLA, RIG_FUNCNAMA(motorola) }, commit f8c3d6b614597b8cc24c3b443a9fd1984ebf16a6 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Mon Jul 28 22:01:12 2025 +0200 Fix error messages diff --git a/simulators/simyaesu.c b/simulators/simyaesu.c index fe90cd422..cc57d818f 100644 --- a/simulators/simyaesu.c +++ b/simulators/simyaesu.c @@ -240,7 +240,7 @@ int main(int argc, char *argv[]) n = write(fd, buf, strlen(buf)); //printf("n=%d\n", n); - if (n <= 0) { perror("ID"); } + if (n <= 0) { perror("AI"); } } else if (strcmp(buf, "AI0;") == 0) { @@ -321,7 +321,7 @@ int main(int argc, char *argv[]) SNPRINTF(resp, sizeof(resp), "MD1%c;", modeB); n = write(fd, resp, strlen(resp)); - if (n < 0) { perror("MD0;"); } + if (n < 0) { perror("MD1;"); } } else if (strncmp(buf, "MD1", 3) == 0) { ----------------------------------------------------------------------- Summary of changes: rigs/commradio/commradio.c | 9 --------- rigs/gomspace/gs100.c | 7 ------- rigs/kenwood/kenwood.c | 2 +- simulators/Makefile.am | 2 +- simulators/simelecraft.c | 21 --------------------- simulators/simelecraftk4.c | 21 --------------------- simulators/simic7000.c | 2 +- simulators/simkenwood.c | 21 --------------------- simulators/simpowersdr.c | 21 --------------------- simulators/simtmd700.c | 21 --------------------- simulators/simtmd710.c | 24 ------------------------ simulators/simyaesu.c | 4 ++-- src/register.c | 4 ++-- 13 files changed, 7 insertions(+), 152 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-08-01 13:57:07
|
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 a9ecd503294b60aed1874cd962c23a9655f3432d (commit) via b4f0a3b4b3318564217fc0aea9fa558193d41c69 (commit) via 1c36377480cb13a2ea863a2fd8a045ce2c1ce5f3 (commit) via 72bc62366d1b4f9958a94480a172af773a93f72b (commit) via e172d343816c8514b9892375851bc4bf9ed6f81b (commit) via faad247f06df484a0ad68a4f5e96cce9036761ac (commit) from 48804dc4da2bb5e0035a2600a75f568b6e2280b3 (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 a9ecd503294b60aed1874cd962c23a9655f3432d Author: Nate Bargmann <n0...@n0...> Date: Fri Aug 1 07:42:33 2025 -0500 Sanitize radio model names and manufacturers Reference GitHub issue #1013. diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index 822f6dcf2..b378fa360 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -143,9 +143,9 @@ static const struct confparams flrig_ext_parms[] = struct rig_caps flrig_caps = { RIG_MODEL(RIG_MODEL_FLRIG), - .model_name = "", - .mfg_name = "FLRig", - .version = "20250107.0", + .model_name = "FLRig", + .mfg_name = "W1HKJ", + .version = "20250107.1", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, diff --git a/rigs/dummy/gqrx.c b/rigs/dummy/gqrx.c index 5a9365278..e4ccb49d5 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.0" +#define BACKEND_VER "20250718.1" #define TRUE 1 #define FALSE 0 @@ -932,7 +932,7 @@ struct rig_caps gqrx_caps = { RIG_MODEL(RIG_MODEL_GQRX), .model_name = "GQRX", - .mfg_name = "GQRX", + .mfg_name = "OZ9AEC", .version = BACKEND_VER, .copyright = "LGPL", .status = RIG_STATUS_NEW, diff --git a/rigs/kenwood/flex6xxx.c b/rigs/kenwood/flex6xxx.c index f6d2f3f65..f2d117e54 100644 --- a/rigs/kenwood/flex6xxx.c +++ b/rigs/kenwood/flex6xxx.c @@ -1632,9 +1632,9 @@ struct rig_caps powersdr_caps = struct rig_caps thetis_caps = { RIG_MODEL(RIG_MODEL_THETIS), - .model_name = "", - .mfg_name = "Thetis", - .version = "20231222.0", + .model_name = "Thetis", + .mfg_name = "TAPR", + .version = "20231222.1", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, diff --git a/rigs/yaesu/ft1000mp.c b/rigs/yaesu/ft1000mp.c index a54f10853..5f19b55a7 100644 --- a/rigs/yaesu/ft1000mp.c +++ b/rigs/yaesu/ft1000mp.c @@ -455,9 +455,9 @@ struct rig_caps ft1000mp_caps = struct rig_caps ft1000mpmkv_caps = { RIG_MODEL(RIG_MODEL_FT1000MPMKV), - .model_name = "MARK-V FT-1000MP", + .model_name = "FT-1000MP MARK-V", .mfg_name = "Yaesu", - .version = "20241105.0", + .version = "20241105.1", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -598,9 +598,9 @@ struct rig_caps ft1000mpmkv_caps = struct rig_caps ft1000mpmkvfld_caps = { RIG_MODEL(RIG_MODEL_FT1000MPMKVFLD), - .model_name = "MARK-V Field FT-1000MP", + .model_name = "FT-1000MP MARK-V Field", .mfg_name = "Yaesu", - .version = "20241105.0", + .version = "20241105.1", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, commit b4f0a3b4b3318564217fc0aea9fa558193d41c69 Author: George Baltz N3GB <Geo...@gm...> Date: Tue Jul 29 14:04:16 2025 -0400 Update NEWS diff --git a/NEWS b/NEWS index 9e32531fa..7cf1895e1 100644 --- a/NEWS +++ b/NEWS @@ -14,11 +14,13 @@ Version 5.x -- future Version 4.7.0 * 2025-12-01 (target) + * Functions rig_get_conf, rot_get_conf, amp_get_conf deprecated; + use *_get_conf2() instead. * 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: 673 + Output from `wc -l cppcheck.log` - 4.6.2: 981 now: 642 * Remove dead getopt code. GitHub PR #1709. (TNX Daniele Forsi) * Move rig_cache to separate(calloc) storage. Prepare for other moves. Issue #1420 commit 1c36377480cb13a2ea863a2fd8a045ce2c1ce5f3 Author: George Baltz N3GB <Geo...@gm...> Date: Tue Jul 29 13:10:28 2025 -0400 Still more cppcheck tweaks diff --git a/rigs/icom/icr8500.c b/rigs/icom/icr8500.c index 00b6203d8..9aadadde5 100644 --- a/rigs/icom/icr8500.c +++ b/rigs/icom/icr8500.c @@ -57,7 +57,7 @@ { 238, 60 }, \ } } -int icr8500_set_func(RIG *rig, vfo_t vfo, setting_t func, int status); +static int icr8500_set_func(RIG *rig, vfo_t vfo, setting_t func, int status); static struct icom_priv_caps icr8500_priv_caps = { @@ -199,7 +199,7 @@ struct rig_caps icr8500_caps = .hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS }; -int icr8500_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) +static int icr8500_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) { switch (func) { diff --git a/rigs/yaesu/ft817.c b/rigs/yaesu/ft817.c index cf6a0167d..0ca3a6bd8 100644 --- a/rigs/yaesu/ft817.c +++ b/rigs/yaesu/ft817.c @@ -674,7 +674,7 @@ static inline long timediff(const struct timeval *tv1, return ((tv.tv_sec * 1000L) + (tv.tv_usec / 1000L)); } -static int check_cache_timeout(struct timeval *tv) +static int check_cache_timeout(const struct timeval *tv) { struct timeval curr; long t; diff --git a/rigs/yaesu/ft857.c b/rigs/yaesu/ft857.c index 3527b0e50..b195f3322 100644 --- a/rigs/yaesu/ft857.c +++ b/rigs/yaesu/ft857.c @@ -460,7 +460,7 @@ static inline long timediff(const struct timeval *tv1, return ((tv.tv_sec * 1000L) + (tv.tv_usec / 1000L)); } -static int check_cache_timeout(struct timeval *tv) +static int check_cache_timeout(const struct timeval *tv) { struct timeval curr; long t; diff --git a/rigs/yaesu/ft897.c b/rigs/yaesu/ft897.c index d16a8cef6..7e3f33bbb 100644 --- a/rigs/yaesu/ft897.c +++ b/rigs/yaesu/ft897.c @@ -594,7 +594,7 @@ static inline long timediff(const struct timeval *tv1, return ((tv.tv_sec * 1000L) + (tv.tv_usec / 1000L)); } -static int check_cache_timeout(struct timeval *tv) +static int check_cache_timeout(const struct timeval *tv) { struct timeval curr; long t; diff --git a/rotators/ts7400/include/peekpoke.c b/rotators/ts7400/include/peekpoke.c index 7ddb08383..544c2a7c2 100644 --- a/rotators/ts7400/include/peekpoke.c +++ b/rotators/ts7400/include/peekpoke.c @@ -4,7 +4,7 @@ #include<stdio.h> #include<fcntl.h> -unsigned int parseBinary(char *str) +unsigned int parseBinary(const char *str) { unsigned int val = 0; diff --git a/rotators/ts7400/include/readADC.c b/rotators/ts7400/include/readADC.c index 8bc9996d2..d91d8ffc7 100644 --- a/rotators/ts7400/include/readADC.c +++ b/rotators/ts7400/include/readADC.c @@ -76,7 +76,7 @@ empty_calibration: return 0; } -void write_calibration(int cal[NUM_CHANNELS][2]) +void write_calibration(const int cal[NUM_CHANNELS][2]) { unsigned short buf[16]; int i, j, k = 0; @@ -107,7 +107,7 @@ static void erase_calibration() } int check_calibration(int cal[NUM_CHANNELS][2], - int stored_cal[NUM_CHANNELS][2], int state) + const int stored_cal[NUM_CHANNELS][2], int state) { double pcnt_diff; int i, j, erase_cal = 0; diff --git a/rotators/ts7400/include/test7400ADC.c b/rotators/ts7400/include/test7400ADC.c index 96201e653..f03954ad5 100644 --- a/rotators/ts7400/include/test7400ADC.c +++ b/rotators/ts7400/include/test7400ADC.c @@ -74,7 +74,7 @@ empty_calibration: return 0; } -void write_calibration(int cal[NUM_CHANNELS][2]) +void write_calibration(const int cal[NUM_CHANNELS][2]) { unsigned short buf[16]; int i, j, k = 0; @@ -105,7 +105,7 @@ static void erase_calibration() } int check_calibration(int cal[NUM_CHANNELS][2], - int stored_cal[NUM_CHANNELS][2], int state) + const int stored_cal[NUM_CHANNELS][2], int state) { double pcnt_diff; int i, j, erase_cal = 0; diff --git a/security/aes.c b/security/aes.c index 9333b8a04..23fb3dac7 100644 --- a/security/aes.c +++ b/security/aes.c @@ -63,7 +63,7 @@ int do_init = 1; #define XTIME(x) ( ( x << 1 ) ^ ( ( x & 0x80 ) ? 0x1B : 0x00 ) ) #define MUL(x,y) ( ( x && y ) ? pow[(log[x] + log[y]) % 255] : 0 ) -void aes_gen_tables(void) +static void aes_gen_tables(void) { int i; uint8 x, y; diff --git a/security/md5.c b/security/md5.c index 9baf0a048..191cfe664 100644 --- a/security/md5.c +++ b/security/md5.c @@ -1,6 +1,6 @@ #include "md5.h" -char *make_digest(const unsigned char *digest, int len) /* {{{ */ +static char *make_digest(const unsigned char *digest, int len) /* {{{ */ { int md5len = sizeof(char) * (len * 2 + 1); char *md5str = (char *) calloc(1, md5len); @@ -64,7 +64,7 @@ char *make_digest(const unsigned char *digest, int len) /* {{{ */ * This processes one or more 64-byte data blocks, but does NOT update * the bit counters. There are no alignment requirements. */ -const void *body(void *ctxBuf, const void *data, size_t size) +static const void *body(void *ctxBuf, const void *data, size_t size) { MD5_CTX *ctx = (MD5_CTX *)ctxBuf; const unsigned char *ptr; @@ -174,7 +174,7 @@ const void *body(void *ctxBuf, const void *data, size_t size) return ptr; } -void MD5Init(void *ctxBuf) +static void MD5Init(void *ctxBuf) { MD5_CTX *ctx = (MD5_CTX *)ctxBuf; ctx->a = 0x67452301; @@ -186,7 +186,7 @@ void MD5Init(void *ctxBuf) ctx->hi = 0; } -void MD5Update(void *ctxBuf, const void *data, size_t size) +static void MD5Update(void *ctxBuf, const void *data, size_t size) { MD5_CTX *ctx = (MD5_CTX *)ctxBuf; MD5_u32plus saved_lo; @@ -229,7 +229,7 @@ void MD5Update(void *ctxBuf, const void *data, size_t size) memcpy(ctx->buffer, data, size); } -void MD5Final(unsigned char *result, void *ctxBuf) +static void MD5Final(unsigned char *result, void *ctxBuf) { MD5_CTX *ctx = (MD5_CTX *)ctxBuf; MD5_u32plus used, free; @@ -282,7 +282,7 @@ void MD5Final(unsigned char *result, void *ctxBuf) memset(ctx, 0, sizeof(*ctx)); } -unsigned char *make_hash(const char *arg) +static unsigned char *make_hash(const char *arg) { MD5_CTX context; static unsigned char digest[65]; diff --git a/security/sha256.c b/security/sha256.c index 811cee623..4a010ebb4 100644 --- a/security/sha256.c +++ b/security/sha256.c @@ -53,7 +53,7 @@ void sha256_starts(sha256_context *ctx) ctx->state[7] = 0x5BE0CD19; } -void sha256_process(sha256_context *ctx, const uint8 data[64]) +static void sha256_process(sha256_context *ctx, const uint8 data[64]) { uint32 temp1, temp2, W[64]; uint32 A, B, C, D, E, F, G, H; diff --git a/simulators/simft990.c b/simulators/simft990.c index 06dca62a6..5dbb569ea 100644 --- a/simulators/simft990.c +++ b/simulators/simft990.c @@ -49,7 +49,7 @@ typedef enum nc_rigid_e NC_RIGID_FTDX101MP = 682 } nc_rigid_t; -void load_dat(const char *filename, unsigned char buf[1492]) +static void load_dat(const char *filename, unsigned char buf[1492]) { FILE *fp = fopen(filename, "r"); char line[4096]; diff --git a/tests/testnet.c b/tests/testnet.c index aff0b9a62..1d1f1f45d 100644 --- a/tests/testnet.c +++ b/tests/testnet.c @@ -106,7 +106,7 @@ static int test_host(char *hoststr, char host[256], char port[6]) } int -main(int argc, char *argv[]) +main(int argc, const char *argv[]) { // IPV4 test_host("127.0.0.1", "127.0.0.1", ""); commit 72bc62366d1b4f9958a94480a172af773a93f72b Author: George Baltz N3GB <Geo...@gm...> Date: Mon Jul 28 19:31:20 2025 -0400 A few more cppcheck messages silenced diff --git a/rigs/anytone/anytone.c b/rigs/anytone/anytone.c index 24b94282b..3945d08f6 100644 --- a/rigs/anytone/anytone.c +++ b/rigs/anytone/anytone.c @@ -46,7 +46,7 @@ // --------------------------------------------------------------------------- #include "anytone.h" -int anytone_transaction(RIG *rig, unsigned char *cmd, int cmd_len, +static int anytone_transaction(RIG *rig, unsigned char *cmd, int cmd_len, unsigned char *reply, int reply_len, int expected_len); DECLARE_INITRIG_BACKEND(anytone) @@ -94,7 +94,7 @@ DECLARE_PROBERIG_BACKEND(anytone) // AnyTone needs a keep-alive to emulate the MIC // Apparently to keep the rig from getting stuck in PTT if mic disconnects -void *anytone_thread(void *vrig) +static void *anytone_thread(void *vrig) { RIG *rig = (RIG *)vrig; hamlib_port_t *rp = RIGPORT(rig); @@ -135,7 +135,7 @@ void *anytone_thread(void *vrig) // --------------------------------------------------------------------------- // anytone_send // --------------------------------------------------------------------------- -int anytone_send(RIG *rig, +static int anytone_send(RIG *rig, unsigned char *cmd, int cmd_len) { int retval = RIG_OK; @@ -154,7 +154,7 @@ int anytone_send(RIG *rig, // --------------------------------------------------------------------------- // anytone_receive // --------------------------------------------------------------------------- -int anytone_receive(RIG *rig, unsigned char *buf, int buf_len, int expected) +static int anytone_receive(RIG *rig, unsigned char *buf, int buf_len, int expected) { int retval = RIG_OK; hamlib_port_t *rp = RIGPORT(rig); @@ -178,7 +178,7 @@ int anytone_receive(RIG *rig, unsigned char *buf, int buf_len, int expected) // --------------------------------------------------------------------------- // anytone_transaction // --------------------------------------------------------------------------- -int anytone_transaction(RIG *rig, unsigned char *cmd, int cmd_len, +static int anytone_transaction(RIG *rig, unsigned char *cmd, int cmd_len, unsigned char *reply, int reply_len, int expected_len) { int retval = RIG_OK; @@ -293,8 +293,12 @@ int anytone_open(RIG *rig) int anytone_close(RIG *rig) { int retval = RIG_OK; + anytone_priv_data_t *p = STATE(rig)->priv; ENTERFUNC; + + // Tell thread to give up + p->runflag = 0; char *cmd = "+ADATA:00,000\r\n"; anytone_transaction(rig, (unsigned char *)cmd, strlen(cmd), NULL, 0, 0); diff --git a/rigs/drake/drake.c b/rigs/drake/drake.c index db1c30a66..0fe7d5f66 100644 --- a/rigs/drake/drake.c +++ b/rigs/drake/drake.c @@ -62,9 +62,9 @@ */ void drake_fix_string(char* inStr) { - char chChkAry[3] = {0x20, 0x0d, 0x0a}; - char* chRepAry[3] = {"<SP>", "<CR>", "<LF>"}; - char* chPos; + const char chChkAry[3] = {0x20, 0x0d, 0x0a}; + const char* chRepAry[3] = {"<SP>", "<CR>", "<LF>"}; + const char* chPos; int newLen; int offset; int i; @@ -108,7 +108,7 @@ void drake_trans_rept(char* hdrStr, char* sentStr, int sentLen, char* recdStr, i { char sent[BUFSZ]; char recd[BUFSZ]; - char nullStr[7] = {'<','N','U','L','L','>',0x00}; + const char nullStr[7] = {'<','N','U','L','L','>',0x00}; int i; //in most cases each string is a buffer, so we need to ensure both command and response @@ -1583,7 +1583,7 @@ DECLARE_PROBERIG_BACKEND(drake) close(port->fd); - if (retval != RIG_OK || id_len <= 0 || id_len >= BUFSZ) + if (retval != RIG_OK || id_len <= 1 || id_len >= BUFSZ) { return RIG_MODEL_NONE; } diff --git a/rotators/androidsensor/androidsensor.cpp b/rotators/androidsensor/androidsensor.cpp index cff44d409..d970647be 100644 --- a/rotators/androidsensor/androidsensor.cpp +++ b/rotators/androidsensor/androidsensor.cpp @@ -143,7 +143,6 @@ const struct rot_caps androidsensor_rot_caps = /* ************************************************************************* */ -// cppcheck-suppress syntaxError DECLARE_INITROT_BACKEND(androidsensor) { rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); diff --git a/rotators/indi/indi_wrapper.cpp b/rotators/indi/indi_wrapper.cpp index c766c8af2..0ae8f1758 100644 --- a/rotators/indi/indi_wrapper.cpp +++ b/rotators/indi/indi_wrapper.cpp @@ -462,9 +462,7 @@ int RotINDIClient::setPosition(azimuth_t az, elevation_t el) return RIG_OK; } -// cppcheck-suppress unusedFunction void RotINDIClient::removeDevice(INDI::BaseDevice *dp) {} -// cppcheck-suppress unusedFunction void RotINDIClient::newProperty(INDI::Property *property) { std::string name(property->getName()); @@ -491,13 +489,9 @@ void RotINDIClient::newProperty(INDI::Property *property) mEl = property->getNumber()->np[1].value; } } -// cppcheck-suppress unusedFunction void RotINDIClient::removeProperty(INDI::Property *property) {} -// cppcheck-suppress unusedFunction void RotINDIClient::newBLOB(IBLOB *bp) {} -// cppcheck-suppress unusedFunction void RotINDIClient::newSwitch(ISwitchVectorProperty *svp) {} -// cppcheck-suppress unusedFunction void RotINDIClient::newNumber(INumberVectorProperty *nvp) { std::string name(nvp->name); @@ -508,22 +502,16 @@ void RotINDIClient::newNumber(INumberVectorProperty *nvp) mEl = nvp->np[1].value; } } -// cppcheck-suppress unusedFunction void RotINDIClient::newMessage(INDI::BaseDevice *dp, int messageID) {} -// cppcheck-suppress unusedFunction void RotINDIClient::newText(ITextVectorProperty *tvp) {} -// cppcheck-suppress unusedFunction void RotINDIClient::newLight(ILightVectorProperty *lvp) {} -// cppcheck-suppress unusedFunction void RotINDIClient::newDevice(INDI::BaseDevice *dp) {} -// cppcheck-suppress unusedFunction void RotINDIClient::serverConnected() { rig_debug(RIG_DEBUG_VERBOSE, "indi: server connected\n"); } -// cppcheck-suppress unusedFunction void RotINDIClient::serverDisconnected(int exit_code) { rig_debug(RIG_DEBUG_VERBOSE, "indi: server disconnected\n"); diff --git a/src/network.c b/src/network.c index 0d37e392f..4c6242712 100644 --- a/src/network.c +++ b/src/network.c @@ -1000,7 +1000,7 @@ static int multicast_publisher_read_packet(multicast_publisher_args return (RIG_OK); } -void *multicast_publisher(void *arg) +static void *multicast_publisher(void *arg) { unsigned char spectrum_data[HAMLIB_MAX_SPECTRUM_DATA]; char snapshot_buffer[HAMLIB_MAX_SNAPSHOT_PACKET_SIZE]; @@ -1257,7 +1257,7 @@ int is_wireless() #include <unistd.h> #include <ifaddrs.h> -int is_networked(char *ipv4, int ipv4_length) +static int is_networked(char *ipv4, int ipv4_length) { struct ifaddrs *interfaces, *iface; char addr_str[INET_ADDRSTRLEN]; @@ -1345,7 +1345,7 @@ int is_wireless() #endif #endif -void *multicast_receiver(void *arg) +static void *multicast_receiver(void *arg) { char data[4096]; char ip4[INET6_ADDRSTRLEN]; diff --git a/tests/rigmatrix.c b/tests/rigmatrix.c index f574143ea..cb2f198da 100644 --- a/tests/rigmatrix.c +++ b/tests/rigmatrix.c @@ -34,7 +34,7 @@ static setting_t bitmap_func, bitmap_level, bitmap_parm, bitmap_vfo_ops; -int create_png_range(const freq_range_t rx_range_list[], +static int create_png_range(const freq_range_t rx_range_list[], const freq_range_t tx_range_list[], int num); int print_caps_sum(struct rig_caps *caps, void *data) @@ -566,7 +566,6 @@ static void draw_range(const freq_range_t range_list[], } } - static int create_png_range(const freq_range_t rx_range_list[], const freq_range_t tx_range_list[], int num) diff --git a/tests/rigmem.c b/tests/rigmem.c index 8b2c9cfb8..84b8eaf68 100644 --- a/tests/rigmem.c +++ b/tests/rigmem.c @@ -58,7 +58,7 @@ void usage(); void version(); static int set_conf(RIG *rig, char *conf_parms); -int clear_chans(RIG *rig, const char *infilename); +static int clear_chans(RIG *rig, const char *infilename); /* * Reminder: when adding long options, @@ -450,7 +450,7 @@ static int set_conf(RIG *rig, char *conf_parms) /* * Pretty nasty, clears everything you have in rig memory */ -int clear_chans(RIG *rig, const char *infilename) +static int clear_chans(RIG *rig, const char *infilename) { int i, j, ret; channel_t chan; diff --git a/tests/rotctl_parse.c b/tests/rotctl_parse.c index 09b27c56f..9c0553e2f 100644 --- a/tests/rotctl_parse.c +++ b/tests/rotctl_parse.c @@ -246,7 +246,7 @@ struct test_table test_list[] = }; -struct test_table *find_cmd_entry(int cmd) +static struct test_table *find_cmd_entry(int cmd) { int i; @@ -286,7 +286,7 @@ struct mod_lst struct mod_lst *models = NULL; /* Add model information to the hash */ -void hash_add_model(int id, +static void hash_add_model(int id, const char *mfg_name, const char *model_name, const char *version, @@ -309,20 +309,20 @@ void hash_add_model(int id, /* Hash sorting functions */ -int hash_model_id_sort(const struct mod_lst *a, const struct mod_lst *b) +static int hash_model_id_sort(const struct mod_lst *a, const struct mod_lst *b) { return (a->id > b->id); } -void hash_sort_by_model_id() +static void hash_sort_by_model_id() { HASH_SORT(models, hash_model_id_sort); } /* Delete hash */ -void hash_delete_all() +static void hash_delete_all() { struct mod_lst *current_model, *tmp = NULL; @@ -372,7 +372,7 @@ static void rp_getline(const char *s) /* * TODO: use Lex? */ -char parse_arg(const char *arg) +static char parse_arg(const char *arg) { int i; diff --git a/tests/test2038.c b/tests/test2038.c index cb439548c..d7337008c 100644 --- a/tests/test2038.c +++ b/tests/test2038.c @@ -6,7 +6,7 @@ Does fail when compiled with gcc -m32 -o test2038 test2038.c #include <time.h> #include <string.h> -int test2038(void) +static int test2038(void) { time_t x; diff --git a/tests/testnet.c b/tests/testnet.c index ab11f0dd9..aff0b9a62 100644 --- a/tests/testnet.c +++ b/tests/testnet.c @@ -25,7 +25,7 @@ # include <arpa/inet.h> #endif -int rig_network_addr(char *hoststr, char *portstr) +static int rig_network_addr(char *hoststr, char *portstr) { struct in6_addr serveraddr; @@ -73,7 +73,7 @@ int rig_network_addr(char *hoststr, char *portstr) return 0; } -int test_host(char *hoststr, char host[256], char port[6]) +static int test_host(char *hoststr, char host[256], char port[6]) { int status; char host2[256], port2[6]; diff --git a/tests/testtrn.c b/tests/testtrn.c index ce3793acd..2333d8e0e 100644 --- a/tests/testtrn.c +++ b/tests/testtrn.c @@ -14,7 +14,7 @@ #define SERIAL_PORT "/dev/ttyS0" -int myfreq_event(RIG *rig, vfo_t vfo, freq_t freq, rig_ptr_t arg) +static int myfreq_event(RIG *rig, vfo_t vfo, freq_t freq, rig_ptr_t arg) { int *count_ptr = (int *) arg; commit e172d343816c8514b9892375851bc4bf9ed6f81b Author: George Baltz N3GB <Geo...@gm...> Date: Mon Jul 28 11:32:34 2025 -0400 Deprecate amp_get_conf(), too diff --git a/c++/ampclass.cc b/c++/ampclass.cc index 72509c6d7..401051aed 100644 --- a/c++/ampclass.cc +++ b/c++/ampclass.cc @@ -74,13 +74,21 @@ void Amplifier::setConf(const char *name, const char *val) CHECK_AMP( amp_set_conf(theAmp, tokenLookup(name), val) ); } -void Amplifier::getConf(hamlib_token_t token, char *val) +HL_DEPRECATED void Amplifier::getConf(hamlib_token_t token, char *val) { - CHECK_AMP( amp_get_conf(theAmp, token, val) ); + CHECK_AMP( amp_get_conf2(theAmp, token, val, 128) ); } -void Amplifier::getConf(const char *name, char *val) +HL_DEPRECATED void Amplifier::getConf(const char *name, char *val) { - CHECK_AMP( amp_get_conf(theAmp, tokenLookup(name), val) ); + CHECK_AMP( amp_get_conf2(theAmp, tokenLookup(name), val, 128) ); +} +void Amplifier::getConf2(hamlib_token_t token, char *val, int val_len) +{ + CHECK_AMP( amp_get_conf2(theAmp, token, val, val_len) ); +} +void Amplifier::getConf2(const char *name, char *val, int val_len) +{ + CHECK_AMP( amp_get_conf2(theAmp, tokenLookup(name), val, val_len) ); } hamlib_token_t Amplifier::tokenLookup(const char *name) diff --git a/include/hamlib/ampclass.h b/include/hamlib/ampclass.h index 1bb5876b7..31415c6dd 100644 --- a/include/hamlib/ampclass.h +++ b/include/hamlib/ampclass.h @@ -57,6 +57,8 @@ public: void setConf(const char *name, const char *val); void getConf(hamlib_token_t token, char *val); void getConf(const char *name, char *val); + void getConf2(hamlib_token_t token, char *val, int val_len); + void getConf2(const char *name, char *val, int val_len); hamlib_token_t tokenLookup(const char *name); void setFreq(freq_t freq); diff --git a/include/hamlib/amplifier.h b/include/hamlib/amplifier.h index dd1ab62b4..f49d1d37f 100644 --- a/include/hamlib/amplifier.h +++ b/include/hamlib/amplifier.h @@ -232,7 +232,7 @@ struct amp_caps int (*get_freq)(AMP *amp, freq_t *val); /*!< Pointer to backend implementation of amp_get_freq(). */ int (*set_conf)(AMP *amp, hamlib_token_t token, const char *val); /*!< Pointer to backend implementation of amp_set_conf(). */ - int (*get_conf2)(AMP *amp, hamlib_token_t token, char *val, int val_len); /*!< Pointer to backend implementation of amp_get_conf(). */ + int (*get_conf2)(AMP *amp, hamlib_token_t token, char *val, int val_len); /*!< Pointer to backend implementation of amp_get_conf2(). */ int (*get_conf)(AMP *amp, hamlib_token_t token, char *val); /*!< Pointer to backend implementation of amp_get_conf(). */ /* @@ -310,11 +310,16 @@ extern HAMLIB_EXPORT(int) amp_set_conf HAMLIB_PARAMS((AMP *amp, hamlib_token_t token, const char *val)); -extern HAMLIB_EXPORT(int) +HL_DEPRECATED extern HAMLIB_EXPORT(int) amp_get_conf HAMLIB_PARAMS((AMP *amp, hamlib_token_t token, char *val)); extern HAMLIB_EXPORT(int) +amp_get_conf2 HAMLIB_PARAMS((AMP *amp, + hamlib_token_t token, + char *val, + int val_len)); +extern HAMLIB_EXPORT(int) amp_set_powerstat HAMLIB_PARAMS((AMP *amp, powerstat_t status)); extern HAMLIB_EXPORT(int) diff --git a/tests/ampctl_parse.c b/tests/ampctl_parse.c index b54bd0235..e359b20b6 100644 --- a/tests/ampctl_parse.c +++ b/tests/ampctl_parse.c @@ -1501,7 +1501,7 @@ int print_conf_list(const struct confparams *cfp, rig_ptr_t data) int i; char buf[128] = ""; - amp_get_conf(amp, cfp->token, buf); + amp_get_conf2(amp, cfp->token, buf, sizeof(buf)); printf("%s: \"%s\"\n" "\tDefault: %s, Value: %s\n", cfp->name, cfp->tooltip, commit faad247f06df484a0ad68a4f5e96cce9036761ac Author: George Baltz N3GB <Geo...@gm...> Date: Mon Jul 28 10:43:10 2025 -0400 Deprecate rot_get_conf() diff --git a/c++/rotclass.cc b/c++/rotclass.cc index daa47b711..ec18813f6 100644 --- a/c++/rotclass.cc +++ b/c++/rotclass.cc @@ -73,13 +73,21 @@ void Rotator::setConf(const char *name, const char *val) CHECK_ROT( rot_set_conf(theRot, tokenLookup(name), val) ); } -void Rotator::getConf(hamlib_token_t token, char *val) +HL_DEPRECATED void Rotator::getConf(hamlib_token_t token, char *val) { - CHECK_ROT( rot_get_conf(theRot, token, val) ); + CHECK_ROT( rot_get_conf2(theRot, token, val, 128) ); } -void Rotator::getConf(const char *name, char *val) +HL_DEPRECATED void Rotator::getConf(const char *name, char *val) { - CHECK_ROT( rot_get_conf(theRot, tokenLookup(name), val) ); + CHECK_ROT( rot_get_conf2(theRot, tokenLookup(name), val, 128) ); +} +void Rotator::getConf2(hamlib_token_t token, char *val, int val_len) +{ + CHECK_ROT( rot_get_conf2(theRot, token, val, val_len) ); +} +void Rotator::getConf2(const char *name, char *val, int val_len) +{ + CHECK_ROT( rot_get_conf2(theRot, tokenLookup(name), val, val_len) ); } hamlib_token_t Rotator::tokenLookup(const char *name) diff --git a/include/hamlib/rotator.h b/include/hamlib/rotator.h index a2f8283ee..88de79fd1 100644 --- a/include/hamlib/rotator.h +++ b/include/hamlib/rotator.h @@ -613,7 +613,7 @@ extern HAMLIB_EXPORT(int) rot_set_conf HAMLIB_PARAMS((ROT *rot, hamlib_token_t token, const char *val)); -extern HAMLIB_EXPORT(int) +HL_DEPRECATED extern HAMLIB_EXPORT(int) rot_get_conf HAMLIB_PARAMS((ROT *rot, hamlib_token_t token, char *val)); diff --git a/include/hamlib/rotclass.h b/include/hamlib/rotclass.h index 219e3a92f..5526f984c 100644 --- a/include/hamlib/rotclass.h +++ b/include/hamlib/rotclass.h @@ -55,6 +55,8 @@ public: void setConf(const char *name, const char *val); void getConf(hamlib_token_t token, char *val); void getConf(const char *name, char *val); + void getConf2(hamlib_token_t token, char *val, int len); + void getConf2(const char *name, char *val, int len); hamlib_token_t tokenLookup(const char *name); void setPosition(azimuth_t az, elevation_t el); diff --git a/rotators/grbltrk/grbltrk.c b/rotators/grbltrk/grbltrk.c index a1f024f78..b207f6a64 100644 --- a/rotators/grbltrk/grbltrk.c +++ b/rotators/grbltrk/grbltrk.c @@ -488,7 +488,7 @@ grbltrk_rot_open(ROT *rot) } else if (rot->caps->rot_model == ROT_MODEL_GRBLTRK_NET) { - rot_get_conf(rot, TOK_PATHNAME, host); + rot_get_conf2(rot, TOK_PATHNAME, host, sizeof(host)); rot_debug(RIG_DEBUG_ERR, "%s:%d ctrl via net, host [%s]\n", __func__, __LINE__, host); grbl_net_open(rot, 23); diff --git a/tests/rotctl_parse.c b/tests/rotctl_parse.c index ec4ed85b6..09b27c56f 100644 --- a/tests/rotctl_parse.c +++ b/tests/rotctl_parse.c @@ -1698,7 +1698,7 @@ declare_proto_rot(get_conf) else { char value[4096]; - ret = rot_get_conf(rot, rot_token_lookup(rot, arg1), value); + ret = rot_get_conf2(rot, rot_token_lookup(rot, arg1), value, sizeof(value)); if (ret != RIG_OK) { @@ -2917,7 +2917,7 @@ int print_conf_list2(const struct confparams *cfp, rig_ptr_t data, FILE *fout) ROT *rot = (ROT *) data; char buf[128] = ""; - rot_get_conf(rot, cfp->token, buf); + rot_get_conf2(rot, cfp->token, buf, sizeof(buf)); fprintf(fout, "%s: \"%s\"\n" "\t" "Default: %s, Value: %s\n", cfp->name, cfp->tooltip, ----------------------------------------------------------------------- Summary of changes: NEWS | 4 +++- c++/ampclass.cc | 16 ++++++++++++---- c++/rotclass.cc | 16 ++++++++++++---- include/hamlib/ampclass.h | 2 ++ include/hamlib/amplifier.h | 9 +++++++-- include/hamlib/rotator.h | 2 +- include/hamlib/rotclass.h | 2 ++ rigs/anytone/anytone.c | 14 +++++++++----- rigs/drake/drake.c | 10 +++++----- rigs/dummy/flrig.c | 6 +++--- rigs/dummy/gqrx.c | 4 ++-- rigs/icom/icr8500.c | 4 ++-- rigs/kenwood/flex6xxx.c | 6 +++--- rigs/yaesu/ft1000mp.c | 8 ++++---- rigs/yaesu/ft817.c | 2 +- rigs/yaesu/ft857.c | 2 +- rigs/yaesu/ft897.c | 2 +- rotators/androidsensor/androidsensor.cpp | 1 - rotators/grbltrk/grbltrk.c | 2 +- rotators/indi/indi_wrapper.cpp | 12 ------------ rotators/ts7400/include/peekpoke.c | 2 +- rotators/ts7400/include/readADC.c | 4 ++-- rotators/ts7400/include/test7400ADC.c | 4 ++-- security/aes.c | 2 +- security/md5.c | 12 ++++++------ security/sha256.c | 2 +- simulators/simft990.c | 2 +- src/network.c | 6 +++--- tests/ampctl_parse.c | 2 +- tests/rigmatrix.c | 3 +-- tests/rigmem.c | 4 ++-- tests/rotctl_parse.c | 16 ++++++++-------- tests/test2038.c | 2 +- tests/testnet.c | 6 +++--- tests/testtrn.c | 2 +- 35 files changed, 105 insertions(+), 88 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-07-28 00:04:56
|
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 48804dc4da2bb5e0035a2600a75f568b6e2280b3 (commit) via c0ec84ca4b8ce135af5d2c859ada50ce9e3e11eb (commit) via ed138699c343b3a0049a4d1bea84c2db35ef3d53 (commit) from 66acf19efedb17ad22a6734dbbed5b6b4466ba85 (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 48804dc4da2bb5e0035a2600a75f568b6e2280b3 Merge: 66acf19ef c0ec84ca4 Author: Nate Bargmann <n0...@n0...> Date: Sun Jul 27 18:45:52 2025 -0500 Merge GitHub PR #1819 commit c0ec84ca4b8ce135af5d2c859ada50ce9e3e11eb Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Jul 27 20:13:07 2025 +0200 Add default values for make (dist)check diff --git a/bindings/python/conftest.py b/bindings/python/conftest.py index 4f5510778..a91d7684d 100644 --- a/bindings/python/conftest.py +++ b/bindings/python/conftest.py @@ -20,6 +20,12 @@ def pytest_addoption(parser): metavar='ID', help='select rotator model number') parser.addoption('--rot-file', default=None, metavar='DEVICE', help='set device of the rotator to operate on') + else: + # fallbacks for invocations through a Makefile + parser.addoption('--model', type=int, default=1) + parser.addoption('--amp-file', default=None) + parser.addoption('--rig-file', default=None) + parser.addoption('--rot-file', default=None) parser.addoption('--serial-speed', type=int, default=0, metavar='BAUD', help='set serial speed of the serial port') parser.addoption('--hamlib-verbose', action='count', default=0, commit ed138699c343b3a0049a4d1bea84c2db35ef3d53 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Jul 27 19:53:45 2025 +0200 Add missing files for make distcheck diff --git a/bindings/Makefile.am b/bindings/Makefile.am index 41b44a92a..651a7328c 100644 --- a/bindings/Makefile.am +++ b/bindings/Makefile.am @@ -22,11 +22,15 @@ SWGDEP = \ EXTRA_DIST = $(SWGFILES) \ Makefile.PL perltest.pl tcltest.tcl.in \ + python/conftest.py \ python/generate_tests.py \ python/test_Hamlib_Amp_class.py \ - python/test_Hamlib_class.py \ python/test_Hamlib_Rig_class.py \ python/test_Hamlib_Rot_class.py \ + python/test_Hamlib_class.py \ + python/test_amp.py \ + python/test_rig.py \ + python/test_rot.py \ python/test_startup.py \ luatest.lua README.python ----------------------------------------------------------------------- Summary of changes: bindings/Makefile.am | 6 +++++- bindings/python/conftest.py | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-07-27 23:42:57
|
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 66acf19efedb17ad22a6734dbbed5b6b4466ba85 (commit) via 20eeb96787a1e2dd67e158b52337f64ab47517e7 (commit) via 6c372f981f08dd571f5fc47197fcce9fd076f007 (commit) via a7c8c3fa9ebf0aa1c2b6ef4b6c4b20ba2ded4014 (commit) from 53b7cef53797338f26e72e6646fdbf4ce170c2f6 (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 66acf19efedb17ad22a6734dbbed5b6b4466ba85 Merge: 53b7cef53 20eeb9678 Author: Nate Bargmann <n0...@n0...> Date: Sun Jul 27 18:01:00 2025 -0500 Merge GitHub PR #1818 commit 20eeb96787a1e2dd67e158b52337f64ab47517e7 Author: George Baltz N3GB <Geo...@gm...> Date: Sun Jul 27 11:31:18 2025 -0400 Deprecate rig_get_conf() Define macro to set attribute, if compiler is capable Add macro to rig_get_conf(), Rig::getConf() declarations Fix internal uses of rig_get_conf() diff --git a/c++/rigclass.cc b/c++/rigclass.cc index 218058ea0..db473e2f1 100644 --- a/c++/rigclass.cc +++ b/c++/rigclass.cc @@ -87,11 +87,19 @@ void Rig::setConf(const char *name, const char *val) void Rig::getConf(hamlib_token_t token, char *val) { - CHECK_RIG( rig_get_conf(theRig, token, val) ); + CHECK_RIG( rig_get_conf2(theRig, token, val, 128) ); } void Rig::getConf(const char *name, char *val) { - CHECK_RIG( rig_get_conf(theRig, tokenLookup(name), val) ); + CHECK_RIG( rig_get_conf2(theRig, tokenLookup(name), val, 128) ); +} +void Rig::getConf2(hamlib_token_t token, char *val, int val_len) +{ + CHECK_RIG( rig_get_conf2(theRig, token, val, val_len) ); +} +void Rig::getConf2(const char *name, char *val, int val_len) +{ + CHECK_RIG( rig_get_conf2(theRig, tokenLookup(name), val, val_len) ); } hamlib_token_t Rig::tokenLookup(const char *name) diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 3441a162b..7c79443a7 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -86,10 +86,18 @@ #if __has_c_attribute(fallthrough) #define HL_FALLTHROUGH [[fallthrough]]; #else -/* Fall back */ +/* Fall back to nothing */ #define HL_FALLTHROUGH #endif +// Macro to mark function or variable as deprecated/obsolete +#if __has_c_attribute(deprecated) +#define HL_DEPRECATED [[deprecated]] +#else +// Make it vanish +#define HL_DEPRECATED +#endif + /** * \addtogroup rig * @{ @@ -2959,7 +2967,7 @@ rig_set_conf HAMLIB_PARAMS((RIG *rig, hamlib_token_t token, const char *val)); // deprecating rig_get_conf -extern HAMLIB_EXPORT(int) +HL_DEPRECATED extern HAMLIB_EXPORT(int) rig_get_conf HAMLIB_PARAMS((RIG *rig, hamlib_token_t token, char *val)); diff --git a/include/hamlib/rigclass.h b/include/hamlib/rigclass.h index 23b4738fd..6a0e428ff 100644 --- a/include/hamlib/rigclass.h +++ b/include/hamlib/rigclass.h @@ -56,8 +56,10 @@ public: void setConf(hamlib_token_t token, const char *val); void setConf(const char *name, const char *val); - void getConf(hamlib_token_t token, char *val); - void getConf(const char *name, char *val); + HL_DEPRECATED void getConf(hamlib_token_t token, char *val); + HL_DEPRECATED void getConf(const char *name, char *val); + void getConf2(hamlib_token_t token, char *val, int val_len); + void getConf2(const char *name, char *val, int val_len); hamlib_token_t tokenLookup(const char *name); void setFreq(freq_t freq, vfo_t vfo = RIG_VFO_CURR); diff --git a/rigs/flexradio/dttsp.c b/rigs/flexradio/dttsp.c index 2a24b70f1..24ca388fb 100644 --- a/rigs/flexradio/dttsp.c +++ b/rigs/flexradio/dttsp.c @@ -462,7 +462,7 @@ static int dttsp_get_conf2(RIG *rig, hamlib_token_t token, char *val, int val_le /* if it's not for the dttsp backend, maybe it's for the tuner */ if (priv->tuner) { - return rig_get_conf(priv->tuner, token, val); + return rig_get_conf2(priv->tuner, token, val, val_len); } else { diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index d650a2b9b..4db850e87 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -2014,7 +2014,7 @@ int print_conf_list(const struct confparams *cfp, rig_ptr_t data) int i; char buf[128] = ""; - rig_get_conf(rig, cfp->token, buf); + rig_get_conf2(rig, cfp->token, buf, sizeof(buf)); printf("%s: \"%s\"\n" "\t" "Default: %s, Value: %s\n", cfp->name, cfp->tooltip, @@ -2078,7 +2078,7 @@ int print_conf_list2(const struct confparams *cfp, rig_ptr_t data) RIG *rig = (RIG *) data; char buf[128] = ""; - rig_get_conf(rig, cfp->token, buf); + rig_get_conf2(rig, cfp->token, buf, sizeof(buf)); fprintf(stdout, "%s: \"%s\"\n" "\t" "Default: %s, Value: %s\n", cfp->name, cfp->tooltip, @@ -6025,7 +6025,7 @@ declare_proto_rig(get_conf) else { char value[4096]; // no max value known -- should we limit it? - ret = rig_get_conf(rig, mytoken, value); + ret = rig_get_conf2(rig, mytoken, value, sizeof(value)); if (ret != RIG_OK) { commit 6c372f981f08dd571f5fc47197fcce9fd076f007 Author: George Baltz N3GB <Geo...@gm...> Date: Sat Jul 26 21:56:39 2025 -0400 Distinguish wanted from unwanted fall through instances Compile with -Wimplicit-fallthrough; analyze the results. Define macro to mark valid fall through constructs. Mark all of the good ones, and fix the bad. Not available with all compilers - for those without the feature this commit does nothing. diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index c5df12297..3441a162b 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -73,6 +73,23 @@ #include <hamlib/riglist.h> //#include <hamlib/config.h> +/* Define macros for handling attributes, if the compiler implements them + * Should be available in c23-capable compilers, or c++11 ones + */ +// From ISO/IEC 9899:202y n3301 working draft +#ifndef __has_c_attribute +#define __has_c_attribute(x) 0 +#endif + +// Macro to mark fallthrough as OK +// Squelch warnings if -Wimplicit-fallthrough added to CFLAGS +#if __has_c_attribute(fallthrough) +#define HL_FALLTHROUGH [[fallthrough]]; +#else +/* Fall back */ +#define HL_FALLTHROUGH +#endif + /** * \addtogroup rig * @{ diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 346dca79e..e1a00ea67 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -3393,6 +3393,7 @@ int icom_set_vfo(RIG *rig, vfo_t vfo) rig_debug(RIG_DEBUG_ERR, "%s: unknown vfo '%s'\n", __func__, rig_strvfo(rs->current_vfo)); } + HL_FALLTHROUGH // Fall into outer default default: if (priv->x25cmdfails == 0 || priv_caps->x25x26_always) @@ -9111,12 +9112,14 @@ static int icom_parse_spectrum_frame(RIG *rig, size_t length, case SCOPE_MODE_FIXED: cache->spectrum_mode = RIG_SPECTRUM_MODE_FIXED; + HL_FALLTHROUGH case SCOPE_MODE_SCROLL_C: if (cache->spectrum_mode == RIG_SPECTRUM_MODE_NONE) { cache->spectrum_mode = RIG_SPECTRUM_MODE_CENTER_SCROLL; } + HL_FALLTHROUGH case SCOPE_MODE_SCROLL_F: if (cache->spectrum_mode == RIG_SPECTRUM_MODE_NONE) diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index 435bedf4e..ccb13c65a 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -5600,7 +5600,7 @@ int kenwood_send_morse(RIG *rig, vfo_t vfo, const char *msg) SNPRINTF(morsebuf, sizeof morsebuf, "KY2%s", m2); break; } - /* FALL THROUGH */ + HL_FALLTHROUGH default: /* the command must consist of 28 bytes 0x20 padded */ diff --git a/rigs/yaesu/ft847.c b/rigs/yaesu/ft847.c index 75af845c1..a166070d3 100644 --- a/rigs/yaesu/ft847.c +++ b/rigs/yaesu/ft847.c @@ -1298,6 +1298,7 @@ static int get_freq_and_mode(RIG *rig, vfo_t vfo, freq_t *freq, rmode_t *mode, case MD_CWN: *width = rig_passband_narrow(rig, RIG_MODE_CW); + HL_FALLTHROUGH case MD_CW: *mode = RIG_MODE_CW; @@ -1305,6 +1306,7 @@ static int get_freq_and_mode(RIG *rig, vfo_t vfo, freq_t *freq, rmode_t *mode, case MD_CWNR: *width = rig_passband_narrow(rig, RIG_MODE_CW); + HL_FALLTHROUGH case MD_CWR: *mode = RIG_MODE_CWR; @@ -1312,6 +1314,7 @@ static int get_freq_and_mode(RIG *rig, vfo_t vfo, freq_t *freq, rmode_t *mode, case MD_AMN: *width = rig_passband_narrow(rig, RIG_MODE_AM); + HL_FALLTHROUGH case MD_AM: *mode = RIG_MODE_AM; @@ -1319,6 +1322,7 @@ static int get_freq_and_mode(RIG *rig, vfo_t vfo, freq_t *freq, rmode_t *mode, case MD_FMN: *width = rig_passband_narrow(rig, RIG_MODE_FM); + HL_FALLTHROUGH case MD_FM: *mode = RIG_MODE_FM; diff --git a/rigs/yaesu/ft920.c b/rigs/yaesu/ft920.c index 41d58b350..bc525594e 100644 --- a/rigs/yaesu/ft920.c +++ b/rigs/yaesu/ft920.c @@ -794,6 +794,7 @@ static int ft920_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { return err; } + HL_FALLTHROUGH case RIG_VFO_MEM: /* MEM TUNE or user doesn't care */ case RIG_VFO_MAIN: @@ -965,6 +966,7 @@ static int ft920_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) { return err; } + HL_FALLTHROUGH case RIG_VFO_MEM: /* MEM TUNE or user doesn't care */ case RIG_VFO_MAIN: diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index fe88b7880..ccdc9c605 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -4414,9 +4414,9 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) case RIG_METER_VDD: SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), format, 5); break; + default: rig_debug(RIG_DEBUG_ERR, "%s: unknown val.i=%d\n", __func__, val.i); - - default: RETURNFUNC(-RIG_EINVAL); + RETURNFUNC(-RIG_EINVAL); } break; diff --git a/src/iofunc.c b/src/iofunc.c index 97d3ca135..99e75414f 100644 --- a/src/iofunc.c +++ b/src/iofunc.c @@ -408,8 +408,8 @@ int HAMLIB_API port_close(hamlib_port_t *p, rig_port_t port_type) default: rig_debug(RIG_DEBUG_ERR, "%s(): Unknown port type %d\n", __func__, port_type); + HL_FALLTHROUGH - /* fall through */ case RIG_PORT_DEVICE: ret = close(p->fd); } diff --git a/src/rig.c b/src/rig.c index dae5add5c..63019fdf8 100644 --- a/src/rig.c +++ b/src/rig.c @@ -3611,8 +3611,8 @@ int HAMLIB_API rig_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) { ptt = RIG_PTT_ON; } + HL_FALLTHROUGH - /* fall through */ case RIG_PTT_RIG_MICDATA: if (caps->set_ptt == NULL) { diff --git a/tests/uthash.h b/tests/uthash.h index 77a11c30e..6724600b1 100644 --- a/tests/uthash.h +++ b/tests/uthash.h @@ -412,15 +412,25 @@ do { hashv += keylen; \ switch ( _hj_k ) { \ case 11: hashv += ( (unsigned)_hj_key[10] << 24 ); \ + HL_FALLTHROUGH \ case 10: hashv += ( (unsigned)_hj_key[9] << 16 ); \ + HL_FALLTHROUGH \ case 9: hashv += ( (unsigned)_hj_key[8] << 8 ); \ + HL_FALLTHROUGH \ case 8: _hj_j += ( (unsigned)_hj_key[7] << 24 ); \ + HL_FALLTHROUGH \ case 7: _hj_j += ( (unsigned)_hj_key[6] << 16 ); \ + HL_FALLTHROUGH \ case 6: _hj_j += ( (unsigned)_hj_key[5] << 8 ); \ + HL_FALLTHROUGH \ case 5: _hj_j += _hj_key[4]; \ + HL_FALLTHROUGH \ case 4: _hj_i += ( (unsigned)_hj_key[3] << 24 ); \ + HL_FALLTHROUGH \ case 3: _hj_i += ( (unsigned)_hj_key[2] << 16 ); \ + HL_FALLTHROUGH \ case 2: _hj_i += ( (unsigned)_hj_key[1] << 8 ); \ + HL_FALLTHROUGH \ case 1: _hj_i += _hj_key[0]; \ } \ HASH_JEN_MIX(_hj_i, _hj_j, hashv); \ @@ -547,7 +557,9 @@ do { \ uint32_t _mur_k1=0; \ switch((keylen) & 3) { \ case 3: _mur_k1 ^= _mur_tail[2] << 16; \ + HL_FALLTHROUGH \ case 2: _mur_k1 ^= _mur_tail[1] << 8; \ + HL_FALLTHROUGH \ case 1: _mur_k1 ^= _mur_tail[0]; \ _mur_k1 *= _mur_c1; \ _mur_k1 = MUR_ROTL32(_mur_k1,15); \ commit a7c8c3fa9ebf0aa1c2b6ef4b6c4b20ba2ded4014 Author: George Baltz N3GB <Geo...@gm...> Date: Sat Jul 26 14:04:25 2025 -0400 Fix another unwanted fall through diff --git a/tests/rotctld.c b/tests/rotctld.c index f5a08d749..c3dedb52f 100644 --- a/tests/rotctld.c +++ b/tests/rotctld.c @@ -246,6 +246,7 @@ int main(int argc, char *argv[]) case 'O': el_offset = atof(optarg); + break; case 'v': verbose++; ----------------------------------------------------------------------- Summary of changes: c++/rigclass.cc | 12 ++++++++++-- include/hamlib/rig.h | 27 ++++++++++++++++++++++++++- include/hamlib/rigclass.h | 6 ++++-- rigs/flexradio/dttsp.c | 2 +- rigs/icom/icom.c | 3 +++ rigs/kenwood/kenwood.c | 2 +- rigs/yaesu/ft847.c | 4 ++++ rigs/yaesu/ft920.c | 2 ++ rigs/yaesu/newcat.c | 4 ++-- src/iofunc.c | 2 +- src/rig.c | 2 +- tests/rigctl_parse.c | 6 +++--- tests/rotctld.c | 1 + tests/uthash.h | 12 ++++++++++++ 14 files changed, 71 insertions(+), 14 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-07-27 23:00:20
|
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 53b7cef53797338f26e72e6646fdbf4ce170c2f6 (commit) via 464076f193f64f9ee9c52705185790ce51536a7e (commit) via 4c28ba0bde5d7d068660c7f3632f7846c0bdd6d3 (commit) via 95bd993dd76b731945f7a5ec9d46f0a2a236dd42 (commit) from 96d5abab4750fdd7c9a08ef3abbab14955923dfd (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 53b7cef53797338f26e72e6646fdbf4ce170c2f6 Merge: 96d5abab4 464076f19 Author: Nate Bargmann <n0...@n0...> Date: Sun Jul 27 17:10:45 2025 -0500 Merge GitHub PR #1817 commit 464076f193f64f9ee9c52705185790ce51536a7e Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Jul 27 16:23:09 2025 +0200 Disable Tcl bindings for macOS when running make distcheck diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 44db443ad..77953f3d9 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -94,4 +94,4 @@ jobs: run: make distcheck V=0 --no-print-directory AM_DISTCHECK_CONFIGURE_FLAGS="${{ matrix.configure_args }} --without-perl-binding" - name: make distcheck on macOS if: runner.os == 'macOS' - run: make distcheck V=0 --no-print-directory AM_DISTCHECK_CONFIGURE_FLAGS="${{ matrix.configure_args }} --without-perl-binding --without-lua-binding PYTHON=/opt/homebrew/bin/python3" + run: make distcheck V=0 --no-print-directory AM_DISTCHECK_CONFIGURE_FLAGS="${{ matrix.configure_args }} --without-perl-binding --without-lua-binding --without-tcl-binding PYTHON=/opt/homebrew/bin/python3" commit 4c28ba0bde5d7d068660c7f3632f7846c0bdd6d3 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Jul 27 15:56:51 2025 +0200 Run the TCL tests using the library from build diff --git a/bindings/Makefile.am b/bindings/Makefile.am index 9d66c1df9..5f4c84729 100644 --- a/bindings/Makefile.am +++ b/bindings/Makefile.am @@ -177,7 +177,7 @@ hamlibtcl_wrap.c: $(SWGDEP) -I$(top_srcdir)/bindings \ -o $@ $$(test -f hamlib.swg || echo '$(srcdir)/')hamlib.swg -do_subst = sed -e 's,[@]tcldir[@],$(tcldir),g' +do_subst = sed -e 's,[@]tcldir[@],$(tcldir),g' -e 's,[@]builddir[@],$(builddir),g' tcltest.tcl: tcltest.tcl.in Makefile $(AM_V_GEN)$(do_subst) < $(srcdir)/tcltest.tcl.in > tcltest.tcl diff --git a/bindings/tcltest.tcl.in b/bindings/tcltest.tcl.in index 51e9c0b70..1996224c4 100644 --- a/bindings/tcltest.tcl.in +++ b/bindings/tcltest.tcl.in @@ -6,7 +6,8 @@ exec tclsh "$0" "$@" lappend ::auto_path @tcldir@ ## Brute force loading -#load "@tcldir@/hamlibtcl.so" Hamlib +# load "@tcldir@/hamlibtcl.so" Hamlib ; # from the installation directory +load "@builddir@/.libs/hamlibtcl.so" Hamlib ; # from the build directory ## Preferred package loading package require hamlib commit 95bd993dd76b731945f7a5ec9d46f0a2a236dd42 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Jul 27 15:10:10 2025 +0200 Do not clobber the return value of failed tests While printing an error message is nice, it prevented "make check" to fail; and the other two binding didn't print any. diff --git a/bindings/Makefile.am b/bindings/Makefile.am index 41b44a92a..9d66c1df9 100644 --- a/bindings/Makefile.am +++ b/bindings/Makefile.am @@ -186,8 +186,7 @@ all-tcl: pkgIndex.tcl $(tcl_ltlib) tcltest.tcl check-tcl: all-tcl $(AM_V_at)cp $(builddir)/pkgIndex.tcl $(builddir)/.libs - $(AM_V_at)TCLLIBPATH=$(builddir)/.libs tclsh $(builddir)/tcltest.tcl \ - || echo "Tcl test failed" 1>&2 + $(AM_V_at)TCLLIBPATH=$(builddir)/.libs tclsh $(builddir)/tcltest.tcl $(AM_V_at)rm -f $(builddir)/.libs/pkgIndex.tcl install-tcl: @@ -220,8 +219,7 @@ Hamliblua_la_LTLIBRARIES = $(luaexec_ltlib) all-lua: $(luaexec_ltlib) check-lua: all-lua - $(AM_V_at)LUA_CPATH="$(abs_builddir)/.libs/?.so" $(LUA) $(srcdir)/luatest.lua \ - || echo "Lua test failed" 1>&2 + $(AM_V_at)LUA_CPATH="$(abs_builddir)/.libs/?.so" $(LUA) $(srcdir)/luatest.lua Hamlib.lua: hamliblua_wrap.c ----------------------------------------------------------------------- Summary of changes: .github/workflows/c-cpp.yml | 2 +- bindings/Makefile.am | 8 +++----- bindings/tcltest.tcl.in | 3 ++- 3 files changed, 6 insertions(+), 7 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-07-27 22:09: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 96d5abab4750fdd7c9a08ef3abbab14955923dfd (commit) via eb5a838f3051f2d8a05557192586c4720575153c (commit) via fae77e4c0273020844ea32abd7d64378820943d6 (commit) via 389155fcdf94973903d007c0599576cb2b9e47be (commit) via c4ee44b1353f6f9a802b6291e5628f00eee157d7 (commit) via 62e42eb4b3269d2f30ba37f4d3584cc064028ddf (commit) via 5c06c7b942151177f742e0da15bcd4b3b67b8eeb (commit) via e54c38c522559349eb8d21d4fbeed98243666f5f (commit) via 9574e761ff2fbc7b3bf1a758639837b0dd3cc6c0 (commit) via e83d72608b61261d99f4b9c86fa755f0bb051a55 (commit) via 36576f8e40e701a651e85c567201f9758f20545a (commit) via 43193681b02938b06987224a2c572495638467d2 (commit) via 9626c8b90dc4d76b3071e65dfb0372f4caba342c (commit) via 5319f8b31b70da31144ed46ece9523b7f7eace9d (commit) via a617863a238af7eab33e4d10a75dc3149cfff4e2 (commit) via 2199ff2bde6b2d7dff5a7bd9b5880ea2cacced17 (commit) via 3240d2f8d3d3a366c56d05249605a9a06123635b (commit) via 92fb82f2204f45673374c9e40177f3b824d34180 (commit) via ef2d2236b5267a2eaf395cb6ffdbd3627e40b4d2 (commit) via 292da125661bd647c0334f7673a2f37e05f46175 (commit) via 160c941e9e2018878bd876cd46ba78cb9add7e00 (commit) via 25aae7d8e2ebc06c7c7094c0d42ceea8bc3d2c82 (commit) via 90c56f3e1fc6d7d86d758076011408832197ca65 (commit) via 01bc71ab8a2d24545f6d48ff90bd9c5c5747011f (commit) via 2b1428fd3e41cc7830ded0d057fdac0a27d4c5b3 (commit) via 8901b210ee0a9ff399904f1516350e65e2ed6de0 (commit) via 13c2413bbaf3fb99c3448771b868ea3c5c032282 (commit) via 25a2a4447f01eaaec83f5a95903f6e300ba0534b (commit) from 0d543f9483f348c1f6bc8ff0375034590cf9da85 (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 96d5abab4750fdd7c9a08ef3abbab14955923dfd Merge: eb5a838f3 0d543f948 Author: dforsi <iu...@gm...> Date: Sun Jul 27 18:22:26 2025 +0200 Merge branch 'master' into fix/pytest commit eb5a838f3051f2d8a05557192586c4720575153c Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Jul 13 17:19:17 2025 +0200 Check datatype before actual value diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py index 8c8c0c672..597578289 100755 --- a/bindings/python/test_rig.py +++ b/bindings/python/test_rig.py @@ -58,8 +58,8 @@ class TestClass: assert rig.get_freq() == 5700000000.0 frequency = 5700000000.5 assert rig.set_freq(Hamlib.RIG_VFO_CURR, frequency) is None - assert rig.get_freq(Hamlib.RIG_VFO_CURR) == 5700000000.5 assert isinstance(rig.get_freq(Hamlib.RIG_VFO_CURR), float) + assert rig.get_freq(Hamlib.RIG_VFO_CURR) == 5700000000.5 # VFO commit fae77e4c0273020844ea32abd7d64378820943d6 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Jul 13 17:13:37 2025 +0200 Do the tests for set_vfo() and get_vfo() when the rig is open Hamlib returns -RIG_EINVAL if the rig is not open. diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py index 276841f6c..8c8c0c672 100755 --- a/bindings/python/test_rig.py +++ b/bindings/python/test_rig.py @@ -63,6 +63,8 @@ class TestClass: # VFO + assert rig.set_vfo(Hamlib.RIG_VFO_A) is None + assert rig.get_vfo() == Hamlib.RIG_VFO_A assert rig.set_split_vfo(Hamlib.RIG_SPLIT_OFF, Hamlib.RIG_VFO_A) is None assert rig.get_split_vfo(Hamlib.RIG_VFO_TX) == [Hamlib.RIG_SPLIT_OFF, Hamlib.RIG_VFO_A] assert rig.set_split_vfo(Hamlib.RIG_SPLIT_ON, Hamlib.RIG_VFO_B) is None @@ -163,7 +165,6 @@ class TestClass: assert isinstance(rig.get_trn(), int) # deprecated assert isinstance(rig.get_ts(), int) assert isinstance(rig.get_ts(Hamlib.RIG_VFO_CURR), int) - assert isinstance(rig.get_vfo(), 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 @@ -226,7 +227,6 @@ class TestClass: assert rig.set_split_vfo(0, 0, 0) is None assert rig.set_trn(0) is None # deprecated assert rig.set_ts(0, 0) is None - assert rig.set_vfo(0) is None assert rig.set_vfo_opt(0) is None assert rig.token_lookup("") is None assert rig.vfo_op(0, 0) is None commit 389155fcdf94973903d007c0599576cb2b9e47be Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Jul 13 17:04:55 2025 +0200 Do the tests for RIT and XIT when the rig is open Hamlib returns -RIG_EINVAL if the rig is not open. diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py index d0560b808..276841f6c 100755 --- a/bindings/python/test_rig.py +++ b/bindings/python/test_rig.py @@ -71,6 +71,15 @@ class TestClass: assert rig.get_split_vfo() == [Hamlib.RIG_SPLIT_OFF, Hamlib.RIG_VFO_B] assert rig.get_split_vfo(Hamlib.RIG_VFO_CURR) == [Hamlib.RIG_SPLIT_OFF, Hamlib.RIG_VFO_B] + # RIT and XIT + + assert rig.set_rit(Hamlib.RIG_VFO_CURR, 100) is None + assert rig.get_rit() == 100 + assert rig.get_rit(Hamlib.RIG_VFO_CURR) == 100 + assert rig.set_xit(Hamlib.RIG_VFO_CURR, 200) is None + assert rig.get_xit() == 200 + assert rig.get_xit(Hamlib.RIG_VFO_CURR) == 200 + # Antenna # FIXME should use a RIG_ANT_* constant but they aren't available in the bindings @@ -143,8 +152,6 @@ class TestClass: assert isinstance(rig.get_powerstat(), int) assert isinstance(rig.get_ptt(), int) assert isinstance(rig.get_ptt(Hamlib.RIG_VFO_CURR), int) - assert isinstance(rig.get_rit(), int) - assert isinstance(rig.get_rit(Hamlib.RIG_VFO_CURR), int) assert isinstance(rig.get_rptr_offs(), int) assert isinstance(rig.get_rptr_offs(Hamlib.RIG_VFO_CURR), int) assert isinstance(rig.get_rptr_shift(), int) @@ -159,8 +166,6 @@ class TestClass: assert isinstance(rig.get_vfo(), int) assert len(rig.get_vfo_info()) == 5 assert len(rig.get_vfo_info(Hamlib.RIG_VFO_CURR)) == 5 - assert isinstance(rig.get_xit(), int) - assert isinstance(rig.get_xit(Hamlib.RIG_VFO_CURR), int) # assert rig_has_get_func(0) FIXME not defined assert rig.has_get_level(0) is None # FIXME should return setting_t # assert rig_has_get_parm(0) FIXME not defined @@ -208,7 +213,6 @@ class TestClass: assert rig.set_parm(0, 0) is None assert rig.set_powerstat(0) is None assert rig.set_ptt(0, 0) is None - assert rig.set_rit(0, 0) is None assert rig.set_rptr_offs(0, 0) is None assert rig.set_rptr_shift(0, 0) is None assert rig.set_split_freq(0, 0) is None @@ -224,7 +228,6 @@ class TestClass: assert rig.set_ts(0, 0) is None assert rig.set_vfo(0) is None assert rig.set_vfo_opt(0) is None - assert rig.set_xit(0, 0) is None assert rig.token_lookup("") is None assert rig.vfo_op(0, 0) is None commit c4ee44b1353f6f9a802b6291e5628f00eee157d7 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Jul 13 16:51:29 2025 +0200 Swap arguments of Rig.set_dcs_sql() and make both mandatory Makes the signature of Rig.set_dcs_sql() similar to those of set_ctcss_sql() set_ctcss_tone() set_dcs_code() diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py index 2b86372f0..d0560b808 100755 --- a/bindings/python/test_rig.py +++ b/bindings/python/test_rig.py @@ -96,9 +96,8 @@ class TestClass: assert rig.set_dcs_code(Hamlib.RIG_VFO_CURR, 125) is None assert rig.get_dcs_code() == 125 assert rig.get_dcs_code(Hamlib.RIG_VFO_CURR) == 125 - assert rig.set_dcs_sql(311) is None - assert rig.get_dcs_sql() == 311 - assert rig.set_dcs_sql(134, Hamlib.RIG_VFO_CURR) is None + assert rig.set_dcs_sql(Hamlib.RIG_VFO_CURR, 134) is None + assert rig.get_dcs_sql() == 134 assert rig.get_dcs_sql(Hamlib.RIG_VFO_CURR) == 134 assert rig.close() is None diff --git a/bindings/rig.swg b/bindings/rig.swg index f2ee04e53..2245d0155 100644 --- a/bindings/rig.swg +++ b/bindings/rig.swg @@ -372,7 +372,7 @@ typedef channel_t * const_channel_t_p; METHOD3(set_ctcss_tone, tone_t) METHOD3(set_dcs_code, tone_t) METHOD3(set_ctcss_sql, tone_t) - METHOD1(set_dcs_sql, tone_t) + METHOD3(set_dcs_sql, tone_t) METHOD3(set_split_freq, freq_t) METHOD2_INIT(set_split_mode, rmode_t, pbwidth_t, RIG_PASSBAND_NORMAL) METHOD3_INIT(set_split_freq_mode, freq_t, rmode_t, pbwidth_t, RIG_PASSBAND_NORMAL) commit 62e42eb4b3269d2f30ba37f4d3584cc064028ddf Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Jul 12 22:40:36 2025 +0200 Do the tests for tones when the rig is open Hamlib returns -RIG_EINVAL if the rig is not open. diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py index b765b3e36..2b86372f0 100755 --- a/bindings/python/test_rig.py +++ b/bindings/python/test_rig.py @@ -85,6 +85,22 @@ class TestClass: assert rig.set_ant(RIG_ANT_1, option, Hamlib.RIG_VFO_CURR) is None assert rig.get_ant(RIG_ANT_CURR, Hamlib.RIG_VFO_A) == expected + # Squelch codes and tones + + assert rig.set_ctcss_sql(Hamlib.RIG_VFO_CURR, 885) is None + assert rig.get_ctcss_sql() == 885 + assert rig.get_ctcss_sql(Hamlib.RIG_VFO_CURR) == 885 + assert rig.set_ctcss_tone(Hamlib.RIG_VFO_CURR, 854) is None + assert rig.get_ctcss_tone() == 854 + assert rig.get_ctcss_tone(Hamlib.RIG_VFO_CURR) == 854 + assert rig.set_dcs_code(Hamlib.RIG_VFO_CURR, 125) is None + assert rig.get_dcs_code() == 125 + assert rig.get_dcs_code(Hamlib.RIG_VFO_CURR) == 125 + assert rig.set_dcs_sql(311) is None + assert rig.get_dcs_sql() == 311 + assert rig.set_dcs_sql(134, Hamlib.RIG_VFO_CURR) is None + assert rig.get_dcs_sql(Hamlib.RIG_VFO_CURR) == 134 + assert rig.close() is None assert rig.state.comm_state == 0 info = rig.get_info() @@ -105,16 +121,8 @@ class TestClass: assert isinstance(rig.get_channel(channel, Hamlib.RIG_VFO_CURR), Hamlib.channel) assert isinstance(rig.get_channel(channel, Hamlib.RIG_VFO_CURR, readonly), Hamlib.channel) assert isinstance(rig.get_conf(""), str) - assert isinstance(rig.get_ctcss_sql(), int) - assert isinstance(rig.get_ctcss_sql(Hamlib.RIG_VFO_CURR), int) - assert isinstance(rig.get_ctcss_tone(), int) - assert isinstance(rig.get_ctcss_tone(Hamlib.RIG_VFO_CURR), int) assert isinstance(rig.get_dcd(), int) assert isinstance(rig.get_dcd(Hamlib.RIG_VFO_CURR), int) - assert isinstance(rig.get_dcs_code(), int) - assert isinstance(rig.get_dcs_code(Hamlib.RIG_VFO_CURR), int) - assert isinstance(rig.get_dcs_sql(), int) - assert isinstance(rig.get_dcs_sql(Hamlib.RIG_VFO_CURR), int) assert isinstance(rig.get_ext_func(0), int) assert isinstance(rig.get_ext_func(0, 0), int) assert rig.get_ext_level(0) is None @@ -184,11 +192,6 @@ class TestClass: channel = Hamlib.channel(0, Hamlib.RIG_VFO_CURR) assert rig.set_channel(channel) is None assert rig.set_conf("", "") is None - assert rig.set_ctcss_sql(Hamlib.RIG_VFO_CURR, 0) is None - assert rig.set_ctcss_tone(Hamlib.RIG_VFO_CURR, 0) is None - assert rig.set_dcs_code(Hamlib.RIG_VFO_CURR, 0) is None - assert rig.set_dcs_sql(0) is None - assert rig.set_dcs_sql(0, Hamlib.RIG_VFO_CURR) is None assert rig.set_ext_func(0, 0) is None assert rig.set_ext_func(0, 0, 0) is None level = 0 commit 5c06c7b942151177f742e0da15bcd4b3b67b8eeb Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Jul 12 22:07:02 2025 +0200 Add tests for Rig.set_freq() and Rig.get_freq() diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py index 6590fa9f3..b765b3e36 100755 --- a/bindings/python/test_rig.py +++ b/bindings/python/test_rig.py @@ -51,6 +51,16 @@ class TestClass: info = rig.get_info() assert isinstance(info, str) + # Frequency + + frequency = 5700000000 + assert rig.set_freq(Hamlib.RIG_VFO_CURR, frequency) is None + assert rig.get_freq() == 5700000000.0 + frequency = 5700000000.5 + assert rig.set_freq(Hamlib.RIG_VFO_CURR, frequency) is None + assert rig.get_freq(Hamlib.RIG_VFO_CURR) == 5700000000.5 + assert isinstance(rig.get_freq(Hamlib.RIG_VFO_CURR), float) + # VFO assert rig.set_split_vfo(Hamlib.RIG_SPLIT_OFF, Hamlib.RIG_VFO_A) is None @@ -110,8 +120,6 @@ 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_freq(), float) - assert isinstance(rig.get_freq(Hamlib.RIG_VFO_CURR), float) assert isinstance(rig.get_func(0), int) assert isinstance(rig.get_func(0, 0), int) assert rig.get_info() is None @@ -189,8 +197,6 @@ 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 - freq = 5700000000 - assert rig.set_freq(Hamlib.RIG_VFO_CURR, freq) is None assert rig.set_func(0, 0, 0) is None assert rig.set_level(0, 0, 0) is None assert rig.set_mem(0, 0) is None commit e54c38c522559349eb8d21d4fbeed98243666f5f Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Jul 12 22:01:54 2025 +0200 Add comments to group tests diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py index b43dc9c9b..6590fa9f3 100755 --- a/bindings/python/test_rig.py +++ b/bindings/python/test_rig.py @@ -51,13 +51,17 @@ class TestClass: info = rig.get_info() assert isinstance(info, str) - assert rig.set_split_vfo(-600000, Hamlib.RIG_VFO_A) is None - assert rig.get_split_vfo(Hamlib.RIG_VFO_TX) == [-600000, 1] - assert rig.set_split_vfo(5000000, Hamlib.RIG_VFO_B) is None - assert rig.get_split_vfo(Hamlib.RIG_VFO_TX) == [5000000, 2] - assert rig.set_split_vfo(5000000, Hamlib.RIG_VFO_CURR) is None - assert rig.get_split_vfo() == [5000000, 1] - assert rig.get_split_vfo(Hamlib.RIG_VFO_CURR) == [5000000, 1] + # VFO + + assert rig.set_split_vfo(Hamlib.RIG_SPLIT_OFF, Hamlib.RIG_VFO_A) is None + assert rig.get_split_vfo(Hamlib.RIG_VFO_TX) == [Hamlib.RIG_SPLIT_OFF, Hamlib.RIG_VFO_A] + assert rig.set_split_vfo(Hamlib.RIG_SPLIT_ON, Hamlib.RIG_VFO_B) is None + assert rig.get_split_vfo(Hamlib.RIG_VFO_TX) == [Hamlib.RIG_SPLIT_ON, Hamlib.RIG_VFO_B] + assert rig.set_split_vfo(Hamlib.RIG_SPLIT_OFF, Hamlib.RIG_VFO_CURR) is None + assert rig.get_split_vfo() == [Hamlib.RIG_SPLIT_OFF, Hamlib.RIG_VFO_B] + assert rig.get_split_vfo(Hamlib.RIG_VFO_CURR) == [Hamlib.RIG_SPLIT_OFF, Hamlib.RIG_VFO_B] + + # Antenna # FIXME should use a RIG_ANT_* constant but they aren't available in the bindings RIG_ANT_1 = 1<<0 commit 9574e761ff2fbc7b3bf1a758639837b0dd3cc6c0 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Jul 12 21:48:53 2025 +0200 Add meaningful arguments diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py index 3197b1033..b43dc9c9b 100755 --- a/bindings/python/test_rig.py +++ b/bindings/python/test_rig.py @@ -92,15 +92,15 @@ class TestClass: assert isinstance(rig.get_channel(channel, Hamlib.RIG_VFO_CURR, readonly), Hamlib.channel) assert isinstance(rig.get_conf(""), str) assert isinstance(rig.get_ctcss_sql(), int) - assert isinstance(rig.get_ctcss_sql(0), int) + assert isinstance(rig.get_ctcss_sql(Hamlib.RIG_VFO_CURR), int) assert isinstance(rig.get_ctcss_tone(), int) - assert isinstance(rig.get_ctcss_tone(0), int) + assert isinstance(rig.get_ctcss_tone(Hamlib.RIG_VFO_CURR), int) assert isinstance(rig.get_dcd(), int) - assert isinstance(rig.get_dcd(Hamlib.RIG_VFO_CURR,), int) + assert isinstance(rig.get_dcd(Hamlib.RIG_VFO_CURR), int) assert isinstance(rig.get_dcs_code(), int) - assert isinstance(rig.get_dcs_code(0), int) + assert isinstance(rig.get_dcs_code(Hamlib.RIG_VFO_CURR), int) assert isinstance(rig.get_dcs_sql(), int) - assert isinstance(rig.get_dcs_sql(0), int) + assert isinstance(rig.get_dcs_sql(Hamlib.RIG_VFO_CURR), int) assert isinstance(rig.get_ext_func(0), int) assert isinstance(rig.get_ext_func(0, 0), int) assert rig.get_ext_level(0) is None @@ -172,11 +172,11 @@ class TestClass: channel = Hamlib.channel(0, Hamlib.RIG_VFO_CURR) assert rig.set_channel(channel) is None assert rig.set_conf("", "") is None - assert rig.set_ctcss_sql(0, 0) is None - assert rig.set_ctcss_tone(0, 0) is None - assert rig.set_dcs_code(0, 0) is None + assert rig.set_ctcss_sql(Hamlib.RIG_VFO_CURR, 0) is None + assert rig.set_ctcss_tone(Hamlib.RIG_VFO_CURR, 0) is None + assert rig.set_dcs_code(Hamlib.RIG_VFO_CURR, 0) is None assert rig.set_dcs_sql(0) is None - assert rig.set_dcs_sql(0, 0) is None + assert rig.set_dcs_sql(0, Hamlib.RIG_VFO_CURR) is None assert rig.set_ext_func(0, 0) is None assert rig.set_ext_func(0, 0, 0) is None level = 0 commit e83d72608b61261d99f4b9c86fa755f0bb051a55 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Jul 12 20:14:04 2025 +0200 Fix the tests diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py index 0ecebd9bf..3197b1033 100755 --- a/bindings/python/test_rig.py +++ b/bindings/python/test_rig.py @@ -63,8 +63,12 @@ class TestClass: RIG_ANT_1 = 1<<0 RIG_ANT_UNKNOWN = 1<<30 RIG_ANT_CURR = 1<<31 + option = Hamlib.value_t() + option.i = 0 expected = [RIG_ANT_UNKNOWN, RIG_ANT_UNKNOWN, RIG_ANT_1, 0] + assert rig.set_ant(RIG_ANT_1, option) is None assert rig.get_ant(RIG_ANT_CURR) == expected + assert rig.set_ant(RIG_ANT_1, option, Hamlib.RIG_VFO_CURR) is None assert rig.get_ant(RIG_ANT_CURR, Hamlib.RIG_VFO_A) == expected assert rig.close() is None @@ -161,15 +165,8 @@ class TestClass: assert rig.scan(Hamlib.RIG_SCAN_VFO, channel, Hamlib.RIG_VFO_CURR) is None assert rig.send_dtmf(Hamlib.RIG_VFO_CURR, "*0123456789#ABCD") is None assert rig.send_morse(Hamlib.RIG_VFO_CURR, "73") is None - # FIXME should use a RIG_ANT_* constant but it isn't available in the bindings - RIG_ANT_1 = 1<<0 - option = Hamlib.value_t() - option.i = 0 - assert rig.set_ant(Hamlib.RIG_VFO_CURR, option) is None - assert rig.set_ant(Hamlib.RIG_VFO_CURR, option, RIG_ANT_1) is None bank = 0 - assert rig.set_bank(bank) is None - assert rig.set_bank(bank, Hamlib.RIG_VFO_CURR) is None + assert rig.set_bank(Hamlib.RIG_VFO_CURR, bank) is None channel = Hamlib.channel() channel = Hamlib.channel(0) channel = Hamlib.channel(0, Hamlib.RIG_VFO_CURR) @@ -188,9 +185,8 @@ 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 - freq = 0 - assert rig.set_freq(freq) is None - assert rig.set_freq(freq, Hamlib.RIG_VFO_CURR) is None + freq = 5700000000 + assert rig.set_freq(Hamlib.RIG_VFO_CURR, freq) is None assert rig.set_func(0, 0, 0) is None assert rig.set_level(0, 0, 0) is None assert rig.set_mem(0, 0) is None commit 36576f8e40e701a651e85c567201f9758f20545a Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Jul 12 20:06:48 2025 +0200 Revert "Fix Rig.send_morse()" This reverts commit 656cf536524197c56d0523d424ba4eacfdbbc278. Conflicts: bindings/python/test_rig.py diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py index e5f3c38ab..0ecebd9bf 100755 --- a/bindings/python/test_rig.py +++ b/bindings/python/test_rig.py @@ -160,8 +160,7 @@ class TestClass: assert rig.scan(Hamlib.RIG_SCAN_VFO, channel) is None assert rig.scan(Hamlib.RIG_SCAN_VFO, channel, Hamlib.RIG_VFO_CURR) is None assert rig.send_dtmf(Hamlib.RIG_VFO_CURR, "*0123456789#ABCD") is None - assert rig.send_morse("73") is None - assert rig.send_morse("73", Hamlib.RIG_VFO_CURR) is None + assert rig.send_morse(Hamlib.RIG_VFO_CURR, "73") is None # FIXME should use a RIG_ANT_* constant but it isn't available in the bindings RIG_ANT_1 = 1<<0 option = Hamlib.value_t() diff --git a/bindings/python/test_startup.py b/bindings/python/test_startup.py index 4620ce4dc..e38cc355d 100755 --- a/bindings/python/test_startup.py +++ b/bindings/python/test_startup.py @@ -83,7 +83,7 @@ class TestClass: #(freq, width, mode, split) = my_rig.get_vfo_info(Hamlib.RIG_VFO_A,freq,width,mode,split) #print("Rig vfo_info:\t\tfreq=%s, mode=%s, width=%s, split=%s" % (freq, mode, width, split)) - assert my_rig.send_morse("73", Hamlib.RIG_VFO_A) is None + assert my_rig.send_morse(Hamlib.RIG_VFO_A, "73") is None assert my_rig.close() is None # Some static functions diff --git a/bindings/rig.swg b/bindings/rig.swg index 096b75b0b..f2ee04e53 100644 --- a/bindings/rig.swg +++ b/bindings/rig.swg @@ -386,7 +386,7 @@ typedef channel_t * const_channel_t_p; METHOD3(set_bank, int) METHOD3(set_mem, int) METHOD3(send_dtmf, const_char_string) - METHOD1(send_morse, const_char_string) + METHOD3(send_morse, const_char_string) METHOD3(vfo_op, vfo_op_t) METHOD2(scan, scan_t, int) METHODSIMPLESET(level, int, i, RIG_LEVEL_IS_FLOAT(stg)) commit 43193681b02938b06987224a2c572495638467d2 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Jul 12 20:00:24 2025 +0200 Revert "Fix Rig.send_dtmf()" This reverts commit 0e3a90bb351f9a412c5920981ea7cdc18855c4cc. Conflicts: bindings/python/test_rig.py diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py index 37cb1ebda..e5f3c38ab 100755 --- a/bindings/python/test_rig.py +++ b/bindings/python/test_rig.py @@ -159,8 +159,7 @@ class TestClass: channel = 0 assert rig.scan(Hamlib.RIG_SCAN_VFO, channel) is None assert rig.scan(Hamlib.RIG_SCAN_VFO, channel, Hamlib.RIG_VFO_CURR) is None - assert rig.send_dtmf("*0123456789#ABCD") is None - assert rig.send_dtmf("*0123456789#ABCD", Hamlib.RIG_VFO_CURR) is None + assert rig.send_dtmf(Hamlib.RIG_VFO_CURR, "*0123456789#ABCD") is None assert rig.send_morse("73") is None assert rig.send_morse("73", Hamlib.RIG_VFO_CURR) is None # FIXME should use a RIG_ANT_* constant but it isn't available in the bindings diff --git a/bindings/rig.swg b/bindings/rig.swg index 4fe50342f..096b75b0b 100644 --- a/bindings/rig.swg +++ b/bindings/rig.swg @@ -385,7 +385,7 @@ typedef channel_t * const_channel_t_p; METHOD2(set_ext_func, hamlib_token_t, int) METHOD3(set_bank, int) METHOD3(set_mem, int) - METHOD1(send_dtmf, const_char_string) + METHOD3(send_dtmf, const_char_string) METHOD1(send_morse, const_char_string) METHOD3(vfo_op, vfo_op_t) METHOD2(scan, scan_t, int) commit 9626c8b90dc4d76b3071e65dfb0372f4caba342c Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Jul 12 19:57:48 2025 +0200 Revert "Fix Rig.set_bank()" This reverts commit 04d675fc55266f3a96e52487b181c82536139b22. diff --git a/bindings/rig.swg b/bindings/rig.swg index cd30821c2..4fe50342f 100644 --- a/bindings/rig.swg +++ b/bindings/rig.swg @@ -383,7 +383,7 @@ typedef channel_t * const_channel_t_p; METHOD2(set_ant, ant_t, value_t) METHOD2(set_func, setting_t, int) METHOD2(set_ext_func, hamlib_token_t, int) - METHOD1(set_bank, int) + METHOD3(set_bank, int) METHOD3(set_mem, int) METHOD1(send_dtmf, const_char_string) METHOD1(send_morse, const_char_string) commit 5319f8b31b70da31144ed46ece9523b7f7eace9d Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Jul 12 19:57:43 2025 +0200 Revert "Fix Rig.set_freq()" This reverts commit 070efb7b4127f0b5626596d071d6c68fcee1d3de. diff --git a/bindings/python/test_startup.py b/bindings/python/test_startup.py index a0835ce86..4620ce4dc 100755 --- a/bindings/python/test_startup.py +++ b/bindings/python/test_startup.py @@ -33,7 +33,7 @@ class TestClass: assert my_rig.error_status == Hamlib.RIG_OK assert Hamlib.rigerror2(my_rig.error_status) == "Command completed successfully\n" - assert my_rig.set_freq(5700000000, Hamlib.RIG_VFO_B) is None + assert my_rig.set_freq(Hamlib.RIG_VFO_B, 5700000000) is None assert my_rig.set_vfo(Hamlib.RIG_VFO_B) is None assert my_rig.get_freq() == 5700000000 diff --git a/bindings/rig.swg b/bindings/rig.swg index f0b6a911e..cd30821c2 100644 --- a/bindings/rig.swg +++ b/bindings/rig.swg @@ -364,7 +364,7 @@ typedef channel_t * const_channel_t_p; #define _VFO_ARG ,vfo #define _VFO_DECL ,vfo_t vfo = RIG_VFO_CURR - METHOD1(set_freq, freq_t) + METHOD3(set_freq, freq_t) METHOD2_INIT(set_mode, rmode_t, pbwidth_t, RIG_PASSBAND_NORMAL) METHOD3(set_ptt, ptt_t) METHOD3(set_rptr_shift, rptr_shift_t) commit a617863a238af7eab33e4d10a75dc3149cfff4e2 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Jul 12 19:57:14 2025 +0200 Revert "Fix Rig.set_mem()" This reverts commit 663612051c7fcc455c978c9f82889e2a9ab4836d. diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py index de7c3a285..37cb1ebda 100755 --- a/bindings/python/test_rig.py +++ b/bindings/python/test_rig.py @@ -195,8 +195,7 @@ class TestClass: assert rig.set_freq(freq, Hamlib.RIG_VFO_CURR) is None assert rig.set_func(0, 0, 0) is None assert rig.set_level(0, 0, 0) is None - assert rig.set_mem(0) is None - assert rig.set_mem(0, Hamlib.RIG_VFO_CURR) is None + assert rig.set_mem(0, 0) is None assert rig.set_mode(0) is None assert rig.set_mode(0, 0) is None assert rig.set_mode(0, 0, Hamlib.RIG_VFO_CURR) is None diff --git a/bindings/rig.swg b/bindings/rig.swg index cfe6ee865..f0b6a911e 100644 --- a/bindings/rig.swg +++ b/bindings/rig.swg @@ -384,7 +384,7 @@ typedef channel_t * const_channel_t_p; METHOD2(set_func, setting_t, int) METHOD2(set_ext_func, hamlib_token_t, int) METHOD1(set_bank, int) - METHOD1(set_mem, int) + METHOD3(set_mem, int) METHOD1(send_dtmf, const_char_string) METHOD1(send_morse, const_char_string) METHOD3(vfo_op, vfo_op_t) commit 2199ff2bde6b2d7dff5a7bd9b5880ea2cacced17 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Jul 12 19:56:59 2025 +0200 Revert "Fix Rig.set_ctcss_sql() Rig.set_ctcss_tone() Rig.set_dcs_code()" This reverts commit ed7e5b2344ccabe0abf5d4f215345acf86aa834f. diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py index 8da10841b..de7c3a285 100755 --- a/bindings/python/test_rig.py +++ b/bindings/python/test_rig.py @@ -177,16 +177,11 @@ class TestClass: channel = Hamlib.channel(0, Hamlib.RIG_VFO_CURR) assert rig.set_channel(channel) is None assert rig.set_conf("", "") is None - tone = 0 - assert rig.set_ctcss_sql(tone) is None - assert rig.set_ctcss_sql(tone, Hamlib.RIG_VFO_CURR) is None - assert rig.set_ctcss_tone(tone) is None - assert rig.set_ctcss_tone(tone, Hamlib.RIG_VFO_CURR) is None - code = 0 - assert rig.set_dcs_code(code) is None - assert rig.set_dcs_code(code, Hamlib.RIG_VFO_CURR) is None - assert rig.set_dcs_sql(code) is None - assert rig.set_dcs_sql(code, Hamlib.RIG_VFO_CURR) is None + assert rig.set_ctcss_sql(0, 0) is None + assert rig.set_ctcss_tone(0, 0) is None + assert rig.set_dcs_code(0, 0) is None + assert rig.set_dcs_sql(0) is None + assert rig.set_dcs_sql(0, 0) is None assert rig.set_ext_func(0, 0) is None assert rig.set_ext_func(0, 0, 0) is None level = 0 diff --git a/bindings/rig.swg b/bindings/rig.swg index a136890b2..cfe6ee865 100644 --- a/bindings/rig.swg +++ b/bindings/rig.swg @@ -369,9 +369,9 @@ typedef channel_t * const_channel_t_p; METHOD3(set_ptt, ptt_t) METHOD3(set_rptr_shift, rptr_shift_t) METHOD3(set_rptr_offs, shortfreq_t) - METHOD1(set_ctcss_tone, tone_t) - METHOD1(set_dcs_code, tone_t) - METHOD1(set_ctcss_sql, tone_t) + METHOD3(set_ctcss_tone, tone_t) + METHOD3(set_dcs_code, tone_t) + METHOD3(set_ctcss_sql, tone_t) METHOD1(set_dcs_sql, tone_t) METHOD3(set_split_freq, freq_t) METHOD2_INIT(set_split_mode, rmode_t, pbwidth_t, RIG_PASSBAND_NORMAL) commit 3240d2f8d3d3a366c56d05249605a9a06123635b Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Jul 12 19:56:43 2025 +0200 Revert "Fix various methods" This reverts commit 623b93db3dfb5c80aa89f67eb2eb2eff4c044faa. diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py index f48cf43c4..8da10841b 100755 --- a/bindings/python/test_rig.py +++ b/bindings/python/test_rig.py @@ -207,16 +207,11 @@ class TestClass: assert rig.set_mode(0, 0, Hamlib.RIG_VFO_CURR) is None assert rig.set_parm(0, 0) is None assert rig.set_powerstat(0) is None - assert rig.set_ptt(0) is None - assert rig.set_ptt(0, Hamlib.RIG_VFO_CURR) is None - assert rig.set_rit(0) is None - assert rig.set_rit(0, Hamlib.RIG_VFO_CURR) is None - assert rig.set_rptr_offs(0) is None - assert rig.set_rptr_offs(0, Hamlib.RIG_VFO_CURR) is None - assert rig.set_rptr_shift(0) is None - assert rig.set_rptr_shift(0, Hamlib.RIG_VFO_CURR) is None - assert rig.set_split_freq(0) is None - assert rig.set_split_freq(0, Hamlib.RIG_VFO_CURR) is None + assert rig.set_ptt(0, 0) is None + assert rig.set_rit(0, 0) is None + assert rig.set_rptr_offs(0, 0) is None + assert rig.set_rptr_shift(0, 0) is None + assert rig.set_split_freq(0, 0) is None assert rig.set_split_freq_mode(0, 0) is None assert rig.set_split_freq_mode(0, 0, 0) is None assert rig.set_split_freq_mode(0, 0, 0, 0) is None @@ -226,15 +221,12 @@ class TestClass: 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_ts(0) is None - assert rig.set_ts(0, Hamlib.RIG_VFO_CURR) is None + assert rig.set_ts(0, 0) is None assert rig.set_vfo(0) is None assert rig.set_vfo_opt(0) is None - assert rig.set_xit(0) is None - assert rig.set_xit(0, Hamlib.RIG_VFO_CURR) is None + assert rig.set_xit(0, 0) is None assert rig.token_lookup("") is None - assert rig.vfo_op(0) is None - assert rig.vfo_op(0, Hamlib.RIG_VFO_CURR) is None + assert rig.vfo_op(0, 0) is None def test_object_creation(self): diff --git a/bindings/rig.swg b/bindings/rig.swg index 94ed1f058..a136890b2 100644 --- a/bindings/rig.swg +++ b/bindings/rig.swg @@ -366,20 +366,20 @@ typedef channel_t * const_channel_t_p; METHOD1(set_freq, freq_t) METHOD2_INIT(set_mode, rmode_t, pbwidth_t, RIG_PASSBAND_NORMAL) - METHOD1(set_ptt, ptt_t) - METHOD1(set_rptr_shift, rptr_shift_t) - METHOD1(set_rptr_offs, shortfreq_t) + METHOD3(set_ptt, ptt_t) + METHOD3(set_rptr_shift, rptr_shift_t) + METHOD3(set_rptr_offs, shortfreq_t) METHOD1(set_ctcss_tone, tone_t) METHOD1(set_dcs_code, tone_t) METHOD1(set_ctcss_sql, tone_t) METHOD1(set_dcs_sql, tone_t) - METHOD1(set_split_freq, freq_t) + METHOD3(set_split_freq, freq_t) METHOD2_INIT(set_split_mode, rmode_t, pbwidth_t, RIG_PASSBAND_NORMAL) METHOD3_INIT(set_split_freq_mode, freq_t, rmode_t, pbwidth_t, RIG_PASSBAND_NORMAL) METHOD2(set_split_vfo, split_t, vfo_t) - METHOD1(set_rit, shortfreq_t) - METHOD1(set_xit, shortfreq_t) - METHOD1(set_ts, shortfreq_t) + METHOD3(set_rit, shortfreq_t) + METHOD3(set_xit, shortfreq_t) + METHOD3(set_ts, shortfreq_t) METHOD2(set_ant, ant_t, value_t) METHOD2(set_func, setting_t, int) METHOD2(set_ext_func, hamlib_token_t, int) @@ -387,7 +387,7 @@ typedef channel_t * const_channel_t_p; METHOD1(set_mem, int) METHOD1(send_dtmf, const_char_string) METHOD1(send_morse, const_char_string) - METHOD1(vfo_op, vfo_op_t) + METHOD3(vfo_op, vfo_op_t) METHOD2(scan, scan_t, int) METHODSIMPLESET(level, int, i, RIG_LEVEL_IS_FLOAT(stg)) METHODSIMPLESET(level, float, f, !RIG_LEVEL_IS_FLOAT(stg)) commit 92fb82f2204f45673374c9e40177f3b824d34180 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Jul 12 19:56:18 2025 +0200 Revert "Remove the macro METHOD3() which is unused now" This reverts commit 1eeb59e50c2fe34a59d46b3002c09355c798a528. diff --git a/bindings/rig.swg b/bindings/rig.swg index ebf646bcc..94ed1f058 100644 --- a/bindings/rig.swg +++ b/bindings/rig.swg @@ -89,6 +89,8 @@ typedef channel_t * const_channel_t_p; { self->error_status = rig_##f(self->rig _VFO_ARG, _##t1##_1, _##t2##_2); } #define METHOD2_INIT(f, t1, t2, i2) void f (t1 _##t1##_1, t2 _##t2##_2 = i2 _VFO_DECL) \ { self->error_status = rig_##f(self->rig _VFO_ARG, _##t1##_1, _##t2##_2); } +#define METHOD3(f, t1) void f ( vfo_t vfo, t1 _##t1) \ + { self->error_status = rig_##f(self->rig _VFO_ARG, _##t1); } #define METHOD3_INIT(f, t1, t2, t3, i3) void f (t1 _##t1##_1, t2 _##t2##_2, t3 _##t3##_3 = i3 _VFO_DECL) \ { self->error_status = rig_##f(self->rig _VFO_ARG, _##t1##_1, _##t2##_2, _##t3##_3); } #define METHOD4(f, t1) void f ( vfo_t vfo, t1 _##t1) \ commit ef2d2236b5267a2eaf395cb6ffdbd3627e40b4d2 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Jun 29 22:33:14 2025 +0200 Remove the macro METHOD3() which is unused now diff --git a/bindings/rig.swg b/bindings/rig.swg index 94ed1f058..ebf646bcc 100644 --- a/bindings/rig.swg +++ b/bindings/rig.swg @@ -89,8 +89,6 @@ typedef channel_t * const_channel_t_p; { self->error_status = rig_##f(self->rig _VFO_ARG, _##t1##_1, _##t2##_2); } #define METHOD2_INIT(f, t1, t2, i2) void f (t1 _##t1##_1, t2 _##t2##_2 = i2 _VFO_DECL) \ { self->error_status = rig_##f(self->rig _VFO_ARG, _##t1##_1, _##t2##_2); } -#define METHOD3(f, t1) void f ( vfo_t vfo, t1 _##t1) \ - { self->error_status = rig_##f(self->rig _VFO_ARG, _##t1); } #define METHOD3_INIT(f, t1, t2, t3, i3) void f (t1 _##t1##_1, t2 _##t2##_2, t3 _##t3##_3 = i3 _VFO_DECL) \ { self->error_status = rig_##f(self->rig _VFO_ARG, _##t1##_1, _##t2##_2, _##t3##_3); } #define METHOD4(f, t1) void f ( vfo_t vfo, t1 _##t1) \ commit 292da125661bd647c0334f7673a2f37e05f46175 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Jun 29 22:19:49 2025 +0200 Fix various methods Fixes: set_ptt set_rit set_rptr_offs set_rptr_shift set_split_freq set_ts set_xit vfo_op This is also swapping the arguments to make the vfo optional like in other methods. diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py index 8da10841b..f48cf43c4 100755 --- a/bindings/python/test_rig.py +++ b/bindings/python/test_rig.py @@ -207,11 +207,16 @@ class TestClass: assert rig.set_mode(0, 0, Hamlib.RIG_VFO_CURR) is None assert rig.set_parm(0, 0) is None assert rig.set_powerstat(0) is None - assert rig.set_ptt(0, 0) is None - assert rig.set_rit(0, 0) is None - assert rig.set_rptr_offs(0, 0) is None - assert rig.set_rptr_shift(0, 0) is None - assert rig.set_split_freq(0, 0) is None + assert rig.set_ptt(0) is None + assert rig.set_ptt(0, Hamlib.RIG_VFO_CURR) is None + assert rig.set_rit(0) is None + assert rig.set_rit(0, Hamlib.RIG_VFO_CURR) is None + assert rig.set_rptr_offs(0) is None + assert rig.set_rptr_offs(0, Hamlib.RIG_VFO_CURR) is None + assert rig.set_rptr_shift(0) is None + assert rig.set_rptr_shift(0, Hamlib.RIG_VFO_CURR) is None + assert rig.set_split_freq(0) is None + assert rig.set_split_freq(0, Hamlib.RIG_VFO_CURR) is None assert rig.set_split_freq_mode(0, 0) is None assert rig.set_split_freq_mode(0, 0, 0) is None assert rig.set_split_freq_mode(0, 0, 0, 0) is None @@ -221,12 +226,15 @@ class TestClass: 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_ts(0, 0) is None + assert rig.set_ts(0) is None + assert rig.set_ts(0, Hamlib.RIG_VFO_CURR) is None assert rig.set_vfo(0) is None assert rig.set_vfo_opt(0) is None - assert rig.set_xit(0, 0) is None + assert rig.set_xit(0) is None + assert rig.set_xit(0, Hamlib.RIG_VFO_CURR) is None assert rig.token_lookup("") is None - assert rig.vfo_op(0, 0) is None + assert rig.vfo_op(0) is None + assert rig.vfo_op(0, Hamlib.RIG_VFO_CURR) is None def test_object_creation(self): diff --git a/bindings/rig.swg b/bindings/rig.swg index a136890b2..94ed1f058 100644 --- a/bindings/rig.swg +++ b/bindings/rig.swg @@ -366,20 +366,20 @@ typedef channel_t * const_channel_t_p; METHOD1(set_freq, freq_t) METHOD2_INIT(set_mode, rmode_t, pbwidth_t, RIG_PASSBAND_NORMAL) - METHOD3(set_ptt, ptt_t) - METHOD3(set_rptr_shift, rptr_shift_t) - METHOD3(set_rptr_offs, shortfreq_t) + METHOD1(set_ptt, ptt_t) + METHOD1(set_rptr_shift, rptr_shift_t) + METHOD1(set_rptr_offs, shortfreq_t) METHOD1(set_ctcss_tone, tone_t) METHOD1(set_dcs_code, tone_t) METHOD1(set_ctcss_sql, tone_t) METHOD1(set_dcs_sql, tone_t) - METHOD3(set_split_freq, freq_t) + METHOD1(set_split_freq, freq_t) METHOD2_INIT(set_split_mode, rmode_t, pbwidth_t, RIG_PASSBAND_NORMAL) METHOD3_INIT(set_split_freq_mode, freq_t, rmode_t, pbwidth_t, RIG_PASSBAND_NORMAL) METHOD2(set_split_vfo, split_t, vfo_t) - METHOD3(set_rit, shortfreq_t) - METHOD3(set_xit, shortfreq_t) - METHOD3(set_ts, shortfreq_t) + METHOD1(set_rit, shortfreq_t) + METHOD1(set_xit, shortfreq_t) + METHOD1(set_ts, shortfreq_t) METHOD2(set_ant, ant_t, value_t) METHOD2(set_func, setting_t, int) METHOD2(set_ext_func, hamlib_token_t, int) @@ -387,7 +387,7 @@ typedef channel_t * const_channel_t_p; METHOD1(set_mem, int) METHOD1(send_dtmf, const_char_string) METHOD1(send_morse, const_char_string) - METHOD3(vfo_op, vfo_op_t) + METHOD1(vfo_op, vfo_op_t) METHOD2(scan, scan_t, int) METHODSIMPLESET(level, int, i, RIG_LEVEL_IS_FLOAT(stg)) METHODSIMPLESET(level, float, f, !RIG_LEVEL_IS_FLOAT(stg)) commit 160c941e9e2018878bd876cd46ba78cb9add7e00 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Jun 29 22:05:23 2025 +0200 Fix Rig.set_ctcss_sql() Rig.set_ctcss_tone() Rig.set_dcs_code() This is also swapping the arguments to make the vfo optional like in other methods. diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py index de7c3a285..8da10841b 100755 --- a/bindings/python/test_rig.py +++ b/bindings/python/test_rig.py @@ -177,11 +177,16 @@ class TestClass: channel = Hamlib.channel(0, Hamlib.RIG_VFO_CURR) assert rig.set_channel(channel) is None assert rig.set_conf("", "") is None - assert rig.set_ctcss_sql(0, 0) is None - assert rig.set_ctcss_tone(0, 0) is None - assert rig.set_dcs_code(0, 0) is None - assert rig.set_dcs_sql(0) is None - assert rig.set_dcs_sql(0, 0) is None + tone = 0 + assert rig.set_ctcss_sql(tone) is None + assert rig.set_ctcss_sql(tone, Hamlib.RIG_VFO_CURR) is None + assert rig.set_ctcss_tone(tone) is None + assert rig.set_ctcss_tone(tone, Hamlib.RIG_VFO_CURR) is None + code = 0 + assert rig.set_dcs_code(code) is None + assert rig.set_dcs_code(code, Hamlib.RIG_VFO_CURR) is None + assert rig.set_dcs_sql(code) is None + assert rig.set_dcs_sql(code, Hamlib.RIG_VFO_CURR) is None assert rig.set_ext_func(0, 0) is None assert rig.set_ext_func(0, 0, 0) is None level = 0 diff --git a/bindings/rig.swg b/bindings/rig.swg index cfe6ee865..a136890b2 100644 --- a/bindings/rig.swg +++ b/bindings/rig.swg @@ -369,9 +369,9 @@ typedef channel_t * const_channel_t_p; METHOD3(set_ptt, ptt_t) METHOD3(set_rptr_shift, rptr_shift_t) METHOD3(set_rptr_offs, shortfreq_t) - METHOD3(set_ctcss_tone, tone_t) - METHOD3(set_dcs_code, tone_t) - METHOD3(set_ctcss_sql, tone_t) + METHOD1(set_ctcss_tone, tone_t) + METHOD1(set_dcs_code, tone_t) + METHOD1(set_ctcss_sql, tone_t) METHOD1(set_dcs_sql, tone_t) METHOD3(set_split_freq, freq_t) METHOD2_INIT(set_split_mode, rmode_t, pbwidth_t, RIG_PASSBAND_NORMAL) commit 25aae7d8e2ebc06c7c7094c0d42ceea8bc3d2c82 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Jun 29 21:38:08 2025 +0200 Fix Rig.set_mem() This is also swapping the arguments to make the vfo optional like in other methods. diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py index 37cb1ebda..de7c3a285 100755 --- a/bindings/python/test_rig.py +++ b/bindings/python/test_rig.py @@ -195,7 +195,8 @@ class TestClass: assert rig.set_freq(freq, Hamlib.RIG_VFO_CURR) is None assert rig.set_func(0, 0, 0) is None assert rig.set_level(0, 0, 0) is None - assert rig.set_mem(0, 0) is None + assert rig.set_mem(0) is None + assert rig.set_mem(0, Hamlib.RIG_VFO_CURR) is None assert rig.set_mode(0) is None assert rig.set_mode(0, 0) is None assert rig.set_mode(0, 0, Hamlib.RIG_VFO_CURR) is None diff --git a/bindings/rig.swg b/bindings/rig.swg index f0b6a911e..cfe6ee865 100644 --- a/bindings/rig.swg +++ b/bindings/rig.swg @@ -384,7 +384,7 @@ typedef channel_t * const_channel_t_p; METHOD2(set_func, setting_t, int) METHOD2(set_ext_func, hamlib_token_t, int) METHOD1(set_bank, int) - METHOD3(set_mem, int) + METHOD1(set_mem, int) METHOD1(send_dtmf, const_char_string) METHOD1(send_morse, const_char_string) METHOD3(vfo_op, vfo_op_t) commit 90c56f3e1fc6d7d86d758076011408832197ca65 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Jun 29 21:30:40 2025 +0200 Fix Rig.set_freq() This is also swapping the arguments to make the vfo optional like in other methods. diff --git a/bindings/python/test_startup.py b/bindings/python/test_startup.py index 4620ce4dc..a0835ce86 100755 --- a/bindings/python/test_startup.py +++ b/bindings/python/test_startup.py @@ -33,7 +33,7 @@ class TestClass: assert my_rig.error_status == Hamlib.RIG_OK assert Hamlib.rigerror2(my_rig.error_status) == "Command completed successfully\n" - assert my_rig.set_freq(Hamlib.RIG_VFO_B, 5700000000) is None + assert my_rig.set_freq(5700000000, Hamlib.RIG_VFO_B) is None assert my_rig.set_vfo(Hamlib.RIG_VFO_B) is None assert my_rig.get_freq() == 5700000000 diff --git a/bindings/rig.swg b/bindings/rig.swg index cd30821c2..f0b6a911e 100644 --- a/bindings/rig.swg +++ b/bindings/rig.swg @@ -364,7 +364,7 @@ typedef channel_t * const_channel_t_p; #define _VFO_ARG ,vfo #define _VFO_DECL ,vfo_t vfo = RIG_VFO_CURR - METHOD3(set_freq, freq_t) + METHOD1(set_freq, freq_t) METHOD2_INIT(set_mode, rmode_t, pbwidth_t, RIG_PASSBAND_NORMAL) METHOD3(set_ptt, ptt_t) METHOD3(set_rptr_shift, rptr_shift_t) commit 01bc71ab8a2d24545f6d48ff90bd9c5c5747011f Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Jun 29 21:26:22 2025 +0200 Fix Rig.set_bank() diff --git a/bindings/rig.swg b/bindings/rig.swg index 4fe50342f..cd30821c2 100644 --- a/bindings/rig.swg +++ b/bindings/rig.swg @@ -383,7 +383,7 @@ typedef channel_t * const_channel_t_p; METHOD2(set_ant, ant_t, value_t) METHOD2(set_func, setting_t, int) METHOD2(set_ext_func, hamlib_token_t, int) - METHOD3(set_bank, int) + METHOD1(set_bank, int) METHOD3(set_mem, int) METHOD1(send_dtmf, const_char_string) METHOD1(send_morse, const_char_string) commit 2b1428fd3e41cc7830ded0d057fdac0a27d4c5b3 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Jun 29 21:22:20 2025 +0200 Add meaningful arguments diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py index 8ef760f72..37cb1ebda 100755 --- a/bindings/python/test_rig.py +++ b/bindings/python/test_rig.py @@ -150,14 +150,15 @@ class TestClass: assert rig.lookup_mem_caps(0) is None assert isinstance(rig.mem_count(), int) assert rig.open() is None - assert rig.passband_narrow(0) is None - assert rig.passband_normal(0) is None - assert rig.passband_wide(0) is None + assert rig.passband_narrow(Hamlib.RIG_MODE_CW) is None # FIXME should return passband + assert rig.passband_normal(Hamlib.RIG_MODE_CW) is None # FIXME should return passband + assert rig.passband_wide(Hamlib.RIG_MODE_CW) is None # FIXME should return passband assert isinstance(rig.recv_dtmf(), str) - assert isinstance(rig.recv_dtmf(0), str) + assert isinstance(rig.recv_dtmf(Hamlib.RIG_VFO_CURR), str) assert rig.reset(Hamlib.RIG_RESET_NONE) is None - assert rig.scan(0, 0) is None - assert rig.scan(0, 0, 0) is None + channel = 0 + assert rig.scan(Hamlib.RIG_SCAN_VFO, channel) is None + assert rig.scan(Hamlib.RIG_SCAN_VFO, channel, Hamlib.RIG_VFO_CURR) is None assert rig.send_dtmf("*0123456789#ABCD") is None assert rig.send_dtmf("*0123456789#ABCD", Hamlib.RIG_VFO_CURR) is None assert rig.send_morse("73") is None @@ -168,10 +169,12 @@ class TestClass: option.i = 0 assert rig.set_ant(Hamlib.RIG_VFO_CURR, option) is None assert rig.set_ant(Hamlib.RIG_VFO_CURR, option, RIG_ANT_1) is None - assert rig.set_bank(0, 0) is None + bank = 0 + assert rig.set_bank(bank) is None + assert rig.set_bank(bank, Hamlib.RIG_VFO_CURR) is None channel = Hamlib.channel() channel = Hamlib.channel(0) - channel = Hamlib.channel(0, 0) + channel = Hamlib.channel(0, Hamlib.RIG_VFO_CURR) assert rig.set_channel(channel) is None assert rig.set_conf("", "") is None assert rig.set_ctcss_sql(0, 0) is None @@ -187,13 +190,15 @@ 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_freq(0, 0) is None + freq = 0 + assert rig.set_freq(freq) is None + assert rig.set_freq(freq, Hamlib.RIG_VFO_CURR) is None assert rig.set_func(0, 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 assert rig.set_mode(0, 0) is None - assert rig.set_mode(0, 0, 0) is None + assert rig.set_mode(0, 0, Hamlib.RIG_VFO_CURR) is None assert rig.set_parm(0, 0) is None assert rig.set_powerstat(0) is None assert rig.set_ptt(0, 0) is None commit 8901b210ee0a9ff399904f1516350e65e2ed6de0 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Jun 29 21:04:39 2025 +0200 Fix Rig.send_dtmf() diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py index 7547cd838..8ef760f72 100755 --- a/bindings/python/test_rig.py +++ b/bindings/python/test_rig.py @@ -158,7 +158,8 @@ class TestClass: assert rig.reset(Hamlib.RIG_RESET_NONE) is None assert rig.scan(0, 0) is None assert rig.scan(0, 0, 0) is None - assert rig.send_dtmf(0, "") is None + assert rig.send_dtmf("*0123456789#ABCD") is None + assert rig.send_dtmf("*0123456789#ABCD", Hamlib.RIG_VFO_CURR) is None assert rig.send_morse("73") is None assert rig.send_morse("73", Hamlib.RIG_VFO_CURR) is None # FIXME should use a RIG_ANT_* constant but it isn't available in the bindings diff --git a/bindings/rig.swg b/bindings/rig.swg index 096b75b0b..4fe50342f 100644 --- a/bindings/rig.swg +++ b/bindings/rig.swg @@ -385,7 +385,7 @@ typedef channel_t * const_channel_t_p; METHOD2(set_ext_func, hamlib_token_t, int) METHOD3(set_bank, int) METHOD3(set_mem, int) - METHOD3(send_dtmf, const_char_string) + METHOD1(send_dtmf, const_char_string) METHOD1(send_morse, const_char_string) METHOD3(vfo_op, vfo_op_t) METHOD2(scan, scan_t, int) commit 13c2413bbaf3fb99c3448771b868ea3c5c032282 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Jun 29 20:59:09 2025 +0200 Fix Rig.send_morse() This is also swapping the arguments to make the vfo optional like in other methods. diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py index 80f37acd2..7547cd838 100755 --- a/bindings/python/test_rig.py +++ b/bindings/python/test_rig.py @@ -159,7 +159,8 @@ class TestClass: assert rig.scan(0, 0) is None assert rig.scan(0, 0, 0) is None assert rig.send_dtmf(0, "") is None - assert rig.send_morse(0, "") is None + assert rig.send_morse("73") is None + assert rig.send_morse("73", Hamlib.RIG_VFO_CURR) is None # FIXME should use a RIG_ANT_* constant but it isn't available in the bindings RIG_ANT_1 = 1<<0 option = Hamlib.value_t() diff --git a/bindings/python/test_startup.py b/bindings/python/test_startup.py index e38cc355d..4620ce4dc 100755 --- a/bindings/python/test_startup.py +++ b/bindings/python/test_startup.py @@ -83,7 +83,7 @@ class TestClass: #(freq, width, mode, split) = my_rig.get_vfo_info(Hamlib.RIG_VFO_A,freq,width,mode,split) #print("Rig vfo_info:\t\tfreq=%s, mode=%s, width=%s, split=%s" % (freq, mode, width, split)) - assert my_rig.send_morse(Hamlib.RIG_VFO_A, "73") is None + assert my_rig.send_morse("73", Hamlib.RIG_VFO_A) is None assert my_rig.close() is None # Some static functions diff --git a/bindings/rig.swg b/bindings/rig.swg index f2ee04e53..096b75b0b 100644 --- a/bindings/rig.swg +++ b/bindings/rig.swg @@ -386,7 +386,7 @@ typedef channel_t * const_channel_t_p; METHOD3(set_bank, int) METHOD3(set_mem, int) METHOD3(send_dtmf, const_char_string) - METHOD3(send_morse, const_char_string) + METHOD1(send_morse, const_char_string) METHOD3(vfo_op, vfo_op_t) METHOD2(scan, scan_t, int) METHODSIMPLESET(level, int, i, RIG_LEVEL_IS_FLOAT(stg)) commit 25a2a4447f01eaaec83f5a95903f6e300ba0534b Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Jun 29 19:28:20 2025 +0200 Fix Rig.get_ant() tests The first argument is the antenna. diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py index 1c3927cb0..80f37acd2 100755 --- a/bindings/python/test_rig.py +++ b/bindings/python/test_rig.py @@ -59,10 +59,13 @@ class TestClass: assert rig.get_split_vfo() == [5000000, 1] assert rig.get_split_vfo(Hamlib.RIG_VFO_CURR) == [5000000, 1] - # FIXME should use a RIG_ANT_* constant but it isn't available in the bindings + # FIXME should use a RIG_ANT_* constant but they aren't available in the bindings + RIG_ANT_1 = 1<<0 RIG_ANT_UNKNOWN = 1<<30 - assert rig.get_ant(Hamlib.RIG_VFO_A) == [RIG_ANT_UNKNOWN, RIG_ANT_UNKNOWN, Hamlib.RIG_VFO_A, 0] - assert rig.get_ant(Hamlib.RIG_VFO_A, Hamlib.RIG_VFO_A) == [RIG_ANT_UNKNOWN, RIG_ANT_UNKNOWN, Hamlib.RIG_VFO_A, 0] + RIG_ANT_CURR = 1<<31 + expected = [RIG_ANT_UNKNOWN, RIG_ANT_UNKNOWN, RIG_ANT_1, 0] + assert rig.get_ant(RIG_ANT_CURR) == expected + assert rig.get_ant(RIG_ANT_CURR, Hamlib.RIG_VFO_A) == expected assert rig.close() is None assert rig.state.comm_state == 0 ----------------------------------------------------------------------- Summary of changes: bindings/python/test_rig.py | 109 ++++++++++++++++++++++++++------------------ bindings/rig.swg | 2 +- 2 files changed, 65 insertions(+), 46 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-07-27 16:08:35
|
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 0d543f9483f348c1f6bc8ff0375034590cf9da85 (commit) via bc25855f48edf631d7653345f0bb763759094ba5 (commit) via df6ddedf63a65529b214e609510e055da127a949 (commit) via f0efc558f6354a64fb22255a1979e58a68ff1e0f (commit) from 119e0793739c772fcee2fbe7228c4b61afc279e1 (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 0d543f9483f348c1f6bc8ff0375034590cf9da85 Merge: 119e07937 bc25855f4 Author: Nate Bargmann <n0...@n0...> Date: Sun Jul 27 10:54:55 2025 -0500 Merge GitHub PR #1815 commit bc25855f48edf631d7653345f0bb763759094ba5 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Jul 26 00:15:09 2025 +0200 Check split argument in dummy_get_split_mode() and fix the test diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py index 1c3927cb0..0ccc01097 100755 --- a/bindings/python/test_rig.py +++ b/bindings/python/test_rig.py @@ -51,13 +51,13 @@ class TestClass: info = rig.get_info() assert isinstance(info, str) - assert rig.set_split_vfo(-600000, Hamlib.RIG_VFO_A) is None - assert rig.get_split_vfo(Hamlib.RIG_VFO_TX) == [-600000, 1] - assert rig.set_split_vfo(5000000, Hamlib.RIG_VFO_B) is None - assert rig.get_split_vfo(Hamlib.RIG_VFO_TX) == [5000000, 2] - assert rig.set_split_vfo(5000000, Hamlib.RIG_VFO_CURR) is None - assert rig.get_split_vfo() == [5000000, 1] - assert rig.get_split_vfo(Hamlib.RIG_VFO_CURR) == [5000000, 1] + assert rig.set_split_vfo(Hamlib.RIG_SPLIT_OFF, Hamlib.RIG_VFO_A) is None + assert rig.get_split_vfo(Hamlib.RIG_VFO_TX) == [Hamlib.RIG_SPLIT_OFF, Hamlib.RIG_VFO_A] + assert rig.set_split_vfo(Hamlib.RIG_SPLIT_ON, Hamlib.RIG_VFO_B) is None + assert rig.get_split_vfo(Hamlib.RIG_VFO_TX) == [Hamlib.RIG_SPLIT_ON, Hamlib.RIG_VFO_B] + assert rig.set_split_vfo(Hamlib.RIG_SPLIT_OFF, Hamlib.RIG_VFO_CURR) is None + assert rig.get_split_vfo() == [Hamlib.RIG_SPLIT_OFF, Hamlib.RIG_VFO_B] + assert rig.get_split_vfo(Hamlib.RIG_VFO_CURR) == [Hamlib.RIG_SPLIT_OFF, Hamlib.RIG_VFO_B] # FIXME should use a RIG_ANT_* constant but it isn't available in the bindings RIG_ANT_UNKNOWN = 1<<30 diff --git a/rigs/dummy/dummy.c b/rigs/dummy/dummy.c index de1dae493..e25d0bbf3 100644 --- a/rigs/dummy/dummy.c +++ b/rigs/dummy/dummy.c @@ -1114,11 +1114,25 @@ static int dummy_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) rig_debug(RIG_DEBUG_VERBOSE, "%s: split=%d, vfo=%s, tx_vfo=%s\n", __func__, split, rig_strvfo(vfo), rig_strvfo(tx_vfo)); + switch (split) + { + case RIG_SPLIT_OFF: + priv->split = RIG_SPLIT_OFF; + break; + + case RIG_SPLIT_ON: + priv->split = RIG_SPLIT_ON; + break; + + default: + rig_debug(RIG_DEBUG_ERR, "%s: unsupported split %d", __func__, split); + RETURNFUNC(-RIG_EINVAL); + } + if (tx_vfo == RIG_VFO_NONE || tx_vfo == RIG_VFO_CURR) { tx_vfo = priv->curr_vfo; } if (tx_vfo == RIG_VFO_CURR || tx_vfo == RIG_VFO_TX) { tx_vfo = vfo_fixup(rig, vfo, CACHE(rig)->split); } - priv->split = split; priv->tx_vfo = tx_vfo; RETURNFUNC(RIG_OK); commit df6ddedf63a65529b214e609510e055da127a949 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Fri Jul 25 23:52:02 2025 +0200 Use a define instead of a magic number diff --git a/rigs/dummy/dummy.c b/rigs/dummy/dummy.c index fc9f10571..de1dae493 100644 --- a/rigs/dummy/dummy.c +++ b/rigs/dummy/dummy.c @@ -197,7 +197,7 @@ static void init_chan(RIG *rig, vfo_t vfo, channel_t *chan) chan->rit = 0; chan->xit = 0; chan->tuning_step = 0; - chan->ant = 0; + chan->ant = RIG_ANT_NONE; chan->funcs = (setting_t)0; memset(chan->levels, 0, RIG_SETTING_MAX * sizeof(value_t)); commit f0efc558f6354a64fb22255a1979e58a68ff1e0f Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Jun 29 18:15:00 2025 +0200 Make Dummy Rig handle also RIG_ANT_5 diff --git a/rigs/dummy/dummy.c b/rigs/dummy/dummy.c index a7006792f..fc9f10571 100644 --- a/rigs/dummy/dummy.c +++ b/rigs/dummy/dummy.c @@ -1823,6 +1823,7 @@ static int dummy_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option) case RIG_ANT_2: case RIG_ANT_3: case RIG_ANT_4: + case RIG_ANT_5: curr->ant = ant; break; @@ -1860,6 +1861,7 @@ static int dummy_get_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t *option, case RIG_ANT_2: case RIG_ANT_3: case RIG_ANT_4: + case RIG_ANT_5: *ant_curr = ant; break; @@ -2463,14 +2465,14 @@ struct rig_caps dummy_caps = .agc_levels = { RIG_AGC_OFF, RIG_AGC_SUPERFAST, RIG_AGC_FAST, RIG_AGC_MEDIUM, RIG_AGC_SLOW, RIG_AGC_AUTO, RIG_AGC_USER }, .rx_range_list1 = { { .startf = kHz(150), .endf = MHz(1500), .modes = DUMMY_MODES, - .low_power = -1, .high_power = -1, DUMMY_VFOS, RIG_ANT_1 | RIG_ANT_2 | RIG_ANT_3 | RIG_ANT_4, + .low_power = -1, .high_power = -1, DUMMY_VFOS, RIG_ANT_1 | RIG_ANT_2 | RIG_ANT_3 | RIG_ANT_4 | RIG_ANT_5, .label = "Dummy#1" }, RIG_FRNG_END, }, .tx_range_list1 = { { .startf = kHz(150), .endf = MHz(1500), .modes = DUMMY_MODES, - .low_power = W(5), .high_power = W(100), DUMMY_VFOS, RIG_ANT_1 | RIG_ANT_2 | RIG_ANT_3 | RIG_ANT_4, + .low_power = W(5), .high_power = W(100), DUMMY_VFOS, RIG_ANT_1 | RIG_ANT_2 | RIG_ANT_3 | RIG_ANT_4 | RIG_ANT_5, .label = "Dummy#1" }, RIG_FRNG_END, ----------------------------------------------------------------------- Summary of changes: bindings/python/test_rig.py | 14 +++++++------- rigs/dummy/dummy.c | 24 ++++++++++++++++++++---- 2 files changed, 27 insertions(+), 11 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-07-27 15:53:39
|
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 119e0793739c772fcee2fbe7228c4b61afc279e1 (commit) via 0df9d1767eb7550e1f1668f62e6612e4fd2c442b (commit) via 6088445635876162b47a9d59d4ce70a7d1fef128 (commit) via eefdda51e5451c9b470d84e4fdfc834e254f5d3a (commit) via ede84bfce41bf8da3dafea7c585666259a5e4b71 (commit) via c3ec11e5f7636ebe0912b43f59804aae326ee917 (commit) from 7cceee9abad13888f5705feef5330904eb06bf31 (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 119e0793739c772fcee2fbe7228c4b61afc279e1 Merge: 7cceee9ab 0df9d1767 Author: Nate Bargmann <n0...@n0...> Date: Sun Jul 27 10:14:43 2025 -0500 Merge GitHub PR #1790 commit 0df9d1767eb7550e1f1668f62e6612e4fd2c442b Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Jul 27 12:57:35 2025 +0200 Allow to execute some tests with a simulator or with a real amplifier To execute the tests with the installed Hamlib use the same long arguments as ampctl, eg: bindings/python/test_amp.py --model {MODEL_NUMBER} --amp-file /dev/ttyUSB0 --serial-speed {BAUD} To execute the tests from the build tree, add the path to the libraries that you built, eg. from the root of the build tree: PYTHONPATH=bindings/:bindings/.libs/ ...your command... diff --git a/bindings/python/conftest.py b/bindings/python/conftest.py index 89ba590d9..4f5510778 100644 --- a/bindings/python/conftest.py +++ b/bindings/python/conftest.py @@ -5,6 +5,11 @@ import sys def pytest_addoption(parser): # using long options only because short options conflict with pytest's + if sys.argv[1].endswith("amp.py"): + parser.addoption('--model', type=int, default=1, + 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"): parser.addoption('--model', type=int, default=1, metavar='ID', help='select radio model number') diff --git a/bindings/python/test_amp.py b/bindings/python/test_amp.py index 9d6a1d738..1a0b5eac3 100755 --- a/bindings/python/test_amp.py +++ b/bindings/python/test_amp.py @@ -9,14 +9,12 @@ import Hamlib Hamlib.rig_set_debug(Hamlib.RIG_DEBUG_NONE) -AMP_MODEL = Hamlib.AMP_MODEL_DUMMY - class TestClass: """Container class for tests""" - def test_without_open(self): + def test_without_open(self, model): """Call all the methods that do not depend on open()""" - amp = Hamlib.Amp(AMP_MODEL) + amp = Hamlib.Amp(model) assert amp is not None assert amp.do_exception == 0 assert amp.error_status == Hamlib.RIG_OK @@ -38,9 +36,9 @@ class TestClass: assert amp.token_lookup("") is None - def test_with_open(self): + def test_with_open(self, model): """Call all the methods that depend on open()""" - amp = Hamlib.Amp(AMP_MODEL) + amp = Hamlib.Amp(model) assert amp is not None assert amp.state.comm_state == 0 @@ -70,9 +68,9 @@ class TestClass: assert info is None - def test_object_creation(self): + def test_object_creation(self, model): """Create all objects available""" - amp = Hamlib.Rig(AMP_MODEL) + amp = Hamlib.Rig(model) assert amp is not None assert isinstance(amp.caps, Hamlib.rig_caps) commit 6088445635876162b47a9d59d4ce70a7d1fef128 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Jul 27 12:53:23 2025 +0200 Allow to execute some tests with a simulator or with a real rotator To execute the tests with the installed Hamlib use the same long arguments as rotctl, eg: bindings/python/test_rot.py --model {MODEL_NUMBER} --rot-file /dev/ttyUSB0 --serial-speed {BAUD} To execute the tests from the build tree, add the path to the libraries that you built, eg. from the root of the build tree: PYTHONPATH=bindings/:bindings/.libs/ ...your command... diff --git a/bindings/python/conftest.py b/bindings/python/conftest.py index d3d435e98..89ba590d9 100644 --- a/bindings/python/conftest.py +++ b/bindings/python/conftest.py @@ -1,13 +1,20 @@ """Tests of the Python bindings for Hamlib """ import pytest +import sys def pytest_addoption(parser): # using long options only because short options conflict with pytest's - parser.addoption('--model', type=int, default=1, - metavar='ID', help='select radio model number') - parser.addoption('--rig-file', default=None, - metavar='DEVICE', help='set device of the radio to operate on') + if 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, + metavar='DEVICE', help='set device of the radio to operate on') + elif sys.argv[1].endswith("rot.py"): + parser.addoption('--model', type=int, default=1, + metavar='ID', help='select rotator model number') + parser.addoption('--rot-file', default=None, + metavar='DEVICE', help='set device of the rotator to operate on') parser.addoption('--serial-speed', type=int, default=0, metavar='BAUD', help='set serial speed of the serial port') parser.addoption('--hamlib-verbose', action='count', default=0, diff --git a/bindings/python/test_rot.py b/bindings/python/test_rot.py old mode 100644 new mode 100755 index f51ea46ce..c87835534 --- a/bindings/python/test_rot.py +++ b/bindings/python/test_rot.py @@ -11,8 +11,6 @@ import Hamlib Hamlib.rig_set_debug(Hamlib.RIG_DEBUG_NONE) -ROT_MODEL = Hamlib.ROT_MODEL_DUMMY - class TestClass: """Container class for tests""" @@ -23,9 +21,9 @@ class TestClass: # TOK_EL_ROT_MAGICCOMBO = 5 # handled by get_ext_level/set_ext_level TOK_EL_ROT_MAGICEXTFUNC = 6 - def test_without_open(self): + def test_without_open(self, model): """Call all the methods that do not depend on open()""" - rot = Hamlib.Rot(ROT_MODEL) + rot = Hamlib.Rot(model) assert rot is not None assert rot.do_exception == 0 assert rot.error_status == Hamlib.RIG_OK @@ -42,14 +40,17 @@ class TestClass: assert isinstance(conf, str) assert rot.set_conf("mcfg", "foo") is None conf = rot.get_conf("mcfg") - assert conf == "foo" + if model == Hamlib.ROT_MODEL_DUMMY: + assert conf == "foo" + else: + assert conf == "" assert rot.token_lookup("") is None - def test_with_open(self): + def test_with_open(self, model): """Call all the methods that depend on open()""" - rot = Hamlib.Rot(ROT_MODEL) + rot = Hamlib.Rot(model) assert rot is not None assert rot.state.comm_state == 0 @@ -106,9 +107,9 @@ class TestClass: assert info is None - def test_object_creation(self): + def test_object_creation(self, model): """Create all objects available""" - rot = Hamlib.Rig(ROT_MODEL) + rot = Hamlib.Rig(model) assert rot is not None assert isinstance(rot.caps, Hamlib.rig_caps) commit eefdda51e5451c9b470d84e4fdfc834e254f5d3a Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Jul 27 11:04:52 2025 +0200 Update documentation for Python tests diff --git a/README.developer b/README.developer index bdca0f715..177717f09 100644 --- a/README.developer +++ b/README.developer @@ -481,6 +481,21 @@ autogenerated tests must be updated: and the handwritten tests should be updated to reflect the change. +The Python tests can also be run against a simulator or an actual rig, but +they aren't guaranteed to succeed because the CI only tests the dummy rig. +To execute the tests from the build tree, add the path to the libraries +that you built, using the PYTHONPATH environment variable, eg: + PYTHONPATH=bindings/:bindings/.libs/ bindings/python/test_rig.py \ + --model 1035 --rig-file /dev/ttyUSB0 --serial-speed 4800 + +Only the following long arguments are supported: + --model ID + --rig-file DEVICE + --serial-speed BAUD + --hamlib-verbose +The argument --hamlib-verbose can be repeated as many times as the --verbose +argument accepted by rigctl. + 1.4. Feedback commit ede84bfce41bf8da3dafea7c585666259a5e4b71 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Jul 27 08:39:02 2025 +0200 Also check the "val" parameter in rig_set_conf() Avoids a segfault in lower level functions that can more easily happen when using the bindings. Simmetric with rig_get_conf() via rig_get_conf2(). diff --git a/src/conf.c b/src/conf.c index 41349ec1e..ef845dcde 100644 --- a/src/conf.c +++ b/src/conf.c @@ -1477,7 +1477,7 @@ int HAMLIB_API rig_set_conf(RIG *rig, hamlib_token_t token, const char *val) { rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); - if (!rig || !rig->caps) + if (!rig || !rig->caps || !val) { return -RIG_EINVAL; } commit c3ec11e5f7636ebe0912b43f59804aae326ee917 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Jun 29 19:18:48 2025 +0200 Allow to execute some tests with a simulator or with a real rig To execute the tests with the installed Hamlib use the same long arguments as rigctl, eg: bindings/python/test_rig.py --model {MODEL_NUMBER} --rig-file /dev/ttyUSB0 --serial-speed {BAUD} To execute the tests from the build tree, add the path to the libraries that you built, eg. from the root of the build tree: PYTHONPATH=bindings/:bindings/.libs/ ...your command... diff --git a/bindings/python/conftest.py b/bindings/python/conftest.py new file mode 100644 index 000000000..d3d435e98 --- /dev/null +++ b/bindings/python/conftest.py @@ -0,0 +1,30 @@ +"""Tests of the Python bindings for Hamlib +""" +import pytest + +def pytest_addoption(parser): + # using long options only because short options conflict with pytest's + parser.addoption('--model', type=int, default=1, + metavar='ID', help='select radio model number') + parser.addoption('--rig-file', default=None, + metavar='DEVICE', help='set device of the radio to operate on') + parser.addoption('--serial-speed', type=int, default=0, + metavar='BAUD', help='set serial speed of the serial port') + parser.addoption('--hamlib-verbose', action='count', default=0, + help='set verbose mode, cumulative') + +...@py...xture +def model(request): + return request.config.getoption("--model") + +...@py...xture +def rig_file(request): + return request.config.getoption("--rig-file") + +...@py...xture +def serial_speed(request): + return request.config.getoption("--serial-speed") + +...@py...xture +def hamlib_verbose(request): + return request.config.getoption("--hamlib-verbose") diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py index 1c3927cb0..2de41ec71 100755 --- a/bindings/python/test_rig.py +++ b/bindings/python/test_rig.py @@ -5,20 +5,18 @@ 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. """ -from pytest import raises +import pytest import Hamlib Hamlib.rig_set_debug(Hamlib.RIG_DEBUG_NONE) -RIG_MODEL = Hamlib.RIG_MODEL_DUMMY - class TestClass: """Container class for tests""" - def test_without_open(self): + def test_without_open(self, model): """Call all the methods that do not depend on open()""" - rig = Hamlib.Rig(RIG_MODEL) + rig = Hamlib.Rig(model) assert rig is not None assert rig.do_exception == 0 assert rig.error_status == Hamlib.RIG_OK @@ -35,17 +33,22 @@ class TestClass: assert isinstance(conf, str) assert rig.set_conf("mcfg", "foo") is None conf = rig.get_conf("mcfg") - assert conf == "foo" + if model == Hamlib.RIG_MODEL_DUMMY: + assert conf == "foo" + else: + assert conf == "" assert rig.token_lookup("") is None - def test_with_open(self): + def test_with_open(self, model, rig_file, serial_speed): """Call all the methods that depend on open()""" - rig = Hamlib.Rig(RIG_MODEL) + rig = Hamlib.Rig(model) assert rig is not None assert rig.state.comm_state == 0 + assert rig.set_conf("rig_pathname", rig_file) is None + assert rig.set_conf("serial_speed", str(serial_speed)) is None assert rig.open() is None assert rig.state.comm_state == 1 info = rig.get_info() @@ -70,9 +73,10 @@ class TestClass: assert info is None - def test_misc(self): + @pytest.mark.skipif('config.getoption("model") != Hamlib.RIG_MODEL_DUMMY') + def test_misc(self, model): """Just call all the methods""" - rig = Hamlib.Rig(RIG_MODEL) + rig = Hamlib.Rig(model) assert rig is not None assert rig.close() is None @@ -213,9 +217,10 @@ class TestClass: assert rig.vfo_op(0, 0) is None - def test_object_creation(self): + @pytest.mark.skipif('config.getoption("model") != Hamlib.RIG_MODEL_DUMMY') + def test_object_creation(self, model): """Create all objects available""" - rig = Hamlib.Rig(RIG_MODEL) + rig = Hamlib.Rig(model) assert rig is not None assert isinstance(rig.caps, Hamlib.rig_caps) ----------------------------------------------------------------------- Summary of changes: README.developer | 15 +++++++++++++++ bindings/python/conftest.py | 42 ++++++++++++++++++++++++++++++++++++++++++ bindings/python/test_amp.py | 14 ++++++-------- bindings/python/test_rig.py | 29 +++++++++++++++++------------ bindings/python/test_rot.py | 19 ++++++++++--------- src/conf.c | 2 +- 6 files changed, 91 insertions(+), 30 deletions(-) create mode 100644 bindings/python/conftest.py mode change 100644 => 100755 bindings/python/test_rot.py hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-07-27 03:36:39
|
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 7cceee9abad13888f5705feef5330904eb06bf31 (commit) via 4d6a3ed582b89c3968a9892c607f54da41b97604 (commit) via f67a3cfe4722728335fb11a5939b6233a8cbec44 (commit) via d2025477be1e5181980fddf9a05bf5ca86d5d4bd (commit) via d6d50245c697cb806f1a46fabc41f329aa25a321 (commit) via 15c5b4d7719ae9dcc6887a8aa788213c8ac97846 (commit) from 04c00330a6265680c2a78dbf88e9274eae1f02da (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 7cceee9abad13888f5705feef5330904eb06bf31 Author: Nate Bargmann <n0...@n0...> Date: Sat Jul 26 18:32:34 2025 -0500 Complete Doxygen comments for rotlist.h Add new topic for rotator model list. diff --git a/doc/index.doxygen b/doc/index.doxygen index 46f7f73ba..7fb7a9ebb 100644 --- a/doc/index.doxygen +++ b/doc/index.doxygen @@ -193,9 +193,10 @@ GNU/Linux. * \defgroup riglist Rig (radio) Model List * \defgroup rig_internal Rig (transceiver) Internal API * \defgroup rotator Rotator API + * \defgroup rotlist Rotator Model List * \defgroup rot_internal Rotator Internal API * \defgroup amplifier Amplifier API - * \defgroup amplist Amplifier model list + * \defgroup amplist Amplifier Model list * \defgroup amp_internal Amplifier Internal API * \defgroup port Port data structure for accessing devices * \defgroup utilities Utility Routines API diff --git a/include/hamlib/rotlist.h b/include/hamlib/rotlist.h index 567aa59e6..e50fdc46d 100644 --- a/include/hamlib/rotlist.h +++ b/include/hamlib/rotlist.h @@ -24,17 +24,12 @@ #ifndef _ROTLIST_H #define _ROTLIST_H 1 -//! @cond Doxygen_Suppress -#define ROT_MAKE_MODEL(a,b) (100*(a)+(b)) -#define ROT_BACKEND_NUM(a) ((a)/100) -//! @endcond - - /** - * \addtogroup rotator + * \addtogroup rotlist * @{ */ + /** * \brief Hamlib rotator model definitions. * @@ -54,6 +49,27 @@ * wishes to use which is passed to the rot_init() API call. */ +/** + * \brief The rotator model number is held in a signed integer. + * + * Model numbers are a simple decimal value that increments by a value of + * 100 for each backend, e.g. the `DUMMY` backend has model numbers 1 + * to 100, the `EASYCOMM` backend has model numbers 201 to 300 and so on + * (101 to 200 is currently unassigned). + * + * \note A limitation is that with ::rot_model_t being a signed integer that on + * some systems such a value may be 16 bits. This limits the number of backends + * to 326 of 100 models each (32768 / 100 thus leaving only 68 models for + * backend number 327 so round down to 326). So far this doesn't seem like an + * extreme limitation. + * + * \sa rot_model_t + */ +#define ROT_MAKE_MODEL(a,b) (100*(a)+(b)) + +/** Convenience macro to derive the backend family number from the model number. */ +#define ROT_BACKEND_NUM(a) ((a)/100) + /** * \brief A macro that returns the model number for an unknown model. * @@ -65,56 +81,62 @@ #define ROT_MODEL_NONE 0 +/** The `DUMMY` family. Also contains network models. */ +#define ROT_DUMMY 0 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_DUMMY "dummy" + /** - * \brief A macro that returns the model number for the DUMMY backend. + * \brief A macro that returns the model number for `DUMMY`. * * \def ROT_MODEL_DUMMY * - * The DUMMY backend, as the name suggests, is a backend which performs + * The `DUMMY` model, as the name suggests, is a backend which performs * no hardware operations and always behaves as one would expect. It can * be thought of as a hardware simulator and is very useful for testing * client applications. */ /** - * \brief A macro that returns the model number for the NETROTCTL backend. + * \brief A macro that returns the model number for `NETROTCTL`. * * \def ROT_MODEL_NETROTCTL * - * The NETROTCTL backend allows use of the `rotctld` daemon through the normal + * The `NETROTCTL` model allows use of the `rotctld` daemon through the normal * Hamlib API. */ /** - * \brief A macro that returns the model number for the PSTROTATOR backend. + * \brief A macro that returns the model number for `PSTROTATOR`. * * \def ROT_MODEL_PSTROTATOR * - * The PSTROTATOR backend allows Hamlib clients to access the rotators controlled + * The `PSTROTATOR` model allows Hamlib clients to access the rotators controlled * by the PstRotator software by YO3DMU: https://www.qsl.net/yo3dmu/index_Page346.htm */ /** - * \brief A macro that returns the model number for the SATROTCTL backend. + * \brief A macro that returns the model number for `SATROTCTL`. * * \def ROT_MODEL_SATROTCTL * - * The SATROTCTL allows Hamlib clients to access the rotators controlled by + * The `SATROTCTL` model allows Hamlib clients to access the rotators controlled by * the S.A.T hardware by CSN Tecnologies: http://csntechnologies.net/ */ -//! @cond Doxygen_Suppress -#define ROT_DUMMY 0 -#define ROT_BACKEND_DUMMY "dummy" -//! @endcond #define ROT_MODEL_DUMMY ROT_MAKE_MODEL(ROT_DUMMY, 1) #define ROT_MODEL_NETROTCTL ROT_MAKE_MODEL(ROT_DUMMY, 2) #define ROT_MODEL_PSTROTATOR ROT_MAKE_MODEL(ROT_DUMMY, 3) #define ROT_MODEL_SATROTCTL ROT_MAKE_MODEL(ROT_DUMMY, 4) +/** The `EASYCOMM` family. */ +#define ROT_EASYCOMM 2 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_EASYCOMM "easycomm" + /** - * \brief A macro that returns the model number of the EASYCOMM 1 backend. + * \brief A macro that returns the model number of `EASYCOMM1`. * * \def ROT_MODEL_EASYCOMM1 * - * The EASYCOMM1 backend can be used with rotators that support the EASYCOMM + * The `EASYCOMM1` model can be used with rotators that support the EASYCOMM * I Standard. */ /** @@ -122,7 +144,7 @@ * * \def ROT_MODEL_EASYCOMM2 * - * The EASYCOMM2 backend can be used with rotators that support the EASYCOMM + * The EASYCOMM2 model can be used with rotators that support the EASYCOMM * II Standard. */ /** @@ -130,84 +152,82 @@ * * \def ROT_MODEL_EASYCOMM3 * - * The EASYCOMM3 backend can be used with rotators that support the EASYCOMM + * The EASYCOMM3 model can be used with rotators that support the EASYCOMM * III Standard. */ -//! @cond Doxygen_Suppress -#define ROT_EASYCOMM 2 -#define ROT_BACKEND_EASYCOMM "easycomm" -//! @endcond #define ROT_MODEL_EASYCOMM1 ROT_MAKE_MODEL(ROT_EASYCOMM, 1) #define ROT_MODEL_EASYCOMM2 ROT_MAKE_MODEL(ROT_EASYCOMM, 2) #define ROT_MODEL_EASYCOMM3 ROT_MAKE_MODEL(ROT_EASYCOMM, 4) +/** The `FODTRACK` family. */ +#define ROT_FODTRACK 3 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_FODTRACK "fodtrack" + /** - * \brief A macro that returns the model number of the FODTRACK backend. + * \brief A macro that returns the model number of `FODTRACK`. * * \def ROT_MODEL_FODTRACK * - * The FODTRACK backend can be used with rotators that support the FODTRACK + * The `FODTRACK model` can be used with rotators that support the FODTRACK * Standard. */ -//! @cond Doxygen_Suppress -#define ROT_FODTRACK 3 -#define ROT_BACKEND_FODTRACK "fodtrack" -//! @endcond #define ROT_MODEL_FODTRACK ROT_MAKE_MODEL(ROT_FODTRACK, 1) +/** The `ROTOREZ` family. */ +#define ROT_ROTOREZ 4 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_ROTOREZ "rotorez" + /** - * \brief A macro that returns the model number of the ROTOREZ backend. + * \brief A macro that returns the model number of `ROTOREZ`. * * \def ROT_MODEL_ROTOREZ * - * The ROTOREZ backend can be used with Hy-Gain rotators that support the + * The `ROTOREZ` model can be used with Hy-Gain rotators that support the * extended DCU command set by the Idiom Press Rotor-EZ board. */ /** - * \brief A macro that returns the model number of the ROTORCARD backend. + * \brief A macro that returns the model number of `ROTORCARD`. * * \def ROT_MODEL_ROTORCARD * - * The ROTORCARD backend can be used with Yaesu rotators that support the + * The `ROTORCARD` model can be used with Yaesu rotators that support the * extended DCU command set by the Idiom Press Rotor Card board. */ /** - * \brief A macro that returns the model number of the DCU backend. + * \brief A macro that returns the model number of `DCU`. * * \def ROT_MODEL_DCU * - * The DCU backend can be used with rotators that support the DCU command set + * The `DCU` model can be used with rotators that support the DCU command set * by Hy-Gain (currently the DCU-1). */ /** - * \brief A macro that returns the model number of the ERC backend. + * \brief A macro that returns the model number of `ERC`. * * \def ROT_MODEL_ERC * - * The ERC backend can be used with rotators that support the DCU command set + * The `ERC` model can be used with rotators that support the DCU command set * by DF9GR (currently the ERC). */ /** - * \brief A macro that returns the model number of the RT21 backend. + * \brief A macro that returns the model number of `RT21`. * * \def ROT_MODEL_RT21 * - * The RT21 backend can be used with rotators that support the DCU command set + * The `RT21` model can be used with rotators that support the DCU command set * by Green Heron (currently the RT-21). */ /** - * \brief A macro that returns the model number of the YRC-1 backend. + * \brief A macro that returns the model number of `YRC-1`. * * \def ROT_MODEL_YRC1 * - * The YRC1 backend can be used with rotators that support the DCU 2/3 command set + * The `YRC1` model can be used with rotators that support the DCU 2/3 command set */ -//! @cond Doxygen_Suppress -#define ROT_ROTOREZ 4 -#define ROT_BACKEND_ROTOREZ "rotorez" -//! @endcond #define ROT_MODEL_ROTOREZ ROT_MAKE_MODEL(ROT_ROTOREZ, 1) #define ROT_MODEL_ROTORCARD ROT_MAKE_MODEL(ROT_ROTOREZ, 2) #define ROT_MODEL_DCU ROT_MAKE_MODEL(ROT_ROTOREZ, 3) @@ -217,135 +237,139 @@ #define ROT_MODEL_RT21 ROT_MAKE_MODEL(ROT_ROTOREZ, 5) +/** The `SARTEK` family. */ +#define ROT_SARTEK 5 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_SARTEK "sartek" + /** - * \brief A macro that returns the model number of the SARTEK1 backend. + * \brief A macro that returns the model number of `SARTEK1`. * * \def ROT_MODEL_SARTEK1 * - * The SARTEK1 backend can be used with rotators that support the SARtek + * The `SARTEK1` model can be used with rotators that support the SARtek * protocol. */ -//! @cond Doxygen_Suppress -#define ROT_SARTEK 5 -#define ROT_BACKEND_SARTEK "sartek" -//! @endcond #define ROT_MODEL_SARTEK1 ROT_MAKE_MODEL(ROT_SARTEK, 1) +/** The `GS232A` family. */ +#define ROT_GS232A 6 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_GS232A "gs232a" + /** - * \brief A macro that returns the model number of the GS232A backend. + * \brief A macro that returns the model number of `GS232A`. * * \def ROT_MODEL_GS232A * - * The GS232A backend can be used with rotators that support the GS-232A + * The `GS232A` model can be used with rotators that support the GS-232A * protocol. */ /** - * \brief A macro that returns the model number of the GS232 backend. + * \brief A macro that returns the model number of `GS232_GENERIC`. * * \def ROT_MODEL_GS232_GENERIC * - * The GS232_GENERIC backend can be used with rotators that support the + * The` GS232_GENERIC` model can be used with rotators that support the * generic (even if not coded correctly) GS-232 protocol. */ /** - * \brief A macro that returns the model number of the GS232 backend. - * - * \def ROT_MODEL_AF6SA_WRC - * - * The GS232_GENERIC backend can be used with rotators that support the - * generic (even if not coded correctly) GS-232 protocol. - */ -/** - * \brief A macro that returns the model number of the GS232B backend. + * \brief A macro that returns the model number of `GS232B`. * * \def ROT_MODEL_GS232B * - * The GS232B backend can be used with rotators that support the GS232B + * The `GS232B` model can be used with rotators that support the GS232B * protocol. */ /** - * \brief A macro that returns the model number of the F1TETRACKER backend. + * \brief A macro that returns the model number of `F1TETRACKER`. * * \def ROT_MODEL_F1TETRACKER * - * The F1TETRACKER backend can be used with rotators that support the F1TE + * The `F1TETRACKER` model can be used with rotators that support the F1TE * Tracker protocol. */ /** - * \brief A macro that returns the model number of the GS23 backend. + * \brief A macro that returns the model number of `GS23`. * * \def ROT_MODEL_GS23 * - * The GS23 backend can be used with rotators that support the GS-23 protocol. + * The `GS23` model can be used with rotators that support the GS-23 protocol. */ /** - * \brief A macro that returns the model number of the GS232 backend. + * \brief A macro that returns the model number of `GS232`. * * \def ROT_MODEL_GS232 * - * The GS232 backend can be used with rotators that support the GS-232 + * The `GS232` model can be used with rotators that support the GS-232 * protocol. */ /** - * \brief A macro that returns the model number of the LVB backend. + * \brief A macro that returns the model number of `LVB`. * * \def ROT_MODEL_LVB * - * The LVB backend can be used with rotators that support the G6LVB AMSAT LVB + * The `LVB` model can be used with rotators that support the G6LVB AMSAT LVB * Tracker GS-232 based protocol. */ /** - * \brief A macro that returns the model number of the ST2 backend. + * \brief A macro that returns the model number of `ST2`. * * \def ROT_MODEL_ST2 * - * The ST2 backend can be used with rotators that support the Fox Delta ST2 + * The `ST2` model can be used with rotators that support the Fox Delta ST2 * GS-232 based protocol. */ /** - * \brief A macro that returns the model number of the GS232A_AZ Azimuth backend. + * \brief A macro that returns the model number of `GS232A_AZ` Azimuth. * * \def ROT_MODEL_GS232A_AZ * - * The GS232A_AZ backend can be used with azimuth rotators that support the + * The `GS232A_AZ` model can be used with azimuth rotators that support the * GS-232A protocol. */ /** - * \brief A macro that returns the model number of the GS232A_EL Elevation backend. + * \brief A macro that returns the model number of `GS232A_EL` Elevation. * * \def ROT_MODEL_GS232A_EL * - * The GS232A_EL backend can be used with elevation rotators that support the + * The `GS232A_EL` model can be used with elevation rotators that support the * GS-232A protocol. */ /** - * \brief A macro that returns the model number of the GS232B_AZ Azimuth backend. + * \brief A macro that returns the model number of ` GS232B_AZ` Azimuth. * * \def ROT_MODEL_GS232B_AZ * - * The GS232B_AZ backend can be used with azimuth rotators that support the + * The `GS232B_AZ` model can be used with azimuth rotators that support the * GS-232B protocol. */ /** - * \brief A macro that returns the model number of the GS232B_EL Elevation backend. + * \brief A macro that returns the model number of `GS232B_EL` Elevation. * * \def ROT_MODEL_GS232B_EL * - * The GS232B_EL backend can be used with elevation rotators that support the + * The `GS232B_EL` model can be used with elevation rotators that support the * GS-232B protocol. */ /** - * \brief A macro that returns the model number of the GS23_AZ azimuth backend. + * \brief A macro that returns the model number of `GS23_AZ` azimuth. * * \def ROT_MODEL_GS23_AZ * - * The GS23_AZ backend can be used with azimuth rotators that support a + * The `GS23_AZ` model can be used with azimuth rotators that support a * generic version of the GS-232A protocol. */ +/** + * \brief A macro that returns the model number of `AF6SA_WRC`. + * + * \def ROT_MODEL_AF6SA_WRC + * + * The `AF6SA_WRC` model can be used with the AF6SA controller. + * http://af6sa.com/projects/wrc.html + */ //! @cond Doxygen_Suppress -#define ROT_GS232A 6 -#define ROT_BACKEND_GS232A "gs232a" //! @endcond #define ROT_MODEL_GS232A ROT_MAKE_MODEL(ROT_GS232A, 1) #define ROT_MODEL_GS232_GENERIC ROT_MAKE_MODEL(ROT_GS232A, 2) /* GENERIC */ @@ -362,327 +386,348 @@ #define ROT_MODEL_GS23_AZ ROT_MAKE_MODEL(ROT_GS232A, 13) #define ROT_MODEL_AF6SA_WRC ROT_MAKE_MODEL(ROT_GS232A, 14) -// Add documentation when this model is implemented. //! @cond Doxygen_Suppress -#define ROT_ARRAYSOLUTIONS 7 +/** The `ARRAYSOLUTIONS` family. */ +#define ROT_ARRAYSOLUTIONS 327 // Adjust value when implemented. +/** Used in register.c for the `be_name`. */ #define ROT_BACKEND ARRAYSOLUTIONS "arraysolutions" +// Add documentation when this model is implemented. #define ROT_MODEL_ARRAYSOLUTIONS_SAL_12_20_30 ROT_MAKE_MODEL(ROT_ARRAYSOLUTIONS, 1) //! @endcond +/** The `KIT` family. */ +#define ROT_KIT 7 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_KIT "kit" + /** - * \brief A macro that returns the model number of the PCROTOR backend. + * \brief A macro that returns the model number of `PCROTOR`. * * \def ROT_MODEL_PCROTOR * - * The PCROTOR backend is a member of the kit backend group that can be used + * The `PCROTOR` model is a member of the kit backend group that can be used * with home brewed rotators. */ -//! @cond Doxygen_Suppress -#define ROT_KIT 7 -#define ROT_BACKEND_KIT "kit" -//! @endcond #define ROT_MODEL_PCROTOR ROT_MAKE_MODEL(ROT_KIT, 1) +/** The `HEATHKIT` family. */ +#define ROT_HEATHKIT 8 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_HEATHKIT "heathkit" + /** - * \brief A macro that returns the model number of the HD1780 backend. + * \brief A macro that returns the model number of `HD1780`. * * \def ROT_MODEL_HD1780 * - * The HD1780 backend can be used with rotators that support the Heathkit + * The `HD1780` model can be used with rotators that support the Heathkit * HD-1780 protocol. */ -//! @cond Doxygen_Suppress -#define ROT_HEATHKIT 8 -#define ROT_BACKEND_HEATHKIT "heathkit" -//! @endcond #define ROT_MODEL_HD1780 ROT_MAKE_MODEL(ROT_HEATHKIT, 1) +/** The `SPID` family. */ +#define ROT_SPID 9 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_SPID "spid" + /** - * \brief A macro that returns the model number of the ROT2PROG backend. + * \brief A macro that returns the model number of `ROT2PROG`. * * \def ROT_MODEL_SPID_ROT2PROG * - * The SPID_ROT2PROG backend can be used with rotators that support the SPID + * The `SPID_ROT2PROG` model can be used with rotators that support the SPID * azimuth and elevation protocol. */ /** - * \brief A macro that returns the model number of the ROT1PROG backend. + * \brief A macro that returns the model number of `ROT1PROG`. * * \def ROT_MODEL_SPID_ROT1PROG * - * The SPID_ROT1PROG backend can be used with rotators that support the SPID + * The `SPID_ROT1PROG` model can be used with rotators that support the SPID * azimuth protocol. */ /** - * \brief A macro that returns the model number of the SPID_MD01_ROT2PROG backend. + * \brief A macro that returns the model number of `SPID_MD01_ROT2PROG`. * * \def ROT_MODEL_SPID_MD01_ROT2PROG * - * The SPID_MD01_ROT2PROG backend can be used with rotators that support the + * The `SPID_MD01_ROT2PROG` model can be used with rotators that support the * extended SPID ROT2PROG azimuth and elevation protocol. */ -//! @cond Doxygen_Suppress -#define ROT_SPID 9 -#define ROT_BACKEND_SPID "spid" -//! @endcond #define ROT_MODEL_SPID_ROT2PROG ROT_MAKE_MODEL(ROT_SPID, 1) #define ROT_MODEL_SPID_ROT1PROG ROT_MAKE_MODEL(ROT_SPID, 2) #define ROT_MODEL_SPID_MD01_ROT2PROG ROT_MAKE_MODEL(ROT_SPID, 3) +/** The `M2` family. */ +#define ROT_M2 10 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_M2 "m2" + /** - * \brief A macro that returns the model number of the RC2800 backend. + * \brief A macro that returns the model number of `RC2800`. * * \def ROT_MODEL_RC2800 * - * The RC2800 backend can be used with rotators that support the M2 (M + * The `RC2800` model can be used with rotators that support the M2 (M * Squared) RC2800 protocol. */ /** - * \brief A macro that returns the model number of the RC2800_EARLY_AZ - * backend. + * \brief A macro that returns the model number of `RC2800_EARLY_AZ`. * * \def ROT_MODEL_RC2800_EARLY_AZ * - * The RC2800_EARLY_AZ backend can be used with rotators that support the M2 + * The `RC2800_EARLY_AZ` model can be used with rotators that support the M2 * (M Squared) RC2800 early azimuth protocol. */ /** - * \brief A macro that returns the model number of the RC2800_EARLY_AZEL - * backend. + * \brief A macro that returns the model number of `RC2800_EARLY_AZEL`. * * \def ROT_MODEL_RC2800_EARLY_AZEL * - * The RC2800_EARLY_AZEL backend can be used with rotators that support the M2 + * The `RC2800_EARLY_AZEL` model can be used with rotators that support the M2 * (M Squared) RC2800 early azimuth and elevation protocol. */ -//! @cond Doxygen_Suppress -#define ROT_M2 10 -#define ROT_BACKEND_M2 "m2" -//! @endcond #define ROT_MODEL_RC2800 ROT_MAKE_MODEL(ROT_M2, 1) #define ROT_MODEL_RC2800_EARLY_AZ ROT_MAKE_MODEL(ROT_M2, 2) #define ROT_MODEL_RC2800_EARLY_AZEL ROT_MAKE_MODEL(ROT_M2, 3) +/** The `ARS` family. */ +#define ROT_ARS 11 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_ARS "ars" + /** - * \brief A macro that returns the model number of the RCI_AZEL backend. + * \brief A macro that returns the model number of `RCI_AZEL`. * * \def ROT_MODEL_RCI_AZEL * - * The RCI_AZEL backend can be used with rotators that support the ARS azimuth + * The `RCI_AZEL` model can be used with rotators that support the ARS azimuth * and elevation protocol. */ /** - * \brief A macro that returns the model number of the RCI_AZ backend. + * \brief A macro that returns the model number of `RCI_AZ`. * * \def ROT_MODEL_RCI_AZ * - * The RCI_AZ backend can be used with rotators that support the ARS azimuth + * The `RCI_AZ` model can be used with rotators that support the ARS azimuth * protocol. */ -//! @cond Doxygen_Suppress -#define ROT_ARS 11 -#define ROT_BACKEND_ARS "ars" -//! @endcond #define ROT_MODEL_RCI_AZEL ROT_MAKE_MODEL(ROT_ARS, 1) #define ROT_MODEL_RCI_AZ ROT_MAKE_MODEL(ROT_ARS, 2) +/** The `AMSAT` family. */ +#define ROT_AMSAT 12 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_AMSAT "amsat" + /** - * \brief A macro that returns the model number of the IF100 backend. + * \brief A macro that returns the model number of `IF100`. * * \def ROT_MODEL_IF100 * - * The IF100 backend can be used with rotators that support the AMSAT IF-100 + * The `IF100` model can be used with rotators that support the AMSAT IF-100 * interface. */ -//! @cond Doxygen_Suppress -#define ROT_AMSAT 12 -#define ROT_BACKEND_AMSAT "amsat" -//! @endcond #define ROT_MODEL_IF100 ROT_MAKE_MODEL(ROT_AMSAT, 1) +/** The `TS7400` family. */ +#define ROT_TS7400 13 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_TS7400 "ts7400" + /** - * \brief A macro that returns the model number of the TS7400 backend. + * \brief A macro that returns the model number of `TS7400`. * * \def ROT_MODEL_TS7400 * - * The TS7400 backend supports an embedded ARM board using the TS-7400 Linux + * The `TS7400` model supports an embedded ARM board using the TS-7400 Linux * board. More information is at https://www.embeddedarm.com */ -//! @cond Doxygen_Suppress -#define ROT_TS7400 13 -#define ROT_BACKEND_TS7400 "ts7400" -//! @endcond #define ROT_MODEL_TS7400 ROT_MAKE_MODEL(ROT_TS7400, 1) +/** The `CELESTRON` family. */ +#define ROT_CELESTRON 14 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_CELESTRON "celestron" + /** - * \brief A macro that returns the model number of the NEXSTAR backend. + * \brief A macro that returns the model number of `NEXSTAR`. * * \def ROT_MODEL_NEXSTAR * - * The NEXSTAR backend can be used with rotators that support the Celestron + * The `NEXSTAR` model can be used with rotators that support the Celestron * NexStar protocol and alike. */ -//! @cond Doxygen_Suppress -#define ROT_CELESTRON 14 -#define ROT_BACKEND_CELESTRON "celestron" -//! @endcond #define ROT_MODEL_NEXSTAR ROT_MAKE_MODEL(ROT_CELESTRON, 1) +/** The `ETHER6` family. */ +#define ROT_ETHER6 15 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_ETHER6 "ether6" + /** - * \brief A macro that returns the model number of the ETHER6 backend. + * \brief A macro that returns the model number of `ETHER6`. * * \def ROT_MODEL_ETHER6 * - * The ETHER6 backend can be used with rotators that support the Ether6 + * The `ETHER6` model can be used with rotators that support the Ether6 * protocol. */ -//! @cond Doxygen_Suppress -#define ROT_ETHER6 15 -#define ROT_BACKEND_ETHER6 "ether6" -//! @endcond #define ROT_MODEL_ETHER6 ROT_MAKE_MODEL(ROT_ETHER6, 1) +/** The `CNCTRK` family. */ +#define ROT_CNCTRK 16 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_CNCTRK "cnctrk" + /** - * \brief A macro that returns the model number of the CNCTRK backend. + * \brief A macro that returns the model number of `CNCTRK`. * * \def ROT_MODEL_CNCTRK * - * The CNCTRK backend can be used with rotators that support the LinuxCNC + * The `CNCTRK` model can be used with rotators that support the LinuxCNC * running Axis GUI interface. */ -//! @cond Doxygen_Suppress -#define ROT_CNCTRK 16 -#define ROT_BACKEND_CNCTRK "cnctrk" -//! @endcond #define ROT_MODEL_CNCTRK ROT_MAKE_MODEL(ROT_CNCTRK, 1) +/** The `PROSISTEL` family. */ +#define ROT_PROSISTEL 17 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_PROSISTEL "prosistel" + /** - * \brief A macro that returns the model number of the PROSISTEL_D_AZ backend. + * \brief A macro that returns the model number of `PROSISTEL_D_AZ`. * * \def ROT_MODEL_PROSISTEL_D_AZ * - * The PROSISTEL_D_AZ backend can be used with rotators that support the Prosistel + * The `PROSISTEL_D_AZ` model can be used with rotators that support the Prosistel * azimuth protocol. */ /** - * \brief A macro that returns the model number of the PROSISTEL_D_EL backend. + * \brief A macro that returns the model number of `PROSISTEL_D_EL`. * * \def ROT_MODEL_PROSISTEL_D_EL * - * The PROSISTEL_D_EL backend can be used with rotators that support the Prosistel + * The `PROSISTEL_D_EL` model can be used with rotators that support the Prosistel * elevation protocol. */ /** - * \brief A macro that returns the model number of the - * PROSISTEL_COMBI_TRACK_AZEL backend. + * \brief A macro that returns the model number of `PROSISTEL_COMBI_TRACK_AZEL`. * * \def ROT_MODEL_PROSISTEL_COMBI_TRACK_AZEL * - * The PROSISTEL_AZEL_COMBI_TRACK_AZEL backend can be used with rotators that + * The `PROSISTEL_AZEL_COMBI_TRACK_AZEL` model can be used with rotators that * support the Prosistel combination azimuth and elevation protocol. */ /** - * \brief A macro that returns the model number of the PROSISTEL_D_EL_CBOXAZ - * backend. + * \brief A macro that returns the model number of `PROSISTEL_D_EL_CBOXAZ`. * * \def ROT_MODEL_PROSISTEL_D_EL_CBOXAZ * - * The PROSISTEL_D_EL_CBOXAZ backend can be used with the elevation rotator + * The `PROSISTEL_D_EL_CBOXAZ` model can be used with the elevation rotator * with Control Box D using azimuth logic. */ -//! @cond Doxygen_Suppress -#define ROT_PROSISTEL 17 -#define ROT_BACKEND_PROSISTEL "prosistel" -//! @endcond #define ROT_MODEL_PROSISTEL_D_AZ ROT_MAKE_MODEL(ROT_PROSISTEL, 1) #define ROT_MODEL_PROSISTEL_D_EL ROT_MAKE_MODEL(ROT_PROSISTEL, 2) #define ROT_MODEL_PROSISTEL_COMBI_TRACK_AZEL ROT_MAKE_MODEL(ROT_PROSISTEL, 3) #define ROT_MODEL_PROSISTEL_D_EL_CBOXAZ ROT_MAKE_MODEL(ROT_PROSISTEL, 4) +/** The `MEADE` family. */ +#define ROT_MEADE 18 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_MEADE "meade" + /** - * \brief A macro that returns the model number of the MEADE backend. + * \brief A macro that returns the model number of `MEADE`. * * \def ROT_MODEL_MEADE * - * The MEADE backend can be used with Meade telescope rotators like the + * The `MEADE` model can be used with Meade telescope rotators like the * DS-2000. */ -//! @cond Doxygen_Suppress -#define ROT_MEADE 18 -#define ROT_BACKEND_MEADE "meade" -//! @endcond #define ROT_MODEL_MEADE ROT_MAKE_MODEL(ROT_MEADE, 1) + +/** The `IOPTRON` family. */ +#define ROT_IOPTRON 19 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_IOPTRON "ioptron" + /** - * \brief A macro that returns the model number of the IOPTRON backend. + * \brief A macro that returns the model number of `IOPTRON`. * * \def ROT_MODEL_IOPTRON * - * The IOPTRON backend can be used with IOPTRON telescope mounts. + * The `IOPTRON` model can be used with IOPTRON telescope mounts. */ -//! @cond Doxygen_Suppress -#define ROT_IOPTRON 19 -#define ROT_BACKEND_IOPTRON "ioptron" -//! @endcond #define ROT_MODEL_IOPTRON ROT_MAKE_MODEL(ROT_IOPTRON, 1) +/** The `INDI` family. */ +#define ROT_INDI 20 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_INDI "indi" + /** - * \brief A macro that returns the model number of the INDI backend. + * \brief A macro that returns the model number of `INDI`. * * \def ROT_MODEL_INDI * - * The INDI backend can be used with rotators that support the INDI interface. + * The `INDI` model can be used with rotators that support the INDI interface. */ -//! @cond Doxygen_Suppress -#define ROT_INDI 20 -#define ROT_BACKEND_INDI "indi" -//! @endcond #define ROT_MODEL_INDI ROT_MAKE_MODEL(ROT_INDI, 1) +/** The `SATEL` family. */ +#define ROT_SATEL 21 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_SATEL "satel" + /** - * \brief A macro that returns the model number of the SATEL backend. + * \brief A macro that returns the model number of `SATEL`. * * \def ROT_MODEL_SATEL * - * The SATEL backend can be used with rotators that support the VE5FP + * The `SATEL` model can be used with rotators that support the VE5FP * interface. */ -//! @cond Doxygen_Suppress -#define ROT_SATEL 21 -#define ROT_BACKEND_SATEL "satel" -//! @endcond #define ROT_MODEL_SATEL ROT_MAKE_MODEL(ROT_SATEL, 1) +/** The `RADANT` family. */ +#define ROT_RADANT 22 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_RADANT "radant" + /** - * \brief A macro that returns the model number of the RADANT backend. + * \brief A macro that returns the model number of `RADANT`. * * \def ROT_MODEL_RADANT * - * The RADANT backend can be used with rotators that support the MS232 + * The `RADANT` model can be used with rotators that support the MS232 * interface. */ -//! @cond Doxygen_Suppress -#define ROT_RADANT 22 -#define ROT_BACKEND_RADANT "radant" -//! @endcond #define ROT_MODEL_RADANT ROT_MAKE_MODEL(ROT_RADANT, 1) + +/** The `ANDROIDSENSOR` family. */ +#define ROT_ANDROIDSENSOR 23 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_ANDROIDSENSOR "androidsensor" + /** - * \brief A macro that returns the model number of the ANDROIDSENSOR backend. + * \brief A macro that returns the model number of `ANDROIDSENSOR`. * * \def ROT_MODEL_ANDROIDSENSOR * @@ -691,89 +736,96 @@ * attitude determination for your antenna and the phone tied to it. Now you * can wave your antenna to find radio signals. */ -//! @cond Doxygen_Suppress -#define ROT_ANDROIDSENSOR 23 -#define ROT_BACKEND_ANDROIDSENSOR "androidsensor" -//! @endcond #define ROT_MODEL_ANDROIDSENSOR ROT_MAKE_MODEL(ROT_ANDROIDSENSOR, 1) + +/** The `GRBLTRK` family. */ +#define ROT_GRBLTRK 24 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_GRBLTRK "grbltrk" + /** - * \brief A macro that returns the model number of the ROT_MODEL_GRBLTRK_SER backend. + * \brief A macro that returns the model number of `ROT_MODEL_GRBLTRK_SER`. * * \def ROT_MODEL_GRBLTRK_SER * - * The GRBLTRK backend can be used with rotators that support the GRBL - * protocol. + * The `GRBLTRK_SER` model can be used with rotators that support the GRBL + * serial protocol. */ /** - * \brief A macro that returns the model number of the ROT_MODEL_GRBLTRK_NET backend. + * \brief A macro that returns the model number of `ROT_MODEL_GRBLTRK_NET`. * * \def ROT_MODEL_GRBLTRK_NET * - * The GRBLTRK backend can be used with rotators that support the GRBL - * protocol. + * The `GRBLTRK_NET` model can be used with rotators that support the GRBL + * network protocol. */ -//! @cond Doxygen_Suppress -#define ROT_GRBLTRK 24 -#define ROT_BACKEND_GRBLTRK "grbltrk" -//! @endcond #define ROT_MODEL_GRBLTRK_SER ROT_MAKE_MODEL(ROT_GRBLTRK, 1) #define ROT_MODEL_GRBLTRK_NET ROT_MAKE_MODEL(ROT_GRBLTRK, 2) + +/** The `FLIR` family. */ +#define ROT_FLIR 25 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_FLIR "flir" + /** - * \brief A macro that returns the model number of the FLIR backend. + * \brief A macro that returns the model number of `FLIR`. * * \def ROT_MODEL_FLIR * - * The FLIR backend can be used with FLIR and DirectedPercepition + * The `FLIR` model can be used with FLIR and DirectedPercepition * rotators using the PTU protocol (e.g. PTU-D48). Currently only * the serial interface is supported and no ethernet. */ -//! @cond Doxygen_Suppress -#define ROT_FLIR 25 -#define ROT_BACKEND_FLIR "flir" -//! @endcond #define ROT_MODEL_FLIR ROT_MAKE_MODEL(ROT_FLIR, 1) + +/** The `APEX` family. */ +#define ROT_APEX 26 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_APEX "apex" + /** - * \brief A macro that returns the model number of the APEX backend. + * \brief A macro that returns the model number of `APEX`. * * \def ROT_MODEL_APEX_SHARED_LOOP * - * The APEX backend can be used with APEX * rotators. + * The `APEX` model can be used with APEX * rotators. */ -//! @cond Doxygen_Suppress -#define ROT_APEX 26 -#define ROT_BACKEND_APEX "apex" -//! @endcond #define ROT_MODEL_APEX_SHARED_LOOP ROT_MAKE_MODEL(ROT_APEX, 1) + +/** The `SAEBRTRACK` family. */ +#define ROT_SAEBRTRACK 27 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_SAEBRTRACK "SAEBRTrack" + /** - * \brief A macro that returns the model number of the SAEBRTRACK backend. + * \brief A macro that returns the model number of `SAEBRTRACK`. * * \def ROT_MODEL_SAEBRTRACK * - * The SAEBRTRACK backend can be used with SAEBRTRACK * rotators. + * The `SAEBRTRACK` model can be used with SAEBRTRACK * rotators. */ -//! @cond Doxygen_Suppress -#define ROT_SAEBRTRACK 27 -#define ROT_BACKEND_SAEBRTRACK "SAEBRTrack" -//! @endcond #define ROT_MODEL_SAEBRTRACK ROT_MAKE_MODEL(ROT_SAEBRTRACK, 1) + +/** The `SKYWATCHER` family. */ +#define ROT_SKYWATCHER 28 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_SKYWATCHER "SkyWatcher" + /** - * \brief A macro that returns the model number of the SKYWATCHER backend. + * \brief A macro that returns the model number of `SKYWATCHER`. * * \def ROT_MODEL_SKYWATCHER * - * The SKYWATCHER backend can be used with SKYWATCHER * rotators. + * The `SKYWATCHER` model can be used with SKYWATCHER * rotators. */ -//! @cond Doxygen_Suppress -#define ROT_SKYWATCHER 28 -#define ROT_BACKEND_SKYWATCHER "SkyWatcher" -//! @endcond #define ROT_MODEL_SKYWATCHER ROT_MAKE_MODEL(ROT_SKYWATCHER, 1) + /** * \brief Convenience type definition for a rotator model. * commit 4d6a3ed582b89c3968a9892c607f54da41b97604 Author: Nate Bargmann <n0...@n0...> Date: Sat Jul 26 10:08:19 2025 -0500 Fully document amplist.h Create a new topic group of 'amplist' to separate the list of amplifier models from the main Amplifier API group. diff --git a/doc/index.doxygen b/doc/index.doxygen index 73ba6e361..46f7f73ba 100644 --- a/doc/index.doxygen +++ b/doc/index.doxygen @@ -195,6 +195,7 @@ GNU/Linux. * \defgroup rotator Rotator API * \defgroup rot_internal Rotator Internal API * \defgroup amplifier Amplifier API + * \defgroup amplist Amplifier model list * \defgroup amp_internal Amplifier Internal API * \defgroup port Port data structure for accessing devices * \defgroup utilities Utility Routines API diff --git a/include/hamlib/amplist.h b/include/hamlib/amplist.h index 4539b6d2b..a123f8841 100644 --- a/include/hamlib/amplist.h +++ b/include/hamlib/amplist.h @@ -25,17 +25,12 @@ #ifndef _AMPLIST_H #define _AMPLIST_H 1 -//! @cond Doxygen_Suppress -#define AMP_MAKE_MODEL(a,b) ((a)*100+(b)) -#define AMP_BACKEND_NUM(a) ((a)/100) -//! @endcond - - /** - * \addtogroup amplifier + * \addtogroup amplist * @{ */ + /** * \brief Hamlib amplifier model definitions. * @@ -55,6 +50,27 @@ * wishes to use which is passed to the amp_init() API call. */ +/** + * \brief The amp model number is held in a signed integer. + * + * Model numbers are a simple decimal value that increments by a value of + * 100 for each backend, e.g. the `DUMMY` backend has model numbers 1 + * to 100, the `ELECRAFT` backend has model numbers 201 to 300 and so on + * (101 to 200 is currently unassigned). + * + * \note A limitation is that with ::amp_model_t being a signed integer that on + * some systems such a value may be 16 bits. This limits the number of backends + * to 326 of 100 models each (32768 / 100 thus leaving only 68 models for + * backend number 327 so round down to 326). So far this doesn't seem like an + * extreme limitation. + * + * \sa amp_model_t + */ +#define AMP_MAKE_MODEL(a,b) ((a)*100+(b)) + +/** Convenience macro to derive the backend family number from the model number. */ +#define AMP_BACKEND_NUM(a) ((a)/100) + /** * \brief A macro that returns the model number for an unknown model. @@ -67,71 +83,63 @@ #define AMP_MODEL_NONE 0 +/** The `DUMMY` family. Also contains network models. */ +#define AMP_DUMMY 0 +/** Used in amp_reg.c for the `be_name`. */ +#define AMP_BACKEND_DUMMY "dummy" /** - * \brief A macro that returns the model number for the DUMMY backend. - * - * \def AMP_MODEL_DUMMY + * \brief A macro that returns the model number for `DUMMY`. * - * The DUMMY backend, as the name suggests, is a backend which performs no + * The `DUMMY` model, as the name suggests, is a model which performs no * hardware operations and always behaves as one would expect. It can be * thought of as a hardware simulator and is very useful for testing client * applications. */ +#define AMP_MODEL_DUMMY AMP_MAKE_MODEL(AMP_DUMMY, 1) /** - * \brief A macro that returns the model number for the NETAMPCTL backend. + * \brief A macro that returns the model number for `NETAMPCTL`. * - * \def AMP_MODEL_NETAMPCTL - * - * The NETAMPCTL backend allows use of the `ampctld` daemon through the normal - * Hamlib API. + * The `NETAMPCTL` model allows use of the `ampctld` daemon through the normal + * Hamlib C API. */ -//! @cond Doxygen_Suppress -#define AMP_DUMMY 0 -#define AMP_BACKEND_DUMMY "dummy" -//! @endcond -#define AMP_MODEL_DUMMY AMP_MAKE_MODEL(AMP_DUMMY, 1) #define AMP_MODEL_NETAMPCTL AMP_MAKE_MODEL(AMP_DUMMY, 2) +/** The `ELECRAFT` family. */ +#define AMP_ELECRAFT 2 +/** Used in amp_reg.c for the `be_name`. */ +#define AMP_BACKEND_ELECRAFT "elecraft" /** - * \brief A macro that returns the model number of the KPA1500 backend. - * - * \def AMP_MODEL_ELECRAFT_KPA1500 + * \brief A macro that returns the model number of `KPA1500`. * - * The KPA1500 backend can be used with amplifiers that support the Elecraft + * The `KPA1500` model can be used with amplifiers that support the Elecraft * KPA-1500 protocol. */ -//! @cond Doxygen_Suppress -#define AMP_ELECRAFT 2 -#define AMP_BACKEND_ELECRAFT "elecraft" -//! @endcond #define AMP_MODEL_ELECRAFT_KPA1500 AMP_MAKE_MODEL(AMP_ELECRAFT, 1) //#define AMP_MODEL_ELECRAFT_KPA500 AMP_MAKE_MODEL(AMP_ELECRAFT, 2) + +/** The `GEMINI` family. */ +#define AMP_GEMINI 3 +/** Used in amp_reg.c for the `be_name`. */ +#define AMP_BACKEND_GEMINI "gemini" /** - * \brief A macro that returns the model number of the DX1200 backend. - * - * \def AMP_MODEL_GEMINI_DX1200 + * \brief A macro that returns the model number of `DX1200`. * * The Gemini DX1200 covers 160 trhough 4 meters. */ -//! @cond Doxygen_Suppress -#define AMP_GEMINI 3 -#define AMP_BACKEND_GEMINI "gemini" -//! @endcond #define AMP_MODEL_GEMINI_DX1200 AMP_MAKE_MODEL(AMP_GEMINI, 1) + +/** The `EXPERT` family. */ +#define AMP_EXPERT 4 +/** Used in amp_reg.c for the `be_name`. */ +#define AMP_BACKEND_EXPERT "expert" /** - * \brief A macro that returns the model number of the FA backend. - * - * \def AMP_MODEL_EXPERT_FA + * \brief A macro that returns the model number of `FA`. * * The Expert FA series of amplifiers is supported by this backend. */ -//! @cond Doxygen_Suppress -#define AMP_EXPERT 4 -#define AMP_BACKEND_EXPERT "expert" -//! @endcond #define AMP_MODEL_EXPERT_FA AMP_MAKE_MODEL(AMP_EXPERT, 1) commit f67a3cfe4722728335fb11a5939b6233a8cbec44 Author: Nate Bargmann <n0...@n0...> Date: Sat Jul 26 08:53:15 2025 -0500 Update Doxygen comments in riglist.h Create a new topic group of 'riglist' to separate the long list of radio models from the main Rig API group. diff --git a/doc/index.doxygen b/doc/index.doxygen index dfa428b1f..73ba6e361 100644 --- a/doc/index.doxygen +++ b/doc/index.doxygen @@ -190,6 +190,7 @@ GNU/Linux. /*! Define groups for Doxygen * \defgroup rig Rig (transceiver) API + * \defgroup riglist Rig (radio) Model List * \defgroup rig_internal Rig (transceiver) Internal API * \defgroup rotator Rotator API * \defgroup rot_internal Rotator Internal API diff --git a/include/hamlib/riglist.h b/include/hamlib/riglist.h index 1bbc6a1e3..3c59390e4 100644 --- a/include/hamlib/riglist.h +++ b/include/hamlib/riglist.h @@ -19,42 +19,52 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ #ifndef _RIGLIST_H #define _RIGLIST_H 1 -//! @cond Doxygen_Suppress +/** + * \addtogroup riglist + * @{ + */ -// The rig model number is designed to fit in a 32-bit int -// As of 2024-07-14 we have 39 backends defined -- need to be careful about generating new ones -// Perhaps combine them under a MISC entry should work -// As of 2020-02-18 we have 33 backends defined -// With a max of 1000 models per backend we get total a model number range of 1001-33001 -// This MAX was 100 prior to 2020-02-18 and Icom was close to running out of the 100 range -#define MAX_MODELS_PER_BACKEND 1000 -#define RIG_MAKE_MODEL(a,b) (MAX_MODELS_PER_BACKEND*(a)+(b)) -#define RIG_BACKEND_NUM(a) ((a)/MAX_MODELS_PER_BACKEND) +/** + * \brief Hamlib rig (radio) model definitions. + * + * \file riglist.h + * + * This file contains rig (radio) model definitions for the Hamlib rig API. + * Each distinct rig type has a unique model number (ID) and is used by Hamlib + * to identify and distinguish between the different hardware drivers. The + * exact model numbers can be acquired using the macros in this file. To obtain + * a list of supported rig branches, one can use the statically defined + * RIG_BACKEND_LIST macro. To obtain a full list of supported rig (including + * each model in every branch), the foreach_opened_rig() API function can be + * used. + * + * The model number, or ID, is used to tell Hamlib, which rig the client + * wishes to use. It is done with the rig_init() API call. + */ -//! @endcond +/** Number of models per backend family. */ +#define MAX_MODELS_PER_BACKEND 1000 -/*! \file riglist.h - * \brief Hamlib rig(radio) model definitions. +/** + * \brief The rig model number is held in an unsigned 32-bit integer. * - * This file contains rig model definitions for the Hamlib rig API. Each - * distinct rig type has a unique model number (ID) and is used by hamlib to - * identify and distinguish between the different hardware drivers. The - * exact model numbers can be acquired using the macros in this file. To - * obtain a list of supported rig branches, one can use the statically - * defined RIG_BACKEND_LIST macro. To obtain a full list of supported rig - * (including each model in every branch), the foreach_opened_rig() API - * function can be used. + * Model numbers are a simple decimal value that increments by a value of + * 1000 for each backend, e.g. the `DUMMY` backend has model numbers 1 + * to 1000, the `YAESU` backend has model numbers 1001 to 1100 and so on. * - * The model number, or ID, is used to tell hamlib, which rig the client - * whishes to use. It is done with the rig_init() API call. + * \sa rig_model_t */ +#define RIG_MAKE_MODEL(a,b) (MAX_MODELS_PER_BACKEND*(a)+(b)) + +/** Convenience macro to derive the backend family number from the model number. */ +#define RIG_BACKEND_NUM(a) ((a)/MAX_MODELS_PER_BACKEND) /** - * \def RIG_MODEL_NONE * \brief A macro that returns the model number for an unknown model. * * The none backend, as the name suggests, does nothing. It is mainly for @@ -62,23 +72,32 @@ */ #define RIG_MODEL_NONE 0 -/*! \def RIG_MODEL_DUMMY - * \brief A macro that returns the model number for the dummy backend. +/** + * \brief The `DUMMY` family. + * + * It has also been expanded to provide support to "virtual" type of rigs such + * as the network rig control backend and W1HKJ's Flrig application and many + * more, especially SDR (Software Defined Radio) applications. + */ +#define RIG_DUMMY 0 +/** Used in register.c for the `be_name`. */ +#define RIG_BACKEND_DUMMY "dummy" +/** + * \brief A macro that returns the model number for `DUMMY`. * - * The dummy backend, as the name suggests, is a backend which performs no + * The `DUMMY model, as the name suggests, is a model which performs no * hardware operations and always behaves as one would expect. It can be * thought of as a hardware simulator and is very useful for testing client * applications. - * - * It has also been expanded to provide support to "virtual" type of rigs - * such as the network rig control backend and W1HKJ's Flrig application. */ -//! @cond Doxygen_Suppress -#define RIG_DUMMY 0 -#define RIG_BACKEND_DUMMY "dummy" -//! @endcond #define RIG_MODEL_DUMMY RIG_MAKE_MODEL(RIG_DUMMY, 1) -//! @cond Doxygen_Suppress + +/** + * \name NETWORK + * Network models. + */ +///@{ +/// Model of the `RIG_DUMMY` backend family. #define RIG_MODEL_NETRIGCTL RIG_MAKE_MODEL(RIG_DUMMY, 2) #define RIG_MODEL_ARMSTRONG RIG_MAKE_MODEL(RIG_DUMMY, 3) #define RIG_MODEL_FLRIG RIG_MAKE_MODEL(RIG_DUMMY, 4) @@ -89,12 +108,22 @@ #define RIG_MODEL_SDRSHARP RIG_MAKE_MODEL(RIG_DUMMY, 9) #define RIG_MODEL_QUISK RIG_MAKE_MODEL(RIG_DUMMY, 10) #define RIG_MODEL_GQRX RIG_MAKE_MODEL(RIG_DUMMY, 11) +///@} /* * Yaesu */ +/** The `YAESU` family. */ #define RIG_YAESU 1 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_YAESU "yaesu" + +/** + * \name YAESU + * Yaesu models. + */ +///@{ +/// Model of the `RIG_YAESU` backend family. #define RIG_MODEL_FT847 RIG_MAKE_MODEL(RIG_YAESU, 1) #define RIG_MODEL_FT1000 RIG_MAKE_MODEL(RIG_YAESU, 2) #define RIG_MODEL_FT1000D RIG_MAKE_MODEL(RIG_YAESU, 3) @@ -146,12 +175,22 @@ #define RIG_MODEL_FT710 RIG_MAKE_MODEL(RIG_YAESU, 49) #define RIG_MODEL_FT9000OLD RIG_MAKE_MODEL(RIG_YAESU, 50) #define RIG_MODEL_FTX1 RIG_MAKE_MODEL(RIG_YAESU, 51) +///@} /* * Kenwood */ +/** The `KENWOOD` family. */ #define RIG_KENWOOD 2 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_KENWOOD "kenwood" + +/** + * \name KENWOOD + * Kenwood models. + */ +///@{ +/// Model of the `RIG_KENWOOD` backend family. #define RIG_MODEL_TS50 RIG_MAKE_MODEL(RIG_KENWOOD, 1) #define RIG_MODEL_TS440 RIG_MAKE_MODEL(RIG_KENWOOD, 2) #define RIG_MODEL_TS450S RIG_MAKE_MODEL(RIG_KENWOOD, 3) @@ -209,12 +248,22 @@ #define RIG_MODEL_TRUSDX RIG_MAKE_MODEL(RIG_KENWOOD, 55) #define RIG_MODEL_SDRCONSOLE RIG_MAKE_MODEL(RIG_KENWOOD, 56) #define RIG_MODEL_QRPLABS_QMX RIG_MAKE_MODEL(RIG_KENWOOD,57) +///@} /* * Icom */ +/** The `ICOM` family. */ #define RIG_ICOM 3 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_ICOM "icom" + +/** + * \name ICOM + * Icom models. + */ +///@{ +/// Model of the `RIG_ICOM` backend family. #define RIG_MODEL_IC1271 RIG_MAKE_MODEL(RIG_ICOM, 1) #define RIG_MODEL_IC1275 RIG_MAKE_MODEL(RIG_ICOM, 2) #define RIG_MODEL_IC271 RIG_MAKE_MODEL(RIG_ICOM, 3) @@ -315,22 +364,42 @@ #define RIG_MODEL_OMNIVIP RIG_MAKE_MODEL(RIG_ICOM, 51) /* OMNI-VI+ */ #define RIG_MODEL_PARAGON2 RIG_MAKE_MODEL(RIG_ICOM, 59) #define RIG_MODEL_DELTAII RIG_MAKE_MODEL(RIG_ICOM, 64) +///@} /* * Icom PCR */ +/** The `PCR` family. */ #define RIG_PCR 4 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_PCR "pcr" + +/** + * \name PCR + * PCR models. + */ +///@{ +/// Model of the `RIG_PCR` backend family. #define RIG_MODEL_PCR1000 RIG_MAKE_MODEL(RIG_PCR, 1) #define RIG_MODEL_PCR100 RIG_MAKE_MODEL(RIG_PCR, 2) #define RIG_MODEL_PCR1500 RIG_MAKE_MODEL(RIG_PCR, 3) #define RIG_MODEL_PCR2500 RIG_MAKE_MODEL(RIG_PCR, 4) +///@} /* * AOR */ +/** The `AOR` family. */ #define RIG_AOR 5 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_AOR "aor" + +/** + * \name AOR + * AOR models. + */ +///@{ +/// Model of the `RIG_AOR` backend family. #define RIG_MODEL_AR8200 RIG_MAKE_MODEL(RIG_AOR, 1) #define RIG_MODEL_AR8000 RIG_MAKE_MODEL(RIG_AOR, 2) #define RIG_MODEL_AR7030 RIG_MAKE_MODEL(RIG_AOR, 3) @@ -347,12 +416,22 @@ #define RIG_MODEL_AR5000A RIG_MAKE_MODEL(RIG_AOR, 14) #define RIG_MODEL_AR7030P RIG_MAKE_MODEL(RIG_AOR, 15) #define RIG_MODEL_SR2200 RIG_MAKE_MODEL(RIG_AOR, 16) +///@} /* * JRC */ +/** The `JRC` family. */ #define RIG_JRC 6 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_JRC "jrc" + +/** + * \name JRC + * JRC models. + */ +///@{ +/// Model of the `RIG_JRC` backend family. #define RIG_MODEL_JST145 RIG_MAKE_MODEL(RIG_JRC, 1) #define RIG_MODEL_JST245 RIG_MAKE_MODEL(RIG_JRC, 2) #define RIG_MODEL_CMH530 RIG_MAKE_MODEL(RIG_JRC, 3) @@ -360,25 +439,45 @@ #define RIG_MODEL_NRD525 RIG_MAKE_MODEL(RIG_JRC, 5) #define RIG_MODEL_NRD535 RIG_MAKE_MODEL(RIG_JRC, 6) #define RIG_MODEL_NRD545 RIG_MAKE_MODEL(RIG_JRC, 7) +///@} /* * Radio Shack * Actually, they might be either Icom or Uniden. TBC --SF */ +/** The `RADIOSHACK` family. */ #define RIG_RADIOSHACK 7 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_RADIOSHACK "radioshack" + +/** + * \name RADIOSHACK + * RadioShack models. + */ +///@{ +/// Model of the `RIG_RADIOSHACK` backend family. #define RIG_MODEL_RS64 RIG_MAKE_MODEL(RIG_RADIOSHACK, 1) /* PRO-64 */ #define RIG_MODEL_RS2005 RIG_MAKE_MODEL(RIG_RADIOSHACK, 2) /* w/ OptoElectronics OS456 Board */ #define RIG_MODEL_RS2006 RIG_MAKE_MODEL(RIG_RADIOSHACK, 3) /* w/ OptoElectronics OS456 Board */ #define RIG_MODEL_RS2035 RIG_MAKE_MODEL(RIG_RADIOSHACK, 4) /* w/ OptoElectronics OS435 Board */ #define RIG_MODEL_RS2042 RIG_MAKE_MODEL(RIG_RADIOSHACK, 5) /* w/ OptoElectronics OS435 Board */ #define RIG_MODEL_RS2041 RIG_MAKE_MODEL(RIG_RADIOSHACK, 6) /* PRO-2041 */ +///@} /* * Uniden */ +/** The `UNIDEN` family. */ #define RIG_UNIDEN 8 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_UNIDEN "uniden" + +/** + * \name UNIDEN + * Uniden models. + */ +///@{ +/// Model of the `RIG_UNIDEN` backend family. #define RIG_MODEL_BC780 RIG_MAKE_MODEL(RIG_UNIDEN, 1) /* Uniden BC780 - Trunk Tracker "Desktop Radio" */ #define RIG_MODEL_BC245 RIG_MAKE_MODEL(RIG_UNIDEN, 2) #define RIG_MODEL_BC895 RIG_MAKE_MODEL(RIG_UNIDEN, 3) @@ -391,73 +490,143 @@ #define RIG_MODEL_BCD396T RIG_MAKE_MODEL(RIG_UNIDEN, 10) #define RIG_MODEL_BCD996T RIG_MAKE_MODEL(RIG_UNIDEN, 11) #define RIG_MODEL_BC898 RIG_MAKE_MODEL(RIG_UNIDEN, 12) +///@} /* * Drake */ +/** The `DRAKE` family. */ #define RIG_DRAKE 9 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_DRAKE "drake" + +/** + * \name DRAKE + * Drake models. + */ +///@{ +/// Model of the `RIG_DRAKE` backend family. #define RIG_MODEL_DKR8 RIG_MAKE_MODEL(RIG_DRAKE, 1) #define RIG_MODEL_DKR8A RIG_MAKE_MODEL(RIG_DRAKE, 2) #define RIG_MODEL_DKR8B RIG_MAKE_MODEL(RIG_DRAKE, 3) +///@} /* * Lowe */ +/** The `LOWE` family. */ #define RIG_LOWE 10 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_LOWE "lowe" + +/** + * \name LOWE + * Lowe models. + */ +///@{ +/// Model of the `RIG_LOWE` backend family. #define RIG_MODEL_HF150 RIG_MAKE_MODEL(RIG_LOWE, 1) #define RIG_MODEL_HF225 RIG_MAKE_MODEL(RIG_LOWE, 2) #define RIG_MODEL_HF250 RIG_MAKE_MODEL(RIG_LOWE, 3) #define RIG_MODEL_HF235 RIG_MAKE_MODEL(RIG_LOWE, 4) +///@} /* * Racal */ +/** The `RACAL` family. */ #define RIG_RACAL 11 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_RACAL "racal" + +/** + * \name RACAL + * Racal models. + */ +///@{ +/// Model of the `RIG_RACAL` backend family. #define RIG_MODEL_RA3790 RIG_MAKE_MODEL(RIG_RACAL, 1) #define RIG_MODEL_RA3720 RIG_MAKE_MODEL(RIG_RACAL, 2) #define RIG_MODEL_RA6790 RIG_MAKE_MODEL(RIG_RACAL, 3) #define RIG_MODEL_RA3710 RIG_MAKE_MODEL(RIG_RACAL, 4) #define RIG_MODEL_RA3702 RIG_MAKE_MODEL(RIG_RACAL, 5) +///@} /* * Watkins-Johnson */ +/** The `WJ` family. */ #define RIG_WJ 12 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_WJ "wj" + +/** + * \name WJ + * Watkins-Johnson models. + */ +///@{ +/// Model of the `RIG_WJ` backend family. #define RIG_MODEL_HF1000 RIG_MAKE_MODEL(RIG_WJ, 1) #define RIG_MODEL_HF1000A RIG_MAKE_MODEL(RIG_WJ, 2) #define RIG_MODEL_WJ8711 RIG_MAKE_MODEL(RIG_WJ, 3) #define RIG_MODEL_WJ8888 RIG_MAKE_MODEL(RIG_WJ, 4) +///@} /* * Rohde & Schwarz--ek */ +/** The `EK` family. */ #define RIG_EK 13 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_EK "ek" + +/** + * \name EK + * Rohde & Schwarz EK models. + */ +///@{ +/// Model of the `RIG_EK` backend family. #define RIG_MODEL_ESM500 RIG_MAKE_MODEL(RIG_EK, 1) #define RIG_MODEL_EK890 RIG_MAKE_MODEL(RIG_EK, 2) #define RIG_MODEL_EK891 RIG_MAKE_MODEL(RIG_EK, 3) #define RIG_MODEL_EK895 RIG_MAKE_MODEL(RIG_EK, 4) #define RIG_MODEL_EK070 RIG_MAKE_MODEL(RIG_EK, 5) +///@} /* * Skanti */ +/** The `SKANTI` family. */ #define RIG_SKANTI 14 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_SKANTI "skanti" + +/** + * \name SKANTI + * Skanti models. + */ +///@{ +/// Model of the `RIG_SKANTI` backend family. #define RIG_MODEL_TRP7000 RIG_MAKE_MODEL(RIG_SKANTI, 1) #define RIG_MODEL_TRP8000 RIG_MAKE_MODEL(RIG_SKANTI, 2) #define RIG_MODEL_TRP9000 RIG_MAKE_MODEL(RIG_SKANTI, 3) #define RIG_MODEL_TRP8255 RIG_MAKE_MODEL(RIG_SKANTI, 4) +///@} /* * WiNRADiO/LinRADiO */ +/** The `WINRADIO` family. */ #define RIG_WINRADIO 15 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_WINRADIO "winradio" + +/** + * \name WINRADIO + * WiNRADiO/LinRADiO models. + */ +///@{ +/// Model of the `RIG_WINRADIO` backend family. #define RIG_MODEL_WR1000 RIG_MAKE_MODEL(RIG_WINRADIO, 1) #define RIG_MODEL_WR1500 RIG_MAKE_MODEL(RIG_WINRADIO, 2) #define RIG_MODEL_WR1550 RIG_MAKE_MODEL(RIG_WINRADIO, 3) @@ -469,12 +638,22 @@ #define RIG_MODEL_G313 RIG_MAKE_MODEL(RIG_WINRADIO, 9) #define RIG_MODEL_G305 RIG_MAKE_MODEL(RIG_WINRADIO, 10) #define RIG_MODEL_G315 RIG_MAKE_MODEL(RIG_WINRADIO, 11) +///@} /* * Ten Tec */ +/** The `TENTEC` family. */ #define RIG_TENTEC 16 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_TENTEC "tentec" + +/** + * \name TENTEC + * Ten Tec models. + */ +///@{ +/// Model of the `RIG_TENTEC` backend family. #define RIG_MODEL_TT550 RIG_MAKE_MODEL(RIG_TENTEC, 1) /* Pegasus */ #define RIG_MODEL_TT538 RIG_MAKE_MODEL(RIG_TENTEC, 2) /* Jupiter */ #define RIG_MODEL_RX320 RIG_MAKE_MODEL(RIG_TENTEC, 3) @@ -487,54 +666,114 @@ #define RIG_MODEL_TT588 RIG_MAKE_MODEL(RIG_TENTEC, 11) /* Omni-VII */ #define RIG_MODEL_RX331 RIG_MAKE_MODEL(RIG_TENTEC, 12) #define RIG_MODEL_TT599 RIG_MAKE_MODEL(RIG_TENTEC, 13) /* Eagle */ +///@} /* * Alinco */ +/** The `ALINCO` family. */ #define RIG_ALINCO 17 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_ALINCO "alinco" + +/** + * \name ALINCO + * Alinco models. + */ +///@{ +/// Model of the `RIG_ALINCO` backend family. #define RIG_MODEL_DX77 RIG_MAKE_MODEL(RIG_ALINCO, 1) #define RIG_MODEL_DXSR8 RIG_MAKE_MODEL(RIG_ALINCO, 2) +///@} /* * Kachina */ +/** The `KACHINA` family. */ #define RIG_KACHINA 18 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_KACHINA "kachina" + +/** + * \name KACHINA + * Kachina model. + */ +///@{ +/// Model of the `RIG_KACHINA` backend family. #define RIG_MODEL_505DSP RIG_MAKE_MODEL(RIG_KACHINA, 1) +///@} /* * Gnuradio backend */ +/** The `GNURADIO` family. */ #define RIG_GNURADIO 20 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_GNURADIO "gnuradio" + +/** + * \name GNURADIO + * GNU Radio models. + */ +///@{ +/// Model of the `RIG_GNURADIO` backend family. #define RIG_MODEL_GNURADIO RIG_MAKE_MODEL(RIG_GNURADIO, 1) /* dev model, Chirp source */ #define RIG_MODEL_MC4020 RIG_MAKE_MODEL(RIG_GNURADIO, 2) /* MC4020 */ #define RIG_MODEL_GRAUDIO RIG_MAKE_MODEL(RIG_GNURADIO, 3) /* Sound card source */ #define RIG_MODEL_GRAUDIOIQ RIG_MAKE_MODEL(RIG_GNURADIO, 4) /* I&Q stereo sound card source */ #define RIG_MODEL_USRP_G RIG_MAKE_MODEL(RIG_GNURADIO, 5) /* Universal Software Radio Peripheral */ +///@} /* * Microtune tuners */ +/** The `MICROTUNE` family. */ #define RIG_MICROTUNE 21 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_MICROTUNE "microtune" + +/** + * \name MICROTUNE + * Microtune models. + */ +///@{ +/// Model of the `RIG_MICROTUNE` backend family. #define RIG_MODEL_MICROTUNE_4937 RIG_MAKE_MODEL(RIG_MICROTUNE, 1) /* eval board */ #define RIG_MODEL_MICROTUNE_4702 RIG_MAKE_MODEL(RIG_MICROTUNE, 2) /* Alan's */ #define RIG_MODEL_MICROTUNE_4707 RIG_MAKE_MODEL(RIG_MICROTUNE, 3) +///@} /* * TAPR */ +/** The `TAPR` family. */ #define RIG_TAPR 22 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_TAPR "tapr" + +/** + * \name TAPR + * TAPR model. + */ +///@{ +/// Model of the `RIG_TAPR` backend family. #define RIG_MODEL_DSP10 RIG_MAKE_MODEL(RIG_TAPR, 1) +///@} /* * Flex-radio */ +/** The `FLEXRADIO` family. */ #define RIG_FLEXRADIO 23 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_FLEXRADIO "flexradio" + +/** + * \name FLEXRADIO + * FlexRadio models. + */ +///@{ +/// Model of the `RIG_FLEXRADIO` backend family. #define RIG_MODEL_SDR1000 RIG_MAKE_MODEL(RIG_FLEXRADIO, 1) #define RIG_MODEL_SDR1000RFE RIG_MAKE_MODEL(RIG_FLEXRADIO, 2) #define RIG_MODEL_DTTSP RIG_MAKE_MODEL(RIG_FLEXRADIO, 3) @@ -547,19 +786,39 @@ #define RIG_MODEL_SMARTSDR_F RIG_MAKE_MODEL(RIG_FLEXRADIO, 10) #define RIG_MODEL_SMARTSDR_G RIG_MAKE_MODEL(RIG_FLEXRADIO, 11) #define RIG_MODEL_SMARTSDR_H RIG_MAKE_MODEL(RIG_FLEXRADIO, 12) +///@} /* * VEB Funkwerk Köpenick RFT */ +/** The `RFT` family. */ #define RIG_RFT 24 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_RFT "rft" + +/** + * \name RFT + * VEB Funkwerk Köpenick RFT model. + */ +///@{ +/// Model of the `RIG_RFT` backend family. #define RIG_MODEL_EKD500 RIG_MAKE_MODEL(RIG_RFT, 1) +///@} /* * Various kits */ +/** The `KIT` family. */ #define RIG_KIT 25 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_KIT "kit" + +/** + * \name KIT + * Various kit models. + */ +///@{ +/// Model of the `RIG_KIT` backend family. #define RIG_MODEL_ELEKTOR304 RIG_MAKE_MODEL(RIG_KIT, 1) #define RIG_MODEL_DRT1 RIG_MAKE_MODEL(RIG_KIT, 2) #define RIG_MODEL_DWT RIG_MAKE_MODEL(RIG_KIT, 3) @@ -579,100 +838,213 @@ #define RIG_MODEL_SI570PEABERRY2 RIG_MAKE_MODEL(RIG_KIT, 17) /* Peaberry V2 */ #define RIG_MODEL_FUNCUBEDONGLEPLUS RIG_MAKE_MODEL(RIG_KIT, 18) /* FunCUBE Dongle Pro+ */ #define RIG_MODEL_RSHFIQ RIG_MAKE_MODEL(RIG_KIT, 19) /* RS-HFIQ */ +///@} /* * SW/FM/TV tuner cards supported by Video4Linux,*BSD, .. */ +/** The `TUNER` family. */ #define RIG_TUNER 26 +/** Used in register.c for the `be_name`. */ #define RIG... [truncated message content] |
From: n0nb <n0...@us...> - 2025-07-24 03:28:12
|
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 04c00330a6265680c2a78dbf88e9274eae1f02da (commit) via 82feea990e584d1648dd5567a6e3f0e2a693f6a3 (commit) via 98cc0b688e4f8cd0838d728d97a43e7a13d6c29c (commit) via 1eb645004a45bf84e1fb71dcad294081a551f83d (commit) via 605e961dbf46498284799cda6a991f47d810e66f (commit) via 30494a4a1f03db4b9cdab6e901e6461d160d22e7 (commit) via 947b2da28f1b9ca0e64a59acabdc49da2eb1d9fe (commit) via c49cd2312cbdd0f859642160fb3874eab9db107d (commit) via 133817bf146eca08ce8267793f31b14c47f90b08 (commit) via 9ede33de4f690fd70c830aae1465d8bc9070839f (commit) via 6cfaf03edd7c514c39b2620ae97763313169f14a (commit) from 79f8b1cde83cf35b1cd30e67ab8f26fd1137b650 (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 04c00330a6265680c2a78dbf88e9274eae1f02da Author: Nate Bargmann <n0...@n0...> Date: Wed Jul 23 14:41:50 2025 -0500 Clean upp Doxygen comments in rotator.h When a comment block immediately preceeds the item, repeating the item type such as \def or \typedef is not required. They're only required when the comment is not immediately preceeding or Doxygen doesn't get the item correct. diff --git a/include/hamlib/rotator.h b/include/hamlib/rotator.h index ab79f5260..629e79022 100644 --- a/include/hamlib/rotator.h +++ b/include/hamlib/rotator.h @@ -32,9 +32,10 @@ */ /** - * \file rotator.h * \brief Hamlib rotator data structures. * + * \file rotator.h + * * This file contains the data structures and declarations for the Hamlib * rotator Application Programming Interface (API). * @@ -52,7 +53,6 @@ struct rot_state; /** - * \typedef typedef struct s_rot ROT * \brief Main rotator handle type definition. * * The #ROT handle is returned by rot_init() and is passed as a parameter to @@ -64,7 +64,6 @@ typedef struct s_rot ROT; /** - * \typedef typedef float elevation_t * \brief Type definition for elevation. * * The \a elevation_t type is used as parameter for the rot_set_position() and @@ -76,7 +75,6 @@ typedef float elevation_t; /** - * \typedef typedef float azimuth_t * \brief Type definition for azimuth. * * The \a azimuth_t type is used as parameter for the rot_set_position() and @@ -94,7 +92,6 @@ typedef float azimuth_t; /** - * \def ROT_RESET_ALL * \brief A macro that returns the flag for the \b reset operation. * * \sa rot_reset(), rot_reset_t @@ -103,7 +100,6 @@ typedef float azimuth_t; /** - * \typedef typedef int rot_reset_t * \brief Type definition for rotator reset. * * The \a rot_reset_t type is used as parameter for the rot_reset() API @@ -121,7 +117,7 @@ typedef enum { } rot_type_t; //! @cond Doxygen_Suppress -/* So far only used in ests/dumpcaps_rot.c. */ +/* So far only used in tests/dumpcaps_rot.c. */ #define ROT_TYPE_MASK (ROT_FLAG_AZIMUTH|ROT_FLAG_ELEVATION) //! @endcond @@ -142,7 +138,6 @@ typedef enum { /** - * \def ROT_MOVE_UP * \brief A macro that returns the flag for the \b UP direction. * * This macro defines the value of the \b UP direction which can be @@ -154,7 +149,6 @@ typedef enum { #define ROT_MOVE_UP (1<<1) /** - * \def ROT_MOVE_DOWN * \brief A macro that returns the flag for the \b DOWN direction. * * This macro defines the value of the \b DOWN direction which can be @@ -166,7 +160,6 @@ typedef enum { #define ROT_MOVE_DOWN (1<<2) /** - * \def ROT_MOVE_LEFT * \brief A macro that returns the flag for the \b LEFT direction. * * This macro defines the value of the \b LEFT direction which can be @@ -178,7 +171,6 @@ typedef enum { #define ROT_MOVE_LEFT (1<<3) /** - * \def ROT_MOVE_CCW * \brief A macro that returns the flag for the \b counterclockwise direction. * * This macro defines the value of the \b counterclockwise direction which @@ -191,7 +183,6 @@ typedef enum { #define ROT_MOVE_CCW ROT_MOVE_LEFT /** - * \def ROT_MOVE_RIGHT * \brief A macro that returns the flag for the \b RIGHT direction. * * This macro defines the value of the \b RIGHT direction which can be used @@ -203,7 +194,6 @@ typedef enum { #define ROT_MOVE_RIGHT (1<<4) /** - * \def ROT_MOVE_CW * \brief A macro that returns the flag for the \b clockwise direction. * * This macro defines the value of the \b clockwise direction which can be @@ -216,7 +206,6 @@ typedef enum { #define ROT_MOVE_CW ROT_MOVE_RIGHT /** - * \def ROT_MOVE_UP_LEFT * \brief A macro that returns the flag for the \b clockwise direction. * * This macro defines the value of the \b clockwise direction which can be @@ -231,7 +220,6 @@ typedef enum { #define ROT_MOVE_UP_LEFT (1<<5) /** - * \def ROT_MOVE_UP_CCW * \brief A macro that returns the flag for the \b clockwise direction. * * This macro defines the value of the \b clockwise direction which can be @@ -246,7 +234,6 @@ typedef enum { #define ROT_MOVE_UP_CCW ROT_MOVE_UP_LEFT /** - * \def ROT_MOVE_UP_RIGHT * \brief A macro that returns the flag for the \b clockwise direction. * * This macro defines the value of the \b clockwise direction which can be @@ -261,7 +248,6 @@ typedef enum { #define ROT_MOVE_UP_RIGHT (1<<6) /** - * \def ROT_MOVE_UP_CW * \brief A macro that returns the flag for the \b clockwise direction. * * This macro defines the value of the \b clockwise direction which can be @@ -276,7 +262,6 @@ typedef enum { #define ROT_MOVE_UP_CW ROT_MOVE_UP_RIGHT /** - * \def ROT_MOVE_DOWN_LEFT * \brief A macro that returns the flag for the \b clockwise direction. * * This macro defines the value of the \b clockwise direction which can be @@ -292,7 +277,6 @@ typedef enum { /** - * \def ROT_MOVE_DOWN_CCW * \brief A macro that returns the flag for the \b clockwise direction. * * This macro defines the value of the \b clockwise direction which can be @@ -307,7 +291,6 @@ typedef enum { #define ROT_MOVE_DOWN_CCW ROT_MOVE_DOWN_LEFT /** - * \def ROT_MOVE_DOWN_RIGHT * \brief A macro that returns the flag for the \b clockwise direction. * * This macro defines the value of the \b clockwise direction which can be @@ -322,7 +305,6 @@ typedef enum { #define ROT_MOVE_DOWN_RIGHT (1 << 8) /** - * \def ROT_MOVE_DOWN_CW * \brief A macro that returns the flag for the \b clockwise direction. * * This macro defines the value of the \b clockwise direction which can be @@ -453,7 +435,6 @@ enum rot_parm_e { */ /** - * \struct rot_caps * \brief Rotator capability data structure. * * The main idea of this structure is that it will be defined by the backend @@ -581,7 +562,7 @@ struct rot_caps { //! @endcond //---Start cut here--- -// Rotatot state definition moved to include/hamlib/rot_state.h +// Rotator state definition moved to include/hamlib/rot_state.h // Temporary include until 5.0 #ifndef NO_OLD_INCLUDES @@ -594,7 +575,6 @@ __BEGIN_DECLS #endif //---End cut here--- /** - * \struct s_rot * \brief Master rotator structure. * * This is the master data structure acting as the #ROT handle for the @@ -884,7 +864,6 @@ extern HAMLIB_EXPORT(void *) rot_data_pointer(ROT *rot, rig_ptrx_t idx); //! @endcond /** - * \def rot_debug * \brief Convenience macro for generating debugging messages. * * This is an alias of the rig_debug() function call and is used in the same commit 82feea990e584d1648dd5567a6e3f0e2a693f6a3 Author: Nate Bargmann <n0...@n0...> Date: Wed Jul 23 14:34:14 2025 -0500 Add Doxygen config statements for newer versions Newer versions of Doxygen (1.14 in Arch Linux) default HAVE_DOT and CALL_GRAPH to NO, although older versions also default the latter to NO as well. Document why DISTRIBUTE_GROUP_DOC was added. Removes a bit of redundancy. diff --git a/doc/hamlib.cfg.in b/doc/hamlib.cfg.in index 3105243de..67817ca4b 100644 --- a/doc/hamlib.cfg.in +++ b/doc/hamlib.cfg.in @@ -61,7 +61,11 @@ ENABLED_SECTIONS = "" PREDEFINED = DOXYGEN "DOC_HIDDEN" JAVADOC_AUTOBRIEF = NO OPTIMIZE_OUTPUT_FOR_C = YES +# Allow anonymous group for related macro definitions DISTRIBUTE_GROUP_DOC = YES +# Later versions default to NO +HAVE_DOT = YES +CALL_GRAPH = YES MAN_LINKS = NO MACRO_EXPANSION = YES commit 98cc0b688e4f8cd0838d728d97a43e7a13d6c29c Author: Nate Bargmann <n0...@n0...> Date: Tue Jul 22 21:01:23 2025 -0500 Update Doxygen comments for rot_state.h diff --git a/doc/Makefile.am b/doc/Makefile.am index 2047f1751..26e791e5a 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -6,11 +6,12 @@ dist_man_MANS = man1/ampctl.1 man1/ampctld.1 \ man7/hamlib.7 man7/hamlib-primer.7 man7/hamlib-utilities.7 SRCDOCLST = \ + ../include/hamlib/amp_state.h \ ../include/hamlib/amplifier.h \ ../include/hamlib/amplist.h \ - ../include/hamlib/amp_state.h \ ../include/hamlib/port.h \ ../include/hamlib/rig.h \ + ../include/hamlib/rot_state.h \ ../include/hamlib/rotator.h \ ../include/hamlib/rotlist.h \ ../src/amp_conf.c \ diff --git a/include/hamlib/rot_state.h b/include/hamlib/rot_state.h index 04d3a37db..84fd60b84 100644 --- a/include/hamlib/rot_state.h +++ b/include/hamlib/rot_state.h @@ -25,10 +25,26 @@ #define _ROT_STATE_H 1 __BEGIN_DECLS + +/** + * \addtogroup rotator + * @{ + */ + + +/** + * \brief Hamlib rotator data structures. + * + * \file rot_state.h + * + * This file contains the live data state structure of the rotator. + */ + /** - * \struct rot_state * \brief Rotator state structure * + * \struct rot_state + * * This structure contains live data, as well as a copy of capability fields * that may be updated, i.e. customized while the #ROT handle is instantiated. * @@ -72,8 +88,8 @@ struct rot_state { int current_speed; /*!< Current speed 1-100, to be used when no change to speed is requested. */ hamlib_port_t rotport; /*!< Rotator port (internal use). */ hamlib_port_t rotport2; /*!< 2nd Rotator port (internal use). */ - rig_ptr_t *pstrotator_handler_priv_data; - deferred_config_header_t config_queue; + rig_ptr_t *pstrotator_handler_priv_data; /*!< PstRotator private data. */ + deferred_config_header_t config_queue; /*!< Que for deferred processing. */ }; __END_DECLS @@ -81,6 +97,9 @@ __END_DECLS #if defined(IN_HAMLIB) #define ROTSTATE(r) (&(r)->state) #endif +/** Macro for application access to rot_state data structure. */ #define HAMLIB_ROTSTATE(r) ((struct rot_state *)rot_data_pointer(r, RIG_PTRX_ROTSTATE)) #endif /* _ROT_STATE_H */ + +/** @} */ commit 1eb645004a45bf84e1fb71dcad294081a551f83d Author: Nate Bargmann <n0...@n0...> Date: Tue Jul 22 18:17:19 2025 -0500 Ignore additional files from Doxygen processing diff --git a/doc/hamlib.cfg.in b/doc/hamlib.cfg.in index 23c8f3986..3105243de 100644 --- a/doc/hamlib.cfg.in +++ b/doc/hamlib.cfg.in @@ -32,7 +32,10 @@ INPUT = @top_srcdir@/doc/index.doxygen \ EXCLUDE = @top_srcdir@/include/hamlib/ampclass.h \ @top_srcdir@/include/hamlib/multicast.h \ + @top_srcdir@/include/hamlib/rigclass.h \ + @top_srcdir@/include/hamlib/rig_dll.h \ @top_srcdir@/include/hamlib/rotclass.h \ + @top_srcdir@/include/hamlib/winpthreads.h \ @top_srcdir@/src/amp_conf.h \ @top_srcdir@/src/multicast.c commit 605e961dbf46498284799cda6a991f47d810e66f Author: Nate Bargmann <n0...@n0...> Date: Tue Jul 22 17:54:20 2025 -0500 Update Doxygen comments for rotlist.h diff --git a/include/hamlib/rotlist.h b/include/hamlib/rotlist.h index e62b4b89b..567aa59e6 100644 --- a/include/hamlib/rotlist.h +++ b/include/hamlib/rotlist.h @@ -19,6 +19,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ #ifndef _ROTLIST_H #define _ROTLIST_H 1 @@ -35,9 +36,10 @@ */ /** - * \file rotlist.h * \brief Hamlib rotator model definitions. * + * \file rotlist.h + * * This file contains rotator model definitions for the Hamlib rotator * Application Programming Interface (API). Each distinct rotator type has a * unique model number (ID) and is used by Hamlib to identify and distinguish @@ -49,13 +51,14 @@ * function can be used. * * The model number, or ID, is used to tell Hamlib which rotator the client - * wishes to use which is done with the rot_init() API call. + * wishes to use which is passed to the rot_init() API call. */ /** - * \def ROT_MODEL_NONE * \brief A macro that returns the model number for an unknown model. * + * \def ROT_MODEL_NONE + * * The none backend, as the name suggests, does nothing. It is mainly for * internal use. */ @@ -80,6 +83,22 @@ * The NETROTCTL backend allows use of the `rotctld` daemon through the normal * Hamlib API. */ +/** + * \brief A macro that returns the model number for the PSTROTATOR backend. + * + * \def ROT_MODEL_PSTROTATOR + * + * The PSTROTATOR backend allows Hamlib clients to access the rotators controlled + * by the PstRotator software by YO3DMU: https://www.qsl.net/yo3dmu/index_Page346.htm + */ +/** + * \brief A macro that returns the model number for the SATROTCTL backend. + * + * \def ROT_MODEL_SATROTCTL + * + * The SATROTCTL allows Hamlib clients to access the rotators controlled by + * the S.A.T hardware by CSN Tecnologies: http://csntechnologies.net/ + */ //! @cond Doxygen_Suppress #define ROT_DUMMY 0 #define ROT_BACKEND_DUMMY "dummy" @@ -316,7 +335,14 @@ * The GS232B_EL backend can be used with elevation rotators that support the * GS-232B protocol. */ - +/** + * \brief A macro that returns the model number of the GS23_AZ azimuth backend. + * + * \def ROT_MODEL_GS23_AZ + * + * The GS23_AZ backend can be used with azimuth rotators that support a + * generic version of the GS-232A protocol. + */ //! @cond Doxygen_Suppress #define ROT_GS232A 6 #define ROT_BACKEND_GS232A "gs232a" @@ -336,9 +362,13 @@ #define ROT_MODEL_GS23_AZ ROT_MAKE_MODEL(ROT_GS232A, 13) #define ROT_MODEL_AF6SA_WRC ROT_MAKE_MODEL(ROT_GS232A, 14) +// Add documentation when this model is implemented. +//! @cond Doxygen_Suppress #define ROT_ARRAYSOLUTIONS 7 #define ROT_BACKEND ARRAYSOLUTIONS "arraysolutions" #define ROT_MODEL_ARRAYSOLUTIONS_SAL_12_20_30 ROT_MAKE_MODEL(ROT_ARRAYSOLUTIONS, 1) +//! @endcond + /** * \brief A macro that returns the model number of the PCROTOR backend. * @@ -561,6 +591,15 @@ * The PROSISTEL_AZEL_COMBI_TRACK_AZEL backend can be used with rotators that * support the Prosistel combination azimuth and elevation protocol. */ +/** + * \brief A macro that returns the model number of the PROSISTEL_D_EL_CBOXAZ + * backend. + * + * \def ROT_MODEL_PROSISTEL_D_EL_CBOXAZ + * + * The PROSISTEL_D_EL_CBOXAZ backend can be used with the elevation rotator + * with Control Box D using azimuth logic. + */ //! @cond Doxygen_Suppress #define ROT_PROSISTEL 17 #define ROT_BACKEND_PROSISTEL "prosistel" @@ -642,9 +681,20 @@ //! @endcond #define ROT_MODEL_RADANT ROT_MAKE_MODEL(ROT_RADANT, 1) - +/** + * \brief A macro that returns the model number of the ANDROIDSENSOR backend. + * + * \def ROT_MODEL_ANDROIDSENSOR + * + * The androidsensor rotator is not a real rotator, it uses the accelerometer + * sensor and magnetic field sensor of the cell phone or tablet to perform + * attitude determination for your antenna and the phone tied to it. Now you + * can wave your antenna to find radio signals. + */ +//! @cond Doxygen_Suppress #define ROT_ANDROIDSENSOR 23 #define ROT_BACKEND_ANDROIDSENSOR "androidsensor" +//! @endcond #define ROT_MODEL_ANDROIDSENSOR ROT_MAKE_MODEL(ROT_ANDROIDSENSOR, 1) /** commit 30494a4a1f03db4b9cdab6e901e6461d160d22e7 Author: Nate Bargmann <n0...@n0...> Date: Tue Jul 22 16:13:38 2025 -0500 Update Dozygen comments for amplist.h diff --git a/include/hamlib/amplist.h b/include/hamlib/amplist.h index 4122062c8..4539b6d2b 100644 --- a/include/hamlib/amplist.h +++ b/include/hamlib/amplist.h @@ -20,6 +20,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ #ifndef _AMPLIST_H #define _AMPLIST_H 1 @@ -51,7 +52,7 @@ * foreach_opened_amp() API function can be used. * * The model number, or ID, is used to tell Hamlib which amplifier the client - * wishes to use which is done with the amp_init() API call. + * wishes to use which is passed to the amp_init() API call. */ @@ -107,20 +108,34 @@ #define AMP_MODEL_ELECRAFT_KPA1500 AMP_MAKE_MODEL(AMP_ELECRAFT, 1) //#define AMP_MODEL_ELECRAFT_KPA500 AMP_MAKE_MODEL(AMP_ELECRAFT, 2) +/** + * \brief A macro that returns the model number of the DX1200 backend. + * + * \def AMP_MODEL_GEMINI_DX1200 + * + * The Gemini DX1200 covers 160 trhough 4 meters. + */ +//! @cond Doxygen_Suppress #define AMP_GEMINI 3 #define AMP_BACKEND_GEMINI "gemini" +//! @endcond #define AMP_MODEL_GEMINI_DX1200 AMP_MAKE_MODEL(AMP_GEMINI, 1) +/** + * \brief A macro that returns the model number of the FA backend. + * + * \def AMP_MODEL_EXPERT_FA + * + * The Expert FA series of amplifiers is supported by this backend. + */ +//! @cond Doxygen_Suppress #define AMP_EXPERT 4 #define AMP_BACKEND_EXPERT "expert" +//! @endcond #define AMP_MODEL_EXPERT_FA AMP_MAKE_MODEL(AMP_EXPERT, 1) -/** - * \brief Convenience type definition for an amplifier model. - * - * \typedef typedef int amp_model_t - */ +/** Convenience type definition for an amplifier model. */ typedef int amp_model_t; commit 947b2da28f1b9ca0e64a59acabdc49da2eb1d9fe Author: Nate Bargmann <n0...@n0...> Date: Tue Jul 22 15:25:38 2025 -0500 Update Doxygen comments in amp_state.h diff --git a/include/hamlib/amp_state.h b/include/hamlib/amp_state.h index 03ff8902c..d138ad141 100644 --- a/include/hamlib/amp_state.h +++ b/include/hamlib/amp_state.h @@ -61,7 +61,7 @@ struct amp_state * non overridable fields, internal use */ //---Start cut here--- - hamlib_port_t_deprecated ampport_deprecated; /*!< Amplifier port (internal use). Deprecated */ + hamlib_port_t_deprecated ampport_deprecated; /*!< \deprecated Amplifier port (internal use). */ //---End cut here--- int comm_state; /*!< Comm port state, opened/closed. */ @@ -79,6 +79,8 @@ struct amp_state #if defined(IN_HAMLIB) #define AMPSTATE(a) (&(a)->state) #endif + +/** Macro for application access to amp_state data structure. */ #define HAMLIB_AMPSTATE(a) ((struct amp_state *)amp_data_pointer(a, RIG_PTRX_AMPSTATE)) __END_DECLS commit c49cd2312cbdd0f859642160fb3874eab9db107d Author: Nate Bargmann <n0...@n0...> Date: Tue Jul 22 13:38:14 2025 -0500 Add Doxygen support to port.h diff --git a/doc/Makefile.am b/doc/Makefile.am index 257b1112b..2047f1751 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -9,6 +9,7 @@ SRCDOCLST = \ ../include/hamlib/amplifier.h \ ../include/hamlib/amplist.h \ ../include/hamlib/amp_state.h \ + ../include/hamlib/port.h \ ../include/hamlib/rig.h \ ../include/hamlib/rotator.h \ ../include/hamlib/rotlist.h \ diff --git a/doc/hamlib.cfg.in b/doc/hamlib.cfg.in index 1799b946e..23c8f3986 100644 --- a/doc/hamlib.cfg.in +++ b/doc/hamlib.cfg.in @@ -58,6 +58,7 @@ ENABLED_SECTIONS = "" PREDEFINED = DOXYGEN "DOC_HIDDEN" JAVADOC_AUTOBRIEF = NO OPTIMIZE_OUTPUT_FOR_C = YES +DISTRIBUTE_GROUP_DOC = YES MAN_LINKS = NO MACRO_EXPANSION = YES diff --git a/doc/index.doxygen b/doc/index.doxygen index ee8eb8a66..dfa428b1f 100644 --- a/doc/index.doxygen +++ b/doc/index.doxygen @@ -195,5 +195,6 @@ GNU/Linux. * \defgroup rot_internal Rotator Internal API * \defgroup amplifier Amplifier API * \defgroup amp_internal Amplifier Internal API + * \defgroup port Port data structure for accessing devices * \defgroup utilities Utility Routines API */ diff --git a/include/hamlib/port.h b/include/hamlib/port.h index 59af611cd..f072cb893 100644 --- a/include/hamlib/port.h +++ b/include/hamlib/port.h @@ -24,23 +24,40 @@ #ifndef _HL_PORT_H #define _HL_PORT_H 1 + __BEGIN_DECLS + +/** + * \addtogroup port + * @{ + */ + +/** + * \brief Hamlib port data structures. + * + * \file port.h + * + * This file contains the data structures and declarations for the Hamlib + * port Application Programming Interface (API). + */ + /** * \brief Port definition * * Of course, looks like OO painstakingly programmed in C, sigh. + * + * \warning + * DO NOT CHANGE THIS STRUCTURE AT ALL UNTIL 5.0. + * Right now it is static inside the rig structure. + * 5.0 will change it to a pointer which can then be added to. + * At that point only add to the end of the structure. */ -//! @cond Doxygen_Suppress -// DO NOT CHANGE THIS STRUCTURE ALL UNTIL 5.0 -// Right now it is static inside rig structure -// 5.0 will change it to a pointer which can then be added to -// At that point only add to the end of the structure typedef struct hamlib_port { union { - rig_port_t rig; /*!< Communication port type */ - ptt_type_t ptt; /*!< PTT port type */ - dcd_type_t dcd; /*!< DCD port type */ - } type; + rig_port_t rig; /*!< Communication port of #rig_port_e type. */ + ptt_type_t ptt; /*!< PTT port of #ptt_type_e type. */ + dcd_type_t dcd; /*!< DCD port of #dcd_type_e type. */ + } type; /*!< Type of port in use.*/ int fd; /*!< File descriptor */ void *handle; /*!< handle for USB */ @@ -109,14 +126,20 @@ typedef struct hamlib_port { } hamlib_port_t; -// DO NOT CHANGE THIS STRUCTURE AT ALL -// Will be removed in 5.0 +/** + * \deprecated + * This structure will be removed in 5.0 and should not be used in new code. + * + * \warning + * DO NOT CHANGE THIS STRUCTURE AT ALL! + * Will be removed in 5.0. + */ typedef struct hamlib_port_deprecated { union { rig_port_t rig; /*!< Communication port type */ ptt_type_t ptt; /*!< PTT port type */ dcd_type_t dcd; /*!< DCD port type */ - } type; + } type; /*!< Type of port in use.*/ int fd; /*!< File descriptor */ void *handle; /*!< handle for USB */ @@ -171,21 +194,27 @@ typedef struct hamlib_port_deprecated { int client_port; /*!< client socket port for tcp connection */ RIG *rig; /*!< our parent RIG device */ } hamlib_port_t_deprecated; -//! @endcond #if !defined(__APPLE__) || !defined(__cplusplus) +//! @deprecated Obsolete port type typedef hamlib_port_t_deprecated port_t_deprecated; + +//! Short type name of the hamlib_port structure. typedef hamlib_port_t port_t; #endif -// Macros for app access to hamlib_port_t data +///@{ +/// Macro for application access to #hamlib_port_t data for this port type. #define HAMLIB_RIGPORT(r) ((hamlib_port_t *)rig_data_pointer((r), RIG_PTRX_RIGPORT)) #define HAMLIB_PTTPORT(r) ((hamlib_port_t *)rig_data_pointer((r), RIG_PTRX_PTTPORT)) #define HAMLIB_DCDPORT(r) ((hamlib_port_t *)rig_data_pointer((r), RIG_PTRX_DCDPORT)) #define HAMLIB_AMPPORT(a) ((hamlib_port_t *)amp_data_pointer((a), RIG_PTRX_AMPPORT)) #define HAMLIB_ROTPORT(r) ((hamlib_port_t *)rot_data_pointer((r), RIG_PTRX_ROTPORT)) #define HAMLIB_ROTPORT2(r) ((hamlib_port_t *)rot_data_pointer((r), RIG_PTRX_ROTPORT2)) +///@} __END_DECLS #endif /* _HL_PORT_H */ + +/** @} */ diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 03ecb2656..416cb6210 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -668,11 +668,11 @@ typedef enum dcd_e { /** - * \brief DCD type + * \brief DCD (Data Carrier Detect) type * * \sa rig_get_dcd() */ -typedef enum { +typedef enum dcd_type_e { RIG_DCD_NONE = 0, /*!< No DCD available */ RIG_DCD_RIG, /*!< Rig has DCD status support, i.e. rig has get_dcd cap */ RIG_DCD_SERIAL_DSR, /*!< DCD status from serial DSR signal */ @@ -697,11 +697,13 @@ typedef enum { /** - * \brief PTT type + * \brief PTT (Push To Talk) type + * + * The method used to activate the transmitter of a radio. * * \sa rig_get_ptt() */ -typedef enum { +typedef enum ptt_type_e { RIG_PTT_NONE = 0, /*!< No PTT available */ RIG_PTT_RIG, /*!< Legacy PTT (CAT PTT) */ RIG_PTT_SERIAL_DTR, /*!< PTT control through serial DTR signal */ commit 133817bf146eca08ce8267793f31b14c47f90b08 Author: Nate Bargmann <n0...@n0...> Date: Thu Jul 17 14:09:34 2025 -0500 Add license header to multicast.[ch] diff --git a/include/hamlib/multicast.h b/include/hamlib/multicast.h index 1bc18475f..674521617 100644 --- a/include/hamlib/multicast.h +++ b/include/hamlib/multicast.h @@ -1,3 +1,29 @@ +/* + * Hamlib Interface - Multicast API header + * Copyright (c) 2023 by Mike Black, W9MDB + * + * + * 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 MULTICAST_H +#define MULTICAST_H + //include <stdio.h> //#include <stdlib.h> //#include <string.h> @@ -17,9 +43,6 @@ #include <arpa/inet.h> #endif -#ifndef MULTICAST_H -#define MULTICAST_H - struct multicast_vfo { char *name; @@ -42,4 +65,5 @@ struct multicast_broadcast extern HAMLIB_EXPORT (int) multicast_init(RIG *rig, char *addr, int port); extern HAMLIB_EXPORT (int) multicast_send(RIG *rig, const char *msg, int msglen); extern HAMLIB_EXPORT (int) multicast_stop(RIG *rig); -#endif //MULTICAST_H + +#endif // MULTICAST_H diff --git a/src/multicast.c b/src/multicast.c index f222f072b..01fad1703 100644 --- a/src/multicast.c +++ b/src/multicast.c @@ -1,3 +1,27 @@ +/* + * Hamlib Interface - Multicast API header + * Copyright (c) 2023,2024 by Mike Black, W9MDB + * Copyright (c) 2024,2025 by George Baltz, N3GB + * + * + * 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 <stdio.h> #include <stdlib.h> #include <string.h> commit 9ede33de4f690fd70c830aae1465d8bc9070839f Author: Nate Bargmann <n0...@n0...> Date: Thu Jul 17 14:08:44 2025 -0500 Exclude multicast.[ch] from Doxygen docs diff --git a/doc/hamlib.cfg.in b/doc/hamlib.cfg.in index df1157178..1799b946e 100644 --- a/doc/hamlib.cfg.in +++ b/doc/hamlib.cfg.in @@ -30,9 +30,11 @@ INPUT = @top_srcdir@/doc/index.doxygen \ @top_srcdir@/include/hamlib/ \ @top_srcdir@/src/ -EXCLUDE = @top_srcdir@/src/amp_conf.h \ - @top_srcdir@/include/hamlib/ampclass.h \ - @top_srcdir@/include/hamlib/rotclass.h +EXCLUDE = @top_srcdir@/include/hamlib/ampclass.h \ + @top_srcdir@/include/hamlib/multicast.h \ + @top_srcdir@/include/hamlib/rotclass.h \ + @top_srcdir@/src/amp_conf.h \ + @top_srcdir@/src/multicast.c INCLUDE_PATH = @top_srcdir@/include commit 6cfaf03edd7c514c39b2620ae97763313169f14a Author: Nate Bargmann <n0...@n0...> Date: Thu Jul 17 13:21:39 2025 -0500 Add amp_state.h to Doxygen docs diff --git a/doc/Makefile.am b/doc/Makefile.am index 85a956fa7..257b1112b 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -8,6 +8,7 @@ dist_man_MANS = man1/ampctl.1 man1/ampctld.1 \ SRCDOCLST = \ ../include/hamlib/amplifier.h \ ../include/hamlib/amplist.h \ + ../include/hamlib/amp_state.h \ ../include/hamlib/rig.h \ ../include/hamlib/rotator.h \ ../include/hamlib/rotlist.h \ diff --git a/include/hamlib/amp_state.h b/include/hamlib/amp_state.h index c9b5253d1..03ff8902c 100644 --- a/include/hamlib/amp_state.h +++ b/include/hamlib/amp_state.h @@ -24,6 +24,21 @@ #ifndef _AMP_STATE_H #define _AMP_STATE_H 1 +/** + * \addtogroup amplifier + * @{ + */ + + +/** + * \brief Hamlib amplifier state structure. + * + * \file amp_state.h + * + * This file contains the live data state structure of the amplifier. + */ + + __BEGIN_DECLS /** * \brief Amplifier state structure. @@ -69,3 +84,5 @@ struct amp_state __END_DECLS #endif /* _AMP_STATE_H */ + +/** @} */ ----------------------------------------------------------------------- Summary of changes: doc/Makefile.am | 3 +++ doc/hamlib.cfg.in | 16 ++++++++++--- doc/index.doxygen | 1 + include/hamlib/amp_state.h | 21 +++++++++++++++- include/hamlib/amplist.h | 27 ++++++++++++++++----- include/hamlib/multicast.h | 32 +++++++++++++++++++++---- include/hamlib/port.h | 57 ++++++++++++++++++++++++++++++++----------- include/hamlib/rig.h | 10 ++++---- include/hamlib/rot_state.h | 25 ++++++++++++++++--- include/hamlib/rotator.h | 29 ++++------------------ include/hamlib/rotlist.h | 60 ++++++++++++++++++++++++++++++++++++++++++---- src/multicast.c | 24 +++++++++++++++++++ 12 files changed, 240 insertions(+), 65 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-07-23 03:24:00
|
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 79f8b1cde83cf35b1cd30e67ab8f26fd1137b650 (commit) via 8bcfeda94ad7e8d0160e80b0ac67423f5b583567 (commit) via 47dae3879d95b1b68dccfba4c0e5757bdcdf38eb (commit) via 8469ee1737ba8ab1191a12b5b0788bf6c666c527 (commit) via 062f260c073707d18878f5be755800a894c04058 (commit) via debcc2f565349a4ced8527dc9184a6d70d6a006c (commit) from 83ba4eb27fcde29a5e47fb102f805a6c24693388 (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 79f8b1cde83cf35b1cd30e67ab8f26fd1137b650 Merge: 83ba4eb27 8bcfeda94 Author: Nate Bargmann <n0...@n0...> Date: Tue Jul 22 22:11:06 2025 -0500 Merge HitHub PR #1811 diff --cc src/sleep.c index 1155065af,98c190b10..02507bb09 --- a/src/sleep.c +++ b/src/sleep.c @@@ -35,9 -35,10 +35,9 @@@ * \note parameters are same as man page for each * */ + #include "hamlib/config.h" #include <unistd.h> -#include <errno.h> #include <pthread.h> - #include "hamlib/config.h" #include "sleep.h" #ifdef __cplusplus commit 8bcfeda94ad7e8d0160e80b0ac67423f5b583567 Author: George Baltz N3GB <Geo...@gm...> Date: Tue Jul 22 11:28:37 2025 -0400 Don't forget the noise diff --git a/bindings/python/test_Hamlib_class.py b/bindings/python/test_Hamlib_class.py index 2f09aac97..98f767f7e 100755 --- a/bindings/python/test_Hamlib_class.py +++ b/bindings/python/test_Hamlib_class.py @@ -674,6 +674,7 @@ class TestClass: 'RIG_MODEL_G315', 'RIG_MODEL_G90', 'RIG_MODEL_GNURADIO', +'RIG_MODEL_GQRX', 'RIG_MODEL_GRAUDIO', 'RIG_MODEL_GRAUDIOIQ', 'RIG_MODEL_GS100', @@ -930,7 +931,6 @@ class TestClass: 'RIG_MODE_AM', 'RIG_MODE_AMN', 'RIG_MODE_AMS', -'RIG_MODE_BIT46', 'RIG_MODE_BIT47', 'RIG_MODE_BIT48', 'RIG_MODE_BIT49', @@ -994,6 +994,7 @@ class TestClass: 'RIG_MODE_USBD2', 'RIG_MODE_USBD3', 'RIG_MODE_WFM', +'RIG_MODE_WFMS', 'RIG_MTYPE_BAND', 'RIG_MTYPE_CALL', 'RIG_MTYPE_EDGE', commit 47dae3879d95b1b68dccfba4c0e5757bdcdf38eb Author: George Baltz N3GB <Geo...@gm...> Date: Tue Jul 22 11:07:33 2025 -0400 Fix compiler errors with strict C23 standards Fix missing/misplaced '#include "config.h"' statements. Fixes missing function prototypes, unknown type definitions, etc. Allows configuration of GCC with CFLAGS="-std=c23" instead of using default -std=gnu23. Don't know about CLANG, MSVC, MinGW, etc, but using gwb@stitch:~> gcc --version gcc (SUSE Linux) 15.1.1 20250714 Copyright (C) 2025 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Hamlib can compile in strict C23 mode, or previous standard levels. diff --git a/lib/precise_time.c b/lib/precise_time.c index 763caadb3..7639a7a26 100644 --- a/lib/precise_time.c +++ b/lib/precise_time.c @@ -20,6 +20,7 @@ // along with fldigi. If not, see <http://www.gnu.org/licenses/>. // --------------------------------------------------------------------- +#include "config.h" #include <errno.h> #include <time.h> #include <sys/time.h> diff --git a/rigs/barrett/barrett.c b/rigs/barrett/barrett.c index 17756ebcb..1aaf7a92d 100644 --- a/rigs/barrett/barrett.c +++ b/rigs/barrett/barrett.c @@ -19,6 +19,7 @@ * */ +#include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/rigs/dummy/dummy.c b/rigs/dummy/dummy.c index 948bb89aa..a7006792f 100644 --- a/rigs/dummy/dummy.c +++ b/rigs/dummy/dummy.c @@ -20,6 +20,7 @@ * */ +#include "config.h" // cppcheck-suppress * #include <stdint.h> // cppcheck-suppress * diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index 4ee7b3de6..dd17395e8 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -20,6 +20,7 @@ * */ +#include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> /* String function definitions */ diff --git a/rigs/dummy/netrigctl.c b/rigs/dummy/netrigctl.c index 382f5f039..d4b833d96 100644 --- a/rigs/dummy/netrigctl.c +++ b/rigs/dummy/netrigctl.c @@ -19,6 +19,7 @@ * */ +#include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> /* String function definitions */ diff --git a/rigs/dummy/quisk.c b/rigs/dummy/quisk.c index c3fb30b0e..f240177b5 100644 --- a/rigs/dummy/quisk.c +++ b/rigs/dummy/quisk.c @@ -19,6 +19,7 @@ * */ +#include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> /* String function definitions */ diff --git a/rigs/dummy/tci1x.c b/rigs/dummy/tci1x.c index cf9123c7b..984114b75 100644 --- a/rigs/dummy/tci1x.c +++ b/rigs/dummy/tci1x.c @@ -19,6 +19,7 @@ * */ +#include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> /* String function definitions */ diff --git a/rigs/dummy/trxmanager.c b/rigs/dummy/trxmanager.c index e9790e4d2..1c320b221 100644 --- a/rigs/dummy/trxmanager.c +++ b/rigs/dummy/trxmanager.c @@ -20,6 +20,7 @@ * */ +#include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> /* String function definitions */ diff --git a/security/AESStringCrypt.c b/security/AESStringCrypt.c index eacc750bd..908b1ab41 100644 --- a/security/AESStringCrypt.c +++ b/security/AESStringCrypt.c @@ -28,6 +28,7 @@ * BUT NOT LIMITED TO, LOSS OF DATA OR DATA BEING RENDERED INACCURATE. */ +#include "config.h" #include <stdio.h> #include <string.h> diff --git a/src/sleep.c b/src/sleep.c index 00a29e2d0..98c190b10 100644 --- a/src/sleep.c +++ b/src/sleep.c @@ -35,10 +35,10 @@ * \note parameters are same as man page for each * */ +#include "hamlib/config.h" #include <unistd.h> #include <errno.h> #include <pthread.h> -#include "hamlib/config.h" #include "sleep.h" #ifdef __cplusplus diff --git a/tests/rigtestmcastrx.c b/tests/rigtestmcastrx.c index fdc2b6596..e6a5d723f 100644 --- a/tests/rigtestmcastrx.c +++ b/tests/rigtestmcastrx.c @@ -1,3 +1,4 @@ +#include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> commit 8469ee1737ba8ab1191a12b5b0788bf6c666c527 Author: George Baltz N3GB <Geo...@gm...> Date: Sun Jul 20 16:28:56 2025 -0400 Fix incorrect fallthroughs Found with -Wimplicit-fallthrough, but also many false positives diff --git a/rigs/dummy/dummy.c b/rigs/dummy/dummy.c index 0d59308d9..948bb89aa 100644 --- a/rigs/dummy/dummy.c +++ b/rigs/dummy/dummy.c @@ -712,6 +712,9 @@ static int dummy_set_vfo(RIG *rig, vfo_t vfo) priv->curr = &priv->mem[curr->channel_num]; break; } + rig_debug(RIG_DEBUG_ERR, "%s: invalid memory channel %d\n", __func__, + curr->channel_num); + RETURNFUNC(-RIG_EINVAL); case RIG_VFO_TX: if (priv->tx_vfo == RIG_VFO_A) { priv->curr = &priv->vfo_maina; } diff --git a/rigs/rs/xk852.c b/rigs/rs/xk852.c index 1b1b1a637..f4aee5555 100644 --- a/rigs/rs/xk852.c +++ b/rigs/rs/xk852.c @@ -334,47 +334,46 @@ xk852_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) { case XK852_NOISE_BLANK_OFF: val->f = 1; - return RIG_OK; break; case XK852_NOISE_BLANK_ON: val->f = 0; - return RIG_OK; - break; + } + return RIG_OK; + case RIG_LEVEL_RFPOWER: switch (state.op_mode) { case XK852_OP_MODE_OFF: val->f = 0; - return RIG_OK; break; case XK852_OP_MODE_RX: val->f = 0; - return RIG_OK; break; case XK852_OP_MODE_TX_LOW: val->f = 0.099; - return RIG_OK; break; case XK852_OP_MODE_TX_MID: val->f = 0.499; - return RIG_OK; break; case XK852_OP_MODE_TX_FULL: val->f = 1; - return RIG_OK; break; + + default: + return -RIG_EINVAL; + } + return RIG_OK; default: return -RIG_ENIMPL; - break; } return -RIG_EINVAL; commit 062f260c073707d18878f5be755800a894c04058 Author: George Baltz N3GB <Geo...@gm...> Date: Sat Jul 19 15:31:02 2025 -0400 Clean up some cppcheck gripes in simulators/ diff --git a/simulators/simpstrotator.c b/simulators/simpstrotator.c index 1b1454116..74e7cd01a 100644 --- a/simulators/simpstrotator.c +++ b/simulators/simpstrotator.c @@ -8,7 +8,7 @@ #define REPLY_PORT 12002 #define BUFFER_SIZE 1024 -void handle_receive(int recv_sockfd, struct sockaddr_in *client_addr, +static void handle_receive(int recv_sockfd, struct sockaddr_in *client_addr, socklen_t addr_len, char *buffer) { ssize_t recv_len; @@ -28,7 +28,7 @@ void handle_receive(int recv_sockfd, struct sockaddr_in *client_addr, printf("Data: %s\n", buffer); } -void handle_send(int send_sockfd, struct sockaddr_in *client_addr, +static void handle_send(int send_sockfd, struct sockaddr_in *client_addr, socklen_t addr_len, const char *message) { ssize_t sent_len; diff --git a/simulators/simts890.c b/simulators/simts890.c index 7d9120669..b39a40db7 100644 --- a/simulators/simts890.c +++ b/simulators/simts890.c @@ -123,7 +123,7 @@ int tfset = 0; typedef struct kvfo { int freq; - int mode; + unsigned int mode; short band, vfo; // Redundant, but useful for relative movement } *kvfop_t; @@ -267,8 +267,8 @@ getmyline(int fd, char *buf) if (retval != 0) { perror("read failed:"); - close(fd); - fd = openPort(""); + //close(fd); + //fd = openPort(""); } if (strlen(buf) == 0) { hl_usleep(10 * 1000); } @@ -588,7 +588,8 @@ int main(int argc, char *argv[]) else if (strncmp(buf, "SF", 2) == 0) { // Sets and Reads the VFO (Frequency and Mode) - int tmpvfo, tmpfreq, tmpmode, newband; + int tmpvfo, tmpfreq, newband; + unsigned int tmpmode; kvfop_t ovfo, nvfo; if (sscanf(buf, SFformat, &tmpvfo, &tmpfreq, &tmpmode) != 3 || tmpvfo < 0 @@ -599,7 +600,7 @@ int main(int argc, char *argv[]) continue; } - //printf("tmpvfo=%d, tmpfreq=%d, tmpmode=%d\n", tmpvfo, tmpfreq, tmpmode); + //printf("tmpvfo=%d, tmpfreq=%d, tmpmode=%u\n", tmpvfo, tmpfreq, tmpmode); ovfo = *vfoAB[tmpvfo]; newband = freq2band(tmpfreq); @@ -1251,10 +1252,10 @@ int main(int argc, char *argv[]) case '0': // Get/Set Local clock { time_t t; - struct tm *localtm; if (buf[3] == ';') { + const struct tm *localtm; t = time(NULL); localtm = localtime(&t); strftime(&buf[3], BUFSIZ - 3, "%y%m%d%H%M%S;", localtm); diff --git a/simulators/simts990.c b/simulators/simts990.c index 84b4d7c82..c39ba49ac 100644 --- a/simulators/simts990.c +++ b/simulators/simts990.c @@ -116,8 +116,8 @@ getmyline(int fd, char *buf) if (retval != 0) { perror("read failed:"); - close(fd); - fd = openPort(""); + //close(fd); + //fd = openPort(""); } if (strlen(buf) == 0) { hl_usleep(10 * 1000); } commit debcc2f565349a4ced8527dc9184a6d70d6a006c Author: George Baltz N3GB <Geo...@gm...> Date: Sun Jul 13 20:45:49 2025 -0400 Clean up simft847.c At least make get/set freq and mode work. diff --git a/simulators/simft847.c b/simulators/simft847.c index d73bea1a5..91d031c12 100644 --- a/simulators/simft847.c +++ b/simulators/simft847.c @@ -13,18 +13,19 @@ struct ip_mreq #include <fcntl.h> #include <string.h> #include <unistd.h> -#include "../include/hamlib/rig.h" +//#include "../include/hamlib/rig.h" #define BUFSIZE 256 -float freqA = 14074000; -float freqB = 14074500; -char tx_vfo = '0'; -char rx_vfo = '0'; -char modeA = '1'; -char modeB = '1'; +/* In hono(u)r of the 10Hz resolution of the FT-847, vfo frequencies + * are stored in decaHertz(daHz) + */ +int freqs[4] = {1407400, 43510000, 43720000, 0}; +int modes[4] = {0x01, 0x02, 0x02, 0}; +char *vfoNames[4] = {"Main", "SAT Rx", "SAT Tx", "Bogus"}; int width_main = 500; int width_sub = 700; +int vfo; int @@ -89,7 +90,7 @@ int openPort(char *comport) // doesn't matter for using pts devices int main(int argc, char *argv[]) { unsigned char buf[256]; - int n; + int freq, i, n; again: @@ -109,6 +110,7 @@ again: { printf("Not 5 bytes? bytes=%d\n", bytes); } + n = 0; switch (buf[4]) { @@ -120,7 +122,11 @@ again: case 0x88: printf("PTT OFF\n"); break; - case 0x07: printf("MODE\n"); break; + case 0x07: + case 0x17: + case 0x27: + modes[(buf[4] & 0x30) >> 4] = buf[0]; + printf("MODE\n"); break; case 0x05: printf("CLAR ON\n"); break; @@ -148,13 +154,33 @@ again: case 0xF7: printf("READ TX STATUS\n"); break; + case 0x01: + case 0x11: + case 0x21: + freq = 0; + for (i = 0; i < 4; i++) + { + freq = freq * 100 + (((buf[i] & 0xf0) * 5) / 8) + (buf[i] & 0x0f); + } + freqs[(buf[4] & 0x30) >> 4] = freq; + printf("FREQ SET = %d\n", freq * 10); + break; + case 0x03: + case 0x13: + case 0x23: printf("READ RX STATUS\n"); - buf[0] = 0x01; - buf[1] = 0x40; - buf[2] = 0x74; - buf[3] = 0x00; - buf[4] = 0x03; n = write(fd, buf, 5); + vfo = (buf[4] & 0x30) >> 4; + freq = freqs[vfo]; + for (i = 3; i >= 0; i--) + { + buf[i] = freq % 10; + freq /= 10; + buf[i] += (freq % 10) << 4; + freq /= 10; + } + buf[4] = modes[vfo]; + n = write(fd, buf, 5); break; case 0xbb: buf[0] = buf[1] = 0; printf("READ EPROM\n"); n = write(fd, buf, 2); @@ -162,6 +188,7 @@ again: default: printf("Unknown cmd=%02x\n", buf[4]); } + if (n < 0) {printf("Write failed - n = %d\n", n); } } return 0; ----------------------------------------------------------------------- Summary of changes: lib/precise_time.c | 1 + rigs/barrett/barrett.c | 1 + rigs/dummy/dummy.c | 4 ++++ rigs/dummy/flrig.c | 1 + rigs/dummy/netrigctl.c | 1 + rigs/dummy/quisk.c | 1 + rigs/dummy/tci1x.c | 1 + rigs/dummy/trxmanager.c | 1 + rigs/rs/xk852.c | 17 +++++++------- security/AESStringCrypt.c | 1 + simulators/simft847.c | 55 ++++++++++++++++++++++++++++++++++------------ simulators/simpstrotator.c | 4 ++-- simulators/simts890.c | 13 ++++++----- simulators/simts990.c | 4 ++-- src/sleep.c | 2 +- tests/rigtestmcastrx.c | 1 + 16 files changed, 74 insertions(+), 34 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-07-23 03:06:51
|
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 83ba4eb27fcde29a5e47fb102f805a6c24693388 (commit) via 276de64d9ca0e797070926c65c98a71c98d1deee (commit) via 0267068220ad26a09497b0cd8ab5258aae0fcc09 (commit) via 2fab137fc50cdb2bc78716d63daad866bf9b05c5 (commit) via 7fe36ebdd6629e0ad852a95fc4d3404b4b5ddc8f (commit) via b57ad227a080cd58cb2ce3ca4c4d8797876602e9 (commit) via 974e619dd26db17ffb98461203e8ed67f2381d01 (commit) via 195ed0154378d6a0d6413036e73a5a056d9e3243 (commit) via f621a961f47efc145bafa77fb184fcf58b2a42af (commit) via 2a3f603680f48054e43ad0f4afa20ae70eac0157 (commit) via b5c8e7faba8e00b2843508a35668d90ea808e655 (commit) via 827138d23e8ea7cff97a2895f5560bfbef7cac13 (commit) via f4ece0d207b73352512e81499416f02504dfd780 (commit) via d536f0ec9395ccfc6c7a0ceb7d88fd74a00f5529 (commit) via 9afdfc5de365ba6fa01b9f2816136d4c9fafbf0c (commit) via b66d1ac7c13b21ec5469be83bcc0df0b42ab35b8 (commit) from 4da91f1a288e81132482be23c298c41ff062cfe9 (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 83ba4eb27fcde29a5e47fb102f805a6c24693388 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Tue Jul 22 23:42:30 2025 +0200 Update the tests diff --git a/bindings/python/test_Hamlib_class.py b/bindings/python/test_Hamlib_class.py index 2f09aac97..98f767f7e 100755 --- a/bindings/python/test_Hamlib_class.py +++ b/bindings/python/test_Hamlib_class.py @@ -674,6 +674,7 @@ class TestClass: 'RIG_MODEL_G315', 'RIG_MODEL_G90', 'RIG_MODEL_GNURADIO', +'RIG_MODEL_GQRX', 'RIG_MODEL_GRAUDIO', 'RIG_MODEL_GRAUDIOIQ', 'RIG_MODEL_GS100', @@ -930,7 +931,6 @@ class TestClass: 'RIG_MODE_AM', 'RIG_MODE_AMN', 'RIG_MODE_AMS', -'RIG_MODE_BIT46', 'RIG_MODE_BIT47', 'RIG_MODE_BIT48', 'RIG_MODE_BIT49', @@ -994,6 +994,7 @@ class TestClass: 'RIG_MODE_USBD2', 'RIG_MODE_USBD3', 'RIG_MODE_WFM', +'RIG_MODE_WFMS', 'RIG_MTYPE_BAND', 'RIG_MTYPE_CALL', 'RIG_MTYPE_EDGE', commit 276de64d9ca0e797070926c65c98a71c98d1deee Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Tue Jul 22 22:42:02 2025 +0200 Revert changes to quotes in the include/hamlib directory Partially reverts commit #052cbb27 ("Fix ambiguity between system includes and Hamlib includes") since the files in include/hamlib are part of the public API, they must use the installed includes when building third party applications. diff --git a/include/hamlib/ampclass.h b/include/hamlib/ampclass.h index b605cbaef..1bb5876b7 100644 --- a/include/hamlib/ampclass.h +++ b/include/hamlib/ampclass.h @@ -22,7 +22,7 @@ #ifndef _AMPCLASS_H #define _AMPCLASS_H 1 -#include "hamlib/amplifier.h" +#include <hamlib/amplifier.h> diff --git a/include/hamlib/amplifier.h b/include/hamlib/amplifier.h index b17c7ff47..847b2a53b 100644 --- a/include/hamlib/amplifier.h +++ b/include/hamlib/amplifier.h @@ -23,8 +23,8 @@ #ifndef _AMPLIFIER_H #define _AMPLIFIER_H 1 -#include "hamlib/rig.h" -#include "hamlib/amplist.h" +#include <hamlib/rig.h> +#include <hamlib/amplist.h> /** * \addtogroup amplifier @@ -271,7 +271,7 @@ struct amp_caps __END_DECLS -#include "hamlib/amp_state.h" +#include <hamlib/amp_state.h> __BEGIN_DECLS diff --git a/include/hamlib/multicast.h b/include/hamlib/multicast.h index 01dbdc248..1bc18475f 100644 --- a/include/hamlib/multicast.h +++ b/include/hamlib/multicast.h @@ -3,7 +3,7 @@ //#include <string.h> //#include <errno.h> //#include <unistd.h> -#include "hamlib/rig.h" +#include <hamlib/rig.h> //#include <sys/socket.h> #ifdef HAVE_NETINET_IN_H #include <netinet/in.h> diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index c7a5234ba..03ecb2656 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -70,8 +70,8 @@ #include <pthread.h> /* Rig list is in a separate file so as not to mess up w/ this one */ -#include "hamlib/riglist.h" -//#include "hamlib/config.h" +#include <hamlib/riglist.h> +//#include <hamlib/config.h> /** * \addtogroup rig @@ -122,7 +122,7 @@ #endif //! @endcond -#include "hamlib/rig_dll.h" +#include <hamlib/rig_dll.h> #ifndef SWIGLUA //! @cond Doxygen_Suppress @@ -2367,7 +2367,7 @@ typedef struct hamlib_async_pipe hamlib_async_pipe_t; #ifndef NO_OLD_INCLUDES __END_DECLS -#include "hamlib/port.h" +#include <hamlib/port.h> __BEGIN_DECLS #endif @@ -2536,7 +2536,7 @@ struct rig_cache_deprecated { * \brief Multicast data items the are unique per rig instantiation * This is meant for internal Hamlib use only */ -#include "hamlib/multicast.h" +#include <hamlib/multicast.h> struct multicast_s { int multicast_running; @@ -2571,7 +2571,7 @@ typedef unsigned int rig_comm_status_t; __END_DECLS -#include "hamlib/rig_state.h" +#include <hamlib/rig_state.h> __BEGIN_DECLS diff --git a/include/hamlib/rigclass.h b/include/hamlib/rigclass.h index d4bea0d89..23b4738fd 100644 --- a/include/hamlib/rigclass.h +++ b/include/hamlib/rigclass.h @@ -22,7 +22,7 @@ #ifndef _RIGCLASS_H #define _RIGCLASS_H 1 -#include "hamlib/rig.h" +#include <hamlib/rig.h> #include <iostream> diff --git a/include/hamlib/rotator.h b/include/hamlib/rotator.h index 5a3a618cb..ab79f5260 100644 --- a/include/hamlib/rotator.h +++ b/include/hamlib/rotator.h @@ -23,8 +23,8 @@ #ifndef _ROTATOR_H #define _ROTATOR_H 1 -#include "hamlib/rig.h" -#include "hamlib/rotlist.h" +#include <hamlib/rig.h> +#include <hamlib/rotlist.h> /** * \addtogroup rotator @@ -587,7 +587,7 @@ struct rot_caps { __END_DECLS -#include "hamlib/rot_state.h" +#include <hamlib/rot_state.h> __BEGIN_DECLS diff --git a/include/hamlib/rotclass.h b/include/hamlib/rotclass.h index 06ccf3ea4..219e3a92f 100644 --- a/include/hamlib/rotclass.h +++ b/include/hamlib/rotclass.h @@ -22,7 +22,7 @@ #ifndef _ROTCLASS_H #define _ROTCLASS_H 1 -#include "hamlib/rotator.h" +#include <hamlib/rotator.h> commit 0267068220ad26a09497b0cd8ab5258aae0fcc09 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Jul 20 17:37:24 2025 +0200 Fix ambiguity between system includes and Hamlib includes diff --git a/amplifiers/elecraft/kpa.h b/amplifiers/elecraft/kpa.h index 651c5050c..b0edd10ee 100644 --- a/amplifiers/elecraft/kpa.h +++ b/amplifiers/elecraft/kpa.h @@ -26,7 +26,7 @@ #ifndef _AMP_ELECRAFT_H #define _AMP_ELECRAFT_H 1 -#include <hamlib/amplifier.h> +#include "hamlib/amplifier.h" // Is this big enough? #define KPABUFSZ 100 diff --git a/amplifiers/expert/expert.h b/amplifiers/expert/expert.h index 28ed215ab..ab212e77e 100644 --- a/amplifiers/expert/expert.h +++ b/amplifiers/expert/expert.h @@ -26,8 +26,8 @@ #ifndef _AMP_EXPERT_H #define _AMP_EXPERT_H 1 -#include <hamlib/amplifier.h> -#include <iofunc.h> +#include "hamlib/amplifier.h" +#include "iofunc.h" // Is this big enough? #define KPABUFSZ 100 diff --git a/amplifiers/gemini/gemini.h b/amplifiers/gemini/gemini.h index a52dc2d02..b4003ded7 100644 --- a/amplifiers/gemini/gemini.h +++ b/amplifiers/gemini/gemini.h @@ -26,8 +26,8 @@ #ifndef _AMP_GEMINI_H #define _AMP_GEMINI_H 1 -#include <hamlib/amplifier.h> -#include <iofunc.h> +#include "hamlib/amplifier.h" +#include "iofunc.h" // Is this big enough? #define GEMINIBUFSZ 1024 diff --git a/android/ltdl.c b/android/ltdl.c index be24c0aab..21261889a 100644 --- a/android/ltdl.c +++ b/android/ltdl.c @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include <hamlib/config.h> +#include "hamlib/config.h" #include <ltdl.h> #include <dlfcn.h> #include <stdio.h> diff --git a/extra/gnuradio/gnuradio.h b/extra/gnuradio/gnuradio.h index 3a61d3197..57262ed75 100644 --- a/extra/gnuradio/gnuradio.h +++ b/extra/gnuradio/gnuradio.h @@ -22,7 +22,7 @@ #ifndef _GNURADIO_H #define _GNURADIO_H 1 -#include <hamlib/rig.h> +#include "hamlib/rig.h" __BEGIN_DECLS diff --git a/extra/gnuradio/gr.c b/extra/gnuradio/gr.c index 3e73c87ae..f90e0acc6 100644 --- a/extra/gnuradio/gr.c +++ b/extra/gnuradio/gr.c @@ -22,7 +22,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "gnuradio.h" diff --git a/extra/gnuradio/graudio.c b/extra/gnuradio/graudio.c index 5cbf75d43..dea9778be 100644 --- a/extra/gnuradio/graudio.c +++ b/extra/gnuradio/graudio.c @@ -22,7 +22,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "gnuradio.h" diff --git a/extra/gnuradio/mc4020.c b/extra/gnuradio/mc4020.c index eee1e3d61..bb938fc5b 100644 --- a/extra/gnuradio/mc4020.c +++ b/extra/gnuradio/mc4020.c @@ -22,7 +22,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "gnuradio.h" diff --git a/include/bandplan.h b/include/bandplan.h index aa28b6263..08255559e 100644 --- a/include/bandplan.h +++ b/include/bandplan.h @@ -22,7 +22,7 @@ #ifndef _BANDPLAN_H #define _BANDPLAN_H 1 -#include <hamlib/rig.h> +#include "hamlib/rig.h" /* * This header file is internal to Hamlib and its backends, diff --git a/include/hamlib/ampclass.h b/include/hamlib/ampclass.h index 1bb5876b7..b605cbaef 100644 --- a/include/hamlib/ampclass.h +++ b/include/hamlib/ampclass.h @@ -22,7 +22,7 @@ #ifndef _AMPCLASS_H #define _AMPCLASS_H 1 -#include <hamlib/amplifier.h> +#include "hamlib/amplifier.h" diff --git a/include/hamlib/amplifier.h b/include/hamlib/amplifier.h index 847b2a53b..b17c7ff47 100644 --- a/include/hamlib/amplifier.h +++ b/include/hamlib/amplifier.h @@ -23,8 +23,8 @@ #ifndef _AMPLIFIER_H #define _AMPLIFIER_H 1 -#include <hamlib/rig.h> -#include <hamlib/amplist.h> +#include "hamlib/rig.h" +#include "hamlib/amplist.h" /** * \addtogroup amplifier @@ -271,7 +271,7 @@ struct amp_caps __END_DECLS -#include <hamlib/amp_state.h> +#include "hamlib/amp_state.h" __BEGIN_DECLS diff --git a/include/hamlib/multicast.h b/include/hamlib/multicast.h index 1bc18475f..01dbdc248 100644 --- a/include/hamlib/multicast.h +++ b/include/hamlib/multicast.h @@ -3,7 +3,7 @@ //#include <string.h> //#include <errno.h> //#include <unistd.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" //#include <sys/socket.h> #ifdef HAVE_NETINET_IN_H #include <netinet/in.h> diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 03ecb2656..c7a5234ba 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -70,8 +70,8 @@ #include <pthread.h> /* Rig list is in a separate file so as not to mess up w/ this one */ -#include <hamlib/riglist.h> -//#include <hamlib/config.h> +#include "hamlib/riglist.h" +//#include "hamlib/config.h" /** * \addtogroup rig @@ -122,7 +122,7 @@ #endif //! @endcond -#include <hamlib/rig_dll.h> +#include "hamlib/rig_dll.h" #ifndef SWIGLUA //! @cond Doxygen_Suppress @@ -2367,7 +2367,7 @@ typedef struct hamlib_async_pipe hamlib_async_pipe_t; #ifndef NO_OLD_INCLUDES __END_DECLS -#include <hamlib/port.h> +#include "hamlib/port.h" __BEGIN_DECLS #endif @@ -2536,7 +2536,7 @@ struct rig_cache_deprecated { * \brief Multicast data items the are unique per rig instantiation * This is meant for internal Hamlib use only */ -#include <hamlib/multicast.h> +#include "hamlib/multicast.h" struct multicast_s { int multicast_running; @@ -2571,7 +2571,7 @@ typedef unsigned int rig_comm_status_t; __END_DECLS -#include <hamlib/rig_state.h> +#include "hamlib/rig_state.h" __BEGIN_DECLS diff --git a/include/hamlib/rigclass.h b/include/hamlib/rigclass.h index 23b4738fd..d4bea0d89 100644 --- a/include/hamlib/rigclass.h +++ b/include/hamlib/rigclass.h @@ -22,7 +22,7 @@ #ifndef _RIGCLASS_H #define _RIGCLASS_H 1 -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include <iostream> diff --git a/include/hamlib/rotator.h b/include/hamlib/rotator.h index ab79f5260..5a3a618cb 100644 --- a/include/hamlib/rotator.h +++ b/include/hamlib/rotator.h @@ -23,8 +23,8 @@ #ifndef _ROTATOR_H #define _ROTATOR_H 1 -#include <hamlib/rig.h> -#include <hamlib/rotlist.h> +#include "hamlib/rig.h" +#include "hamlib/rotlist.h" /** * \addtogroup rotator @@ -587,7 +587,7 @@ struct rot_caps { __END_DECLS -#include <hamlib/rot_state.h> +#include "hamlib/rot_state.h" __BEGIN_DECLS diff --git a/include/hamlib/rotclass.h b/include/hamlib/rotclass.h index 219e3a92f..06ccf3ea4 100644 --- a/include/hamlib/rotclass.h +++ b/include/hamlib/rotclass.h @@ -22,7 +22,7 @@ #ifndef _ROTCLASS_H #define _ROTCLASS_H 1 -#include <hamlib/rotator.h> +#include "hamlib/rotator.h" diff --git a/lib/asyncpipe.c b/lib/asyncpipe.c index bca2e936e..8bdc315f4 100644 --- a/lib/asyncpipe.c +++ b/lib/asyncpipe.c @@ -1,4 +1,4 @@ -#include <hamlib/config.h> +#include "hamlib/config.h" #include "asyncpipe.h" diff --git a/lib/asyncpipe.h b/lib/asyncpipe.h index 5919ef750..c589a7214 100644 --- a/lib/asyncpipe.h +++ b/lib/asyncpipe.h @@ -5,7 +5,7 @@ #if defined(WIN32) && defined(HAVE_WINDOWS_H) -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include <windows.h> #define PIPE_BUFFER_SIZE_DEFAULT 65536 diff --git a/lib/getaddrinfo.c b/lib/getaddrinfo.c index 723ced002..e2d031089 100644 --- a/lib/getaddrinfo.c +++ b/lib/getaddrinfo.c @@ -22,7 +22,7 @@ /* Forcing WINVER in MinGW yanks in getaddrinfo(), but locks out Win95/Win98 */ /* #define WINVER 0x0501 */ -#include <hamlib/config.h> +#include "hamlib/config.h" #include <stdlib.h> #include <stdio.h> /* Standard input/output definitions */ diff --git a/lib/getopt.c b/lib/getopt.c index 28adf28bd..b5e2da414 100644 --- a/lib/getopt.c +++ b/lib/getopt.c @@ -22,7 +22,7 @@ */ /* NOTE!!! AIX requires this to be the first thing in the file. Do not put ANYTHING before it! */ -#include <hamlib/config.h> +#include "hamlib/config.h" #if !__STDC__ && !defined(const) && IN_GCC #define const diff --git a/lib/getopt_long.c b/lib/getopt_long.c index 064e189cf..b07fe520c 100644 --- a/lib/getopt_long.c +++ b/lib/getopt_long.c @@ -17,7 +17,7 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include <hamlib/config.h> +#include "hamlib/config.h" #include "getopt.h" diff --git a/lib/gettimeofday.c b/lib/gettimeofday.c index 0d2fad152..098d450f1 100644 --- a/lib/gettimeofday.c +++ b/lib/gettimeofday.c @@ -1,5 +1,5 @@ -#include <hamlib/config.h> +#include "hamlib/config.h" #ifdef HAVE_WINDOWS_H #include <windows.h> diff --git a/lib/termios.c b/lib/termios.c index 2a4e64374..2937bff79 100644 --- a/lib/termios.c +++ b/lib/termios.c @@ -1,5 +1,5 @@ -#include <hamlib/rig.h> -#include <hamlib/config.h> +#include "hamlib/rig.h" +#include "hamlib/config.h" #include "misc.h" #if defined(WIN32) && !defined(HAVE_TERMIOS_H) diff --git a/lib/usleep.c b/lib/usleep.c index 70ad2d3f8..6feba7be4 100644 --- a/lib/usleep.c +++ b/lib/usleep.c @@ -16,7 +16,7 @@ This file is part of the GNU C Library. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include <hamlib/config.h> +#include "hamlib/config.h" #ifndef HAVE_USLEEP diff --git a/rigs/adat/adat.c b/rigs/adat/adat.c index fccda1946..ee081f145 100644 --- a/rigs/adat/adat.c +++ b/rigs/adat/adat.c @@ -34,7 +34,7 @@ // HAMLIB INCLUDES // --------------------------------------------------------------------------- -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "serial.h" #include "misc.h" #include "register.h" diff --git a/rigs/adat/adat.h b/rigs/adat/adat.h index 35c8b73e1..61c5a52a8 100644 --- a/rigs/adat/adat.h +++ b/rigs/adat/adat.h @@ -35,7 +35,7 @@ // HAMLIB INCLUDES // --------------------------------------------------------------------------- -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "token.h" // --------------------------------------------------------------------------- diff --git a/rigs/alinco/alinco.c b/rigs/alinco/alinco.c index 6cedc1603..2125d45a3 100644 --- a/rigs/alinco/alinco.c +++ b/rigs/alinco/alinco.c @@ -19,8 +19,8 @@ * */ -#include <hamlib/rig.h> -#include <register.h> +#include "hamlib/rig.h" +#include "register.h" #include "alinco.h" diff --git a/rigs/alinco/alinco.h b/rigs/alinco/alinco.h index 42294e51e..b78fac1d4 100644 --- a/rigs/alinco/alinco.h +++ b/rigs/alinco/alinco.h @@ -22,7 +22,7 @@ #ifndef _ALINCO_H #define _ALINCO_H 1 -#include <hamlib/rig.h> +#include "hamlib/rig.h" #define BACKEND_VER "20200323" diff --git a/rigs/alinco/dx77.c b/rigs/alinco/dx77.c index 80373915e..8cb24db9b 100644 --- a/rigs/alinco/dx77.c +++ b/rigs/alinco/dx77.c @@ -24,12 +24,12 @@ #include <stdlib.h> #include <string.h> /* String function definitions */ -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "idx_builtin.h" #include "alinco.h" #include "iofunc.h" #include "tones.h" -#include <misc.h> +#include "misc.h" /* * modes in use by the "2G" command diff --git a/rigs/alinco/dxsr8.c b/rigs/alinco/dxsr8.c index c639d9720..cadb23dfb 100644 --- a/rigs/alinco/dxsr8.c +++ b/rigs/alinco/dxsr8.c @@ -23,10 +23,10 @@ #include <stdlib.h> #include <string.h> /* String function definitions */ -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "tones.h" -#include <misc.h> -#include <iofunc.h> +#include "misc.h" +#include "iofunc.h" #include <num_stdio.h> #include "idx_builtin.h" #include "alinco.h" diff --git a/rigs/anytone/anytone.c b/rigs/anytone/anytone.c index 500d8f3da..24b94282b 100644 --- a/rigs/anytone/anytone.c +++ b/rigs/anytone/anytone.c @@ -35,7 +35,7 @@ // --------------------------------------------------------------------------- #include "config.h" -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "serial.h" #include "misc.h" #include "register.h" diff --git a/rigs/aor/aor.h b/rigs/aor/aor.h index 9b0da4c31..59970cb85 100644 --- a/rigs/aor/aor.h +++ b/rigs/aor/aor.h @@ -22,7 +22,7 @@ #ifndef _AOR_H #define _AOR_H 1 -#include <hamlib/rig.h> +#include "hamlib/rig.h" #define BACKEND_VER "20220630" diff --git a/rigs/aor/ar2700.c b/rigs/aor/ar2700.c index 0245dd07b..7e0a2b158 100644 --- a/rigs/aor/ar2700.c +++ b/rigs/aor/ar2700.c @@ -22,7 +22,7 @@ #include <stdlib.h> #include <string.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "aor.h" diff --git a/rigs/aor/ar3000.c b/rigs/aor/ar3000.c index 1ffdcc9b0..cd067642b 100644 --- a/rigs/aor/ar3000.c +++ b/rigs/aor/ar3000.c @@ -22,7 +22,7 @@ #include <stdio.h> #include <string.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "iofunc.h" static int ar3k_set_freq(RIG *rig, vfo_t vfo, freq_t freq); diff --git a/rigs/aor/ar5000.c b/rigs/aor/ar5000.c index 95c9b313e..ccee0e476 100644 --- a/rigs/aor/ar5000.c +++ b/rigs/aor/ar5000.c @@ -22,7 +22,7 @@ #include <stdio.h> #include <string.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "aor.h" diff --git a/rigs/aor/ar7030.c b/rigs/aor/ar7030.c index a131ce2f2..e5a4fafed 100644 --- a/rigs/aor/ar7030.c +++ b/rigs/aor/ar7030.c @@ -26,7 +26,7 @@ #include <stdio.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "iofunc.h" #include "idx_builtin.h" diff --git a/rigs/aor/ar7030p_utils.c b/rigs/aor/ar7030p_utils.c index deac9ef13..d63504ede 100644 --- a/rigs/aor/ar7030p_utils.c +++ b/rigs/aor/ar7030p_utils.c @@ -28,7 +28,7 @@ #include <math.h> #include <assert.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "ar7030p.h" #include "iofunc.h" diff --git a/rigs/aor/ar8000.c b/rigs/aor/ar8000.c index 4cc825231..e1e483022 100644 --- a/rigs/aor/ar8000.c +++ b/rigs/aor/ar8000.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "aor.h" diff --git a/rigs/aor/ar8200.c b/rigs/aor/ar8200.c index 17832f15e..18e4cda19 100644 --- a/rigs/aor/ar8200.c +++ b/rigs/aor/ar8200.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "aor.h" diff --git a/rigs/aor/ar8600.c b/rigs/aor/ar8600.c index 20b2a018f..1c05bbc05 100644 --- a/rigs/aor/ar8600.c +++ b/rigs/aor/ar8600.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "aor.h" diff --git a/rigs/aor/sr2200.c b/rigs/aor/sr2200.c index 67efe1f0f..79cc47bf0 100644 --- a/rigs/aor/sr2200.c +++ b/rigs/aor/sr2200.c @@ -23,7 +23,7 @@ #include <stdio.h> #include <string.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "iofunc.h" #include "aor.h" diff --git a/rigs/barrett/4050.c b/rigs/barrett/4050.c index a6664a16e..d46b0819f 100644 --- a/rigs/barrett/4050.c +++ b/rigs/barrett/4050.c @@ -21,7 +21,7 @@ #include <stdio.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "misc.h" #include "barrett.h" diff --git a/rigs/barrett/4100.c b/rigs/barrett/4100.c index 02842e819..b401bbe64 100644 --- a/rigs/barrett/4100.c +++ b/rigs/barrett/4100.c @@ -22,7 +22,7 @@ #include <stdio.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "misc.h" #include "barrett.h" diff --git a/rigs/barrett/950.c b/rigs/barrett/950.c index 8ac8fc769..73525fe78 100644 --- a/rigs/barrett/950.c +++ b/rigs/barrett/950.c @@ -22,7 +22,7 @@ #include <stdio.h> #include <string.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "barrett.h" diff --git a/rigs/barrett/barrett.c b/rigs/barrett/barrett.c index 6d8bc2048..a8ac96c64 100644 --- a/rigs/barrett/barrett.c +++ b/rigs/barrett/barrett.c @@ -23,7 +23,7 @@ #include <stdlib.h> #include <string.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "iofunc.h" #include "misc.h" #include "register.h" diff --git a/rigs/codan/codan.c b/rigs/codan/codan.c index 3c68202b3..4151a9d41 100644 --- a/rigs/codan/codan.c +++ b/rigs/codan/codan.c @@ -23,7 +23,7 @@ #include <stdlib.h> #include <string.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "iofunc.h" #include "misc.h" #include "register.h" diff --git a/rigs/commradio/commradio.c b/rigs/commradio/commradio.c index d0296b4f2..c14c20fb8 100644 --- a/rigs/commradio/commradio.c +++ b/rigs/commradio/commradio.c @@ -6,8 +6,8 @@ #include <stdint.h> #include <stdlib.h> -#include <hamlib/rig.h> -#include <register.h> +#include "hamlib/rig.h" +#include "register.h" #include "iofunc.h" #include "misc.h" diff --git a/rigs/commradio/frame.c b/rigs/commradio/frame.c index 2ed8e2730..c7c9b9bd5 100644 --- a/rigs/commradio/frame.c +++ b/rigs/commradio/frame.c @@ -5,7 +5,7 @@ #include <stdint.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "frame.h" diff --git a/rigs/drake/drake.h b/rigs/drake/drake.h index 2645c182b..fbd41aa5f 100644 --- a/rigs/drake/drake.h +++ b/rigs/drake/drake.h @@ -22,7 +22,7 @@ #ifndef _DRAKE_H #define _DRAKE_H 1 -#include <hamlib/rig.h> +#include "hamlib/rig.h" #define BACKEND_VER "20200319" diff --git a/rigs/drake/r8.c b/rigs/drake/r8.c index 80cd81acd..ebd53d95c 100644 --- a/rigs/drake/r8.c +++ b/rigs/drake/r8.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "idx_builtin.h" #include "drake.h" diff --git a/rigs/drake/r8a.c b/rigs/drake/r8a.c index 87475a968..7896628ad 100644 --- a/rigs/drake/r8a.c +++ b/rigs/drake/r8a.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "drake.h" diff --git a/rigs/drake/r8b.c b/rigs/drake/r8b.c index a11a72bc3..4a51acd0a 100644 --- a/rigs/drake/r8b.c +++ b/rigs/drake/r8b.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "drake.h" diff --git a/rigs/dummy/aclog.c b/rigs/dummy/aclog.c index e1483f4c7..ea0f09837 100644 --- a/rigs/dummy/aclog.c +++ b/rigs/dummy/aclog.c @@ -24,9 +24,9 @@ #include <stdlib.h> #include <string.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "iofunc.h" -#include <misc.h> +#include "misc.h" #define DEBUG 1 #define DEBUG_TRACE DEBUG_VERBOSE diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index 4595c1307..4f91f322a 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -25,10 +25,10 @@ #include <string.h> /* String function definitions */ #include <math.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "iofunc.h" -#include <misc.h> -#include <token.h> +#include "misc.h" +#include "token.h" #include "dummy_common.h" #include "flrig.h" diff --git a/rigs/dummy/sdrsharp.c b/rigs/dummy/sdrsharp.c index 3e3641d83..19c6057de 100644 --- a/rigs/dummy/sdrsharp.c +++ b/rigs/dummy/sdrsharp.c @@ -23,9 +23,9 @@ #include <stdlib.h> #include <string.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "iofunc.h" -#include <misc.h> +#include "misc.h" #define DEBUG 1 #define DEBUG_TRACE DEBUG_VERBOSE diff --git a/rigs/dummy/tci1x.c b/rigs/dummy/tci1x.c index 7eace7ebb..692893965 100644 --- a/rigs/dummy/tci1x.c +++ b/rigs/dummy/tci1x.c @@ -23,10 +23,10 @@ #include <stdlib.h> #include <string.h> /* String function definitions */ -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "iofunc.h" -#include <misc.h> -#include <token.h> +#include "misc.h" +#include "token.h" #include "dummy_common.h" diff --git a/rigs/dummy/trxmanager.c b/rigs/dummy/trxmanager.c index 78cc9eb11..c43d8f949 100644 --- a/rigs/dummy/trxmanager.c +++ b/rigs/dummy/trxmanager.c @@ -24,7 +24,7 @@ #include <stdlib.h> #include <string.h> /* String function definitions */ -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "iofunc.h" #include "trxmanager.h" diff --git a/rigs/elad/fdm_duo.c b/rigs/elad/fdm_duo.c index bb077b994..8bf87bc85 100644 --- a/rigs/elad/fdm_duo.c +++ b/rigs/elad/fdm_duo.c @@ -23,7 +23,7 @@ #include <stdio.h> #include <string.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "elad.h" #define FDM_DUO_ALL_MODES (RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_CWR|RIG_MODE_SSB|RIG_MODE_FM|RIG_MODE_RTTY|RIG_MODE_RTTYR) diff --git a/rigs/guohetec/guohetec.c b/rigs/guohetec/guohetec.c index 7df6cc346..e0dee48ff 100644 --- a/rigs/guohetec/guohetec.c +++ b/rigs/guohetec/guohetec.c @@ -20,7 +20,7 @@ */ #include <string.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "iofunc.h" #include "register.h" #include "riglist.h" diff --git a/rigs/guohetec/guohetec.h b/rigs/guohetec/guohetec.h index ca6c4b777..e19f67cbd 100644 --- a/rigs/guohetec/guohetec.h +++ b/rigs/guohetec/guohetec.h @@ -23,7 +23,7 @@ #ifndef _guohetec_H_ #define _guohetec_H_ -#include <hamlib/rig.h> +#include "hamlib/rig.h" #define PMR171_CMD_LENGTH 8 #define PMR171_REPLY_LENGTH 24 diff --git a/rigs/icmarine/icm710.c b/rigs/icmarine/icm710.c index 80a5d868d..72be82967 100644 --- a/rigs/icmarine/icm710.c +++ b/rigs/icmarine/icm710.c @@ -23,9 +23,9 @@ #include <stdlib.h> #include <string.h> -#include <hamlib/rig.h> -#include <token.h> -#include <register.h> +#include "hamlib/rig.h" +#include "token.h" +#include "register.h" #include "idx_builtin.h" diff --git a/rigs/icmarine/icmarine.c b/rigs/icmarine/icmarine.c index 4511a8e59..82348342f 100644 --- a/rigs/icmarine/icmarine.c +++ b/rigs/icmarine/icmarine.c @@ -23,10 +23,10 @@ #include <stdlib.h> #include <string.h> /* String function definitions */ -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "iofunc.h" -#include <token.h> -#include <register.h> +#include "token.h" +#include "register.h" #include "icmarine.h" diff --git a/rigs/icom/delta2.c b/rigs/icom/delta2.c index e39f5017f..744b7515d 100644 --- a/rigs/icom/delta2.c +++ b/rigs/icom/delta2.c @@ -31,7 +31,7 @@ * To Do: get the datasheet, and testing on real hardware!! */ -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "icom.h" #define DELTAII_VFO_ALL (RIG_VFO_A|RIG_VFO_B|RIG_VFO_MEM) diff --git a/rigs/icom/frame.c b/rigs/icom/frame.c index 56df8e136..a3f9cf506 100644 --- a/rigs/icom/frame.c +++ b/rigs/icom/frame.c @@ -19,7 +19,7 @@ * */ -#include <hamlib/config.h> +#include "hamlib/config.h" #include <string.h> /* String function definitions */ diff --git a/rigs/icom/ic7000.c b/rigs/icom/ic7000.c index 3548290ae..f052881b3 100644 --- a/rigs/icom/ic7000.c +++ b/rigs/icom/ic7000.c @@ -22,7 +22,7 @@ #include <string.h> /* String function definitions */ -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "idx_builtin.h" #include "icom.h" diff --git a/rigs/icom/ic7100.c b/rigs/icom/ic7100.c index 9f500ddcc..a9c45016c 100644 --- a/rigs/icom/ic7100.c +++ b/rigs/icom/ic7100.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "icom.h" #include "icom_defs.h" #include "frame.h" diff --git a/rigs/icom/ic7200.c b/rigs/icom/ic7200.c index 0d413de58..9124f35ed 100644 --- a/rigs/icom/ic7200.c +++ b/rigs/icom/ic7200.c @@ -26,7 +26,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "idx_builtin.h" #include "icom.h" diff --git a/rigs/icom/ic7300.c b/rigs/icom/ic7300.c index c80297654..559f70170 100644 --- a/rigs/icom/ic7300.c +++ b/rigs/icom/ic7300.c @@ -22,7 +22,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "idx_builtin.h" #include "token.h" diff --git a/rigs/icom/ic735.c b/rigs/icom/ic735.c index 9b6cf3952..4b27c1e2c 100644 --- a/rigs/icom/ic735.c +++ b/rigs/icom/ic735.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "icom.h" #include "bandplan.h" diff --git a/rigs/icom/ic736.c b/rigs/icom/ic736.c index 48e4817f4..6d41adac1 100644 --- a/rigs/icom/ic736.c +++ b/rigs/icom/ic736.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include <bandplan.h> #include "icom.h" diff --git a/rigs/icom/ic737.c b/rigs/icom/ic737.c index c7f3b3f23..e74be76e5 100644 --- a/rigs/icom/ic737.c +++ b/rigs/icom/ic737.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include <bandplan.h> #include "icom.h" diff --git a/rigs/icom/ic738.c b/rigs/icom/ic738.c index c71fab5d1..0d3480c10 100644 --- a/rigs/icom/ic738.c +++ b/rigs/icom/ic738.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include <bandplan.h> #include "icom.h" diff --git a/rigs/icom/ic7410.c b/rigs/icom/ic7410.c index 94723ed69..a20715b71 100644 --- a/rigs/icom/ic7410.c +++ b/rigs/icom/ic7410.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "idx_builtin.h" #include "icom.h" diff --git a/rigs/icom/ic746.c b/rigs/icom/ic746.c index 6781f9cf4..53adfc32f 100644 --- a/rigs/icom/ic746.c +++ b/rigs/icom/ic746.c @@ -22,7 +22,7 @@ #include <stdlib.h> #include <string.h> /* String function definitions */ -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "idx_builtin.h" #include "icom.h" diff --git a/rigs/icom/ic756.c b/rigs/icom/ic756.c index 45aca0a2e..bbf870866 100644 --- a/rigs/icom/ic756.c +++ b/rigs/icom/ic756.c @@ -21,7 +21,7 @@ #include <string.h> /* String function definitions */ -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "idx_builtin.h" #include "icom.h" diff --git a/rigs/icom/ic7600.c b/rigs/icom/ic7600.c index 2397d769d..b01c8c53e 100644 --- a/rigs/icom/ic7600.c +++ b/rigs/icom/ic7600.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "token.h" #include "idx_builtin.h" diff --git a/rigs/icom/ic7610.c b/rigs/icom/ic7610.c index a5de29ed8..9f6e322fb 100644 --- a/rigs/icom/ic7610.c +++ b/rigs/icom/ic7610.c @@ -22,7 +22,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "token.h" #include "tones.h" #include "idx_builtin.h" diff --git a/rigs/icom/ic7700.c b/rigs/icom/ic7700.c index e9290b7cc..095634f76 100644 --- a/rigs/icom/ic7700.c +++ b/rigs/icom/ic7700.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "token.h" #include "tones.h" #include "idx_builtin.h" diff --git a/rigs/icom/ic775.c b/rigs/icom/ic775.c index 7e7d19d79..07861ae7c 100644 --- a/rigs/icom/ic775.c +++ b/rigs/icom/ic775.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "icom.h" #include "bandplan.h" diff --git a/rigs/icom/ic7760.c b/rigs/icom/ic7760.c index 304bc3ece..c57385517 100644 --- a/rigs/icom/ic7760.c +++ b/rigs/icom/ic7760.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "token.h" #include "tones.h" #include "idx_builtin.h" diff --git a/rigs/icom/ic7800.c b/rigs/icom/ic7800.c index 0d6c95e6a..de2481836 100644 --- a/rigs/icom/ic7800.c +++ b/rigs/icom/ic7800.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "frame.h" #include "misc.h" diff --git a/rigs/icom/ic785x.c b/rigs/icom/ic785x.c index f0094809d..b9512b1d5 100644 --- a/rigs/icom/ic785x.c +++ b/rigs/icom/ic785x.c @@ -22,7 +22,7 @@ #include <string.h> /* String function definitions */ -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "token.h" #include "tones.h" #include "idx_builtin.h" diff --git a/rigs/icom/ic820h.c b/rigs/icom/ic820h.c index 9d4eb8d65..24bc2bec7 100644 --- a/rigs/icom/ic820h.c +++ b/rigs/icom/ic820h.c @@ -22,7 +22,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "icom.h" diff --git a/rigs/icom/ic821h.c b/rigs/icom/ic821h.c index b8692d2d7..62cdfee2e 100644 --- a/rigs/icom/ic821h.c +++ b/rigs/icom/ic821h.c @@ -22,7 +22,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "icom.h" #include "misc.h" #include "cache.h" diff --git a/rigs/icom/ic910.c b/rigs/icom/ic910.c index de2d031f0..a1738bdad 100644 --- a/rigs/icom/ic910.c +++ b/rigs/icom/ic910.c @@ -23,7 +23,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "icom.h" #include "icom_defs.h" #include "frame.h" diff --git a/rigs/icom/ic9100.c b/rigs/icom/ic9100.c index 65c2a3dcd..970512d2f 100644 --- a/rigs/icom/ic9100.c +++ b/rigs/icom/ic9100.c @@ -19,7 +19,7 @@ * */ -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "icom.h" #include "icom_defs.h" #include "idx_builtin.h" diff --git a/rigs/icom/ic970.c b/rigs/icom/ic970.c index cb96e0e5b..57ed988b4 100644 --- a/rigs/icom/ic970.c +++ b/rigs/icom/ic970.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "icom.h" diff --git a/rigs/icom/icf8101.c b/rigs/icom/icf8101.c index 127b30df2..ade718c67 100644 --- a/rigs/icom/icf8101.c +++ b/rigs/icom/icf8101.c @@ -22,7 +22,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "misc.h" #include "icom.h" #include "icom_defs.h" diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index f80d65657..346dca79e 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -28,11 +28,11 @@ // cppcheck-suppress * #include <math.h> -#include <hamlib/rig.h> -#include <serial.h> +#include "hamlib/rig.h" +#include "serial.h" #include <cal.h> -#include <token.h> -#include <register.h> +#include "token.h" +#include "register.h" #include "icom.h" #include "icom_defs.h" diff --git a/rigs/icom/icom.h b/rigs/icom/icom.h index 1ceedec12..d6c9227aa 100644 --- a/rigs/icom/icom.h +++ b/rigs/icom/icom.h @@ -24,7 +24,7 @@ #include <stddef.h> -#include <hamlib/config.h> +#include "hamlib/config.h" #include "hamlib/rig.h" #include "cal.h" diff --git a/rigs/icom/icr7000.c b/rigs/icom/icr7000.c index 768054cca..e8144d77d 100644 --- a/rigs/icom/icr7000.c +++ b/rigs/icom/icr7000.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "idx_builtin.h" #include "icom.h" diff --git a/rigs/icom/icr9000.c b/rigs/icom/icr9000.c index 9767cebd9..b49fef5aa 100644 --- a/rigs/icom/icr9000.c +++ b/rigs/icom/icr9000.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "idx_builtin.h" #include "icom.h" diff --git a/rigs/icom/icr9500.c b/rigs/icom/icr9500.c index e8bb4977b..c5eef8a33 100644 --- a/rigs/icom/icr9500.c +++ b/rigs/icom/icr9500.c @@ -19,7 +19,7 @@ * */ -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "idx_builtin.h" #include "icom.h" diff --git a/rigs/icom/omni.c b/rigs/icom/omni.c index 60029e0b7..8324f03aa 100644 --- a/rigs/icom/omni.c +++ b/rigs/icom/omni.c @@ -32,11 +32,11 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "icom.h" #include "icom_defs.h" #include "frame.h" -#include <misc.h> +#include "misc.h" #define OMNIVIP_VFO_ALL (RIG_VFO_A|RIG_VFO_B|RIG_VFO_MEM) diff --git a/rigs/icom/optoscan.c b/rigs/icom/optoscan.c index 117632e88..4c24947c9 100644 --- a/rigs/icom/optoscan.c +++ b/rigs/icom/optoscan.c @@ -19,7 +19,7 @@ * */ -#include <hamlib/config.h> +#include "hamlib/config.h" #ifdef HAVE_SYS_TIME_H #include <sys/time.h> diff --git a/rigs/icom/optoscan.h b/rigs/icom/optoscan.h index c993e7ef8..512cc789f 100644 --- a/rigs/icom/optoscan.h +++ b/rigs/icom/optoscan.h @@ -22,7 +22,7 @@ #ifndef _OPTOSCAN_H #define _OPTOSCAN_H 1 -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "icom_defs.h" diff --git a/rigs/icom/os456.c b/rigs/icom/os456.c index cc9dc4aaf..6fb24b49f 100644 --- a/rigs/icom/os456.c +++ b/rigs/icom/os456.c @@ -26,7 +26,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "idx_builtin.h" #include "icom.h" #include "tones.h" diff --git a/rigs/icom/os535.c b/rigs/icom/os535.c index 26575c4d8..2c453d047 100644 --- a/rigs/icom/os535.c +++ b/rigs/icom/os535.c @@ -26,7 +26,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "idx_builtin.h" #include "icom.h" #include "tones.h" diff --git a/rigs/icom/perseus.c b/rigs/icom/perseus.c index 06aa1adaf..63ff0664d 100644 --- a/rigs/icom/perseus.c +++ b/rigs/icom/perseus.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "icom.h" #include "frame.h" diff --git a/rigs/icom/xiegu.c b/rigs/icom/xiegu.c index 7773cc6b7..b31920bbd 100644 --- a/rigs/icom/xiegu.c +++ b/rigs/icom/xiegu.c @@ -31,7 +31,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "idx_builtin.h" #include "icom.h" diff --git a/rigs/jrc/jrc.h b/rigs/jrc/jrc.h index e494a3499..e91b355d5 100644 --- a/rigs/jrc/jrc.h +++ b/rigs/jrc/jrc.h @@ -22,7 +22,7 @@ #ifndef _JRC_H #define _JRC_H 1 -#include <hamlib/rig.h> +#include "hamlib/rig.h" #define BACKEND_VER "20200320" diff --git a/rigs/jrc/nrd535.c b/rigs/jrc/nrd535.c index b56bc8f4f..6f75b1716 100644 --- a/rigs/jrc/nrd535.c +++ b/rigs/jrc/nrd535.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "idx_builtin.h" #include "jrc.h" diff --git a/rigs/jrc/nrd545.c b/rigs/jrc/nrd545.c index d463bfc5a..ec50a6748 100644 --- a/rigs/jrc/nrd545.c +++ b/rigs/jrc/nrd545.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "idx_builtin.h" #include "jrc.h" diff --git a/rigs/kachina/505dsp.c b/rigs/kachina/505dsp.c index 73a209189..1f103f170 100644 --- a/rigs/kachina/505dsp.c +++ b/rigs/kachina/505dsp.c @@ -21,9 +21,9 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "kachina.h" -#include <tones.h> +#include "tones.h" #define K505DSP_ALL_MODES (RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_SSB|RIG_MODE_FM) #define K505DSP_OTHER_TX_MODES (RIG_MODE_CW|RIG_MODE_SSB|RIG_MODE_FM) diff --git a/rigs/kachina/kachina.h b/rigs/kachina/kachina.h index cce933baf..8553d2341 100644 --- a/rigs/kachina/kachina.h +++ b/rigs/kachina/kachina.h @@ -22,7 +22,7 @@ #ifndef _KACHINA_H #define _KACHINA_H 1 -#include <hamlib/rig.h> +#include "hamlib/rig.h" #define BACKEND_VER "20240420" diff --git a/rigs/kenwood/elecraft.h b/rigs/kenwood/elecraft.h index 4d20b64e4..e6f64fa4a 100644 --- a/rigs/kenwood/elecraft.h +++ b/rigs/kenwood/elecraft.h @@ -22,7 +22,7 @@ #ifndef _ELECRAFT_H #define _ELECRAFT_H 1 -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "token.h" /* The Elecraft Programmer's Reference details the extension level that diff --git a/rigs/kenwood/flex.h b/rigs/kenwood/flex.h index 872ca29f7..a74751c33 100644 --- a/rigs/kenwood/flex.h +++ b/rigs/kenwood/flex.h @@ -23,7 +23,7 @@ #ifndef _FLEXRADIO_H #define _FLEXRADIO_H 1 -#include <hamlib/rig.h> +#include "hamlib/rig.h" #define EXT_LEVEL_NONE -1 #define FLEXRADIO_MAX_BUF_LEN 50 diff --git a/rigs/kenwood/flex6xxx.c b/rigs/kenwood/flex6xxx.c index ae13e96d7..f6d2f3f65 100644 --- a/rigs/kenwood/flex6xxx.c +++ b/rigs/kenwood/flex6xxx.c @@ -28,7 +28,7 @@ #include <stdio.h> #include <math.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "kenwood.h" #include "bandplan.h" #include "misc.h" diff --git a/rigs/kenwood/k2.c b/rigs/kenwood/k2.c index 904012efb..9eb6c9161 100644 --- a/rigs/kenwood/k2.c +++ b/rigs/kenwood/k2.c @@ -26,7 +26,7 @@ #include <stdlib.h> #include <string.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "kenwood.h" #include "elecraft.h" diff --git a/rigs/kenwood/k3.c b/rigs/kenwood/k3.c index f7bc05644..9ef8f03b4 100644 --- a/rigs/kenwood/k3.c +++ b/rigs/kenwood/k3.c @@ -28,7 +28,7 @@ #include <string.h> #include <math.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "idx_builtin.h" #include "kenwood.h" diff --git a/rigs/kenwood/pihpsdr.c b/rigs/kenwood/pihpsdr.c index 79dcb970a..1a52c9069 100644 --- a/rigs/kenwood/pihpsdr.c +++ b/rigs/kenwood/pihpsdr.c @@ -23,7 +23,7 @@ #include <stdlib.h> #include <string.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "kenwood.h" #include "tones.h" diff --git a/rigs/kenwood/r5000.c b/rigs/kenwood/r5000.c index 670ccd579..bdb416d2c 100644 --- a/rigs/kenwood/r5000.c +++ b/rigs/kenwood/r5000.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "kenwood.h" #include "ic10.h" diff --git a/rigs/kenwood/thd7.c b/rigs/kenwood/thd7.c index d8a60aeef..a221186ba 100644 --- a/rigs/kenwood/thd7.c +++ b/rigs/kenwood/thd7.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "kenwood.h" #include "th.h" diff --git a/rigs/kenwood/thf6a.c b/rigs/kenwood/thf6a.c index 0f2b80a6e..c9aa67d45 100644 --- a/rigs/kenwood/thf6a.c +++ b/rigs/kenwood/thf6a.c @@ -27,7 +27,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "tones.h" #include "kenwood.h" #include "th.h" diff --git a/rigs/kenwood/thf7.c b/rigs/kenwood/thf7.c index 68520cb39..2440e50a5 100644 --- a/rigs/kenwood/thf7.c +++ b/rigs/kenwood/thf7.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "tones.h" #include "kenwood.h" #include "th.h" diff --git a/rigs/kenwood/thg71.c b/rigs/kenwood/thg71.c index f25af0aab..73b7ba799 100644 --- a/rigs/kenwood/thg71.c +++ b/rigs/kenwood/thg71.c @@ -23,7 +23,7 @@ #include <stdio.h> #include <string.h> /* String function definitions */ -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "kenwood.h" #include "th.h" diff --git a/rigs/kenwood/tmv7.c b/rigs/kenwood/tmv7.c index 03309c181..76c456c71 100644 --- a/rigs/kenwood/tmv7.c +++ b/rigs/kenwood/tmv7.c @@ -23,7 +23,7 @@ #include <stdio.h> #include <string.h> /* String function definitions */ -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "kenwood.h" #include "th.h" #include "misc.h" diff --git a/rigs/kenwood/transfox.c b/rigs/kenwood/transfox.c index e7da235e7..f13a43149 100644 --- a/rigs/kenwood/transfox.c +++ b/rigs/kenwood/transfox.c @@ -23,7 +23,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "kenwood.h" diff --git a/rigs/kenwood/ts2000.c b/rigs/kenwood/ts2000.c index 5c25d3461..d18b9216b 100644 --- a/rigs/kenwood/ts2000.c +++ b/rigs/kenwood/ts2000.c @@ -24,7 +24,7 @@ #include <stdlib.h> #include <string.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "kenwood.h" #include "token.h" #include "misc.h" diff --git a/rigs/kenwood/ts440.c b/rigs/kenwood/ts440.c index 2bb78ba6d..f4fec1dc5 100644 --- a/rigs/kenwood/ts440.c +++ b/rigs/kenwood/ts440.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "kenwood.h" #include "ic10.h" diff --git a/rigs/kenwood/ts450s.c b/rigs/kenwood/ts450s.c index 51aba0836..009f79090 100644 --- a/rigs/kenwood/ts450s.c +++ b/rigs/kenwood/ts450s.c @@ -21,7 +21,7 @@ #include <stdio.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "kenwood.h" #include "bandplan.h" diff --git a/rigs/kenwood/ts480.c b/rigs/kenwood/ts480.c index 0361a6f51..e8e37ad1e 100644 --- a/rigs/kenwood/ts480.c +++ b/rigs/kenwood/ts480.c @@ -24,7 +24,7 @@ #include <stdlib.h> #include <string.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "cal.h" #include "idx_builtin.h" #include "iofunc.h" diff --git a/rigs/kenwood/ts50s.c b/rigs/kenwood/ts50s.c index 0107f0ce6..b6f215aba 100644 --- a/rigs/kenwood/ts50s.c +++ b/rigs/kenwood/ts50s.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "kenwood.h" diff --git a/rigs/kenwood/ts570.c b/rigs/kenwood/ts570.c index 0d6cf9c1e..a676c6cc1 100644 --- a/rigs/kenwood/ts570.c +++ b/rigs/kenwood/ts570.c @@ -25,7 +25,7 @@ #include <string.h> #include <math.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "kenwood.h" #define TS570_ALL_MODES (RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_SSB|RIG_MODE_FM|RIG_MODE_RTTY) diff --git a/rigs/kenwood/ts690.c b/rigs/kenwood/ts690.c index 26a130926..850eeca58 100644 --- a/rigs/kenwood/ts690.c +++ b/rigs/kenwood/ts690.c @@ -19,7 +19,7 @@ * */ -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "bandplan.h" #include "kenwood.h" diff --git a/rigs/kenwood/ts711.c b/rigs/kenwood/ts711.c index 422e5ff71..66d111c9d 100644 --- a/rigs/kenwood/ts711.c +++ b/rigs/kenwood/ts711.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "kenwood.h" diff --git a/rigs/kenwood/ts790.c b/rigs/kenwood/ts790.c index d70b8973e..d02e89216 100644 --- a/rigs/kenwood/ts790.c +++ b/rigs/kenwood/ts790.c @@ -19,7 +19,7 @@ * */ -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "kenwood.h" #define TS790_ALL_MODES (RIG_MODE_CW|RIG_MODE_CWR|RIG_MODE_SSB|RIG_MODE_FM) diff --git a/rigs/kenwood/ts811.c b/rigs/kenwood/ts811.c index bfcdb1b2f..a73853890 100644 --- a/rigs/kenwood/ts811.c +++ b/rigs/kenwood/ts811.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "kenwood.h" diff --git a/rigs/kenwood/ts850.c b/rigs/kenwood/ts850.c index 1afcdebd2..b09740fd6 100644 --- a/rigs/kenwood/ts850.c +++ b/rigs/kenwood/ts850.c @@ -23,7 +23,7 @@ #include <stdio.h> #include <math.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include <cal.h> #include "kenwood.h" diff --git a/rigs/kenwood/ts870s.c b/rigs/kenwood/ts870s.c index a2299e781..3c8b9b0b8 100644 --- a/rigs/kenwood/ts870s.c +++ b/rigs/kenwood/ts870s.c @@ -24,7 +24,7 @@ #include <stdio.h> #include <string.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "kenwood.h" #include "bandplan.h" diff --git a/rigs/kenwood/ts890s.c b/rigs/kenwood/ts890s.c index dfd40a2c0..b6316523e 100644 --- a/rigs/kenwood/ts890s.c +++ b/rigs/kenwood/ts890s.c @@ -23,7 +23,7 @@ #include <string.h> #include <math.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "kenwood.h" #include "cal.h" #include "misc.h" diff --git a/rigs/kenwood/ts930.c b/rigs/kenwood/ts930.c index 921093f64..6da6a1b8d 100644 --- a/rigs/kenwood/ts930.c +++ b/rigs/kenwood/ts930.c @@ -19,7 +19,7 @@ * */ -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include <bandplan.h> #include "kenwood.h" diff --git a/rigs/kenwood/ts940.c b/rigs/kenwood/ts940.c index c88a455f1..eada0406d 100644 --- a/rigs/kenwood/ts940.c +++ b/rigs/kenwood/ts940.c @@ -19,7 +19,7 @@ * */ -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "bandplan.h" #include "kenwood.h" diff --git a/rigs/kenwood/ts950.c b/rigs/kenwood/ts950.c index 8486c6f9f..cd7d68439 100644 --- a/rigs/kenwood/ts950.c +++ b/rigs/kenwood/ts950.c @@ -27,7 +27,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "kenwood.h" diff --git a/rigs/kenwood/ts990s.c b/rigs/kenwood/ts990s.c index e5794a2bb..e9da3e54a 100644 --- a/rigs/kenwood/ts990s.c +++ b/rigs/kenwood/ts990s.c @@ -24,7 +24,7 @@ #include <stdlib.h> #include <math.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "kenwood.h" #include "ts990s.h" #include "cal.h" diff --git a/rigs/kenwood/tx500.c b/rigs/kenwood/tx500.c index 958b2e288..cb3dc7450 100644 --- a/rigs/kenwood/tx500.c +++ b/rigs/kenwood/tx500.c @@ -24,7 +24,7 @@ #include <stdio.h> #include <string.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "kenwood.h" #define TX500_ALL_MODES (RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_SSB|RIG_MODE_FM|RIG_MODE_RTTY) diff --git a/rigs/kenwood/xg3.c b/rigs/kenwood/xg3.c index e1a952533..3dda6e91f 100644 --- a/rigs/kenwood/xg3.c +++ b/rigs/kenwood/xg3.c @@ -27,7 +27,7 @@ #include <stdlib.h> #include <string.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "iofunc.h" #include "kenwood.h" #include "elecraft.h" diff --git a/rigs/kit/dwt.c b/rigs/kit/dwt.c index 628f3b4ed..afbdb4274 100644 --- a/rigs/kit/dwt.c +++ b/rigs/kit/dwt.c @@ -19,7 +19,7 @@ * */ -#include <hamlib/config.h> +#include "hamlib/config.h" #include <stdio.h> #include "hamlib/rig.h" diff --git a/rigs/kit/elektor507.c b/rigs/kit/elektor507.c index 720e746ee..650326644 100644 --- a/rigs/kit/elektor507.c +++ b/rigs/kit/elektor507.c @@ -19,7 +19,7 @@ * */ -#include <hamlib/config.h> +#include "hamlib/config.h" #include <stdlib.h> #include <stdio.h> diff --git a/rigs/kit/fifisdr.c b/rigs/kit/fifisdr.c index dbf4d564d..14eb4da98 100644 --- a/rigs/kit/fifisdr.c +++ b/rigs/kit/fifisdr.c @@ -22,7 +22,7 @@ * */ -#include <hamlib/config.h> +#include "hamlib/config.h" #ifdef HAVE_STDINT_H #include <stdint.h> diff --git a/rigs/kit/funcube.c b/rigs/kit/funcube.c index 00f1a2866..6989d2b84 100644 --- a/rigs/kit/funcube.c +++ b/rigs/kit/funcube.c @@ -23,7 +23,7 @@ * */ -#include <hamlib/config.h> +#include "hamlib/config.h" #include <stdlib.h> #include <stdio.h> diff --git a/rigs/kit/kit.c b/rigs/kit/kit.c index 8d90127c7..2124c4962 100644 --- a/rigs/kit/kit.c +++ b/rigs/kit/kit.c @@ -19,7 +19,7 @@ * */ -#include <hamlib/config.h> +#include "hamlib/config.h" #include "hamlib/rig.h" #include "register.h" diff --git a/rigs/kit/si570avrusb.c b/rigs/kit/si570avrusb.c index 048a70147..926af28d2 100644 --- a/rigs/kit/si570avrusb.c +++ b/rigs/kit/si570avrusb.c @@ -22,7 +22,7 @@ * */ -#include <hamlib/config.h> +#include "hamlib/config.h" #define BACKEND_VER "20200112" diff --git a/rigs/kit/usrp.c b/rigs/kit/usrp.c index 7b05ad1f5..635357ee5 100644 --- a/rigs/kit/usrp.c +++ b/rigs/kit/usrp.c @@ -19,7 +19,7 @@ * */ -#include <hamlib/config.h> +#include "hamlib/config.h" /* * Compile only this model if usrp is available diff --git a/rigs/kit/usrp_impl.h b/rigs/kit/usrp_impl.h index ef427b13f..4e6d32fc9 100644 --- a/rigs/kit/usrp_impl.h +++ b/rigs/kit/usrp_impl.h @@ -22,8 +22,8 @@ #ifndef _USRP_IMPL_H #define _USRP_IMPL_H 1 -#include <hamlib/rig.h> -#include <token.h> +#include "hamlib/rig.h" +#include "token.h" __BEGIN_DECLS diff --git a/rigs/lowe/hf235.c b/rigs/lowe/hf235.c index 8b0a58b7f..f9f69a91e 100644 --- a/rigs/lowe/hf235.c +++ b/rigs/lowe/hf235.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "lowe.h" diff --git a/rigs/lowe/lowe.h b/rigs/lowe/lowe.h index e1e2f4973..f28c440e7 100644 --- a/rigs/lowe/lowe.h +++ b/rigs/lowe/lowe.h @@ -22,7 +22,7 @@ #ifndef _LOWE_H #define _LOWE_H 1 -#include <hamlib/rig.h> +#include "hamlib/rig.h" #define BACKEND_VER "20200112" diff --git a/rigs/mds/mds.c b/rigs/mds/mds.c index d50cf2e5c..f7a72fda7 100644 --- a/rigs/mds/mds.c +++ b/rigs/mds/mds.c @@ -23,7 +23,7 @@ #include <stdlib.h> #include <string.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "iofunc.h" #include "misc.h" #include "register.h" diff --git a/rigs/mds/mds.h b/rigs/mds/mds.h index 2274b97f8..16f36e262 100644 --- a/rigs/mds/mds.h +++ b/rigs/mds/mds.h @@ -1,4 +1,4 @@ -#include <hamlib/rig.h> +#include "hamlib/rig.h" #define MDS_DATA_LEN 256 #define MDS_RET_LEN 256 diff --git a/rigs/motorola/micom.c b/rigs/motorola/micom.c index 97e2f0660..1bfb0d68f 100644 --- a/rigs/motorola/micom.c +++ b/rigs/motorola/micom.c @@ -19,9 +19,9 @@ * */ -#include <hamlib/rig.h> -#include <misc.h> -#include <iofunc.h> +#include "hamlib/rig.h" +#include "misc.h" +#include "iofunc.h" // char* to start of checksum for len bytes static unsigned int checksum(const unsigned char *buf, int len) diff --git a/rigs/motorola/motorola.c b/rigs/motorola/motorola.c index 192b2b977..1a77e9f2f 100644 --- a/rigs/motorola/motorola.c +++ b/rigs/motorola/motorola.c @@ -20,7 +20,7 @@ */ #include "motorola.h" -#include <register.h> +#include "register.h" DECLARE_INITRIG_BACKEND(motorola) { diff --git a/rigs/pcr/pcr100.c b/rigs/pcr/pcr100.c index bb6a568e0..cb73d3885 100644 --- a/rigs/pcr/pcr100.c +++ b/rigs/pcr/pcr100.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "pcr.h" #include "idx_builtin.h" diff --git a/rigs/pcr/pcr1000.c b/rigs/pcr/pcr1000.c index 398568204..f610ddcd9 100644 --- a/rigs/pcr/pcr1000.c +++ b/rigs/pcr/pcr1000.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "pcr.h" #include "idx_builtin.h" diff --git a/rigs/pcr/pcr1500.c b/rigs/pcr/pcr1500.c index 1012353f7..759aa5bf4 100644 --- a/rigs/pcr/pcr1500.c +++ b/rigs/pcr/pcr1500.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "pcr.h" #include "idx_builtin.h" diff --git a/rigs/pcr/pcr2500.c b/rigs/pcr/pcr2500.c index c946991da..8b88cf4d1 100644 --- a/rigs/pcr/pcr2500.c +++ b/rigs/pcr/pcr2500.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "pcr.h" #include "idx_builtin.h" diff --git a/rigs/prm80/prm80.h b/rigs/prm80/prm80.h index 43efda3b5..0ff2a2352 100644 --- a/rigs/prm80/prm80.h +++ b/rigs/prm80/prm80.h @@ -23,7 +23,7 @@ #define _PRM80_H 1 #include <sys/time.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #define BACKEND_VER "20231002.0" diff --git a/rigs/racal/ra3702.c b/rigs/racal/ra3702.c index d5d3e5c51..7b7e49962 100644 --- a/rigs/racal/ra3702.c +++ b/rigs/racal/ra3702.c @@ -18,7 +18,7 @@ * */ -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "idx_builtin.h" #include "ra37xx.h" diff --git a/rigs/racal/ra6790.c b/rigs/racal/ra6790.c index 2232b5303..74a67cd10 100644 --- a/rigs/racal/ra6790.c +++ b/rigs/racal/ra6790.c @@ -19,7 +19,7 @@ * */ -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "racal.h" diff --git a/rigs/rft/ekd500.c b/rigs/rft/ekd500.c index b821e6635..34f1c7450 100644 --- a/rigs/rft/ekd500.c +++ b/rigs/rft/ekd500.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "rft.h" diff --git a/rigs/rft/rft.h b/rigs/rft/rft.h index 01b8834b3..57f0b3a42 100644 --- a/rigs/rft/rft.h +++ b/rigs/rft/rft.h @@ -22,7 +22,7 @@ #ifndef _RFT_H #define _RFT_H 1 -#include <hamlib/rig.h> +#include "hamlib/rig.h" #define BACKEND_VER "20031007" diff --git a/rigs/rs/eb200.c b/rigs/rs/eb200.c index 2c5cb2235..97e8690c8 100644 --- a/rigs/rs/eb200.c +++ b/rigs/rs/eb200.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "rs.h" diff --git a/rigs/rs/ek89x.h b/rigs/rs/ek89x.h index 24591be65..4994bccff 100644 --- a/rigs/rs/ek89x.h +++ b/rigs/rs/ek89x.h @@ -25,7 +25,7 @@ #ifndef _EK89X_H #define _EK89X_H 1 -#include <hamlib/rig.h> +#include "hamlib/rig.h" int ek89x_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt); diff --git a/rigs/rs/esmc.c b/rigs/rs/esmc.c index dba62b07c..bb6f141fc 100644 --- a/rigs/rs/esmc.c +++ b/rigs/rs/esmc.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "rs.h" diff --git a/rigs/rs/gp2000.h b/rigs/rs/gp2000.h index 0e7e20ee9..92bea85c1 100644 --- a/rigs/rs/gp2000.h +++ b/rigs/rs/gp2000.h @@ -27,7 +27,7 @@ #undef BACKEND_VER #define BACKEND_VER "20210901" -#include <hamlib/rig.h> +#include "hamlib/rig.h" int gp2000_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt); diff --git a/rigs/rs/rs.h b/rigs/rs/rs.h index 729f1ddf5..dea04d398 100644 --- a/rigs/rs/rs.h +++ b/rigs/rs/rs.h @@ -22,7 +22,7 @@ #ifndef _RS_H #define _RS_H 1 -#include <hamlib/rig.h> +#include "hamlib/rig.h" #define BACKEND_VER "20090803" diff --git a/rigs/rs/xk2100.c b/rigs/rs/xk2100.c index c97dd04a4..7c52e4306 100644 --- a/rigs/rs/xk2100.c +++ b/rigs/rs/xk2100.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "gp2000.h" #define XK2100_MODES (RIG_MODE_USB|RIG_MODE_LSB|RIG_MODE_PKTUSB|RIG_MODE_PKTLSB|RIG_MODE_CW|RIG_MODE_AM|RIG_MODE_FM) diff --git a/rigs/rs/xk852.h b/rigs/rs/xk852.h index 956cfa48e..1771694c6 100644 --- a/rigs/rs/xk852.h +++ b/rigs/rs/xk852.h @@ -26,7 +26,7 @@ #undef BACKEND_VER #define BACKEND_VER "20240921" -#include <hamlib/rig.h> +#include "hamlib/rig.h" typedef enum { XK852_CMD_ADDRESS = 'A', diff --git a/rigs/skanti/skanti.c b/rigs/skanti/skanti.c index 1cd9e504e..91775ae1a 100644 --- a/rigs/skanti/skanti.c +++ b/rigs/skanti/skanti.c @@ -23,9 +23,9 @@ #include <stdio.h> #include <string.h> /* String function definitions */ -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "iofunc.h" -#include <register.h> +#include "register.h" #include "skanti.h" diff --git a/rigs/skanti/skanti.h b/rigs/skanti/skanti.h index 4993900ef..df2a66668 100644 --- a/rigs/skanti/skanti.h +++ b/rigs/skanti/skanti.h @@ -22,7 +22,7 @@ #ifndef _SKANTI_H #define _SKANTI_H 1 -#include <hamlib/rig.h> +#include "hamlib/rig.h" #define BACKEND_VER "20191208" diff --git a/rigs/skanti/trp8000.c b/rigs/skanti/trp8000.c index b6c876b71..79536540d 100644 --- a/rigs/skanti/trp8000.c +++ b/rigs/skanti/trp8000.c @@ -20,7 +20,7 @@ */ -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "idx_builtin.h" #include "skanti.h" diff --git a/rigs/skanti/trp8255.c b/rigs/skanti/trp8255.c index 27d38f570..ef9705915 100644 --- a/rigs/skanti/trp8255.c +++ b/rigs/skanti/trp8255.c @@ -22,7 +22,7 @@ #include <stdlib.h> #include <string.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "idx_builtin.h" #include "iofunc.h" diff --git a/rigs/tapr/tapr.h b/rigs/tapr/tapr.h index 7921766d2..4c5dfd99a 100644 --- a/rigs/tapr/tapr.h +++ b/rigs/tapr/tapr.h @@ -22,7 +22,7 @@ #ifndef _TAPR_H #define _TAPR_H 1 -#include <hamlib/rig.h> +#include "hamlib/rig.h" int tapr_set_freq(RIG *rig, vfo_t vfo, freq_t freq); diff --git a/rigs/tentec/argonaut.c b/rigs/tentec/argonaut.c index 2a9c0ee8b..fe9e9f66d 100644 --- a/rigs/tentec/argonaut.c +++ b/rigs/tentec/argonaut.c @@ -21,7 +21,7 @@ #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "tentec2.h" #include "bandplan.h" #include "idx_builtin.h" diff --git a/rigs/tentec/jupiter.c b/rigs/tentec/jupiter.c index ed9bcf8f6..d913d226e 100644 --- a/rigs/tentec/jupiter.c +++ b/rigs/tentec/jupiter.c @@ -36,7 +36,7 @@ #include <string.h> #include <stdlib.h> -#include <hamlib/rig.h> +#include "hamlib/rig.h" #include "tentec2.h" #include "tentec.h" #include "bandplan.h" diff --gi... [truncated message content] |
From: n0nb <n0...@us...> - 2025-07-22 21:20:20
|
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 4da91f1a288e81132482be23c298c41ff062cfe9 (commit) from df95e939400897bb4dcb5ac50abb5abacb7ecb99 (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 4da91f1a288e81132482be23c298c41ff062cfe9 Author: Michael Morgan <844...@us...> Date: Mon Jul 7 12:32:56 2025 -0500 Use alternate quoting for older Python versions Since Python 3.12, strings such as: f"test_{object_name.replace(".", "_")}_class.py" are allowed but older versions require single quotes around the dot and underscore within the double quoted string. Should quell CI error on Ubuntu Noble. diff --git a/bindings/python/generate_tests.py b/bindings/python/generate_tests.py index 068a8346c..e629e9716 100755 --- a/bindings/python/generate_tests.py +++ b/bindings/python/generate_tests.py @@ -59,7 +59,7 @@ DO NOT EDIT this autogenerated file, run "make generate-pytests" instead """ import Hamlib ''' - filename = f"test_{object_name.replace(".", "_")}_class.py" + filename = f"test_{object_name.replace('.', '_')}_class.py" class_source = inspect.getsource(TestClass) expected_callables = repr(callables).replace(" ", "\n") expected_properties = repr(properties).replace(" ", "\n") ----------------------------------------------------------------------- Summary of changes: bindings/python/generate_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |