hamlib-cvs-digest Mailing List for Ham Radio Control Libraries (Page 23)
Library to control radio transceivers and receivers
Brought to you by:
n0nb
You can subscribe to this list here.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(57) |
Nov
(27) |
Dec
(25) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(41) |
Feb
(101) |
Mar
(60) |
Apr
(32) |
May
(32) |
Jun
(198) |
Jul
(95) |
Aug
(60) |
Sep
(48) |
Oct
(96) |
Nov
(27) |
Dec
(222) |
| 2002 |
Jan
(180) |
Feb
(46) |
Mar
(68) |
Apr
(11) |
May
(36) |
Jun
(34) |
Jul
(113) |
Aug
(42) |
Sep
(71) |
Oct
(65) |
Nov
(116) |
Dec
(40) |
| 2003 |
Jan
(32) |
Feb
(92) |
Mar
(29) |
Apr
(102) |
May
(21) |
Jun
(34) |
Jul
(3) |
Aug
(60) |
Sep
(30) |
Oct
(62) |
Nov
(57) |
Dec
(33) |
| 2004 |
Jan
(28) |
Feb
(46) |
Mar
(16) |
Apr
(14) |
May
(31) |
Jun
(21) |
Jul
(10) |
Aug
(80) |
Sep
(42) |
Oct
(11) |
Nov
(28) |
Dec
(13) |
| 2005 |
Jan
(35) |
Feb
(26) |
Mar
(20) |
Apr
(118) |
May
(2) |
Jun
(5) |
Jul
|
Aug
|
Sep
(5) |
Oct
(1) |
Nov
(13) |
Dec
(1) |
| 2006 |
Jan
(9) |
Feb
(25) |
Mar
(22) |
Apr
(6) |
May
|
Jun
|
Jul
(2) |
Aug
(1) |
Sep
(3) |
Oct
(46) |
Nov
(13) |
Dec
(7) |
| 2007 |
Jan
(9) |
Feb
(14) |
Mar
(3) |
Apr
|
May
(6) |
Jun
(1) |
Jul
|
Aug
(11) |
Sep
(7) |
Oct
(8) |
Nov
(41) |
Dec
(3) |
| 2008 |
Jan
(27) |
Feb
(16) |
Mar
(13) |
Apr
(23) |
May
(39) |
Jun
(4) |
Jul
(7) |
Aug
(1) |
Sep
(13) |
Oct
(52) |
Nov
(44) |
Dec
(55) |
| 2009 |
Jan
(72) |
Feb
(69) |
Mar
|
Apr
|
May
|
Jun
(13) |
Jul
(1) |
Aug
(6) |
Sep
(15) |
Oct
(11) |
Nov
(31) |
Dec
(20) |
| 2010 |
Jan
(24) |
Feb
(21) |
Mar
(22) |
Apr
(40) |
May
(38) |
Jun
(4) |
Jul
(2) |
Aug
(22) |
Sep
(19) |
Oct
(14) |
Nov
(5) |
Dec
(8) |
| 2011 |
Jan
(14) |
Feb
(36) |
Mar
(6) |
Apr
|
May
|
Jun
(23) |
Jul
(13) |
Aug
(8) |
Sep
(7) |
Oct
|
Nov
(3) |
Dec
(9) |
| 2012 |
Jan
(17) |
Feb
(13) |
Mar
(10) |
Apr
|
May
(1) |
Jun
(14) |
Jul
(4) |
Aug
(12) |
Sep
(2) |
Oct
(24) |
Nov
(14) |
Dec
(2) |
| 2013 |
Jan
(4) |
Feb
(3) |
Mar
(3) |
Apr
(3) |
May
(10) |
Jun
(4) |
Jul
(7) |
Aug
|
Sep
(15) |
Oct
(5) |
Nov
(1) |
Dec
(2) |
| 2014 |
Jan
|
Feb
(8) |
Mar
(1) |
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
(3) |
Oct
(7) |
Nov
(6) |
Dec
(3) |
| 2015 |
Jan
(4) |
Feb
(5) |
Mar
(8) |
Apr
(8) |
May
(2) |
Jun
|
Jul
(4) |
Aug
(7) |
Sep
(8) |
Oct
|
Nov
(6) |
Dec
(4) |
| 2016 |
Jan
(6) |
Feb
(26) |
Mar
(3) |
Apr
(10) |
May
(6) |
Jun
(5) |
Jul
(1) |
Aug
(4) |
Sep
(3) |
Oct
(4) |
Nov
(3) |
Dec
(10) |
| 2017 |
Jan
(11) |
Feb
(11) |
Mar
(2) |
Apr
(1) |
May
(7) |
Jun
(2) |
Jul
(11) |
Aug
(9) |
Sep
(5) |
Oct
(5) |
Nov
(1) |
Dec
(2) |
| 2018 |
Jan
(5) |
Feb
(2) |
Mar
(19) |
Apr
(7) |
May
(11) |
Jun
(3) |
Jul
(4) |
Aug
(10) |
Sep
(2) |
Oct
(8) |
Nov
(6) |
Dec
(9) |
| 2019 |
Jan
(9) |
Feb
(6) |
Mar
(2) |
Apr
(4) |
May
(6) |
Jun
(9) |
Jul
(6) |
Aug
(3) |
Sep
(5) |
Oct
(2) |
Nov
(8) |
Dec
(9) |
| 2020 |
Jan
(15) |
Feb
(1) |
Mar
(18) |
Apr
(33) |
May
(43) |
Jun
(87) |
Jul
(45) |
Aug
(8) |
Sep
(43) |
Oct
(3) |
Nov
(5) |
Dec
(42) |
| 2021 |
Jan
(116) |
Feb
(40) |
Mar
(58) |
Apr
(48) |
May
(29) |
Jun
(2) |
Jul
|
Aug
(22) |
Sep
(18) |
Oct
(1) |
Nov
|
Dec
(3) |
| 2022 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
(1) |
May
(2) |
Jun
(1) |
Jul
|
Aug
(1) |
Sep
|
Oct
(6) |
Nov
(2) |
Dec
(9) |
| 2023 |
Jan
(10) |
Feb
|
Mar
|
Apr
(10) |
May
(3) |
Jun
(1) |
Jul
(2) |
Aug
(4) |
Sep
(1) |
Oct
|
Nov
(2) |
Dec
(3) |
| 2024 |
Jan
(4) |
Feb
(1) |
Mar
(2) |
Apr
(2) |
May
(5) |
Jun
(3) |
Jul
(1) |
Aug
(2) |
Sep
|
Oct
(2) |
Nov
(3) |
Dec
(9) |
| 2025 |
Jan
(5) |
Feb
(5) |
Mar
|
Apr
(10) |
May
(20) |
Jun
(43) |
Jul
(24) |
Aug
(47) |
Sep
(38) |
Oct
(5) |
Nov
|
Dec
|
|
From: Michael B. <mdb...@us...> - 2021-01-20 17:15: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 a4d9dac5cef15a7e4941472e142c2bd15b622f81 (commit)
from 05728f74ebbc1488a030dddeab9a49a36543b109 (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 a4d9dac5cef15a7e4941472e142c2bd15b622f81
Author: Michael Black W9MDB <mdb...@ya...>
Date: Wed Jan 20 11:15:12 2021 -0600
Add testritgcaps to make clean
diff --git a/tests/Makefile.am b/tests/Makefile.am
index c6a9aa0b..aaaca511 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -126,4 +126,4 @@ FORCE:
dist-hook:
test ./ -ef $(srcdir)/ || test ! -f hamlibdatetime.h || cp -f hamlibdatetime.h $(srcdir)/
-CLEANFILES = testrig.sh testfreq.sh testbcd.sh testloc.sh
+CLEANFILES = testrig.sh testfreq.sh testbcd.sh testloc.sh testrigcaps.sh
-----------------------------------------------------------------------
Summary of changes:
tests/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-20 16:47:16
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via 05728f74ebbc1488a030dddeab9a49a36543b109 (commit)
via e32e47a858541bb7ac7d9eea66b3d178fc36e1e6 (commit)
via 0ad3c94e9bd9f7734809c2821e468201eda765fe (commit)
via 81cc189f5794d9d9bf4138a137e3c82741c3f72f (commit)
from 14251b237dde212c7e9bb2addd24b9e3672c4c47 (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 05728f74ebbc1488a030dddeab9a49a36543b109
Author: Michael Black W9MDB <mdb...@ya...>
Date: Wed Jan 20 10:46:07 2021 -0600
Fix testrigcaps.c
diff --git a/tests/testrigcaps.c b/tests/testrigcaps.c
new file mode 100644
index 00000000..4a223461
--- /dev/null
+++ b/tests/testrigcaps.c
@@ -0,0 +1,37 @@
+#include <stdio.h>
+#include <hamlib/rig.h>
+
+int main()
+{
+ printf("Check rig_caps offsets\n");
+ printf("If changed can affect shared library API\n");
+ RIG *rig;
+ int retcode = 0;
+ rig_set_debug_level(RIG_DEBUG_NONE);
+ rig = rig_init(1);
+ void *p1 = &rig->state.rigport;
+ void *p2 = &rig->state.vfo_list;
+ unsigned long offset = p2 - p1;
+ printf("offset vfo_list=%ld\n", offset);
+ int expected = 13280;
+ if (offset != expected)
+ {
+ printf("offset of vfo_list has changed!!!\n");
+ printf("was %d, now %lu\n", expected, offset );
+ retcode = 1;
+ }
+
+ p2 = &rig->state.power_max;
+ offset = p2 - p1;
+ printf("offset power_max=%ld\n", offset);
+
+ expected = 13696;
+ if (offset != expected)
+ {
+ printf("offset of power_max has changed!!!\n");
+ printf("was %d, now %lu\n", expected, offset );
+ retcode = 1;
+ }
+
+ return retcode;
+}
commit e32e47a858541bb7ac7d9eea66b3d178fc36e1e6
Author: Michael Black W9MDB <mdb...@ya...>
Date: Wed Jan 20 10:44:37 2021 -0600
Add testrigcaps to catch potential shared library problems
Add testrigopen to test time it takes to timeout when rig is powered off
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 7b63aef5..c6a9aa0b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -10,7 +10,7 @@ DISTCLEANFILES = rigctl.log rigctl.sum testbcd.log testbcd.sum hamlibdatetime.h
bin_PROGRAMS = rigctl rigctld rigmem rigsmtr rigswr rotctl rotctld rigctlcom ampctl ampctld
-check_PROGRAMS = dumpmem testrig testtrn testbcd testfreq listrigs testloc rig_bench cachetest cachetest2
+check_PROGRAMS = dumpmem testrig testrigopen testrigcaps testtrn testbcd testfreq listrigs testloc rig_bench cachetest cachetest2
RIGCOMMONSRC = rigctl_parse.c rigctl_parse.h dumpcaps.c sprintflst.c sprintflst.h uthash.h hamlibdatetime.h
ROTCOMMONSRC = rotctl_parse.c rotctl_parse.h dumpcaps_rot.c sprintflst.c sprintflst.h uthash.h hamlibdatetime.h
@@ -77,7 +77,7 @@ EXTRA_DIST = rigmatrix_head.html rig_split_lst.awk testctld.pl testrotctld.pl \
hamlibdatetime.h.in
# Support 'make check' target for simple tests
-check_SCRIPTS = testrig.sh testfreq.sh testbcd.sh testloc.sh
+check_SCRIPTS = testrig.sh testfreq.sh testbcd.sh testloc.sh testrigcaps.sh
TESTS = $(check_SCRIPTS)
@@ -98,6 +98,10 @@ testloc.sh:
echo './testloc EM79UT96LW 5' > testloc.sh
chmod +x ./testloc.sh
+testrigcaps.sh:
+ echo './testrigcaps' > testrigcaps.sh
+ chmod +x ./testrigcaps.sh
+
# If we have a .git directory then we will generate the hamlibdate.h
# file and replace it if it is different. Fall back to a copy of a
# generic hamlibdatetime.h.in in the source tree. Build looks in build
commit 0ad3c94e9bd9f7734809c2821e468201eda765fe
Author: Michael Black W9MDB <mdb...@ya...>
Date: Wed Jan 20 07:51:01 2021 -0600
Fix ft1000mp.c retry since retries are done in read_block now
diff --git a/rigs/yaesu/ft1000mp.c b/rigs/yaesu/ft1000mp.c
index 2b41b2ca..c887ec00 100644
--- a/rigs/yaesu/ft1000mp.c
+++ b/rigs/yaesu/ft1000mp.c
@@ -222,7 +222,7 @@ const struct rig_caps ft1000mp_caps =
RIG_MODEL(RIG_MODEL_FT1000MP),
.model_name = "FT-1000MP",
.mfg_name = "Yaesu",
- .version = "20200731.0",
+ .version = "20210120.0",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,
@@ -356,7 +356,7 @@ const struct rig_caps ft1000mpmkv_caps =
RIG_MODEL(RIG_MODEL_FT1000MPMKV),
.model_name = "MARK-V FT-1000MP",
.mfg_name = "Yaesu",
- .version = "20200731.0",
+ .version = "20210120.0",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,
@@ -490,7 +490,7 @@ const struct rig_caps ft1000mpmkvfld_caps =
RIG_MODEL(RIG_MODEL_FT1000MPMKVFLD),
.model_name = "MARK-V Field FT-1000MP",
.mfg_name = "Yaesu",
- .version = "20200731.0",
+ .version = "20210120.0",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,
@@ -1528,7 +1528,9 @@ static int ft1000mp_get_update_data(RIG *rig, unsigned char ci,
p = (struct ft1000mp_priv_data *)rig->state.priv;
rig_s = &rig->state;
- do
+ // timeout retries are done in read_block now
+ // based on rig backed retry value
+// do
{
/* send UPDATE command to fetch data*/
ft1000mp_send_priv_cmd(rig, ci);
@@ -1538,9 +1540,10 @@ static int ft1000mp_get_update_data(RIG *rig, unsigned char ci,
if (n == -RIG_ETIMEOUT)
{
rig_debug(RIG_DEBUG_TRACE, "%s: Timeout retry count = %d\n", __func__, retry);
+ //rig_debug(RIG_DEBUG_TRACE, "%s: Timeout\n", __func__, retry);
}
}
- while (retry-- && n == -RIG_ETIMEOUT);
+// while (retry-- && n == -RIG_ETIMEOUT);
return n;
commit 81cc189f5794d9d9bf4138a137e3c82741c3f72f
Author: Michael Black W9MDB <mdb...@ya...>
Date: Wed Jan 20 07:20:46 2021 -0600
Update trxmanager model name
diff --git a/rigs/dummy/trxmanager.c b/rigs/dummy/trxmanager.c
index 51fa9d0e..a5cbf2f4 100644
--- a/rigs/dummy/trxmanager.c
+++ b/rigs/dummy/trxmanager.c
@@ -117,7 +117,7 @@ struct trxmanager_priv_data
struct rig_caps trxmanager_caps =
{
RIG_MODEL(RIG_MODEL_TRXMANAGER_RIG),
- .model_name = "5.7.630+",
+ .model_name = "TRXManager 5.7.630+",
.mfg_name = "TRXManager",
.version = BACKEND_VER ".0",
.copyright = "LGPL",
-----------------------------------------------------------------------
Summary of changes:
rigs/dummy/trxmanager.c | 2 +-
rigs/yaesu/ft1000mp.c | 13 ++++++++-----
tests/Makefile.am | 8 ++++++--
tests/testrigcaps.c | 37 +++++++++++++++++++++++++++++++++++++
4 files changed, 52 insertions(+), 8 deletions(-)
create mode 100644 tests/testrigcaps.c
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-20 13:16:24
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via 14251b237dde212c7e9bb2addd24b9e3672c4c47 (commit)
from 3cd921c2d379faaa88eff1fef2d1de8bc7920273 (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 14251b237dde212c7e9bb2addd24b9e3672c4c47
Author: Michael Black W9MDB <mdb...@ya...>
Date: Wed Jan 20 07:15:53 2021 -0600
Fix ft1000d.c retry
diff --git a/rigs/yaesu/ft1000d.c b/rigs/yaesu/ft1000d.c
index f30e0356..b2a3bd3e 100644
--- a/rigs/yaesu/ft1000d.c
+++ b/rigs/yaesu/ft1000d.c
@@ -158,7 +158,7 @@ const struct rig_caps ft1000d_caps =
RIG_MODEL(RIG_MODEL_FT1000D),
.model_name = "FT-1000D",
.mfg_name = "Yaesu",
- .version = "20201009.0",
+ .version = "20210120.0",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,
@@ -3274,7 +3274,7 @@ int ft1000d_get_update_data(RIG *rig, unsigned char ci, unsigned short ch)
n = read_block(&rig_s->rigport, p, rl);
}
- while (n < 0 && retry >= 0);
+ while (n < 0 && retry-- >= 0);
if (n < 0)
{
-----------------------------------------------------------------------
Summary of changes:
rigs/yaesu/ft1000d.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-19 23:27:34
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via 3cd921c2d379faaa88eff1fef2d1de8bc7920273 (commit)
from 1e96b1f4d76afdef3f25928dbecf756d1663670c (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 3cd921c2d379faaa88eff1fef2d1de8bc7920273
Author: Michael Black W9MDB <mdb...@ya...>
Date: Tue Jan 19 17:23:01 2021 -0600
Make the Yaesu BS command assume it worked as can't repeat it
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index 02f06907..1ab55c88 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -9657,6 +9657,10 @@ int newcat_set_cmd_validate(RIG *rig)
if (bytes > 0)
{
+ // for the BS command we can only run it once
+ // so we'll assume it worked
+ // maybe Yaeus will make this command more intelligent
+ if (strstr(priv->cmd_str,"BS")) return RIG_OK;
// if the first two chars match we are validated
if (strncmp(priv->cmd_str, "VS", 2) == 0
&& strncmp(priv->cmd_str, priv->ret_data, 2) == 0) { RETURNFUNC(RIG_OK); }
-----------------------------------------------------------------------
Summary of changes:
rigs/yaesu/newcat.c | 4 ++++
1 file changed, 4 insertions(+)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-19 18:12:52
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via 1e96b1f4d76afdef3f25928dbecf756d1663670c (commit)
from 0fe9b866d26189ab9071dc605de0ad60f2425a0d (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 1e96b1f4d76afdef3f25928dbecf756d1663670c
Author: Michael Black W9MDB <mdb...@ya...>
Date: Tue Jan 19 12:12:24 2021 -0600
Remove get_freq -- seems to be causing a problem with FLRig
diff --git a/src/rig.c b/src/rig.c
index 5b920e8f..228e4957 100644
--- a/src/rig.c
+++ b/src/rig.c
@@ -991,10 +991,10 @@ int HAMLIB_API rig_open(RIG *rig)
}
#endif
- // read frequence to update internal status
- freq_t freq;
- if (caps->get_freq) rig_get_freq(rig, RIG_VFO_A, &freq);
- if (caps->get_freq) rig_get_freq(rig, RIG_VFO_B, &freq);
+ // read frequency to update internal status
+// freq_t freq;
+// if (caps->get_freq) rig_get_freq(rig, RIG_VFO_A, &freq);
+// if (caps->get_freq) rig_get_freq(rig, RIG_VFO_B, &freq);
RETURNFUNC(RIG_OK);
}
-----------------------------------------------------------------------
Summary of changes:
src/rig.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-19 17:19:13
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via 0fe9b866d26189ab9071dc605de0ad60f2425a0d (commit)
from 3d2ab7f379b5be2071d784bb5ef0b4311f41806c (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 0fe9b866d26189ab9071dc605de0ad60f2425a0d
Author: Michael Black W9MDB <mdb...@ya...>
Date: Tue Jan 19 11:18:38 2021 -0600
Update rigctl.1 man page for W command format
diff --git a/doc/man1/rigctl.1 b/doc/man1/rigctl.1
index e695ce3f..fedc9fcd 100644
--- a/doc/man1/rigctl.1
+++ b/doc/man1/rigctl.1
@@ -1109,8 +1109,8 @@ option above, will terminate each command string sent to the radio. This
character should not be a part of the input string.
.
.TP
-.BR W ", " send_cmd_rx " \(aq" \fICmd\fP \(aq
-Send a raw command string to the radio and expect a number of bytes returned.
+.BR W ", " send_cmd_rx " \(aq" \fICmd\fP\(aq " " \fInbytes\FP
+Send a raw command string to the radio and expect nbytes returned.
.IP
This is useful for testing and troubleshooting radio commands and responses when
developing a backend. If the # of bytes requested is <= the number actually returned no timeout will occur.
-----------------------------------------------------------------------
Summary of changes:
doc/man1/rigctl.1 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-19 17:12: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 3d2ab7f379b5be2071d784bb5ef0b4311f41806c (commit)
from e622186bc3016e71369238f1030df0ae44f0ddf7 (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 3d2ab7f379b5be2071d784bb5ef0b4311f41806c
Author: Michael Black W9MDB <mdb...@ya...>
Date: Tue Jan 19 11:11:19 2021 -0600
Yaesu newcat.c do no not try to set VFO when transmitting.
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index 0d2abb5a..02f06907 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -1277,6 +1277,9 @@ int newcat_set_vfo(RIG *rig, vfo_t vfo)
rig_debug(RIG_DEBUG_TRACE, "%s: passed vfo = %s\n", __func__,
rig_strvfo(vfo));
+ // we can't change VFO while transmitting
+ if (rig->state.cache.ptt == RIG_PTT_ON) return RIG_OK;
+
if (!newcat_valid_command(rig, command))
{
RETURNFUNC(-RIG_ENAVAIL);
-----------------------------------------------------------------------
Summary of changes:
rigs/yaesu/newcat.c | 3 +++
1 file changed, 3 insertions(+)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-19 15:41:19
|
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 e622186bc3016e71369238f1030df0ae44f0ddf7 (commit)
from fe53dce518aebcb55e89570a03ecfc0f962d919b (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 e622186bc3016e71369238f1030df0ae44f0ddf7
Author: Michael Black W9MDB <mdb...@ya...>
Date: Tue Jan 19 09:39:39 2021 -0600
In newcat_set_cmd_validate helps if we get VFO_B when we want VFO_B
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index 49baa847..0d2abb5a 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -836,7 +836,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
else
{
freq_t freqB;
- rig_get_freq(rig, RIG_VFO_A, &freqB);
+ rig_get_freq(rig, RIG_VFO_B, &freqB);
rig_debug(RIG_DEBUG_TRACE, "%s(%d)%s: checking VFOB for band change \n",
__FILE__, __LINE__, __func__);
-----------------------------------------------------------------------
Summary of changes:
rigs/yaesu/newcat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-19 13:18:37
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via fe53dce518aebcb55e89570a03ecfc0f962d919b (commit)
via dd0765309e0c757db53bf69f004685a9d2b65b67 (commit)
from bc607bfc1dc7586db23cea469dabb5705383c8a3 (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 fe53dce518aebcb55e89570a03ecfc0f962d919b
Author: Michael Black W9MDB <mdb...@ya...>
Date: Tue Jan 19 07:18:05 2021 -0600
astyle newcat.c
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index a831991d..49baa847 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -822,6 +822,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
__LINE__, __func__, rig_strvfo(rig->state.current_vfo));
CACHE_RESET;
+
if (vfo == RIG_VFO_A || vfo == RIG_VFO_MAIN)
{
freq_t freqA;
@@ -963,6 +964,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
// we need to update some info that BS may have caused
CACHE_RESET;
+
if (vfo == RIG_VFO_A || vfo == RIG_VFO_MAIN)
{
rig_get_freq(rig, RIG_VFO_SUB, &tmp_freqA);
commit dd0765309e0c757db53bf69f004685a9d2b65b67
Author: Michael Black W9MDB <mdb...@ya...>
Date: Tue Jan 19 07:17:07 2021 -0600
Added CACHE_RESET macro
newcat_set_cmd_validate now queries VFO freq instead of using cache
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index 2fb2bdb3..a831991d 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -821,38 +821,25 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
rig_debug(RIG_DEBUG_TRACE, "%s(%d)%s: rig->state.current_vfo=%s\n", __FILE__,
__LINE__, __func__, rig_strvfo(rig->state.current_vfo));
+ CACHE_RESET;
if (vfo == RIG_VFO_A || vfo == RIG_VFO_MAIN)
{
+ freq_t freqA;
+ rig_get_freq(rig, RIG_VFO_A, &freqA);
rig_debug(RIG_DEBUG_TRACE, "%s(%d)%s: checking VFOA for band change \n",
__FILE__, __LINE__, __func__);
- if (rig->state.cache.freqMainA == 0)
- {
- freq_t freqtmp;
- err = rig_get_freq(rig, RIG_VFO_CURR, &freqtmp);
-
- if (err != RIG_OK) { RETURNFUNC(err); }
- }
-
- changing = newcat_band_index(freq) != newcat_band_index(
- rig->state.cache.freqMainA);
+ changing = newcat_band_index(freq) != newcat_band_index(freqA);
rig_debug(RIG_DEBUG_TRACE, "%s: VFO_A band changing=%d\n", __func__, changing);
}
else
{
+ freq_t freqB;
+ rig_get_freq(rig, RIG_VFO_A, &freqB);
rig_debug(RIG_DEBUG_TRACE, "%s(%d)%s: checking VFOB for band change \n",
__FILE__, __LINE__, __func__);
- if (rig->state.cache.freqMainB == 0)
- {
- freq_t freqtmp;
- err = rig_get_freq(rig, RIG_VFO_CURR, &freqtmp);
-
- if (err != RIG_OK) { RETURNFUNC(err); }
- }
-
- changing = newcat_band_index(freq) != newcat_band_index(
- rig->state.cache.freqMainB);
+ changing = newcat_band_index(freq) != newcat_band_index(freqB);
rig_debug(RIG_DEBUG_TRACE, "%s: VFO_B band changing=%d\n", __func__, changing);
}
@@ -975,6 +962,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
pbwidth_t tmp_width;
// we need to update some info that BS may have caused
+ CACHE_RESET;
if (vfo == RIG_VFO_A || vfo == RIG_VFO_MAIN)
{
rig_get_freq(rig, RIG_VFO_SUB, &tmp_freqA);
diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h
index 722c43d2..7ee0befd 100644
--- a/rigs/yaesu/newcat.h
+++ b/rigs/yaesu/newcat.h
@@ -50,7 +50,7 @@
typedef char ncboolean;
/* shared function version */
-#define NEWCAT_VER "20210118"
+#define NEWCAT_VER "20210119"
/* Hopefully large enough for future use, 128 chars plus '\0' */
#define NEWCAT_DATA_LEN 129
diff --git a/src/misc.h b/src/misc.h
index e86a6ccd..d4ff18e2 100644
--- a/src/misc.h
+++ b/src/misc.h
@@ -143,6 +143,20 @@ void errmsg(int err, char *s, const char *func, const char *file, int line);
#define ENTERFUNC rig_debug(RIG_DEBUG_VERBOSE, "%s(%d):%s entered\n", __FILE__, __LINE__, __func__)
#define RETURNFUNC(rc) {rig_debug(RIG_DEBUG_VERBOSE, "%s(%d):%s return\n", __FILE__, __LINE__, __func__);return rc;}
+#define CACHE_RESET {\
+ elapsed_ms(&rig->state.cache.time_freq, HAMLIB_ELAPSED_INVALIDATE);\
+ elapsed_ms(&rig->state.cache.time_freqCurr, HAMLIB_ELAPSED_INVALIDATE);\
+ elapsed_ms(&rig->state.cache.time_freqMainA, HAMLIB_ELAPSED_INVALIDATE);\
+ elapsed_ms(&rig->state.cache.time_freqMainB, HAMLIB_ELAPSED_INVALIDATE);\
+ elapsed_ms(&rig->state.cache.time_freqMainC, HAMLIB_ELAPSED_INVALIDATE);\
+ elapsed_ms(&rig->state.cache.time_freqSubA, HAMLIB_ELAPSED_INVALIDATE);\
+ elapsed_ms(&rig->state.cache.time_freqSubB, HAMLIB_ELAPSED_INVALIDATE);\
+ elapsed_ms(&rig->state.cache.time_vfo, HAMLIB_ELAPSED_INVALIDATE);\
+ elapsed_ms(&rig->state.cache.time_mode, HAMLIB_ELAPSED_INVALIDATE);\
+ elapsed_ms(&rig->state.cache.time_ptt, HAMLIB_ELAPSED_INVALIDATE);\
+ elapsed_ms(&rig->state.cache.time_split, HAMLIB_ELAPSED_INVALIDATE);\
+ }
+
__END_DECLS
#endif /* _MISC_H */
-----------------------------------------------------------------------
Summary of changes:
rigs/yaesu/newcat.c | 30 ++++++++++--------------------
rigs/yaesu/newcat.h | 2 +-
src/misc.h | 14 ++++++++++++++
3 files changed, 25 insertions(+), 21 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-19 12:35:16
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via bc607bfc1dc7586db23cea469dabb5705383c8a3 (commit)
from bcc80fef79ef77b4242441e71ba09d6cd70650c0 (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 bc607bfc1dc7586db23cea469dabb5705383c8a3
Author: Michael Black W9MDB <mdb...@ya...>
Date: Tue Jan 19 06:30:00 2021 -0600
Add rig_get_freq to rig_open to set up internal status correctly
diff --git a/src/rig.c b/src/rig.c
index e27db2b5..5b920e8f 100644
--- a/src/rig.c
+++ b/src/rig.c
@@ -991,6 +991,10 @@ int HAMLIB_API rig_open(RIG *rig)
}
#endif
+ // read frequence to update internal status
+ freq_t freq;
+ if (caps->get_freq) rig_get_freq(rig, RIG_VFO_A, &freq);
+ if (caps->get_freq) rig_get_freq(rig, RIG_VFO_B, &freq);
RETURNFUNC(RIG_OK);
}
-----------------------------------------------------------------------
Summary of changes:
src/rig.c | 4 ++++
1 file changed, 4 insertions(+)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-19 04:37: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 bcc80fef79ef77b4242441e71ba09d6cd70650c0 (commit)
via 00cc6e848f9d26cc6a97f7b101c0ef88c57fe73d (commit)
from 2eda4bf1a72116f07e8aab4032264d7dd755cdbf (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 bcc80fef79ef77b4242441e71ba09d6cd70650c0
Author: Michael Black W9MDB <mdb...@ya...>
Date: Mon Jan 18 22:35:59 2021 -0600
In newcat_set_cmd_validate make exception processing for VS command
Return other cmds to full string comparison to validate data sent == data recvd
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index 459a0912..2fb2bdb3 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -9665,7 +9665,9 @@ int newcat_set_cmd_validate(RIG *rig)
if (bytes > 0)
{
// if the first two chars match we are validated
- if (strncmp(priv->cmd_str, priv->ret_data, 2) == 0) { RETURNFUNC(RIG_OK); }
+ if (strncmp(priv->cmd_str, "VS", 2) == 0
+ && strncmp(priv->cmd_str, priv->ret_data, 2) == 0) { RETURNFUNC(RIG_OK); }
+ else if (strcmp(priv->cmd_str, priv->ret_data) == 0) { RETURNFUNC(RIG_OK); }
else { rc = -RIG_EPROTO; }
}
commit 00cc6e848f9d26cc6a97f7b101c0ef88c57fe73d
Author: Michael Black W9MDB <mdb...@ya...>
Date: Mon Jan 18 22:30:49 2021 -0600
Fix double ;; in newcat_set_cmd_validate
Only ask for freq from other vfo that may have been changed by band select
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index b4e6e9c4..459a0912 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -866,12 +866,12 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
if (rig->state.current_vfo != vfo)
{
// then we need to change vfos, BS, and change back
- snprintf(priv->cmd_str, sizeof(priv->cmd_str), "VS1;BS%02d%c;VS0;",
- newcat_band_index(freq), cat_term);
+ snprintf(priv->cmd_str, sizeof(priv->cmd_str), "VS1;BS%02d;VS0;",
+ newcat_band_index(freq));
if (vfo == RIG_VFO_A || vfo == RIG_VFO_MAIN)
- snprintf(priv->cmd_str, sizeof(priv->cmd_str), "VS0;BS%02d%c;VS1;",
- newcat_band_index(freq), cat_term);
+ snprintf(priv->cmd_str, sizeof(priv->cmd_str), "VS0;BS%02d;VS1;",
+ newcat_band_index(freq));
}
else
{
@@ -951,6 +951,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
freq_t tmp_freqA, tmp_freqB;
rmode_t tmp_mode;
pbwidth_t tmp_width;
+
rig_get_freq(rig, RIG_VFO_MAIN, &tmp_freqA);
rig_get_freq(rig, RIG_VFO_SUB, &tmp_freqB);
rig_get_mode(rig, RIG_VFO_MAIN, &tmp_mode, &tmp_width);
@@ -972,8 +973,17 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
freq_t tmp_freqA, tmp_freqB;
rmode_t tmp_mode;
pbwidth_t tmp_width;
- rig_get_freq(rig, RIG_VFO_MAIN, &tmp_freqA);
- rig_get_freq(rig, RIG_VFO_SUB, &tmp_freqB);
+
+ // we need to update some info that BS may have caused
+ if (vfo == RIG_VFO_A || vfo == RIG_VFO_MAIN)
+ {
+ rig_get_freq(rig, RIG_VFO_SUB, &tmp_freqA);
+ }
+ else
+ {
+ rig_get_freq(rig, RIG_VFO_MAIN, &tmp_freqB);
+ }
+
rig_get_mode(rig, RIG_VFO_MAIN, &tmp_mode, &tmp_width);
rig_get_mode(rig, RIG_VFO_SUB, &tmp_mode, &tmp_width);
-----------------------------------------------------------------------
Summary of changes:
rigs/yaesu/newcat.c | 26 +++++++++++++++++++-------
1 file changed, 19 insertions(+), 7 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-18 23:51:17
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via 2eda4bf1a72116f07e8aab4032264d7dd755cdbf (commit)
from cf21f7d65c87e512f6179c24607c6ec06447856c (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 2eda4bf1a72116f07e8aab4032264d7dd755cdbf
Author: Michael Black W9MDB <mdb...@ya...>
Date: Mon Jan 18 17:49:05 2021 -0600
Use only 1st 2 chars for newcat_set_command_validate check
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index 2e176d36..b4e6e9c4 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -9654,8 +9654,8 @@ int newcat_set_cmd_validate(RIG *rig)
if (bytes > 0)
{
- // if they match we are validated
- if (strcmp(priv->cmd_str, priv->ret_data) == 0) { RETURNFUNC(RIG_OK); }
+ // if the first two chars match we are validated
+ if (strncmp(priv->cmd_str, priv->ret_data, 2) == 0) { RETURNFUNC(RIG_OK); }
else { rc = -RIG_EPROTO; }
}
-----------------------------------------------------------------------
Summary of changes:
rigs/yaesu/newcat.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-18 23:15: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 cf21f7d65c87e512f6179c24607c6ec06447856c (commit)
from 2365297cacd077e5ae2943d054d49c43103d9480 (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 cf21f7d65c87e512f6179c24607c6ec06447856c
Author: Michael Black W9MDB <mdb...@ya...>
Date: Mon Jan 18 17:15:10 2021 -0600
Fix vfo check for band change
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index ab2c5d88..2e176d36 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -821,8 +821,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
rig_debug(RIG_DEBUG_TRACE, "%s(%d)%s: rig->state.current_vfo=%s\n", __FILE__,
__LINE__, __func__, rig_strvfo(rig->state.current_vfo));
- if (rig->state.current_vfo == RIG_VFO_A
- || rig->state.current_vfo == RIG_VFO_MAIN)
+ if (vfo == RIG_VFO_A || vfo == RIG_VFO_MAIN)
{
rig_debug(RIG_DEBUG_TRACE, "%s(%d)%s: checking VFOA for band change \n",
__FILE__, __LINE__, __func__);
-----------------------------------------------------------------------
Summary of changes:
rigs/yaesu/newcat.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-18 22:41:09
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via 2365297cacd077e5ae2943d054d49c43103d9480 (commit)
via c43211e3a5b03ffecf26f677122210afa257d37a (commit)
from 2654503779c286da567ab64e95f551f163120b79 (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 2365297cacd077e5ae2943d054d49c43103d9480
Author: Michael Black W9MDB <mdb...@ya...>
Date: Mon Jan 18 16:39:57 2021 -0600
In yaesu band select disable setting other VFO.
Hopefully this works OK
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index 5efb972e..ab2c5d88 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -886,6 +886,8 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
__func__,
rigerror(err));
}
+
+#if 0 // disable for testing
else
{
// Also need to do this for the other VFO on some Yaesu rigs
@@ -964,6 +966,26 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
}
}
+#endif
+ // after band select re-read things -- may not have to change anything
+ // reading both VFOs is really only needed for rigs with just one VFO stack
+ // but we read them all to ensure we cover both types
+ freq_t tmp_freqA, tmp_freqB;
+ rmode_t tmp_mode;
+ pbwidth_t tmp_width;
+ rig_get_freq(rig, RIG_VFO_MAIN, &tmp_freqA);
+ rig_get_freq(rig, RIG_VFO_SUB, &tmp_freqB);
+ rig_get_mode(rig, RIG_VFO_MAIN, &tmp_mode, &tmp_width);
+ rig_get_mode(rig, RIG_VFO_SUB, &tmp_mode, &tmp_width);
+
+ if ((target_vfo == 0 && tmp_freqA == freq)
+ || (target_vfo == 1 && tmp_freqB == freq))
+ {
+ rig_debug(RIG_DEBUG_VERBOSE,
+ "%s: freq after band select already set to %"PRIfreq"\n", __func__, freq);
+ RETURNFUNC(RIG_OK); // we're done then!!
+ }
+
// just drop through
}
commit c43211e3a5b03ffecf26f677122210afa257d37a
Author: Michael Black W9MDB <mdb...@ya...>
Date: Mon Jan 18 10:05:37 2021 -0600
Reduce timeout for newcat_rig_open to allow powered off rig to be detected faster
Now takes a bit over 1 second instead of over 10 seconds
Powered on rigs should still work the same
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index 74c4d121..5efb972e 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -526,6 +526,9 @@ int newcat_open(RIG *rig)
/* get current AI state so it can be restored */
priv->trn_state = -1;
+ // for this sequence we will shorten the timeout so we can detect rig is powered off faster
+ int timeout = rig->state.rigport.timeout;
+ rig->state.rigport.timeout = 100;
newcat_get_trn(rig, &priv->trn_state); /* ignore errors */
/* Currently we cannot cope with AI mode so turn it off in case
@@ -538,6 +541,7 @@ int newcat_open(RIG *rig)
/* Initialize rig_id in case any subsequent commands need it */
(void)newcat_get_rigid(rig);
rig_debug(RIG_DEBUG_VERBOSE, "%s: rig_id=%d\n", __func__, priv->rig_id);
+ rig->state.rigport.timeout = timeout;
#if 0 // possible future enhancement?
@@ -814,29 +818,40 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
// And only when not in split mode (note this check has been removed for testing)
int changing;
- rig_debug(RIG_DEBUG_TRACE, "%s(%d)%s: rig->state.current_vfo=%s\n", __FILE__, __LINE__, __func__, rig_strvfo(rig->state.current_vfo));
- if (rig->state.current_vfo == RIG_VFO_A || rig->state.current_vfo == RIG_VFO_MAIN)
+ rig_debug(RIG_DEBUG_TRACE, "%s(%d)%s: rig->state.current_vfo=%s\n", __FILE__,
+ __LINE__, __func__, rig_strvfo(rig->state.current_vfo));
+
+ if (rig->state.current_vfo == RIG_VFO_A
+ || rig->state.current_vfo == RIG_VFO_MAIN)
{
- rig_debug(RIG_DEBUG_TRACE, "%s(%d)%s: checking VFOA for band change \n", __FILE__, __LINE__, __func__);
+ rig_debug(RIG_DEBUG_TRACE, "%s(%d)%s: checking VFOA for band change \n",
+ __FILE__, __LINE__, __func__);
+
if (rig->state.cache.freqMainA == 0)
{
freq_t freqtmp;
- err = rig_get_freq(rig,RIG_VFO_CURR,&freqtmp);
- if (err != RIG_OK) RETURNFUNC(err);
+ err = rig_get_freq(rig, RIG_VFO_CURR, &freqtmp);
+
+ if (err != RIG_OK) { RETURNFUNC(err); }
}
+
changing = newcat_band_index(freq) != newcat_band_index(
rig->state.cache.freqMainA);
rig_debug(RIG_DEBUG_TRACE, "%s: VFO_A band changing=%d\n", __func__, changing);
}
else
{
- rig_debug(RIG_DEBUG_TRACE, "%s(%d)%s: checking VFOB for band change \n", __FILE__, __LINE__, __func__);
+ rig_debug(RIG_DEBUG_TRACE, "%s(%d)%s: checking VFOB for band change \n",
+ __FILE__, __LINE__, __func__);
+
if (rig->state.cache.freqMainB == 0)
{
freq_t freqtmp;
- err = rig_get_freq(rig,RIG_VFO_CURR,&freqtmp);
- if (err != RIG_OK) RETURNFUNC(err);
+ err = rig_get_freq(rig, RIG_VFO_CURR, &freqtmp);
+
+ if (err != RIG_OK) { RETURNFUNC(err); }
}
+
changing = newcat_band_index(freq) != newcat_band_index(
rig->state.cache.freqMainB);
rig_debug(RIG_DEBUG_TRACE, "%s: VFO_B band changing=%d\n", __func__, changing);
@@ -6599,7 +6614,7 @@ ncboolean newcat_is_rig(RIG *rig, rig_model_t model)
//rig_debug(RIG_DEBUG_TRACE, "%s(%d):%s called\n", __FILE__, __LINE__, __func__);
is_rig = (model == rig->caps->rig_model) ? TRUE : FALSE;
- return(is_rig);
+ return (is_rig);
}
diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h
index ea6a6c22..722c43d2 100644
--- a/rigs/yaesu/newcat.h
+++ b/rigs/yaesu/newcat.h
@@ -50,7 +50,7 @@
typedef char ncboolean;
/* shared function version */
-#define NEWCAT_VER "20210117"
+#define NEWCAT_VER "20210118"
/* Hopefully large enough for future use, 128 chars plus '\0' */
#define NEWCAT_DATA_LEN 129
-----------------------------------------------------------------------
Summary of changes:
rigs/yaesu/newcat.c | 55 ++++++++++++++++++++++++++++++++++++++++++++---------
rigs/yaesu/newcat.h | 2 +-
2 files changed, 47 insertions(+), 10 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-18 14:48:37
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via 2654503779c286da567ab64e95f551f163120b79 (commit)
from 60279707e2b5d494d9b431789f9b97ea9edc1717 (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 2654503779c286da567ab64e95f551f163120b79
Author: Michael Black W9MDB <mdb...@ya...>
Date: Mon Jan 18 08:48:10 2021 -0600
small improvement on caching check logic
diff --git a/src/rig.c b/src/rig.c
index 1889add0..e27db2b5 100644
--- a/src/rig.c
+++ b/src/rig.c
@@ -1673,10 +1673,8 @@ int HAMLIB_API rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
//cache_ms = elapsed_ms(&rig->state.cache.time_freq, HAMLIB_ELAPSED_GET);
//rig_debug(RIG_DEBUG_TRACE, "%s: cache check2 age=%dms\n", __func__, cache_ms);
- if (freq != 0 && cache_ms < rig->state.cache.timeout_ms
- && rig->state.cache.vfo_freq == vfo)
+ if (freq != 0 && cache_ms < rig->state.cache.timeout_ms)
{
- *freq = rig->state.cache.freq;
rig_debug(RIG_DEBUG_TRACE, "%s: %s cache hit age=%dms, freq=%.0f\n", __func__,
rig_strvfo(vfo), cache_ms, *freq);
RETURNFUNC(RIG_OK);
-----------------------------------------------------------------------
Summary of changes:
src/rig.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-18 14:39:14
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via 60279707e2b5d494d9b431789f9b97ea9edc1717 (commit)
from 5cd82c40262f6ddccd47ff74c739d770646dc509 (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 60279707e2b5d494d9b431789f9b97ea9edc1717
Author: Michael Black W9MDB <mdb...@ya...>
Date: Mon Jan 18 08:28:20 2021 -0600
Fix VFOB caching
diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h
index 5dfc56f8..c2149dcb 100644
--- a/include/hamlib/rig.h
+++ b/include/hamlib/rig.h
@@ -2074,9 +2074,12 @@ struct rig_cache {
freq_t freqCurr; // VFO_CURR
freq_t freqMainA; // VFO_A, VFO_MAIN, and VFO_MAINA
freq_t freqMainB; // VFO_B, VFO_SUB, and VFO_MAINB
- freq_t freqMainC; // VFO_C (future MainC?)
+ freq_t freqMainC; // VFO_C, VFO_MAINC
freq_t freqSubA; // VFO_SUBA -- only for rigs with dual Sub VFOs
freq_t freqSubB; // VFO_SUBB -- only for rigs with dual Sub VFOs
+#if 0 // future
+ freq_t freqSubC; // VFO_SUBC -- only for rigs with 3 Sub VFOs
+#endif
rmode_t mode;
pbwidth_t width;
ptt_t ptt;
diff --git a/src/rig.c b/src/rig.c
old mode 100755
new mode 100644
index df405654..1889add0
--- a/src/rig.c
+++ b/src/rig.c
@@ -1322,6 +1322,11 @@ int twiddling(RIG *rig)
/* caching prototype to be fully implemented in 4.1 */
static int set_cache_freq(RIG *rig, vfo_t vfo, freq_t freq)
{
+ rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s, current_vfo=%s\n", __func__,
+ rig_strvfo(vfo), rig_strvfo(rig->state.current_vfo));
+
+ if (vfo == RIG_VFO_CURR) { vfo = rig->state.current_vfo; }
+
switch (vfo)
{
case RIG_VFO_CURR:
@@ -1343,10 +1348,13 @@ static int set_cache_freq(RIG *rig, vfo_t vfo, freq_t freq)
elapsed_ms(&rig->state.cache.time_freqMainB, HAMLIB_ELAPSED_SET);
break;
+#if 0
+
case RIG_VFO_C: // is there a MainC/SubC we need to cover?
rig->state.cache.freqMainC = freq;
elapsed_ms(&rig->state.cache.time_freqMainC, HAMLIB_ELAPSED_SET);
break;
+#endif
case RIG_VFO_SUB_A:
rig->state.cache.freqSubA = freq;
@@ -1370,32 +1378,56 @@ static int set_cache_freq(RIG *rig, vfo_t vfo, freq_t freq)
/* caching prototype to be fully implemented in 4.1 */
static int get_cache_freq(RIG *rig, vfo_t vfo, freq_t *freq, int *cache_ms)
{
+ rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s, current_vfo=%s\n", __func__,
+ rig_strvfo(vfo), rig_strvfo(rig->state.current_vfo));
+
+ if (vfo == RIG_VFO_CURR) { vfo = rig->state.current_vfo; }
+
// VFO_C to be implemented
switch (vfo)
{
case RIG_VFO_CURR:
*freq = rig->state.cache.freqCurr;
+ *cache_ms = elapsed_ms(&rig->state.cache.time_freqCurr, HAMLIB_ELAPSED_GET);
break;
case RIG_VFO_A:
case RIG_VFO_MAIN:
case RIG_VFO_MAIN_A:
*freq = rig->state.cache.freqMainA;
+ *cache_ms = elapsed_ms(&rig->state.cache.time_freqMainA, HAMLIB_ELAPSED_GET);
break;
case RIG_VFO_B:
case RIG_VFO_SUB:
*freq = rig->state.cache.freqMainB;
+ *cache_ms = elapsed_ms(&rig->state.cache.time_freqMainB, HAMLIB_ELAPSED_GET);
break;
case RIG_VFO_SUB_A:
*freq = rig->state.cache.freqSubA;
+ *cache_ms = elapsed_ms(&rig->state.cache.time_freqSubA, HAMLIB_ELAPSED_GET);
break;
case RIG_VFO_SUB_B:
*freq = rig->state.cache.freqSubB;
+ *cache_ms = elapsed_ms(&rig->state.cache.time_freqSubB, HAMLIB_ELAPSED_GET);
+ break;
+
+#if 0 // future
+
+ case RIG_VFO_C:
+ case RIG_VFO_MAINC:
+ *freq = rig->state.cache.freqMainC;
+ *cache_ms = rig->state.cache.time_freqMainC;
break;
+ case RIG_VFO_SUBC:
+ *freq = rig->state.cache.freqSubC;
+ *cache_ms = rig->state.cache.time_freqSubC;
+ break;
+#endif
+
default:
rig_debug(RIG_DEBUG_ERR, "%s: unknown vfo?, vfo=%s\n", __func__,
rig_strvfo(vfo));
@@ -1462,7 +1494,8 @@ int HAMLIB_API rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
{
rig_debug(RIG_DEBUG_TRACE, "%s: Ignoring set_freq due to VFO twiddling\n",
__func__);
- RETURNFUNC(RIG_OK); // would be better as error but other software won't handle errors
+ RETURNFUNC(
+ RIG_OK); // would be better as error but other software won't handle errors
}
rig_debug(RIG_DEBUG_TRACE, "%s: TARGETABLE_FREQ vfo=%s\n", __func__,
@@ -1485,7 +1518,8 @@ int HAMLIB_API rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
{
rig_debug(RIG_DEBUG_TRACE, "%s: Ignoring set_freq due to VFO twiddling\n",
__func__);
- RETURNFUNC(RIG_OK); // would be better as error but other software won't handle errors
+ RETURNFUNC(
+ RIG_OK); // would be better as error but other software won't handle errors
}
curr_vfo = rig->state.current_vfo;
@@ -1632,12 +1666,15 @@ int HAMLIB_API rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
//future 4.1 caching
+ cache_ms = 10000;
get_cache_freq(rig, vfo, freq, &cache_ms);
+ rig_debug(RIG_DEBUG_TRACE, "%s: cache check1 age=%dms\n", __func__, cache_ms);
//future 4.1 caching needs to check individual VFO timeouts
- cache_ms = elapsed_ms(&rig->state.cache.time_freq, HAMLIB_ELAPSED_GET);
- rig_debug(RIG_DEBUG_TRACE, "%s: cache check age=%dms\n", __func__, cache_ms);
+ //cache_ms = elapsed_ms(&rig->state.cache.time_freq, HAMLIB_ELAPSED_GET);
+ //rig_debug(RIG_DEBUG_TRACE, "%s: cache check2 age=%dms\n", __func__, cache_ms);
- if (cache_ms < rig->state.cache.timeout_ms && rig->state.cache.vfo_freq == vfo)
+ if (freq != 0 && cache_ms < rig->state.cache.timeout_ms
+ && rig->state.cache.vfo_freq == vfo)
{
*freq = rig->state.cache.freq;
rig_debug(RIG_DEBUG_TRACE, "%s: %s cache hit age=%dms, freq=%.0f\n", __func__,
@@ -2160,7 +2197,8 @@ int HAMLIB_API rig_set_vfo(RIG *rig, vfo_t vfo)
{
rig_debug(RIG_DEBUG_TRACE, "%s: Ignoring set_vfo due to VFO twiddling\n",
__func__);
- RETURNFUNC(RIG_OK); // would be better as error but other software won't handle errors
+ RETURNFUNC(
+ RIG_OK); // would be better as error but other software won't handle errors
}
retcode = caps->set_vfo(rig, vfo);
@@ -4550,7 +4588,7 @@ int HAMLIB_API rig_mW2power(RIG *rig,
*power = 1.0;
}
- RETURNFUNC (mwpower > txrange->high_power ? RIG_OK : -RIG_ETRUNC);
+ RETURNFUNC(mwpower > txrange->high_power ? RIG_OK : -RIG_ETRUNC);
}
@@ -4782,7 +4820,7 @@ vfo_op_t HAMLIB_API rig_has_vfo_op(RIG *rig, vfo_op_t op)
RETURNFUNC(0);
}
- RETURNFUNC (rig->caps->vfo_ops & op);
+ RETURNFUNC(rig->caps->vfo_ops & op);
}
@@ -4880,7 +4918,7 @@ scan_t HAMLIB_API rig_has_scan(RIG *rig, scan_t scan)
RETURNFUNC(0);
}
- RETURNFUNC (rig->caps->scan_ops & scan);
+ RETURNFUNC(rig->caps->scan_ops & scan);
}
-----------------------------------------------------------------------
Summary of changes:
include/hamlib/rig.h | 5 ++++-
src/rig.c | 56 +++++++++++++++++++++++++++++++++++++++++++---------
2 files changed, 51 insertions(+), 10 deletions(-)
mode change 100755 => 100644 src/rig.c
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-18 04:25:48
|
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 5cd82c40262f6ddccd47ff74c739d770646dc509 (commit)
from ce96f424835a5140c000639a17dec5bb45c4ee07 (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 5cd82c40262f6ddccd47ff74c739d770646dc509
Author: Michael Black W9MDB <mdb...@ya...>
Date: Sun Jan 17 22:24:39 2021 -0600
Change print format on a few freq items
diff --git a/src/rig.c b/src/rig.c
index 908d4f4a..df405654 100755
--- a/src/rig.c
+++ b/src/rig.c
@@ -1402,7 +1402,7 @@ static int get_cache_freq(RIG *rig, vfo_t vfo, freq_t *freq, int *cache_ms)
RETURNFUNC(-RIG_EINVAL);
}
- rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s, freq=%g\n", __func__, rig_strvfo(vfo),
+ rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s, freq=%.0f\n", __func__, rig_strvfo(vfo),
(double)*freq);
RETURNFUNC(RIG_OK);
}
@@ -1427,7 +1427,7 @@ int HAMLIB_API rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
int retcode;
freq_t freq_new = freq;
- rig_debug(RIG_DEBUG_VERBOSE, "%s called vfo=%s, freq=%g\n", __func__,
+ rig_debug(RIG_DEBUG_VERBOSE, "%s called vfo=%s, freq=%.0f\n", __func__,
rig_strvfo(vfo), freq);
if (CHECK_RIG_ARG(rig))
@@ -1535,7 +1535,7 @@ int HAMLIB_API rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
if (freq_new != freq)
{
- rig_debug(RIG_DEBUG_TRACE, "%s: Asked freq=%g, got freq=%g\n", __func__,
+ rig_debug(RIG_DEBUG_TRACE, "%s: Asked freq=%.0fg, got freq=%.0fg\n", __func__,
freq,
freq_new);
}
-----------------------------------------------------------------------
Summary of changes:
src/rig.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-17 23:17: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 ce96f424835a5140c000639a17dec5bb45c4ee07 (commit)
via 34d7eb6c33296172c77af67b000d9104dcac0d40 (commit)
from 4d7c988bec70c17350189f83a0a8700d2de6e939 (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 ce96f424835a5140c000639a17dec5bb45c4ee07
Author: Michael Black W9MDB <mdb...@ya...>
Date: Sun Jan 17 17:16:50 2021 -0600
Fix RETURNFUNC in misc.h
diff --git a/src/misc.h b/src/misc.h
index e3b803c3..e86a6ccd 100644
--- a/src/misc.h
+++ b/src/misc.h
@@ -141,7 +141,7 @@ extern HAMLIB_EXPORT(int) parse_hoststr(char *host, char hoststr[256], char port
void errmsg(int err, char *s, const char *func, const char *file, int line);
#define ERRMSG(err, s) errmsg(err, s, __func__, __FILE__, __LINE__)
#define ENTERFUNC rig_debug(RIG_DEBUG_VERBOSE, "%s(%d):%s entered\n", __FILE__, __LINE__, __func__)
-#define RETURNFUNC(rc) rig_debug(RIG_DEBUG_VERBOSE, "%s(%d):%s return\n", __FILE__, __LINE__, __func__);return rc
+#define RETURNFUNC(rc) {rig_debug(RIG_DEBUG_VERBOSE, "%s(%d):%s return\n", __FILE__, __LINE__, __func__);return rc;}
__END_DECLS
commit 34d7eb6c33296172c77af67b000d9104dcac0d40
Author: Michael Black W9MDB <mdb...@ya...>
Date: Sun Jan 17 15:50:00 2021 -0600
prm80 add extra read_string for 2-line response to set_freq
diff --git a/rigs/prm80/prm80.c b/rigs/prm80/prm80.c
index 5c69a462..0a026921 100644
--- a/rigs/prm80/prm80.c
+++ b/rigs/prm80/prm80.c
@@ -248,14 +248,19 @@ int prm80_reset(RIG *rig, reset_t reset)
int prm80_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
{
char freqbuf[BUFSZ];
+ char data[BUFSZ];
int freq_len;
+ int rc;
+ struct rig_state *rs = &rig->state;
/* wild guess */
freq_len = sprintf(freqbuf, "R%04X%04X",
(unsigned)(freq / 12500.),
(unsigned)(freq / 12500.));
- return prm80_transaction(rig, freqbuf, freq_len, NULL, NULL);
+ rc = prm80_transaction(rig, freqbuf, freq_len, NULL, NULL);
+ read_string(&rs->rigport, data, BUFSZ, LF, strlen(LF));
+ return rc;
}
/*
-----------------------------------------------------------------------
Summary of changes:
rigs/prm80/prm80.c | 7 ++++++-
src/misc.h | 2 +-
2 files changed, 7 insertions(+), 2 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-17 21:36:34
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via 4d7c988bec70c17350189f83a0a8700d2de6e939 (commit)
from b1b6a0a7711e48a1c3b2a3e7f85a3e029929d4bc (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 4d7c988bec70c17350189f83a0a8700d2de6e939
Author: Michael Black W9MDB <mdb...@ya...>
Date: Sun Jan 17 15:35:40 2021 -0600
Add some debug and another attempt to fix rig_set_cmd_validate setting the frequency correctly
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index d8607a5b..74c4d121 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -814,9 +814,10 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
// And only when not in split mode (note this check has been removed for testing)
int changing;
- rig_debug(RIG_DEBUG_TRACE, "%s: rig->state.current_vfo=%s\n", __func__, rig_strvfo(rig->state.current_vfo));
- if (target_vfo == 0)
+ rig_debug(RIG_DEBUG_TRACE, "%s(%d)%s: rig->state.current_vfo=%s\n", __FILE__, __LINE__, __func__, rig_strvfo(rig->state.current_vfo));
+ if (rig->state.current_vfo == RIG_VFO_A || rig->state.current_vfo == RIG_VFO_MAIN)
{
+ rig_debug(RIG_DEBUG_TRACE, "%s(%d)%s: checking VFOA for band change \n", __FILE__, __LINE__, __func__);
if (rig->state.cache.freqMainA == 0)
{
freq_t freqtmp;
@@ -825,10 +826,11 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
}
changing = newcat_band_index(freq) != newcat_band_index(
rig->state.cache.freqMainA);
- rig_debug(RIG_DEBUG_TRACE, "%s: VFO_A freq changing=%d\n", __func__, changing);
+ rig_debug(RIG_DEBUG_TRACE, "%s: VFO_A band changing=%d\n", __func__, changing);
}
else
{
+ rig_debug(RIG_DEBUG_TRACE, "%s(%d)%s: checking VFOB for band change \n", __FILE__, __LINE__, __func__);
if (rig->state.cache.freqMainB == 0)
{
freq_t freqtmp;
@@ -837,7 +839,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
}
changing = newcat_band_index(freq) != newcat_band_index(
rig->state.cache.freqMainB);
- rig_debug(RIG_DEBUG_TRACE, "%s: VFO_B freq changing=%d\n", __func__, changing);
+ rig_debug(RIG_DEBUG_TRACE, "%s: VFO_B band changing=%d\n", __func__, changing);
}
if (newcat_valid_command(rig, "BS") && changing
@@ -6464,7 +6466,7 @@ ncboolean newcat_valid_command(RIG *rig, char const *const command)
int search_high;
int search_low;
- ENTERFUNC;
+ //ENTERFUNC;
rig_debug(RIG_DEBUG_TRACE, "%s %s\n", __func__, command);
caps = rig->caps;
-----------------------------------------------------------------------
Summary of changes:
rigs/yaesu/newcat.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-17 17:59:49
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via b1b6a0a7711e48a1c3b2a3e7f85a3e029929d4bc (commit)
from 6e25cdd6b9b6e09b8649231757bc8ad129725192 (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 b1b6a0a7711e48a1c3b2a3e7f85a3e029929d4bc
Author: Michael Black W9MDB <mdb...@ya...>
Date: Sun Jan 17 11:59:26 2021 -0600
Fix range_list check in src.c
diff --git a/src/rig.c b/src/rig.c
index a9fbd91e..908d4f4a 100755
--- a/src/rig.c
+++ b/src/rig.c
@@ -426,7 +426,7 @@ RIG *HAMLIB_API rig_init(rig_model_t rig_model)
sizeof(struct freq_range_list)*FRQRANGESIZ);
// if we don't have list1 we'll try list2
- if (rs->rx_range_list == NULL)
+ if (rs->rx_range_list[0].startf == 0)
{
rig_debug(RIG_DEBUG_TRACE,
"%s: rx_range_list1 is empty, using rx_range_list2\n", __func__);
-----------------------------------------------------------------------
Summary of changes:
src/rig.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-17 17:34:03
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via 6e25cdd6b9b6e09b8649231757bc8ad129725192 (commit)
via 65970cab0e4ed52108548cb32aa9b11def785ed1 (commit)
from a0ee23b178f4a33dd35d67669f56ede32c9d8a58 (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 6e25cdd6b9b6e09b8649231757bc8ad129725192
Author: Michael Black W9MDB <mdb...@ya...>
Date: Sun Jan 17 11:33:36 2021 -0600
Update debug in newcat.c
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index b876746f..d8607a5b 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -560,7 +560,7 @@ int newcat_open(RIG *rig)
if (RIG_OK != (err = newcat_set_cmd(rig)))
{
- return err;
+ RETURNFUNC(err);
}
}
@@ -730,7 +730,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
if (err < 0)
{
ERRMSG(err, "newcat_set_vfo_from_alias");
- return err;
+ RETURNFUNC(err);
}
/* vfo should now be modified to a valid VFO constant. */
@@ -764,7 +764,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
break;
default:
- return -RIG_ENIMPL; /* Only VFO_A or VFO_B are valid */
+ RETURNFUNC(-RIG_ENIMPL); /* Only VFO_A or VFO_B are valid */
}
target_vfo = 'A' == c ? '0' : '1';
@@ -780,7 +780,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
if (RIG_OK != (err = newcat_get_cmd(rig)))
{
ERRMSG(err, "newcat_get_cmd");
- return err;
+ RETURNFUNC(err);
}
if (priv->ret_data[2] != target_vfo)
@@ -791,7 +791,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
if (RIG_OK != (err = newcat_set_cmd(rig)))
{
ERRMSG(err, "newcat_set_cmd failed");
- return err;
+ RETURNFUNC(err);
}
}
}
@@ -877,7 +877,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
freq_t freqtmp;
err = rig_get_vfo(rig, &vfotmp);
- if (err != RIG_OK) { return err; }
+ if (err != RIG_OK) { RETURNFUNC(err); }
if (rig->state.vfo_list & RIG_VFO_MAIN)
{
@@ -888,11 +888,11 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
err = rig_set_vfo(rig, vfotmp == RIG_VFO_A ? RIG_VFO_B : RIG_VFO_A);
}
- if (err != RIG_OK) { return err; }
+ if (err != RIG_OK) { RETURNFUNC(err); }
rig_get_freq(rig, RIG_VFO_CURR, &freqtmp);
- if (err != RIG_OK) { return err; }
+ if (err != RIG_OK) { RETURNFUNC(err); }
// Cross band should work too
// If the BS works on both VFOs then VFOB will have the band select answer
@@ -926,7 +926,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
{
rig_debug(RIG_DEBUG_ERR, "%s: rig_set_vfo failed: %s\n", __func__,
rigerror(err));
- return err;
+ RETURNFUNC(err);
}
// after band select re-read things -- may not have to change anything
@@ -961,7 +961,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s:%d command err = %d\n", __func__, __LINE__,
err);
- return err;
+ RETURNFUNC(err);
}
rig_debug(RIG_DEBUG_TRACE, "%s: band changing? old=%d, new=%d\n", __func__,
@@ -977,7 +977,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s:%d command err = %d\n", __func__, __LINE__,
err);
- return err;
+ RETURNFUNC(err);
}
}
@@ -1017,7 +1017,7 @@ int newcat_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
if (err < 0)
{
- return err;
+ RETURNFUNC(err);
}
switch (vfo)
@@ -1056,7 +1056,7 @@ int newcat_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
/* get freq */
if (RIG_OK != (err = newcat_get_cmd(rig)))
{
- return err;
+ RETURNFUNC(err);
}
/* convert the read frequency string into freq_t and store in *freq */
@@ -1089,7 +1089,7 @@ int newcat_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
if (err < 0)
{
- return err;
+ RETURNFUNC(err);
}
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "MD0x%c", cat_term);
@@ -1116,10 +1116,10 @@ int newcat_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
if (err != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
- if (RIG_PASSBAND_NOCHANGE == width) { return err; }
+ if (RIG_PASSBAND_NOCHANGE == width) { RETURNFUNC(err); }
if (RIG_PASSBAND_NORMAL == width)
{
@@ -1145,7 +1145,7 @@ int newcat_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
}
}
- return err;
+ RETURNFUNC(err);
}
@@ -1167,7 +1167,7 @@ int newcat_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
if (err < 0)
{
- return err;
+ RETURNFUNC(err);
}
if (rig->caps->targetable_vfo & RIG_TARGETABLE_MODE)
@@ -1184,7 +1184,7 @@ int newcat_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
/* Get MODE */
if (RIG_OK != (err = newcat_get_cmd(rig)))
{
- return err;
+ RETURNFUNC(err);
}
/*
@@ -1201,7 +1201,7 @@ int newcat_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
if (*mode == '0')
{
rig_debug(RIG_DEBUG_ERR, "%s: *mode = '0'??\n", __func__);
- return -RIG_EPROTO;
+ RETURNFUNC(-RIG_EPROTO);
}
if (RIG_PASSBAND_NORMAL == *width)
@@ -1210,7 +1210,7 @@ int newcat_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
}
rig_debug(RIG_DEBUG_TRACE, "%s: returning newcat_get_rx_bandwidth\n", __func__);
- return newcat_get_rx_bandwidth(rig, vfo, *mode, width);
+ RETURNFUNC(newcat_get_rx_bandwidth(rig, vfo, *mode, width));
}
/*
@@ -1249,7 +1249,7 @@ int newcat_set_vfo(RIG *rig, vfo_t vfo)
if (err < 0)
{
- return err;
+ RETURNFUNC(err);
}
switch (vfo)
@@ -1271,7 +1271,7 @@ int newcat_set_vfo(RIG *rig, vfo_t vfo)
if (err != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
if (vfo_mode == RIG_VFO_MEM)
@@ -1279,7 +1279,7 @@ int newcat_set_vfo(RIG *rig, vfo_t vfo)
priv->current_mem = NC_MEM_CHANNEL_NONE;
state->current_vfo = RIG_VFO_A;
err = newcat_vfomem_toggle(rig);
- return err;
+ RETURNFUNC(err);
}
break;
@@ -1290,7 +1290,7 @@ int newcat_set_vfo(RIG *rig, vfo_t vfo)
/* Only works correctly for VFO A */
if (state->current_vfo != RIG_VFO_A && state->current_vfo != RIG_VFO_MAIN)
{
- return -RIG_ENTARGET;
+ RETURNFUNC(-RIG_ENTARGET);
}
/* get current memory channel */
@@ -1298,7 +1298,7 @@ int newcat_set_vfo(RIG *rig, vfo_t vfo)
if (err != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
/* turn on memory channel */
@@ -1306,7 +1306,7 @@ int newcat_set_vfo(RIG *rig, vfo_t vfo)
if (err != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
/* Set current_mem now */
@@ -1318,7 +1318,7 @@ int newcat_set_vfo(RIG *rig, vfo_t vfo)
RETURNFUNC(RIG_OK);
default:
- return -RIG_ENIMPL; /* sorry, VFO not implemented */
+ RETURNFUNC(-RIG_ENIMPL); /* sorry, VFO not implemented */
}
/* Build the command string */
@@ -1330,7 +1330,7 @@ int newcat_set_vfo(RIG *rig, vfo_t vfo)
if (err != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
state->current_vfo = vfo; /* if set_vfo worked, set current_vfo */
@@ -1363,7 +1363,7 @@ static vfo_t newcat_set_vfo_if_needed(RIG *rig, vfo_t vfo)
}
}
- return oldvfo;
+ RETURNFUNC(oldvfo);
}
/*
@@ -1402,7 +1402,7 @@ int newcat_get_vfo(RIG *rig, vfo_t *vfo)
/* Get VFO */
if (RIG_OK != (err = newcat_get_cmd(rig)))
{
- return err;
+ RETURNFUNC(err);
}
/*
@@ -1424,7 +1424,7 @@ int newcat_get_vfo(RIG *rig, vfo_t *vfo)
break;
default:
- return -RIG_EPROTO; /* sorry, wrong current VFO */
+ RETURNFUNC(-RIG_EPROTO); /* sorry, wrong current VFO */
}
/* Check to see if RIG is in MEM mode */
@@ -1432,7 +1432,7 @@ int newcat_get_vfo(RIG *rig, vfo_t *vfo)
if (err != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
if (vfo_mode == RIG_VFO_MEM)
@@ -1492,7 +1492,7 @@ int newcat_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
RETURNFUNC(-RIG_EINVAL);
}
- return err;
+ RETURNFUNC(err);
}
@@ -1516,7 +1516,7 @@ int newcat_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
/* Get PTT */
if (RIG_OK != (err = newcat_get_cmd(rig)))
{
- return err;
+ RETURNFUNC(err);
}
c = priv->ret_data[2];
@@ -1534,7 +1534,7 @@ int newcat_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
break;
default:
- return -RIG_EPROTO;
+ RETURNFUNC(-RIG_EPROTO);
}
RETURNFUNC(RIG_OK);
@@ -1569,7 +1569,7 @@ int newcat_set_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift)
if (err < 0)
{
- return err;
+ RETURNFUNC(err);
}
if (rig->caps->targetable_vfo & RIG_TARGETABLE_MODE)
@@ -1598,7 +1598,7 @@ int newcat_set_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift)
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "%s%c%c%c", command,
main_sub_vfo, c, cat_term);
- return newcat_set_cmd(rig);
+ RETURNFUNC(newcat_set_cmd(rig));
}
@@ -1622,7 +1622,7 @@ int newcat_get_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift)
if (err < 0)
{
- return err;
+ RETURNFUNC(err);
}
if (rig->caps->targetable_vfo & RIG_TARGETABLE_MODE)
@@ -1636,7 +1636,7 @@ int newcat_get_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift)
/* Get Rptr Shift */
if (RIG_OK != (err = newcat_get_cmd(rig)))
{
- return err;
+ RETURNFUNC(err);
}
c = priv->ret_data[3];
@@ -1676,7 +1676,7 @@ int newcat_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t offs)
if (err < 0)
{
- return err;
+ RETURNFUNC(err);
}
if (is_ft450)
@@ -1882,7 +1882,7 @@ int newcat_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t offs)
RETURNFUNC(-RIG_ENAVAIL);
}
- return newcat_set_cmd(rig);
+ RETURNFUNC(newcat_set_cmd(rig));
}
@@ -1901,7 +1901,7 @@ int newcat_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *offs)
if (err < 0)
{
- return err;
+ RETURNFUNC(err);
}
if (is_ft450)
@@ -2096,7 +2096,7 @@ int newcat_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *offs)
if (err != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
ret_data_len = strlen(priv->ret_data);
@@ -2157,7 +2157,7 @@ int newcat_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
if (err < 0)
{
- return err;
+ RETURNFUNC(err);
}
if (is_ft991)
@@ -2176,7 +2176,7 @@ int newcat_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
if (err != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
}
@@ -2187,7 +2187,7 @@ int newcat_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
if (err != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
if (rx_vfo != vfo && newcat_valid_command(rig, "VS"))
@@ -2196,7 +2196,7 @@ int newcat_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
if (err != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
}
@@ -2207,7 +2207,7 @@ int newcat_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
if (err != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
if (rx_vfo != vfo)
@@ -2216,7 +2216,7 @@ int newcat_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
if (err != RIG_OK && err != -RIG_ENAVAIL)
{
- return err;
+ RETURNFUNC(err);
}
}
@@ -2240,14 +2240,14 @@ int newcat_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo)
if (err != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
err = newcat_get_tx_vfo(rig, tx_vfo);
if (err != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
// we assume split is always on VFO_B
@@ -2348,7 +2348,7 @@ int newcat_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit)
/* Get RIT */
if (RIG_OK != (err = newcat_get_cmd(rig)))
{
- return err;
+ RETURNFUNC(err);
}
// e.g. FT450 has 27 byte IF response, FT991 has 28 byte if response (one more byte for P2 VFO A Freq)
@@ -2368,7 +2368,7 @@ int newcat_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit)
rig_debug(RIG_DEBUG_ERR,
"%s: incorrect length of IF response, expected 27 or 28, got %du", __func__,
(int)strlen(priv->ret_data));
- return -RIG_EPROTO;
+ RETURNFUNC(-RIG_EPROTO);
}
retval = priv->ret_data + offset;
@@ -2463,7 +2463,7 @@ int newcat_get_xit(RIG *rig, vfo_t vfo, shortfreq_t *xit)
/* Get XIT */
if (RIG_OK != (err = newcat_get_cmd(rig)))
{
- return err;
+ RETURNFUNC(err);
}
// e.g. FT450 has 27 byte IF response, FT991 has 28 byte if response (one more byte for P2 VFO A Freq)
@@ -2483,7 +2483,7 @@ int newcat_get_xit(RIG *rig, vfo_t vfo, shortfreq_t *xit)
rig_debug(RIG_DEBUG_ERR,
"%s: incorrect length of IF response, expected 27 or 28, got %du", __func__,
(int)strlen(priv->ret_data));
- return -RIG_EPROTO;
+ RETURNFUNC(-RIG_EPROTO);
}
retval = priv->ret_data + offset;
@@ -2509,7 +2509,7 @@ int newcat_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts)
if (err < 0)
{
- return err;
+ RETURNFUNC(err);
}
/* assume 2 tuning steps per mode */
@@ -2528,7 +2528,7 @@ int newcat_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts)
if (err != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
ts_match = TRUE;
@@ -2564,14 +2564,14 @@ int newcat_get_ts(RIG *rig, vfo_t vfo, shortfreq_t *ts)
if (err < 0)
{
- return err;
+ RETURNFUNC(err);
}
err = newcat_get_faststep(rig, &fast_step);
if (err < 0)
{
- return err;
+ RETURNFUNC(err);
}
/* assume 2 tuning steps per mode */
@@ -2662,7 +2662,7 @@ int newcat_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone)
if (err < 0)
{
- return err;
+ RETURNFUNC(err);
}
if (rig->caps->targetable_vfo & RIG_TARGETABLE_MODE)
@@ -2704,7 +2704,7 @@ int newcat_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone)
}
}
- return newcat_set_cmd(rig);
+ RETURNFUNC(newcat_set_cmd(rig));
}
@@ -2729,7 +2729,7 @@ int newcat_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone)
if (err < 0)
{
- return err;
+ RETURNFUNC(err);
}
if (rig->caps->targetable_vfo & RIG_TARGETABLE_MODE)
@@ -2751,7 +2751,7 @@ int newcat_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone)
/* Get CTCSS TONE */
if (RIG_OK != (err = newcat_get_cmd(rig)))
{
- return err;
+ RETURNFUNC(err);
}
ret_data_len = strlen(priv->ret_data);
@@ -2816,7 +2816,7 @@ int newcat_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone)
if (err != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
/* Change to sql */
@@ -2826,7 +2826,7 @@ int newcat_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone)
if (err != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
}
@@ -2842,7 +2842,7 @@ int newcat_get_ctcss_sql(RIG *rig, vfo_t vfo, tone_t *tone)
err = newcat_get_ctcss_tone(rig, vfo, tone);
- return err;
+ RETURNFUNC(err);
}
@@ -3117,7 +3117,7 @@ int newcat_get_powerstat(RIG *rig, powerstat_t *status)
/* Get Power status */
if (RIG_OK != (err = newcat_get_cmd(rig)))
{
- return err;
+ RETURNFUNC(err);
}
ps = priv->ret_data[2];
@@ -3168,7 +3168,7 @@ int newcat_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option)
if (err < 0)
{
- return err;
+ RETURNFUNC(err);
}
if ((rig->caps->targetable_vfo & RIG_TARGETABLE_ANT))
@@ -3235,7 +3235,7 @@ int newcat_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option)
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "%s%c%c%c", command,
main_sub_vfo, which_ant, cat_term);
- return newcat_set_cmd(rig);
+ RETURNFUNC(newcat_set_cmd(rig));
}
@@ -3260,7 +3260,7 @@ int newcat_get_ant(RIG *rig, vfo_t vfo, ant_t dummy, value_t *option,
if (err < 0)
{
- return err;
+ RETURNFUNC(err);
}
if ((rig->caps->targetable_vfo & RIG_TARGETABLE_MODE) && !is_ft2000)
@@ -3274,7 +3274,7 @@ int newcat_get_ant(RIG *rig, vfo_t vfo, ant_t dummy, value_t *option,
/* Get ANT */
if (RIG_OK != (err = newcat_get_cmd(rig)))
{
- return err;
+ RETURNFUNC(err);
}
c = priv->ret_data[3];
@@ -3303,7 +3303,7 @@ int newcat_get_ant(RIG *rig, vfo_t vfo, ant_t dummy, value_t *option,
default:
*ant_curr = RIG_ANT_UNKNOWN;
- return -RIG_EPROTO;
+ RETURNFUNC(-RIG_EPROTO);
}
RETURNFUNC(RIG_OK);
@@ -3328,7 +3328,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
if (err < 0)
{
- return err;
+ RETURNFUNC(err);
}
if (rig->caps->targetable_vfo & RIG_TARGETABLE_LEVEL)
@@ -3810,7 +3810,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
if (err != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
millis = dot10ths_to_millis(val.i, keyspd.i);
@@ -4129,7 +4129,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
// Clear flag after executing command
priv->question_mark_response_means_rejected = 0;
- return err;
+ RETURNFUNC(err);
}
@@ -4152,7 +4152,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
if (err < 0)
{
- return err;
+ RETURNFUNC(err);
}
if (rig->caps->targetable_vfo & RIG_TARGETABLE_LEVEL)
@@ -4550,7 +4550,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
if (err != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
ret_data_len = strlen(priv->ret_data);
@@ -4817,7 +4817,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
if (err != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
val->i = millis_to_dot10ths(millis, keyspd.i);
@@ -4929,7 +4929,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
if (retlvl[0] < '0' || retlvl[0] > '9')
{
- return -RIG_EPROTO;
+ RETURNFUNC(-RIG_EPROTO);
}
preamp = retlvl[0] - '0';
@@ -4957,7 +4957,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
if (retlvl[0] < '0' || retlvl[0] > '9')
{
- return -RIG_EPROTO;
+ RETURNFUNC(-RIG_EPROTO);
}
att = retlvl[0] - '0';
@@ -5004,7 +5004,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
val->i = RIG_AGC_AUTO; break;
default:
- return -RIG_EPROTO;
+ RETURNFUNC(-RIG_EPROTO);
}
break;
@@ -5037,7 +5037,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
case '5': val->i = RIG_METER_VDD; break; /* Final Amp Voltage */
- default: return -RIG_EPROTO;
+ default: RETURNFUNC(-RIG_EPROTO);
}
break;
@@ -5080,7 +5080,7 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
if (err < 0)
{
- return err;
+ RETURNFUNC(err);
}
if (rig->caps->targetable_vfo & (RIG_TARGETABLE_MODE | RIG_TARGETABLE_TONE))
@@ -5374,7 +5374,7 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
// Clear flag after executing command
priv->question_mark_response_means_rejected = 0;
- return err;
+ RETURNFUNC(err);
}
@@ -5596,7 +5596,7 @@ int newcat_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)
if (err != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
ret_data_len = strlen(priv->ret_data);
@@ -5697,7 +5697,7 @@ int newcat_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val)
switch (token)
{
case TOK_ROOFING_FILTER:
- return set_roofing_filter(rig, vfo, val.i);
+ RETURNFUNC(set_roofing_filter(rig, vfo, val.i));
default:
rig_debug(RIG_DEBUG_ERR, "%s: Unsupported ext level %s\n", __func__,
@@ -5820,7 +5820,7 @@ int newcat_set_mem(RIG *rig, vfo_t vfo, int ch)
if (err < 0)
{
- return err;
+ RETURNFUNC(err);
}
if (valid_chan.freq <= 1.0)
@@ -5842,7 +5842,7 @@ int newcat_set_mem(RIG *rig, vfo_t vfo, int ch)
if (err < 0)
{
- return err;
+ RETURNFUNC(err);
}
/* Restore to VFO mode or leave in Memory Mode */
@@ -5863,7 +5863,7 @@ int newcat_set_mem(RIG *rig, vfo_t vfo, int ch)
case RIG_VFO_SUB:
default:
/* Only works with VFO A */
- return -RIG_ENTARGET;
+ RETURNFUNC(-RIG_ENTARGET);
}
/* Set Memory Channel Number ************** */
@@ -5879,7 +5879,7 @@ int newcat_set_mem(RIG *rig, vfo_t vfo, int ch)
if (err != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
/* Restore VFO even if setting to blank memory channel */
@@ -5889,7 +5889,7 @@ int newcat_set_mem(RIG *rig, vfo_t vfo, int ch)
if (err != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
}
@@ -5916,7 +5916,7 @@ int newcat_get_mem(RIG *rig, vfo_t vfo, int *ch)
/* Get Memory Channel Number */
if (RIG_OK != (err = newcat_get_cmd(rig)))
{
- return err;
+ RETURNFUNC(err);
}
*ch = atoi(priv->ret_data + 2);
@@ -5937,7 +5937,7 @@ int newcat_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op)
if (err < 0)
{
- return err;
+ RETURNFUNC(err);
}
if (rig->caps->targetable_vfo & RIG_TARGETABLE_MODE)
@@ -6014,7 +6014,7 @@ int newcat_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op)
RETURNFUNC(-RIG_EINVAL);
}
- return newcat_set_cmd(rig);
+ RETURNFUNC(newcat_set_cmd(rig));
}
@@ -6051,7 +6051,7 @@ int newcat_set_trn(RIG *rig, int trn)
rig_debug(RIG_DEBUG_TRACE, "cmd_str = %s\n", priv->cmd_str);
- return newcat_set_cmd(rig);
+ RETURNFUNC(newcat_set_cmd(rig));
}
@@ -6074,7 +6074,7 @@ int newcat_get_trn(RIG *rig, int *trn)
/* Get Auto Information */
if (RIG_OK != (err = newcat_get_cmd(rig)))
{
- return err;
+ RETURNFUNC(err);
}
c = priv->ret_data[2];
@@ -6158,7 +6158,7 @@ int newcat_set_channel(RIG *rig, vfo_t vfo, const channel_t *chan)
case RIG_VFO_SUB:
default:
/* Only works with VFO Main */
- return -RIG_ENTARGET;
+ RETURNFUNC(-RIG_ENTARGET);
}
/* Write Memory Channel ************************* */
@@ -6244,14 +6244,14 @@ int newcat_set_channel(RIG *rig, vfo_t vfo, const channel_t *chan)
if (err != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
/* Restore VFO ********************************** */
if (restore_vfo)
{
err = newcat_vfomem_toggle(rig);
- return err;
+ RETURNFUNC(err);
}
RETURNFUNC(RIG_OK);
@@ -6317,7 +6317,7 @@ int newcat_get_channel(RIG *rig, vfo_t vfo, channel_t *chan, int read_only)
RETURNFUNC(RIG_OK);
}
- return err;
+ RETURNFUNC(err);
}
/* ret_data string to channel_t struct :: this will destroy ret_data */
@@ -6417,7 +6417,7 @@ int newcat_get_channel(RIG *rig, vfo_t vfo, channel_t *chan, int read_only)
"%s: please contact hamlib mailing list to implement this\n", __func__);
rig_debug(RIG_DEBUG_ERR,
"%s: need to know if rig updates when channel read or not\n", __func__);
- return -RIG_ENIMPL;
+ RETURNFUNC(-RIG_ENIMPL);
}
RETURNFUNC(RIG_OK);
@@ -6439,13 +6439,13 @@ const char *newcat_get_info(RIG *rig)
/* Get Identification Channel */
if (RIG_OK != newcat_get_cmd(rig))
{
- return NULL;
+ RETURNFUNC(NULL);
}
priv->ret_data[6] = '\0';
snprintf(idbuf, sizeof(idbuf), "%s", priv->ret_data);
- return idbuf;
+ RETURNFUNC(idbuf);
}
@@ -6472,7 +6472,7 @@ ncboolean newcat_valid_command(RIG *rig, char const *const command)
if (!caps)
{
rig_debug(RIG_DEBUG_ERR, "%s: Rig capabilities not valid\n", __func__);
- return FALSE;
+ RETURNFUNC(FALSE);
}
/*
@@ -6498,7 +6498,7 @@ ncboolean newcat_valid_command(RIG *rig, char const *const command)
&& !is_ftdx10)
{
rig_debug(RIG_DEBUG_ERR, "%s: '%s' is unknown\n", __func__, caps->model_name);
- return FALSE;
+ RETURNFUNC(FALSE);
}
/*
@@ -6532,60 +6532,60 @@ ncboolean newcat_valid_command(RIG *rig, char const *const command)
*/
if (is_ft450 && valid_commands[search_index].ft450)
{
- return TRUE;
+ RETURNFUNC(TRUE);
}
else if (is_ft891 && valid_commands[search_index].ft891)
{
- return TRUE;
+ RETURNFUNC(TRUE);
}
else if (is_ft950 && valid_commands[search_index].ft950)
{
- return TRUE;
+ RETURNFUNC(TRUE);
}
else if (is_ft991 && valid_commands[search_index].ft991)
{
- return TRUE;
+ RETURNFUNC(TRUE);
}
else if (is_ft2000 && valid_commands[search_index].ft2000)
{
- return TRUE;
+ RETURNFUNC(TRUE);
}
else if (is_ftdx5000 && valid_commands[search_index].ft5000)
{
- return TRUE;
+ RETURNFUNC(TRUE);
}
else if (is_ftdx9000 && valid_commands[search_index].ft9000)
{
- return TRUE;
+ RETURNFUNC(TRUE);
}
else if (is_ftdx1200 && valid_commands[search_index].ft1200)
{
- return TRUE;
+ RETURNFUNC(TRUE);
}
else if (is_ftdx3000 && valid_commands[search_index].ft3000)
{
- return TRUE;
+ RETURNFUNC(TRUE);
}
else if (is_ftdx101 && valid_commands[search_index].ft101)
{
- return TRUE;
+ RETURNFUNC(TRUE);
}
else if (is_ftdx10 && valid_commands[search_index].ft10)
{
- return TRUE;
+ RETURNFUNC(TRUE);
}
else
{
rig_debug(RIG_DEBUG_TRACE, "%s: '%s' command '%s' not supported\n",
__func__, caps->model_name, command);
- return FALSE;
+ RETURNFUNC(FALSE);
}
}
}
rig_debug(RIG_DEBUG_TRACE, "%s: '%s' command '%s' not valid\n",
__func__, caps->model_name, command);
- return FALSE;
+ RETURNFUNC(FALSE);
}
@@ -6597,7 +6597,7 @@ ncboolean newcat_is_rig(RIG *rig, rig_model_t model)
//rig_debug(RIG_DEBUG_TRACE, "%s(%d):%s called\n", __FILE__, __LINE__, __func__);
is_rig = (model == rig->caps->rig_model) ? TRUE : FALSE;
- return is_rig;
+ return(is_rig);
}
@@ -6622,7 +6622,7 @@ int newcat_set_tx_vfo(RIG *rig, vfo_t tx_vfo)
if (err < 0)
{
- return err;
+ RETURNFUNC(err);
}
switch (tx_vfo)
@@ -6680,7 +6680,7 @@ int newcat_set_tx_vfo(RIG *rig, vfo_t tx_vfo)
rig_debug(RIG_DEBUG_TRACE, "cmd_str = %s\n", priv->cmd_str);
/* Set TX VFO */
- return newcat_set_cmd(rig);
+ RETURNFUNC(newcat_set_cmd(rig));
}
@@ -6714,7 +6714,7 @@ int newcat_get_tx_vfo(RIG *rig, vfo_t *tx_vfo)
/* Get TX VFO */
if (RIG_OK != (err = newcat_get_cmd(rig)))
{
- return err;
+ RETURNFUNC(err);
}
c = priv->ret_data[2];
@@ -6738,7 +6738,7 @@ int newcat_get_tx_vfo(RIG *rig, vfo_t *tx_vfo)
default:
rig_debug(RIG_DEBUG_ERR, "%s: Unknown tx_vfo=%c from index 2 of %s\n", __func__,
c, priv->ret_data);
- return -RIG_EPROTO;
+ RETURNFUNC(-RIG_EPROTO);
}
/* Check to see if RIG is in MEM mode */
@@ -6746,7 +6746,7 @@ int newcat_get_tx_vfo(RIG *rig, vfo_t *tx_vfo)
if (err != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
if (vfo_mode == RIG_VFO_MEM && *tx_vfo == RIG_VFO_A)
@@ -6856,7 +6856,7 @@ int newcat_set_narrow(RIG *rig, vfo_t vfo, ncboolean narrow)
if (err < 0)
{
- return err;
+ RETURNFUNC(err);
}
if (rig->caps->targetable_vfo & RIG_TARGETABLE_MODE)
@@ -6878,7 +6878,7 @@ int newcat_set_narrow(RIG *rig, vfo_t vfo, ncboolean narrow)
rig_debug(RIG_DEBUG_TRACE, "cmd_str = %s\n", priv->cmd_str);
- return newcat_set_cmd(rig);
+ RETURNFUNC(newcat_set_cmd(rig));
}
@@ -6901,7 +6901,7 @@ int newcat_get_narrow(RIG *rig, vfo_t vfo, ncboolean *narrow)
if (err < 0)
{
- return err;
+ RETURNFUNC(err);
}
if (rig->caps->targetable_vfo & RIG_TARGETABLE_MODE)
@@ -6915,7 +6915,7 @@ int newcat_get_narrow(RIG *rig, vfo_t vfo, ncboolean *narrow)
/* Get NAR */
if (RIG_OK != (err = newcat_get_cmd(rig)))
{
- return err;
+ RETURNFUNC(err);
}
c = priv->ret_data[3];
@@ -6948,17 +6948,17 @@ static int get_narrow(RIG *rig, vfo_t vfo)
if (RIG_OK != (err = newcat_get_cmd(rig)))
{
- return err;
+ RETURNFUNC(err);
}
if (sscanf(priv->ret_data, "NA%*1d%3d", &narrow) != 1)
{
rig_debug(RIG_DEBUG_ERR, "%s: unable to parse width from '%s'\n", __func__,
priv->ret_data);
- return -RIG_EPROTO;
+ RETURNFUNC(-RIG_EPROTO);
}
- return narrow;
+ RETURNFUNC(narrow);
}
int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
@@ -6981,7 +6981,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
if (err < 0)
{
- return err;
+ RETURNFUNC(err);
}
if (rig->caps->targetable_vfo & RIG_TARGETABLE_MODE)
@@ -7006,7 +7006,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
if (err != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
if (width == RIG_PASSBAND_NORMAL) { w = 0; }
@@ -7031,7 +7031,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
if (err != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
if (width == RIG_PASSBAND_NORMAL) { w = 0; }
@@ -7071,7 +7071,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
if ((err = set_roofing_filter_for_width(rig, vfo, width)) != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
switch (mode)
@@ -7088,7 +7088,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
err = newcat_set_narrow(rig, vfo, FALSE);
}
- return err;
+ RETURNFUNC(err);
case RIG_MODE_FMN:
RETURNFUNC(RIG_OK);
@@ -7109,7 +7109,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
if (err != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
if (width == RIG_PASSBAND_NORMAL) { w = 0; }
@@ -7140,7 +7140,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
if (err != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
if (width == RIG_PASSBAND_NORMAL) { w = 0; }
@@ -7180,7 +7180,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
err = newcat_set_narrow(rig, vfo, FALSE);
}
- return err;
+ RETURNFUNC(err);
case RIG_MODE_FMN:
break;
@@ -7204,7 +7204,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
if (err != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
if (width == RIG_PASSBAND_NORMAL) { w = 0; }
@@ -7235,7 +7235,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
if (err != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
if (width == RIG_PASSBAND_NORMAL) { w = 0; }
@@ -7269,7 +7269,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
err = newcat_set_narrow(rig, vfo, FALSE);
}
- return err;
+ RETURNFUNC(err);
case RIG_MODE_AMN:
if (width == RIG_PASSBAND_NORMAL || width == 6000)
@@ -7277,7 +7277,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
err = newcat_set_narrow(rig, vfo, TRUE);
}
- return err;
+ RETURNFUNC(err);
case RIG_MODE_FM: // Only 1 passband each for FM or FMN
if (width == RIG_PASSBAND_NORMAL || width == 16000)
@@ -7285,7 +7285,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
err = newcat_set_narrow(rig, vfo, FALSE);
}
- return err;
+ RETURNFUNC(err);
case RIG_MODE_FMN:
if (width == RIG_PASSBAND_NORMAL || width == 9000)
@@ -7293,7 +7293,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
err = newcat_set_narrow(rig, vfo, TRUE);
}
- return err;
+ RETURNFUNC(err);
case RIG_MODE_C4FM:
if (width == RIG_PASSBAND_NORMAL || width == 16000)
@@ -7309,7 +7309,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
RETURNFUNC(-RIG_EINVAL);
}
- return err;
+ RETURNFUNC(err);
case RIG_MODE_PKTFM:
if (width > 0 && width < rig_passband_normal(rig, mode))
@@ -7321,7 +7321,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
err = newcat_set_narrow(rig, vfo, FALSE);
}
- return err;
+ RETURNFUNC(err);
default:
RETURNFUNC(-RIG_EINVAL);
@@ -7343,7 +7343,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
if (err != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
if (width == RIG_PASSBAND_NORMAL) { w = 0; }
@@ -7373,7 +7373,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
if (err != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
if (width == RIG_PASSBAND_NORMAL) { w = 0; }
@@ -7419,7 +7419,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
if ((err = set_roofing_filter_for_width(rig, vfo, width)) != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
switch (mode)
@@ -7438,7 +7438,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
err = newcat_set_narrow(rig, vfo, FALSE);
}
- return err;
+ RETURNFUNC(err);
}
} // end is_ftdx1200 and is_ftdx3000
else if (is_ftdx5000)
@@ -7456,7 +7456,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
if (err != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
if (width == RIG_PASSBAND_NORMAL) { w = 0; }
@@ -7486,7 +7486,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
if (err != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
if (width == RIG_PASSBAND_NORMAL) { w = 0; }
@@ -7531,7 +7531,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
if ((err = set_roofing_filter_for_width(rig, vfo, width)) != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
switch (mode)
@@ -7550,7 +7550,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
err = newcat_set_narrow(rig, vfo, FALSE);
}
- return err;
+ RETURNFUNC(err);
}
} // end is_ftdx5000
else if (is_ftdx101 || is_ftdx10)
@@ -7628,7 +7628,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
if ((err = set_roofing_filter_for_width(rig, vfo, width)) != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
switch (mode)
@@ -7645,7 +7645,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
err = newcat_set_narrow(rig, vfo, FALSE);
}
- return err;
+ RETURNFUNC(err);
case RIG_MODE_AMN:
case RIG_MODE_FMN:
@@ -7722,7 +7722,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
if ((err = set_roofing_filter_for_width(rig, vfo, width)) != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
switch (mode)
@@ -7741,7 +7741,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
err = newcat_set_narrow(rig, vfo, FALSE);
}
- return err;
+ RETURNFUNC(err);
}
}
else
@@ -7784,7 +7784,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
err = newcat_set_narrow(rig, vfo, FALSE);
}
- return err;
+ RETURNFUNC(err);
case RIG_MODE_FMN:
RETURNFUNC(RIG_OK);
@@ -7814,7 +7814,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
rig_debug(RIG_DEBUG_TRACE, "%s: cmd_str = %s\n", __func__, priv->cmd_str);
/* Set RX Bandwidth */
- return newcat_set_cmd(rig);
+ RETURNFUNC(newcat_set_cmd(rig));
}
static int set_roofing_filter(RIG *rig, vfo_t vfo, int index)
@@ -7878,7 +7878,7 @@ static int set_roofing_filter(RIG *rig, vfo_t vfo, int index)
if (RIG_OK != err)
{
- return err;
+ RETURNFUNC(err);
}
RETURNFUNC(RIG_OK);
@@ -7917,7 +7917,7 @@ static int set_roofing_filter_for_width(RIG *rig, vfo_t vfo, int width)
index = current_filter->index;
}
- return set_roofing_filter(rig, vfo, index);
+ RETURNFUNC(set_roofing_filter(rig, vfo, index));
}
static int get_roofing_filter(RIG *rig, vfo_t vfo,
@@ -7952,7 +7952,7 @@ static int get_roofing_filter(RIG *rig, vfo_t vfo,
if (RIG_OK != (err = newcat_get_cmd(rig)))
{
- return err;
+ RETURNFUNC(err);
}
n = sscanf(priv->ret_data, "RF%c%c", &rf_vfo, &roofing_filter_choice);
@@ -7962,7 +7962,7 @@ static int get_roofing_filter(RIG *rig, vfo_t vfo,
rig_debug(RIG_DEBUG_ERR,
"%s: error parsing '%s' for vfo and roofing filter, got %d parsed\n", __func__,
priv->ret_data, n);
- return -RIG_EPROTO;
+ RETURNFUNC(-RIG_EPROTO);
}
for (i = 0; i < priv_caps->roofing_filter_count; i++)
@@ -7980,7 +7980,7 @@ static int get_roofing_filter(RIG *rig, vfo_t vfo,
"%s: Expected a valid roofing filter but got %c from '%s'\n", __func__,
roofing_filter_choice, priv->ret_data);
- return RIG_EPROTO;
+ RETURNFUNC(RIG_EPROTO);
}
int newcat_get_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width)
@@ -8006,7 +8006,7 @@ int newcat_get_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width)
if (err < 0)
{
- return err;
+ RETURNFUNC(err);
}
if (is_ft950 || is_ftdx5000)
@@ -8046,7 +8046,7 @@ int newcat_get_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width)
if (err != RIG_OK)
{
- return err;
+ RETURNFUNC(err);
}
@@ -8093,7 +8093,7 @@ int newcat_get_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width)
{
rig_debug(RIG_DEBUG_ERR, "%s: unable to parse width from '%s'\n", __func__,
priv->ret_data);
- return -RIG_EPROTO;
+ RETURNFUNC(-RIG_EPROTO);
}
}
else
@@ -8106,7 +8106,7 @@ int newcat_get_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width)
{
if ((narrow = get_narrow(rig, RIG_VFO_MAIN)) < 0)
{
- return -RIG_EPROTO;
+ RETURNFUNC(-RIG_EPROTO);
}
switch (mode)
@@ -8228,7 +8228,7 @@ int newcat_get_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width)
if ((narrow = get_narrow(rig, vfo)) < 0)
{
rig_debug(RIG_DEBUG_ERR, "%s: error narrow < 0, narrow=%d\n", __func__, narrow);
- return -RIG_EPROTO;
+ RETURNFUNC(-RIG_EPROTO);
}
switch (mode)
@@ -8373,7 +8373,7 @@ int newcat_get_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width)
{
if ((narrow = get_narrow(rig, vfo)) < 0)
{
- return -RIG_EPROTO;
+ RETURNFUNC(-RIG_EPROTO);
}
switch (mode)
@@ -8514,7 +8514,7 @@ int newcat_get_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width)
{
if ((narrow = get_narrow(rig, RIG_VFO_MAIN)) < 0)
{
- return -RIG_EPROTO;
+ RETURNFUNC(-RIG_EPROTO);
}
switch (mode)
@@ -8657,7 +8657,7 @@ int newcat_get_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width)
{
if ((narrow = get_narrow(rig, RIG_VFO_MAIN)) < 0)
{
- return -RIG_EPROTO;
+ RETURNFUNC(-RIG_EPROTO);
}
switch (mode)
@@ -8951,7 +8951,7 @@ int newcat_get_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width)
{
if ((narrow = get_narrow(rig, RIG_VFO_MAIN)) < 0)
{
- return -RIG_EPROTO;
+ RETURNFUNC(-RIG_EPROTO);
}
switch (mode)
@@ -9156,7 +9156,7 @@ int newcat_get_faststep(RIG *rig, ncboolean *fast_step)
/* Get Fast Step */
if (RIG_OK != (err = newcat_get_cmd(rig)))
{
- return err;
+ RETURNFUNC(err);
}
c = priv->ret_data[2];
@@ -9225,7 +9225,7 @@ int newcat_get_vfo_mode(RIG *rig, vfo_t *vfo_mode)
if (RIG_OK != (err = newcat_get_cmd(rig)))
{
- return err;
+ RETURNFUNC(err);
}
/* vfo, mem, P7 ************************** */
@@ -9241,7 +9241,7 @@ int newcat_get_vfo_mode(RIG *rig, vfo_t *vfo_mode)
rig_debug(RIG_DEBUG_ERR,
"%s: incorrect length of IF response, expected 27 or 28, got %d", __func__,
(int)strlen(priv->ret_data));
- return -RIG_EPROTO;
+ RETURNFUNC(-RIG_EPROTO);
}
rig_debug(RIG_DEBUG_TRACE, "%s: offset=%d, width_frequency=%d\n", __func__,
@@ -9262,7 +9262,7 @@ int newcat_get_vfo_mode(RIG *rig, vfo_t *vfo_mode)
rig_debug(RIG_DEBUG_TRACE, "%s: vfo mode = %s\n", __func__,
rig_strvfo(*vfo_mode));
- return err;
+ RETURNFUNC(err);
}
@@ -9584,7 +9584,7 @@ int newcat_set_cmd_validate(RIG *rig)
else
{
rig_debug(RIG_DEBUG_ERR, "%s: %s not implemented\n", __func__, priv->cmd_str);
- return -RIG_ENIMPL;
+ RETURNFUNC(-RIG_ENIMPL);
}
while (rc != RIG_OK && retry++ < retries)
@@ -9595,7 +9595,7 @@ int newcat_set_cmd_validate(RIG *rig)
snprintf(cmd, sizeof(cmd), "%s%s", priv->cmd_str, valcmd);
rc = write_block(&state->rigport, cmd, strlen(cmd));
- if (rc != RIG_OK) { return -RIG_EIO; }
+ if (rc != RIG_OK) { RETURNFUNC(-RIG_EIO); }
bytes = read_string(&state->rigport, priv->ret_data, sizeof(priv->ret_data),
&cat_term, sizeof(cat_term));
@@ -9626,7 +9626,7 @@ int newcat_set_cmd_validate(RIG *rig)
hl_usleep(sleepms * 1000);
}
- return -RIG_EPROTO;
+ RETURNFUNC(-RIG_EPROTO);
}
/*
* Writes a null terminated command string from priv->cmd_str to the
commit 65970cab0e4ed52108548cb32aa9b11def785ed1
Author: Michael Black W9MDB <mdb...@ya...>
Date: Sun Jan 17 11:21:46 2021 -0600
Try to get vfo detection working in newcat_set_cmd_validate
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index 0ea60efb..b876746f 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -814,7 +814,8 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
// And only when not in split mode (note this check has been removed for testing)
int changing;
- if (rig->state.current_vfo == RIG_VFO_A || rig->state.current_vfo == RIG_VFO_MAIN)
+ rig_debug(RIG_DEBUG_TRACE, "%s: rig->state.current_vfo=%s\n", __func__, rig_strvfo(rig->state.current_vfo));
+ if (target_vfo == 0)
{
if (rig->state.cache.freqMainA == 0)
{
-----------------------------------------------------------------------
Summary of changes:
rigs/yaesu/newcat.c | 369 ++++++++++++++++++++++++++--------------------------
1 file changed, 185 insertions(+), 184 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-17 16:47:26
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via a0ee23b178f4a33dd35d67669f56ede32c9d8a58 (commit)
via 10bc7d50df70da3b7bb5191cf8573db2482dc3c7 (commit)
from 66af5ea4c0f52ef99997afe60109270fed5cbd20 (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 a0ee23b178f4a33dd35d67669f56ede32c9d8a58
Author: Michael Black W9MDB <mdb...@ya...>
Date: Sun Jan 17 10:46:42 2021 -0600
Fix VFO detection in new_set_cmd_validate
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index 18157f96..0ea60efb 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -814,7 +814,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
// And only when not in split mode (note this check has been removed for testing)
int changing;
- if (vfo == RIG_VFO_A || vfo == RIG_VFO_MAIN)
+ if (rig->state.current_vfo == RIG_VFO_A || rig->state.current_vfo == RIG_VFO_MAIN)
{
if (rig->state.cache.freqMainA == 0)
{
@@ -6592,8 +6592,8 @@ ncboolean newcat_is_rig(RIG *rig, rig_model_t model)
{
ncboolean is_rig;
- //a bit too verbose so TRACE level here
- rig_debug(RIG_DEBUG_TRACE, "%s(%d):%s called\n", __FILE__, __LINE__, __func__);
+ //a bit too verbose so disable this unless needed
+ //rig_debug(RIG_DEBUG_TRACE, "%s(%d):%s called\n", __FILE__, __LINE__, __func__);
is_rig = (model == rig->caps->rig_model) ? TRUE : FALSE;
return is_rig;
commit 10bc7d50df70da3b7bb5191cf8573db2482dc3c7
Author: Michael Black W9MDB <mdb...@ya...>
Date: Sun Jan 17 10:16:53 2021 -0600
Add debug to prm80.c
diff --git a/rigs/prm80/prm80.c b/rigs/prm80/prm80.c
index 49dbfe77..5c69a462 100644
--- a/rigs/prm80/prm80.c
+++ b/rigs/prm80/prm80.c
@@ -371,6 +371,7 @@ int prm80_get_channel(RIG *rig, vfo_t vfo, channel_t *chan, int read_only)
if (statebuf_len < 20)
{
+ rig_debug(RIG_DEBUG_ERR, "%s: statebuf_len < 20, statebuf='%s'\n", __func__, statebuf);
RETURNFUNC(-RIG_EPROTO);
}
-----------------------------------------------------------------------
Summary of changes:
rigs/prm80/prm80.c | 1 +
rigs/yaesu/newcat.c | 6 +++---
2 files changed, 4 insertions(+), 3 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-17 15:59: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 66af5ea4c0f52ef99997afe60109270fed5cbd20 (commit)
from 86c4bfb4237337950e5e66ac5efacd3d4d3ff050 (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 66af5ea4c0f52ef99997afe60109270fed5cbd20
Author: Michael Black W9MDB <mdb...@ya...>
Date: Sun Jan 17 09:58:51 2021 -0600
Enable get_channel for prm80.c
diff --git a/rigs/prm80/prm80.c b/rigs/prm80/prm80.c
index d1f97d17..49dbfe77 100644
--- a/rigs/prm80/prm80.c
+++ b/rigs/prm80/prm80.c
@@ -406,7 +406,7 @@ int prm80_get_channel(RIG *rig, vfo_t vfo, channel_t *chan, int read_only)
"%s: please contact hamlib mailing list to implement this, rxfreq=%.0f, txfreq=%.0f\n", __func__, chan->freq, chan->tx_freq);
rig_debug(RIG_DEBUG_ERR,
"%s: need to know if rig updates when channel read or not\n", __func__);
- return -RIG_ENIMPL;
+ //return -RIG_ENIMPL;
}
return RIG_OK;
-----------------------------------------------------------------------
Summary of changes:
rigs/prm80/prm80.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-17 15:09:33
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via 86c4bfb4237337950e5e66ac5efacd3d4d3ff050 (commit)
from ebeb23e49d8096c117c54d846a2bb0709fa704fd (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 86c4bfb4237337950e5e66ac5efacd3d4d3ff050
Author: Michael Black W9MDB <mdb...@ya...>
Date: Sun Jan 17 09:08:55 2021 -0600
Allow > 100MHz band select in newcat.c
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index 063eeb63..18157f96 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -893,8 +893,11 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
if (err != RIG_OK) { return err; }
- // we'll ignore UHF/VHF frequencies -- need to see the behavior
- if (newcat_band_index(freqtmp) != newcat_band_index(freq) && freq < 100e6)
+ // Cross band should work too
+ // If the BS works on both VFOs then VFOB will have the band select answer
+ // so now change needed
+ // If the BS is by VFO then we'll need to do BS for the other VFO too
+ if (newcat_band_index(freqtmp) != newcat_band_index(freq))
{
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "BS%02d%c",
-----------------------------------------------------------------------
Summary of changes:
rigs/yaesu/newcat.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-17 14:55: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 ebeb23e49d8096c117c54d846a2bb0709fa704fd (commit)
via a8d841182b3daa2d1947b61db22b5f6b88bc5237 (commit)
from 9db79eb8412b10a0b6bd49d7655f8378c59e938d (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 ebeb23e49d8096c117c54d846a2bb0709fa704fd
Author: Michael Black W9MDB <mdb...@ya...>
Date: Sun Jan 17 08:54:40 2021 -0600
Avoid newcat BS command when VFO freq is not changing
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index 79e8529e..063eeb63 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -790,7 +790,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
if (RIG_OK != (err = newcat_set_cmd(rig)))
{
- ERRMSG(err,"newcat_set_cmd failed");
+ ERRMSG(err, "newcat_set_cmd failed");
return err;
}
}
@@ -816,12 +816,24 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
if (vfo == RIG_VFO_A || vfo == RIG_VFO_MAIN)
{
+ if (rig->state.cache.freqMainA == 0)
+ {
+ freq_t freqtmp;
+ err = rig_get_freq(rig,RIG_VFO_CURR,&freqtmp);
+ if (err != RIG_OK) RETURNFUNC(err);
+ }
changing = newcat_band_index(freq) != newcat_band_index(
rig->state.cache.freqMainA);
rig_debug(RIG_DEBUG_TRACE, "%s: VFO_A freq changing=%d\n", __func__, changing);
}
else
{
+ if (rig->state.cache.freqMainB == 0)
+ {
+ freq_t freqtmp;
+ err = rig_get_freq(rig,RIG_VFO_CURR,&freqtmp);
+ if (err != RIG_OK) RETURNFUNC(err);
+ }
changing = newcat_band_index(freq) != newcat_band_index(
rig->state.cache.freqMainB);
rig_debug(RIG_DEBUG_TRACE, "%s: VFO_B freq changing=%d\n", __func__, changing);
@@ -861,6 +873,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
// Also need to do this for the other VFO on some Yaesu rigs
// is redundant for rigs where band stack includes both vfos
vfo_t vfotmp;
+ freq_t freqtmp;
err = rig_get_vfo(rig, &vfotmp);
if (err != RIG_OK) { return err; }
@@ -874,17 +887,25 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
err = rig_set_vfo(rig, vfotmp == RIG_VFO_A ? RIG_VFO_B : RIG_VFO_A);
}
-
if (err != RIG_OK) { return err; }
- snprintf(priv->cmd_str, sizeof(priv->cmd_str), "BS%02d%c",
- newcat_band_index(freq), cat_term);
+ rig_get_freq(rig, RIG_VFO_CURR, &freqtmp);
- if (RIG_OK != (err = newcat_set_cmd(rig)))
+ if (err != RIG_OK) { return err; }
+
+ // we'll ignore UHF/VHF frequencies -- need to see the behavior
+ if (newcat_band_index(freqtmp) != newcat_band_index(freq) && freq < 100e6)
{
- rig_debug(RIG_DEBUG_ERR, "%s: Unexpected error with BS command#2=%s\n",
- __func__,
- rigerror(err));
+
+ snprintf(priv->cmd_str, sizeof(priv->cmd_str), "BS%02d%c",
+ newcat_band_index(freq), cat_term);
+
+ if (RIG_OK != (err = newcat_set_cmd(rig)))
+ {
+ rig_debug(RIG_DEBUG_ERR, "%s: Unexpected error with BS command#2=%s\n",
+ __func__,
+ rigerror(err));
+ }
}
// switch back to the starting vfo
@@ -9289,6 +9310,7 @@ int newcat_get_cmd(RIG *rig)
int is_read_cmd = 0;
ENTERFUNC;
+
// try to cache rapid repeats of the IF command
// this is for WSJT-X/JTDX sequence of v/f/m/t
// should allow rapid repeat of any call using the IF; cmd
@@ -9812,11 +9834,11 @@ rmode_t newcat_rmode(char mode)
{
rig_debug(RIG_DEBUG_TRACE, "%s: %s for %c\n", __func__,
rig_strrmode(newcat_mode_conv[i].mode), mode);
- RETURNFUNC (newcat_mode_conv[i].mode);
+ RETURNFUNC(newcat_mode_conv[i].mode);
}
}
- RETURNFUNC (RIG_MODE_NONE);
+ RETURNFUNC(RIG_MODE_NONE);
}
char newcat_modechar(rmode_t rmode)
@@ -9831,11 +9853,11 @@ char newcat_modechar(rmode_t rmode)
{
rig_debug(RIG_DEBUG_TRACE, "%s: return %c for %s\n", __func__,
newcat_mode_conv[i].modechar, rig_strrmode(rmode));
- RETURNFUNC (newcat_mode_conv[i].modechar);
+ RETURNFUNC(newcat_mode_conv[i].modechar);
}
}
- RETURNFUNC ('0');
+ RETURNFUNC('0');
}
rmode_t newcat_rmode_width(RIG *rig, vfo_t vfo, char mode, pbwidth_t *width)
@@ -9866,7 +9888,7 @@ rmode_t newcat_rmode_width(RIG *rig, vfo_t vfo, char mode, pbwidth_t *width)
{
if (newcat_get_narrow(rig, vfo, &narrow) != RIG_OK)
{
- RETURNFUNC (newcat_mode_conv[i].mode);
+ RETURNFUNC(newcat_mode_conv[i].mode);
}
if (narrow == TRUE)
@@ -9880,12 +9902,12 @@ rmode_t newcat_rmode_width(RIG *rig, vfo_t vfo, char mode, pbwidth_t *width)
}
}
- RETURNFUNC (newcat_mode_conv[i].mode);
+ RETURNFUNC(newcat_mode_conv[i].mode);
}
}
rig_debug(RIG_DEBUG_VERBOSE, "%s fell out the bottom %c %s\n", __func__,
mode, rig_strrmode(mode));
- RETURNFUNC ('0');
+ RETURNFUNC('0');
}
diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h
index dfa3bdb5..ea6a6c22 100644
--- a/rigs/yaesu/newcat.h
+++ b/rigs/yaesu/newcat.h
@@ -50,7 +50,7 @@
typedef char ncboolean;
/* shared function version */
-#define NEWCAT_VER "20210116"
+#define NEWCAT_VER "20210117"
/* Hopefully large enough for future use, 128 chars plus '\0' */
#define NEWCAT_DATA_LEN 129
commit a8d841182b3daa2d1947b61db22b5f6b88bc5237
Author: Michael Black W9MDB <mdb...@ya...>
Date: Sun Jan 17 08:22:07 2021 -0600
Improve comments in misc.c
diff --git a/src/misc.c b/src/misc.c
index 9dfdbe46..445c8492 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -1634,6 +1634,7 @@ int HAMLIB_API parse_hoststr(char *hoststr, char host[256], char port[6])
port[0] = 0;
dummy[0] = 0;
+ // Exclude any names that aren't a host:port format
// Handle device names 1st
if (strstr(hoststr, "/dev")) { return -1; }
@@ -1644,6 +1645,7 @@ int HAMLIB_API parse_hoststr(char *hoststr, char host[256], char port[6])
// escaped COM port like \\.\COM3
if (strstr(hoststr, "\\\\.\\")) { return -1; }
+ // Now let's try and parse a host:port thing
// bracketed IPV6 with optional port
int n = sscanf(hoststr, "[%255[^]]]:%5s", host, port);
-----------------------------------------------------------------------
Summary of changes:
rigs/yaesu/newcat.c | 52 +++++++++++++++++++++++++++++++++++++---------------
rigs/yaesu/newcat.h | 2 +-
src/misc.c | 2 ++
3 files changed, 40 insertions(+), 16 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|