hamlib-cvs-digest Mailing List for Ham Radio Control Libraries (Page 14)
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-08-26 22:58:55
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via aa9b9196b4dc231a6979fa9ec15b3798931b9031 (commit)
from 32cd11a4a8f933906f95aa3651d7e3b7544ae80c (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 aa9b9196b4dc231a6979fa9ec15b3798931b9031
Author: Mike Black W9MDB <mdb...@ya...>
Date: Thu Aug 26 16:31:37 2021 -0500
Fix Kenwood FR/FT sequencing
https://github.com/Hamlib/Hamlib/issues/746
diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c
index 6a52d164..62632779 100644
--- a/rigs/kenwood/kenwood.c
+++ b/rigs/kenwood/kenwood.c
@@ -1120,7 +1120,7 @@ int kenwood_set_vfo(RIG *rig, vfo_t vfo)
// FR can turn off split on some Kenwood rigs
// So we'll turn it back on just in case
- if (priv->split) { strcat(cmdbuf, "FT1;"); }
+ if (priv->split && vfo_function == '0') { strcat(cmdbuf, ";FT1"); }
if (RIG_IS_TS50 || RIG_IS_TS940)
{
@@ -1261,7 +1261,7 @@ int kenwood_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t txvfo)
// FR can turn off split on some Kenwood rigs
// So we'll turn it back on just in case
- if (priv->split) { strcat(cmdbuf, "FT1;"); }
+ if (priv->split && vfo_function=='0') { strcat(cmdbuf, ";FT1"); }
retval = kenwood_transaction(rig, cmdbuf, NULL, 0);
diff --git a/rigs/kenwood/kenwood.h b/rigs/kenwood/kenwood.h
index 17f64d54..0781eea8 100644
--- a/rigs/kenwood/kenwood.h
+++ b/rigs/kenwood/kenwood.h
@@ -28,7 +28,7 @@
#include "token.h"
#include "misc.h"
-#define BACKEND_VER "20210822"
+#define BACKEND_VER "20210826"
#define EOM_KEN ';'
#define EOM_TH '\r'
-----------------------------------------------------------------------
Summary of changes:
rigs/kenwood/kenwood.c | 4 ++--
rigs/kenwood/kenwood.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-08-26 13:55:05
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via 32cd11a4a8f933906f95aa3651d7e3b7544ae80c (commit)
via 2aa7895624d87f83b1933b3a69d1f80129c5e480 (commit)
from 66470668b65198dc08c832d85adb59d7395253eb (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 32cd11a4a8f933906f95aa3651d7e3b7544ae80c
Author: Mike Black W9MDB <mdb...@ya...>
Date: Thu Aug 26 08:53:44 2021 -0500
Fix typo in scripts/Makefile.am
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 1982b5e5..0f9acc3a 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -1,2 +1,2 @@
-EXTRA_DIST = README.scripts build-w32.sh build-w64.sh build-w64.jtsdk.sh README.build-Windows \
+EXTRA_DIST = README.scripts build-w32.sh build-w64.sh build-w64-jtsdk.sh README.build-Windows \
build-VB.NET.sh README.build-VB.NET astylerc
commit 2aa7895624d87f83b1933b3a69d1f80129c5e480
Author: Mike Black W9MDB <mdb...@ya...>
Date: Thu Aug 26 08:47:52 2021 -0500
Add build script for jtsdk to Makefile.am
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index b62041da..1982b5e5 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -1,2 +1,2 @@
-EXTRA_DIST = README.scripts build-w32.sh build-w64.sh README.build-Windows \
+EXTRA_DIST = README.scripts build-w32.sh build-w64.sh build-w64.jtsdk.sh README.build-Windows \
build-VB.NET.sh README.build-VB.NET astylerc
-----------------------------------------------------------------------
Summary of changes:
scripts/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-08-26 13:46: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 66470668b65198dc08c832d85adb59d7395253eb (commit)
via 283281c4cbd345e9f4aa70ff4bd86305c09786ab (commit)
via ff61c407f06ea7c6d8d2f8da5b49946c023d697e (commit)
via fe481295980528cc2c36df9128f1fc5f0232d7a7 (commit)
via 9aec383329af4d7399afd49042fa9fdd64261855 (commit)
from 851c499376915d9728cbec53618b7385378277b0 (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 66470668b65198dc08c832d85adb59d7395253eb
Author: Mike Black W9MDB <mdb...@ya...>
Date: Thu Aug 26 07:22:52 2021 -0500
Add ax_cxx_compile_stdcxx.m4 to macros/Makefile.am
diff --git a/macros/Makefile.am b/macros/Makefile.am
index 3507bbcf..5bbf2996 100644
--- a/macros/Makefile.am
+++ b/macros/Makefile.am
@@ -8,6 +8,7 @@ MACROS = \
ax_python_devel.m4 \
ax_lib_indi.m4 \
ax_lib_nova.m4 \
+ ax_cxx_compile_stdcxx.m4 \
gr_doxygen.m4 \
gr_pwin32.m4 \
hl_getaddrinfo.m4 \
commit 283281c4cbd345e9f4aa70ff4bd86305c09786ab
Author: Mike Black W9MDB <mdb...@ya...>
Date: Thu Aug 26 06:49:24 2021 -0500
astyle all files preparing for 4.3 release
diff --git a/rigs/dummy/dummy.c b/rigs/dummy/dummy.c
index 6372f17b..5ae37a6b 100644
--- a/rigs/dummy/dummy.c
+++ b/rigs/dummy/dummy.c
@@ -155,25 +155,31 @@ static void init_chan(RIG *rig, vfo_t vfo, channel_t *chan)
chan->vfo = vfo;
strcpy(chan->channel_desc, rig_strvfo(vfo));
- switch(vfo)
+ switch (vfo)
{
- case RIG_VFO_A:
- case RIG_VFO_MAIN_A:
+ case RIG_VFO_A:
+ case RIG_VFO_MAIN_A:
chan->freq = MHz(145);
break;
- case RIG_VFO_B:
- case RIG_VFO_MAIN_B:
+
+ case RIG_VFO_B:
+ case RIG_VFO_MAIN_B:
chan->freq = MHz(146);
break;
- case RIG_VFO_SUB_A:
+
+ case RIG_VFO_SUB_A:
chan->freq = MHz(147);
break;
- case RIG_VFO_SUB_B:
+
+ case RIG_VFO_SUB_B:
chan->freq = MHz(148);
break;
- default:
- rig_debug(RIG_DEBUG_ERR, "%s(%d) unknown vfo=%s\n", __FILE__, __LINE__, rig_strvfo(vfo));
+
+ default:
+ rig_debug(RIG_DEBUG_ERR, "%s(%d) unknown vfo=%s\n", __FILE__, __LINE__,
+ rig_strvfo(vfo));
}
+
chan->mode = RIG_MODE_FM;
chan->width = rig_passband_normal(rig, RIG_MODE_FM);
chan->tx_freq = chan->freq;
@@ -420,7 +426,7 @@ static int dummy_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
// if needed for testing enable this to emulate a rig with 100hz resolution
#if 0
// we emulate a rig with 100Hz set freq interval limits -- truncation
- freq = freq - fmod(freq,100);
+ freq = freq - fmod(freq, 100);
#endif
usleep(CMDSLEEP);
sprintf_freq(fstr, sizeof(fstr), freq);
@@ -431,12 +437,16 @@ static int dummy_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
{
case RIG_VFO_MAIN:
case RIG_VFO_A: priv->vfo_a.freq = freq; break;
+
case RIG_VFO_MAIN_A: priv->vfo_maina.freq = freq; break;
+
case RIG_VFO_MAIN_B: priv->vfo_mainb.freq = freq; break;
case RIG_VFO_SUB:
case RIG_VFO_B: priv->vfo_b.freq = freq; break;
+
case RIG_VFO_SUB_A: priv->vfo_suba.freq = freq; break;
+
case RIG_VFO_SUB_B: priv->vfo_subb.freq = freq; break;
case RIG_VFO_C: priv->vfo_c.freq = freq; break;
@@ -477,13 +487,17 @@ static int dummy_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
{
case RIG_VFO_MAIN:
case RIG_VFO_A: *freq = priv->vfo_a.freq; break;
- case RIG_VFO_MAIN_A: *freq = priv->vfo_maina.freq;break;
- case RIG_VFO_MAIN_B: *freq = priv->vfo_mainb.freq;break;
+
+ case RIG_VFO_MAIN_A: *freq = priv->vfo_maina.freq; break;
+
+ case RIG_VFO_MAIN_B: *freq = priv->vfo_mainb.freq; break;
case RIG_VFO_SUB:
case RIG_VFO_B: *freq = priv->vfo_b.freq; break;
- case RIG_VFO_SUB_A: *freq = priv->vfo_suba.freq;break;
- case RIG_VFO_SUB_B: *freq = priv->vfo_subb.freq;break;
+
+ case RIG_VFO_SUB_A: *freq = priv->vfo_suba.freq; break;
+
+ case RIG_VFO_SUB_B: *freq = priv->vfo_subb.freq; break;
case RIG_VFO_C: *freq = priv->vfo_c.freq; break;
@@ -508,6 +522,7 @@ static int dummy_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
rig_strvfo(vfo), rig_strrmode(mode), buf);
vfo = vfo_fixup(rig, vfo, rig->state.cache.split);
+
switch (vfo)
{
case RIG_VFO_MAIN:
@@ -517,6 +532,7 @@ static int dummy_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
case RIG_VFO_B: priv->vfo_b.mode = mode; priv->vfo_b.width = width; break;
case RIG_VFO_C: priv->vfo_c.mode = mode; priv->vfo_c.width = width; break;
+
default:
rig_debug(RIG_DEBUG_ERR, "%s: unknown VFO=%s\n", __func__, rig_strvfo(vfo));
RETURNFUNC(-RIG_EINVAL);
@@ -589,13 +605,17 @@ static int dummy_set_vfo(RIG *rig, vfo_t vfo)
case RIG_VFO_RX:
case RIG_VFO_MAIN: priv->curr = &priv->vfo_a; break;
+
case RIG_VFO_MAIN_A: priv->curr = &priv->vfo_maina; break;
+
case RIG_VFO_MAIN_B: priv->curr = &priv->vfo_mainb; break;
case RIG_VFO_A: priv->curr = &priv->vfo_a; break;
case RIG_VFO_SUB: priv->curr = &priv->vfo_b; break;
+
case RIG_VFO_SUB_A: priv->curr = &priv->vfo_suba; break;
+
case RIG_VFO_SUB_B: priv->curr = &priv->vfo_subb; break;
case RIG_VFO_B: priv->curr = &priv->vfo_b; break;
@@ -622,6 +642,7 @@ static int dummy_set_vfo(RIG *rig, vfo_t vfo)
rig_strvfo(vfo));
RETURNFUNC(-RIG_EINVAL);
}
+
rig->state.current_vfo = vfo;
RETURNFUNC(RIG_OK);
diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c
index 14e1a327..49cd998f 100644
--- a/rigs/dummy/flrig.c
+++ b/rigs/dummy/flrig.c
@@ -272,7 +272,8 @@ static int check_vfo(vfo_t vfo)
* So we'll hand craft them
* xml_build takes a value and return an xml string for FLRig
*/
-static char *xml_build(RIG *rig, char *cmd, char *value, char *xmlbuf, int xmlbuflen)
+static char *xml_build(RIG *rig, char *cmd, char *value, char *xmlbuf,
+ int xmlbuflen)
{
char xml[4096]; // we shouldn't need more the 4096 bytes for this
char tmp[32];
@@ -297,7 +298,9 @@ static char *xml_build(RIG *rig, char *cmd, char *value, char *xmlbuf, int xmlbu
__func__, (int)strlen(header), n);
}
- n = snprintf(xml, sizeof(xml), "<?xml version=\"1.0\"?>\r\n<?clientid=\"hamlib(%d)\"?>\r\n", rig->state.rigport.client_port);
+ n = snprintf(xml, sizeof(xml),
+ "<?xml version=\"1.0\"?>\r\n<?clientid=\"hamlib(%d)\"?>\r\n",
+ rig->state.rigport.client_port);
if (n != strlen(xml))
{
@@ -1414,13 +1417,17 @@ static int flrig_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
}
// Set the mode
- if (modeMapGetFLRig(mode)) {
+ if (modeMapGetFLRig(mode))
+ {
ttmode = strdup(modeMapGetFLRig(mode));
}
- else {
- rig_debug(RIG_DEBUG_ERR, "%s: modeMapGetFlRig failed on mode=%d\n", __func__, (int)mode);
+ else
+ {
+ rig_debug(RIG_DEBUG_ERR, "%s: modeMapGetFlRig failed on mode=%d\n", __func__,
+ (int)mode);
RETURNFUNC(-RIG_EINVAL);
}
+
rig_debug(RIG_DEBUG_TRACE, "%s: got ttmode = %s\n", __func__,
ttmode == NULL ? "NULL" : ttmode);
diff --git a/rigs/dummy/netrigctl.c b/rigs/dummy/netrigctl.c
index fd69cb9a..672c5f7b 100644
--- a/rigs/dummy/netrigctl.c
+++ b/rigs/dummy/netrigctl.c
@@ -670,6 +670,7 @@ static int netrigctl_open(RIG *rig)
rig->caps->ptt_type = temp;
}
}
+
// setting targetable_vfo this way breaks WSJTX in rig split with rigctld
// Ends up putting VFOB freq on VFOA
// Have to figure out why but disabling this fixes it for now
@@ -680,6 +681,7 @@ static int netrigctl_open(RIG *rig)
rig_debug(RIG_DEBUG_ERR, "%s: targetable_vfo=0x%2x\n", __func__,
rig->caps->targetable_vfo);
}
+
#endif
else if (strcmp(setting, "has_set_vfo") == 0)
{
diff --git a/rigs/icom/frame.c b/rigs/icom/frame.c
index 65997f09..6880df8a 100644
--- a/rigs/icom/frame.c
+++ b/rigs/icom/frame.c
@@ -101,7 +101,8 @@ int icom_frame_fix_preamble(int frame_len, unsigned char *frame)
}
else
{
- rig_debug(RIG_DEBUG_WARN, "%s: invalid Icom CI-V frame, no preamble found\n", __func__);
+ rig_debug(RIG_DEBUG_WARN, "%s: invalid Icom CI-V frame, no preamble found\n",
+ __func__);
RETURNFUNC(-RIG_EPROTO);
}
@@ -284,6 +285,7 @@ read_another_frame:
}
retval = icom_frame_fix_preamble(frm_len, buf);
+
if (retval < 0)
{
Unhold_Decode(rig);
@@ -355,7 +357,7 @@ read_another_frame:
gettimeofday(¤t_time, NULL);
timersub(¤t_time, &start_time, &elapsed_time);
- elapsed_ms = (int) (elapsed_time.tv_sec * 1000 + elapsed_time.tv_usec / 1000);
+ elapsed_ms = (int)(elapsed_time.tv_sec * 1000 + elapsed_time.tv_usec / 1000);
if (elapsed_ms > rs->rigport.timeout)
{
diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c
index a1ef7094..0ce03fda 100644
--- a/rigs/icom/icom.c
+++ b/rigs/icom/icom.c
@@ -47,7 +47,8 @@
static int set_vfo_curr(RIG *rig, vfo_t vfo, vfo_t curr_vfo);
static int icom_set_default_vfo(RIG *rig);
static int icom_get_spectrum_vfo(RIG *rig, vfo_t vfo);
-static int icom_get_spectrum_edge_frequency_range(RIG *rig, vfo_t vfo, int *range_id);
+static int icom_get_spectrum_edge_frequency_range(RIG *rig, vfo_t vfo,
+ int *range_id);
const cal_table_float_t icom_default_swr_cal =
{
@@ -634,17 +635,21 @@ int icom_init(RIG *rig)
priv = rig->state.priv;
priv->spectrum_scope_count = 0;
+
for (i = 0; caps->spectrum_scopes[i].name != NULL; i++)
{
priv->spectrum_scope_cache[i].spectrum_data = NULL;
if (priv_caps->spectrum_scope_caps.spectrum_line_length < 1)
{
- rig_debug(RIG_DEBUG_ERR, "%s: no spectrum scope line length defined\n", __func__);
+ rig_debug(RIG_DEBUG_ERR, "%s: no spectrum scope line length defined\n",
+ __func__);
RETURNFUNC(-RIG_ECONF);
}
- priv->spectrum_scope_cache[i].spectrum_data = calloc(1, priv_caps->spectrum_scope_caps.spectrum_line_length);
+ priv->spectrum_scope_cache[i].spectrum_data = calloc(1,
+ priv_caps->spectrum_scope_caps.spectrum_line_length);
+
if (!priv->spectrum_scope_cache[i].spectrum_data)
{
RETURNFUNC(-RIG_ENOMEM);
@@ -902,7 +907,7 @@ static int icom_set_default_vfo(RIG *rig)
{
rig_debug(RIG_DEBUG_TRACE, "%s: setting default as MAIN/VFOA\n",
__func__);
- TRACE;
+ TRACE;
retval = rig_set_vfo(rig, RIG_VFO_MAIN); // we'll default to Main in this case
if (retval != RIG_OK)
@@ -926,7 +931,7 @@ static int icom_set_default_vfo(RIG *rig)
{
rig_debug(RIG_DEBUG_TRACE, "%s: setting default as MAIN\n",
__func__);
- TRACE;
+ TRACE;
retval = rig_set_vfo(rig, RIG_VFO_MAIN); // we'll default to Main in this case
rig->state.current_vfo = RIG_VFO_MAIN;
}
@@ -936,11 +941,12 @@ static int icom_set_default_vfo(RIG *rig)
__func__);
TRACE;
retval = RIG_OK;
+
if (rig->state.current_vfo != RIG_VFO_A)
{
- retval = rig_set_vfo(rig,
- RIG_VFO_A); // we'll default to VFOA for all others
- rig->state.current_vfo = RIG_VFO_A;
+ retval = rig_set_vfo(rig,
+ RIG_VFO_A); // we'll default to VFOA for all others
+ rig->state.current_vfo = RIG_VFO_A;
}
}
else
@@ -1032,7 +1038,7 @@ int icom_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
{
TRACE;
rig_debug(RIG_DEBUG_TRACE, "%s: set_vfo_curr=%s\n", __func__,
- rig_strvfo(rig->state.current_vfo));
+ rig_strvfo(rig->state.current_vfo));
retval = set_vfo_curr(rig, vfo, rig->state.current_vfo);
if (retval != RIG_OK)
@@ -1058,6 +1064,7 @@ int icom_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
if (rig->caps->targetable_vfo & RIG_TARGETABLE_FREQ)
{
vfo_t vfo_unselected = RIG_VFO_B | RIG_VFO_SUB | RIG_VFO_SUB_B | RIG_VFO_MAIN_B;
+
// if we are on the "other" vfo already then we have to allow for that
if (rig->state.current_vfo & vfo_unselected)
{
@@ -1065,8 +1072,10 @@ int icom_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
vfo_unselected = RIG_VFO_A | RIG_VFO_MAIN | RIG_VFO_SUB_A | RIG_VFO_MAIN_A;
}
- rig_debug(RIG_DEBUG_VERBOSE, "%s(%d): vfo=%s, currvfo=%s\n", __func__, __LINE__, rig_strvfo(vfo), rig_strvfo(rig->state.current_vfo));
+ rig_debug(RIG_DEBUG_VERBOSE, "%s(%d): vfo=%s, currvfo=%s\n", __func__, __LINE__,
+ rig_strvfo(vfo), rig_strvfo(rig->state.current_vfo));
subcmd = 0x00;
+
// if we ask for unselected but we're not on unselected subcmd2 changes
if ((vfo & vfo_unselected) && !(rig->state.current_vfo & vfo_unselected))
{
@@ -1076,15 +1085,16 @@ int icom_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
cmd = 0x25;
retval = icom_transaction(rig, cmd, subcmd, freqbuf, freq_len, ackbuf,
- &ack_len);
+ &ack_len);
}
else
{
cmd = C_SET_FREQ;
subcmd = -1;
retval = icom_transaction(rig, cmd, subcmd, freqbuf, freq_len, ackbuf,
- &ack_len);
+ &ack_len);
}
+
hl_usleep(50 * 1000); // pause for transceive message and we'll flush it
if (retval != RIG_OK)
@@ -1155,11 +1165,15 @@ int icom_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
switch (vfo)
{
case RIG_VFO_A: priv->vfoa_freq = freq; break;
+
case RIG_VFO_MAIN_A: priv->maina_freq = freq; break;
+
case RIG_VFO_SUB_A: priv->suba_freq = freq; break;
case RIG_VFO_B: priv->vfob_freq = freq; break;
+
case RIG_VFO_MAIN_B: priv->mainb_freq = freq;
+
case RIG_VFO_SUB_B: priv->subb_freq = freq;
case RIG_VFO_MAIN: priv->main_freq = freq; break;
@@ -1313,6 +1327,7 @@ int icom_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
int cmd2 = 0x25;
int subcmd2 = 0x00;
vfo_t vfo_unselected = RIG_VFO_B | RIG_VFO_SUB | RIG_VFO_SUB_B | RIG_VFO_MAIN_B;
+
// if we are on the "other" vfo already then we have to allow for that
if (rig->state.current_vfo & vfo_unselected)
{
@@ -1416,11 +1431,15 @@ int icom_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
switch (vfo)
{
case RIG_VFO_A: priv->vfoa_freq = *freq; break;
+
case RIG_VFO_MAIN_A: priv->maina_freq = *freq; break;
+
case RIG_VFO_SUB_A: priv->suba_freq = *freq; break;
case RIG_VFO_B: priv->vfob_freq = *freq; break;
+
case RIG_VFO_MAIN_B: priv->mainb_freq = *freq; break;
+
case RIG_VFO_SUB_B: priv->subb_freq = *freq; break;
case RIG_VFO_MAIN: priv->main_freq = *freq; break;
@@ -1715,18 +1734,21 @@ int icom_set_dsp_flt(RIG *rig, rmode_t mode, pbwidth_t width)
RETURNFUNC(RIG_OK);
}
-static int icom_set_mode_x26(RIG *rig, vfo_t vfo, rmode_t mode, int datamode, int filter)
+static int icom_set_mode_x26(RIG *rig, vfo_t vfo, rmode_t mode, int datamode,
+ int filter)
{
struct icom_priv_data *priv = rig->state.priv;
int retval;
unsigned char buf[3];
ENTERFUNC;
- if (priv->x26cmdfails) RETURNFUNC(-RIG_ENAVAIL);
+
+ if (priv->x26cmdfails) { RETURNFUNC(-RIG_ENAVAIL); }
int cmd2 = 0x26;
int subcmd2 = 0x00;
vfo_t vfo_unselected = RIG_VFO_B | RIG_VFO_SUB | RIG_VFO_SUB_B | RIG_VFO_MAIN_B;
+
// if we are on the "other" vfo already then we have to allow for that
if (rig->state.current_vfo & vfo_unselected)
{
@@ -1738,6 +1760,7 @@ static int icom_set_mode_x26(RIG *rig, vfo_t vfo, rmode_t mode, int datamode, in
{
subcmd2 = 0x01; // get unselected VFO
}
+
buf[0] = mode;
buf[1] = datamode;
// filter fixed to filter 1 due to IC7300 bug defaulting to filter 2 on mode changed -- yuck!!
@@ -1809,7 +1832,8 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode,
break;
}
- rig_debug(RIG_DEBUG_VERBOSE, "%s mode=%d, width=%d, curr_vfo=%s\n", __func__, (int)icom_mode,
+ rig_debug(RIG_DEBUG_VERBOSE, "%s mode=%d, width=%d, curr_vfo=%s\n", __func__,
+ (int)icom_mode,
(int)width, rig_strvfo(rig->state.current_vfo));
retval = icom_set_mode(rig, vfo, icom_mode, width);
@@ -1822,6 +1846,7 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode,
signed char width_icom;
TRACE;
+
switch (mode)
{
case RIG_MODE_PKTUSB:
@@ -1843,19 +1868,22 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode,
if (filter_byte) // then we need the filter width byte too
{
TRACE;
- if (datamode[0] == 0) datamode[1]=0; // the only good combo possible according to manual
- rig_debug(RIG_DEBUG_TRACE, "%s(%d) mode_icom=%d, datamode[0]=%d, filter=%d\n", __func__, __LINE__, mode_icom, datamode[0], datamode[1]);
+ if (datamode[0] == 0) { datamode[1] = 0; } // the only good combo possible according to manual
+
+ rig_debug(RIG_DEBUG_TRACE, "%s(%d) mode_icom=%d, datamode[0]=%d, filter=%d\n",
+ __func__, __LINE__, mode_icom, datamode[0], datamode[1]);
retval = icom_set_mode_x26(rig, vfo, mode_icom, datamode[0], datamode[1]);
+
if (retval != RIG_OK)
{
retval =
- icom_transaction(rig, C_CTL_MEM, dm_sub_cmd, datamode, 2, ackbuf, &ack_len);
+ icom_transaction(rig, C_CTL_MEM, dm_sub_cmd, datamode, 2, ackbuf, &ack_len);
}
}
else
{
- TRACE;
+ TRACE;
retval =
icom_transaction(rig, C_CTL_MEM, dm_sub_cmd, datamode, 1, ackbuf, &ack_len);
}
@@ -1895,8 +1923,10 @@ int icom_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
int ack_len = sizeof(ackbuf), retval, err;
int swapvfos = 0;
- rig_debug(RIG_DEBUG_VERBOSE, "%s called vfo=%s, mode=%s, width=%d, current_vfo=%s\n", __func__,
- rig_strvfo(vfo), rig_strrmode(mode), (int)width, rig_strvfo(rig->state.current_vfo));
+ rig_debug(RIG_DEBUG_VERBOSE,
+ "%s called vfo=%s, mode=%s, width=%d, current_vfo=%s\n", __func__,
+ rig_strvfo(vfo), rig_strrmode(mode), (int)width,
+ rig_strvfo(rig->state.current_vfo));
rs = &rig->state;
priv = (struct icom_priv_data *) rs->priv;
@@ -1937,11 +1967,14 @@ int icom_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
// some Icom rigs have seperate modes for VFOB/Sub
// switching to VFOB should not matter for the other rigs
// This needs to be improved for RIG_TARGETABLE_MODE rigs
- if ((vfo == RIG_VFO_B || vfo == RIG_VFO_SUB) && ((rig->state.current_vfo == RIG_VFO_A || rig->state.current_vfo == RIG_VFO_MAIN) || rig->state.current_vfo == RIG_VFO_CURR))
+ if ((vfo == RIG_VFO_B || vfo == RIG_VFO_SUB)
+ && ((rig->state.current_vfo == RIG_VFO_A
+ || rig->state.current_vfo == RIG_VFO_MAIN)
+ || rig->state.current_vfo == RIG_VFO_CURR))
{
TRACE;
swapvfos = 1;
- rig_set_vfo(rig,RIG_VFO_B);
+ rig_set_vfo(rig, RIG_VFO_B);
}
rig_debug(RIG_DEBUG_VERBOSE, "%s: #2 icmode=%d, icmode_ext=%d\n", __func__,
@@ -1953,7 +1986,7 @@ int icom_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
if (swapvfos)
{
TRACE;
- rig_set_vfo(rig,RIG_VFO_A);
+ rig_set_vfo(rig, RIG_VFO_A);
}
if (retval != RIG_OK)
@@ -2124,7 +2157,7 @@ int icom_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
// IC7800 can set but not read with 0x26
if ((rig->caps->targetable_vfo & RIG_TARGETABLE_MODE)
- && rig->caps->rig_model != RIG_MODEL_IC7800)
+ && rig->caps->rig_model != RIG_MODEL_IC7800)
{
int vfosel = 0x00;
@@ -2565,9 +2598,10 @@ int icom_set_vfo(RIG *rig, vfo_t vfo)
ackbuf[0], ack_len);
RETURNFUNC(-RIG_ERJCTED);
}
+
// If SUB_A then we'll assume we're done and probably not in sat mode
// If rig has SUB_B active this may be a problem
- if (vfo == RIG_VFO_SUB_A) return RIG_OK;
+ if (vfo == RIG_VFO_SUB_A) { return RIG_OK; }
icvfo = vfo == RIG_VFO_SUB_A ? S_VFOA : S_VFOB;
@@ -3109,15 +3143,19 @@ int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
case RIG_SPECTRUM_MODE_CENTER:
icom_val = SCOPE_MODE_CENTER;
break;
+
case RIG_SPECTRUM_MODE_FIXED:
icom_val = SCOPE_MODE_FIXED;
break;
+
case RIG_SPECTRUM_MODE_CENTER_SCROLL:
icom_val = SCOPE_MODE_SCROLL_C;
break;
+
case RIG_SPECTRUM_MODE_FIXED_SCROLL:
icom_val = SCOPE_MODE_SCROLL_F;
break;
+
default:
rig_debug(RIG_DEBUG_ERR, "%s: unsupported spectrum mode %d\n", __func__, val.i);
RETURNFUNC(-RIG_EINVAL);
@@ -3156,9 +3194,11 @@ int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
case 0:
icom_val = SCOPE_SPEED_SLOW;
break;
+
case 1:
icom_val = SCOPE_SPEED_MID;
break;
+
case 2:
icom_val = SCOPE_SPEED_FAST;
break;
@@ -3168,7 +3208,8 @@ int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
cmdbuf[1] = icom_val;
break;
- case RIG_LEVEL_SPECTRUM_REF: {
+ case RIG_LEVEL_SPECTRUM_REF:
+ {
float icom_db = (roundf(val.f * 2.0f) / 2.0f) * 100.0f;
lvl_cn = C_CTL_SCP;
@@ -3186,13 +3227,14 @@ int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
}
case RIG_LEVEL_SPECTRUM_EDGE_LOW:
- case RIG_LEVEL_SPECTRUM_EDGE_HIGH: {
+ case RIG_LEVEL_SPECTRUM_EDGE_HIGH:
+ {
int range_id;
value_t edge_number_value;
value_t opposite_edge_value;
setting_t level_opposite_edge =
- (level == RIG_LEVEL_SPECTRUM_EDGE_LOW) ?
- RIG_LEVEL_SPECTRUM_EDGE_HIGH : RIG_LEVEL_SPECTRUM_EDGE_LOW;
+ (level == RIG_LEVEL_SPECTRUM_EDGE_LOW) ?
+ RIG_LEVEL_SPECTRUM_EDGE_HIGH : RIG_LEVEL_SPECTRUM_EDGE_LOW;
lvl_cn = C_CTL_SCP;
lvl_sc = S_SCP_FEF;
@@ -3200,14 +3242,17 @@ int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
// Modify the frequency range currently active
retval = icom_get_spectrum_edge_frequency_range(rig, vfo, &range_id);
+
if (retval != RIG_OK)
{
- rig_debug(RIG_DEBUG_ERR, "%s: error getting spectrum edge frequency range\n", __func__);
+ rig_debug(RIG_DEBUG_ERR, "%s: error getting spectrum edge frequency range\n",
+ __func__);
RETURNFUNC(retval);
}
// Modify the edge number currently active
retval = icom_get_ext_level(rig, vfo, TOK_SCOPE_EDG, &edge_number_value);
+
if (retval != RIG_OK)
{
RETURNFUNC(retval);
@@ -3215,6 +3260,7 @@ int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
// Get the current opposite edge frequency
retval = icom_get_level(rig, vfo, level_opposite_edge, &opposite_edge_value);
+
if (retval != RIG_OK)
{
RETURNFUNC(retval);
@@ -3233,6 +3279,7 @@ int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
to_bcd(cmdbuf + 2, opposite_edge_value.i, 5 * 2);
to_bcd(cmdbuf + 7, val.i, 5 * 2);
}
+
break;
}
@@ -3249,7 +3296,8 @@ int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
}
}
- if (val.i != 0 && (i == HAMLIB_MAXDBLSTSIZ || rig->caps->spectrum_attenuator[i] == 0))
+ if (val.i != 0 && (i == HAMLIB_MAXDBLSTSIZ
+ || rig->caps->spectrum_attenuator[i] == 0))
{
rig_debug(RIG_DEBUG_ERR, "%s: unsupported spectrum attenuator level %ddB\n",
__func__, val.i);
@@ -3545,7 +3593,8 @@ int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
break;
case RIG_LEVEL_SPECTRUM_EDGE_LOW:
- case RIG_LEVEL_SPECTRUM_EDGE_HIGH: {
+ case RIG_LEVEL_SPECTRUM_EDGE_HIGH:
+ {
int range_id;
value_t edge_number_value;
@@ -3555,14 +3604,17 @@ int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
// Get the frequency range currently active
retval = icom_get_spectrum_edge_frequency_range(rig, vfo, &range_id);
+
if (retval != RIG_OK)
{
- rig_debug(RIG_DEBUG_ERR, "%s: error getting spectrum edge frequency range\n", __func__);
+ rig_debug(RIG_DEBUG_ERR, "%s: error getting spectrum edge frequency range\n",
+ __func__);
RETURNFUNC(retval);
}
// Get the edge number currently active
retval = icom_get_ext_level(rig, vfo, TOK_SCOPE_EDG, &edge_number_value);
+
if (retval != RIG_OK)
{
RETURNFUNC(retval);
@@ -3588,7 +3640,8 @@ int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
}
/* use cmdbuf and cmd_len for 'set mode' subcommand */
- retval = icom_transaction(rig, lvl_cn, lvl_sc, cmdbuf, cmd_len, respbuf, &resp_len);
+ retval = icom_transaction(rig, lvl_cn, lvl_sc, cmdbuf, cmd_len, respbuf,
+ &resp_len);
if (retval != RIG_OK)
{
@@ -3805,19 +3858,25 @@ int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
case SCOPE_MODE_CENTER:
val->i = RIG_SPECTRUM_MODE_CENTER;
break;
+
case SCOPE_MODE_FIXED:
val->i = RIG_SPECTRUM_MODE_FIXED;
break;
+
case SCOPE_MODE_SCROLL_C:
val->i = RIG_SPECTRUM_MODE_CENTER_SCROLL;
break;
+
case SCOPE_MODE_SCROLL_F:
val->i = RIG_SPECTRUM_MODE_FIXED_SCROLL;
break;
+
default:
- rig_debug(RIG_DEBUG_ERR, "%s: unsupported spectrum mode %d\n", __func__, icom_val);
+ rig_debug(RIG_DEBUG_ERR, "%s: unsupported spectrum mode %d\n", __func__,
+ icom_val);
RETURNFUNC(-RIG_EINVAL);
}
+
break;
case RIG_LEVEL_SPECTRUM_SPAN:
@@ -3832,19 +3891,25 @@ int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
case SCOPE_SPEED_SLOW:
val->i = 0;
break;
+
case SCOPE_SPEED_MID:
val->i = 1;
break;
+
case SCOPE_SPEED_FAST:
val->i = 2;
break;
+
default:
- rig_debug(RIG_DEBUG_ERR, "%s: unsupported spectrum speed %d\n", __func__, icom_val);
+ rig_debug(RIG_DEBUG_ERR, "%s: unsupported spectrum speed %d\n", __func__,
+ icom_val);
RETURNFUNC(-RIG_EINVAL);
}
+
break;
- case RIG_LEVEL_SPECTRUM_REF: {
+ case RIG_LEVEL_SPECTRUM_REF:
+ {
unsigned char *icom_ref = respbuf + cmdhead;
// Spectrum reference level is represented at 0.01dB accuracy, but is rounded to nearest 0.5dB
@@ -3921,7 +3986,8 @@ int icom_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val)
int lvl_cn, lvl_sc; /* Command Number, Subcommand */
int i, retval;
- rig_debug(RIG_DEBUG_VERBOSE, "%s called: token=%ld int=%d float=%f\n", __func__, token, val.i, val.f);
+ rig_debug(RIG_DEBUG_VERBOSE, "%s called: token=%ld int=%d float=%f\n", __func__,
+ token, val.i, val.f);
switch (token)
{
@@ -3950,6 +4016,7 @@ int icom_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val)
break;
case TOK_SCOPE_STX:
+
// TODO: Should be a func?
if (val.i < 0 || val.i > 1)
{
@@ -4030,7 +4097,8 @@ int icom_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val)
else { i++; }
}
- rig_debug(RIG_DEBUG_ERR, "%s: unsupported set_ext_level token: %ld\n", __func__, token);
+ rig_debug(RIG_DEBUG_ERR, "%s: unsupported set_ext_level token: %ld\n", __func__,
+ token);
RETURNFUNC(-RIG_EINVAL);
}
@@ -4136,12 +4204,14 @@ int icom_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val)
else { i++; }
}
- rig_debug(RIG_DEBUG_ERR, "%s: unsupported get_ext_level token: %ld\n", __func__, token);
+ rig_debug(RIG_DEBUG_ERR, "%s: unsupported get_ext_level token: %ld\n", __func__,
+ token);
RETURNFUNC(-RIG_EINVAL);
}
/* use cmdbuf and cmd_len for 'set mode' subcommand */
- retval = icom_transaction(rig, lvl_cn, lvl_sc, cmdbuf, cmd_len, respbuf, &resp_len);
+ retval = icom_transaction(rig, lvl_cn, lvl_sc, cmdbuf, cmd_len, respbuf,
+ &resp_len);
if (retval != RIG_OK)
{
@@ -4923,11 +4993,13 @@ int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
cmd = C_SEND_SEL_FREQ;
subcmd = 0x01; // set the unselected vfo
+
// if we're already on the tx_vfo don't need the "other" vfo
if (rig->state.current_vfo == rig->state.tx_vfo)
{
subcmd = 0x00;
}
+
retval = icom_transaction(rig, cmd, subcmd, freqbuf, freq_len, ackbuf,
&ack_len);
@@ -5003,8 +5075,10 @@ int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
rig_debug(RIG_DEBUG_TRACE, "%s: rx_vfo=%s, tx_vfo=%s\n", __func__,
rig_strvfo(rx_vfo), rig_strvfo(tx_vfo));
- TRACE;
- if (!(rig->caps->targetable_vfo & RIG_TARGETABLE_FREQ) && RIG_OK != (retval = rig_set_vfo(rig, tx_vfo)))
+ TRACE;
+
+ if (!(rig->caps->targetable_vfo & RIG_TARGETABLE_FREQ)
+ && RIG_OK != (retval = rig_set_vfo(rig, tx_vfo)))
{
RETURNFUNC(retval);
}
@@ -5015,6 +5089,7 @@ int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
}
TRACE;
+
if (VFO_HAS_MAIN_SUB_A_B_ONLY)
{
// Then we return the VFO to the rx_vfo
@@ -5022,15 +5097,17 @@ int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
__func__,
priv->split_on, rig_strvfo(rx_vfo));
- TRACE;
- if (!(rig->caps->targetable_vfo & RIG_TARGETABLE_FREQ) && RIG_OK != (retval = rig_set_vfo(rig, rx_vfo)))
+ TRACE;
+
+ if (!(rig->caps->targetable_vfo & RIG_TARGETABLE_FREQ)
+ && RIG_OK != (retval = rig_set_vfo(rig, rx_vfo)))
{
RETURNFUNC(retval);
}
}
else if (RIG_OK != (retval = rig_set_vfo(rig, rx_vfo)))
{
- TRACE;
+ TRACE;
RETURNFUNC(retval);
}
@@ -5230,6 +5307,7 @@ int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
}
TRACE;
+
if (RIG_OK != (retval = rig_set_vfo(rig, tx_vfo)))
{
RETURNFUNC(retval);
@@ -5241,13 +5319,15 @@ int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
}
TRACE;
+
if (VFO_HAS_MAIN_SUB_A_B_ONLY)
{
// Then we return the VFO to where it was
rig_debug(RIG_DEBUG_TRACE, "%s: SATMODE rig so returning vfo to %s\n", __func__,
rig_strvfo(rx_vfo));
- TRACE;
+ TRACE;
+
if (RIG_OK != (retval = rig_set_vfo(rig, rx_vfo)))
{
RETURNFUNC(retval);
@@ -5255,7 +5335,7 @@ int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
}
else if (RIG_OK != (retval = rig_set_vfo(rig, rx_vfo)))
{
- TRACE;
+ TRACE;
RETURNFUNC(retval);
}
@@ -5354,7 +5434,9 @@ int icom_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode,
}
TRACE;
- if (!(rig->caps->targetable_vfo & RIG_TARGETABLE_MODE) && RIG_OK != (retval = rig_set_vfo(rig, tx_vfo)))
+
+ if (!(rig->caps->targetable_vfo & RIG_TARGETABLE_MODE)
+ && RIG_OK != (retval = rig_set_vfo(rig, tx_vfo)))
{
RETURNFUNC(retval);
}
@@ -5365,8 +5447,10 @@ int icom_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode,
RETURNFUNC(retval);
}
- TRACE;
- if (!(rig->caps->targetable_vfo & RIG_TARGETABLE_MODE) && RIG_OK != (retval = rig_set_vfo(rig, rx_vfo)))
+ TRACE;
+
+ if (!(rig->caps->targetable_vfo & RIG_TARGETABLE_MODE)
+ && RIG_OK != (retval = rig_set_vfo(rig, rx_vfo)))
{
RETURNFUNC(retval);
}
@@ -5466,6 +5550,7 @@ int icom_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode,
}
TRACE;
+
if (RIG_OK != (retval = rig_set_vfo(rig, tx_vfo)))
{
RETURNFUNC(retval);
@@ -5477,7 +5562,8 @@ int icom_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode,
RETURNFUNC(retval);
}
- TRACE;
+ TRACE;
+
if (RIG_OK != (retval = rig_set_vfo(rig, rx_vfo)))
{
RETURNFUNC(retval);
@@ -5540,8 +5626,9 @@ int icom_set_split_freq_mode(RIG *rig, vfo_t vfo, freq_t tx_freq,
RETURNFUNC(retval);
}
- if (!(rig->caps->targetable_vfo & RIG_TARGETABLE_MODE) && RIG_OK != (retval = rig->caps->set_mode(rig, RIG_VFO_CURR, tx_mode,
- tx_width)))
+ if (!(rig->caps->targetable_vfo & RIG_TARGETABLE_MODE)
+ && RIG_OK != (retval = rig->caps->set_mode(rig, RIG_VFO_CURR, tx_mode,
+ tx_width)))
{
RETURNFUNC(retval);
}
@@ -5618,7 +5705,9 @@ int icom_set_split_freq_mode(RIG *rig, vfo_t vfo, freq_t tx_freq,
}
TRACE;
- if (!(rig->caps->targetable_vfo & RIG_TARGETABLE_FREQ) && RIG_OK != (retval = rig_set_vfo(rig, tx_vfo)))
+
+ if (!(rig->caps->targetable_vfo & RIG_TARGETABLE_FREQ)
+ && RIG_OK != (retval = rig_set_vfo(rig, tx_vfo)))
{
RETURNFUNC(retval);
}
@@ -5628,8 +5717,10 @@ int icom_set_split_freq_mode(RIG *rig, vfo_t vfo, freq_t tx_freq,
RETURNFUNC(retval);
}
- TRACE;
- if (!(rig->caps->targetable_vfo & RIG_TARGETABLE_MODE) && RIG_OK != (retval = rig_set_vfo(rig, tx_vfo)))
+ TRACE;
+
+ if (!(rig->caps->targetable_vfo & RIG_TARGETABLE_MODE)
+ && RIG_OK != (retval = rig_set_vfo(rig, tx_vfo)))
{
RETURNFUNC(retval);
}
@@ -5640,8 +5731,10 @@ int icom_set_split_freq_mode(RIG *rig, vfo_t vfo, freq_t tx_freq,
RETURNFUNC(retval);
}
- TRACE;
- if (!(rig->caps->targetable_vfo & RIG_TARGETABLE_MODE) && RIG_OK != (retval = rig_set_vfo(rig, rx_vfo)))
+ TRACE;
+
+ if (!(rig->caps->targetable_vfo & RIG_TARGETABLE_MODE)
+ && RIG_OK != (retval = rig_set_vfo(rig, rx_vfo)))
{
RETURNFUNC(retval);
}
@@ -5746,6 +5839,7 @@ int icom_get_split_freq_mode(RIG *rig, vfo_t vfo, freq_t *tx_freq,
}
TRACE;
+
if (RIG_OK != (retval = rig_set_vfo(rig, tx_vfo)))
{
RETURNFUNC(retval);
@@ -5762,7 +5856,8 @@ int icom_get_split_freq_mode(RIG *rig, vfo_t vfo, freq_t *tx_freq,
RETURNFUNC(retval);
}
- TRACE;
+ TRACE;
+
if (RIG_OK != (retval = rig_set_vfo(rig, rx_vfo)))
{
RETURNFUNC(retval);
@@ -5879,6 +5974,7 @@ int icom_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
case RIG_SPLIT_ON:
split_sc = S_SPLT_ON;
rig_debug(RIG_DEBUG_TRACE, "trace %s(%d)\n", __func__, __LINE__);
+
// the VFO adjusting here could probably be done in rig.c for all rigs
/* If asking for Sub or Main on rig that doesn't have it map it */
if (VFO_HAS_A_B_ONLY && ((tx_vfo == RIG_VFO_MAIN || tx_vfo == RIG_VFO_SUB)
@@ -5901,13 +5997,15 @@ int icom_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
"%s: rx_vfo to VFO_A, tx_vfo to VFO_B because tx_vfo=%s\n", __func__,
rig_strvfo(tx_vfo));
- if (tx_vfo == RIG_VFO_B) {
- priv->tx_vfo = RIG_VFO_B;
- priv->rx_vfo = vfo = RIG_VFO_A;
+ if (tx_vfo == RIG_VFO_B)
+ {
+ priv->tx_vfo = RIG_VFO_B;
+ priv->rx_vfo = vfo = RIG_VFO_A;
}
- else {
- priv->tx_vfo = RIG_VFO_A;
- priv->rx_vfo = vfo = RIG_VFO_B;
+ else
+ {
+ priv->tx_vfo = RIG_VFO_A;
+ priv->rx_vfo = vfo = RIG_VFO_B;
}
}
else if (VFO_HAS_MAIN_SUB_A_B_ONLY && (tx_vfo == RIG_VFO_MAIN
@@ -5927,12 +6025,14 @@ int icom_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
// make sure we're on Main/VFOA
TRACE;
+
if (RIG_OK != (retval = icom_set_vfo(rig, RIG_VFO_MAIN)))
{
RETURNFUNC(retval);
}
TRACE;
+
if (RIG_OK != (retval = icom_set_vfo(rig, RIG_VFO_A)))
{
RETURNFUNC(retval);
@@ -5949,6 +6049,7 @@ int icom_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
#if 0 // do we need this for satmode?
TRACE;
+
if (RIG_OK != (retval = icom_set_vfo(rig, tx_vfo)))
{
RETURNFUNC(retval);
@@ -5999,6 +6100,7 @@ int icom_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
priv->split_on = RIG_SPLIT_ON == split;
#if 0 // don't think we need this anymore -- 20210731
+
if (vfo_final != RIG_VFO_NONE && vfo_final != rig->state.current_vfo)
{
rig_debug(RIG_DEBUG_TRACE, "%s: vfo_final set %s\n", __func__,
@@ -6012,6 +6114,7 @@ int icom_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
rigerror(retval));
}
}
+
#endif
rig_debug(RIG_DEBUG_VERBOSE,
@@ -6083,9 +6186,11 @@ int icom_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo)
if (rig->caps->has_get_func & RIG_FUNC_SATMODE)
{
rig_get_func(rig, RIG_VFO_CURR, RIG_FUNC_SATMODE, &satmode);
+
if (satmode != rig->state.cache.satmode)
{
- rig_debug(RIG_DEBUG_VERBOSE, "%s(%d): satmode changed to reset x25cmdfails\n", __func__, __LINE__);
+ rig_debug(RIG_DEBUG_VERBOSE, "%s(%d): satmode changed to reset x25cmdfails\n",
+ __func__, __LINE__);
priv->x25cmdfails = satmode; // reset this so it tries again
}
}
@@ -6702,6 +6807,7 @@ int icom_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)
fct_cn = C_CTL_FUNC;
fct_sc = S_MEM_SATMODE;
}
+
break;
default:
@@ -6710,7 +6816,8 @@ int icom_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)
RETURNFUNC(-RIG_EINVAL);
}
- retval = icom_transaction(rig, fct_cn, fct_sc, fctbuf, fct_len, ackbuf, &ack_len);
+ retval = icom_transaction(rig, fct_cn, fct_sc, fctbuf, fct_len, ackbuf,
+ &ack_len);
if (retval != RIG_OK)
{
@@ -8086,7 +8193,8 @@ int icom_mW2power(RIG *rig, float *power, unsigned int mwpower, freq_t freq,
RETURNFUNC(RIG_OK);
}
-static int icom_parse_spectrum_frame(RIG *rig, int length, const unsigned char *frame_data)
+static int icom_parse_spectrum_frame(RIG *rig, int length,
+ const unsigned char *frame_data)
{
struct rig_caps *caps = rig->caps;
struct icom_priv_caps *priv_caps = (struct icom_priv_caps *) caps->priv;
@@ -8106,7 +8214,8 @@ static int icom_parse_spectrum_frame(RIG *rig, int length, const unsigned char *
if (spectrum_id < 0 || spectrum_id >= priv->spectrum_scope_count)
{
- rig_debug(RIG_DEBUG_ERR, "%s: invalid spectrum scope ID from CI-V frame: %d\n", __func__, spectrum_id);
+ rig_debug(RIG_DEBUG_ERR, "%s: invalid spectrum scope ID from CI-V frame: %d\n",
+ __func__, spectrum_id);
RETURNFUNC(-RIG_EPROTO);
}
@@ -8121,46 +8230,60 @@ static int icom_parse_spectrum_frame(RIG *rig, int length, const unsigned char *
switch (spectrum_scope_mode)
{
- case SCOPE_MODE_CENTER:
- cache->spectrum_mode = RIG_SPECTRUM_MODE_CENTER;
- cache->spectrum_center_freq = (freq_t) from_bcd(frame_data + 4, 5 * 2);
- cache->spectrum_span_freq = (freq_t) from_bcd(frame_data + 9, 5 * 2) * 2;
- cache->spectrum_low_edge_freq = cache->spectrum_center_freq - cache->spectrum_span_freq / 2;
- cache->spectrum_high_edge_freq = cache->spectrum_center_freq + cache->spectrum_span_freq / 2;
- break;
- case SCOPE_MODE_FIXED:
- cache->spectrum_mode = RIG_SPECTRUM_MODE_FIXED;
- case SCOPE_MODE_SCROLL_C:
- if (cache->spectrum_mode == RIG_SPECTRUM_MODE_NONE)
- {
- cache->spectrum_mode = RIG_SPECTRUM_MODE_CENTER_SCROLL;
- }
- case SCOPE_MODE_SCROLL_F:
- if (cache->spectrum_mode == RIG_SPECTRUM_MODE_NONE)
- {
- cache->spectrum_mode = RIG_SPECTRUM_MODE_FIXED_SCROLL;
- }
- cache->spectrum_low_edge_freq = (freq_t) from_bcd(frame_data + 4, 5 * 2);
- cache->spectrum_high_edge_freq = (freq_t) from_bcd(frame_data + 9, 5 * 2);
- cache->spectrum_span_freq = (cache->spectrum_high_edge_freq - cache->spectrum_low_edge_freq);
- cache->spectrum_center_freq = cache->spectrum_high_edge_freq - cache->spectrum_span_freq / 2;
- break;
- default:
- rig_debug(RIG_DEBUG_ERR, "%s: unknown Icom spectrum scope mode: %d\n", __func__, spectrum_scope_mode)
- RETURNFUNC(-RIG_EPROTO);
+ case SCOPE_MODE_CENTER:
+ cache->spectrum_mode = RIG_SPECTRUM_MODE_CENTER;
+ cache->spectrum_center_freq = (freq_t) from_bcd(frame_data + 4, 5 * 2);
+ cache->spectrum_span_freq = (freq_t) from_bcd(frame_data + 9, 5 * 2) * 2;
+ cache->spectrum_low_edge_freq = cache->spectrum_center_freq -
+ cache->spectrum_span_freq / 2;
+ cache->spectrum_high_edge_freq = cache->spectrum_center_freq +
+ cache->spectrum_span_freq / 2;
+ break;
+
+ case SCOPE_MODE_FIXED:
+ cache->spectrum_mode = RIG_SPECTRUM_MODE_FIXED;
+
+ case SCOPE_MODE_SCROLL_C:
+ if (cache->spectrum_mode == RIG_SPECTRUM_MODE_NONE)
+ {
+ cache->spectrum_mode = RIG_SPECTRUM_MODE_CENTER_SCROLL;
+ }
+
+ case SCOPE_MODE_SCROLL_F:
+ if (cache->spectrum_mode == RIG_SPECTRUM_MODE_NONE)
+ {
+ cache->spectrum_mode = RIG_SPECTRUM_MODE_FIXED_SCROLL;
+ }
+
+ cache->spectrum_low_edge_freq = (freq_t) from_bcd(frame_data + 4, 5 * 2);
+ cache->spectrum_high_edge_freq = (freq_t) from_bcd(frame_data + 9, 5 * 2);
+ cache->spectrum_span_freq = (cache->spectrum_high_edge_freq -
+ cache->spectrum_low_edge_freq);
+ cache->spectrum_center_freq = cache->spectrum_high_edge_freq -
+ cache->spectrum_span_freq / 2;
+ break;
+
+ default:
+ rig_debug(RIG_DEBUG_ERR, "%s: unknown Icom spectrum scope mode: %d\n", __func__,
+ spectrum_scope_mode)
+ RETURNFUNC(-RIG_EPROTO);
}
spectrum_data_length_in_frame = length - 15;
spectrum_data_start_in_frame = frame_data + 15;
- memset(cache->spectrum_data, 0, priv_caps->spectrum_scope_caps.spectrum_line_length);
+ memset(cache->spectrum_data, 0,
+ priv_caps->spectrum_scope_caps.spectrum_line_length);
cache->spectrum_data_length = 0;
cache->spectrum_metadata_valid = 1;
- rig_debug(RIG_DEBUG_TRACE, "%s: Spectrum line start: id=%d division=%d max_division=%d mode=%d center=%.0f span=%.0f low_edge=%.0f high_edge=%.0f oor=%d data_length=%d\n",
- __func__, spectrum_id, division, max_division, spectrum_scope_mode, cache->spectrum_center_freq, cache->spectrum_span_freq,
- cache->spectrum_low_edge_freq, cache->spectrum_high_edge_freq, out_of_range, spectrum_data_length_in_frame);
+ rig_debug(RIG_DEBUG_TRACE,
+ "%s: Spectrum line start: id=%d division=%d max_division=%d mode=%d center=%.0f span=%.0f low_edge=%.0f high_edge=%.0f oor=%d data_length=%d\n",
+ __func__, spectrum_id, division, max_division, spectrum_scope_mode,
+ cache->spectrum_center_freq, cache->spectrum_span_freq,
+ cache->spectrum_low_edge_freq, cache->spectrum_high_edge_freq, out_of_range,
+ spectrum_data_length_in_frame);
}
else
{
@@ -8174,20 +8297,25 @@ static int icom_parse_spectrum_frame(RIG *rig, int length, const unsigned char *
int data_frame_index = (max_division > 1) ? (division - 2) : (division - 1);
int offset = data_frame_index * frame_length;
- if (offset + spectrum_data_length_in_frame > priv_caps->spectrum_scope_caps.spectrum_line_length)
+ if (offset + spectrum_data_length_in_frame >
+ priv_caps->spectrum_scope_caps.spectrum_line_length)
{
- rig_debug(RIG_DEBUG_ERR, "%s: too much spectrum scope data received: %d bytes > %d bytes expected\n",
- __func__, offset + spectrum_data_length_in_frame, priv_caps->spectrum_scope_caps.spectrum_line_length);
+ rig_debug(RIG_DEBUG_ERR,
+ "%s: too much spectrum scope data received: %d bytes > %d bytes expected\n",
+ __func__, offset + spectrum_data_length_in_frame,
+ priv_caps->spectrum_scope_caps.spectrum_line_length);
RETURNFUNC(-RIG_EPROTO);
}
- memcpy(cache->spectrum_data + offset, spectrum_data_start_in_frame, spectrum_data_length_in_frame);
+ memcpy(cache->spectrum_data + offset, spectrum_data_start_in_frame,
+ spectrum_data_length_in_frame);
cache->spectrum_data_length = offset + spectrum_data_length_in_frame;
}
if (cache->spectrum_metadata_valid && division == max_division)
{
- struct rig_spectrum_line spectrum_line = {
+ struct rig_spectrum_line spectrum_line =
+ {
.data_level_min = priv_caps->spectrum_scope_caps.data_level_min,
.data_level_max = priv_caps->spectrum_scope_caps.data_level_max,
.signal_strength_min = priv_caps->spectrum_scope_caps.signal_strength_min,
@@ -8220,10 +8348,12 @@ int icom_is_async_frame(RIG *rig, int frame_len, const unsigned char *frame)
}
/* Spectrum scope data is not CI-V transceive data, but handled the same way as it is pushed by the rig */
- return frame[2] == BCASTID || (frame[2] == CTRLID && frame[4] == C_CTL_SCP && frame[5] == S_SCP_DAT);
+ return frame[2] == BCASTID || (frame[2] == CTRLID && frame[4] == C_CTL_SCP
+ && frame[5] == S_SCP_DAT);
}
-int icom_process_async_frame(RIG *rig, int frame_len, const unsigned char *frame)
+int icom_process_async_frame(RIG *rig, int frame_len,
+ const unsigned char *frame)
{
struct rig_state *rs = &rig->state;
struct icom_priv_data *priv = (struct icom_priv_data *) rs->priv;
@@ -8242,50 +8372,52 @@ int icom_process_async_frame(RIG *rig, int frame_len, const unsigned char *frame
*/
switch (frame[4])
{
- case C_SND_FREQ:
- /*
- * TODO: the freq length might be less than 4 or 5 bytes
- * on older rigs!
- */
- if (rig->callbacks.freq_event)
- {
- freq_t freq;
- freq = from_bcd(frame + 5, (priv->civ_731_mode ? 4 : 5) * 2);
- RETURNFUNC(rig->callbacks.freq_event(rig, RIG_VFO_CURR, freq,
- rig->callbacks.freq_arg));
- }
- else
- {
- RETURNFUNC(-RIG_ENAVAIL);
- }
+ case C_SND_FREQ:
- break;
+ /*
+ * TODO: the freq length might be less than 4 or 5 bytes
+ * on older rigs!
+ */
+ if (rig->callbacks.freq_event)
+ {
+ freq_t freq;
+ freq = from_bcd(frame + 5, (priv->civ_731_mode ? 4 : 5) * 2);
+ RETURNFUNC(rig->callbacks.freq_event(rig, RIG_VFO_CURR, freq,
+ rig->callbacks.freq_arg));
+ }
+ else
+ {
+ RETURNFUNC(-RIG_ENAVAIL);
+ }
- case C_SND_MODE:
- if (rig->callbacks.mode_event)
- {
- icom2rig_mode(rig, frame[5], frame[6], &mode, &width);
- RETURNFUNC(rig->callbacks.mode_event(rig, RIG_VFO_CURR,
- mode, width, rig->callbacks.mode_arg));
- }
- else
- {
- RETURNFUNC(-RIG_ENAVAIL);
- }
+ break;
- break;
+ case C_SND_MODE:
+ if (rig->callbacks.mode_event)
+ {
+ icom2rig_mode(rig, frame[5], frame[6], &mode, &width);
+ RETURNFUNC(rig->callbacks.mode_event(rig, RIG_VFO_CURR,
+ mode, width, rig->callbacks.mode_arg));
+ }
+ else
+ {
+ RETURNFUNC(-RIG_ENAVAIL);
+ }
- case C_CTL_SCP:
- if (frame[5] == S_SCP_DAT)
- {
- icom_parse_spectrum_frame(rig, frame_len - (6 + 1), frame + 6);
- }
- break;
+ break;
- default:
- rig_debug(RIG_DEBUG_VERBOSE, "%s: transceive cmd unsupported %#2.2x\n",
- __func__, frame[4]);
- RETURNFUNC(-RIG_ENIMPL);
+ case C_CTL_SCP:
+ if (frame[5] == S_SCP_DAT)
+ {
+ icom_parse_spectrum_frame(rig, frame_len - (6 + 1), frame + 6);
+ }
+
+ break;
+
+ default:
+ rig_debug(RIG_DEBUG_VERBOSE, "%s: transceive cmd unsupported %#2.2x\n",
+ __func__, frame[4]);
+ RETURNFUNC(-RIG_ENIMPL);
}
RETURNFUNC(RIG_OK);
@@ -8321,6 +8453,7 @@ int icom_decode_event(RIG *rig)
}
retval = icom_frame_fix_preamble(frm_len, buf);
+
if (retval < 0)
{
RETURNFUNC(retval);
@@ -8681,7 +8814,7 @@ static int set_vfo_curr(RIG *rig, vfo_t vfo, vfo_t curr_vfo)
{
rig_debug(RIG_DEBUG_TRACE, "%s: setting new vfo=%s\n", __func__,
rig_strvfo(vfo));
- TRACE;
+ TRACE;
retval = rig_set_vfo(rig, vfo);
if (retval != RIG_OK)
@@ -8709,7 +8842,8 @@ static int icom_get_spectrum_vfo(RIG *rig, vfo_t vfo)
RETURNFUNC(0);
}
-static int icom_get_spectrum_edge_frequency_range(RIG *rig, vfo_t vfo, int *range_id)
+static int icom_get_spectrum_edge_frequency_range(RIG *rig, vfo_t vfo,
+ int *range_id)
{
freq_t freq;
rmode_t mode;
@@ -8718,7 +8852,9 @@ static int icom_get_spectrum_edge_frequency_range(RIG *rig, vfo_t vfo, int *rang
int i, retval;
struct icom_priv_caps *priv_caps = (struct icom_priv_caps *) rig->caps->priv;
- retval = rig_get_cache(rig, vfo, &freq, &cache_ms_freq, &mode, &cache_ms_mode, &width, &cache_ms_width);
+ retval = rig_get_cache(rig, vfo, &freq, &cache_ms_freq, &mode, &cache_ms_mode,
+ &width, &cache_ms_width);
+
if (retval != RIG_OK)
{
RETURNFUNC(retval);
@@ -8728,6 +8864,7 @@ static int icom_get_spectrum_edge_frequency_range(RIG *rig, vfo_t vfo, int *rang
if (freq == 0 || cache_ms_freq >= 1000)
{
retval = rig_get_freq(rig, vfo, &freq);
+
if (retval != RIG_OK)
{
RETURNFUNC(retval);
@@ -8737,11 +8874,14 @@ static int icom_get_spectrum_edge_frequency_range(RIG *rig, vfo_t vfo, int *rang
for (i = 0; i < ICOM_MAX_SPECTRUM_FREQ_RANGES; i++)
{
int id = priv_caps->spectrum_edge_frequency_ranges[i].range_id;
+
if (id < 1)
{
break;
}
- if (freq >= priv_caps->spectrum_edge_frequency_ranges[i].low_freq && freq < priv_caps->spectrum_edge_frequency_ranges[i].high_freq)
+
+ if (freq >= priv_caps->spectrum_edge_frequency_ranges[i].low_freq
+ && freq < priv_caps->spectrum_edge_frequency_ranges[i].high_freq)
{
*range_id = id;
RETURNFUNC(RIG_OK);
diff --git a/rigs/kenwood/flex6xxx.c b/rigs/kenwood/flex6xxx.c
index 1fcea374..231ee1f9 100644
--- a/rigs/kenwood/flex6xxx.c
+++ b/rigs/kenwood/flex6xxx.c
@@ -631,7 +631,7 @@ int flex6k_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
if (ptt_cmd[4] != response[4])
{
rig_debug(RIG_DEBUG_ERR, "%s: %s != %s\n", __func__, ptt_cmd, response);
- hl_usleep(20*1000); // takes a bit to do PTT off
+ hl_usleep(20 * 1000); // takes a bit to do PTT off
}
}
while (ptt_cmd[4] != response[4] && --retry);
diff --git a/rigs/kenwood/k3.c b/rigs/kenwood/k3.c
index 9cbcae64..a131de3f 100644
--- a/rigs/kenwood/k3.c
+++ b/rigs/kenwood/k3.c
@@ -220,7 +220,7 @@ const struct rig_caps k3_caps =
.max_xit = Hz(9990),
.max_ifshift = Hz(0),
.vfo_ops = K3_VFO_OP,
- .targetable_vfo = RIG_TARGETABLE_FREQ|RIG_TARGETABLE_MODE,
+ .targetable_vfo = RIG_TARGETABLE_FREQ | RIG_TARGETABLE_MODE,
.transceive = RIG_TRN_RIG,
.bank_qty = 0,
.chan_desc_sz = 0,
@@ -370,7 +370,7 @@ const struct rig_caps k3s_caps =
.max_xit = Hz(9990),
.max_ifshift = Hz(0),
.vfo_ops = K3_VFO_OP,
- .targetable_vfo = RIG_TARGETABLE_FREQ|RIG_TARGETABLE_MODE,
+ .targetable_vfo = RIG_TARGETABLE_FREQ | RIG_TARGETABLE_MODE,
.transceive = RIG_TRN_RIG,
.bank_qty = 0,
.chan_desc_sz = 0,
@@ -520,7 +520,7 @@ const struct rig_caps k4_caps =
.max_xit = Hz(9990),
.max_ifshift = Hz(0),
.vfo_ops = K3_VFO_OP,
- .targetable_vfo = RIG_TARGETABLE_FREQ|RIG_TARGETABLE_MODE,
+ .targetable_vfo = RIG_TARGETABLE_FREQ | RIG_TARGETABLE_MODE,
.transceive = RIG_TRN_RIG,
.bank_qty = 0,
.chan_desc_sz = 0,
@@ -669,7 +669,7 @@ const struct rig_caps kx3_caps =
.max_xit = Hz(9990),
.max_ifshift = Hz(0),
.vfo_ops = K3_VFO_OP,
- .targetable_vfo = RIG_TARGETABLE_FREQ|RIG_TARGETABLE_MODE,
+ .targetable_vfo = RIG_TARGETABLE_FREQ | RIG_TARGETABLE_MODE,
.transceive = RIG_TRN_RIG,
.bank_qty = 0,
.chan_desc_sz = 0,
@@ -818,7 +818,7 @@ const struct rig_caps kx2_caps =
.max_xit = Hz(9990),
.max_ifshift = Hz(0),
.vfo_ops = K3_VFO_OP,
- .targetable_vfo = RIG_TARGETABLE_FREQ|RIG_TARGETABLE_MODE,
+ .targetable_vfo = RIG_TARGETABLE_FREQ | RIG_TARGETABLE_MODE,
.transceive = RIG_TRN_RIG,
.bank_qty = 0,
.chan_desc_sz = 0,
@@ -1098,17 +1098,22 @@ int k3_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
{
vfo = rig->state.current_vfo;
}
+
rmode_t tmode;
pbwidth_t twidth;
- err = k3_get_mode(rig,vfo,&tmode,&twidth);
+ err = k3_get_mode(rig, vfo, &tmode, &twidth);
+
if (err == RIG_OK && tmode == mode && width == RIG_PASSBAND_NOCHANGE)
{
- rig_debug(RIG_DEBUG_TRACE, "%s(%d): mode/width no change, skipping\n", __FILE__, __LINE__);
+ rig_debug(RIG_DEBUG_TRACE, "%s(%d): mode/width no change, skipping\n", __FILE__,
+ __LINE__);
return RIG_OK;
}
else
{
- rig_debug(RIG_DEBUG_TRACE, "%s(%d): changing mode=%s, oldmode=%s, width=%ld, oldwidth=%ld\n", __FILE__, __LINE__, rig_strrmode(tmode), rig_strrmode(mode), twidth, width);
+ rig_debug(RIG_DEBUG_TRACE,
+ "%s(%d): changing mode=%s, oldmode=%s, width=%ld, oldwidth=%ld\n", __FILE__,
+ __LINE__, rig_strrmode(tmode), rig_strrmode(mode), twidth, width);
}
switch (mode)
@@ -1478,45 +1483,60 @@ int k3_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width)
tx_mode = RIG_MODE_RTTYR; // "DT0" RIG_MODE_RTTY = LSB
snprintf(cmd_m, sizeof(cmd_m),
"DT0;"); /* DATA A mode - DATA-R LSB, suppressed carrier */
- if (priv->is_k4d || priv->is_k4hd) {
+
+ if (priv->is_k4d || priv->is_k4hd)
+ {
strcat(cmd_m, "DT$0;");
}
+
break;
case RIG_MODE_PKTUSB:
tx_mode = RIG_MODE_RTTY; // "DT0" RIG_MODE_RTTYR = USB
snprintf(cmd_m, sizeof(cmd_m),
"DT0;"); /* DATA A mode - DATA on USB, suppressed carrier */
- if (priv->is_k4d || priv->is_k4hd) {
+
+ if (priv->is_k4d || priv->is_k4hd)
+ {
strcat(cmd_m, "DT$0;");
}
+
break;
case RIG_MODE_RTTY:
tx_mode = RIG_MODE_RTTY; // DT1" RIG_MODE_RTTY = LSB and RIG_MODE_RTTYR = USB
snprintf(cmd_m, sizeof(cmd_m),
"DT2;"); /* FSK D mode - direct FSK on LSB optimized for RTTY, VFO dial is MARK */
- if (priv->is_k4d || priv->is_k4hd) {
+
+ if (priv->is_k4d || priv->is_k4hd)
+ {
strcat(cmd_m, "DT$2;");
}
+
break;
case RIG_MODE_RTTYR:
tx_mode = RIG_MODE_RTTYR; // "DT2" RIG_MODE_RTTY = USB and RIG_MODE_RTTYR = USB
snprintf(cmd_m, sizeof(cmd_m),
"DT1;"); /* FSK D mode - direct FSK on USB optimized for RTTY, VFO dial is MARK */
- if (priv->is_k4d || priv->is_k4hd) {
+
+ if (priv->is_k4d || priv->is_k4hd)
+ {
strcat(cmd_m, "DT$1;");
}
+
break;
case RIG_MODE_PSK:
tx_mode = RIG_MODE_PSK;
snprintf(cmd_m, sizeof(cmd_m),
"DT3;FT1;"); /* PSK D Mode - direct PSK keying, USB is "normal", VFO dial is MARK */
- if (priv->is_k4d || priv->is_k4hd) {
+
+ if (priv->is_k4d || priv->is_k4hd)
+ {
strcat(cmd_m, "DT$3;");
}
+
break;
default:
@@ -1526,16 +1546,18 @@ int k3_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width)
// Enabling this clause for just the K4 for now
#if 1
- if (priv->is_k4d || priv->is_k4hd) {
- // split can get turned off when modes are changing
+ if (priv->is_k4d || priv->is_k4hd)
+ {
+ // split can get turned off when modes are changing
// so if the rig did this independtly of us we turn it back on
// even if the rig changes the split status should be the last thing we did
- if (priv->split) strcat(cmd_m, "FT1;");
+ if (priv->split) { strcat(cmd_m, "FT1;"); }
+
/* Set data sub-mode. K3 needs to be in a DATA mode before setting
* the sub-mode or switching to VFOB so we do this before the MD$ command.
*/
if (tx_mode == RIG_MODE_PKTLSB ||...
[truncated message content] |
|
From: Michael B. <mdb...@us...> - 2021-08-24 04:20: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 851c499376915d9728cbec53618b7385378277b0 (commit)
via 0965a4382c87739d46dbeb09df4ad8a064e6a7f6 (commit)
via 547bd0fb555503cb30f5d2dad77d4de2b8e2c13a (commit)
from b2acf0b6f5e34fcc9dd0a5d1f8ff3a3f45e35971 (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 851c499376915d9728cbec53618b7385378277b0
Author: Mike Black W9MDB <mdb...@ya...>
Date: Mon Aug 23 23:19:12 2021 -0500
Fix lack of error for some bad rig numbers. e.g. rigctl -m 228 produced hash collision error instead of unknown rig
https://github.com/Hamlib/Hamlib/issues/735
diff --git a/src/register.c b/src/register.c
index ff4ef5e2..0d3895ac 100644
--- a/src/register.c
+++ b/src/register.c
@@ -284,6 +284,7 @@ int HAMLIB_API rig_check_backend(rig_model_t rig_model)
const struct rig_caps *caps;
int be_idx;
int retval;
+ int i,n;
/* already loaded ? */
caps = rig_get_caps(rig_model);
@@ -293,6 +294,17 @@ int HAMLIB_API rig_check_backend(rig_model_t rig_model)
return RIG_OK;
}
+ // hmmm...no caps so did we already load the rigs?
+ for(n=0, i=0; i< RIGLSTHASHSZ; i++)
+ {
+ if (rig_hash_table[i]) ++n;
+ }
+ if (n > 1)
+ {
+ rig_debug(RIG_DEBUG_ERR, "%s: rig model %d not found and rig count=%d\n", __func__, rig_model, n);
+ return -RIG_ENAVAIL;
+ }
+
be_idx = rig_lookup_backend(rig_model);
/*
commit 0965a4382c87739d46dbeb09df4ad8a064e6a7f6
Author: Mike Black W9MDB <mdb...@ya...>
Date: Sun Aug 22 16:47:29 2021 -0500
Fix Kenwood rigs that turn split off during FR command by turning split back on if needed
https://github.com/Hamlib/Hamlib/issues/746
diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c
index f6681ee9..efe6ade9 100644
--- a/rigs/kenwood/kenwood.c
+++ b/rigs/kenwood/kenwood.c
@@ -1115,6 +1115,9 @@ int kenwood_set_vfo(RIG *rig, vfo_t vfo)
}
snprintf(cmdbuf, sizeof(cmdbuf), "FR%c", vfo_function);
+ // FR can turn off split on some Kenwood rigs
+ // So we'll turn it back on just in case
+ if (priv->split) strcat(cmdbuf,"FT1;");
if (RIG_IS_TS50 || RIG_IS_TS940)
{
@@ -1251,6 +1254,9 @@ int kenwood_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t txvfo)
/* set RX VFO */
snprintf(cmdbuf, sizeof(cmdbuf), "FR%c", vfo_function);
+ // FR can turn off split on some Kenwood rigs
+ // So we'll turn it back on just in case
+ if (priv->split) strcat(cmdbuf,"FT1;");
retval = kenwood_transaction(rig, cmdbuf, NULL, 0);
if (retval != RIG_OK)
diff --git a/rigs/kenwood/kenwood.h b/rigs/kenwood/kenwood.h
index f00b156f..17f64d54 100644
--- a/rigs/kenwood/kenwood.h
+++ b/rigs/kenwood/kenwood.h
@@ -28,7 +28,7 @@
#include "token.h"
#include "misc.h"
-#define BACKEND_VER "20210809"
+#define BACKEND_VER "20210822"
#define EOM_KEN ';'
#define EOM_TH '\r'
commit 547bd0fb555503cb30f5d2dad77d4de2b8e2c13a
Author: Mike Black W9MDB <mdb...@ya...>
Date: Sun Aug 22 16:40:48 2021 -0500
Fix ANT get/set for IC756Pro series
https://github.com/Hamlib/Hamlib/issues/774
diff --git a/rigs/icom/ic756.c b/rigs/icom/ic756.c
index bcdb0baa..64e8243f 100644
--- a/rigs/icom/ic756.c
+++ b/rigs/icom/ic756.c
@@ -127,7 +127,7 @@ static const struct icom_priv_caps ic756_priv_caps =
0, /* 731 mode */
0, /* no XCHG */
ic756_ts_sc_list,
- .antack_len = 2,
+ .antack_len = 3,
.ant_count = 2,
.r2i_mode = r2i_mode,
.agc_levels_present = 1,
@@ -291,7 +291,7 @@ static const struct icom_priv_caps ic756pro_priv_caps =
0, /* 731 mode */
0, /* no XCHG */
ic756pro_ts_sc_list,
- .antack_len = 2,
+ .antack_len = 3,
.ant_count = 2,
.agc_levels_present = 1,
.agc_levels = {
@@ -461,7 +461,7 @@ static const struct icom_priv_caps ic756pro2_priv_caps =
0, /* 731 mode */
0, /* no XCHG */
ic756pro_ts_sc_list,
- .antack_len = 2,
+ .antack_len = 3,
.ant_count = 2,
.agc_levels_present = 1,
.agc_levels = {
@@ -890,7 +890,7 @@ static const struct icom_priv_caps ic756pro3_priv_caps =
0, /* 731 mode */
0, /* no XCHG */
ic756pro_ts_sc_list,
- .antack_len = 2,
+ .antack_len = 3,
.ant_count = 2,
.agc_levels_present = 1,
.agc_levels = {
@@ -976,7 +976,7 @@ const struct rig_caps ic756pro3_caps =
RIG_MODEL(RIG_MODEL_IC756PROIII),
.model_name = "IC-756PROIII",
.mfg_name = "Icom",
- .version = BACKEND_VER ".0",
+ .version = BACKEND_VER ".1",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,
diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c
index e6120c3e..ba3607ce 100644
--- a/rigs/icom/icom.c
+++ b/rigs/icom/icom.c
@@ -7601,7 +7601,6 @@ int icom_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option)
RETURNFUNC(retval);
}
- antopt_len = 0;
rig_debug(RIG_DEBUG_TRACE,
"%s: antack_len=%d so antopt_len=%d, antopt=0x%02x\n",
__func__, priv_caps->antack_len, antopt_len, antopt[0]);
@@ -7729,13 +7728,14 @@ int icom_get_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t *option,
rig_debug(RIG_DEBUG_ERR, "%s: ackbuf= 0x%02x 0x%02x 0x%02x\n", __func__,
ackbuf[0], ackbuf[1], ackbuf[2]);
- *ant_curr = rig_idx2setting(ackbuf[1]);
+ *ant_curr = *ant_tx = *ant_rx = rig_idx2setting(ackbuf[1]);
// Note: with IC756/IC-756Pro/IC-7800 and more, ackbuf[2] deals with [RX ANT]
// Hopefully any ack_len=3 can fit in the option field
if (ack_len == 3)
{
option->i = ackbuf[2];
+ *ant_rx = rig_idx2setting(ackbuf[2]);
}
RETURNFUNC(RIG_OK);
diff --git a/rigs/icom/icom.h b/rigs/icom/icom.h
index 606e271c..c937844c 100644
--- a/rigs/icom/icom.h
+++ b/rigs/icom/icom.h
@@ -30,7 +30,7 @@
#include <sys/time.h>
#endif
-#define BACKEND_VER "20210812"
+#define BACKEND_VER "20210822"
#define ICOM_IS_SECONDARY_VFO(vfo) ((vfo) & (RIG_VFO_B | RIG_VFO_SUB | RIG_VFO_SUB_B | RIG_VFO_MAIN_B))
#define ICOM_GET_VFO_NUMBER(vfo) (ICOM_IS_SECONDARY_VFO(vfo) ? 0x01 : 0x00)
diff --git a/tests/simicom.c b/tests/simicom.c
index 509fc54b..7e7be713 100644
--- a/tests/simicom.c
+++ b/tests/simicom.c
@@ -27,6 +27,8 @@ mode_t modeA = RIG_MODE_CW;
mode_t modeB = RIG_MODE_USB;
pbwidth_t widthA = 0;
pbwidth_t widthB = 1;
+ant_t ant_curr = 0;
+int ant_option = 0;
void dumphex(unsigned char *buf, int n)
{
@@ -159,6 +161,25 @@ void frameParse(int fd, unsigned char *frame, int len)
write(fd, frame, 6);
break;
+ case 0x12: // we're simulating the 3-byte version -- not the 2-byte
+ if (frame[5] != 0xfd)
+ {
+ printf("Set ant %d\n", -1);
+ ant_curr = frame[5];
+ ant_option = frame[6];
+ dump_hex(frame,8);
+ }
+ else {
+ printf("Get ant\n");
+ }
+ frame[5] = ant_curr;
+ frame[6] = ant_option;
+ frame[7]=0xfd;
+ printf("write 8 bytes\n");
+ dump_hex(frame,8);
+ write(fd, frame, 8);
+ break;
+
case 0x1a: // miscellaneous things
switch (frame[5])
{
@@ -173,7 +194,7 @@ void frameParse(int fd, unsigned char *frame, int len)
break;
-#if 0
+#if 1
case 0x25:
if (frame[6] == 0xfd)
{
-----------------------------------------------------------------------
Summary of changes:
rigs/icom/ic756.c | 10 +++++-----
rigs/icom/icom.c | 4 ++--
rigs/icom/icom.h | 2 +-
rigs/kenwood/kenwood.c | 6 ++++++
rigs/kenwood/kenwood.h | 2 +-
src/register.c | 12 ++++++++++++
tests/simicom.c | 23 ++++++++++++++++++++++-
7 files changed, 49 insertions(+), 10 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-08-22 03:39:15
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via b2acf0b6f5e34fcc9dd0a5d1f8ff3a3f45e35971 (commit)
via 0be978abcd77471442c1ce3c8d8f9df70fcdd835 (commit)
from a396dc88255bfe8a18fd9efdd72d561449cb6ad3 (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 b2acf0b6f5e34fcc9dd0a5d1f8ff3a3f45e35971
Author: Mike Black W9MDB <mdb...@ya...>
Date: Sat Aug 21 22:38:44 2021 -0500
Improve debug in ser_open
diff --git a/src/serial.c b/src/serial.c
index 1d852051..caa313ca 100644
--- a/src/serial.c
+++ b/src/serial.c
@@ -680,7 +680,7 @@ int ser_open(hamlib_port_t *p)
{
int ret;
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ rig_debug(RIG_DEBUG_VERBOSE, "%s called port=%s\n", __func__, p->pathname);
if (!strncmp(p->pathname, "uh-rig", 6))
{
commit 0be978abcd77471442c1ce3c8d8f9df70fcdd835
Author: Mike Black W9MDB <mdb...@ya...>
Date: Sat Aug 21 22:31:15 2021 -0500
Add more retries to PTT serial port open
https://github.com/Hamlib/Hamlib/issues/768
diff --git a/src/serial.c b/src/serial.c
index 57d6eff7..1d852051 100644
--- a/src/serial.c
+++ b/src/serial.c
@@ -224,25 +224,16 @@ int HAMLIB_API serial_open(hamlib_port_t *rp)
/*
* Open in Non-blocking mode. Watch for EAGAIN errors!
*/
- fd = OPEN(rp->pathname, O_RDWR | O_NOCTTY | O_NDELAY);
- if (fd == -1) // some serial ports fail to open 1st time for some unknown reason
- {
- rig_debug(RIG_DEBUG_WARN, "%s(%d): open failed#1\n", __func__, __LINE__);
- hl_usleep(500*1000);
+ int i=1;
+ do { // some serial ports fail to open 1st time for some unknown reason
fd = OPEN(rp->pathname, O_RDWR | O_NOCTTY | O_NDELAY);
- }
- if (fd == -1)
- {
- rig_debug(RIG_DEBUG_WARN, "%s(%d): open failed#2\n", __func__, __LINE__);
- hl_usleep(500*1000);
- fd = OPEN(rp->pathname, O_RDWR | O_NOCTTY | O_NDELAY);
- }
- if (fd == -1)
- {
- rig_debug(RIG_DEBUG_WARN, "%s(%d): open failed#3\n", __func__, __LINE__);
- hl_usleep(500*1000);
- fd = OPEN(rp->pathname, O_RDWR | O_NOCTTY | O_NDELAY);
- }
+ if (fd == -1) // some serial ports fail to open 1st time for some unknown reason
+ {
+ rig_debug(RIG_DEBUG_WARN, "%s(%d): open failed#%d\n", __func__, __LINE__, i);
+ hl_usleep(500*1000);
+ fd = OPEN(rp->pathname, O_RDWR | O_NOCTTY | O_NDELAY);
+ }
+ } while(++i <= 4 && fd == -1);
if (fd == -1)
{
@@ -719,13 +710,17 @@ int ser_open(hamlib_port_t *p)
/*
* pathname is not uh_rig or uh_ptt: simply open()
*/
- ret = OPEN(p->pathname, O_RDWR | O_NOCTTY | O_NDELAY);
- if (ret == -1) // some serial ports fail to open 1st time
+ int i=1;
+ do // some serial ports fail to open 1st time
{
- rig_debug(RIG_DEBUG_WARN, "%s(%d): open failed#1\n", __func__, __LINE__);
- hl_usleep(500*1000);
ret = OPEN(p->pathname, O_RDWR | O_NOCTTY | O_NDELAY);
- }
+ if (ret == -1) // some serial ports fail to open 1st time
+ {
+ rig_debug(RIG_DEBUG_WARN, "%s(%d): open failed#%d\n", __func__, __LINE__, i);
+ hl_usleep(500*1000);
+ ret = OPEN(p->pathname, O_RDWR | O_NOCTTY | O_NDELAY);
+ }
+ } while(++i <= 4 && ret == -1);
}
}
-----------------------------------------------------------------------
Summary of changes:
src/serial.c | 43 +++++++++++++++++++------------------------
1 file changed, 19 insertions(+), 24 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-08-21 21:03:57
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via a396dc88255bfe8a18fd9efdd72d561449cb6ad3 (commit)
via 6d5eb2052edb3d754943306557a9949e270a77e7 (commit)
via 95a10624c1b6bd9ac2d396f2cf75346e236dd00f (commit)
via b24e629e16406fa01aeba3493e2d6018c52d4a5e (commit)
via 84108f9613c5836be6cc668763d0f40edbe6b59e (commit)
via d1bfa0172f93c23f3c53fd0e6e1da3e59d3da731 (commit)
via 83a8b98a868493af848e7a45aa44e4c4d7d43485 (commit)
via 51d4473ef0610fe85ad545ff00aba833e4d1429f (commit)
from ad53f2f1e3c5e06d52a21edcb0bbe499937eda83 (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 a396dc88255bfe8a18fd9efdd72d561449cb6ad3
Merge: 6d5eb205 95a10624
Author: Michael Black <mdb...@ya...>
Date: Sat Aug 21 16:00:15 2021 -0500
Merge pull request #772 from wutje/constify
rig.c: Constify rigerror_table
commit 6d5eb2052edb3d754943306557a9949e270a77e7
Merge: ad53f2f1 84108f96
Author: Michael Black <mdb...@ya...>
Date: Sat Aug 21 15:59:59 2021 -0500
Merge pull request #771 from wutje/width_removal
Width pointer check removal
commit 95a10624c1b6bd9ac2d396f2cf75346e236dd00f
Author: Wouter van Gulik <pa...@gm...>
Date: Sat Aug 21 22:48:02 2021 +0200
src/misc.c: Constify some tables
diff --git a/src/misc.c b/src/misc.c
index ad9b9694..d7abf173 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -413,7 +413,7 @@ const char *HAMLIB_API rig_strstatus(enum rig_status_e status)
}
-static struct
+static const struct
{
rmode_t mode;
const char *str;
@@ -553,7 +553,7 @@ int HAMLIB_API rig_strrmodes(rmode_t modes, char *buf, int buflen)
}
-static struct
+static const struct
{
vfo_t vfo;
const char *str;
@@ -632,7 +632,7 @@ const char *HAMLIB_API rig_strvfo(vfo_t vfo)
}
-static struct
+static const struct
{
setting_t func;
const char *str;
@@ -686,7 +686,7 @@ static struct
};
-static struct
+static const struct
{
setting_t func;
const char *str;
@@ -817,7 +817,7 @@ const char *HAMLIB_API rot_strfunc(setting_t func)
}
-static struct
+static const struct
{
setting_t level;
const char *str;
@@ -874,7 +874,7 @@ static struct
};
-static struct
+static const struct
{
setting_t level;
const char *str;
@@ -885,7 +885,7 @@ static struct
};
-static struct
+static const struct
{
setting_t level;
const char *str;
@@ -1074,7 +1074,7 @@ const char *HAMLIB_API amp_strlevel(setting_t level)
}
-static struct
+static const struct
{
setting_t parm;
const char *str;
@@ -1092,7 +1092,7 @@ static struct
};
-static struct
+static const struct
{
setting_t parm;
const char *str;
@@ -1211,7 +1211,7 @@ const char *HAMLIB_API rot_strparm(setting_t parm)
return "";
}
-static struct
+static const struct
{
enum agc_level_e level;
const char *str;
@@ -1253,7 +1253,7 @@ const char *HAMLIB_API rig_stragclevel(enum agc_level_e level)
}
-static struct
+static const struct
{
vfo_op_t vfo_op;
const char *str;
@@ -1327,7 +1327,7 @@ const char *HAMLIB_API rig_strvfop(vfo_op_t op)
}
-static struct
+static const struct
{
scan_t rscan;
const char *str;
@@ -1451,7 +1451,7 @@ rptr_shift_t HAMLIB_API rig_parse_rptr_shift(const char *s)
}
-static struct
+static const struct
{
chan_type_t mtype;
const char *str;
@@ -1522,7 +1522,7 @@ const char *HAMLIB_API rig_strmtype(chan_type_t mtype)
return "";
}
-static struct
+static const struct
{
enum rig_spectrum_mode_e mode;
const char *str;
@@ -1937,7 +1937,7 @@ int HAMLIB_API rig_flush(hamlib_port_t *port)
}
-static struct
+static const struct
{
rot_status_t status;
const char *str;
commit b24e629e16406fa01aeba3493e2d6018c52d4a5e
Author: Wouter van Gulik <pa...@gm...>
Date: Sat Aug 21 22:26:59 2021 +0200
rig.c: Constify rigerror_table
diff --git a/src/rig.c b/src/rig.c
index 28043dd9..e5d93ec3 100644
--- a/src/rig.c
+++ b/src/rig.c
@@ -173,7 +173,7 @@ static struct opened_rig_l *opened_rig_list = { NULL };
* Careful, the order must be the same as their RIG_E* counterpart!
* TODO: localise the messages..
*/
-static const char *rigerror_table[] =
+static const char * const rigerror_table[] =
{
"Command completed successfully",
"Invalid parameter",
commit 84108f9613c5836be6cc668763d0f40edbe6b59e
Author: Wouter van Gulik <pa...@gm...>
Date: Sat Aug 21 21:59:02 2021 +0200
src/rig.c: Add comments to clarify both mode and width must be supplied
diff --git a/src/rig.c b/src/rig.c
index 28043dd9..979b5dff 100644
--- a/src/rig.c
+++ b/src/rig.c
@@ -2297,6 +2297,9 @@ int HAMLIB_API rig_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
* The value stored at \a mode location equals RIG_MODE_NONE when the current
* mode of the VFO is not defined (e.g. blank memory).
*
+ * Note that if either \a mode or \a width is NULL, -RIG_EINVAL is returned.
+ * Both must be given even if only one is actually wanted.
+ *
* \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise
* a negative value if an error occurred (in which case, cause is
* set appropriately).
commit d1bfa0172f93c23f3c53fd0e6e1da3e59d3da731
Author: Wouter van Gulik <pa...@gm...>
Date: Sat Aug 21 20:45:43 2021 +0200
ft600.c: Drop width check, code below has no check.
The lower code would have crashed if width was NULL, so 'width == NULL' never
happens.
diff --git a/rigs/yaesu/ft600.c b/rigs/yaesu/ft600.c
index c0f353a1..e471075a 100644
--- a/rigs/yaesu/ft600.c
+++ b/rigs/yaesu/ft600.c
@@ -467,10 +467,7 @@ int ft600_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
return -RIG_EINVAL;
}
- if (width != NULL)
- {
- *width = RIG_PASSBAND_NORMAL;
- }
+ *width = RIG_PASSBAND_NORMAL;
ret = ft600_read_status(rig);
commit 83a8b98a868493af848e7a45aa44e4c4d7d43485
Author: Wouter van Gulik <pa...@gm...>
Date: Sat Aug 21 20:36:10 2021 +0200
icom.c: Drop width check. Other code assumes != NULL.
I am not sure if the intention was to check for width == default.
But that never worked, so for now do not change behaviour.
diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c
index ea506028..e6120c3e 100644
--- a/rigs/icom/icom.c
+++ b/rigs/icom/icom.c
@@ -1742,7 +1742,7 @@ static int icom_set_mode_x26(RIG *rig, vfo_t vfo, rmode_t mode, int datamode, in
buf[1] = datamode;
// filter fixed to filter 1 due to IC7300 bug defaulting to filter 2 on mode changed -- yuck!!
// buf[2] = filter // if Icom ever fixed this
- buf[2] = 1;
+ buf[2] = 1;
retval = icom_transaction(rig, cmd2, subcmd2, buf, 3, NULL, NULL);
@@ -1820,7 +1820,7 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode,
unsigned char datamode[2];
unsigned char mode_icom; // Not used, we only need the width
signed char width_icom;
-
+
TRACE;
switch (mode)
{
@@ -1844,7 +1844,7 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode,
{
TRACE;
if (datamode[0] == 0) datamode[1]=0; // the only good combo possible according to manual
-
+
rig_debug(RIG_DEBUG_TRACE, "%s(%d) mode_icom=%d, datamode[0]=%d, filter=%d\n", __func__, __LINE__, mode_icom, datamode[0], datamode[1]);
retval = icom_set_mode_x26(rig, vfo, mode_icom, datamode[0], datamode[1]);
if (retval != RIG_OK)
@@ -2220,64 +2220,61 @@ int icom_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
// if we already set width we won't update with except during set_vfo or set_mode
// reason is we can't get width without swapping vfos -- yuck!!
- if (width != NULL)
+ if (vfo & (RIG_VFO_A | RIG_VFO_MAIN | RIG_VFO_SUB_A | RIG_VFO_MAIN_A |
+ RIG_VFO_CURR))
{
- if (vfo & (RIG_VFO_A | RIG_VFO_MAIN | RIG_VFO_SUB_A | RIG_VFO_MAIN_A |
- RIG_VFO_CURR))
+ // then we get what was asked for
+ if (vfo == RIG_VFO_NONE && rig->state.current_vfo == RIG_VFO_NONE)
{
- // then we get what was asked for
- if (vfo == RIG_VFO_NONE && rig->state.current_vfo == RIG_VFO_NONE)
- {
- rig_debug(RIG_DEBUG_TRACE, "%s(%d): forcing default VFO_A\n", __func__,
- __LINE__);
- TRACE;
- rig_set_vfo(rig, RIG_VFO_A); // force VFOA
- }
+ rig_debug(RIG_DEBUG_TRACE, "%s(%d): forcing default VFO_A\n", __func__,
+ __LINE__);
+ TRACE;
+ rig_set_vfo(rig, RIG_VFO_A); // force VFOA
+ }
+
+ retval = icom_get_dsp_flt(rig, *mode);
+ *width = retval;
+
+ if (retval == 0)
+ {
+ rig_debug(RIG_DEBUG_TRACE,
+ "%s: vfo=%s returning mode=%s, width not available\n", __func__,
+ rig_strvfo(vfo), rig_strrmode(*mode));
+ }
+ }
+ else if (rig->state.cache.widthMainB == 0)
+ {
+ // we need to swap vfos to get the bandwidth -- yuck
+ // so we read it once and will let set_mode and transceive capability (4.3 hamlib) update it
+ vfo_t vfosave = rig->state.current_vfo;
+ if (vfosave != vfo)
+ {
+ // right now forcing VFOA/B arrangement -- reverse not supported yet
+ // If VFOB width is ever different than VFOA
+ // we need to figure out how to read VFOB without swapping VFOs
+ //TRACE;
+ //rig_set_vfo(rig, RIG_VFO_B);
retval = icom_get_dsp_flt(rig, *mode);
*width = retval;
- if (retval == 0)
- {
- rig_debug(RIG_DEBUG_TRACE,
- "%s: vfo=%s returning mode=%s, width not available\n", __func__,
- rig_strvfo(vfo), rig_strrmode(*mode));
- }
+ if (*width == 0) { *width = rig->state.cache.widthMainA; } // we'll use VFOA's width
+
+ // dont' really care about cache time here
+ // this is just to prevent vfo swapping while getting width
+ rig->state.cache.widthMainB = retval;
+ rig_debug(RIG_DEBUG_TRACE, "%s(%d): vfosave=%s, currvfo=%s\n", __func__,
+ __LINE__, rig_strvfo(vfo), rig_strvfo(rig->state.current_vfo));
+ //TRACE;
+ //rig_set_vfo(rig, RIG_VFO_A);
+ rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s returning mode=%s, width=%d\n", __func__,
+ rig_strvfo(vfo), rig_strrmode(*mode), (int)*width);
}
- else if (rig->state.cache.widthMainB == 0)
+ else
{
- // we need to swap vfos to get the bandwidth -- yuck
- // so we read it once and will let set_mode and transceive capability (4.3 hamlib) update it
- vfo_t vfosave = rig->state.current_vfo;
-
- if (vfosave != vfo)
- {
- // right now forcing VFOA/B arrangement -- reverse not supported yet
- // If VFOB width is ever different than VFOA
- // we need to figure out how to read VFOB without swapping VFOs
- //TRACE;
- //rig_set_vfo(rig, RIG_VFO_B);
- retval = icom_get_dsp_flt(rig, *mode);
- *width = retval;
-
- if (*width == 0) { *width = rig->state.cache.widthMainA; } // we'll use VFOA's width
-
- // dont' really care about cache time here
- // this is just to prevent vfo swapping while getting width
- rig->state.cache.widthMainB = retval;
- rig_debug(RIG_DEBUG_TRACE, "%s(%d): vfosave=%s, currvfo=%s\n", __func__,
- __LINE__, rig_strvfo(vfo), rig_strvfo(rig->state.current_vfo));
- //TRACE;
- //rig_set_vfo(rig, RIG_VFO_A);
- rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s returning mode=%s, width=%d\n", __func__,
- rig_strvfo(vfo), rig_strrmode(*mode), (int)*width);
- }
- else
- {
- rig_debug(RIG_DEBUG_WARN,
- "%s: vfo arrangement not supported yet, vfo=%s, currvfo=%s\n", __func__,
- rig_strvfo(vfo), rig_strvfo(vfosave));
- }
+ rig_debug(RIG_DEBUG_WARN,
+ "%s: vfo arrangement not supported yet, vfo=%s, currvfo=%s\n", __func__,
+ rig_strvfo(vfo), rig_strvfo(vfosave));
}
}
@@ -5016,7 +5013,7 @@ int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
{
RETURNFUNC(retval);
}
-
+
TRACE;
if (VFO_HAS_MAIN_SUB_A_B_ONLY)
{
@@ -7864,7 +7861,7 @@ int icom_scan(RIG *rig, vfo_t vfo, scan_t scan, int ch)
scan_sc = S_SCAN_STOP;
break;
- case RIG_SCAN_MEM:
+ case RIG_SCAN_MEM:
TRACE;
retval = rig_set_vfo(rig, RIG_VFO_MEM);
commit 51d4473ef0610fe85ad545ff00aba833e4d1429f
Author: Wouter van Gulik <pa...@gm...>
Date: Sat Aug 21 20:30:03 2021 +0200
newcat.c: Drop width check; the only call site (get_mode) uses it before the call.
Besides most other rigs assume it is != NULL. So having width == NULL
would cause a crash for all other rigs.
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index bc63e96c..851f70b5 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -10080,16 +10080,13 @@ rmode_t newcat_rmode_width(RIG *rig, vfo_t vfo, char mode, pbwidth_t *width)
ENTERFUNC;
- if (width != NULL)
- {
- *width = RIG_PASSBAND_NORMAL;
- }
+ *width = RIG_PASSBAND_NORMAL;
for (i = 0; i < sizeof(newcat_mode_conv) / sizeof(newcat_mode_conv[0]); i++)
{
if (newcat_mode_conv[i].modechar == mode)
{
- if (newcat_mode_conv[i].chk_width == TRUE && width != NULL)
+ if (newcat_mode_conv[i].chk_width == TRUE)
{
if (newcat_is_rig(rig, RIG_MODEL_FT991)
&& mode == 'E') // crude fix because 991 hangs on NA0; command while in C4FM
-----------------------------------------------------------------------
Summary of changes:
rigs/icom/icom.c | 107 +++++++++++++++++++++++++---------------------------
rigs/yaesu/ft600.c | 5 +--
rigs/yaesu/newcat.c | 7 +---
src/misc.c | 30 +++++++--------
src/rig.c | 5 ++-
5 files changed, 74 insertions(+), 80 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Nate B. <n0...@us...> - 2021-08-21 17:35:06
|
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 ad53f2f1e3c5e06d52a21edcb0bbe499937eda83 (commit)
via c6151c711046b11ad725165bafd7213c12aebb88 (commit)
via df40151d65557a466c11a4946265aac1c614b969 (commit)
from 1f515458fee96be193db95d431813773c41eb08f (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 ad53f2f1e3c5e06d52a21edcb0bbe499937eda83
Author: Mike Black W9MDB <mdb...@ya...>
Date: Sat Aug 21 07:41:48 2021 -0500
Fix typo in serial.c
https://github.com/Hamlib/Hamlib/issues/768
diff --git a/src/serial.c b/src/serial.c
index 871a2a71..57d6eff7 100644
--- a/src/serial.c
+++ b/src/serial.c
@@ -720,7 +720,7 @@ int ser_open(hamlib_port_t *p)
* pathname is not uh_rig or uh_ptt: simply open()
*/
ret = OPEN(p->pathname, O_RDWR | O_NOCTTY | O_NDELAY);
- if (ret == 1) // some serial ports fail to open 1st time
+ if (ret == -1) // some serial ports fail to open 1st time
{
rig_debug(RIG_DEBUG_WARN, "%s(%d): open failed#1\n", __func__, __LINE__);
hl_usleep(500*1000);
commit c6151c711046b11ad725165bafd7213c12aebb88
Author: Mike Black W9MDB <mdb...@ya...>
Date: Fri Aug 20 22:31:11 2021 -0500
Fix error in serial.c
https://github.com/Hamlib/Hamlib/issues/768
diff --git a/src/serial.c b/src/serial.c
index ec28a796..871a2a71 100644
--- a/src/serial.c
+++ b/src/serial.c
@@ -722,7 +722,7 @@ int ser_open(hamlib_port_t *p)
ret = OPEN(p->pathname, O_RDWR | O_NOCTTY | O_NDELAY);
if (ret == 1) // some serial ports fail to open 1st time
{
- rig_debug(RIG_DEBUG_WARN, "%s(d): open failed#1\n", __func__, ___LINE__);
+ rig_debug(RIG_DEBUG_WARN, "%s(%d): open failed#1\n", __func__, __LINE__);
hl_usleep(500*1000);
ret = OPEN(p->pathname, O_RDWR | O_NOCTTY | O_NDELAY);
}
commit df40151d65557a466c11a4946265aac1c614b969
Author: Mike Black W9MDB <mdb...@ya...>
Date: Fri Aug 20 22:29:12 2021 -0500
Add additional attempts to open serial port
K4 was failing on 1st open for some unknown reason but succeeds on 2nd try
https://github.com/Hamlib/Hamlib/issues/768
diff --git a/src/serial.c b/src/serial.c
index dca8c78c..ec28a796 100644
--- a/src/serial.c
+++ b/src/serial.c
@@ -225,20 +225,23 @@ int HAMLIB_API serial_open(hamlib_port_t *rp)
* Open in Non-blocking mode. Watch for EAGAIN errors!
*/
fd = OPEN(rp->pathname, O_RDWR | O_NOCTTY | O_NDELAY);
- if (fd == -1)
- {
- rig_debug(RIG_DEBUG_WARN, "%s: open failed...trying withoud O_NOCTTY\n", __func__);
- fd = OPEN(rp->pathname, O_RDWR | O_NDELAY);
+ if (fd == -1) // some serial ports fail to open 1st time for some unknown reason
+ {
+ rig_debug(RIG_DEBUG_WARN, "%s(%d): open failed#1\n", __func__, __LINE__);
+ hl_usleep(500*1000);
+ fd = OPEN(rp->pathname, O_RDWR | O_NOCTTY | O_NDELAY);
}
if (fd == -1)
{
- rig_debug(RIG_DEBUG_WARN, "%s: open failed...trying withoud O_NDELAY\n", __func__);
- fd = OPEN(rp->pathname, O_RDWR | O_NOCTTY );
+ rig_debug(RIG_DEBUG_WARN, "%s(%d): open failed#2\n", __func__, __LINE__);
+ hl_usleep(500*1000);
+ fd = OPEN(rp->pathname, O_RDWR | O_NOCTTY | O_NDELAY);
}
if (fd == -1)
{
- rig_debug(RIG_DEBUG_WARN, "%s: open failed...trying withoud O_NDELAY and O_NOCTTY\n", __func__);
- fd = OPEN(rp->pathname, O_RDWR);
+ rig_debug(RIG_DEBUG_WARN, "%s(%d): open failed#3\n", __func__, __LINE__);
+ hl_usleep(500*1000);
+ fd = OPEN(rp->pathname, O_RDWR | O_NOCTTY | O_NDELAY);
}
if (fd == -1)
@@ -717,6 +720,12 @@ int ser_open(hamlib_port_t *p)
* pathname is not uh_rig or uh_ptt: simply open()
*/
ret = OPEN(p->pathname, O_RDWR | O_NOCTTY | O_NDELAY);
+ if (ret == 1) // some serial ports fail to open 1st time
+ {
+ rig_debug(RIG_DEBUG_WARN, "%s(d): open failed#1\n", __func__, ___LINE__);
+ hl_usleep(500*1000);
+ ret = OPEN(p->pathname, O_RDWR | O_NOCTTY | O_NDELAY);
+ }
}
}
-----------------------------------------------------------------------
Summary of changes:
src/serial.c | 25 +++++++++++++++++--------
1 file changed, 17 insertions(+), 8 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-08-20 15:22:51
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via 1f515458fee96be193db95d431813773c41eb08f (commit)
from 43191ced2d6bc18090dca94c7551e47c9f00a6e9 (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 1f515458fee96be193db95d431813773c41eb08f
Author: Mike Black W9MDB <mdb...@ya...>
Date: Fri Aug 20 10:21:10 2021 -0500
Allow testlibusb to compile on < libusb-1.0.23
Generate warning for libusb-1.0.23 future requirement
https://github.com/Hamlib/Hamlib/issues/763
diff --git a/tests/testlibusb.c b/tests/testlibusb.c
index 83c5f62a..fefb8047 100755
--- a/tests/testlibusb.c
+++ b/tests/testlibusb.c
@@ -242,7 +242,8 @@ static void print_device(libusb_device *dev, libusb_device_handle *handle)
libusb_close(handle);
}
-#ifdef __linux__
+#if defined(LIBUSB_API_VERSION) && (LIBUSB_API_VERSION >= 0x01000107)
+
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
@@ -268,6 +269,7 @@ static int test_wrapped_device(const char *device_name)
return 0;
}
#else
+#warning LIBUSB-1.0.23 will be required in Hamlib > 4.3
static int test_wrapped_device(const char *device_name)
{
(void)device_name;
-----------------------------------------------------------------------
Summary of changes:
tests/testlibusb.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Nate B. <n0...@us...> - 2021-08-19 22:37:01
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via 43191ced2d6bc18090dca94c7551e47c9f00a6e9 (commit)
via 6d829ec43f65dd8bb61abbbe007c3678ec8ae9bd (commit)
via d102839284b26f93fb510a1cc8fbc00684f45d65 (commit)
via b2de21426f2768f9af28d0581a23d2230cd0af8a (commit)
via 658599930e3c62d9040a8bdafdbada151e789fd7 (commit)
via c2d0d160222b4b1faafeab73271e0d763a4f0ca1 (commit)
via 485612008f724e9b5989ea3e999587022bbebff7 (commit)
via 01ac8022e1c91efe36f5f1c4e4e549121e3288c0 (commit)
via 673733700f5b4d52e1057d266fce60583cb6e8a3 (commit)
via cc845deb0da939bfb952701a97d8dab58aad8d4f (commit)
via 87122795e74ca72601768168f37ba3ef0a1d4f65 (commit)
via d52cce510db9068f5a12daed78f257b64d247a6d (commit)
via 4c0797dc78633c08128add833cc367601b398abf (commit)
via a7cc7da17f508ee5ba87eb1891c32686ef8e2142 (commit)
via 45ff011ec0392b333841a7dba69549faade0ec5d (commit)
via d9b50ddf7791fb6e58e3b195ab93251fd86fa598 (commit)
via cf192ac92f709d1ae4836d97cfff9b793ffcaacf (commit)
via df568dffb686491d875aaee5c8fbc98a43c36b67 (commit)
via b27d765e730da8bda2bb0ef49ac8156501951e3f (commit)
via 08180623727bc69442a30bf0c5927e795e22cda1 (commit)
via ffb9143190750f53dc218cf823723641516024db (commit)
from 773b74565358e4c28827a18b3a73ca8e8d7f53d4 (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 43191ced2d6bc18090dca94c7551e47c9f00a6e9
Author: Mike Black W9MDB <mdb...@ya...>
Date: Wed Aug 18 17:41:12 2021 -0500
Update NEWS
diff --git a/NEWS b/NEWS
index 64cbdfe0..1cc539b3 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,7 @@ Please send Hamlib bug reports to ham...@li...
Version 4.3
* 2021-??-??
+ * libusb-1.0.23 or greater is now required or use --without-libusb
* Generating documentation now requires GNU source-highlighter.
* Added IC-575
* Overhaul of rig split -- reverse split (VFOA=RX VFOB=TX) should work for rigs capable of it
commit 6d829ec43f65dd8bb61abbbe007c3678ec8ae9bd
Author: Mike Black W9MDB <mdb...@ya...>
Date: Tue Aug 17 17:53:14 2021 -0500
Fix without-libusb build to not build testlibusb
diff --git a/configure.ac b/configure.ac
index d9d3d187..2ff5cbdb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -315,6 +315,7 @@ AC_ARG_WITH([libusb],
)
AC_MSG_RESULT([$cf_with_libusb])
+AM_CONDITIONAL([HAVE_LIBUSB], [test x"${cf_with_libusb}" = "xyes"])
LIBUSB=""
AC_ARG_VAR([LIBUSB_CFLAGS], [C compiler flags for libusb, overriding configure defaults])
diff --git a/tests/Makefile.am b/tests/Makefile.am
index aa6eae03..3fac3cf7 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -4,9 +4,15 @@
# AUTOMAKE_OPTIONS = dejagnu
# DEJATOOL = testfreq testbcd testloc rigctl
+if HAVE_LIBUSB
+ TESTLIBUSB = testlibusb
+else
+ TESTLIBUSB =
+endif
+
DISTCLEANFILES = rigctl.log rigctl.sum testbcd.log testbcd.sum
-bin_PROGRAMS = rigctl rigctld rigmem rigsmtr rigswr rotctl rotctld rigctlcom ampctl ampctld testlibusb
+bin_PROGRAMS = rigctl rigctld rigmem rigsmtr rigswr rotctl rotctld rigctlcom ampctl ampctld $(TESTLIBUSB)
check_PROGRAMS = dumpmem testrig testrigopen testrigcaps testtrn testbcd testfreq listrigs testloc rig_bench testcache cachetest cachetest2 testcookie
@@ -24,7 +30,9 @@ ampctld_SOURCES = ampctld.c $(AMPCOMMONSRC)
rigswr_SOURCES = rigswr.c
rigsmtr_SOURCES = rigsmtr.c
rigmem_SOURCES = rigmem.c memsave.c memload.c memcsv.c
-testlibusb_SOURCES = testlibusb.c
+if HAVE_LIBUSB
+ testlibusb_SOURCES = testlibusb.c
+endif
# include generated include files ahead of any in sources
rigctl_CPPFLAGS = -I$(top_builddir)/tests -I$(top_builddir)/src -I$(srcdir) $(AM_CPPFLAGS)
@@ -39,7 +47,9 @@ rotctld_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -I$(top_builddir)/src
ampctl_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -I$(top_builddir)/src
ampctld_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -I$(top_builddir)/src
rigctlcom_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS)
-testlibusb_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) $(LIBUSB_CFLAGS)
+if HAVE_LIBUSB
+ testlibusb_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) $(LIBUSB_CFLAGS)
+endif
rigctl_LDADD = $(PTHREAD_LIBS) $(READLINE_LIBS) $(LDADD)
rigctld_LDADD = $(NET_LIBS) $(PTHREAD_LIBS) $(LDADD) $(READLINE_LIBS)
@@ -49,7 +59,9 @@ ampctl_LDADD = $(PTHREAD_LIBS) $(LDADD) $(READLINE_LIBS)
ampctld_LDADD = $(NET_LIBS) $(PTHREAD_LIBS) $(LDADD) $(READLINE_LIBS)
rigmem_LDADD = $(LIBXML2_LIBS) $(LDADD)
rigctlcom_LDADD = $(NET_LIBS) $(PTHREAD_LIBS) $(LDADD) $(READLINE_LIBS)
-testlibusb_LDADD = $(LIBUSB_LIBS)
+if HAVE_LIBUSB
+ testlibusb_LDADD = $(LIBUSB_LIBS)
+endif
# Linker options
rigctl_LDFLAGS = $(WINEXELDFLAGS)
@@ -62,7 +74,9 @@ rigctld_LDFLAGS = $(WINEXELDFLAGS)
rotctld_LDFLAGS = $(WINEXELDFLAGS)
ampctld_LDFLAGS = $(WINEXELDFLAGS)
rigctlcom_LDFLAGS = $(WINEXELDFLAGS)
-testlibusb_LDFLAGS = $(WINEXELDFLAGS)
+if HAVE_LIBUSB
+ testlibusb_LDFLAGS = $(WINEXELDFLAGS)
+endif
if HTML_MATRIX
commit d102839284b26f93fb510a1cc8fbc00684f45d65
Author: Mike Black W9MDB <mdb...@ya...>
Date: Tue Aug 17 15:43:21 2021 -0500
Remove priv statement
diff --git a/rigs/yaesu/ft817.c b/rigs/yaesu/ft817.c
index 64f3903f..73d67fd1 100644
--- a/rigs/yaesu/ft817.c
+++ b/rigs/yaesu/ft817.c
@@ -503,8 +503,6 @@ int ft817_init(RIG *rig)
return -RIG_ENOMEM;
}
- priv = rig->state.priv;
-
return RIG_OK;
}
commit b2de21426f2768f9af28d0581a23d2230cd0af8a
Merge: 65859993 48561200
Author: Michael Black <mdb...@ya...>
Date: Tue Aug 17 15:36:47 2021 -0500
Merge pull request #769 from wutje/yaesu_private
Move priv_data structs of ft100, ft600, ft817, ft857, ft897 to the C file
commit 658599930e3c62d9040a8bdafdbada151e789fd7
Merge: cc845deb c2d0d160
Author: Michael Black <mdb...@ya...>
Date: Tue Aug 17 15:21:22 2021 -0500
Merge pull request #770 from wutje/patch-1
README: current version is 4
commit c2d0d160222b4b1faafeab73271e0d763a4f0ca1
Author: Wouter <wu...@us...>
Date: Tue Aug 17 22:08:17 2021 +0200
README: current version is 4
diff --git a/README b/README
index 2d31051f..09e5372e 100644
--- a/README
+++ b/README
@@ -124,14 +124,14 @@ Major.minor.incremental
Where
-Major: Currently at 3, but can be advanced when changes to the API require
+Major: Currently at 4, but can be advanced when changes to the API require
client programs to be rewritten to take advantage of new features of
Hamlib. This number has advanced a couple of times throughout the life of
Hamlib. Advancement of the major number is only for frontend API changes
that require modification of client source. ABI compatibility is presently
maintained to prior releases so that a program linked to an earlier
1.2.Y.[Z] release will work with a later 3.Y[.Z] release without
-recompiling. Itis our intention to maintain such ABI compatibility as long
+recompiling. It is our intention to maintain such ABI compatibility as long
as practical.
Minor: This number advances when either new backend(s) or new rig
commit 485612008f724e9b5989ea3e999587022bbebff7
Author: Wouter van Gulik <pa...@gm...>
Date: Tue Aug 17 22:02:45 2021 +0200
FT817/FT818 Drop pcs and use ncmd direct
diff --git a/rigs/yaesu/ft817.c b/rigs/yaesu/ft817.c
index 394e54de..64f3903f 100644
--- a/rigs/yaesu/ft817.c
+++ b/rigs/yaesu/ft817.c
@@ -73,8 +73,6 @@
struct ft817_priv_data
{
- yaesu_cmd_set_t pcs[FT817_NATIVE_SIZE]; /* TODO: why? */
-
/* rx status */
struct timeval rx_status_tv;
unsigned char rx_status;
@@ -497,8 +495,6 @@ const struct rig_caps ft818_caps =
int ft817_init(RIG *rig)
{
- struct ft817_priv_data *priv;
-
rig_debug(RIG_DEBUG_VERBOSE, "%s: called, version %s\n", __func__,
rig->caps->version);
@@ -509,9 +505,6 @@ int ft817_init(RIG *rig)
priv = rig->state.priv;
- /* Copy complete native cmd set to private cmd storage area */
- memcpy(priv->pcs, ncmd, sizeof(ncmd));
-
return RIG_OK;
}
@@ -582,12 +575,11 @@ static int check_cache_timeout(struct timeval *tv)
static int ft817_read_eeprom(RIG *rig, unsigned short addr, unsigned char *out)
{
- struct ft817_priv_data *p = (struct ft817_priv_data *) rig->state.priv;
unsigned char data[YAESU_CMD_LENGTH];
int n;
rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__);
- memcpy(data, (char *)p->pcs[FT817_NATIVE_CAT_EEPROM_READ].nseq,
+ memcpy(data, ncmd[FT817_NATIVE_CAT_EEPROM_READ].nseq,
YAESU_CMD_LENGTH);
data[0] = addr >> 8;
@@ -649,7 +641,7 @@ static int ft817_get_status(RIG *rig, int status)
do
{
rig_flush(&rig->state.rigport);
- write_block(&rig->state.rigport, (char *) p->pcs[status].nseq,
+ write_block(&rig->state.rigport, (char *) ncmd[status].nseq,
YAESU_CMD_LENGTH);
n = read_block(&rig->state.rigport, (char *) data, len);
}
@@ -1082,18 +1074,16 @@ int ft817_read_ack(RIG *rig)
*/
static int ft817_send_cmd(RIG *rig, int index)
{
- struct ft817_priv_data *p = (struct ft817_priv_data *) rig->state.priv;
-
rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__);
- if (p->pcs[index].ncomp == 0)
+ if (ncmd[index].ncomp == 0)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s: Incomplete sequence\n", __func__);
return -RIG_EINTERNAL;
}
rig_flush(&rig->state.rigport);
- write_block(&rig->state.rigport, (char *) p->pcs[index].nseq, YAESU_CMD_LENGTH);
+ write_block(&rig->state.rigport, (char *) ncmd[index].nseq, YAESU_CMD_LENGTH);
return ft817_read_ack(rig);
}
@@ -1102,18 +1092,17 @@ static int ft817_send_cmd(RIG *rig, int index)
*/
static int ft817_send_icmd(RIG *rig, int index, unsigned char *data)
{
- struct ft817_priv_data *p = (struct ft817_priv_data *) rig->state.priv;
unsigned char cmd[YAESU_CMD_LENGTH];
rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__);
- if (p->pcs[index].ncomp == 1)
+ if (ncmd[index].ncomp == 1)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s: Complete sequence\n", __func__);
return -RIG_EINTERNAL;
}
- cmd[YAESU_CMD_LENGTH - 1] = p->pcs[index].nseq[YAESU_CMD_LENGTH - 1];
+ cmd[YAESU_CMD_LENGTH - 1] = ncmd[index].nseq[YAESU_CMD_LENGTH - 1];
memcpy(cmd, data, YAESU_CMD_LENGTH - 1);
write_block(&rig->state.rigport, (char *) cmd, YAESU_CMD_LENGTH);
@@ -1512,8 +1501,6 @@ int ft817_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit)
int ft817_set_powerstat(RIG *rig, powerstat_t status)
{
- struct ft817_priv_data *p = (struct ft817_priv_data *) rig->state.priv;
-
rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__);
switch (status)
@@ -1524,9 +1511,9 @@ int ft817_set_powerstat(RIG *rig, powerstat_t status)
case RIG_POWER_ON:
// send 5 bytes first, snooze a bit, then PWR_ON
write_block(&rig->state.rigport,
- (char *) p->pcs[FT817_NATIVE_CAT_PWR_WAKE].nseq, YAESU_CMD_LENGTH);
+ (char *) ncmd[FT817_NATIVE_CAT_PWR_WAKE].nseq, YAESU_CMD_LENGTH);
hl_usleep(200 * 1000);
- write_block(&rig->state.rigport, (char *) p->pcs[FT817_NATIVE_CAT_PWR_ON].nseq,
+ write_block(&rig->state.rigport, (char *) ncmd[FT817_NATIVE_CAT_PWR_ON].nseq,
YAESU_CMD_LENGTH);
return RIG_OK;
commit 01ac8022e1c91efe36f5f1c4e4e549121e3288c0
Author: Wouter van Gulik <pa...@gm...>
Date: Tue Aug 17 21:48:25 2021 +0200
Implement get_vfo/set_vfo for FT817/FT818.
Read the eeprom to get VFO and toggle VFO if not the desired VFO is selected.
This code is the ft857 implementation, but EEPROM address 0x55 instead of 0x68.
diff --git a/rigs/yaesu/ft817.c b/rigs/yaesu/ft817.c
index dc7b9f48..394e54de 100644
--- a/rigs/yaesu/ft817.c
+++ b/rigs/yaesu/ft817.c
@@ -88,6 +88,9 @@ struct ft817_priv_data
unsigned char fm_status[YAESU_CMD_LENGTH + 1];
};
+static int ft817_get_vfo(RIG *rig, vfo_t *vfo);
+static int ft817_set_vfo(RIG *rig, vfo_t vfo);
+
/* Native ft817 cmd set prototypes. These are READ ONLY as each */
/* rig instance will copy from these and modify if required . */
/* Complete sequences (1) can be read and used directly as a cmd sequence . */
@@ -324,6 +327,8 @@ const struct rig_caps ft817_caps =
.rig_cleanup = ft817_cleanup,
.rig_open = ft817_open,
.rig_close = ft817_close,
+ .get_vfo = ft817_get_vfo,
+ .set_vfo = ft817_set_vfo,
.set_freq = ft817_set_freq,
.get_freq = ft817_get_freq,
.set_mode = ft817_set_mode,
@@ -462,6 +467,8 @@ const struct rig_caps ft818_caps =
.rig_cleanup = ft817_cleanup,
.rig_open = ft817_open,
.rig_close = ft817_close,
+ .get_vfo = ft817_get_vfo,
+ .set_vfo = ft817_set_vfo,
.set_freq = ft817_set_freq,
.get_freq = ft817_get_freq,
.set_mode = ft817_set_mode,
@@ -1114,6 +1121,48 @@ static int ft817_send_icmd(RIG *rig, int index, unsigned char *data)
}
/* ---------------------------------------------------------------------- */
+static int ft817_get_vfo(RIG *rig, vfo_t *vfo)
+{
+ unsigned char c;
+ *vfo = RIG_VFO_B;
+
+ rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__);
+
+ if (ft817_read_eeprom(rig, 0x55, &c) < 0) /* get vfo status */
+ {
+ return -RIG_EPROTO;
+ }
+
+ if ((c & 0x1) == 0) { *vfo = RIG_VFO_A; }
+
+ return RIG_OK;
+}
+
+static int ft817_set_vfo(RIG *rig, vfo_t vfo)
+{
+ vfo_t curvfo;
+ int retval;
+
+ rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__);
+
+ retval = ft817_get_vfo(rig, &curvfo);
+
+ if (retval != RIG_OK)
+ {
+ rig_debug(RIG_DEBUG_ERR, "%s: error get_vfo '%s'\n", __func__,
+ rigerror(retval));
+ return retval;
+ }
+
+ if (curvfo == vfo)
+ {
+ return RIG_OK;
+ }
+
+ return ft817_send_cmd(rig, FT817_NATIVE_CAT_SET_VFOAB);
+}
+
+
int ft817_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
{
commit 673733700f5b4d52e1057d266fce60583cb6e8a3
Author: Wouter van Gulik <pa...@gm...>
Date: Tue Aug 17 20:23:03 2021 +0200
Move private data structs of ft100, ft600, ft817, ft857, ft897 to the C file.
Note that is already so for all other Yaesu device.
Leave private data in newcat; it is used by multiple rigs.
diff --git a/rigs/yaesu/ft100.c b/rigs/yaesu/ft100.c
index 52b18a8b..fd7e9601 100644
--- a/rigs/yaesu/ft100.c
+++ b/rigs/yaesu/ft100.c
@@ -41,6 +41,13 @@
#include "misc.h"
#include "bandplan.h"
+struct ft100_priv_data {
+ /* TODO: make use of cached data */
+ FT100_STATUS_INFO status;
+ FT100_FLAG_INFO flags;
+};
+
+
/* prototypes */
static int ft100_send_priv_cmd(RIG *rig, unsigned char cmd_index);
diff --git a/rigs/yaesu/ft100.h b/rigs/yaesu/ft100.h
index 64c2dc58..bb8c8fbf 100644
--- a/rigs/yaesu/ft100.h
+++ b/rigs/yaesu/ft100.h
@@ -127,13 +127,6 @@ typedef struct
FT100_FLAG_INFO;
-struct ft100_priv_data {
- /* TODO: make use of cached data */
- FT100_STATUS_INFO status;
- FT100_FLAG_INFO flags;
-};
-
-
static int ft100_init(RIG *rig);
static int ft100_open(RIG *rig);
static int ft100_cleanup(RIG *rig);
diff --git a/rigs/yaesu/ft600.c b/rigs/yaesu/ft600.c
index ab4838cb..c0f353a1 100644
--- a/rigs/yaesu/ft600.c
+++ b/rigs/yaesu/ft600.c
@@ -41,6 +41,14 @@
#include "misc.h"
#include "bandplan.h"
+struct ft600_priv_data {
+ FT600_STATUS_INFO status;
+ FT600_FLAG_INFO flags;
+ unsigned char s_meter;
+
+};
+
+
/* prototypes */
static int ft600_send_priv_cmd(RIG *rig, unsigned char cmd_index);
diff --git a/rigs/yaesu/ft600.h b/rigs/yaesu/ft600.h
index 22963d47..002554d1 100644
--- a/rigs/yaesu/ft600.h
+++ b/rigs/yaesu/ft600.h
@@ -112,14 +112,6 @@ typedef struct
FT600_FLAG_INFO;
-struct ft600_priv_data {
- FT600_STATUS_INFO status;
- FT600_FLAG_INFO flags;
- unsigned char s_meter;
-
-};
-
-
static int ft600_init(RIG *rig);
static int ft600_open(RIG *rig);
static int ft600_cleanup(RIG *rig);
diff --git a/rigs/yaesu/ft817.c b/rigs/yaesu/ft817.c
index a9d12590..dc7b9f48 100644
--- a/rigs/yaesu/ft817.c
+++ b/rigs/yaesu/ft817.c
@@ -71,6 +71,22 @@
#include "bandplan.h"
#include "cal.h"
+struct ft817_priv_data
+{
+ yaesu_cmd_set_t pcs[FT817_NATIVE_SIZE]; /* TODO: why? */
+
+ /* rx status */
+ struct timeval rx_status_tv;
+ unsigned char rx_status;
+
+ /* tx status */
+ struct timeval tx_status_tv;
+ unsigned char tx_status;
+
+ /* freq & mode status */
+ struct timeval fm_status_tv;
+ unsigned char fm_status[YAESU_CMD_LENGTH + 1];
+};
/* Native ft817 cmd set prototypes. These are READ ONLY as each */
/* rig instance will copy from these and modify if required . */
diff --git a/rigs/yaesu/ft817.h b/rigs/yaesu/ft817.h
index d6fe017a..97532dc0 100644
--- a/rigs/yaesu/ft817.h
+++ b/rigs/yaesu/ft817.h
@@ -122,23 +122,6 @@ enum ft817_native_cmd_e
typedef enum ft817_native_cmd_e ft817_native_cmd_t;
-struct ft817_priv_data
-{
- yaesu_cmd_set_t pcs[FT817_NATIVE_SIZE]; /* TODO: why? */
-
- /* rx status */
- struct timeval rx_status_tv;
- unsigned char rx_status;
-
- /* tx status */
- struct timeval tx_status_tv;
- unsigned char tx_status;
-
- /* freq & mode status */
- struct timeval fm_status_tv;
- unsigned char fm_status[YAESU_CMD_LENGTH + 1];
-};
-
/* fixme: why declare static? it has no effect */
static int ft817_init(RIG *rig);
static int ft817_open(RIG *rig);
diff --git a/rigs/yaesu/ft847.c b/rigs/yaesu/ft847.c
index da42a36d..8699780f 100644
--- a/rigs/yaesu/ft847.c
+++ b/rigs/yaesu/ft847.c
@@ -60,8 +60,26 @@
#include "bandplan.h"
#include "tones.h"
-/* prototypes */
+/*
+ * ft847 instance - private data
+ *
+ */
+struct ft847_priv_data {
+ split_t sat_mode;
+
+ unsigned char rx_status; /* tx returned data */
+ unsigned char tx_status; /* rx returned data */
+ /* for early ft847's we keep our own memory items */
+ /* Early rigs are one-way com to the rig */
+ freq_t freqA,freqB;
+ mode_t mode;
+ pbwidth_t width;
+ ptt_t ptt;
+};
+
+
+/* prototypes */
static int ft847_send_priv_cmd(RIG *rig, int cmd_index);
diff --git a/rigs/yaesu/ft847.h b/rigs/yaesu/ft847.h
index 69469787..9c20fc23 100644
--- a/rigs/yaesu/ft847.h
+++ b/rigs/yaesu/ft847.h
@@ -144,26 +144,6 @@ typedef enum ft847_native_cmd_e ft847_native_cmd_t;
-/*
- * ft847 instance - private data
- *
- */
-
-struct ft847_priv_data {
- split_t sat_mode;
-
- unsigned char rx_status; /* tx returned data */
- unsigned char tx_status; /* rx returned data */
- /* for early ft847's we keep our own memory items */
- /* Early rigs are one-way com to the rig */
- freq_t freqA,freqB;
- mode_t mode;
- pbwidth_t width;
- ptt_t ptt;
-};
-
-
-
/*
* API local implementation
*/
diff --git a/rigs/yaesu/ft857.c b/rigs/yaesu/ft857.c
index 12df2a91..33f7a27b 100644
--- a/rigs/yaesu/ft857.c
+++ b/rigs/yaesu/ft857.c
@@ -74,6 +74,24 @@
#include "tones.h"
#include "bandplan.h"
+struct ft857_priv_data {
+ yaesu_cmd_set_t pcs[FT857_NATIVE_SIZE]; /* TODO: why? */
+
+ /* rx status */
+ struct timeval rx_status_tv;
+ unsigned char rx_status;
+
+ /* tx status */
+ struct timeval tx_status_tv;
+ unsigned char tx_status;
+
+ /* freq & mode status */
+ struct timeval fm_status_tv;
+ unsigned char fm_status[YAESU_CMD_LENGTH+1];
+};
+
+
+
/* Native ft857 cmd set prototypes. These are READ ONLY as each */
/* rig instance will copy from these and modify if required . */
/* Complete sequences (1) can be read and used directly as a cmd sequence . */
diff --git a/rigs/yaesu/ft857.h b/rigs/yaesu/ft857.h
index 6634ce1a..2f1699ae 100644
--- a/rigs/yaesu/ft857.h
+++ b/rigs/yaesu/ft857.h
@@ -118,23 +118,6 @@ enum ft857_native_cmd_e {
typedef enum ft857_native_cmd_e ft857_native_cmd_t;
-struct ft857_priv_data {
- yaesu_cmd_set_t pcs[FT857_NATIVE_SIZE]; /* TODO: why? */
-
- /* rx status */
- struct timeval rx_status_tv;
- unsigned char rx_status;
-
- /* tx status */
- struct timeval tx_status_tv;
- unsigned char tx_status;
-
- /* freq & mode status */
- struct timeval fm_status_tv;
- unsigned char fm_status[YAESU_CMD_LENGTH+1];
-};
-
-
static int ft857_init(RIG *rig);
static int ft857_open(RIG *rig);
static int ft857_cleanup(RIG *rig);
diff --git a/rigs/yaesu/ft897.c b/rigs/yaesu/ft897.c
index ccc40395..d8963abc 100644
--- a/rigs/yaesu/ft897.c
+++ b/rigs/yaesu/ft897.c
@@ -79,6 +79,23 @@
#include "tones.h"
#include "bandplan.h"
+struct ft897_priv_data {
+ yaesu_cmd_set_t pcs[FT897_NATIVE_SIZE]; /* TODO: why? */
+
+ /* rx status */
+ struct timeval rx_status_tv;
+ unsigned char rx_status;
+
+ /* tx status */
+ struct timeval tx_status_tv;
+ unsigned char tx_status;
+
+ /* freq & mode status */
+ struct timeval fm_status_tv;
+ unsigned char fm_status[YAESU_CMD_LENGTH+1];
+};
+
+
static int ft897_init(RIG *rig);
static int ft897_open(RIG *rig);
diff --git a/rigs/yaesu/ft897.h b/rigs/yaesu/ft897.h
index 9e8c62ed..a879e492 100644
--- a/rigs/yaesu/ft897.h
+++ b/rigs/yaesu/ft897.h
@@ -115,22 +115,4 @@ enum ft897_native_cmd_e {
typedef enum ft897_native_cmd_e ft897_native_cmd_t;
-
-struct ft897_priv_data {
- yaesu_cmd_set_t pcs[FT897_NATIVE_SIZE]; /* TODO: why? */
-
- /* rx status */
- struct timeval rx_status_tv;
- unsigned char rx_status;
-
- /* tx status */
- struct timeval tx_status_tv;
- unsigned char tx_status;
-
- /* freq & mode status */
- struct timeval fm_status_tv;
- unsigned char fm_status[YAESU_CMD_LENGTH+1];
-};
-
-
#endif /* _FT897_H */
commit cc845deb0da939bfb952701a97d8dab58aad8d4f
Author: Mike Black W9MDB <mdb...@ya...>
Date: Tue Aug 17 09:17:20 2021 -0500
Add LIBUSB flags to hamlib.m4
https://github.com/Hamlib/Hamlib/issues/763
diff --git a/hamlib.m4 b/hamlib.m4
index bf65f177..302974b5 100644
--- a/hamlib.m4
+++ b/hamlib.m4
@@ -38,7 +38,7 @@ dnl Add any special include directories
AC_MSG_CHECKING(for HAMLIB CFLAGS)
if test "$hamlib_inc_prefix" != "" ; then
HAMLIB_CFLAGS="$HAMLIB_CFLAGS -I$hamlib_inc_prefix"
- CFLAGS="$CFLAGS -I$hamlib_inc_prefix"
+ CFLAGS="$CFLAGS -I$hamlib_inc_prefix $LIBUSB_CFLAGS"
fi
AC_MSG_RESULT($HAMLIB_CFLAGS)
@@ -46,7 +46,7 @@ dnl add any special lib dirs
AC_MSG_CHECKING(for HAMLIB LDFLAGS)
if test "$hamlib_prefix" != "" ; then
HAMLIB_LIBS="$HAMLIB_LIBS -L$hamlib_prefix -Wl,--rpath -Wl,$hamlib_prefix"
- LDFLAGS="$LDFLAGS $HAMLIB_LIBS"
+ LDFLAGS="$LDFLAGS $HAMLIB_LIBS $LIBUSB_LDFLAGS"
fi
dnl add the hamlib library
commit 87122795e74ca72601768168f37ba3ef0a1d4f65
Author: Mike Black W9MDB <mdb...@ya...>
Date: Tue Aug 17 08:12:16 2021 -0500
Change tests/Makefile.am testlibusb to use LIBUSB_CFLAGS and LIBUSB_LIBS
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 6132163a..aa6eae03 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -39,7 +39,7 @@ rotctld_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -I$(top_builddir)/src
ampctl_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -I$(top_builddir)/src
ampctld_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -I$(top_builddir)/src
rigctlcom_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS)
-testlibusb_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS)
+testlibusb_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) $(LIBUSB_CFLAGS)
rigctl_LDADD = $(PTHREAD_LIBS) $(READLINE_LIBS) $(LDADD)
rigctld_LDADD = $(NET_LIBS) $(PTHREAD_LIBS) $(LDADD) $(READLINE_LIBS)
@@ -49,7 +49,7 @@ ampctl_LDADD = $(PTHREAD_LIBS) $(LDADD) $(READLINE_LIBS)
ampctld_LDADD = $(NET_LIBS) $(PTHREAD_LIBS) $(LDADD) $(READLINE_LIBS)
rigmem_LDADD = $(LIBXML2_LIBS) $(LDADD)
rigctlcom_LDADD = $(NET_LIBS) $(PTHREAD_LIBS) $(LDADD) $(READLINE_LIBS)
-testlibusb_LDADD = -L/c/JTSDK64-Tools/tools/libusb/1.0.24/VS2019/MS64/dll -lusb-1.0
+testlibusb_LDADD = $(LIBUSB_LIBS)
# Linker options
rigctl_LDFLAGS = $(WINEXELDFLAGS)
commit d52cce510db9068f5a12daed78f257b64d247a6d
Author: Mike Black W9MDB <mdb...@ya...>
Date: Mon Aug 16 22:49:36 2021 -0500
Add fallback serial open logic to hopefully cure serial port open error with K4
https://github.com/Hamlib/Hamlib/issues/768
diff --git a/src/serial.c b/src/serial.c
index af7aa518..dca8c78c 100644
--- a/src/serial.c
+++ b/src/serial.c
@@ -225,6 +225,21 @@ int HAMLIB_API serial_open(hamlib_port_t *rp)
* Open in Non-blocking mode. Watch for EAGAIN errors!
*/
fd = OPEN(rp->pathname, O_RDWR | O_NOCTTY | O_NDELAY);
+ if (fd == -1)
+ {
+ rig_debug(RIG_DEBUG_WARN, "%s: open failed...trying withoud O_NOCTTY\n", __func__);
+ fd = OPEN(rp->pathname, O_RDWR | O_NDELAY);
+ }
+ if (fd == -1)
+ {
+ rig_debug(RIG_DEBUG_WARN, "%s: open failed...trying withoud O_NDELAY\n", __func__);
+ fd = OPEN(rp->pathname, O_RDWR | O_NOCTTY );
+ }
+ if (fd == -1)
+ {
+ rig_debug(RIG_DEBUG_WARN, "%s: open failed...trying withoud O_NDELAY and O_NOCTTY\n", __func__);
+ fd = OPEN(rp->pathname, O_RDWR);
+ }
if (fd == -1)
{
commit 4c0797dc78633c08128add833cc367601b398abf
Author: Mike Black W9MDB <mdb...@ya...>
Date: Mon Aug 16 22:39:57 2021 -0500
Remove csharp from codeql-analysis
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 242a4472..4cac2720 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -32,7 +32,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- language: [ 'cpp', 'csharp', 'python' ]
+ language: [ 'cpp', 'python' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
commit a7cc7da17f508ee5ba87eb1891c32686ef8e2142
Author: Mike Black W9MDB <mdb...@ya...>
Date: Mon Aug 16 22:24:51 2021 -0500
Hopefully portable detection of libusb.h in testlibusb.c
https://github.com/Hamlib/Hamlib/issues/763
diff --git a/tests/testlibusb.c b/tests/testlibusb.c
index 5213055d..83c5f62a 100755
--- a/tests/testlibusb.c
+++ b/tests/testlibusb.c
@@ -24,7 +24,11 @@
#include <stdio.h>
#include <string.h>
+#if __has_include("libusb.h")
+#include "libusb.h"
+#else
#include <libusb-1.0/libusb.h>
+#endif
int verbose = 0;
commit 45ff011ec0392b333841a7dba69549faade0ec5d
Author: Mike Black W9MDB <mdb...@ya...>
Date: Mon Aug 16 09:03:08 2021 -0500
Fixing codesql-analysis.yml
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 8c456cb9..242a4472 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -53,8 +53,8 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- - name: Autobuild
- uses: github/codeql-action/autobuild@v1
+ #- name: Autobuild
+ # uses: github/codeql-action/autobuild@v1
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
@@ -64,9 +64,10 @@ jobs:
# uses a compiled language
- run: |
- sudo apt install libusb-1.0-0-dev
- # make bootstrap
- # make release
+ sudo apt install libusb-1.0-0-dev
+ ./bootstrap
+ ./configure
+ make
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
commit d9b50ddf7791fb6e58e3b195ab93251fd86fa598
Author: Mike Black W9MDB <mdb...@ya...>
Date: Mon Aug 16 07:35:10 2021 -0500
Fixing codesql-analysis.yml
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 8469eb62..8c456cb9 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -63,7 +63,8 @@ jobs:
# and modify them (or add more) to build your code if your project
# uses a compiled language
- #- run: |
+ - run: |
+ sudo apt install libusb-1.0-0-dev
# make bootstrap
# make release
commit cf192ac92f709d1ae4836d97cfff9b793ffcaacf
Author: Mike Black W9MDB <mdb...@ya...>
Date: Mon Aug 16 07:23:39 2021 -0500
Fixing c-cpp.yml for libusb
diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml
index 1bc344da..519c232f 100644
--- a/.github/workflows/c-cpp.yml
+++ b/.github/workflows/c-cpp.yml
@@ -13,10 +13,10 @@ jobs:
steps:
- uses: actions/checkout@v2
- - name: packages
- run: sudo apt install libusb-1.0-0-dev
- name: bootstrap
- run: ./bootstrap
+ run: |
+ sudo apt install libusb-1.0-0-dev
+ ./bootstrap
- name: configure
run: ./configure
- name: make
commit df568dffb686491d875aaee5c8fbc98a43c36b67
Author: Mike Black W9MDB <mdb...@ya...>
Date: Mon Aug 16 07:05:32 2021 -0500
Fixing c-cpp.yml for libusb
diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml
index 7be3eb9d..1bc344da 100644
--- a/.github/workflows/c-cpp.yml
+++ b/.github/workflows/c-cpp.yml
@@ -14,7 +14,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: packages
- - run: sudo apt install libusb-1.0-0-dev
+ run: sudo apt install libusb-1.0-0-dev
- name: bootstrap
run: ./bootstrap
- name: configure
commit b27d765e730da8bda2bb0ef49ac8156501951e3f
Author: Mike Black W9MDB <mdb...@ya...>
Date: Mon Aug 16 07:02:09 2021 -0500
Attempt to fix c-cpp.yml for libusb dependency
diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml
index 3109a560..7be3eb9d 100644
--- a/.github/workflows/c-cpp.yml
+++ b/.github/workflows/c-cpp.yml
@@ -13,6 +13,8 @@ jobs:
steps:
- uses: actions/checkout@v2
+ - name: packages
+ - run: sudo apt install libusb-1.0-0-dev
- name: bootstrap
run: ./bootstrap
- name: configure
commit 08180623727bc69442a30bf0c5927e795e22cda1
Author: Mike Black W9MDB <mdb...@ya...>
Date: Sun Aug 15 23:46:27 2021 -0500
Add testlibusb to Makefile.am in tests
https://github.com/Hamlib/Hamlib/issues/763
diff --git a/tests/Makefile.am b/tests/Makefile.am
index e8aa5cf1..6132163a 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -6,7 +6,7 @@
DISTCLEANFILES = rigctl.log rigctl.sum testbcd.log testbcd.sum
-bin_PROGRAMS = rigctl rigctld rigmem rigsmtr rigswr rotctl rotctld rigctlcom ampctl ampctld
+bin_PROGRAMS = rigctl rigctld rigmem rigsmtr rigswr rotctl rotctld rigctlcom ampctl ampctld testlibusb
check_PROGRAMS = dumpmem testrig testrigopen testrigcaps testtrn testbcd testfreq listrigs testloc rig_bench testcache cachetest cachetest2 testcookie
@@ -24,6 +24,7 @@ ampctld_SOURCES = ampctld.c $(AMPCOMMONSRC)
rigswr_SOURCES = rigswr.c
rigsmtr_SOURCES = rigsmtr.c
rigmem_SOURCES = rigmem.c memsave.c memload.c memcsv.c
+testlibusb_SOURCES = testlibusb.c
# include generated include files ahead of any in sources
rigctl_CPPFLAGS = -I$(top_builddir)/tests -I$(top_builddir)/src -I$(srcdir) $(AM_CPPFLAGS)
@@ -38,6 +39,7 @@ rotctld_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -I$(top_builddir)/src
ampctl_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -I$(top_builddir)/src
ampctld_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -I$(top_builddir)/src
rigctlcom_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS)
+testlibusb_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS)
rigctl_LDADD = $(PTHREAD_LIBS) $(READLINE_LIBS) $(LDADD)
rigctld_LDADD = $(NET_LIBS) $(PTHREAD_LIBS) $(LDADD) $(READLINE_LIBS)
@@ -47,6 +49,7 @@ ampctl_LDADD = $(PTHREAD_LIBS) $(LDADD) $(READLINE_LIBS)
ampctld_LDADD = $(NET_LIBS) $(PTHREAD_LIBS) $(LDADD) $(READLINE_LIBS)
rigmem_LDADD = $(LIBXML2_LIBS) $(LDADD)
rigctlcom_LDADD = $(NET_LIBS) $(PTHREAD_LIBS) $(LDADD) $(READLINE_LIBS)
+testlibusb_LDADD = -L/c/JTSDK64-Tools/tools/libusb/1.0.24/VS2019/MS64/dll -lusb-1.0
# Linker options
rigctl_LDFLAGS = $(WINEXELDFLAGS)
@@ -59,6 +62,7 @@ rigctld_LDFLAGS = $(WINEXELDFLAGS)
rotctld_LDFLAGS = $(WINEXELDFLAGS)
ampctld_LDFLAGS = $(WINEXELDFLAGS)
rigctlcom_LDFLAGS = $(WINEXELDFLAGS)
+testlibusb_LDFLAGS = $(WINEXELDFLAGS)
if HTML_MATRIX
@@ -109,4 +113,4 @@ testcookie.sh:
echo './testcookie 1' > testcookie.sh
chmod +x ./testcookie.sh
-CLEANFILES = testrig.sh testfreq.sh testbcd.sh testloc.sh testrigcaps.sh testcache.sh testcookie.sh
+CLEANFILES = testrig.sh testfreq.sh testbcd.sh testloc.sh testrigcaps.sh testcache.sh testcookie.sh testlibusb
commit ffb9143190750f53dc218cf823723641516024db
Author: Mike Black W9MDB <mdb...@ya...>
Date: Sun Aug 15 22:49:06 2021 -0500
Another fix for build-w64-jtsdk.sh
https://github.com/Hamlib/Hamlib/issues/763
diff --git a/scripts/build-w64-jtsdk.sh b/scripts/build-w64-jtsdk.sh
index 29486937..9b07c0f7 100755
--- a/scripts/build-w64-jtsdk.sh
+++ b/scripts/build-w64-jtsdk.sh
@@ -290,7 +290,8 @@ then
fi
# Copy over the main MSYS2 Runtime DLL (v2.0 at time of development)
-FILE="${QTD_F}/msys-2.0.dll"
+# This is dirty
+FILE="/usr/bin/msys-2.0.dll"
if test -f "$FILE"
then
cp -a ${FILE} ${ZIP_DIR}/bin/.
-----------------------------------------------------------------------
Summary of changes:
.github/workflows/c-cpp.yml | 4 +-
.github/workflows/codeql-analysis.yml | 14 +++---
NEWS | 1 +
README | 4 +-
configure.ac | 1 +
hamlib.m4 | 4 +-
rigs/yaesu/ft100.c | 7 +++
rigs/yaesu/ft100.h | 7 ---
rigs/yaesu/ft600.c | 8 +++
rigs/yaesu/ft600.h | 8 ---
rigs/yaesu/ft817.c | 92 +++++++++++++++++++++++++++--------
rigs/yaesu/ft817.h | 17 -------
rigs/yaesu/ft847.c | 20 +++++++-
rigs/yaesu/ft847.h | 20 --------
rigs/yaesu/ft857.c | 18 +++++++
rigs/yaesu/ft857.h | 17 -------
rigs/yaesu/ft897.c | 17 +++++++
rigs/yaesu/ft897.h | 18 -------
scripts/build-w64-jtsdk.sh | 3 +-
src/serial.c | 15 ++++++
tests/Makefile.am | 22 ++++++++-
tests/testlibusb.c | 4 ++
22 files changed, 198 insertions(+), 123 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Nate B. <n0...@us...> - 2021-08-15 18:15:52
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via 773b74565358e4c28827a18b3a73ca8e8d7f53d4 (commit)
via 9cf4b1658f609fc473ae9a38e8c150562d176b03 (commit)
via 4c91889a104d9fa8e2ffe2b62ecb4e5583f984dd (commit)
via 49038c78be3b687748589dca3ea1168650be92e4 (commit)
via 45935336cb5aa48f705585a7602cc3fe9314d2a3 (commit)
via 3fc0400294f2b20de117b932d5eee992ae3d78b2 (commit)
via 0a0873252ebdda11f36e2f3ef99dd412a5b7ec78 (commit)
via 269b5f23d6a7d5e26a41043c6d5f48ed78877ea5 (commit)
via 014bc04ddf7ef18b344acdb91663c58ba5156250 (commit)
via ad43cd793a446e26fa2cf15b19cdc7ac2edfd81d (commit)
via 3baa9da83964df0ff75e564300a43551e60415b5 (commit)
via 45d1162362c67858e2943ec71104bd12d3be0eee (commit)
via 1a64f26ea0a9e9e1c52f86b962b0729510744ae6 (commit)
via daf09e3ea5d0b30fffa42032460510a72ba8d1d7 (commit)
via ca33e9777bfff3509a070e6068a5fc03f4959ea7 (commit)
via 72c6f22c28a0747f07673eeb70a80fbd9bf0a9c5 (commit)
via be5b98eb8b6c87a80fa2b3d66c48f70f6b878571 (commit)
via 24a9fdcc948bee71d7c3f7589c7cb5ed450afb73 (commit)
via e57774cfdeefcbabedbd4754cbd22aaae7ea4a79 (commit)
via fa4302ceaa7d89487e02643768bcc24e577e36a0 (commit)
via 5cab1acc0dd5523fe0d0e9959f53bf1034e502d2 (commit)
via 1668fd795406752b027332d2779fa62c965b2785 (commit)
via ae08f81935cf8acb4528952f7bd84e0538480ac5 (commit)
via 3c76162c7831fc3044d613f885cfdeb80d9e0c9d (commit)
via e7e5cc063d2ef484f2d8b7cf33175bc160c22d28 (commit)
via a44c3d08cf6821460c593821673e12317ccdd18a (commit)
via f5f4fdeca624bc89dc7a7d28e955b7406e1a8f62 (commit)
via f8da39243d3e42c9dffe40c822bb43ecd229a358 (commit)
via 38a258d52a416b7cef6a8870b333f5c016e6a6dd (commit)
via 02577d43c0426c247beff1f092d6b67e0c20c9d9 (commit)
via 407ba17c04b3f7590ac078cf4b32f1e321554500 (commit)
via dc11b022450e1d207b8cf73c4927d9006c938e9d (commit)
via d228548b3834f55cd20dc3c9fa4bf6347f171198 (commit)
via f29ee3e908982e8923e18e1ee9c662d037b6282a (commit)
via f8974c1e8688b81e24fdd5cfd685538152479d47 (commit)
via 4bfd71f91f3a2c4260ea8e499637cebf312d5ffb (commit)
via bb4dd88e0cef065793ea291800e498e73dc2942f (commit)
via 4b777bc14e2507926c448e44488ec94bcc9ec0ba (commit)
via 046f3c448dd2a3f64bc347c8a0436a52f99f3e28 (commit)
via 592ca86fc6b52257576df0af4e73b98b7ba3ad07 (commit)
via 9a2cc9ff62fcf5d2a79f9d33119cf21fedf99f70 (commit)
via a70c6e6a0d3711273b684fdee6b8ff51228174ac (commit)
via c993cdd1f03e5c3646f6fcddbb7c6d0dbdf063a7 (commit)
via 8da5c2defa9ec07fa6f18c4f6d349c640a5818cf (commit)
via 67b78723134022c6c5046d94d69aefcfb6e20d61 (commit)
via e48e16beb088de25cb93e57be409cdd899d7dc0f (commit)
via fa10d10e38eb62ad18427948a6bbb72a6ed2db4e (commit)
via 68336fedfa997e55bdcfccd6fd87d53b9c6d4728 (commit)
via a502e4af5ccf979d695c852021b10754b6c791d9 (commit)
via eab000306cbd65a007bb69e12e526643643a9646 (commit)
via 0afa000de17cf4a659aa3a8b52c690cb6e16a94e (commit)
via c3b4eafc2c7198eda7cf61d316c1a3467a58fbe5 (commit)
via 7d5fa7dc88b4b9daedd0d0889fdf3a5439d5d37c (commit)
via a8200886bf4ac64a0f71b9a4ffe450b14882fe3a (commit)
via a092f1f630264185df12743320f70ec6ac74af0b (commit)
via fe2c0e772332d67d578a0c53bf03112fa96dbff8 (commit)
via 534246a8076cf7987819abf850084afb35fd8f5b (commit)
via e966508b3a9a17d6cc3efe6d89d481bf4b06d168 (commit)
via 4e4c93ff7380ae58d7e21ec10167bcbf3c463359 (commit)
via f147484b1dd765caa02ef7cfe5653ed088dec3e4 (commit)
via a88bd7238b0e1f23638cf350270483f93f660321 (commit)
via cb892602b41d228113a4804088617353e656cbaf (commit)
via 26dffeef4d59b73265aae1cdafdae91bf5a87b20 (commit)
via a6d91eb8a8424865f44e9430bfe3322e96db4a1a (commit)
via 756f8052fcb530641068fc956b4e19afe600a341 (commit)
via 7a3f00c57f305f284355a25f685930bb2165d305 (commit)
via dbdf86fa9a629c83354e2a9894342b1522300bbb (commit)
via dd376a12671b897b1bb31ac8c7a1e7a6f3b3a872 (commit)
via 2c57bc51d5d647fbfd96903f0748eb5f05697164 (commit)
via 0fecf4f587b58e93357511172bf07ac28e156fb8 (commit)
via b7f4722603e1830e4f0cf60d5eb047ea656a2277 (commit)
via d5231ec0da6a3f5af1644fd98007602ac3f914f3 (commit)
via 28c8b5a50240c50eb75184af7ffc6cc35578503a (commit)
via 91b3d268377a92324dba60e77650499c2fc8941e (commit)
via 4f500ae8e8b339e2f066e0196a6d935631ec0be0 (commit)
via 6bdb82bc5443a93262a87eada6f4bb553f22b6b6 (commit)
via b83b8aba60e3106b07ddd48ea350302146b48d15 (commit)
via 53adea283ce056bbf431c95645c3124d06c45b94 (commit)
via cc089335b0140cc844607fca49a3c177b0ddcc96 (commit)
via 65c77953f888ac9e206dd68c2501158306bff522 (commit)
via 21ade6493a4a7dd37bed7907f11ce2b0487f5a38 (commit)
via dd0187ede6c02bd977c759bb22b6745fe5ed3de4 (commit)
via 716fbb7643d719c0bd2daef27440571b00aa5655 (commit)
via 4e0107e988d8b6f0a5708a42062b0ae5d2709472 (commit)
via 76527afba5bcd920ed9a1875d7d40c5126987eab (commit)
via 466afd5d3f9100af84354c68165d0b85073d433d (commit)
via 75687ea273798e35a598c2a60186b5f4c4b4de7c (commit)
via 185d182a4233dc10441f14ca3b9b06565986f720 (commit)
via 1f91bdb7a680d67e4e9387f7916cf51e8f35c474 (commit)
via 217a978ab96c1afd59c544b5192dfeae3c28e12e (commit)
via ca7ca873bc5dbca37e52606fd28eddd404155847 (commit)
via b340d594f034bd3184388a8ef1124dbaaec87e2e (commit)
via dd2ed945fd727ed9be847b1d151184ad305627bb (commit)
via 72da9f645c684a9dc5bf1290063cfa52e6a6ccd5 (commit)
via eaff946c26508874fc242a14a05610a6d689aa2b (commit)
via c8439de131099613f4174203e51e4f726ed04463 (commit)
via b80ff9330cc2442a3660b75a7b29ef532d4b44f3 (commit)
via beede15b7bfb759cdf7cb01b66d7aa6c151f33f1 (commit)
via b7e77aa83f1052591fd74f61f404babf3d9a56bc (commit)
via c72517eafa82eaa7e16a69a74c5df11da5713a6b (commit)
via 2a8ca8184881d17a75bcf5f62d79af3d59bd6869 (commit)
via 3b2715463d0c204e4d909d86ee097978fa2c006c (commit)
via 763e18fa4203e0cb2f78a3ad893d47ba93195805 (commit)
via 42a9d4fbd60cefbffcc72deda8293fe405f9b3e2 (commit)
via ed09f544839d807cdd107be796e20e31bb708c62 (commit)
via 7b1ad09aed7a22a65fed55f71837c5e183903e62 (commit)
via 9ff92fa5ec018c0a83abd1cd78a72bee143e8e44 (commit)
via 6dacfa53c03e559098bd830147b5298c8ab99ba6 (commit)
via c7b10e0e8fafa0736670393524da5f0270ed7c4a (commit)
from 37b16fa283602f176fd7b82d1e095b356b1ac957 (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 773b74565358e4c28827a18b3a73ca8e8d7f53d4
Author: Mike Black W9MDB <mdb...@ya...>
Date: Sun Aug 15 12:24:28 2021 -0500
Add msys-2.0.dll to jtsdk build for libusb support
https://github.com/Hamlib/Hamlib/issues/763
diff --git a/scripts/build-w64-jtsdk.sh b/scripts/build-w64-jtsdk.sh
index ddef2ea5..29486937 100755
--- a/scripts/build-w64-jtsdk.sh
+++ b/scripts/build-w64-jtsdk.sh
@@ -289,6 +289,13 @@ then
cp -a ${FILE} ${ZIP_DIR}/bin/.
fi
+# Copy over the main MSYS2 Runtime DLL (v2.0 at time of development)
+FILE="${QTD_F}/msys-2.0.dll"
+if test -f "$FILE"
+then
+ cp -a ${FILE} ${ZIP_DIR}/bin/.
+fi
+
# Required for MinGW with GCC 6.3 (Debian 9)
FILE="/usr/lib/gcc/i686-w64-mingw32/6.3-posix/libgcc_s_sjlj-1.dll"
if test -f "$FILE"
commit 9cf4b1658f609fc473ae9a38e8c150562d176b03
Author: Mike Black W9MDB <mdb...@ya...>
Date: Sat Aug 14 23:45:59 2021 -0500
Move FT1 command to K4 rig only
diff --git a/rigs/kenwood/k3.c b/rigs/kenwood/k3.c
index 4fb288af..9cbcae64 100644
--- a/rigs/kenwood/k3.c
+++ b/rigs/kenwood/k3.c
@@ -1479,7 +1479,7 @@ int k3_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width)
snprintf(cmd_m, sizeof(cmd_m),
"DT0;"); /* DATA A mode - DATA-R LSB, suppressed carrier */
if (priv->is_k4d || priv->is_k4hd) {
- strcat(cmd_m, "DT$0;FT1;");
+ strcat(cmd_m, "DT$0;");
}
break;
@@ -1488,7 +1488,7 @@ int k3_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width)
snprintf(cmd_m, sizeof(cmd_m),
"DT0;"); /* DATA A mode - DATA on USB, suppressed carrier */
if (priv->is_k4d || priv->is_k4hd) {
- strcat(cmd_m, "DT$0;FT1;");
+ strcat(cmd_m, "DT$0;");
}
break;
@@ -1497,7 +1497,7 @@ int k3_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width)
snprintf(cmd_m, sizeof(cmd_m),
"DT2;"); /* FSK D mode - direct FSK on LSB optimized for RTTY, VFO dial is MARK */
if (priv->is_k4d || priv->is_k4hd) {
- strcat(cmd_m, "DT$2;FT1;");
+ strcat(cmd_m, "DT$2;");
}
break;
@@ -1506,7 +1506,7 @@ int k3_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width)
snprintf(cmd_m, sizeof(cmd_m),
"DT1;"); /* FSK D mode - direct FSK on USB optimized for RTTY, VFO dial is MARK */
if (priv->is_k4d || priv->is_k4hd) {
- strcat(cmd_m, "DT$1;FT1;");
+ strcat(cmd_m, "DT$1;");
}
break;
@@ -1515,7 +1515,7 @@ int k3_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width)
snprintf(cmd_m, sizeof(cmd_m),
"DT3;FT1;"); /* PSK D Mode - direct PSK keying, USB is "normal", VFO dial is MARK */
if (priv->is_k4d || priv->is_k4hd) {
- strcat(cmd_m, "DT$3;FT1;");
+ strcat(cmd_m, "DT$3;");
}
break;
@@ -1527,6 +1527,10 @@ int k3_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width)
#if 1
if (priv->is_k4d || priv->is_k4hd) {
+ // split can get turned off when modes are changing
+ // so if the rig did this independtly of us we turn it back on
+ // even if the rig changes the split status should be the last thing we did
+ if (priv->split) strcat(cmd_m, "FT1;");
/* Set data sub-mode. K3 needs to be in a DATA mode before setting
* the sub-mode or switching to VFOB so we do this before the MD$ command.
*/
commit 4c91889a104d9fa8e2ffe2b62ecb4e5583f984dd
Author: Mike Black W9MDB <mdb...@ya...>
Date: Sat Aug 14 22:36:33 2021 -0500
For Elecraft add a set split after DT$ command in set_split_mode
On the K4 the setting of VFOA was turning split off
https://github.com/Hamlib/Hamlib/issues/748
diff --git a/rigs/kenwood/k3.c b/rigs/kenwood/k3.c
index ae4584e2..4fb288af 100644
--- a/rigs/kenwood/k3.c
+++ b/rigs/kenwood/k3.c
@@ -183,7 +183,7 @@ const struct rig_caps k3_caps =
RIG_MODEL(RIG_MODEL_K3),
.model_name = "K3",
.mfg_name = "Elecraft",
- .version = BACKEND_VER ".15",
+ .version = BACKEND_VER ".16",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,
@@ -334,7 +334,7 @@ const struct rig_caps k3s_caps =
RIG_MODEL(RIG_MODEL_K3S),
.model_name = "K3S",
.mfg_name = "Elecraft",
- .version = BACKEND_VER ".13",
+ .version = BACKEND_VER ".14",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,
@@ -484,7 +484,7 @@ const struct rig_caps k4_caps =
RIG_MODEL(RIG_MODEL_K4),
.model_name = "K4",
.mfg_name = "Elecraft",
- .version = BACKEND_VER ".13",
+ .version = BACKEND_VER ".14",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,
@@ -633,7 +633,7 @@ const struct rig_caps kx3_caps =
RIG_MODEL(RIG_MODEL_KX3),
.model_name = "KX3",
.mfg_name = "Elecraft",
- .version = BACKEND_VER ".13",
+ .version = BACKEND_VER ".14",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,
@@ -782,7 +782,7 @@ const struct rig_caps kx2_caps =
RIG_MODEL(RIG_MODEL_KX2),
.model_name = "KX2",
.mfg_name = "Elecraft",
- .version = BACKEND_VER ".13",
+ .version = BACKEND_VER ".14",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,
@@ -1479,7 +1479,7 @@ int k3_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width)
snprintf(cmd_m, sizeof(cmd_m),
"DT0;"); /* DATA A mode - DATA-R LSB, suppressed carrier */
if (priv->is_k4d || priv->is_k4hd) {
- strcat(cmd_m, "DT$0;");
+ strcat(cmd_m, "DT$0;FT1;");
}
break;
@@ -1488,7 +1488,7 @@ int k3_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width)
snprintf(cmd_m, sizeof(cmd_m),
"DT0;"); /* DATA A mode - DATA on USB, suppressed carrier */
if (priv->is_k4d || priv->is_k4hd) {
- strcat(cmd_m, "DT$0;");
+ strcat(cmd_m, "DT$0;FT1;");
}
break;
@@ -1497,7 +1497,7 @@ int k3_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width)
snprintf(cmd_m, sizeof(cmd_m),
"DT2;"); /* FSK D mode - direct FSK on LSB optimized for RTTY, VFO dial is MARK */
if (priv->is_k4d || priv->is_k4hd) {
- strcat(cmd_m, "DT$2;");
+ strcat(cmd_m, "DT$2;FT1;");
}
break;
@@ -1506,16 +1506,16 @@ int k3_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width)
snprintf(cmd_m, sizeof(cmd_m),
"DT1;"); /* FSK D mode - direct FSK on USB optimized for RTTY, VFO dial is MARK */
if (priv->is_k4d || priv->is_k4hd) {
- strcat(cmd_m, "DT$1;");
+ strcat(cmd_m, "DT$1;FT1;");
}
break;
case RIG_MODE_PSK:
tx_mode = RIG_MODE_PSK;
snprintf(cmd_m, sizeof(cmd_m),
- "DT3;"); /* PSK D Mode - direct PSK keying, USB is "normal", VFO dial is MARK */
+ "DT3;FT1;"); /* PSK D Mode - direct PSK keying, USB is "normal", VFO dial is MARK */
if (priv->is_k4d || priv->is_k4hd) {
- strcat(cmd_m, "DT$3;");
+ strcat(cmd_m, "DT$3;FT1;");
}
break;
commit 49038c78be3b687748589dca3ea1168650be92e4
Author: Mike Black W9MDB <mdb...@ya...>
Date: Sat Aug 14 17:56:32 2021 -0500
Add a check in flrig to protect strdup from a NULL pointer
https://github.com/Hamlib/Hamlib/issues/765
diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c
index c4ea99fd..14e1a327 100644
--- a/rigs/dummy/flrig.c
+++ b/rigs/dummy/flrig.c
@@ -144,7 +144,7 @@ const struct rig_caps flrig_caps =
RIG_MODEL(RIG_MODEL_FLRIG),
.model_name = "FLRig",
.mfg_name = "FLRig",
- .version = "202100721",
+ .version = "202100814",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,
@@ -1414,7 +1414,13 @@ static int flrig_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
}
// Set the mode
- ttmode = strdup(modeMapGetFLRig(mode));
+ if (modeMapGetFLRig(mode)) {
+ ttmode = strdup(modeMapGetFLRig(mode));
+ }
+ else {
+ rig_debug(RIG_DEBUG_ERR, "%s: modeMapGetFlRig failed on mode=%d\n", __func__, (int)mode);
+ RETURNFUNC(-RIG_EINVAL);
+ }
rig_debug(RIG_DEBUG_TRACE, "%s: got ttmode = %s\n", __func__,
ttmode == NULL ? "NULL" : ttmode);
commit 45935336cb5aa48f705585a7602cc3fe9314d2a3
Author: Mike Black W9MDB <mdb...@ya...>
Date: Sat Aug 14 10:39:00 2021 -0500
Adding testlibusb.c
diff --git a/tests/testlibusb.c b/tests/testlibusb.c
new file mode 100755
index 00000000..5213055d
--- /dev/null
+++ b/tests/testlibusb.c
@@ -0,0 +1,316 @@
+/*
+* To compile on linux ensure you have libusb-1.0 installed
+* e.g. apt install libusb-1.0-0-dev
+* Also works on MinGW with both static build and DLLs from MSVC builds
+* gcc -o testlibusb testlibusb.c -lusb-1.0
+*
+* Test suite program based of libusb-0.1-compat testlibusb
+* Copyright (c) 2013 Nathan Hjelm <hj...@ma...>
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2.1 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
+#include <stdio.h>
+#include <string.h>
+#include <libusb-1.0/libusb.h>
+
+int verbose = 0;
+
+static void print_endpoint_comp(const struct libusb_ss_endpoint_companion_descriptor *ep_comp)
+{
+ printf(" USB 3.0 Endpoint Companion:\n");
+ printf(" bMaxBurst: %u\n", ep_comp->bMaxBurst);
+ printf(" bmAttributes: %02xh\n", ep_comp->bmAttributes);
+ printf(" wBytesPerInterval: %u\n", ep_comp->wBytesPerInterval);
+}
+
+static void print_endpoint(const struct libusb_endpoint_descriptor *endpoint)
+{
+ int i, ret;
+
+ printf(" Endpoint:\n");
+ printf(" bEndpointAddress: %02xh\n", endpoint->bEndpointAddress);
+ printf(" bmAttributes: %02xh\n", endpoint->bmAttributes);
+ printf(" wMaxPacketSize: %u\n", endpoint->wMaxPacketSize);
+ printf(" bInterval: %u\n", endpoint->bInterval);
+ printf(" bRefresh: %u\n", endpoint->bRefresh);
+ printf(" bSynchAddress: %u\n", endpoint->bSynchAddress);
+
+ for (i = 0; i < endpoint->extra_length;) {
+ if (LIBUSB_DT_SS_ENDPOINT_COMPANION == endpoint->extra[i + 1]) {
+ struct libusb_ss_endpoint_companion_descriptor *ep_comp;
+
+ ret = libusb_get_ss_endpoint_companion_descriptor(NULL, endpoint, &ep_comp);
+ if (LIBUSB_SUCCESS != ret)
+ continue;
+
+ print_endpoint_comp(ep_comp);
+
+ libusb_free_ss_endpoint_companion_descriptor(ep_comp);
+ }
+
+ i += endpoint->extra[i];
+ }
+}
+
+static void print_altsetting(const struct libusb_interface_descriptor *interface)
+{
+ uint8_t i;
+
+ printf(" Interface:\n");
+ printf(" bInterfaceNumber: %u\n", interface->bInterfaceNumber);
+ printf(" bAlternateSetting: %u\n", interface->bAlternateSetting);
+ printf(" bNumEndpoints: %u\n", interface->bNumEndpoints);
+ printf(" bInterfaceClass: %u\n", interface->bInterfaceClass);
+ printf(" bInterfaceSubClass: %u\n", interface->bInterfaceSubClass);
+ printf(" bInterfaceProtocol: %u\n", interface->bInterfaceProtocol);
+ printf(" iInterface: %u\n", interface->iInterface);
+
+ for (i = 0; i < interface->bNumEndpoints; i++)
+ print_endpoint(&interface->endpoint[i]);
+}
+
+static void print_2_0_ext_cap(struct libusb_usb_2_0_extension_descriptor *usb_2_0_ext_cap)
+{
+ printf(" USB 2.0 Extension Capabilities:\n");
+ printf(" bDevCapabilityType: %u\n", usb_2_0_ext_cap->bDevCapabilityType);
+ printf(" bmAttributes: %08xh\n", usb_2_0_ext_cap->bmAttributes);
+}
+
+static void print_ss_usb_cap(struct libusb_ss_usb_device_capability_descriptor *ss_usb_cap)
+{
+ printf(" USB 3.0 Capabilities:\n");
+ printf(" bDevCapabilityType: %u\n", ss_usb_cap->bDevCapabilityType);
+ printf(" bmAttributes: %02xh\n", ss_usb_cap->bmAttributes);
+ printf(" wSpeedSupported: %u\n", ss_usb_cap->wSpeedSupported);
+ printf(" bFunctionalitySupport: %u\n", ss_usb_cap->bFunctionalitySupport);
+ printf(" bU1devExitLat: %u\n", ss_usb_cap->bU1DevExitLat);
+ printf(" bU2devExitLat: %u\n", ss_usb_cap->bU2DevExitLat);
+}
+
+static void print_bos(libusb_device_handle *handle)
+{
+ struct libusb_bos_descriptor *bos;
+ uint8_t i;
+ int ret;
+
+ ret = libusb_get_bos_descriptor(handle, &bos);
+ if (ret < 0)
+ return;
+
+ printf(" Binary Object Store (BOS):\n");
+ printf(" wTotalLength: %u\n", bos->wTotalLength);
+ printf(" bNumDeviceCaps: %u\n", bos->bNumDeviceCaps);
+
+ for (i = 0; i < bos->bNumDeviceCaps; i++) {
+ struct libusb_bos_dev_capability_descriptor *dev_cap = bos->dev_capability[i];
+
+ if (dev_cap->bDevCapabilityType == LIBUSB_BT_USB_2_0_EXTENSION) {
+ struct libusb_usb_2_0_extension_descriptor *usb_2_0_extension;
+
+ ret = libusb_get_usb_2_0_extension_descriptor(NULL, dev_cap, &usb_2_0_extension);
+ if (ret < 0)
+ return;
+
+ print_2_0_ext_cap(usb_2_0_extension);
+ libusb_free_usb_2_0_extension_descriptor(usb_2_0_extension);
+ } else if (dev_cap->bDevCapabilityType == LIBUSB_BT_SS_USB_DEVICE_CAPABILITY) {
+ struct libusb_ss_usb_device_capability_descriptor *ss_dev_cap;
+
+ ret = libusb_get_ss_usb_device_capability_descriptor(NULL, dev_cap, &ss_dev_cap);
+ if (ret < 0)
+ return;
+
+ print_ss_usb_cap(ss_dev_cap);
+ libusb_free_ss_usb_device_capability_descriptor(ss_dev_cap);
+ }
+ }
+
+ libusb_free_bos_descriptor(bos);
+}
+
+static void print_interface(const struct libusb_interface *interface)
+{
+ int i;
+
+ for (i = 0; i < interface->num_altsetting; i++)
+ print_altsetting(&interface->altsetting[i]);
+}
+
+static void print_configuration(struct libusb_config_descriptor *config)
+{
+ uint8_t i;
+
+ printf(" Configuration:\n");
+ printf(" wTotalLength: %u\n", config->wTotalLength);
+ printf(" bNumInterfaces: %u\n", config->bNumInterfaces);
+ printf(" bConfigurationValue: %u\n", config->bConfigurationValue);
+ printf(" iConfiguration: %u\n", config->iConfiguration);
+ printf(" bmAttributes: %02xh\n", config->bmAttributes);
+ printf(" MaxPower: %u\n", config->MaxPower);
+
+ for (i = 0; i < config->bNumInterfaces; i++)
+ print_interface(&config->interface[i]);
+}
+
+static void print_device(libusb_device *dev, libusb_device_handle *handle)
+{
+ struct libusb_device_descriptor desc;
+ unsigned char string[256];
+ const char *speed;
+ int ret;
+ uint8_t i;
+
+ switch (libusb_get_device_speed(dev)) {
+ case LIBUSB_SPEED_LOW: speed = "1.5M"; break;
+ case LIBUSB_SPEED_FULL: speed = "12M"; break;
+ case LIBUSB_SPEED_HIGH: speed = "480M"; break;
+ case LIBUSB_SPEED_SUPER: speed = "5G"; break;
+ case LIBUSB_SPEED_SUPER_PLUS: speed = "10G"; break;
+ default: speed = "Unknown";
+ }
+
+ ret = libusb_get_device_descriptor(dev, &desc);
+ if (ret < 0) {
+ fprintf(stderr, "failed to get device descriptor");
+ return;
+ }
+
+ printf("Dev (bus %u, device %u): %04X - %04X speed: %s\n",
+ libusb_get_bus_number(dev), libusb_get_device_address(dev),
+ desc.idVendor, desc.idProduct, speed);
+
+ if (!handle)
+ libusb_open(dev, &handle);
+
+ if (handle) {
+ if (desc.iManufacturer) {
+ ret = libusb_get_string_descriptor_ascii(handle, desc.iManufacturer, string, sizeof(string));
+ if (ret > 0)
+ printf(" Manufacturer: %s\n", (char *)string);
+ }
+
+ if (desc.iProduct) {
+ ret = libusb_get_string_descriptor_ascii(handle, desc.iProduct, string, sizeof(string));
+ if (ret > 0)
+ printf(" Product: %s\n", (char *)string);
+ }
+
+ if (desc.iSerialNumber && verbose) {
+ ret = libusb_get_string_descriptor_ascii(handle, desc.iSerialNumber, string, sizeof(string));
+ if (ret > 0)
+ printf(" Serial Number: %s\n", (char *)string);
+ }
+ }
+
+ if (verbose) {
+ for (i = 0; i < desc.bNumConfigurations; i++) {
+ struct libusb_config_descriptor *config;
+
+ ret = libusb_get_config_descriptor(dev, i, &config);
+ if (LIBUSB_SUCCESS != ret) {
+ printf(" Couldn't retrieve descriptors\n");
+ continue;
+ }
+
+ print_configuration(config);
+
+ libusb_free_config_descriptor(config);
+ }
+
+ if (handle && desc.bcdUSB >= 0x0201)
+ print_bos(handle);
+ }
+
+ if (handle)
+ libusb_close(handle);
+}
+
+#ifdef __linux__
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+static int test_wrapped_device(const char *device_name)
+{
+ libusb_device_handle *handle;
+ int r, fd;
+
+ fd = open(device_name, O_RDWR);
+ if (fd < 0) {
+ printf("Error could not open %s: %s\n", device_name, strerror(errno));
+ return 1;
+ }
+ r = libusb_wrap_sys_device(NULL, fd, &handle);
+ if (r) {
+ printf("Error wrapping device: %s: %s\n", device_name, libusb_strerror(r));
+ close(fd);
+ return 1;
+ }
+ print_device(libusb_get_device(handle), handle);
+ close(fd);
+ return 0;
+}
+#else
+static int test_wrapped_device(const char *device_name)
+{
+ (void)device_name;
+ printf("Testing wrapped devices is not supported on your platform\n");
+ return 1;
+}
+#endif
+
+int main(int argc, char *argv[])
+{
+ const char *device_name = NULL;
+ libusb_device **devs;
+ ssize_t cnt;
+ int r, i;
+
+ for (i = 1; i < argc; i++) {
+ if (!strcmp(argv[i], "-v")) {
+ verbose = 1;
+ } else if (!strcmp(argv[i], "-d") && (i + 1) < argc) {
+ i++;
+ device_name = argv[i];
+ } else {
+ printf("Usage %s [-v] [-d </dev/bus/usb/...>]\n", argv[0]);
+ printf("Note use -d to test libusb_wrap_sys_device()\n");
+ return 1;
+ }
+ }
+
+ r = libusb_init(NULL);
+ if (r < 0)
+ return r;
+
+ if (device_name) {
+ r = test_wrapped_device(device_name);
+ } else {
+ cnt = libusb_get_device_list(NULL, &devs);
+ if (cnt < 0) {
+ libusb_exit(NULL);
+ return 1;
+ }
+
+ for (i = 0; devs[i]; i++)
+ print_device(devs[i], NULL);
+
+ libusb_free_device_list(devs, 1);
+ }
+
+ libusb_exit(NULL);
+ return r;
+}
commit 3fc0400294f2b20de117b932d5eee992ae3d78b2
Merge: 0a087325 269b5f23
Author: Mike Black W9MDB <mdb...@ya...>
Date: Fri Aug 13 12:40:02 2021 -0500
Merge branch 'master' of https://github.com/Hamlib/Hamlib
commit 0a0873252ebdda11f36e2f3ef99dd412a5b7ec78
Author: Mike Black W9MDB <mdb...@ya...>
Date: Fri Aug 13 12:28:58 2021 -0500
Fix CodeQL warnings
diff --git a/rigs/yaesu/ft757gx.c b/rigs/yaesu/ft757gx.c
index 5c9ca6f8..2429017e 100644
--- a/rigs/yaesu/ft757gx.c
+++ b/rigs/yaesu/ft757gx.c
@@ -691,7 +691,7 @@ int ft757_get_update_data(RIG *rig)
unsigned char cmd[YAESU_CMD_LENGTH] = { 0x00, 0x00, 0x00, 0x00, 0x10};
struct ft757_priv_data *priv = (struct ft757_priv_data *)rig->state.priv;
int retval = 0;
- int nbtries ;
+ long nbtries;
/* Maximum number of attempts to ask/read the data. */
int maxtries = rig->state.rigport.retry ;
@@ -723,7 +723,7 @@ int ft757_get_update_data(RIG *rig)
}
rig_debug(RIG_DEBUG_ERR,
- "%s: read update_data failed, %d octets of %d read, retry %d out of %d\n",
+ "%s: read update_data failed, %d octets of %d read, retry %ld out of %d\n",
__func__, retval, FT757GX_STATUS_UPDATE_DATA_LENGTH,
nbtries, maxtries);
/* The delay is quadratic. */
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index a3e608de..bc63e96c 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -2236,7 +2236,7 @@ int newcat_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *offs)
/* chop term */
priv->ret_data[ret_data_len - 1] = '\0';
- *offs = atoi(retoffs) * step;
+ *offs = atol(retoffs) * step;
RETURNFUNC(RIG_OK);
}
diff --git a/rotators/amsat/if100.c b/rotators/amsat/if100.c
index 91e445cb..6d18abde 100644
--- a/rotators/amsat/if100.c
+++ b/rotators/amsat/if100.c
@@ -45,7 +45,7 @@ if100_set_position(ROT *rot, azimuth_t az, elevation_t el)
int az_i;
int el_i;
int dataout, i;
- float az_scale, el_scale;
+ double az_scale, el_scale;
rig_debug(RIG_DEBUG_TRACE, "%s called: %f %f\n", __func__, az, el);
diff --git a/src/misc.c b/src/misc.c
index 15f3d3e8..ad9b9694 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -2351,8 +2351,9 @@ char *date_strget(char *buf, int buflen)
struct tm *mytm;
time_t t;
struct timeval tv;
+ struct tm result;
t = time(NULL);
- mytm = gmtime(&t);
+ mytm = gmtime_r(&t, &result);
strftime(buf, buflen, "%Y-%m-%d:%H:%M:%S.", mytm);
gettimeofday(&tv, NULL);
sprintf(tmp, "%06ld", (long)tv.tv_usec);
diff --git a/src/sprintflst.c b/src/sprintflst.c
index 9ede0bd4..4f43ea19 100644
--- a/src/sprintflst.c
+++ b/src/sprintflst.c
@@ -729,7 +729,7 @@ int rot_sprintf_status(char *str, int nlen, rot_status_t status)
int rig_sprintf_spectrum_modes(char *str, int nlen, const enum rig_spectrum_mode_e *modes)
{
- int i, len = 0;
+ int i, len = 0, lentmp;
*str = '\0';
@@ -749,16 +749,22 @@ int rig_sprintf_spectrum_modes(char *str, int nlen, const enum rig_spectrum_mode
break;
}
- len += snprintf(str + len, nlen - len, "%d=%s ", modes[i], sm);
+ lentmp = snprintf(str + len, nlen - len, "%d=%s ", modes[i], sm);
+ if (len < 0 || lentmp >= nlen - len)
+ {
+ rig_debug(RIG_DEBUG_ERR,"%s(%d): overflowed str buffer\n", __FILE__, __LINE__);
+ break;
+ }
+ len += lentmp;
+
}
- check_buffer_overflow(str, len, nlen);
return len;
}
int rig_sprintf_spectrum_spans(char *str, int nlen, const freq_t *spans)
{
- int i, len = 0;
+ int i, len = 0, lentmp;
*str = '\0';
@@ -769,16 +775,21 @@ int rig_sprintf_spectrum_spans(char *str, int nlen, const freq_t *spans)
break;
}
- len += snprintf(str + len, nlen - len, "%.0f ", spans[i]);
+ lentmp = snprintf(str + len, nlen - len, "%.0f ", spans[i]);
+ if (len < 0 || lentmp >= nlen - len)
+ {
+ rig_debug(RIG_DEBUG_ERR,"%s(%d): overflowed str buffer\n", __FILE__, __LINE__);
+ break;
+ }
+ len += lentmp;
}
- check_buffer_overflow(str, len, nlen);
return len;
}
int rig_sprintf_spectrum_avg_modes(char *str, int nlen, const struct rig_spectrum_avg_mode *avg_modes)
{
- int i, len = 0;
+ int i, len = 0, lentmp;
*str = '\0';
@@ -789,10 +800,15 @@ int rig_sprintf_spectrum_avg_modes(char *str, int nlen, const struct rig_spectru
break;
}
- len += snprintf(str + len, nlen - len, "%d=\"%s\" ", avg_modes[i].id, avg_modes[i].name);
+ lentmp = snprintf(str + len, nlen - len, "%d=\"%s\" ", avg_modes[i].id, avg_modes[i].name);
+ if (len < 0 || lentmp >= nlen - len)
+ {
+ rig_debug(RIG_DEBUG_ERR,"%s(%d): overflowed str buffer\n", __FILE__, __LINE__);
+ break;
+ }
+ len += lentmp;
}
- check_buffer_overflow(str, len, nlen);
return len;
}
commit 269b5f23d6a7d5e26a41043c6d5f48ed78877ea5
Author: Michael Black <mdb...@ya...>
Date: Fri Aug 13 11:56:04 2021 -0500
Create codeql-analysis.yml
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
new file mode 100644
index 00000000..8469eb62
--- /dev/null
+++ b/.github/workflows/codeql-analysis.yml
@@ -0,0 +1,71 @@
+# For most projects, this workflow file will not need changing; you simply need
+# to commit it to your repository.
+#
+# You may wish to alter this file to override the set of languages analyzed,
+# or to provide custom queries or build logic.
+#
+# ******** NOTE ********
+# We have attempted to detect the languages in your repository. Please check
+# the `language` matrix defined below to confirm you have the correct set of
+# supported CodeQL languages.
+#
+name: "CodeQL"
+
+on:
+ push:
+ branches: [ master ]
+ pull_request:
+ # The branches below must be a subset of the branches above
+ branches: [ master ]
+ schedule:
+ - cron: '39 20 * * 6'
+
+jobs:
+ analyze:
+ name: Analyze
+ runs-on: ubuntu-latest
+ permissions:
+ actions: read
+ contents: read
+ security-events: write
+
+ strategy:
+ fail-fast: false
+ matrix:
+ language: [ 'cpp', 'csharp', 'python' ]
+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
+ # Learn more:
+ # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v2
+
+ # Initializes the CodeQL tools for scanning.
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v1
+ with:
+ languages: ${{ matrix.language }}
+ # If you wish to specify custom queries, you can do so here or in a config file.
+ # By default, queries listed here will override any specified in a config file.
+ # Prefix the list here with "+" to use these queries and those in the config file.
+ # queries: ./path/to/local/query, your-org/your-repo/queries@main
+
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
+ # If this step fails, then you should remove it and run the build manually (see below)
+ - name: Autobuild
+ uses: github/codeql-action/autobuild@v1
+
+ # ℹ️ Command-line programs to run using the OS shell.
+ # 📚 https://git.io/JvXDl
+
+ # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
+ # and modify them (or add more) to build your code if your project
+ # uses a compiled language
+
+ #- run: |
+ # make bootstrap
+ # make release
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v1
commit 014bc04ddf7ef18b344acdb91663c58ba5156250
Author: Mike Black W9MDB <mdb...@ya...>
Date: Fri Aug 13 07:42:39 2021 -0500
Fix Icom rigs to use 0x25 command if capable
Fixes #1 and and #2 in the issue
https://github.com/Hamlib/Hamlib/issues/762
diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c
index 3707736f..ea506028 100644
--- a/rigs/icom/icom.c
+++ b/rigs/icom/icom.c
@@ -902,6 +902,7 @@ static int icom_set_default_vfo(RIG *rig)
{
rig_debug(RIG_DEBUG_TRACE, "%s: setting default as MAIN/VFOA\n",
__func__);
+ TRACE;
retval = rig_set_vfo(rig, RIG_VFO_MAIN); // we'll default to Main in this case
if (retval != RIG_OK)
@@ -925,6 +926,7 @@ static int icom_set_default_vfo(RIG *rig)
{
rig_debug(RIG_DEBUG_TRACE, "%s: setting default as MAIN\n",
__func__);
+ TRACE;
retval = rig_set_vfo(rig, RIG_VFO_MAIN); // we'll default to Main in this case
rig->state.current_vfo = RIG_VFO_MAIN;
}
@@ -932,9 +934,14 @@ static int icom_set_default_vfo(RIG *rig)
{
rig_debug(RIG_DEBUG_TRACE, "%s: setting default as VFOA\n",
__func__);
+ TRACE;
+ retval = RIG_OK;
+ if (rig->state.current_vfo != RIG_VFO_A)
+ {
retval = rig_set_vfo(rig,
RIG_VFO_A); // we'll default to VFOA for all others
rig->state.current_vfo = RIG_VFO_A;
+ }
}
else
{
@@ -1009,7 +1016,7 @@ int icom_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
rs = &rig->state;
priv = (struct icom_priv_data *) rs->priv;
- if (rig->state.current_vfo == RIG_VFO_NONE && vfo == RIG_VFO_CURR)
+ if (rig->state.current_vfo == RIG_VFO_NONE)
{
icom_set_default_vfo(rig);
}
@@ -1021,16 +1028,20 @@ int icom_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
rig_strvfo(vfo));
}
- rig_debug(RIG_DEBUG_TRACE, "%s: set_vfo_curr=%s\n", __func__,
+ if (!(rig->caps->targetable_vfo & RIG_TARGETABLE_FREQ))
+ {
+ TRACE;
+ rig_debug(RIG_DEBUG_TRACE, "%s: set_vfo_curr=%s\n", __func__,
rig_strvfo(rig->state.current_vfo));
- retval = set_vfo_curr(rig, vfo, rig->state.current_vfo);
+ retval = set_vfo_curr(rig, vfo, rig->state.current_vfo);
- if (retval != RIG_OK)
- {
- RETURNFUNC(retval);
+ if (retval != RIG_OK)
+ {
+ RETURNFUNC(retval);
+ }
}
- retval = rig_get_freq(rig, RIG_VFO_CURR, &curr_freq);
+ retval = rig_get_freq(rig, vfo, &curr_freq);
if (retval != RIG_OK)
{
@@ -1043,10 +1054,37 @@ int icom_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
*/
to_bcd(freqbuf, freq, freq_len * 2);
- cmd = C_SET_FREQ;
- subcmd = -1;
- retval = icom_transaction(rig, cmd, subcmd, freqbuf, freq_len, ackbuf,
+ // mike
+ if (rig->caps->targetable_vfo & RIG_TARGETABLE_FREQ)
+ {
+ vfo_t vfo_unselected = RIG_VFO_B | RIG_VFO_SUB | RIG_VFO_SUB_B | RIG_VFO_MAIN_B;
+ // if we are on the "other" vfo already then we have to allow for that
+ if (rig->state.current_vfo & vfo_unselected)
+ {
+ TRACE;
+ vfo_unselected = RIG_VFO_A | RIG_VFO_MAIN | RIG_VFO_SUB_A | RIG_VFO_MAIN_A;
+ }
+
+ rig_debug(RIG_DEBUG_VERBOSE, "%s(%d): vfo=%s, currvfo=%s\n", __func__, __LINE__, rig_strvfo(vfo), rig_strvfo(rig->state.current_vfo));
+ subcmd = 0x00;
+ // if we ask for unselected but we're not on unselected subcmd2 changes
+ if ((vfo & vfo_unselected) && !(rig->state.current_vfo & vfo_unselected))
+ {
+ TRACE;
+ subcmd = 0x01; // get unselected VFO
+ }
+
+ cmd = 0x25;
+ retval = icom_transaction(rig, cmd, subcmd, freqbuf, freq_len, ackbuf,
&ack_len);
+ }
+ else
+ {
+ cmd = C_SET_FREQ;
+ subcmd = -1;
+ retval = icom_transaction(rig, cmd, subcmd, freqbuf, freq_len, ackbuf,
+ &ack_len);
+ }
hl_usleep(50 * 1000); // pause for transceive message and we'll flush it
if (retval != RIG_OK)
@@ -1677,6 +1715,48 @@ int icom_set_dsp_flt(RIG *rig, rmode_t mode, pbwidth_t width)
RETURNFUNC(RIG_OK);
}
+static int icom_set_mode_x26(RIG *rig, vfo_t vfo, rmode_t mode, int datamode, int filter)
+{
+ struct icom_priv_data *priv = rig->state.priv;
+ int retval;
+ unsigned char buf[3];
+
+ ENTERFUNC;
+ if (priv->x26cmdfails) RETURNFUNC(-RIG_ENAVAIL);
+
+ int cmd2 = 0x26;
+ int subcmd2 = 0x00;
+ vfo_t vfo_unselected = RIG_VFO_B | RIG_VFO_SUB | RIG_VFO_SUB_B | RIG_VFO_MAIN_B;
+ // if we are on the "other" vfo already then we have to allow for that
+ if (rig->state.current_vfo & vfo_unselected)
+ {
+ vfo_unselected = RIG_VFO_A | RIG_VFO_MAIN | RIG_VFO_SUB_A | RIG_VFO_MAIN_A;
+ }
+
+ // if we ask for unselected but we're not on unselected subcmd2 changes
+ if ((vfo & vfo_unselected) && !(rig->state.current_vfo & vfo_unselected))
+ {
+ subcmd2 = 0x01; // get unselected VFO
+ }
+ buf[0] = mode;
+ buf[1] = datamode;
+ // filter fixed to filter 1 due to IC7300 bug defaulting to filter 2 on mode changed -- yuck!!
+ // buf[2] = filter // if Icom ever fixed this
+ buf[2] = 1;
+
+ retval = icom_transaction(rig, cmd2, subcmd2, buf, 3, NULL, NULL);
+
+ if (retval != RIG_OK)
+ {
+ priv->x26cmdfails = 1;
+ rig_debug(RIG_DEBUG_WARN,
+ "%s: rig does not support 0x26 CI-V cmd\n", __func__);
+ return -RIG_ENAVAIL;
+ }
+
+ RETURNFUNC(RIG_OK);
+}
+
/*
* icom_set_mode_with_data
*/
@@ -1687,6 +1767,7 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode,
unsigned char ackbuf[MAXFRAMELEN];
int ack_len = sizeof(ackbuf);
rmode_t icom_mode;
+ //struct icom_priv_data *priv = (struct icom_priv_data *) rig->state.priv;
unsigned char dm_sub_cmd =
rig->caps->rig_model == RIG_MODEL_IC7200 ? 0x04 : S_MEM_DATA_MODE;
int filter_byte = rig->caps->rig_model == RIG_MODEL_IC7100
@@ -1728,8 +1809,8 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode,
break;
}
- rig_debug(RIG_DEBUG_VERBOSE, "%s mode=%d, width=%d\n", __func__, (int)icom_mode,
- (int)width);
+ rig_debug(RIG_DEBUG_VERBOSE, "%s mode=%d, width=%d, curr_vfo=%s\n", __func__, (int)icom_mode,
+ (int)width, rig_strvfo(rig->state.current_vfo));
retval = icom_set_mode(rig, vfo, icom_mode, width);
hl_usleep(50 * 1000); // pause for possible transceive message which we'll flush
@@ -1739,21 +1820,21 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode,
unsigned char datamode[2];
unsigned char mode_icom; // Not used, we only need the width
signed char width_icom;
-
+
+ TRACE;
switch (mode)
{
case RIG_MODE_PKTUSB:
case RIG_MODE_PKTLSB:
case RIG_MODE_PKTFM:
case RIG_MODE_PKTAM:
- /* some rigs (e.g. IC-7700 & IC-7800)
- have D1/2/3 but we cannot know
- which to set so just set D1 */
datamode[0] = 0x01;
+ datamode[1] = 0x01; // default to filter 1
break;
default:
datamode[0] = 0x00;
+ datamode[1] = 0x01; // default to filter 1
break;
}
@@ -1761,13 +1842,20 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode,
if (filter_byte) // then we need the filter width byte too
{
- if (width_icom == -1) datamode[1] = 1; // default to filter 1
- else datamode[1] = width_icom;
- retval =
+ TRACE;
+ if (datamode[0] == 0) datamode[1]=0; // the only good combo possible according to manual
+
+ rig_debug(RIG_DEBUG_TRACE, "%s(%d) mode_icom=%d, datamode[0]=%d, filter=%d\n", __func__, __LINE__, mode_icom, datamode[0], datamode[1]);
+ retval = icom_set_mode_x26(rig, vfo, mode_icom, datamode[0], datamode[1]);
+ if (retval != RIG_OK)
+ {
+ retval =
icom_transaction(rig, C_CTL_MEM, dm_sub_cmd, datamode, 2, ackbuf, &ack_len);
+ }
}
else
{
+ TRACE;
retval =
icom_transaction(rig, C_CTL_MEM, dm_sub_cmd, datamode, 1, ackbuf, &ack_len);
}
@@ -1805,9 +1893,10 @@ int icom_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
unsigned char icmode;
signed char icmode_ext;
int ack_len = sizeof(ackbuf), retval, err;
+ int swapvfos = 0;
- rig_debug(RIG_DEBUG_VERBOSE, "%s called vfo=%s, mode=%s, width=%d\n", __func__,
- rig_strvfo(vfo), rig_strrmode(mode), (int)width);
+ rig_debug(RIG_DEBUG_VERBOSE, "%s called vfo=%s, mode=%s, width=%d, current_vfo=%s\n", __func__,
+ rig_strvfo(vfo), rig_strrmode(mode), (int)width, rig_strvfo(rig->state.current_vfo));
rs = &rig->state;
priv = (struct icom_priv_data *) rs->priv;
@@ -1845,12 +1934,28 @@ int icom_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
icmode_ext = -1;
}
+ // some Icom rigs have seperate modes for VFOB/Sub
+ // switching to VFOB should not matter for the other rigs
+ // This needs to be improved for RIG_TARGETABLE_MODE rigs
+ if ((vfo == RIG_VFO_B || vfo == RIG_VFO_SUB) && ((rig->state.current_vfo == RIG_VFO_A || rig->state.current_vfo == RIG_VFO_MAIN) || rig->state.current_vfo == RIG_VFO_CURR))
+ {
+ TRACE;
+ swapvfos = 1;
+ rig_set_vfo(rig,RIG_VFO_B);
+ }
+
rig_debug(RIG_DEBUG_VERBOSE, "%s: #2 icmode=%d, icmode_ext=%d\n", __func__,
icmode, icmode_ext);
retval = icom_transaction(rig, C_SET_MODE, icmode,
(unsigned char *) &icmode_ext,
(icmode_ext == -1 ? 0 : 1), ackbuf, &ack_len);
+ if (swapvfos)
+ {
+ TRACE;
+ rig_set_vfo(rig,RIG_VFO_A);
+ }
+
if (retval != RIG_OK)
{
RETURNFUNC(retval);
@@ -2125,6 +2230,7 @@ int icom_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
{
rig_debug(RIG_DEBUG_TRACE, "%s(%d): forcing default VFO_A\n", __func__,
__LINE__);
+ TRACE;
rig_set_vfo(rig, RIG_VFO_A); // force VFOA
}
@@ -2147,8 +2253,10 @@ int icom_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
if (vfosave != vfo)
{
// right now forcing VFOA/B arrangement -- reverse not supported yet
- TRACE;
- rig_set_vfo(rig, RIG_VFO_B);
+ // If VFOB width is ever different than VFOA
+ // we need to figure out how to read VFOB without swapping VFOs
+ //TRACE;
+ //rig_set_vfo(rig, RIG_VFO_B);
retval = icom_get_dsp_flt(rig, *mode);
*width = retval;
@@ -2159,7 +2267,8 @@ int icom_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
rig->state.cache.widthMainB = retval;
rig_debug(RIG_DEBUG_TRACE, "%s(%d): vfosave=%s, currvfo=%s\n", __func__,
__LINE__, rig_strvfo(vfo), rig_strvfo(rig->state.current_vfo));
- rig_set_vfo(rig, RIG_VFO_A);
+ //TRACE;
+ //rig_set_vfo(rig, RIG_VFO_A);
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s returning mode=%s, width=%d\n", __func__,
rig_strvfo(vfo), rig_strrmode(*mode), (int)*width);
}
@@ -4897,7 +5006,8 @@ int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
rig_debug(RIG_DEBUG_TRACE, "%s: rx_vfo=%s, tx_vfo=%s\n", __func__,
rig_strvfo(rx_vfo), rig_strvfo(tx_vfo));
- if (RIG_OK != (retval = rig_set_vfo(rig, tx_vfo)))
+ TRACE;
+ if (!(rig->caps->targetable_vfo & RIG_TARGETABLE_FREQ) && RIG_OK != (retval = rig_set_vfo(rig, tx_vfo)))
{
RETURNFUNC(retval);
}
@@ -4915,13 +5025,15 @@ int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
__func__,
priv->split_on, rig_strvfo(rx_vfo));
- if (RIG_OK != (retval = rig_set_vfo(rig, rx_vfo)))
+ TRACE;
+ if (!(rig->caps->targetable_vfo & RIG_TARGETABLE_FREQ) && RIG_OK != (retval = rig_set_vfo(rig, rx_vfo)))
{
RETURNFUNC(retval);
}
}
else if (RIG_OK != (retval = rig_set_vfo(rig, rx_vfo)))
{
+ TRACE;
RETURNFUNC(retval);
}
@@ -5138,6 +5250,7 @@ int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
rig_debug(RIG_DEBUG_TRACE, "%s: SATMODE rig so returning vfo to %s\n", __func__,
rig_strvfo(rx_vfo));
+ TRACE;
if (RIG_OK != (retval = rig_set_vfo(rig, rx_vfo)))
{
RETURNFUNC(retval);
@@ -5145,6 +5258,7 @@ int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
}
else if (RIG_OK != (retval = rig_set_vfo(rig, rx_vfo)))
{
+ TRACE;
RETURNFUNC(retval);
}
@@ -5254,7 +5368,8 @@ int icom_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode,
RETURNFUNC(retval);
}
- if (RIG_OK != (retval = rig_set_vfo(rig, rx_vfo)))
+ TRACE;
+ if (!(rig->caps->targetable_vfo & RIG_TARGETABLE_MODE) && RIG_OK != (retval = rig_set_vfo(rig, rx_vfo)))
{
RETURNFUNC(retval);
}
@@ -5365,6 +5480,7 @@ int icom_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode,
RETURNFUNC(retval);
}
+ TRACE;
if (RIG_OK != (retval = rig_set_vfo(rig, rx_vfo)))
{
RETURNFUNC(retval);
@@ -5515,6 +5631,7 @@ int icom_set_split_freq_mode(RIG *rig, vfo_t vfo, freq_t tx_freq,
RETURNFUNC(retval);
}
+ TRACE;
if (!(rig->caps->targetable_vfo & RIG_TARGETABLE_MODE) && RIG_OK != (retval = rig_set_vfo(rig, tx_vfo)))
{
RETURNFUNC(retval);
@@ -5526,6 +5643,7 @@ int icom_set_split_freq_mode(RIG *rig, vfo_t vfo, freq_t tx_freq,
RETURNFUNC(retval);
}
+ TRACE;
if (!(rig->caps->targetable_vfo & RIG_TARGETABLE_MODE) && RIG_OK != (retval = rig_set_vfo(rig, rx_vfo)))
{
RETURNFUNC(retval);
@@ -5647,6 +5765,7 @@ int icom_get_split_freq_mode(RIG *rig, vfo_t vfo, freq_t *tx_freq,
RETURNFUNC(retval);
}
+ TRACE;
if (RIG_OK != (retval = rig_set_vfo(rig, rx_vfo)))
{
RETURNFUNC(retval);
@@ -8567,6 +8686,7 @@ static int set_vfo_curr(RIG *rig, vfo_t vfo, vfo_t curr_vfo)
{
rig_debug(RIG_DEBUG_TRACE, "%s: setting new vfo=%s\n", __func__,
rig_strvfo(vfo));
+ TRACE;
retval = rig_set_vfo(rig, vfo);
if (retval != RIG_OK)
diff --git a/rigs/icom/icom.h b/rigs/icom/icom.h
index 11dbcd23..606e271c 100644
--- a/rigs/icom/icom.h
+++ b/rigs/icom/icom.h
@@ -30,7 +30,7 @@
#include <sys/time.h>
#endif
-#define BACKEND_VER "20210801"
+#define BACKEND_VER "20210812"
#define ICOM_IS_SECONDARY_VFO(vfo) ((vfo) & (RIG_VFO_B | RIG_VFO_SUB | RIG_VFO_SUB_B | RIG_VFO_MAIN_B))
#define ICOM_GET_VFO_NUMBER(vfo) (ICOM_IS_SECONDARY_VFO(vfo) ? 0x01 : 0x00)
@@ -258,6 +258,7 @@ struct icom_priv_data
freq_t vfoa_freq; /*!< Track last setting of vfoa -- used to return last freq when ptt is asserted */
freq_t vfob_freq; /*!< Track last setting of vfob -- used to return last freq when ptt is asserted */
int x25cmdfails; /*!< This will get set if the 0x25 command fails so we try just once */
+ int x26cmdfails; /*!< This will get set if the 0x26 command fails so we try just once */
int x1cx03cmdfails; /*!< This will get set if the 0x1c 0x03 command fails so we try just once */
int poweron; /*!< To prevent powering on more than once */
unsigned char filter; /*!< Current filter selected */
diff --git a/src/rig.c b/src/rig.c
index c4d5da70..28043dd9 100644
--- a/src/rig.c
+++ b/src/rig.c
@@ -1036,10 +1036,11 @@ int HAMLIB_API rig_open(RIG *rig)
}
else // vfo fails so set some sensible defaults
{
- int backend_num = RIG_BACKEND_NUM(rig->caps->rig_model);
+ //int backend_num = RIG_BACKEND_NUM(rig->caps->rig_model);
rs->tx_vfo = RIG_VFO_TX;
rs->current_vfo = RIG_VFO_CURR;
+#if 0 // done in the back end
if (backend_num == RIG_ICOM)
{
TRACE;
@@ -1047,7 +1048,8 @@ int HAMLIB_API rig_open(RIG *rig)
rig_debug(RIG_DEBUG_TRACE, "%s: Icom rig so default vfo = %s\n", __func__,
rig_strvfo(rs->current_vfo));
}
- else if (rig->caps->set_vfo == NULL)
+#endif
+ if (rig->caps->set_vfo == NULL)
{
// for non-Icom rigs if there's no set_vfo then we need to set one
rs->current_vfo = vfo_fixup(rig, RIG_VFO_A, rig->state.cache.split);
@@ -2587,14 +2589,23 @@ pbwidth_t HAMLIB_API rig_passband_wide(RIG *rig, rmode_t mode)
*
* \sa rig_get_vfo()
*/
+#if BUILTINFUNC
+#undef rig_set_vfo
+int HAMLIB_API rig_set_vfo(RIG *rig, vfo_t vfo, const char *func)
+#else
int HAMLIB_API rig_set_vfo(RIG *rig, vfo_t vfo)
+#endif
{
const struct rig_caps *caps;
int retcode;
freq_t curr_freq;
ENTERFUNC;
+#if BUILTINFUNC
+ rig_debug(RIG_DEBUG_VERBOSE, "%s called vfo=%s, called from %s\n", __func__, rig_strvfo(vfo),func);
+#else
rig_debug(RIG_DEBUG_VERBOSE, "%s called vfo=%s\n", __func__, rig_strvfo(vfo));
+#endif
if (vfo == RIG_VFO_B || vfo == RIG_VFO_SUB)
{
@@ -2647,7 +2658,7 @@ int HAMLIB_API rig_set_vfo(RIG *rig, vfo_t vfo)
TRACE;
vfo_t vfo_save = rig->state.current_vfo;
- rig->state.current_vfo = vfo;
+ if (vfo != RIG_VFO_CURR) rig->state.current_vfo = vfo;
retcode = caps->set_vfo(rig, vfo);
if (retcode == RIG_OK)
@@ -3782,7 +3793,9 @@ int HAMLIB_API rig_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
if (caps->set_vfo)
{
TRACE;
- retcode = caps->set_vfo(rig, tx_vfo);
+ retcode = RIG_OK;
+ if (!(caps->targetable_vfo & RIG_TARGETABLE_FREQ))
+ retcode = caps->set_vfo(rig, tx_vfo);
}
else if (rig_has_vfo_op(rig, RIG_OP_TOGGLE) && caps->vfo_op)
{
@@ -3825,7 +3838,9 @@ int HAMLIB_API rig_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
if (caps->set_vfo)
{
TRACE;
- rc2 = caps->set_vfo(rig, curr_vfo);
+ rc2 = RIG_OK;
+ if (!(caps->targetable_vfo & RIG_TARGETABLE_FREQ))
+ rc2 = caps->set_vfo(rig, curr_vfo);
}
else
{
@@ -4439,7 +4454,7 @@ int HAMLIB_API rig_set_split_vfo(RIG *rig,
RETURNFUNC(-RIG_ENAVAIL);
}
- vfo = vfo_fixup(rig, vfo, split);
+ vfo = vfo_fixup(rig, tx_vfo, split);
if (vfo != RIG_VFO_A && vfo != RIG_VFO_B)
{
@@ -4447,7 +4462,12 @@ int HAMLIB_API rig_set_split_vfo(RIG *rig,
}
// set rig to the the requested RX VFO
TRACE;
- rig_set_vfo(rig, vfo == RIG_VFO_B?RIG_VFO_B:RIG_VFO_A);
+ if (!(caps->targetable_vfo & RIG_TARGETABLE_FREQ))
+#if BUILTINFUNC
+ rig_set_vfo(rig, vfo == RIG_VFO_B?RIG_VFO_B:RIG_VFO_A, __builtin_FUNCTION());
+#else
+ rig_set_vfo(rig, vfo == RIG_VFO_B?RIG_VFO_B:RIG_VFO_A);
+#endif
if (vfo == RIG_VFO_CURR
|| vfo == rig->state.current_vfo)
@@ -4473,24 +4493,29 @@ int HAMLIB_API rig_set_split_vfo(RIG *rig,
curr_vfo = rig->state.current_vfo;
TRACE;
- retcode = caps->set_vfo(rig, vfo);
+ if (!(caps->targetable_vfo & RIG_TARGETABLE_FREQ))
+ {
+ retcode = caps->set_vfo(rig, vfo);
if (retcode != RIG_OK)
{
RETURNFUNC(retcode);
}
+ }
TRACE;
retcode = caps->set_split_vfo(rig, vfo, split, tx_vfo);
/* try and revert even if we had an error above */
- rc2 = caps->set_vfo(rig, curr_vfo);
+ if (!(caps->targetable_vfo & RIG_TARGETABLE_FREQ)) {
+ rc2 = caps->set_vfo(rig, curr_vfo);
if (RIG_OK == retcode)
{
/* return the first error code */
retcode = rc2;
}
+ }
if (retcode == RIG_OK)
{
commit ad43cd793a446e26fa2cf15b19cdc7ac2edfd81d
Author: Mike Black W9MDB <mdb...@ya...>
Date: Wed Aug 11 23:10:44 2021 -0500
Fix MULTICAST boolean logic
diff --git a/src/network.c b/src/network.c
index ee86eca9..aa56f8ef 100644
--- a/src/network.c
+++ b/src/network.c
@@ -572,13 +572,13 @@ int network_multicast_server(RIG *rig, const char *multicast_addr,
if (status != RIG_OK) { RETURNFUNC(status); }
- if (items && RIG_MULTICAST_TRANSCEIVE)
+ if (items & RIG_MULTICAST_TRANSCEIVE)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s(%d) MULTICAST_TRANSCEIVE enabled\n", __FILE__,
__LINE__);
}
- if (items && RIG_MULTICAST_SPECTRUM)
+ if (items & RIG_MULTICAST_SPECTRUM)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s(%d) MULTICAST_SPECTRUM enabled\n", __FILE__,
__LINE__);
commit 3baa9da83964df0ff75e564300a43551e60415b5
Author: Mike Black W9MDB <mdb...@ya...>
Date: Mon Aug 9 16:23:17 2021 -0500
Add a 2nd try on kenwood.c ID command -- TS450S was failing on 1st try
diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c
index 2c416f84..f6681ee9 100644
--- a/rigs/kenwood/kenwood.c
+++ b/rigs/kenwood/kenwood.c
@@ -762,6 +762,12 @@ int kenwood_open(RIG *rig)
id[0] = 0;
rig->state.rigport.retry = 0;
err = kenwood_get_id(rig, id);
+ if (err != RIG_OK)
+ {
+ // TS450S is flaky on the 1st ID call so we'll try again
+ hl_usleep(200*1000);
+ err = kenwood_get_id(rig, id);
+ }
if (err == RIG_OK) // some rigs give ID while in standby
{
@@ -792,7 +798,7 @@ int kenwood_open(RIG *rig)
if (RIG_OK != err)
{
rig_debug(RIG_DEBUG_ERR,
- "%s: no response to get_id from rig...continuing anyways.\n", __func__);
+ "%s: no response to get_id from rig...continuing anyway\n", __func__);
}
if (RIG_IS_TS2000
diff --git a/rigs/kenwood/kenwood.h b/rigs/kenwood/kenwood.h
index 74186ce3..f00b156f 100644
--- a/rigs/kenwood/kenwood.h
+++ b/rigs/kenwood/kenwood.h
@@ -28,7 +28,7 @@
#include "token.h"
#include "misc.h"
-#define BACKEND_VER "20210804"
+#define BACKEND_VER "20210809"
#define EOM_KEN ';'
#define EOM_TH '\r'
commit 45d1162362c67858e2943ec71104bd12d3be0eee
Author: Mike Black W9MDB <mdb...@ya...>
Date: Mon Aug 9 08:46:05 2021 -0500
Improve debug message in iofunc.c on serial port error
diff --git a/src/iofunc.c b/src/iofunc.c
index 90cb9dc9..582c7424 100644
--- a/src/iofunc.c
+++ b/src/iofunc.c
@@ -76,7 +76,7 @@ int HAMLIB_API port_open(hamlib_port_t *p)
if (status < 0)
{
- rig_debug(RIG_DEBUG_ERR, "%s: serial_open status=%d\n", __func__, status);
+ rig_debug(RIG_DEBUG_ERR, "%s: serial_open(%s) status=%d\n", __func__, p->pathname, status);
RETURNFUNC(status);
}
commit 1a64f26ea0a9e9e1c52f86b962b0729510744ae6
Author: Mike Black W9MDB <mdb...@ya...>
Date: Sun Aug 8 16:43:05 2021 -0500
Add RETURNFUNC in register to see timing
diff --git a/src/register.c b/src/register.c
index 878a1de6..ff4ef5e2 100644
--- a/src/register.c
+++ b/src/register.c
@@ -40,6 +40,7 @@
#include <register.h>
#include <hamlib/rig.h>
+#include "misc.h"
//! @cond Doxygen_Suppress
#ifndef PATH_MAX
@@ -221,7 +222,7 @@ int HAMLIB_API rig_register(const struct rig_caps *caps)
p->next = rig_hash_table[hval];
rig_hash_table[hval] = p;
- return RIG_OK;
+ RETURNFUNC(RIG_OK);
}
//! @endcond
commit daf09e3ea5d0b30fffa42032460510a72ba8d1d7
Author: Mike Black W9MDB <mdb...@ya...>
Date: Sun Aug 8 12:40:43 2021 -0500
Fix rig.h again
diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h
index d23e098e..b5d8a891 100644
--- a/include/hamlib/rig.h
+++ b/include/hamlib/rig.h
@@ -2493,7 +2493,7 @@ rig_set_vfo HAMLIB_PARAMS((RIG *rig,
#else
extern HAMLIB_EXPORT(int)
rig_set_vfo HAMLIB_PARAMS((RIG *rig,
- vfo_t vfo);
+ vfo_t vfo));
#endif
extern HAMLIB_EXPORT(int)
rig_get_vfo HAMLIB_PARAMS((RIG *rig,
commit ca33e9777bfff3509a070e6068a5fc03f4959ea7
Author: Mike Black W9MDB <mdb...@ya...>
Date: Sun Aug 8 12:37:47 2021 -0500
Fix rig.h
diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h
index 2f4109e2..d23e098e 100644
--- a/include/hamlib/rig.h
+++ b/include/hamlib/rig.h
@@ -2491,6 +2491,7 @@ extern HAMLIB_EXPORT(int)
rig_set_vfo HAMLIB_PARAMS((RIG *rig,
vfo_t vfo, const char *func));
#else
+extern HAMLIB_EXPORT(int)
rig_set_vfo HAMLIB_PARAMS((RIG *rig,
vfo_t vfo);
#endif
commit 72c6f22c28a0747f07673eeb70a80fbd9bf0a9c5
Author: Mike Black W9MDB <mdb...@ya...>
Date: Sun Aug 8 12:35:24 2021 -0500
Comment out rig_set_vfo change until ready for primetime
diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h
index d2d97c00..2f4109e2 100644
--- a/include/hamlib/rig.h
+++ b/include/hamlib/rig.h
@@ -2485,10 +2485,15 @@ rig_get_mode HAMLIB_PARAMS((RIG *rig,
rmode_t *mode,
pbwidth_t *width));
+#if 0
#define rig_set_vfo(r,v) rig_set_vfo(r,v,__builtin_FUNCTION())
extern HAMLIB_EXPORT(int)
rig_set_vfo HAMLIB_PARAMS((RIG *rig,
vfo_t vfo, const char *func));
+#else
+rig_set_vfo HAMLIB_PARAMS((RIG *rig,
+ vfo_t vfo);
+#endif
extern HAMLIB_EXPORT(int)
rig_get_vfo HAMLIB_PARAMS((RIG *rig,
vfo_t *vfo));
commit be5b98eb8b6c87a80fa2b3d66c48f70f6b878571
Author: Mike Black W9MDB <mdblack98@...
[truncated message content] |
|
From: Nate B. <n0...@us...> - 2021-06-10 11:21: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 37b16fa283602f176fd7b82d1e095b356b1ac957 (commit)
via e427262a89791b345a47f15c48d8abee045f64be (commit)
via fcb2529ed0614ef2c4b2eeab0cff5bfe68895497 (commit)
via 976ba6df02f892e5f30366a0c7fa60c6cbd1ca6b (commit)
via 540ca9cce31cedf8101448c9b283172cef606daf (commit)
via 9d7e1651b2026a7d7c5137b8c98e2d486285577a (commit)
via 840333266f349a01c7d281a923d0732c6f6feb8c (commit)
via ff9a745c7a716791d58932ed6b82036823094ab7 (commit)
via b65fdb61f889b2f22783033a290a1e9ff29bca4a (commit)
via a73046b04e183661e0ffd8e033aea2c552d582fc (commit)
via f41bcaa71af6538679b212ed8f5e0c6dbe447f5b (commit)
via 7d8e99ca2da8ced2b162cf3ee2caaa0bdc233b63 (commit)
from 53476dd14df76edbff6013cd36c1cad0927e5ac0 (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 37b16fa283602f176fd7b82d1e095b356b1ac957
Author: Mike Black W9MDB <mdb...@ya...>
Date: Mon Jun 7 09:32:57 2021 -0500
Improved FLRig error message when requesting a mode that FLRig does not have
diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c
index fa72bcb6..5f3b8024 100644
--- a/rigs/dummy/flrig.c
+++ b/rigs/dummy/flrig.c
@@ -144,7 +144,7 @@ const struct rig_caps flrig_caps =
RIG_MODEL(RIG_MODEL_FLRIG),
.model_name = "FLRig",
.mfg_name = "FLRig",
- .version = "20210511",
+ .version = "20210607",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,
@@ -674,7 +674,7 @@ static const char *modeMapGetFLRig(rmode_t modeHamlib)
"%s: checking modeMap[%d]=%.0f to modeHamlib=%.0f, mode_flrig='%s'\n", __func__,
i, (double)modeMap[i].mode_hamlib, (double)modeHamlib, modeMap[i].mode_flrig);
- if (modeMap[i].mode_hamlib == modeHamlib)
+ if (modeMap[i].mode_hamlib == modeHamlib && strlen(modeMap[i].mode_flrig) > 0)
{
rig_debug(RIG_DEBUG_TRACE, "%s matched mode=%.0f, returning '%s'\n", __func__,
(double)modeHamlib, modeMap[i].mode_flrig);
@@ -682,7 +682,7 @@ static const char *modeMapGetFLRig(rmode_t modeHamlib)
}
}
- rig_debug(RIG_DEBUG_ERR, "%s: Unknown mode requested: %s\n", __func__,
+ rig_debug(RIG_DEBUG_ERR, "%s: FlRig does not have mode: %s\n", __func__,
rig_strrmode(modeHamlib));
return ("ERROR");
}
commit e427262a89791b345a47f15c48d8abee045f64be
Author: Mike Black W9MDB <mdb...@ya...>
Date: Sun Jun 6 23:02:55 2021 -0500
Promote thd74 to stable
diff --git a/rigs/kenwood/thd74.c b/rigs/kenwood/thd74.c
index c47991fd..4af4a7cb 100644
--- a/rigs/kenwood/thd74.c
+++ b/rigs/kenwood/thd74.c
@@ -1645,7 +1645,7 @@ const struct rig_caps thd74_caps =
.mfg_name = "Kenwood",
.version = BACKEND_VER ".2",
.copyright = "LGPL",
- .status = RIG_STATUS_BETA,
+ .status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_HANDHELD | RIG_FLAG_APRS | RIG_FLAG_TNC | RIG_FLAG_DXCLUSTER,
.ptt_type = RIG_PTT_RIG,
.dcd_type = RIG_DCD_RIG,
commit fcb2529ed0614ef2c4b2eeab0cff5bfe68895497
Author: Mike Black W9MDB <mdb...@ya...>
Date: Sun Jun 6 07:57:33 2021 -0500
Have thd74.c call kenwood_open
https://github.com/Hamlib/Hamlib/issues/718
diff --git a/rigs/kenwood/thd74.c b/rigs/kenwood/thd74.c
index 8205c574..c47991fd 100644
--- a/rigs/kenwood/thd74.c
+++ b/rigs/kenwood/thd74.c
@@ -1643,7 +1643,7 @@ const struct rig_caps thd74_caps =
RIG_MODEL(RIG_MODEL_THD74),
.model_name = "TH-D74",
.mfg_name = "Kenwood",
- .version = BACKEND_VER ".1",
+ .version = BACKEND_VER ".2",
.copyright = "LGPL",
.status = RIG_STATUS_BETA,
.rig_type = RIG_TYPE_HANDHELD | RIG_FLAG_APRS | RIG_FLAG_TNC | RIG_FLAG_DXCLUSTER,
@@ -1727,7 +1727,7 @@ const struct rig_caps thd74_caps =
.rig_init = kenwood_init,
.rig_cleanup = kenwood_cleanup,
- .rig_open = thd74_open,
+ .rig_open = kenwood_open,
.set_freq = thd74_set_freq,
.get_freq = thd74_get_freq,
.set_mode = thd74_set_mode,
commit 976ba6df02f892e5f30366a0c7fa60c6cbd1ca6b
Author: Mike Black W9MDB <mdb...@ya...>
Date: Sat Jun 5 22:23:57 2021 -0500
Add small delay in flex6xxx.c after ptt off -- seems to take a short while to really do it for the ANAN rigs
diff --git a/rigs/kenwood/flex6xxx.c b/rigs/kenwood/flex6xxx.c
index 4fca044b..1fcea374 100644
--- a/rigs/kenwood/flex6xxx.c
+++ b/rigs/kenwood/flex6xxx.c
@@ -631,6 +631,7 @@ int flex6k_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
if (ptt_cmd[4] != response[4])
{
rig_debug(RIG_DEBUG_ERR, "%s: %s != %s\n", __func__, ptt_cmd, response);
+ hl_usleep(20*1000); // takes a bit to do PTT off
}
}
while (ptt_cmd[4] != response[4] && --retry);
@@ -1206,7 +1207,7 @@ const struct rig_caps powersdr_caps =
RIG_MODEL(RIG_MODEL_POWERSDR),
.model_name = "PowerSDR/Thetis",
.mfg_name = "FlexRadio/ANAN",
- .version = "20210527.0",
+ .version = "20210605.0",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,
commit 540ca9cce31cedf8101448c9b283172cef606daf
Author: Mike Black W9MDB <mdb...@ya...>
Date: Sat Jun 5 16:54:53 2021 -0500
Remove empty cmd from thd74.c and bump up to beta
https://github.com/Hamlib/Hamlib/issues/718
diff --git a/rigs/kenwood/thd74.c b/rigs/kenwood/thd74.c
index 86333c1e..8205c574 100644
--- a/rigs/kenwood/thd74.c
+++ b/rigs/kenwood/thd74.c
@@ -161,13 +161,14 @@ static struct kenwood_priv_caps thd74_priv_caps =
int thd74_open(RIG *rig)
{
- int ret;
- struct kenwood_priv_data *priv = rig->state.priv;
- strcpy(priv->verify_cmd, "ID\r");
+ //int ret;
+ //struct kenwood_priv_data *priv = rig->state.priv;
+ // this is already done in kenwood_init
+ //strcpy(priv->verify_cmd, "ID\r");
- ret = kenwood_transaction(rig, "", NULL, 0);
+ //ret = kenwood_transaction(rig, "", NULL, 0);
- return ret;
+ return RIG_OK;
}
@@ -1642,9 +1643,9 @@ const struct rig_caps thd74_caps =
RIG_MODEL(RIG_MODEL_THD74),
.model_name = "TH-D74",
.mfg_name = "Kenwood",
- .version = BACKEND_VER ".0",
+ .version = BACKEND_VER ".1",
.copyright = "LGPL",
- .status = RIG_STATUS_ALPHA,
+ .status = RIG_STATUS_BETA,
.rig_type = RIG_TYPE_HANDHELD | RIG_FLAG_APRS | RIG_FLAG_TNC | RIG_FLAG_DXCLUSTER,
.ptt_type = RIG_PTT_RIG,
.dcd_type = RIG_DCD_RIG,
commit 9d7e1651b2026a7d7c5137b8c98e2d486285577a
Merge: ff9a745c 84033326
Author: Michael Black <mdb...@ya...>
Date: Sat Jun 5 14:21:40 2021 -0500
Merge pull request #719 from mikaelnousiainen/add-spectrum-data-for-dummy-rig
Add spectrum scope caps for dummy rig
commit 840333266f349a01c7d281a923d0732c6f6feb8c
Author: Mikael Nousiainen <mik...@ik...>
Date: Sat Jun 5 21:48:10 2021 +0300
Add spectrum scope caps for dummy rig. Fix duplicate definition for IC-785x.
diff --git a/rigs/dummy/dummy.c b/rigs/dummy/dummy.c
index 1d6b5b55..2befa183 100644
--- a/rigs/dummy/dummy.c
+++ b/rigs/dummy/dummy.c
@@ -1059,8 +1059,6 @@ static int dummy_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
if (RIG_LEVEL_IS_FLOAT(level))
{
- if (val.f > 1.0) { RETURNFUNC(-RIG_EINVAL); }
-
sprintf(lstr, "%f", val.f);
}
else
@@ -2139,7 +2137,7 @@ struct rig_caps dummy_caps =
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_OTHER,
- .targetable_vfo = RIG_TARGETABLE_PTT | RIG_TARGETABLE_RITXIT | RIG_TARGETABLE_FREQ | RIG_TARGETABLE_MODE,
+ .targetable_vfo = RIG_TARGETABLE_PTT | RIG_TARGETABLE_RITXIT | RIG_TARGETABLE_FREQ | RIG_TARGETABLE_MODE | RIG_TARGETABLE_SPECTRUM,
.ptt_type = RIG_PTT_RIG,
.dcd_type = RIG_DCD_RIG,
.port_type = RIG_PORT_NONE,
@@ -2149,7 +2147,12 @@ struct rig_caps dummy_caps =
.has_set_level = RIG_LEVEL_SET(DUMMY_LEVEL),
.has_get_parm = DUMMY_PARM,
.has_set_parm = RIG_PARM_SET(DUMMY_PARM),
- .level_gran = { [LVL_CWPITCH] = { .step = { .i = 10 } } },
+ .level_gran = {
+ [LVL_CWPITCH] = { .step = { .i = 10 } },
+ [LVL_SPECTRUM_SPEED] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}},
+ [LVL_SPECTRUM_REF] = {.min = {.f = -30.0f}, .max = {.f = 10.0f}, .step = {.f = 0.5f}},
+ [LVL_SPECTRUM_AVG] = {.min = {.i = 0}, .max = {.i = 3}, .step = {.i = 1}},
+ },
.ctcss_list = common_ctcss_list,
.dcs_list = full_dcs_list,
.chan_list = {
@@ -2163,6 +2166,8 @@ struct rig_caps dummy_caps =
.transceive = RIG_TRN_OFF,
.attenuator = { 10, 20, 30, RIG_DBLST_END, },
.preamp = { 10, RIG_DBLST_END, },
+ .agc_level_count = 7,
+ .agc_levels = { RIG_AGC_OFF, RIG_AGC_SUPERFAST, RIG_AGC_FAST, RIG_AGC_MEDIUM, RIG_AGC_SLOW, RIG_AGC_AUTO, RIG_AGC_USER },
.rx_range_list1 = { {
.startf = kHz(150), .endf = MHz(1500), .modes = DUMMY_MODES,
.low_power = -1, .high_power = -1, DUMMY_VFOS, RIG_ANT_1 | RIG_ANT_2 | RIG_ANT_3 | RIG_ANT_4,
@@ -2210,6 +2215,61 @@ struct rig_caps dummy_caps =
.max_rit = 9990,
.max_xit = 9990,
.max_ifshift = 10000,
+
+ .spectrum_scopes = {
+ {
+ .id = 0,
+ .name = "Main",
+ },
+ {
+ .id = 1,
+ .name = "Sub",
+ },
+ {
+ .id = -1,
+ .name = NULL,
+ },
+ },
+ .spectrum_modes = {
+ RIG_SPECTRUM_MODE_CENTER,
+ RIG_SPECTRUM_MODE_FIXED,
+ RIG_SPECTRUM_MODE_CENTER_SCROLL,
+ RIG_SPECTRUM_MODE_FIXED_SCROLL,
+ RIG_SPECTRUM_MODE_NONE,
+ },
+ .spectrum_spans = {
+ 5000,
+ 10000,
+ 20000,
+ 50000,
+ 100000,
+ 200000,
+ 500000,
+ 1000000,
+ 2000000,
+ 5000000,
+ 0,
+ },
+ .spectrum_avg_modes = {
+ {
+ .id = 0,
+ .name = "OFF",
+ },
+ {
+ .id = 1,
+ .name = "2",
+ },
+ {
+ .id = 2,
+ .name = "3",
+ },
+ {
+ .id = 3,
+ .name = "4",
+ },
+ },
+ .spectrum_attenuator = { 10, 20, 30, RIG_DBLST_END, },
+
.priv = NULL, /* priv */
.extlevels = dummy_ext_levels,
diff --git a/rigs/icom/ic785x.c b/rigs/icom/ic785x.c
index 813460d0..f33fc691 100644
--- a/rigs/icom/ic785x.c
+++ b/rigs/icom/ic785x.c
@@ -287,8 +287,6 @@ const struct rig_caps ic785x_caps =
.max_ifshift = Hz(0),
.agc_level_count = 4,
.agc_levels = { RIG_AGC_OFF, RIG_AGC_FAST, RIG_AGC_MEDIUM, RIG_AGC_SLOW },
- .agc_level_count = 3,
- .agc_levels = { RIG_AGC_FAST, RIG_AGC_MEDIUM, RIG_AGC_SLOW },
.targetable_vfo = RIG_TARGETABLE_FREQ | RIG_TARGETABLE_MODE | RIG_TARGETABLE_SPECTRUM,
.vfo_ops = IC785x_VFO_OPS,
.scan_ops = IC785x_SCAN_OPS,
commit ff9a745c7a716791d58932ed6b82036823094ab7
Author: Mike Black W9MDB <mdb...@ya...>
Date: Fri Jun 4 10:03:40 2021 -0500
Wrap pthread calls in #ifdef HAVE_PTHREAD in rig.c
diff --git a/src/rig.c b/src/rig.c
index e2548990..48669e79 100644
--- a/src/rig.c
+++ b/src/rig.c
@@ -61,7 +61,9 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
+#ifdef HAVE_PTHREAD
#include <pthread.h>
+#endif
#include <hamlib/rig.h>
@@ -1108,6 +1110,7 @@ int HAMLIB_API rig_close(RIG *rig)
// terminate the multicast server
extern int multicast_server_run;
multicast_server_run = 0;
+#ifdef HAVE_PTHREAD
extern pthread_t multicast_server_threadId;
if (multicast_server_threadId != 0)
@@ -1123,6 +1126,7 @@ int HAMLIB_API rig_close(RIG *rig)
multicast_server_threadId = 0;
}
+#endif
if (!rig || !rig->caps)
{
@@ -6551,7 +6555,9 @@ int HAMLIB_API rig_cookie(RIG *rig, enum cookie_e cookie_cmd, char *cookie,
static double time_last_used;
double time_curr;
struct timespec tp;
+#ifdef HAVE_PTHREAD
static pthread_mutex_t cookie_lock = PTHREAD_MUTEX_INITIALIZER;
+#endif
if (cookie_len < 27)
{
commit b65fdb61f889b2f22783033a290a1e9ff29bca4a
Author: Mike Black W9MDB <mdb...@ya...>
Date: Fri Jun 4 09:59:31 2021 -0500
Fix get_rig_conf_type export
diff --git a/src/sprintflst.h b/src/sprintflst.h
index 1a2bc0a0..940a378f 100644
--- a/src/sprintflst.h
+++ b/src/sprintflst.h
@@ -50,7 +50,7 @@ extern HAMLIB_EXPORT( int ) rot_sprintf_status(char *str, int len, rot_status_t
extern HAMLIB_EXPORT( int ) rig_sprintf_spectrum_modes(char *str, int nlen, const enum rig_spectrum_mode_e *modes);
extern HAMLIB_EXPORT( int ) rig_sprintf_spectrum_spans(char *str, int nlen, const freq_t *spans);
extern HAMLIB_EXPORT( int ) rig_sprintf_spectrum_avg_modes(char *str, int nlen, const struct rig_spectrum_avg_mode *avg_modes);
-extern HAMLIB_EXPORT( char ) *get_rig_conf_type(enum rig_conf_e type);
+extern HAMLIB_EXPORT( char *) get_rig_conf_type(enum rig_conf_e type);
extern HAMLIB_EXPORT( int ) print_ext_param(const struct confparams *cfp, rig_ptr_t ptr);
__END_DECLS
commit a73046b04e183661e0ffd8e033aea2c552d582fc
Author: Mike Black W9MDB <mdb...@ya...>
Date: Thu Jun 3 17:21:52 2021 -0500
Clean up clang-static-analyzer warnings
diff --git a/src/rig.c b/src/rig.c
index 34706f5a..e2548990 100644
--- a/src/rig.c
+++ b/src/rig.c
@@ -3913,7 +3913,7 @@ int HAMLIB_API rig_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
else
{
TRACE;
- retcode = caps->get_freq(rig, RIG_VFO_CURR, tx_freq);
+ retcode = caps->get_freq ? caps->get_freq(rig, RIG_VFO_CURR, tx_freq) :-RIG_ENIMPL;
}
/* try and revert even if we had an error above */
@@ -4042,7 +4042,7 @@ int HAMLIB_API rig_set_split_mode(RIG *rig,
else
{
TRACE;
- retcode = caps->set_mode(rig, RIG_VFO_CURR, tx_mode, tx_width);
+ retcode = caps->set_mode ? caps->set_mode(rig, RIG_VFO_CURR, tx_mode, tx_width) : -RIG_ENIMPL;
}
/* try and revert even if we had an error above */
@@ -4165,7 +4165,7 @@ int HAMLIB_API rig_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode,
else
{
TRACE;
- retcode = caps->get_mode(rig, RIG_VFO_CURR, tx_mode, tx_width);
+ retcode = caps->get_mode ? caps->get_mode(rig, RIG_VFO_CURR, tx_mode, tx_width) : -RIG_ENIMPL;
}
/* try and revert even if we had an error above */
commit f41bcaa71af6538679b212ed8f5e0c6dbe447f5b
Author: Mike Black W9MDB <mdb...@ya...>
Date: Thu Jun 3 16:13:58 2021 -0500
Add IC-575 rig
diff --git a/rigs/icom/ic475.c b/rigs/icom/ic475.c
index ee0119b7..77e48884 100644
--- a/rigs/icom/ic475.c
+++ b/rigs/icom/ic475.c
@@ -142,7 +142,110 @@ const struct rig_caps ic475_caps =
.decode_event = icom_decode_event,
.set_mem = icom_set_mem,
- .vfo_op = icom_vfo_op,
+ .vfo_op = icom_vfo_op
+};
+static const struct icom_priv_caps ic575_priv_caps =
+{
+ 0x16, /* default address */
+ 0, /* 731 mode */
+ 0, /* no XCHG */
+ ic737_ts_sc_list
};
+const struct rig_caps ic575_caps =
+{
+ RIG_MODEL(RIG_MODEL_IC575),
+ .model_name = "IC-575",
+ .mfg_name = "Icom",
+ .version = BACKEND_VER ".0",
+ .copyright = "LGPL",
+ .status = RIG_STATUS_BETA,
+ .rig_type = RIG_TYPE_TRANSCEIVER,
+ .ptt_type = RIG_PTT_NONE,
+ .dcd_type = RIG_DCD_NONE,
+ .port_type = RIG_PORT_SERIAL,
+ .serial_rate_min = 1200,
+ .serial_rate_max = 9600,
+ .serial_data_bits = 8,
+ .serial_stop_bits = 1,
+ .serial_parity = RIG_PARITY_NONE,
+ .serial_handshake = RIG_HANDSHAKE_NONE,
+ .write_delay = 0,
+ .post_write_delay = 0,
+ .timeout = 1000,
+ .retry = 3,
+ .has_get_func = RIG_FUNC_NONE,
+ .has_set_func = RIG_FUNC_NONE,
+ .has_get_level = RIG_LEVEL_NONE,
+ .has_set_level = RIG_LEVEL_NONE,
+ .has_get_parm = RIG_PARM_NONE,
+ .has_set_parm = RIG_PARM_NONE,
+ .level_gran = {},
+ .parm_gran = {},
+ .ctcss_list = NULL,
+ .dcs_list = NULL,
+ .preamp = { RIG_DBLST_END, },
+ .attenuator = { RIG_DBLST_END, },
+ .max_rit = Hz(0),
+ .max_xit = Hz(0),
+ .max_ifshift = Hz(0),
+ .targetable_vfo = 0,
+ .vfo_ops = IC475_VFO_OPS,
+ .scan_ops = RIG_SCAN_NONE,
+ .transceive = RIG_TRN_RIG,
+ .bank_qty = 0,
+ .chan_desc_sz = 0,
+
+ .chan_list = {
+ { 1, 99, RIG_MTYPE_MEM, IC_MIN_MEM_CAP },
+ { 100, 101, RIG_MTYPE_EDGE, IC_MIN_MEM_CAP },
+ { 102, 102, RIG_MTYPE_CALL, IC_MIN_MEM_CAP },
+ RIG_CHAN_END,
+ },
+
+ .rx_range_list1 = { {MHz(430), MHz(450), IC475_MODES, -1, -1, IC475_VFO_ALL},
+ RIG_FRNG_END,
+ },
+ .tx_range_list1 = { {MHz(430), MHz(440), IC475_MODES, W(2.5), W(25), IC475_VFO_ALL},
+ RIG_FRNG_END,
+ },
+
+ .rx_range_list2 = { {MHz(430), MHz(450), IC475_MODES, -1, -1, IC475_VFO_ALL},
+ RIG_FRNG_END,
+ },
+ .tx_range_list2 = { {MHz(430), MHz(450), IC475_MODES, W(2.5), W(25), IC475_VFO_ALL},
+ RIG_FRNG_END,
+ },
+
+ .tuning_steps = {
+ {IC475_MODES, 10}, /* TBC: does this rig supports settin tuning step? */
+ RIG_TS_END,
+ },
+ /* mode/filter list, remember: order matters! */
+ .filters = {
+ {RIG_MODE_SSB | RIG_MODE_CW, kHz(2.3)},
+ {RIG_MODE_FM, kHz(15)},
+ RIG_FLT_END,
+ },
+
+ .cfgparams = icom_cfg_params,
+ .set_conf = icom_set_conf,
+ .get_conf = icom_get_conf,
+
+ .priv = (void *)& ic575_priv_caps,
+ .rig_init = icom_init,
+ .rig_cleanup = icom_cleanup,
+ .rig_open = icom_rig_open,
+ .rig_close = icom_rig_close,
+
+ .set_freq = icom_set_freq,
+ .get_freq = icom_get_freq,
+ .set_mode = icom_set_mode,
+ .get_mode = icom_get_mode,
+ .set_vfo = icom_set_vfo,
+
+ .decode_event = icom_decode_event,
+ .set_mem = icom_set_mem,
+ .vfo_op = icom_vfo_op
+};
diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c
index 88b8faee..6c37a530 100644
--- a/rigs/icom/icom.c
+++ b/rigs/icom/icom.c
@@ -8868,6 +8868,7 @@ DECLARE_INITRIG_BACKEND(icom)
rig_register(&ic275_caps);
rig_register(&ic471_caps);
rig_register(&ic475_caps);
+ rig_register(&ic575_caps);
rig_register(&ic1275_caps);
rig_register(&os535_caps);
diff --git a/rigs/icom/icom.h b/rigs/icom/icom.h
index 29697889..25ca989e 100644
--- a/rigs/icom/icom.h
+++ b/rigs/icom/icom.h
@@ -455,6 +455,7 @@ extern const struct rig_caps ic271_caps;
extern const struct rig_caps ic275_caps;
extern const struct rig_caps ic471_caps;
extern const struct rig_caps ic475_caps;
+extern const struct rig_caps ic575_caps;
extern const struct rig_caps ic1275_caps;
extern const struct rig_caps omnivip_caps;
commit 7d8e99ca2da8ced2b162cf3ee2caaa0bdc233b63
Author: Mike Black W9MDB <mdb...@ya...>
Date: Wed Jun 2 23:06:22 2021 -0500
Fix ICOM UDP network setup
diff --git a/src/rig.c b/src/rig.c
index 91e93979..34706f5a 100644
--- a/src/rig.c
+++ b/src/rig.c
@@ -720,7 +720,7 @@ int HAMLIB_API rig_open(RIG *rig)
rs->rigport.pathname);
rs->rigport.type.rig = RIG_PORT_NETWORK;
- if ((rig->caps->rig_model & RIG_ICOM) == RIG_ICOM)
+ if (RIG_BACKEND_NUM(rig->caps->rig_model) == RIG_ICOM)
{
rig_debug(RIG_DEBUG_TRACE, "%s(%d): Icom rig UDP network enabled\n", __FILE__,
__LINE__);
-----------------------------------------------------------------------
Summary of changes:
rigs/dummy/dummy.c | 68 +++++++++++++++++++++++++++++--
rigs/dummy/flrig.c | 6 +--
rigs/icom/ic475.c | 105 +++++++++++++++++++++++++++++++++++++++++++++++-
rigs/icom/ic785x.c | 2 -
rigs/icom/icom.c | 1 +
rigs/icom/icom.h | 1 +
rigs/kenwood/flex6xxx.c | 3 +-
rigs/kenwood/thd74.c | 17 ++++----
src/rig.c | 14 +++++--
src/sprintflst.h | 2 +-
10 files changed, 195 insertions(+), 24 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Nate B. <n0...@us...> - 2021-06-01 15:10:25
|
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 53476dd14df76edbff6013cd36c1cad0927e5ac0 (commit)
via a63d00903551e047dce5caa644fb515b54d7e632 (commit)
via c5378b9f70ca6df0b0090fab6219a3234ac04be2 (commit)
via aa161f15980c2e3dba71126b830ee9cb4c395bf6 (commit)
via 9755454ff817bbe72da4311cc78a1e5ed6191844 (commit)
via 97e36926d33e31b70f6de3fb03faf5ea6add0522 (commit)
via d9d562874db7166c79be798461bfc1630e2d89cd (commit)
via c4e6ed39e640087e57648d7b7743faf94baf1848 (commit)
via 3a67356bc1c3b4bc5d5f3697c1a7cb7242555b79 (commit)
via fabec4a94cd277787d4692ba805c42bddcd61b22 (commit)
via 263c16984ad0a15b0b51c4095611fffac47beac6 (commit)
via 503897c41cde9cd7100d08ce6c34624387c04299 (commit)
from 92ed52b5f75dfaaa31d092e10737cf8ae8eaac41 (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 53476dd14df76edbff6013cd36c1cad0927e5ac0
Author: Mike Black W9MDB <mdb...@ya...>
Date: Tue Jun 1 07:19:00 2021 -0500
Remove some more debug
diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c
index 2fc0c3d2..be37b197 100644
--- a/rigs/kenwood/kenwood.c
+++ b/rigs/kenwood/kenwood.c
@@ -573,7 +573,6 @@ transaction_quit:
}
rs->hold_decode = 0;
- rig_debug(RIG_DEBUG_TRACE, "%s: returning retval=%d\n", __func__, retval);
RETURNFUNC(retval);
}
diff --git a/src/iofunc.c b/src/iofunc.c
index b42318c1..90cb9dc9 100644
--- a/src/iofunc.c
+++ b/src/iofunc.c
@@ -433,7 +433,7 @@ int HAMLIB_API write_block(hamlib_port_t *p, const char *txbuffer, size_t count)
{
int ret;
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ //rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
#ifdef WANT_NON_ACTIVE_POST_WRITE_DELAY
commit a63d00903551e047dce5caa644fb515b54d7e632
Author: Mike Black W9MDB <mdb...@ya...>
Date: Tue Jun 1 07:17:11 2021 -0500
Remove some more debug
diff --git a/src/rig.c b/src/rig.c
index 358920e6..91e93979 100644
--- a/src/rig.c
+++ b/src/rig.c
@@ -2065,7 +2065,6 @@ int HAMLIB_API rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
rig_strvfo(vfo));
}
- TRACE;
retcode = caps->get_freq(rig, vfo, freq);
cache_show(rig, __func__, __LINE__);
diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c
index 97ded7e8..e571326a 100644
--- a/tests/rigctl_parse.c
+++ b/tests/rigctl_parse.c
@@ -749,7 +749,7 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc,
break;
}
- rig_debug(RIG_DEBUG_VERBOSE, "%s: cmd==0x%02x\n", __func__, cmd);
+ //rig_debug(RIG_DEBUG_VERBOSE, "%s: cmd==0x%02x\n", __func__, cmd);
if (cmd == 0x0a || cmd == 0x0d)
{
@@ -1679,7 +1679,6 @@ readline_repeat:
p2 ? p2 : "",
p3 ? p3 : "");
- rig_debug(RIG_DEBUG_TRACE, "%s: vfo_opt=%d\n", __func__, *vfo_opt);
if (retcode == -RIG_EIO)
{
@@ -1735,7 +1734,6 @@ readline_repeat:
fflush(fout);
- rig_debug(RIG_DEBUG_TRACE, "%s: retcode=%d\n", __func__, retcode);
#ifdef HAVE_LIBREADLINE
if (input_line != NULL && (result = strtok(NULL, " "))) goto readline_repeat;
#endif
commit c5378b9f70ca6df0b0090fab6219a3234ac04be2
Author: Mike Black W9MDB <mdb...@ya...>
Date: Tue Jun 1 07:10:44 2021 -0500
Remove some more debug
diff --git a/src/rig.c b/src/rig.c
index 1893d075..358920e6 100644
--- a/src/rig.c
+++ b/src/rig.c
@@ -2027,8 +2027,7 @@ int HAMLIB_API rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
int cache_ms_freq, cache_ms_mode, cache_ms_width;
rig_get_cache(rig, vfo, freq, &cache_ms_freq, &mode, &cache_ms_mode, &width,
&cache_ms_width);
- rig_debug(RIG_DEBUG_TRACE, "%s: cache check1 age=%dms\n", __func__,
- cache_ms_freq);
+ //rig_debug(RIG_DEBUG_TRACE, "%s: cache check1 age=%dms\n", __func__, cache_ms_freq);
cache_show(rig, __func__, __LINE__);
diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c
index ecba8732..97ded7e8 100644
--- a/tests/rigctl_parse.c
+++ b/tests/rigctl_parse.c
@@ -787,7 +787,6 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc,
}
my_rig->state.vfo_opt = *vfo_opt;
- rig_debug(RIG_DEBUG_TRACE, "%s: vfo_opt=%d\n", __func__, *vfo_opt);
if (cmd == 'Q' || cmd == 'q')
{
commit aa161f15980c2e3dba71126b830ee9cb4c395bf6
Author: Mike Black W9MDB <mdb...@ya...>
Date: Tue Jun 1 07:03:24 2021 -0500
Comment out some debug from rigctl_parse.c
diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c
index 1972aa56..ecba8732 100644
--- a/tests/rigctl_parse.c
+++ b/tests/rigctl_parse.c
@@ -879,18 +879,18 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc,
}
}
- rig_debug(RIG_DEBUG_TRACE, "%s: debug1\n", __func__);
+ //rig_debug(RIG_DEBUG_TRACE, "%s: debug1\n", __func__);
if ((cmd_entry->flags & ARG_IN_LINE)
&& (cmd_entry->flags & ARG_IN1)
&& cmd_entry->arg1)
{
- rig_debug(RIG_DEBUG_TRACE, "%s: debug2\n", __func__);
+ //rig_debug(RIG_DEBUG_TRACE, "%s: debug2\n", __func__);
if (interactive)
{
char *nl;
- rig_debug(RIG_DEBUG_TRACE, "%s: debug2a\n", __func__);
+ //rig_debug(RIG_DEBUG_TRACE, "%s: debug2a\n", __func__);
if (fgets(arg1, MAXARGSZ, fin) == NULL)
@@ -900,7 +900,7 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc,
if (arg1[0] == 0xa)
{
- rig_debug(RIG_DEBUG_TRACE, "%s: debug2b\n", __func__);
+ //rig_debug(RIG_DEBUG_TRACE, "%s: debug2b\n", __func__);
if (prompt)
{
@@ -949,13 +949,13 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc,
}
else if ((cmd_entry->flags & ARG_IN1) && cmd_entry->arg1)
{
- rig_debug(RIG_DEBUG_TRACE, "%s: debug3\n", __func__);
+ //rig_debug(RIG_DEBUG_TRACE, "%s: debug3\n", __func__);
if (interactive)
{
arg1[0] = fgetc(fin);
arg1[1] = 0;
- rig_debug(RIG_DEBUG_TRACE, "%s: debug4 arg1=%c\n", __func__, arg1[0]);
+ //rig_debug(RIG_DEBUG_TRACE, "%s: debug4 arg1=%c\n", __func__, arg1[0]);
if (prompt && arg1[0] == 0x0a)
{
@@ -989,22 +989,22 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc,
}
}
- rig_debug(RIG_DEBUG_TRACE, "%s: debug5\n", __func__);
+ //rig_debug(RIG_DEBUG_TRACE, "%s: debug5\n", __func__);
if (p1
&& p1[0] != '?'
&& (cmd_entry->flags & ARG_IN2)
&& cmd_entry->arg2)
{
- rig_debug(RIG_DEBUG_TRACE, "%s: debug6\n", __func__);
+ //rig_debug(RIG_DEBUG_TRACE, "%s: debug6\n", __func__);
if (interactive)
{
- rig_debug(RIG_DEBUG_TRACE, "%s: debug7\n", __func__);
+ //rig_debug(RIG_DEBUG_TRACE, "%s: debug7\n", __func__);
if (prompt)
{
- rig_debug(RIG_DEBUG_TRACE, "%s: debug8\n", __func__);
+ //rig_debug(RIG_DEBUG_TRACE, "%s: debug8\n", __func__);
fprintf_flush(fout, "%s: ", cmd_entry->arg2);
}
@@ -1018,7 +1018,7 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc,
}
else
{
- rig_debug(RIG_DEBUG_TRACE, "%s: debug9\n", __func__);
+ //rig_debug(RIG_DEBUG_TRACE, "%s: debug9\n", __func__);
retcode = next_word(arg2, argc, argv, 0);
if (EOF == retcode)
@@ -1036,22 +1036,22 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc,
}
}
- rig_debug(RIG_DEBUG_TRACE, "%s: debug10\n", __func__);
+ //rig_debug(RIG_DEBUG_TRACE, "%s: debug10\n", __func__);
if (p1
&& p1[0] != '?'
&& (cmd_entry->flags & ARG_IN3)
&& cmd_entry->arg3)
{
- rig_debug(RIG_DEBUG_TRACE, "%s: debug11\n", __func__);
+ //rig_debug(RIG_DEBUG_TRACE, "%s: debug11\n", __func__);
if (interactive)
{
- rig_debug(RIG_DEBUG_TRACE, "%s: debug12\n", __func__);
+ //rig_debug(RIG_DEBUG_TRACE, "%s: debug12\n", __func__);
if (prompt)
{
- rig_debug(RIG_DEBUG_TRACE, "%s: debug13\n", __func__);
+ //rig_debug(RIG_DEBUG_TRACE, "%s: debug13\n", __func__);
fprintf_flush(fout, "%s: ", cmd_entry->arg3);
}
@@ -1065,7 +1065,7 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc,
}
else
{
- rig_debug(RIG_DEBUG_TRACE, "%s: debug14\n", __func__);
+ //rig_debug(RIG_DEBUG_TRACE, "%s: debug14\n", __func__);
retcode = next_word(arg3, argc, argv, 0);
if (EOF == retcode)
commit 9755454ff817bbe72da4311cc78a1e5ed6191844
Author: Mike Black W9MDB <mdb...@ya...>
Date: Mon May 31 17:42:07 2021 -0500
Fix Icom UDP server check
diff --git a/src/rig.c b/src/rig.c
index 574a012c..1893d075 100644
--- a/src/rig.c
+++ b/src/rig.c
@@ -720,7 +720,7 @@ int HAMLIB_API rig_open(RIG *rig)
rs->rigport.pathname);
rs->rigport.type.rig = RIG_PORT_NETWORK;
- if (rig->caps->rig_model & RIG_ICOM)
+ if ((rig->caps->rig_model & RIG_ICOM) == RIG_ICOM)
{
rig_debug(RIG_DEBUG_TRACE, "%s(%d): Icom rig UDP network enabled\n", __FILE__,
__LINE__);
commit 97e36926d33e31b70f6de3fb03faf5ea6add0522
Author: Mike Black W9MDB <mdb...@ya...>
Date: Mon May 31 09:05:41 2021 -0500
Enable UDP network for Icom rigs
diff --git a/src/rig.c b/src/rig.c
index 559946a1..574a012c 100644
--- a/src/rig.c
+++ b/src/rig.c
@@ -90,7 +90,7 @@ const char *hamlib_license = "LGPL";
//! @cond Doxygen_Suppress
const char hamlib_version[21] = "Hamlib " PACKAGE_VERSION;
const char *hamlib_version2 = "Hamlib " PACKAGE_VERSION " " HAMLIBDATETIME;
-HAMLIB_EXPORT_VAR (int) cookie_use;
+HAMLIB_EXPORT_VAR(int) cookie_use;
//! @endcond
struct rig_caps caps_test;
@@ -719,6 +719,13 @@ int HAMLIB_API rig_open(RIG *rig)
rig_debug(RIG_DEBUG_TRACE, "%s: using network address %s\n", __func__,
rs->rigport.pathname);
rs->rigport.type.rig = RIG_PORT_NETWORK;
+
+ if (rig->caps->rig_model & RIG_ICOM)
+ {
+ rig_debug(RIG_DEBUG_TRACE, "%s(%d): Icom rig UDP network enabled\n", __FILE__,
+ __LINE__);
+ rs->rigport.type.rig = RIG_PORT_UDP_NETWORK;
+ }
}
if (rs->comm_state)
@@ -1102,13 +1109,19 @@ int HAMLIB_API rig_close(RIG *rig)
extern int multicast_server_run;
multicast_server_run = 0;
extern pthread_t multicast_server_threadId;
- int err = pthread_join(multicast_server_threadId, NULL);
- if (err)
+ if (multicast_server_threadId != 0)
{
- rig_debug(RIG_DEBUG_ERR, "%s(%d): pthread_join error %s\n", __FILE__, __LINE__,
- strerror(errno));
- // just ignore it
+ int err = pthread_join(multicast_server_threadId, NULL);
+
+ if (err)
+ {
+ rig_debug(RIG_DEBUG_ERR, "%s(%d): pthread_join error %s\n", __FILE__, __LINE__,
+ strerror(errno));
+ // just ignore it
+ }
+
+ multicast_server_threadId = 0;
}
if (!rig || !rig->caps)
@@ -6526,6 +6539,7 @@ const char *HAMLIB_API rig_copyright()
* while((cookie=rig_cookie(NULL, RIG_COOKIE_GET)) == NULL) hl_usleep(10*1000);
* set_freq A;set mode A;set freq B;set modeB;
* rig_cookie(cookie,RIG_COOKIE_RELEASE);
+ * if wait!=0 rig_cookie with RIG_COOKIE_GET will wait for the cookie to become available
*/
int HAMLIB_API rig_cookie(RIG *rig, enum cookie_e cookie_cmd, char *cookie,
int cookie_len)
@@ -6539,6 +6553,7 @@ int HAMLIB_API rig_cookie(RIG *rig, enum cookie_e cookie_cmd, char *cookie,
static double time_last_used;
double time_curr;
struct timespec tp;
+ static pthread_mutex_t cookie_lock = PTHREAD_MUTEX_INITIALIZER;
if (cookie_len < 27)
{
@@ -6597,21 +6612,31 @@ int HAMLIB_API rig_cookie(RIG *rig, enum cookie_e cookie_cmd, char *cookie,
break;
case RIG_COOKIE_GET:
+
// the way we expire cookies is if somebody else asks for one and the last renewal is > 1 second ago
// a polite client will have released the cookie
// we are just allow for a crashed client that fails to release:q
+
clock_gettime(CLOCK_REALTIME, &tp);
time_curr = tp.tv_sec + tp.tv_nsec / 1e9;
+#ifdef HAVE_PTHREAD
+ pthread_mutex_lock(&cookie_lock);
+#endif
+
if (cookie_save[0] != 0 && (strcmp(cookie_save, cookie) == 0)
&& (time_curr - time_last_used < 1)) // then we will deny the request
{
printf("Cookie %s in use\n", cookie_save);
rig_debug(RIG_DEBUG_ERR, "%s(%d): %s cookie is in use\n", __FILE__, __LINE__,
cookie_save);
+#ifdef HAVE_PTHREAD
+ pthread_mutex_unlock(&cookie_lock);
+#endif
return -RIG_BUSBUSY;
}
+
if (cookie_save[0] != 0)
{
rig_debug(RIG_DEBUG_ERR,
@@ -6626,14 +6651,36 @@ int HAMLIB_API rig_cookie(RIG *rig, enum cookie_e cookie_cmd, char *cookie,
time_last_used = time_curr;
rig_debug(RIG_DEBUG_VERBOSE, "%s(%d): %s new cookie request granted\n",
__FILE__, __LINE__, cookie_save);
+#ifdef HAVE_PTHREAD
+ pthread_mutex_unlock(&cookie_lock);
+#endif
return RIG_OK;
break;
-
}
rig_debug(RIG_DEBUG_ERR, "%s(%d): unknown condition!!\n'", __FILE__, __LINE__);
return -RIG_EPROTO;
}
+HAMLIB_EXPORT(void) sync_callback(int lock)
+{
+#ifdef HAVE_PTHREAD
+ static pthread_mutex_t client_lock = PTHREAD_MUTEX_INITIALIZER;
+
+ if (lock)
+ {
+ pthread_mutex_lock(&client_lock);
+ rig_debug(RIG_DEBUG_VERBOSE, "%s: client lock engaged\n", __func__);
+ }
+ else
+ {
+ rig_debug(RIG_DEBUG_VERBOSE, "%s: client lock disengaged\n", __func__);
+ pthread_mutex_unlock(&client_lock);
+ }
+
+#endif
+}
+
/*! @} */
+
commit d9d562874db7166c79be798461bfc1630e2d89cd
Author: Mike Black W9MDB <mdb...@ya...>
Date: Mon May 31 08:36:45 2021 -0500
Fix compilation warning in icom.c
diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c
index 1375f9af..88b8faee 100644
--- a/rigs/icom/icom.c
+++ b/rigs/icom/icom.c
@@ -7944,7 +7944,7 @@ static int icom_parse_spectrum_frame(RIG *rig, int length, const unsigned char *
int max_division = (int) from_bcd(frame_data + 2, 1 * 2);
int spectrum_data_length_in_frame;
- unsigned char *spectrum_data_start_in_frame;
+ const unsigned char *spectrum_data_start_in_frame;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
commit c4e6ed39e640087e57648d7b7743faf94baf1848
Merge: fabec4a9 3a67356b
Author: Michael Black <mdb...@ya...>
Date: Mon May 31 08:31:42 2021 -0500
Merge pull request #715 from mikaelnousiainen/fix-icom-transceive-and-spectrum-data-conflicts
Attempt to handle asynchronous rig output data in Icom backend
commit 3a67356bc1c3b4bc5d5f3697c1a7cb7242555b79
Author: Mikael Nousiainen <mik...@ik...>
Date: Mon May 31 16:22:22 2021 +0300
Add some comments and improved debugging on SIGIO async data handling
diff --git a/rigs/icom/frame.c b/rigs/icom/frame.c
index 967535c2..65997f09 100644
--- a/rigs/icom/frame.c
+++ b/rigs/icom/frame.c
@@ -346,6 +346,7 @@ read_another_frame:
RETURNFUNC(-RIG_EPROTO);
}
+ // TODO: Does ctrlid (detected by icom_is_async_frame) vary (seeing some code above using 0x80 for non-full-duplex)?
if (icom_is_async_frame(rig, frm_len, buf))
{
int elapsed_ms;
diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c
index 8f09cc21..1375f9af 100644
--- a/rigs/icom/icom.c
+++ b/rigs/icom/icom.c
@@ -8061,9 +8061,6 @@ static int icom_parse_spectrum_frame(RIG *rig, int length, const unsigned char *
int icom_is_async_frame(RIG *rig, int frame_len, const unsigned char *frame)
{
- struct rig_state *rs = &rig->state;
- struct icom_priv_data *priv = (struct icom_priv_data *) rs->priv;
-
if (frame_len < ACKFRMLEN)
{
return 0;
@@ -8167,7 +8164,7 @@ int icom_decode_event(RIG *rig)
if (frm_len < 1)
{
- RETURNFUNC(0);
+ RETURNFUNC(RIG_OK);
}
retval = icom_frame_fix_preamble(frm_len, buf);
diff --git a/src/event.c b/src/event.c
index 79b3d4e7..e0e9cbf1 100644
--- a/src/event.c
+++ b/src/event.c
@@ -56,9 +56,9 @@
#include <signal.h>
#include <errno.h>
-
#include <hamlib/rig.h>
#include "event.h"
+#include "misc.h"
#if defined(WIN32) && !defined(HAVE_TERMIOS_H)
# include "win32termios.h"
@@ -300,6 +300,8 @@ static int search_rig_and_decode(RIG *rig, rig_ptr_t data)
struct timeval tv;
int retval;
+ ENTERFUNC;
+
/*
* so far, only file oriented ports have event reporting support
*/
@@ -309,6 +311,22 @@ static int search_rig_and_decode(RIG *rig, rig_ptr_t data)
return -1;
}
+ /*
+ * TODO: FIXME: We may end up calling decode_event right before or after the hold_decode lock is released
+ * by backend transaction routine. With the Icom backend this will end up waiting for the next CI-V frame
+ * to be read and this will interfere with reading of the next response to any command.
+ * => It is difficult to find a way to avoid this routine picking up regular responses.
+ */
+
+ /*
+ * Do not disturb, the backend is currently receiving data
+ */
+ if (rig->state.hold_decode)
+ {
+ rig_debug(RIG_DEBUG_TRACE, "%s: hold decode, backend is receiving data\n", __func__);
+ RETURNFUNC(-1);
+ }
+
/* FIXME: siginfo is not portable, however use it where available */
#if 0&&defined(HAVE_SIGINFO_T)
siginfo_t *si = (siginfo_t *)data;
@@ -334,10 +352,10 @@ static int search_rig_and_decode(RIG *rig, rig_ptr_t data)
if (retval < 0)
{
rig_debug(RIG_DEBUG_ERR,
- "%s: select: %s\n",
+ "%s: select() failed: %s\n",
__func__,
strerror(errno));
- return -1;
+ RETURNFUNC(-1);
}
#endif
@@ -347,7 +365,8 @@ static int search_rig_and_decode(RIG *rig, rig_ptr_t data)
*/
if (rig->state.hold_decode)
{
- return -1;
+ rig_debug(RIG_DEBUG_TRACE, "%s: hold decode, backend is receiving data\n", __func__);
+ RETURNFUNC(-1);
}
if (rig->caps->decode_event)
@@ -355,7 +374,7 @@ static int search_rig_and_decode(RIG *rig, rig_ptr_t data)
rig->caps->decode_event(rig);
}
- return 1; /* process each opened rig */
+ RETURNFUNC(1); /* process each opened rig */
}
diff --git a/tests/rigctld.c b/tests/rigctld.c
index 10518521..50845a95 100644
--- a/tests/rigctld.c
+++ b/tests/rigctld.c
@@ -910,11 +910,19 @@ int main(int argc, char *argv[])
timeout.tv_usec = 0;
retcode = select(sock_listen + 1, &set, NULL, NULL, &timeout);
- if (-1 == retcode)
+ if (retcode == -1)
{
- rig_debug(RIG_DEBUG_ERR, "%s: select\n", __func__);
+ int errno_stored = errno;
+ rig_debug(RIG_DEBUG_ERR, "%s: select() failed: %s\n", __func__, strerror(errno_stored));
+
+ // TODO: FIXME: Why does this select() return EINTR after any command when set_trn RIG is enabled?
+ if (errno == EINTR)
+ {
+ rig_debug(RIG_DEBUG_VERBOSE, "%s: ignoring interrupted system call\n", __func__);
+ retcode = 0;
+ }
}
- else if (!retcode)
+ else if (retcode == 0)
{
if (ctrl_c)
{
@@ -1039,11 +1047,13 @@ void *handle_socket(void *arg)
int ext_resp = 0;
char resp_sep = '\n';
+ ENTERFUNC;
+
fsockin = get_fsockin(handle_data_arg);
if (!fsockin)
{
- rig_debug(RIG_DEBUG_ERR, "fdopen(0x%d) in: %s\n", handle_data_arg->sock,
+ rig_debug(RIG_DEBUG_ERR, "%s: fdopen(0x%d) in: %s\n", __func__, handle_data_arg->sock,
strerror(errno));
goto handle_exit;
}
@@ -1052,7 +1062,7 @@ void *handle_socket(void *arg)
if (!fsockout)
{
- rig_debug(RIG_DEBUG_ERR, "fdopen out: %s\n", strerror(errno));
+ rig_debug(RIG_DEBUG_ERR, "%s: fdopen out: %s\n", __func__, strerror(errno));
fclose(fsockin);
goto handle_exit;
commit fabec4a94cd277787d4692ba805c42bddcd61b22
Author: Mike Black W9MDB <mdb...@ya...>
Date: Sun May 30 06:48:12 2021 -0500
Improve rig_open error msg in rigctl.c and rigctld.c
diff --git a/tests/rigctl.c b/tests/rigctl.c
index fcb77a37..2a9437b0 100644
--- a/tests/rigctl.c
+++ b/tests/rigctl.c
@@ -552,7 +552,7 @@ int main(int argc, char *argv[])
if (retcode != RIG_OK)
{
- fprintf(stderr, "rig_open: error = %s \n", rigerror(retcode));
+ fprintf(stderr, "rig_open: error = %s %s %s \n", rigerror(retcode), rig_file, strerror(errno));
if (!ignore_rig_open_error) { exit(2); }
}
diff --git a/tests/rigctld.c b/tests/rigctld.c
index 10518521..b497a77e 100644
--- a/tests/rigctld.c
+++ b/tests/rigctld.c
@@ -666,7 +666,7 @@ int main(int argc, char *argv[])
if (retcode != RIG_OK)
{
- fprintf(stderr, "rig_open: error = %s \n", rigerror(retcode));
+ fprintf(stderr, "rig_open: error = %s %s %s \n", rigerror(retcode), rig_file, strerror(errno));
exit(2);
}
commit 263c16984ad0a15b0b51c4095611fffac47beac6
Author: Mikael Nousiainen <mik...@ik...>
Date: Sun May 30 01:36:49 2021 +0300
Attempt to handle asynchronously pushed Icom CI-V frames (transceive and spectrum data) as these frame will get interleaved with command responses
diff --git a/rigs/icom/frame.c b/rigs/icom/frame.c
index 3030b503..967535c2 100644
--- a/rigs/icom/frame.c
+++ b/rigs/icom/frame.c
@@ -23,9 +23,7 @@
#include "config.h"
#endif
-#include <stdlib.h>
#include <string.h> /* String function definitions */
-#include <unistd.h> /* UNIX standard function definitions */
#include "hamlib/rig.h"
#include "serial.h"
@@ -90,6 +88,26 @@ int make_cmd_frame(char frame[], char re_id, char ctrl_id, char cmd, int subcmd,
RETURNFUNC(i);
}
+int icom_frame_fix_preamble(int frame_len, unsigned char *frame)
+{
+ if (frame[0] == PR)
+ {
+ // Sometimes the second preamble byte is missing -> TODO: Find out why!
+ if (frame[1] != PR)
+ {
+ memmove(frame + 1, frame, frame_len);
+ frame_len++;
+ }
+ }
+ else
+ {
+ rig_debug(RIG_DEBUG_WARN, "%s: invalid Icom CI-V frame, no preamble found\n", __func__);
+ RETURNFUNC(-RIG_EPROTO);
+ }
+
+ return frame_len;
+}
+
/*
* icom_one_transaction
*
@@ -109,11 +127,12 @@ int icom_one_transaction(RIG *rig, int cmd, int subcmd,
struct icom_priv_data *priv;
const struct icom_priv_caps *priv_caps;
struct rig_state *rs;
+ struct timeval start_time, current_time, elapsed_time;
// this buf needs to be large enough for 0xfe strings for power up
// at 115,200 this is now at least 150
unsigned char buf[200];
unsigned char sendbuf[MAXFRAMELEN];
- int frm_len, retval;
+ int frm_len, frm_data_len, retval;
int ctrl_id;
ENTERFUNC;
@@ -168,12 +187,14 @@ int icom_one_transaction(RIG *rig, int cmd, int subcmd,
if (retval < 0)
{
+ Unhold_Decode(rig);
/* Other error, return it */
RETURNFUNC(retval);
}
if (retval < 1)
{
+ Unhold_Decode(rig);
RETURNFUNC(-RIG_EPROTO);
}
@@ -223,6 +244,9 @@ int icom_one_transaction(RIG *rig, int cmd, int subcmd,
RETURNFUNC(RIG_OK);
}
+ gettimeofday(&start_time, NULL);
+
+read_another_frame:
/*
* wait for ACK ...
* FIXME: handle padding/collisions
@@ -245,10 +269,9 @@ int icom_one_transaction(RIG *rig, int cmd, int subcmd,
#endif
- Unhold_Decode(rig);
-
if (frm_len < 0)
{
+ Unhold_Decode(rig);
/* RIG_TIMEOUT: timeout getting response, return timeout */
/* other error: return it */
RETURNFUNC(frm_len);
@@ -256,12 +279,23 @@ int icom_one_transaction(RIG *rig, int cmd, int subcmd,
if (frm_len < 1)
{
+ Unhold_Decode(rig);
RETURNFUNC(-RIG_EPROTO);
}
+ retval = icom_frame_fix_preamble(frm_len, buf);
+ if (retval < 0)
+ {
+ Unhold_Decode(rig);
+ RETURNFUNC(retval);
+ }
+
+ frm_len = retval;
+
switch (buf[frm_len - 1])
{
case COL:
+ Unhold_Decode(rig);
/* Collision */
RETURNFUNC(-RIG_BUSBUSY);
@@ -270,30 +304,70 @@ int icom_one_transaction(RIG *rig, int cmd, int subcmd,
break;
case NAK:
+ Unhold_Decode(rig);
RETURNFUNC(-RIG_ERJCTED);
default:
+ Unhold_Decode(rig);
/* Timeout after reading at least one character */
/* Problem on ci-v bus? */
RETURNFUNC(-RIG_EPROTO);
}
- if (frm_len < ACKFRMLEN) { RETURNFUNC(-RIG_EPROTO); }
+ if (frm_len < ACKFRMLEN)
+ {
+ Unhold_Decode(rig);
+ RETURNFUNC(-RIG_EPROTO);
+ }
// if we send a bad command we will get back a NAK packet
// e.g. fe fe e0 50 fa fd
- if (frm_len == 6 && NAK == buf[frm_len - 2]) { RETURNFUNC(-RIG_ERJCTED); }
+ if (frm_len == 6 && NAK == buf[frm_len - 2])
+ {
+ Unhold_Decode(rig);
+ RETURNFUNC(-RIG_ERJCTED);
+ }
rig_debug(RIG_DEBUG_TRACE, "%s: frm_len=%d, frm_len-1=%02x, frm_len-2=%02x\n",
__func__, frm_len, buf[frm_len - 1], buf[frm_len - 2]);
// has to be one of these two now or frame is corrupt
- if (FI != buf[frm_len - 1] && ACK != buf[frm_len - 1]) { RETURNFUNC(-RIG_BUSBUSY); }
+ if (FI != buf[frm_len - 1] && ACK != buf[frm_len - 1])
+ {
+ Unhold_Decode(rig);
+ RETURNFUNC(-RIG_BUSBUSY);
+ }
+
+ frm_data_len = frm_len - (ACKFRMLEN - 1);
+
+ if (frm_data_len <= 0)
+ {
+ Unhold_Decode(rig);
+ RETURNFUNC(-RIG_EPROTO);
+ }
+
+ if (icom_is_async_frame(rig, frm_len, buf))
+ {
+ int elapsed_ms;
+ icom_process_async_frame(rig, frm_len, buf);
+
+ gettimeofday(¤t_time, NULL);
+ timersub(¤t_time, &start_time, &elapsed_time);
- *data_len = frm_len - (ACKFRMLEN - 1);
+ elapsed_ms = (int) (elapsed_time.tv_sec * 1000 + elapsed_time.tv_usec / 1000);
- if (*data_len <= 0) { RETURNFUNC(-RIG_EPROTO); }
+ if (elapsed_ms > rs->rigport.timeout)
+ {
+ Unhold_Decode(rig);
+ RETURNFUNC(-RIG_ETIMEOUT);
+ }
+
+ goto read_another_frame;
+ }
+
+ Unhold_Decode(rig);
+ *data_len = frm_data_len;
memcpy(data, buf + 4, *data_len);
/*
diff --git a/rigs/icom/frame.h b/rigs/icom/frame.h
index b5d84621..0ffc7e0e 100644
--- a/rigs/icom/frame.h
+++ b/rigs/icom/frame.h
@@ -28,6 +28,7 @@
* helper functions
*/
int make_cmd_frame(char frame[], char re_id, char ctrl_id, char cmd, int subcmd, const unsigned char *data, int data_len);
+int icom_frame_fix_preamble(int frame_len, unsigned char *frame);
int icom_transaction (RIG *rig, int cmd, int subcmd, const unsigned char *payload, int payload_len, unsigned char *data, int *data_len);
int read_icom_frame(hamlib_port_t *p, unsigned char rxbuffer[], int rxbuffer_len);
diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c
index b81609d3..8f09cc21 100644
--- a/rigs/icom/icom.c
+++ b/rigs/icom/icom.c
@@ -7933,7 +7933,7 @@ int icom_mW2power(RIG *rig, float *power, unsigned int mwpower, freq_t freq,
RETURNFUNC(RIG_OK);
}
-static int icom_parse_spectrum_frame(RIG *rig, int length, unsigned char *frame_data)
+static int icom_parse_spectrum_frame(RIG *rig, int length, const unsigned char *frame_data)
{
struct rig_caps *caps = rig->caps;
struct icom_priv_caps *priv_caps = (struct icom_priv_caps *) caps->priv;
@@ -8059,6 +8059,88 @@ static int icom_parse_spectrum_frame(RIG *rig, int length, unsigned char *frame_
RETURNFUNC(RIG_OK);
}
+int icom_is_async_frame(RIG *rig, int frame_len, const unsigned char *frame)
+{
+ struct rig_state *rs = &rig->state;
+ struct icom_priv_data *priv = (struct icom_priv_data *) rs->priv;
+
+ if (frame_len < ACKFRMLEN)
+ {
+ return 0;
+ }
+
+ /* Spectrum scope data is not CI-V transceive data, but handled the same way as it is pushed by the rig */
+ return frame[2] == BCASTID || (frame[2] == CTRLID && frame[4] == C_CTL_SCP && frame[5] == S_SCP_DAT);
+}
+
+int icom_process_async_frame(RIG *rig, int frame_len, const unsigned char *frame)
+{
+ struct rig_state *rs = &rig->state;
+ struct icom_priv_data *priv = (struct icom_priv_data *) rs->priv;
+ rmode_t mode;
+ pbwidth_t width;
+
+ rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+
+ /*
+ * the first 2 bytes must be 0xfe
+ * the 3rd one 0x00 since this is transceive mode
+ * the 4rd one the emitter
+ * then the command number
+ * the rest is data
+ * and don't forget one byte at the end for the EOM
+ */
+ switch (frame[4])
+ {
+ case C_SND_FREQ:
+ /*
+ * TODO: the freq length might be less than 4 or 5 bytes
+ * on older rigs!
+ */
+ if (rig->callbacks.freq_event)
+ {
+ freq_t freq;
+ freq = from_bcd(frame + 5, (priv->civ_731_mode ? 4 : 5) * 2);
+ RETURNFUNC(rig->callbacks.freq_event(rig, RIG_VFO_CURR, freq,
+ rig->callbacks.freq_arg));
+ }
+ else
+ {
+ RETURNFUNC(-RIG_ENAVAIL);
+ }
+
+ break;
+
+ case C_SND_MODE:
+ if (rig->callbacks.mode_event)
+ {
+ icom2rig_mode(rig, frame[5], frame[6], &mode, &width);
+ RETURNFUNC(rig->callbacks.mode_event(rig, RIG_VFO_CURR,
+ mode, width, rig->callbacks.mode_arg));
+ }
+ else
+ {
+ RETURNFUNC(-RIG_ENAVAIL);
+ }
+
+ break;
+
+ case C_CTL_SCP:
+ if (frame[5] == S_SCP_DAT)
+ {
+ icom_parse_spectrum_frame(rig, frame_len - (6 + 1), frame + 6);
+ }
+ break;
+
+ default:
+ rig_debug(RIG_DEBUG_VERBOSE, "%s: transceive cmd unsupported %#2.2x\n",
+ __func__, frame[4]);
+ RETURNFUNC(-RIG_ENIMPL);
+ }
+
+ RETURNFUNC(RIG_OK);
+}
+
/*
* icom_decode is called by sa_sigio, when some asynchronous
* data has been received from the rig
@@ -8068,9 +8150,7 @@ int icom_decode_event(RIG *rig)
struct icom_priv_data *priv;
struct rig_state *rs;
unsigned char buf[MAXFRAMELEN];
- int frm_len;
- rmode_t mode;
- pbwidth_t width;
+ int retval, frm_len;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
@@ -8090,21 +8170,14 @@ int icom_decode_event(RIG *rig)
RETURNFUNC(0);
}
- if (buf[0] == PR)
+ retval = icom_frame_fix_preamble(frm_len, buf);
+ if (retval < 0)
{
- // Sometimes the second preamble byte is missing -> TODO: Find out why!
- if (buf[1] != PR)
- {
- memmove(buf + 1, buf, frm_len);
- frm_len++;
- }
- }
- else
- {
- rig_debug(RIG_DEBUG_WARN, "%s: invalid Icom CI-V frame, no preamble found\n", __func__);
- RETURNFUNC(-RIG_EPROTO);
+ RETURNFUNC(retval);
}
+ frm_len = retval;
+
switch (buf[frm_len - 1])
{
case COL:
@@ -8122,72 +8195,13 @@ int icom_decode_event(RIG *rig)
RETURNFUNC(-RIG_EPROTO);
}
- /* Spectrum scope data is not CI-V transceive data, but handled the same way as it is pushed by the rig */
- if (buf[3] != BCASTID && buf[3] != priv->re_civ_addr && buf[4] != C_CTL_SCP)
+ if (!icom_is_async_frame(rig, frm_len, buf))
{
rig_debug(RIG_DEBUG_WARN, "%s: CI-V %#x called for %#x!\n", __func__,
- priv->re_civ_addr, buf[3]);
- }
-
- /*
- * the first 2 bytes must be 0xfe
- * the 3rd one the emitter
- * the 4rd one 0x00 since this is transceive mode
- * then the command number
- * the rest is data
- * and don't forget one byte at the end for the EOM
- */
- switch (buf[4])
- {
- case C_SND_FREQ:
-
- /*
- * TODO: the freq length might be less than 4 or 5 bytes
- * on older rigs!
- */
- if (rig->callbacks.freq_event)
- {
- freq_t freq;
- freq = from_bcd(buf + 5, (priv->civ_731_mode ? 4 : 5) * 2);
- RETURNFUNC(rig->callbacks.freq_event(rig, RIG_VFO_CURR, freq,
- rig->callbacks.freq_arg));
- }
- else
- {
- RETURNFUNC(-RIG_ENAVAIL);
- }
-
- break;
-
- case C_SND_MODE:
- if (rig->callbacks.mode_event)
- {
- icom2rig_mode(rig, buf[5], buf[6], &mode, &width);
- RETURNFUNC(rig->callbacks.mode_event(rig, RIG_VFO_CURR,
- mode, width,
- rig->callbacks.mode_arg));
- }
- else
- {
- RETURNFUNC(-RIG_ENAVAIL);
- }
-
- break;
-
- case C_CTL_SCP:
- if (buf[5] == S_SCP_DAT)
- {
- icom_parse_spectrum_frame(rig, frm_len - (6 + 1), buf + 6);
- }
- break;
-
- default:
- rig_debug(RIG_DEBUG_VERBOSE, "%s: transceive cmd unsupported %#2.2x\n",
- __func__, buf[4]);
- RETURNFUNC(-RIG_ENIMPL);
+ priv->re_civ_addr, buf[2]);
}
- RETURNFUNC(RIG_OK);
+ RETURNFUNC(icom_process_async_frame(rig, frm_len, buf));
}
int icom_set_raw(RIG *rig, int cmd, int subcmd, int subcmdbuflen,
diff --git a/rigs/icom/icom.h b/rigs/icom/icom.h
index d9a2974b..29697889 100644
--- a/rigs/icom/icom.h
+++ b/rigs/icom/icom.h
@@ -387,6 +387,8 @@ int icom_set_custom_parm_time(RIG *rig, int parmbuflen, unsigned char *parmbuf,
int icom_get_custom_parm_time(RIG *rig, int parmbuflen, unsigned char *parmbuf,
int *seconds);
int icom_get_freq_range(RIG *rig);
+int icom_is_async_frame(RIG *rig, int frame_len, const unsigned char *frame);
+int icom_process_async_frame(RIG *rig, int frame_len, const unsigned char *frame);
extern const struct confparams icom_cfg_params[];
extern const struct confparams icom_ext_levels[];
diff --git a/src/misc.c b/src/misc.c
index 1cc7d65f..5e851016 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -1904,7 +1904,7 @@ int HAMLIB_API parse_hoststr(char *hoststr, char host[256], char port[6])
return -1;
}
-#undef RIG_FLUSH_REMOVE
+#define RIG_FLUSH_REMOVE
int HAMLIB_API rig_flush(hamlib_port_t *port)
{
#ifndef RIG_FLUSH_REMOVE
commit 503897c41cde9cd7100d08ce6c34624387c04299
Author: Mike Black W9MDB <mdb...@ya...>
Date: Thu May 27 23:40:33 2021 -0500
Fix debug msg in netrigctl.c
diff --git a/rigs/dummy/netrigctl.c b/rigs/dummy/netrigctl.c
index e8ceb1b5..7f6cb569 100644
--- a/rigs/dummy/netrigctl.c
+++ b/rigs/dummy/netrigctl.c
@@ -806,7 +806,7 @@ static int netrigctl_close(RIG *rig)
return ret;
}
- rig_debug(RIG_DEBUG_ERR, "%s: done status=%s\n", __func__, rigerror(ret));
+ rig_debug(RIG_DEBUG_ERR, "%s: done\n", __func__);
usleep(10 * 1000);
return RIG_OK;
-----------------------------------------------------------------------
Summary of changes:
rigs/dummy/netrigctl.c | 2 +-
rigs/icom/frame.c | 95 ++++++++++++++++++++++++---
rigs/icom/frame.h | 1 +
rigs/icom/icom.c | 171 ++++++++++++++++++++++++++-----------------------
rigs/icom/icom.h | 2 +
rigs/kenwood/kenwood.c | 1 -
src/event.c | 29 +++++++--
src/iofunc.c | 2 +-
src/misc.c | 2 +-
src/rig.c | 65 ++++++++++++++++---
tests/rigctl.c | 2 +-
tests/rigctl_parse.c | 37 +++++------
tests/rigctld.c | 22 +++++--
13 files changed, 295 insertions(+), 136 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Nate B. <n0...@us...> - 2021-05-27 16:02: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 92ed52b5f75dfaaa31d092e10737cf8ae8eaac41 (commit)
via 673a038de6e70ad0783970e8bf345ff82e9279e7 (commit)
via 903df5cb9509ce836f26a9a0dc2e680b962ecf20 (commit)
via 3c50d532739eedc0dddfca1d8b18da765b1ab964 (commit)
via ae2d79f52317f4892c566a2e27338d8a51f44b31 (commit)
via 7913de79e163e65cc473337ba5ca6c85f24d90d2 (commit)
via e52b4e7f2ab1379078ae0f1cd98164c23933245e (commit)
via de4bbd6a24a0ab5445965a29c152e686ad68d030 (commit)
via 12527581b01e1494e5713d53979f882584b3dabb (commit)
via 26ea916ca708d3f180072b74d0d509134b44cc2f (commit)
via a7de662937b1a286a5d801325bacaf075b0eeeb0 (commit)
via b4ba22d3697bccf155960e36e35f1e151cbcea8b (commit)
via a419ad0c4beb7fe5228905c56e983d1911bb205c (commit)
via 0f5995aaf5ca020be0bbdfb1350228983f860315 (commit)
via 8ded4461c27211de3a44a4929360164d93597b00 (commit)
via d2f7957e8b289b9259933c8a446b4112941ca31d (commit)
via ca6692c022f426c2642379f1d196fbafb8646666 (commit)
via a46d5b01bead153e8acd93b11c0f068db0f742c3 (commit)
via 36ac8cbd7c72ec70c9d177a25e0e034f4bb86754 (commit)
via f08881613e1bd87f01d97f2fd8d8a6666a67af95 (commit)
via 552fd6159bcd7a8325ec2d4878c3858ebb7d6e2d (commit)
via 8e63ce7a36236be4473b7373cab4ca0f97c326dc (commit)
via cbec6cd4bac237affd028173bb2b29119300c1c1 (commit)
via 556304d455af2ac6b7c796a2ee630855786528f3 (commit)
via ffeb98a0dae8795c685c546a1c9f84082ebd4378 (commit)
via 70482d0afa0bf1187bb83e4489999582126b8f62 (commit)
via 39951dc28802448c89511ebfb09fb35d3384bf0b (commit)
via 2acbd2217384f81ceaec2b6a9d9f92cf7448b0cb (commit)
via 238265f2ac8fcc9c3f68cb881f10df388a342b1b (commit)
via 3e4ff69b96b853f9aa86799e7c8b3d2435c78b2a (commit)
via 505698237521877fc1d03ae28b88235ad6f32b0c (commit)
via d6b54f491e13b2797e9c222003f892453e154f87 (commit)
via 4da43abdd0e23bea0057ea2481bd8b25ede6f006 (commit)
via 54e3efb4660795fc95bf4667a1dfa09b73fe05c7 (commit)
via 82c27e55ee78d7665645864dacf406f81bae9181 (commit)
via 3d780676b58ffba269803a1b25fbcdfaa8033be7 (commit)
via 35c5964f814d5939860e2c05b43ec83975010626 (commit)
via bcfd59f3affd60870d8388e222951471c159eca3 (commit)
via 86d2b4ee6c07bb7dd2af70a51567f2bc86adf4e6 (commit)
via c3441551e6fcf70d54c6cb315df5745f00e32652 (commit)
via 8b22a5a9a8bb384da2d759ec8f43e8e1cd295e16 (commit)
via 3a2531ad6875585cedcea15cfed57a2dcfa61b14 (commit)
via e27a6467d9d89de649d361d3463ee55cb122df50 (commit)
via b9f5bdb1a61c6710d024a40d5decc6b76a54e2fe (commit)
via ed180e26103fa450c8e201c4a1af3bf4f196723b (commit)
from 8d423e9cd133704b35712ce5359689dfe85d1464 (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 92ed52b5f75dfaaa31d092e10737cf8ae8eaac41
Author: Mike Black W9MDB <mdb...@ya...>
Date: Thu May 27 10:19:49 2021 -0500
Zero out response in flex6xxx.c -- was generating funky error messages
diff --git a/rigs/kenwood/flex6xxx.c b/rigs/kenwood/flex6xxx.c
index 387ada4b..4fca044b 100644
--- a/rigs/kenwood/flex6xxx.c
+++ b/rigs/kenwood/flex6xxx.c
@@ -580,10 +580,11 @@ int flex6k_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
{
const char *ptt_cmd;
int err;
- char response[16];
+ char response[16] = "";
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+
if (!ptt)
{
return -RIG_EINVAL;
@@ -606,7 +607,7 @@ int flex6k_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
int flex6k_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
{
const char *ptt_cmd;
- char response[16];
+ char response[16] = "";
int err;
int retry = 3;
@@ -1081,7 +1082,7 @@ const struct rig_caps f6k_caps =
RIG_MODEL(RIG_MODEL_F6K),
.model_name = "6xxx",
.mfg_name = "FlexRadio",
- .version = "20201227.0",
+ .version = "20210527.0",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,
@@ -1205,7 +1206,7 @@ const struct rig_caps powersdr_caps =
RIG_MODEL(RIG_MODEL_POWERSDR),
.model_name = "PowerSDR/Thetis",
.mfg_name = "FlexRadio/ANAN",
- .version = "20201231.0",
+ .version = "20210527.0",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,
commit 673a038de6e70ad0783970e8bf345ff82e9279e7
Merge: 903df5cb ae2d79f5
Author: Mike Black W9MDB <mdb...@ya...>
Date: Thu May 27 09:02:28 2021 -0500
Merge branch 'master' of https://github.com/Hamlib/Hamlib
commit 903df5cb9509ce836f26a9a0dc2e680b962ecf20
Author: Mike Black W9MDB <mdb...@ya...>
Date: Thu May 27 09:01:48 2021 -0500
Fix RIG_FLUSH_REMOVE #ifdef -- duh....
https://github.com/Hamlib/Hamlib/pull/712
diff --git a/src/misc.c b/src/misc.c
index 2b0c31fe..1cc7d65f 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -1907,7 +1907,7 @@ int HAMLIB_API parse_hoststr(char *hoststr, char host[256], char port[6])
#undef RIG_FLUSH_REMOVE
int HAMLIB_API rig_flush(hamlib_port_t *port)
{
-#ifdef RIG_FLUSH_REMOVE
+#ifndef RIG_FLUSH_REMOVE
rig_debug(RIG_DEBUG_TRACE, "%s: called for %s device\n", __func__,
port->type.rig == RIG_PORT_SERIAL ? "serial" : "network");
commit 3c50d532739eedc0dddfca1d8b18da765b1ab964
Merge: 7913de79 e52b4e7f
Author: Mike Black W9MDB <mdb...@ya...>
Date: Thu May 27 07:37:14 2021 -0500
Merge branch 'master' of https://github.com/Hamlib/Hamlib
commit ae2d79f52317f4892c566a2e27338d8a51f44b31
Merge: 7913de79 e52b4e7f
Author: Mike Black W9MDB <mdb...@ya...>
Date: Thu May 27 07:37:14 2021 -0500
Merge branch 'master' of https://github.com/Hamlib/Hamlib
commit 7913de79e163e65cc473337ba5ca6c85f24d90d2
Author: Mike Black W9MDB <mdb...@ya...>
Date: Thu May 27 07:35:46 2021 -0500
Allow testing removal of rig_flush()
https://github.com/Hamlib/Hamlib/pull/712
diff --git a/src/misc.c b/src/misc.c
index 7be0c169..a21550bf 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -1815,8 +1815,10 @@ int HAMLIB_API parse_hoststr(char *hoststr, char host[256], char port[6])
return -1;
}
+#undef RIG_FLUSH_REMOVE
int HAMLIB_API rig_flush(hamlib_port_t *port)
{
+#ifdef RIG_FLUSH_REMOVE
rig_debug(RIG_DEBUG_TRACE, "%s: called for %s device\n", __func__,
port->type.rig == RIG_PORT_SERIAL ? "serial" : "network");
@@ -1834,6 +1836,9 @@ int HAMLIB_API rig_flush(hamlib_port_t *port)
}
return serial_flush(port); // we must be on serial port
+#else
+ return RIG_OK;
+#endif
}
commit e52b4e7f2ab1379078ae0f1cd98164c23933245e
Merge: a419ad0c de4bbd6a
Author: Michael Black <mdb...@ya...>
Date: Thu May 27 07:31:27 2021 -0500
Merge pull request #712 from mikaelnousiainen/initial-spectrum-scope-support
Initial spectrum scope support
commit de4bbd6a24a0ab5445965a29c152e686ad68d030
Author: Mikael Nousiainen <mik...@ik...>
Date: Thu May 27 10:14:23 2021 +0300
Add comment about implementing spectrum data multicast
diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c
index bc88078d..1972aa56 100644
--- a/tests/rigctl_parse.c
+++ b/tests/rigctl_parse.c
@@ -4128,6 +4128,8 @@ static int myspectrum_event(RIG *rig, struct rig_spectrum_line *line, rig_ptr_t
rig_debug(RIG_DEBUG_TRACE, "%s: ASCII Spectrum Scope: %s\n", __func__, spectrum_debug);
}
+ // TODO: Push out spectrum data via multicast server once it is implemented
+
RETURNFUNC(0);
}
commit 12527581b01e1494e5713d53979f882584b3dabb
Author: Mikael Nousiainen <mik...@ik...>
Date: Thu May 27 10:12:01 2021 +0300
Add SPECTRUM_ATT level (also supported by Kenwood rigs). Get VFO frequency for Icom spectrum edge ranges (if not cached). Fix preamp levels based on docs. Add supported AGC levels to recent Icom rigs.
diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h
index 7e6c97db..badebe03 100644
--- a/include/hamlib/rig.h
+++ b/include/hamlib/rig.h
@@ -941,7 +941,7 @@ typedef uint64_t rig_level_e;
#define RIG_LEVEL_SPECTRUM_SPEED CONSTANT_64BIT_FLAG(44) /*!< \c SPECTRUM_SPEED -- Spectrum scope update speed, arg int (highest is fastest, define rig-specific granularity) */
#define RIG_LEVEL_SPECTRUM_REF CONSTANT_64BIT_FLAG(45) /*!< \c SPECTRUM_REF -- Spectrum scope reference display level, arg float (dB, define rig-specific granularity) */
#define RIG_LEVEL_SPECTRUM_AVG CONSTANT_64BIT_FLAG(46) /*!< \c SPECTRUM_AVG -- Spectrum scope averaging mode, arg int (see struct rig_spectrum_avg_mode). Supported averaging modes defined in rig caps. */
-#define RIG_LEVEL_47 CONSTANT_64BIT_FLAG(47) /*!< \c Future use */
+#define RIG_LEVEL_SPECTRUM_ATT CONSTANT_64BIT_FLAG(47) /*!< \c SPECTRUM_ATT -- Spectrum scope attenuator, arg int (dB). Supported attenuator values defined in rig caps. */
#define RIG_LEVEL_48 CONSTANT_64BIT_FLAG(48) /*!< \c Future use */
#define RIG_LEVEL_49 CONSTANT_64BIT_FLAG(49) /*!< \c Future use */
#define RIG_LEVEL_50 CONSTANT_64BIT_FLAG(50) /*!< \c Future use */
@@ -1744,7 +1744,7 @@ struct rig_caps {
tone_t *dcs_list; /*!< DCS code list, zero ended */
int preamp[HAMLIB_MAXDBLSTSIZ]; /*!< Preamp list in dB, 0 terminated */
- int attenuator[HAMLIB_MAXDBLSTSIZ]; /*!< Preamp list in dB, 0 terminated */
+ int attenuator[HAMLIB_MAXDBLSTSIZ]; /*!< Attenuator list in dB, 0 terminated */
shortfreq_t max_rit; /*!< max absolute RIT */
shortfreq_t max_xit; /*!< max absolute XIT */
shortfreq_t max_ifshift; /*!< max absolute IF-SHIFT */
@@ -1794,6 +1794,7 @@ struct rig_caps {
enum rig_spectrum_mode_e spectrum_modes[HAMLIB_MAX_SPECTRUM_MODES]; /*!< Supported spectrum scope modes. Last entry must be RIG_SPECTRUM_MODE_NONE. */
freq_t spectrum_spans[HAMLIB_MAX_SPECTRUM_SPANS]; /*!< Supported spectrum scope frequency spans in Hz in center mode. Last entry must be 0. */
struct rig_spectrum_avg_mode spectrum_avg_modes[HAMLIB_MAX_SPECTRUM_AVG_MODES]; /*!< Supported spectrum scope averaging modes. Last entry must have NULL name. */
+ int spectrum_attenuator[HAMLIB_MAXDBLSTSIZ]; /*!< Spectrum attenuator list in dB, 0 terminated */
const struct confparams *cfgparams; /*!< Configuration parameters. */
const rig_ptr_t priv; /*!< Private data. */
diff --git a/rigs/icom/ic7000.c b/rigs/icom/ic7000.c
index a14eaf74..25b8cbfa 100644
--- a/rigs/icom/ic7000.c
+++ b/rigs/icom/ic7000.c
@@ -24,17 +24,14 @@
#include "config.h"
#endif
-#include <stdlib.h>
#include <string.h> /* String function definitions */
#include <hamlib/rig.h>
-#include "token.h"
#include "idx_builtin.h"
#include "icom.h"
#include "icom_defs.h"
#include "frame.h"
-#include "misc.h"
#include "bandplan.h"
#define IC7000_ALL_RX_MODES (RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_CWR|RIG_MODE_SSB|RIG_MODE_RTTY|RIG_MODE_RTTYR|RIG_MODE_FM|RIG_MODE_WFM)
@@ -233,11 +230,13 @@ const struct rig_caps ic7000_caps =
.parm_gran = {},
.ctcss_list = common_ctcss_list,
.dcs_list = common_dcs_list,
- .preamp = { 10, RIG_DBLST_END, }, /* FIXME: TBC it's a guess*/
+ .preamp = { 10, RIG_DBLST_END, }, /* FIXME: TBC it's a guess */
.attenuator = { 12, RIG_DBLST_END, },
.max_rit = Hz(9999),
.max_xit = Hz(9999),
.max_ifshift = Hz(0), /* TODO */
+ .agc_level_count = 3,
+ .agc_levels = { RIG_AGC_FAST, RIG_AGC_MEDIUM, RIG_AGC_SLOW },
.targetable_vfo = 0,
.vfo_ops = IC7000_VFO_OPS,
.scan_ops = IC7000_SCAN_OPS,
diff --git a/rigs/icom/ic7100.c b/rigs/icom/ic7100.c
index c4f09c1b..d29550ce 100644
--- a/rigs/icom/ic7100.c
+++ b/rigs/icom/ic7100.c
@@ -244,11 +244,13 @@ const struct rig_caps ic7100_caps =
.parm_gran = {},
.ctcss_list = common_ctcss_list,
.dcs_list = common_dcs_list,
- .preamp = {20, RIG_DBLST_END, },
+ .preamp = { 1, 2, RIG_DBLST_END, },
.attenuator = {20, RIG_DBLST_END, },
.max_rit = kHz(9.999),
.max_xit = kHz(9.999),
.max_ifshift = Hz(0),
+ .agc_level_count = 3,
+ .agc_levels = { RIG_AGC_FAST, RIG_AGC_MEDIUM, RIG_AGC_SLOW },
.targetable_vfo = 0,
.vfo_ops = IC7100_VFO_OPS,
.scan_ops = IC7100_SCAN_OPS,
diff --git a/rigs/icom/ic7200.c b/rigs/icom/ic7200.c
index f54430a6..ee48205e 100644
--- a/rigs/icom/ic7200.c
+++ b/rigs/icom/ic7200.c
@@ -163,11 +163,13 @@ const struct rig_caps ic7200_caps =
.parm_gran = {},
.ctcss_list = NULL,
.dcs_list = NULL,
- .preamp = { 10, RIG_DBLST_END, }, /* FIXME: TBC it's a guess*/
+ .preamp = { 10, RIG_DBLST_END, }, /* FIXME: TBC it's a guess */
.attenuator = { 20, RIG_DBLST_END, }, /* value taken from p.45 of manual*/
.max_rit = Hz(9999),
.max_xit = Hz(9999),
.max_ifshift = Hz(0),
+ .agc_level_count = 3,
+ .agc_levels = { RIG_AGC_OFF, RIG_AGC_FAST, RIG_AGC_SLOW },
.targetable_vfo = 0,
.vfo_ops = IC7200_VFO_OPS,
.scan_ops = IC7200_SCAN_OPS,
diff --git a/rigs/icom/ic7300.c b/rigs/icom/ic7300.c
index 2c5413bd..6ef28f27 100644
--- a/rigs/icom/ic7300.c
+++ b/rigs/icom/ic7300.c
@@ -798,7 +798,7 @@ const struct rig_caps ic9700_caps =
.extlevels = icom_ext_levels,
.ctcss_list = full_ctcss_list,
.dcs_list = NULL,
- .preamp = { 1, 2, 3, RIG_DBLST_END, },
+ .preamp = { 1, 2, RIG_DBLST_END, },
.attenuator = { 10, RIG_DBLST_END, },
.max_rit = Hz(9999),
.max_xit = Hz(9999),
diff --git a/rigs/icom/ic7410.c b/rigs/icom/ic7410.c
index d4ffdfd2..fa94fdb6 100644
--- a/rigs/icom/ic7410.c
+++ b/rigs/icom/ic7410.c
@@ -167,6 +167,8 @@ const struct rig_caps ic7410_caps =
.max_rit = Hz(9999),
.max_xit = Hz(9999),
.max_ifshift = Hz(0),
+ .agc_level_count = 4,
+ .agc_levels = { RIG_AGC_OFF, RIG_AGC_FAST, RIG_AGC_MEDIUM, RIG_AGC_SLOW },
.targetable_vfo = 0,
.vfo_ops = IC7410_VFO_OPS,
.scan_ops = IC7410_SCAN_OPS,
diff --git a/rigs/icom/ic756.c b/rigs/icom/ic756.c
index a434f144..bcdb0baa 100644
--- a/rigs/icom/ic756.c
+++ b/rigs/icom/ic756.c
@@ -23,11 +23,9 @@
#include "config.h"
#endif
-#include <stdlib.h>
#include <string.h> /* String function definitions */
#include <hamlib/rig.h>
-#include "token.h"
#include "idx_builtin.h"
#include "icom.h"
@@ -36,7 +34,6 @@
#include "misc.h"
#include "bandplan.h"
-
#define IC756_ALL_RX_MODES (RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_CWR|RIG_MODE_SSB|RIG_MODE_RTTY|RIG_MODE_RTTYR|RIG_MODE_FM)
#define IC756_1HZ_TS_MODES IC756_ALL_RX_MODES
@@ -182,6 +179,8 @@ const struct rig_caps ic756_caps =
.max_rit = Hz(9999),
.max_xit = Hz(0),
.max_ifshift = Hz(0),
+ .agc_level_count = 3,
+ .agc_levels = { RIG_AGC_FAST, RIG_AGC_MEDIUM, RIG_AGC_SLOW },
.targetable_vfo = 0,
.vfo_ops = IC756_VFO_OPS,
.scan_ops = IC756_SCAN_OPS,
@@ -344,6 +343,8 @@ const struct rig_caps ic756pro_caps =
.max_rit = Hz(9999),
.max_xit = Hz(0),
.max_ifshift = Hz(0),
+ .agc_level_count = 3,
+ .agc_levels = { RIG_AGC_FAST, RIG_AGC_MEDIUM, RIG_AGC_SLOW },
.targetable_vfo = 0,
.vfo_ops = IC756_VFO_OPS,
.scan_ops = IC756_SCAN_OPS,
@@ -581,6 +582,8 @@ const struct rig_caps ic756pro2_caps =
.max_rit = Hz(9999),
.max_xit = Hz(9999),
.max_ifshift = Hz(0),
+ .agc_level_count = 3,
+ .agc_levels = { RIG_AGC_FAST, RIG_AGC_MEDIUM, RIG_AGC_SLOW },
.targetable_vfo = 0,
.vfo_ops = IC756_VFO_OPS,
.scan_ops = IC756_SCAN_OPS,
@@ -1011,6 +1014,8 @@ const struct rig_caps ic756pro3_caps =
.max_rit = Hz(9999),
.max_xit = Hz(9999),
.max_ifshift = Hz(0),
+ .agc_level_count = 3,
+ .agc_levels = { RIG_AGC_FAST, RIG_AGC_MEDIUM, RIG_AGC_SLOW },
.targetable_vfo = 0,
.vfo_ops = IC756_VFO_OPS | RIG_OP_TUNE,
.scan_ops = IC756_SCAN_OPS,
diff --git a/rigs/icom/ic7600.c b/rigs/icom/ic7600.c
index c8340caa..f1686661 100644
--- a/rigs/icom/ic7600.c
+++ b/rigs/icom/ic7600.c
@@ -205,11 +205,13 @@ const struct rig_caps ic7600_caps =
.extparms = icom_ext_parms,
.ctcss_list = common_ctcss_list,
.dcs_list = NULL,
- .preamp = { 10, 20, RIG_DBLST_END, }, /* FIXME: TBC */
+ .preamp = { 10, 16, RIG_DBLST_END, },
.attenuator = { 6, 12, 18, RIG_DBLST_END, },
.max_rit = Hz(9999),
.max_xit = Hz(9999),
.max_ifshift = Hz(0),
+ .agc_level_count = 3,
+ .agc_levels = { RIG_AGC_FAST, RIG_AGC_MEDIUM, RIG_AGC_SLOW },
.targetable_vfo = 0,
.vfo_ops = IC7600_VFO_OPS,
.scan_ops = IC7600_SCAN_OPS,
diff --git a/rigs/icom/ic7610.c b/rigs/icom/ic7610.c
index d25eed8e..50b80ca4 100644
--- a/rigs/icom/ic7610.c
+++ b/rigs/icom/ic7610.c
@@ -286,7 +286,7 @@ const struct rig_caps ic7610_caps =
.extlevels = icom_ext_levels,
.ctcss_list = common_ctcss_list,
.dcs_list = NULL,
- .preamp = { 10, 20, RIG_DBLST_END, }, /* FIXME: TBC */
+ .preamp = { 12, 20, RIG_DBLST_END, },
.attenuator = { 6, 12, 18, RIG_DBLST_END, },
.max_rit = Hz(9999),
.max_xit = Hz(9999),
diff --git a/rigs/icom/ic7700.c b/rigs/icom/ic7700.c
index 0a148453..16860597 100644
--- a/rigs/icom/ic7700.c
+++ b/rigs/icom/ic7700.c
@@ -23,7 +23,6 @@
#include "config.h"
#endif
-#include <stdlib.h>
#include <string.h> /* String function definitions */
#include <hamlib/rig.h>
@@ -32,8 +31,6 @@
#include "icom.h"
#include "icom_defs.h"
-#include "frame.h"
-#include "misc.h"
#include "bandplan.h"
#define IC7700_OTHER_TX_MODES (RIG_MODE_CW|RIG_MODE_CWR|RIG_MODE_SSB|RIG_MODE_RTTY|RIG_MODE_RTTYR|RIG_MODE_FM|RIG_MODE_PKTLSB|RIG_MODE_PKTUSB|RIG_MODE_PKTFM|RIG_MODE_PSK|RIG_MODE_PSKR)
@@ -193,6 +190,8 @@ const struct rig_caps ic7700_caps =
.max_rit = Hz(9999),
.max_xit = Hz(9999),
.max_ifshift = Hz(0),
+ .agc_level_count = 4,
+ .agc_levels = { RIG_AGC_OFF, RIG_AGC_FAST, RIG_AGC_MEDIUM, RIG_AGC_SLOW },
.targetable_vfo = 0,
.vfo_ops = IC7700_VFO_OPS,
.scan_ops = IC7700_SCAN_OPS,
diff --git a/rigs/icom/ic7800.c b/rigs/icom/ic7800.c
index 32d0dfec..9409da3d 100644
--- a/rigs/icom/ic7800.c
+++ b/rigs/icom/ic7800.c
@@ -23,7 +23,6 @@
#include "config.h"
#endif
-#include <stdlib.h>
#include <string.h> /* String function definitions */
#include <hamlib/rig.h>
@@ -32,8 +31,6 @@
#include "icom.h"
#include "icom_defs.h"
-#include "frame.h"
-#include "misc.h"
#include "bandplan.h"
#define IC7800_ALL_RX_MODES (RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_CWR|RIG_MODE_SSB|RIG_MODE_RTTY|RIG_MODE_RTTYR|RIG_MODE_FM|RIG_MODE_PSK|RIG_MODE_PSKR|RIG_MODE_PKTLSB|RIG_MODE_PKTUSB|RIG_MODE_PKTAM|RIG_MODE_PKTFM)
@@ -191,11 +188,13 @@ const struct rig_caps ic7800_caps =
.ext_tokens = ic7800_ext_tokens,
.ctcss_list = common_ctcss_list,
.dcs_list = NULL,
- .preamp = { 10, 20, RIG_DBLST_END, }, /* FIXME: TBC */
+ .preamp = { 10, 16, RIG_DBLST_END, },
.attenuator = { 3, 6, 9, 12, 15, 18, 21, RIG_DBLST_END, },
.max_rit = Hz(9999),
.max_xit = Hz(9999),
.max_ifshift = Hz(0),
+ .agc_level_count = 4,
+ .agc_levels = { RIG_AGC_OFF, RIG_AGC_FAST, RIG_AGC_MEDIUM, RIG_AGC_SLOW },
.targetable_vfo = RIG_TARGETABLE_FREQ | RIG_TARGETABLE_MODE,
.vfo_ops = IC7800_VFO_OPS,
.scan_ops = IC7800_SCAN_OPS,
diff --git a/rigs/icom/ic785x.c b/rigs/icom/ic785x.c
index 1f9e7f2a..813460d0 100644
--- a/rigs/icom/ic785x.c
+++ b/rigs/icom/ic785x.c
@@ -41,7 +41,7 @@
#define IC785x_FUNCS (RIG_FUNC_NB|RIG_FUNC_COMP|RIG_FUNC_VOX|RIG_FUNC_TONE|RIG_FUNC_TSQL|RIG_FUNC_SBKIN|RIG_FUNC_FBKIN|RIG_FUNC_NR|RIG_FUNC_MON|RIG_FUNC_MN|RIG_FUNC_ANF|RIG_FUNC_VSC|RIG_FUNC_LOCK|RIG_FUNC_RIT|RIG_FUNC_XIT|RIG_FUNC_TUNER|RIG_FUNC_APF|RIG_FUNC_DUAL_WATCH|RIG_FUNC_TRANSCEIVE|RIG_FUNC_SPECTRUM|RIG_FUNC_SPECTRUM_HOLD)
-#define IC785x_LEVELS (RIG_LEVEL_PREAMP|RIG_LEVEL_ATT|RIG_LEVEL_AGC|RIG_LEVEL_COMP|RIG_LEVEL_BKINDL|RIG_LEVEL_BALANCE|RIG_LEVEL_NR|RIG_LEVEL_PBT_IN|RIG_LEVEL_PBT_OUT|RIG_LEVEL_CWPITCH|RIG_LEVEL_RFPOWER|RIG_LEVEL_MICGAIN|RIG_LEVEL_KEYSPD|RIG_LEVEL_NOTCHF_RAW|RIG_LEVEL_SQL|RIG_LEVEL_RAWSTR|RIG_LEVEL_STRENGTH|RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_APF|RIG_LEVEL_VOXGAIN|RIG_LEVEL_ANTIVOX|RIG_LEVEL_VOXDELAY|RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_RFPOWER_METER_WATTS|RIG_LEVEL_COMP_METER|RIG_LEVEL_VD_METER|RIG_LEVEL_ID_METER|RIG_LEVEL_MONITOR_GAIN|RIG_LEVEL_NB|RIG_LEVEL_SPECTRUM_MODE|RIG_LEVEL_SPECTRUM_SPAN|RIG_LEVEL_SPECTRUM_SPEED|RIG_LEVEL_SPECTRUM_REF|RIG_LEVEL_SPECTRUM_AVG|RIG_LEVEL_SPECTRUM_EDGE_LOW|RIG_LEVEL_SPECTRUM_EDGE_HIGH)
+#define IC785x_LEVELS (RIG_LEVEL_PREAMP|RIG_LEVEL_ATT|RIG_LEVEL_AGC|RIG_LEVEL_COMP|RIG_LEVEL_BKINDL|RIG_LEVEL_BALANCE|RIG_LEVEL_NR|RIG_LEVEL_PBT_IN|RIG_LEVEL_PBT_OUT|RIG_LEVEL_CWPITCH|RIG_LEVEL_RFPOWER|RIG_LEVEL_MICGAIN|RIG_LEVEL_KEYSPD|RIG_LEVEL_NOTCHF_RAW|RIG_LEVEL_SQL|RIG_LEVEL_RAWSTR|RIG_LEVEL_STRENGTH|RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_APF|RIG_LEVEL_VOXGAIN|RIG_LEVEL_ANTIVOX|RIG_LEVEL_VOXDELAY|RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_RFPOWER_METER_WATTS|RIG_LEVEL_COMP_METER|RIG_LEVEL_VD_METER|RIG_LEVEL_ID_METER|RIG_LEVEL_MONITOR_GAIN|RIG_LEVEL_NB|RIG_LEVEL_SPECTRUM_MODE|RIG_LEVEL_SPECTRUM_SPAN|RIG_LEVEL_SPECTRUM_SPEED|RIG_LEVEL_SPECTRUM_REF|RIG_LEVEL_SPECTRUM_AVG|RIG_LEVEL_SPECTRUM_EDGE_LOW|RIG_LEVEL_SPECTRUM_EDGE_HIGH|RIG_LEVEL_SPECTRUM_ATT)
#define IC785x_VFOS (RIG_VFO_MAIN|RIG_VFO_SUB|RIG_VFO_MEM)
#define IC785x_PARMS (RIG_PARM_ANN|RIG_PARM_BACKLIGHT|RIG_PARM_TIME|RIG_PARM_BEEP)
@@ -280,11 +280,13 @@ const struct rig_caps ic785x_caps =
.extlevels = icom_ext_levels,
.ctcss_list = common_ctcss_list,
.dcs_list = NULL,
- .preamp = { 10, 20, RIG_DBLST_END, }, /* FIXME: TBC */
+ .preamp = { 12, 20, RIG_DBLST_END, },
.attenuator = { 3, 6, 9, 12, 15, 18, 21, RIG_DBLST_END, },
.max_rit = Hz(9999),
.max_xit = Hz(9999),
.max_ifshift = Hz(0),
+ .agc_level_count = 4,
+ .agc_levels = { RIG_AGC_OFF, RIG_AGC_FAST, RIG_AGC_MEDIUM, RIG_AGC_SLOW },
.agc_level_count = 3,
.agc_levels = { RIG_AGC_FAST, RIG_AGC_MEDIUM, RIG_AGC_SLOW },
.targetable_vfo = RIG_TARGETABLE_FREQ | RIG_TARGETABLE_MODE | RIG_TARGETABLE_SPECTRUM,
@@ -415,6 +417,7 @@ const struct rig_caps ic785x_caps =
.name = "4",
},
},
+ .spectrum_attenuator = { 10, 20, 30, RIG_DBLST_END, },
.cfgparams = icom_cfg_params,
.set_conf = icom_set_conf,
diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c
index 25c26c49..b81609d3 100644
--- a/rigs/icom/icom.c
+++ b/rigs/icom/icom.c
@@ -2789,7 +2789,7 @@ int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
if (i == HAMLIB_MAXDBLSTSIZ || rs->preamp[i] == 0)
{
- rig_debug(RIG_DEBUG_ERR, "%s: unsupported preamp set_level %ddB",
+ rig_debug(RIG_DEBUG_ERR, "%s: unsupported preamp set_level %ddB\n",
__func__, val.i);
RETURNFUNC(-RIG_EINVAL);
}
@@ -2937,7 +2937,7 @@ int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
break;
default:
- rig_debug(RIG_DEBUG_ERR, "%s: unsupported LEVEL_AGC %d",
+ rig_debug(RIG_DEBUG_ERR, "%s: unsupported LEVEL_AGC %d\n",
__func__, val.i);
RETURNFUNC(-RIG_EINVAL);
}
@@ -3010,7 +3010,7 @@ int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
icom_val = SCOPE_MODE_SCROLL_F;
break;
default:
- rig_debug(RIG_DEBUG_ERR, "%s: unsupported spectrum mode %d", __func__, val.i);
+ rig_debug(RIG_DEBUG_ERR, "%s: unsupported spectrum mode %d\n", __func__, val.i);
RETURNFUNC(-RIG_EINVAL);
}
@@ -3127,8 +3127,32 @@ int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
break;
}
+ case RIG_LEVEL_SPECTRUM_ATT:
+ lvl_cn = C_CTL_SCP;
+ lvl_sc = S_SCP_ATT;
+ cmd_len = 2;
+
+ for (i = 0; i < HAMLIB_MAXDBLSTSIZ; i++)
+ {
+ if (rig->caps->spectrum_attenuator[i] == val.i)
+ {
+ break;
+ }
+ }
+
+ if (val.i != 0 && (i == HAMLIB_MAXDBLSTSIZ || rig->caps->spectrum_attenuator[i] == 0))
+ {
+ rig_debug(RIG_DEBUG_ERR, "%s: unsupported spectrum attenuator level %ddB\n",
+ __func__, val.i);
+ RETURNFUNC(-RIG_EINVAL);
+ }
+
+ cmdbuf[0] = icom_get_spectrum_vfo(rig, vfo);
+ to_bcd(cmdbuf + 1, val.i, 5 * 2);
+ break;
+
default:
- rig_debug(RIG_DEBUG_ERR, "%s: unsupported set_level %s", __func__,
+ rig_debug(RIG_DEBUG_ERR, "%s: unsupported set_level %s\n", __func__,
rig_strlevel(level));
RETURNFUNC(-RIG_EINVAL);
}
@@ -3440,8 +3464,16 @@ int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
break;
}
+ case RIG_LEVEL_SPECTRUM_ATT:
+ lvl_cn = C_CTL_SCP;
+ lvl_sc = S_SCP_ATT;
+ cmd_len = 1;
+
+ cmdbuf[0] = icom_get_spectrum_vfo(rig, vfo);
+ break;
+
default:
- rig_debug(RIG_DEBUG_ERR, "%s: unsupported get_level %s", __func__,
+ rig_debug(RIG_DEBUG_ERR, "%s: unsupported get_level %s\n", __func__,
rig_strlevel(level));
RETURNFUNC(-RIG_EINVAL);
}
@@ -3502,7 +3534,7 @@ int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
if (!found)
{
- rig_debug(RIG_DEBUG_ERR, "%s: unexpected AGC 0x%02x", __func__,
+ rig_debug(RIG_DEBUG_ERR, "%s: unexpected AGC 0x%02x\n", __func__,
icom_val);
RETURNFUNC(-RIG_EPROTO);
}
@@ -3528,7 +3560,7 @@ int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
break;
default:
- rig_debug(RIG_DEBUG_ERR, "%s: unexpected AGC 0x%02x", __func__,
+ rig_debug(RIG_DEBUG_ERR, "%s: unexpected AGC 0x%02x\n", __func__,
icom_val);
RETURNFUNC(-RIG_EPROTO);
}
@@ -3650,7 +3682,7 @@ int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
if (icom_val > HAMLIB_MAXDBLSTSIZ || rs->preamp[icom_val - 1] == 0)
{
- rig_debug(RIG_DEBUG_ERR, "%s: unsupported preamp get_level %ddB",
+ rig_debug(RIG_DEBUG_ERR, "%s: unsupported preamp get_level %ddB\n",
__func__, icom_val);
RETURNFUNC(-RIG_EPROTO);
}
@@ -3674,7 +3706,7 @@ int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
val->i = RIG_SPECTRUM_MODE_FIXED_SCROLL;
break;
default:
- rig_debug(RIG_DEBUG_ERR, "%s: unsupported spectrum mode %d", __func__, icom_val);
+ rig_debug(RIG_DEBUG_ERR, "%s: unsupported spectrum mode %d\n", __func__, icom_val);
RETURNFUNC(-RIG_EINVAL);
}
break;
@@ -3698,7 +3730,7 @@ int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
val->i = 2;
break;
default:
- rig_debug(RIG_DEBUG_ERR, "%s: unsupported spectrum speed %d", __func__, icom_val);
+ rig_debug(RIG_DEBUG_ERR, "%s: unsupported spectrum speed %d\n", __func__, icom_val);
RETURNFUNC(-RIG_EINVAL);
}
break;
@@ -3727,7 +3759,7 @@ int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
val->i = (int) from_bcd(respbuf + cmdhead + 5, 5 * 2);
break;
- /* RIG_LEVEL_ATT: returned value is already an integer in dB (coded in BCD) */
+ /* RIG_LEVEL_ATT/RIG_LEVEL_SPECTRUM_ATT: returned value is already an integer in dB (coded in BCD) */
default:
if (RIG_LEVEL_IS_FLOAT(level))
{
@@ -3889,7 +3921,7 @@ int icom_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val)
else { i++; }
}
- rig_debug(RIG_DEBUG_ERR, "%s: unsupported set_ext_level token: %ld", __func__, token);
+ rig_debug(RIG_DEBUG_ERR, "%s: unsupported set_ext_level token: %ld\n", __func__, token);
RETURNFUNC(-RIG_EINVAL);
}
@@ -3995,7 +4027,7 @@ int icom_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val)
else { i++; }
}
- rig_debug(RIG_DEBUG_ERR, "%s: unsupported get_ext_level token: %ld", __func__, token);
+ rig_debug(RIG_DEBUG_ERR, "%s: unsupported get_ext_level token: %ld\n", __func__, token);
RETURNFUNC(-RIG_EINVAL);
}
@@ -4427,7 +4459,7 @@ int icom_set_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift)
break;
default:
- rig_debug(RIG_DEBUG_ERR, "%s: unsupported shift %d", __func__,
+ rig_debug(RIG_DEBUG_ERR, "%s: unsupported shift %d\n", __func__,
rptr_shift);
RETURNFUNC(-RIG_EINVAL);
}
@@ -4512,7 +4544,7 @@ int icom_get_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift)
break;
default:
- rig_debug(RIG_DEBUG_ERR, "%s: unsupported shift %d", __func__,
+ rig_debug(RIG_DEBUG_ERR, "%s: unsupported shift %d\n", __func__,
rptrbuf[1]);
RETURNFUNC(-RIG_EPROTO);
}
@@ -8527,6 +8559,16 @@ static int icom_get_spectrum_edge_frequency_range(RIG *rig, vfo_t vfo, int *rang
RETURNFUNC(retval);
}
+ // Get frequency if it is not cached or value is old
+ if (freq == 0 || cache_ms_freq >= 1000)
+ {
+ retval = rig_get_freq(rig, vfo, &freq);
+ if (retval != RIG_OK)
+ {
+ RETURNFUNC(retval);
+ }
+ }
+
for (i = 0; i < ICOM_MAX_SPECTRUM_FREQ_RANGES; i++)
{
int id = priv_caps->spectrum_edge_frequency_ranges[i].range_id;
diff --git a/rigs/icom/icom.h b/rigs/icom/icom.h
index 7ab80a92..d9a2974b 100644
--- a/rigs/icom/icom.h
+++ b/rigs/icom/icom.h
@@ -229,8 +229,7 @@ struct icom_priv_caps
int offs_len; /*!< Number of bytes in offset frequency field. 0 defaults to 3 */
int serial_USB_echo_check; /*!< Flag to test USB echo state */
int agc_levels_present; /*!< Flag to indicate that agc_levels array is populated */
- struct icom_agc_level agc_levels[RIG_AGC_LAST +
- 1]; /*!< Icom rig-specific AGC levels, the last entry should have level -1 */
+ struct icom_agc_level agc_levels[RIG_AGC_LAST + 1]; /*!< Icom rig-specific AGC levels, the last entry should have level -1 */
struct icom_spectrum_scope_caps spectrum_scope_caps; /*!< Icom spectrum scope capabilities, if supported by the rig. Main/Sub scopes in Icom rigs have the same caps. */
struct icom_spectrum_edge_frequency_range spectrum_edge_frequency_ranges[ICOM_MAX_SPECTRUM_FREQ_RANGES]; /*!< Icom spectrum scope edge frequencies, if supported by the rig. Last entry should have zeros in all fields. */
struct cmdparams *extcmds; /*!< Pointer to extended operations array */
diff --git a/src/idx_builtin.h b/src/idx_builtin.h
index 73263dbf..955cd921 100644
--- a/src/idx_builtin.h
+++ b/src/idx_builtin.h
@@ -161,8 +161,8 @@
#define LVL_SPECTRUM_SPEED setting2idx_builtin(RIG_LEVEL_SPECTRUM_SPEED)
#define LVL_SPECTRUM_REF setting2idx_builtin(RIG_LEVEL_SPECTRUM_REF)
#define LVL_SPECTRUM_AVG setting2idx_builtin(RIG_LEVEL_SPECTRUM_AVG)
+#define LVL_SPECTRUM_ATT setting2idx_builtin(RIG_LEVEL_SPECTRUM_ATT)
-#define LVL_47 setting2idx_builtin(RIG_LEVEL_47)
#define LVL_48 setting2idx_builtin(RIG_LEVEL_48)
#define LVL_49 setting2idx_builtin(RIG_LEVEL_49)
#define LVL_50 setting2idx_builtin(RIG_LEVEL_50)
diff --git a/src/misc.c b/src/misc.c
index 4f8f9990..ee772a95 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -868,6 +868,7 @@ static struct
{ RIG_LEVEL_SPECTRUM_SPEED, "SPECTRUM_SPEED" },
{ RIG_LEVEL_SPECTRUM_REF, "SPECTRUM_REF" },
{ RIG_LEVEL_SPECTRUM_AVG, "SPECTRUM_AVG" },
+ { RIG_LEVEL_SPECTRUM_ATT, "SPECTRUM_ATT" },
{ RIG_LEVEL_NONE, "" },
};
diff --git a/tests/dumpcaps.c b/tests/dumpcaps.c
index 22301ab5..80d1ff2c 100644
--- a/tests/dumpcaps.c
+++ b/tests/dumpcaps.c
@@ -721,6 +721,20 @@ int dumpcaps(RIG *rig, FILE *fout)
rig_sprintf_spectrum_avg_modes(prntbuf, sizeof(prntbuf), caps->spectrum_avg_modes);
fprintf(fout, "Spectrum averaging modes: %s\n", prntbuf);
+ fprintf(fout, "Spectrum attenuator:");
+
+ for (i = 0; i < HAMLIB_MAXDBLSTSIZ && caps->spectrum_attenuator[i] != 0; i++)
+ {
+ fprintf(fout, " %ddB", caps->spectrum_attenuator[i]);
+ }
+
+ if (i == 0)
+ {
+ fprintf(fout, " None");
+ }
+
+ fprintf(fout, "\n");
+
fprintf(fout, "Has priv data:\t%c\n", caps->priv != NULL ? 'Y' : 'N');
/*
* Status is either 'Y'es, 'E'mulated, 'N'o
commit 26ea916ca708d3f180072b74d0d509134b44cc2f
Author: Mikael Nousiainen <mik...@ik...>
Date: Thu May 27 01:09:01 2021 +0300
Implement Icom rig levels: SPECTRUM_EDGE_LOW and SPECTRUM_EDGE_HIGH
diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c
index c4d5e426..25c26c49 100644
--- a/rigs/icom/icom.c
+++ b/rigs/icom/icom.c
@@ -47,6 +47,7 @@
static int set_vfo_curr(RIG *rig, vfo_t vfo, vfo_t curr_vfo);
static int icom_set_default_vfo(RIG *rig);
static int icom_get_spectrum_vfo(RIG *rig, vfo_t vfo);
+static int icom_get_spectrum_edge_frequency_range(RIG *rig, vfo_t vfo, int *range_id);
const cal_table_float_t icom_default_swr_cal =
{
@@ -3075,6 +3076,57 @@ int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
break;
}
+ case RIG_LEVEL_SPECTRUM_EDGE_LOW:
+ case RIG_LEVEL_SPECTRUM_EDGE_HIGH: {
+ int range_id;
+ value_t edge_number_value;
+ value_t opposite_edge_value;
+ setting_t level_opposite_edge =
+ (level == RIG_LEVEL_SPECTRUM_EDGE_LOW) ?
+ RIG_LEVEL_SPECTRUM_EDGE_HIGH : RIG_LEVEL_SPECTRUM_EDGE_LOW;
+
+ lvl_cn = C_CTL_SCP;
+ lvl_sc = S_SCP_FEF;
+ cmd_len = 12;
+
+ // Modify the frequency range currently active
+ retval = icom_get_spectrum_edge_frequency_range(rig, vfo, &range_id);
+ if (retval != RIG_OK)
+ {
+ rig_debug(RIG_DEBUG_ERR, "%s: error getting spectrum edge frequency range\n", __func__);
+ RETURNFUNC(retval);
+ }
+
+ // Modify the edge number currently active
+ retval = icom_get_ext_level(rig, vfo, TOK_SCOPE_EDG, &edge_number_value);
+ if (retval != RIG_OK)
+ {
+ RETURNFUNC(retval);
+ }
+
+ // Get the current opposite edge frequency
+ retval = icom_get_level(rig, vfo, level_opposite_edge, &opposite_edge_value);
+ if (retval != RIG_OK)
+ {
+ RETURNFUNC(retval);
+ }
+
+ to_bcd(cmdbuf, range_id, 1 * 2);
+ to_bcd(cmdbuf + 1, edge_number_value.i + 1, 1 * 2);
+
+ if (level == RIG_LEVEL_SPECTRUM_EDGE_LOW)
+ {
+ to_bcd(cmdbuf + 2, val.i, 5 * 2);
+ to_bcd(cmdbuf + 7, opposite_edge_value.i, 5 * 2);
+ }
+ else
+ {
+ to_bcd(cmdbuf + 2, opposite_edge_value.i, 5 * 2);
+ to_bcd(cmdbuf + 7, val.i, 5 * 2);
+ }
+ break;
+ }
+
default:
rig_debug(RIG_DEBUG_ERR, "%s: unsupported set_level %s", __func__,
rig_strlevel(level));
@@ -3346,7 +3398,6 @@ int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
case RIG_LEVEL_SPECTRUM_SPEED:
lvl_cn = C_CTL_SCP;
lvl_sc = S_SCP_SWP;
- resp_len = 2;
cmd_len = 1;
cmdbuf[0] = icom_get_spectrum_vfo(rig, vfo);
@@ -3360,6 +3411,35 @@ int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
cmdbuf[0] = icom_get_spectrum_vfo(rig, vfo);
break;
+ case RIG_LEVEL_SPECTRUM_EDGE_LOW:
+ case RIG_LEVEL_SPECTRUM_EDGE_HIGH: {
+ int range_id;
+ value_t edge_number_value;
+
+ lvl_cn = C_CTL_SCP;
+ lvl_sc = S_SCP_FEF;
+ cmd_len = 2;
+
+ // Get the frequency range currently active
+ retval = icom_get_spectrum_edge_frequency_range(rig, vfo, &range_id);
+ if (retval != RIG_OK)
+ {
+ rig_debug(RIG_DEBUG_ERR, "%s: error getting spectrum edge frequency range\n", __func__);
+ RETURNFUNC(retval);
+ }
+
+ // Get the edge number currently active
+ retval = icom_get_ext_level(rig, vfo, TOK_SCOPE_EDG, &edge_number_value);
+ if (retval != RIG_OK)
+ {
+ RETURNFUNC(retval);
+ }
+
+ to_bcd(cmdbuf, range_id, 1 * 2);
+ to_bcd(cmdbuf + 1, edge_number_value.i + 1, 1 * 2);
+ break;
+ }
+
default:
rig_debug(RIG_DEBUG_ERR, "%s: unsupported get_level %s", __func__,
rig_strlevel(level));
@@ -3639,6 +3719,14 @@ int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
break;
}
+ case RIG_LEVEL_SPECTRUM_EDGE_LOW:
+ val->i = (int) from_bcd(respbuf + cmdhead, 5 * 2);
+ break;
+
+ case RIG_LEVEL_SPECTRUM_EDGE_HIGH:
+ val->i = (int) from_bcd(respbuf + cmdhead + 5, 5 * 2);
+ break;
+
/* RIG_LEVEL_ATT: returned value is already an integer in dB (coded in BCD) */
default:
if (RIG_LEVEL_IS_FLOAT(level))
@@ -8418,10 +8506,42 @@ static int icom_get_spectrum_vfo(RIG *rig, vfo_t vfo)
{
if (rig->caps->targetable_vfo & RIG_TARGETABLE_SPECTRUM)
{
- return ICOM_GET_VFO_NUMBER(vfo);
+ RETURNFUNC(ICOM_GET_VFO_NUMBER(vfo));
+ }
+
+ RETURNFUNC(0);
+}
+
+static int icom_get_spectrum_edge_frequency_range(RIG *rig, vfo_t vfo, int *range_id)
+{
+ freq_t freq;
+ rmode_t mode;
+ pbwidth_t width;
+ int cache_ms_freq, cache_ms_mode, cache_ms_width;
+ int i, retval;
+ struct icom_priv_caps *priv_caps = (struct icom_priv_caps *) rig->caps->priv;
+
+ retval = rig_get_cache(rig, vfo, &freq, &cache_ms_freq, &mode, &cache_ms_mode, &width, &cache_ms_width);
+ if (retval != RIG_OK)
+ {
+ RETURNFUNC(retval);
+ }
+
+ for (i = 0; i < ICOM_MAX_SPECTRUM_FREQ_RANGES; i++)
+ {
+ int id = priv_caps->spectrum_edge_frequency_ranges[i].range_id;
+ if (id < 1)
+ {
+ break;
+ }
+ if (freq >= priv_caps->spectrum_edge_frequency_ranges[i].low_freq && freq < priv_caps->spectrum_edge_frequency_ranges[i].high_freq)
+ {
+ *range_id = id;
+ RETURNFUNC(RIG_OK);
+ }
}
- return 0;
+ RETURNFUNC(-RIG_EINVAL);
}
/*
commit a7de662937b1a286a5d801325bacaf075b0eeeb0
Merge: b4ba22d3 a419ad0c
Author: Mikael Nousiainen <mik...@ik...>
Date: Wed May 26 23:41:38 2021 +0300
Merge branch 'master' into initial-spectrum-scope-support
commit b4ba22d3697bccf155960e36e35f1e151cbcea8b
Author: Mikael Nousiainen <mik...@ik...>
Date: Wed May 26 23:40:53 2021 +0300
Implemented initial abstraction for spectrum scope data and support for Icom spectrum data output. The abstraction is based on common features of both Icom and Kenwood rigs. Added TRANSCEIVE func and enumeration of supported AGC levels. Work in progress.
diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h
index fbba054a..c4e5ae12 100644
--- a/include/hamlib/rig.h
+++ b/include/hamlib/rig.h
@@ -195,6 +195,11 @@ typedef struct s_rig RIG;
#define HAMLIB_FLTLSTSIZ 60 /* max mode/filter list size, zero ended */
#define HAMLIB_MAXDBLSTSIZ 8 /* max preamp/att levels supported, zero ended */
#define HAMLIB_CHANLSTSIZ 16 /* max mem_list size, zero ended */
+#define HAMLIB_MAX_AGC_LEVELS 8 /* max AGC levels supported */
+#define HAMLIB_MAX_SPECTRUM_SCOPES 4 /* max number of spectrum scopes supported */
+#define HAMLIB_MAX_SPECTRUM_MODES 5 /* max number of spectrum modes supported */
+#define HAMLIB_MAX_SPECTRUM_AVG_MODES 12 /* max number of spectrum averaging modes supported */
+#define HAMLIB_MAX_SPECTRUM_SPANS 20 /* max number of spectrum modes supported */
#define HAMLIB_MAX_CAL_LENGTH 32 /* max calibration plots in cal_table_t */
#define HAMLIB_MAX_MODES 63
#define HAMLIB_MAX_VFOS 31
@@ -504,6 +509,7 @@ typedef unsigned int vfo_t;
#define RIG_TARGETABLE_BANK (1<<9)
#define RIG_TARGETABLE_ANT (1<<10)
#define RIG_TARGETABLE_ROOFING (1<<11) // roofing filter targetable by VFO
+#define RIG_TARGETABLE_SPECTRUM (1<<12) // spectrum scope targetable by VFO
#define RIG_TARGETABLE_COMMON (RIG_TARGETABLE_RITXIT | RIG_TARGETABLE_PTT | RIG_TARGETABLE_MEM | RIG_TARGETABLE_BANK)
#define RIG_TARGETABLE_ALL 0x7fffffff
//! @endcond
@@ -920,13 +926,13 @@ typedef uint64_t rig_level_e;
#define RIG_LEVEL_MONITOR_GAIN CONSTANT_64BIT_FLAG(37) /*!< \c MONITOR_GAIN -- Monitor gain (level for monitoring of transmitted audio) arg float [0.0 ... 1.0] */
#define RIG_LEVEL_NB CONSTANT_64BIT_FLAG(38) /*!< \c NB -- Noise Blanker level, arg float [0.0 ... 1.0] */
#define RIG_LEVEL_RFPOWER_METER_WATTS CONSTANT_64BIT_FLAG(39) /*!< \c RFPOWER_METER_WATTS -- RF power output meter, arg float [0.0 ... MAX] (output power in watts) */
-#define RIG_LEVEL_40 CONSTANT_64BIT_FLAG(40) /*!< \c Future use */
-#define RIG_LEVEL_41 CONSTANT_64BIT_FLAG(41) /*!< \c Future use */
-#define RIG_LEVEL_42 CONSTANT_64BIT_FLAG(42) /*!< \c Future use */
-#define RIG_LEVEL_43 CONSTANT_64BIT_FLAG(43) /*!< \c Future use */
-#define RIG_LEVEL_44 CONSTANT_64BIT_FLAG(44) /*!< \c Future use */
-#define RIG_LEVEL_45 CONSTANT_64BIT_FLAG(45) /*!< \c Future use */
-#define RIG_LEVEL_46 CONSTANT_64BIT_FLAG(46) /*!< \c Future use */
+#define RIG_LEVEL_SPECTRUM_MODE CONSTANT_64BIT_FLAG(40) /*!< \c SPECTRUM_MODE -- Spectrum scope mode, arg int (see enum rig_spectrum_mode_e). Supported modes defined in rig caps. */
+#define RIG_LEVEL_SPECTRUM_SPAN CONSTANT_64BIT_FLAG(41) /*!< \c SPECTRUM_SPAN -- Spectrum scope span in center mode, arg int (Hz). Supported spans defined in rig caps. */
+#define RIG_LEVEL_SPECTRUM_EDGE_LOW CONSTANT_64BIT_FLAG(42) /*!< \c SPECTRUM_EDGE_LOW -- Spectrum scope low edge in fixed mode, arg int (Hz) */
+#define RIG_LEVEL_SPECTRUM_EDGE_HIGH CONSTANT_64BIT_FLAG(43) /*!< \c SPECTRUM_EDGE_HIGH -- Spectrum scope high edge in fixed mode, arg int (Hz) */
+#define RIG_LEVEL_SPECTRUM_SPEED CONSTANT_64BIT_FLAG(44) /*!< \c SPECTRUM_SPEED -- Spectrum scope update speed, arg int (highest is fastest, define rig-specific granularity) */
+#define RIG_LEVEL_SPECTRUM_REF CONSTANT_64BIT_FLAG(45) /*!< \c SPECTRUM_REF -- Spectrum scope reference display level, arg float (dB, define rig-specific granularity) */
+#define RIG_LEVEL_SPECTRUM_AVG CONSTANT_64BIT_FLAG(46) /*!< \c SPECTRUM_AVG -- Spectrum scope averaging mode, arg int (see struct rig_spectrum_avg_mode). Supported averaging modes defined in rig caps. */
#define RIG_LEVEL_47 CONSTANT_64BIT_FLAG(47) /*!< \c Future use */
#define RIG_LEVEL_48 CONSTANT_64BIT_FLAG(48) /*!< \c Future use */
#define RIG_LEVEL_49 CONSTANT_64BIT_FLAG(49) /*!< \c Future use */
@@ -946,7 +952,7 @@ typedef uint64_t rig_level_e;
#define RIG_LEVEL_63 CONSTANT_64BIT_FLAG(63) /*!< \c Future use */
//! @cond Doxygen_Suppress
-#define RIG_LEVEL_FLOAT_LIST (RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_SQL|RIG_LEVEL_APF|RIG_LEVEL_NR|RIG_LEVEL_PBT_IN|RIG_LEVEL_PBT_OUT|RIG_LEVEL_RFPOWER|RIG_LEVEL_MICGAIN|RIG_LEVEL_COMP|RIG_LEVEL_BALANCE|RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_VOXGAIN|RIG_LEVEL_ANTIVOX|RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_RFPOWER_METER_WATTS|RIG_LEVEL_COMP_METER|RIG_LEVEL_VD_METER|RIG_LEVEL_ID_METER|RIG_LEVEL_NOTCHF_RAW|RIG_LEVEL_MONITOR_GAIN|RIG_LEVEL_NB)
+#define RIG_LEVEL_FLOAT_LIST (RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_SQL|RIG_LEVEL_APF|RIG_LEVEL_NR|RIG_LEVEL_PBT_IN|RIG_LEVEL_PBT_OUT|RIG_LEVEL_RFPOWER|RIG_LEVEL_MICGAIN|RIG_LEVEL_COMP|RIG_LEVEL_BALANCE|RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_VOXGAIN|RIG_LEVEL_ANTIVOX|RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_RFPOWER_METER_WATTS|RIG_LEVEL_COMP_METER|RIG_LEVEL_VD_METER|RIG_LEVEL_ID_METER|RIG_LEVEL_NOTCHF_RAW|RIG_LEVEL_MONITOR_GAIN|RIG_LEVEL_NB|RIG_LEVEL_SPECTRUM_REF)
#define RIG_LEVEL_READONLY_LIST (RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_STRENGTH|RIG_LEVEL_RAWSTR|RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_COMP_METER|RIG_LEVEL_VD_METER|RIG_LEVEL_ID_METER)
@@ -1012,14 +1018,14 @@ typedef uint64_t setting_t;
#define RIG_SETTING_MAX 64
/**
- * \brief Tranceive mode
+ * \brief Transceive mode
* The rig notifies the host of any event, like freq changed, mode changed, etc.
* \def RIG_TRN_OFF
* Turn it off
- * \brief Tranceive mode
+ * \brief Transceive mode
* \def RIG_TRN_RIG
- * RIG_TRN_RIG means the rig acts asynchrousnly
- * \brief Tranceive mode
+ * RIG_TRN_RIG means the rig acts asynchronously
+ * \brief Transceive mode
* \def RIG_TRN_POLL
* RIG_TRN_POLL means we have to poll the rig
*
@@ -1091,9 +1097,9 @@ typedef uint64_t setting_t;
#define RIG_FUNC_DSQL CONSTANT_64BIT_FLAG (39) /*!< \c DSQL -- Digital modes squelch */
#define RIG_FUNC_SCEN CONSTANT_64BIT_FLAG (40) /*!< \c SCEN -- scrambler/encryption */
#define RIG_FUNC_SLICE CONSTANT_64BIT_FLAG (41) /*!< \c Rig slice selection -- Flex */
-#define RIG_FUNC_BIT42 CONSTANT_64BIT_FLAG (42) /*!< \c available for future RIG_FUNC items */
-#define RIG_FUNC_BIT43 CONSTANT_64BIT_FLAG (43) /*!< \c available for future RIG_FUNC items */
-#define RIG_FUNC_BIT44 CONSTANT_64BIT_FLAG (44) /*!< \c available for future RIG_FUNC items */
+#define RIG_FUNC_TRANSCEIVE CONSTANT_64BIT_FLAG (42) /*!< \c TRANSCEIVE -- Send radio state changes automatically ON/OFF */
+#define RIG_FUNC_SPECTRUM CONSTANT_64BIT_FLAG (43) /*!< \c SPECTRUM -- Spectrum scope data output ON/OFF */
+#define RIG_FUNC_SPECTRUM_HOLD CONSTANT_64BIT_FLAG (44) /*!< \c SPECTRUM_HOLD -- Pause spectrum scope updates ON/OFF */
#define RIG_FUNC_BIT45 CONSTANT_64BIT_FLAG (45) /*!< \c available for future RIG_FUNC items */
#define RIG_FUNC_BIT46 CONSTANT_64BIT_FLAG (46) /*!< \c available for future RIG_FUNC items */
#define RIG_FUNC_BIT47 CONSTANT_64BIT_FLAG (47) /*!< \c available for future RIG_FUNC items */
@@ -1594,6 +1600,66 @@ typedef int (* confval_cb_t)(RIG *,
rig_ptr_t);
//! @endcond
+/**
+ * \brief Spectrum scope
+ */
+struct rig_spectrum_scope
+{
+ int id;
+ char *name;
+};
+
+/**
+ * \brief Spectrum scope modes
+ */
+enum rig_spectrum_mode_e {
+ RIG_SPECTRUM_MODE_NONE = 0,
+ RIG_SPECTRUM_MODE_CENTER, /*!< Spectrum scope centered around the VFO frequency */
+ RIG_SPECTRUM_MODE_FIXED, /*!< Spectrum scope edge frequencies are fixed */
+ RIG_SPECTRUM_MODE_CENTER_SCROLL, /*!< Spectrum scope edge frequencies are fixed, but identical to what the center mode would use. Scrolling is enabled. */
+ RIG_SPECTRUM_MODE_FIXED_SCROLL, /*!< Spectrum scope edge frequencies are fixed with scrolling enabled */
+};
+
+/**
+ * \brief Spectrum scope averaging modes
+ */
+struct rig_spectrum_avg_mode
+{
+ int id;
+ char *name;
+};
+
+/**
+ * \brief Represents a single line of rig spectrum scope FFT data.
+ *
+ * The data levels specify the range of the spectrum scope FFT data.
+ * The minimum level should represent the lowest numeric value and the lowest signal level in dB.
+ * The maximum level should represent the highest numeric value and the highest signal level in dB.
+ * The data level values are assumed to represent the dB strength scale in a linear way.
+ *
+ * Note that the data level and signal strength ranges may change depending on the settings of the rig.
+ * At least on Kenwood the sub-scope provides different kind of data compared to the main scope.
+ */
+struct rig_spectrum_line
+{
+ int id; /*!< Numeric ID of the spectrum scope data stream identifying the VFO/receiver. First ID is zero. Rigs with multiple scopes usually have identifiers, such as 0 = Main, 1 = Sub. */
+
+ int data_level_min; /*!< The numeric value that represents the minimum signal level. */
+ int data_level_max; /*!< The numeric value that represents the maximum signal level. */
+ double signal_strength_min; /*!< The strength of the minimum signal level in dB. */
+ double signal_strength_max; /*!< The strength of the maximum signal level in dB. */
+
+ enum rig_spectrum_mode_e spectrum_mode; /*!< Spectrum mode. */
+
+ freq_t center_freq; /*!< Center frequency of the spectrum scope in Hz in RIG_SPECTRUM_CENTER mode. */
+ freq_t span_freq; /*!< Span of the spectrum scope in Hz in RIG_SPECTRUM_CENTER mode. */
+
+ freq_t low_edge_freq; /*!< Low edge frequency of the spectrum scope in Hz in RIG_SPECTRUM_FIXED mode. */
+ freq_t high_edge_freq; /*!< High edge frequency of the spectrum scope in Hz in RIG_SPECTRUM_FIXED mode. */
+
+ int spectrum_data_length; /*!< Number of bytes of 8-bit spectrum data in the data buffer. The amount of data may vary if the rig has multiple spectrum scopes, depending on the scope. */
+ unsigned char *spectrum_data; /*!< 8-bit spectrum data covering bandwidth of either the span_freq in center mode or from low edge to high edge in fixed mode. A higher value represents higher signal strength. */
+};
/**
* \brief Rig data structure.
@@ -1665,6 +1731,9 @@ struct rig_caps {
shortfreq_t max_xit; /*!< max absolute XIT */
shortfreq_t max_ifshift; /*!< max absolute IF-SHIFT */
+ int agc_level_count; /*!< Number of supported AGC levels. Zero indicates all modes should be available (for backwards-compatibility). */
+ enum agc_level_e agc_levels[HAMLIB_MAX_AGC_LEVELS]; /*!< Supported AGC levels */
+
ann_t announces; /*!< Announces bit field list */
vfo_op_t vfo_ops; /*!< VFO op bit field list */
@@ -1703,7 +1772,12 @@ struct rig_caps {
cal_table_float_t vd_meter_cal; /*!< Voltage meter calibration table */
cal_table_float_t id_meter_cal; /*!< Current draw meter calibration table */
- const struct confparams *cfgparams; /*!< Configuration parametres. */
+ struct rig_spectrum_scope spectrum_scopes[HAMLIB_MAX_SPECTRUM_SCOPES]; /*!< Supported spectrum scopes. The array index must match the scope ID. Last entry must have NULL name. */
+ enum rig_spectrum_mode_e spectrum_modes[HAMLIB_MAX_SPECTRUM_MODES]; /*!< Supported spectrum scope modes. Last entry must be RIG_SPECTRUM_MODE_NONE. */
+ freq_t spectrum_spans[HAMLIB_MAX_SPECTRUM_SPANS]; /*!< Supported spectrum scope frequency spans in Hz in center mode. Last entry must be 0. */
+ struct rig_spectrum_avg_mode spectrum_avg_modes[HAMLIB_MAX_SPECTRUM_AVG_MODES]; /*!< Supported spectrum scope averaging modes. Last entry must have NULL name. */
+
+ const struct confparams *cfgparams; /*!< Configuration parameters. */
const rig_ptr_t priv; /*!< Private data. */
/*
@@ -2295,6 +2369,9 @@ typedef int (*pltune_cb_t)(RIG *,
rmode_t *,
pbwidth_t *,
rig_ptr_t);
+typedef int (*spectrum_cb_t)(RIG *,
+ struct rig_spectrum_line *,
+ rig_ptr_t);
//! @endcond
@@ -2328,6 +2405,8 @@ struct rig_callbacks {
rig_ptr_t dcd_arg; /*!< DCD change argument */
pltune_cb_t pltune; /*!< Pipeline tuning module freq/mode/width callback */
rig_ptr_t pltune_arg; /*!< Pipeline tuning argument */
+ spectrum_cb_t spectrum_event; /*!< Spectrum line reception event */
+ rig_ptr_t spectrum_arg; /*!< Spectrum line reception argument */
/* etc.. */
};
@@ -2893,6 +2972,11 @@ rig_set_pltune_callback HAMLIB_PARAMS((RIG *,
pltune_cb_t,
rig_ptr_t));
+extern HAMLIB_EXPORT(int)
+rig_set_spectrum_callback HAMLIB_PARAMS((RIG *,
+ spectrum_cb_t,
+ rig_ptr_t));
+
extern HAMLIB_EXPORT(int)
rig_set_twiddle HAMLIB_PARAMS((RIG *rig,
int seconds));
@@ -3013,11 +3097,13 @@ extern HAMLIB_EXPORT(const char *) rig_strvfo(vfo_t vfo);
extern HAMLIB_EXPORT(const char *) rig_strfunc(setting_t);
extern HAMLIB_EXPORT(const char *) rig_strlevel(setting_t);
extern HAMLIB_EXPORT(const char *) rig_strparm(setting_t);
+extern HAMLIB_EXPORT(const char *) rig_stragclevel(enum agc_level_e level);
extern HAMLIB_EXPORT(const char *) rig_strptrshift(rptr_shift_t);
extern HAMLIB_EXPORT(const char *) rig_strvfop(vfo_op_t op);
extern HAMLIB_EXPORT(const char *) rig_strscan(scan_t scan);
extern HAMLIB_EXPORT(const char *) rig_strstatus(enum rig_status_e status);
extern HAMLIB_EXPORT(const char *) rig_strmtype(chan_type_t mtype);
+extern HAMLIB_EXPORT(const char *) rig_strspectrummode(enum rig_spectrum_mode_e mode);
extern HAMLIB_EXPORT(rmode_t) rig_parse_mode(const char *s);
extern HAMLIB_EXPORT(vfo_t) rig_parse_vfo(const char *s);
diff --git a/rigs/icom/ic7300.c b/rigs/icom/ic7300.c
index 5a82e021..2c5413bd 100644
--- a/rigs/icom/ic7300.c
+++ b/rigs/icom/ic7300.c
@@ -24,17 +24,15 @@
#include "config.h"
#endif
-#include <stdlib.h>
#include <string.h> /* String function definitions */
#include <hamlib/rig.h>
-#include "token.h"
#include "idx_builtin.h"
+#include "token.h"
#include "icom.h"
#include "icom_defs.h"
#include "frame.h"
-#include "misc.h"
#include "bandplan.h"
#include "tones.h"
@@ -49,9 +47,9 @@ static int ic7300_get_parm(RIG *rig, setting_t parm, value_t *val);
#define IC7300_OTHER_TX_MODES (RIG_MODE_FM|RIG_MODE_CW|RIG_MODE_CWR|RIG_MODE_SSB|RIG_MODE_RTTY|RIG_MODE_RTTYR)
#define IC7300_AM_TX_MODES (RIG_MODE_AM|RIG_MODE_PKTAM)
-#define IC7300_FUNCS (RIG_FUNC_NB|RIG_FUNC_COMP|RIG_FUNC_VOX|RIG_FUNC_TONE|RIG_FUNC_TSQL|RIG_FUNC_SBKIN|RIG_FUNC_FBKIN|RIG_FUNC_NR|RIG_FUNC_MON|RIG_FUNC_MN|RIG_FUNC_ANF|RIG_FUNC_LOCK|RIG_FUNC_RIT|RIG_FUNC_XIT|RIG_FUNC_SCOPE|RIG_FUNC_TUNER)
+#define IC7300_FUNCS (RIG_FUNC_NB|RIG_FUNC_COMP|RIG_FUNC_VOX|RIG_FUNC_TONE|RIG_FUNC_TSQL|RIG_FUNC_SBKIN|RIG_FUNC_FBKIN|RIG_FUNC_NR|RIG_FUNC_MON|RIG_FUNC_MN|RIG_FUNC_ANF|RIG_FUNC_LOCK|RIG_FUNC_RIT|RIG_FUNC_XIT|RIG_FUNC_SCOPE|RIG_FUNC_TUNER|RIG_FUNC_TRANSCEIVE|RIG_FUNC_SPECTRUM|RIG_FUNC_SPECTRUM_HOLD)
-#define IC7300_LEVELS (RIG_LEVEL_PREAMP|RIG_LEVEL_ATT|RIG_LEVEL_AGC|RIG_LEVEL_COMP|RIG_LEVEL_BKINDL|RIG_LEVEL_NR|RIG_LEVEL_PBT_IN|RIG_LEVEL_PBT_OUT|RIG_LEVEL_CWPITCH|RIG_LEVEL_RFPOWER|RIG_LEVEL_MICGAIN|RIG_LEVEL_KEYSPD|RIG_LEVEL_NOTCHF_RAW|RIG_LEVEL_SQL|RIG_LEVEL_RAWSTR|RIG_LEVEL_STRENGTH|RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_VOXGAIN|RIG_LEVEL_ANTIVOX|RIG_LEVEL_VOXDELAY|RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_RFPOWER_METER_WATTS|RIG_LEVEL_COMP_METER|RIG_LEVEL_VD_METER|RIG_LEVEL_ID_METER|RIG_LEVEL_MONITOR_GAIN|RIG_LEVEL_NB)
+#define IC7300_LEVELS (RIG_LEVEL_PREAMP|RIG_LEVEL_ATT|RIG_LEVEL_AGC|RIG_LEVEL_COMP|RIG_LEVEL_BKINDL|RIG_LEVEL_NR|RIG_LEVEL_PBT_IN|RIG_LEVEL_PBT_OUT|RIG_LEVEL_CWPITCH|RIG_LEVEL_RFPOWER|RIG_LEVEL_MICGAIN|RIG_LEVEL_KEYSPD|RIG_LEVEL_NOTCHF_RAW|RIG_LEVEL_SQL|RIG_LEVEL_RAWSTR|RIG_LEVEL_STRENGTH|RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_VOXGAIN|RIG_LEVEL_ANTIVOX|RIG_LEVEL_VOXDELAY|RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_RFPOWER_METER_WATTS|RIG_LEVEL_COMP_METER|RIG_LEVEL_VD_METER|RIG_LEVEL_ID_METER|RIG_LEVEL_MONITOR_GAIN|RIG_LEVEL_NB|RIG_LEVEL_SPECTRUM_MODE|RIG_LEVEL_SPECTRUM_SPAN|RIG_LEVEL_SPECTRUM_SPEED|RIG_LEVEL_SPECTRUM_REF|RIG_LEVEL_SPECTRUM_AVG|RIG_LEVEL_SPECTRUM_EDGE_LOW|RIG_LEVEL_SPECTRUM_EDGE_HIGH)
#define IC7300_VFOS (RIG_VFO_A|RIG_VFO_B|RIG_VFO_MEM)
#define IC7300_PARMS (RIG_PARM_ANN|RIG_PARM_BACKLIGHT|RIG_PARM_TIME|RIG_PARM_BEEP)
@@ -136,15 +134,15 @@ static int ic7300_get_parm(RIG *rig, setting_t parm, value_t *val);
#define IC705_ALL_TX_MODES (RIG_MODE_FM|RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_CWR|RIG_MODE_SSB|RIG_MODE_RTTY|RIG_MODE_RTTYR|RIG_MODE_DSTAR)
#define IC705_ALL_RX_MODES (RIG_MODE_FM|RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_CWR|RIG_MODE_SSB|RIG_MODE_RTTY|RIG_MODE_RTTYR|RIG_MODE_PKTLSB|RIG_MODE_PKTUSB|RIG_MODE_PKTFM|RIG_MODE_PKTAM|RIG_MODE_DSTAR)
#define IC705_OTHER_TX_MODES (RIG_MODE_FM|RIG_MODE_CW|RIG_MODE_CWR|RIG_MODE_SSB|RIG_MODE_RTTY|RIG_MODE_RTTYR|RIG_MODE_DSTAR)
-#define IC705_LEVELS (RIG_LEVEL_PREAMP|RIG_LEVEL_ATT|RIG_LEVEL_AGC|RIG_LEVEL_COMP|RIG_LEVEL_BKINDL|RIG_LEVEL_NR|RIG_LEVEL_PBT_IN|RIG_LEVEL_PBT_OUT|RIG_LEVEL_CWPITCH|RIG_LEVEL_RFPOWER|RIG_LEVEL_MICGAIN|RIG_LEVEL_KEYSPD|RIG_LEVEL_NOTCHF_RAW|RIG_LEVEL_SQL|RIG_LEVEL_RAWSTR|RIG_LEVEL_STRENGTH|RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_VOXGAIN|RIG_LEVEL_ANTIVOX|RIG_LEVEL_VOXDELAY|RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_RFPOWER_METER_WATTS|RIG_LEVEL_COMP_METER|RIG_LEVEL_VD_METER|RIG_LEVEL_ID_METER|RIG_LEVEL_MONITOR_GAIN|RIG_LEVEL_NB)
+#define IC705_LEVELS (RIG_LEVEL_PREAMP|RIG_LEVEL_ATT|RIG_LEVEL_AGC|RIG_LEVEL_COMP|RIG_LEVEL_BKINDL|RIG_LEVEL_NR|RIG_LEVEL_PBT_IN|RIG_LEVEL_PBT_OUT|RIG_LEVEL_CWPITCH|RIG_LEVEL_RFPOWER|RIG_LEVEL_MICGAIN|RIG_LEVEL_KEYSPD|RIG_LEVEL_NOTCHF_RAW|RIG_LEVEL_SQL|RIG_LEVEL_RAWSTR|RIG_LEVEL_STRENGTH|RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_VOXGAIN|RIG_LEVEL_ANTIVOX|RIG_LEVEL_VOXDELAY|RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_RFPOWER_METER_WATTS|RIG_LEVEL_COMP_METER|RIG_LEVEL_VD_METER|RIG_LEVEL_ID_METER|RIG_LEVEL_MONITOR_GAIN|RIG_LEVEL_NB|RIG_LEVEL_SPECTRUM_MODE|RIG_LEVEL_SPECTRUM_SPAN|RIG_LEVEL_SPECTRUM_SPEED|RIG_LEVEL_SPECTRUM_REF|RIG_LEVEL_SPECTRUM_AVG|RIG_LEVEL_SPECTRUM_EDGE_LOW|RIG_LEVEL_SPECTRUM_EDGE_HIGH)
/*
* IC9700 items that differ from IC7300
*/
#define IC9700_VFOS (RIG_VFO_A|RIG_VFO_B|RIG_VFO_MAIN|RIG_VFO_SUB|RIG_VFO_MEM|RIG_VFO_MAIN_A|RIG_VFO_MAIN_B|RIG_VFO_SUB_A|RIG_VFO_SUB_B)
#define IC9700_PARMS (RIG_PARM_ANN|RIG_PARM_BACKLIGHT|RIG_PARM_TIME|RIG_PARM_BEEP|RIG_PARM_SCREENSAVER)
-#define IC9700_FUNCS (RIG_FUNC_NB|RIG_FUNC_COMP|RIG_FUNC_VOX|RIG_FUNC_TONE|RIG_FUNC_TSQL|RIG_FUNC_SBKIN|RIG_FUNC_FBKIN|RIG_FUNC_NR|RIG_FUNC_MON|RIG_FUNC_MN|RIG_FUNC_ANF|RIG_FUNC_LOCK|RIG_FUNC_RIT|RIG_FUNC_SCOPE|RIG_FUNC_SATMODE|RIG_FUNC_AFC)
-#define IC9700_LEVELS (RIG_LEVEL_PREAMP|RIG_LEVEL_ATT|RIG_LEVEL_AGC|RIG_LEVEL_COMP|RIG_LEVEL_BKINDL|RIG_LEVEL_NR|RIG_LEVEL_PBT_IN|RIG_LEVEL_PBT_OUT|RIG_LEVEL_CWPITCH|RIG_LEVEL_RFPOWER|RIG_LEVEL_MICGAIN|RIG_LEVEL_KEYSPD|RIG_LEVEL_NOTCHF_RAW|RIG_LEVEL_SQL|RIG_LEVEL_RAWSTR|RIG_LEVEL_STRENGTH|RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_VOXGAIN|RIG_LEVEL_ANTIVOX|RIG_LEVEL_VOXDELAY|RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_RFPOWER_METER_WATTS|RIG_LEVEL_COMP_METER|RIG_LEVEL_VD_METER|RIG_LEVEL_ID_METER|RIG_LEVEL_MONITOR_GAIN|RIG_LEVEL_NB)
+#define IC9700_FUNCS (RIG_FUNC_NB|RIG_FUNC_COMP|RIG_FUNC_VOX|RIG_FUNC_TONE|RIG_FUNC_TSQL|RIG_FUNC_SBKIN|RIG_FUNC_FBKIN|RIG_FUNC_NR|RIG_FUNC_MON|RIG_FUNC_MN|RIG_FUNC_ANF|RIG_FUNC_LOCK|RIG_FUNC_RIT|RIG_FUNC_SCOPE|RIG_FUNC_SATMODE|RIG_FUNC_AFC|RIG_FUNC_TRANSCEIVE|RIG_FUNC_SPECTRUM|RIG_FUNC_SPECTRUM_HOLD)
+#define IC9700_LEVELS (RIG_LEVEL_PREAMP|RIG_LEVEL_ATT|RIG_LEVEL_AGC|RIG_LEVEL_COMP|RIG_LEVEL_BKINDL|RIG_LEVEL_NR|RIG_LEVEL_PBT_IN|RIG_LEVEL_PBT_OUT|RIG_LEVEL_CWPITCH|RIG_LEVEL_RFPOWER|RIG_LEVEL_MICGAIN|RIG_LEVEL_KEYSPD|RIG_LEVEL_NOTCHF_RAW|RIG_LEVEL_SQL|RIG_LEVEL_RAWSTR|RIG_LEVEL_STRENGTH|RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_VOXGAIN|RIG_LEVEL_ANTIVOX|RIG_LEVEL_VOXDELAY|RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_RFPOWER_METER_WATTS|RIG_LEVEL_COMP_METER|RIG_LEVEL_VD_METER|RIG_LEVEL_ID_METER|RIG_LEVEL_MONITOR_GAIN|RIG_LEVEL_NB|RIG_LEVEL_SPECTRUM_MODE|RIG_LEVEL_SPECTRUM_SPAN|RIG_LEVEL_SPECTRUM_SPEED|RIG_LEVEL_SPECTRUM_REF|RIG_LEVEL_SP...
[truncated message content] |
|
From: Nate B. <n0...@us...> - 2021-05-20 02:57:11
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via 8d423e9cd133704b35712ce5359689dfe85d1464 (commit)
via fee7ea2425e3ba0385f8228fd1aa5d6314fb4bf9 (commit)
from e28e3c224bbb3cf1234e2795f2c0ba2d4ea86a6e (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 8d423e9cd133704b35712ce5359689dfe85d1464
Merge: e28e3c22 fee7ea24
Author: Nate Bargmann <n0...@n0...>
Date: Wed May 19 21:55:59 2021 -0500
Merge pull request #708 from N0NB/doxygen_work
Add typographic conventions section to the main page
commit fee7ea2425e3ba0385f8228fd1aa5d6314fb4bf9
Author: Nate Bargmann <n0...@n0...>
Date: Wed May 19 21:54:21 2021 -0500
Add typographic conventions section to the main page
diff --git a/doc/index.doxygen b/doc/index.doxygen
index 58ebc9cf..1ecf5516 100644
--- a/doc/index.doxygen
+++ b/doc/index.doxygen
@@ -13,6 +13,54 @@ documentation through the tabs at the top of this page.
Please report any problems to ham...@li....
+\section s2 Typographic conventions
+
+While Doxygen applies its own typographic conventions to the document based on
+its own stylesheets, this section details Hamlib specific conventions.
+
+\subsection sub1 Key words
+
+Key words used in program source such as `TRUE` or `FALSE` are shown in a
+constant width font.
+
+\subsection sub2 Manual pages
+
+References to Unix style manual pages are shown as `man`(1). The manual page
+entry is in a constant width font immediately followed by parentheses
+containing a numeral denoting the section of the manual the key word can be
+found. For example, to view `printf`(3) use:
+
+ ```
+ man 3 printf
+ ```
+
+at a terminal prompt and the `man`(1) program will display the C library
+manual page for the `printf()` function. On most Unix type systems there are
+two `printf` manual pages, one in section 1 (user commands) and the other in
+section 3 (library calls).
+
+To learn more about manual pages:
+
+ ```
+ man man-pages
+ ```
+
+is a good starting point.
+
+If you are using a system that does not have manual pages, many HTML formatted
+pages are available on the World Wide Web.
+[The Linux man-pages project](https://www.kernel.org/doc/man-pages/)
+has many manual pages online and is the source for most system and library call
+documentation found in every Linux distribution. The
+[Debian project also hosts a large collection of manual pages](https://manpages.debian.org/)
+drawn from the packages in its distributions.
+
+\subsection sub3 Program names and options
+
+Program names and options to programs such as the Hamlib utilities are shown
+in a constant width font, e.g. `rigctl -v` the *verbose* option to the `rigctl`(1)
+Hamlib utility.
+
\section txtfil Distributed information files
These text files are distributed with the Hamlib package.
-----------------------------------------------------------------------
Summary of changes:
doc/index.doxygen | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Nate B. <n0...@us...> - 2021-05-19 21:57: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 e28e3c224bbb3cf1234e2795f2c0ba2d4ea86a6e (commit)
via a6f2180874c6a8b46191210074b9ddee808e206d (commit)
via 8e3e93da0fc2fb9857507cbe01743c05e8f733ae (commit)
via cc1f277e5f03ae9a70e1a0a62a32999b6543bfe3 (commit)
via 12ce326350ee32164d7c4b881dd22b1011d9110f (commit)
via 94fa261e9d298bdcf4a8357f83d8ad43be4fa050 (commit)
from 03352f298f8a7e3ca882668840f8fb11f1fd49f7 (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 e28e3c224bbb3cf1234e2795f2c0ba2d4ea86a6e
Merge: 8e3e93da a6f21808
Author: Nate Bargmann <n0...@n0...>
Date: Wed May 19 16:56:08 2021 -0500
Merge pull request #707 from N0NB/doxygen_work
Update Doxygen comments.
commit a6f2180874c6a8b46191210074b9ddee808e206d
Author: Nate Bargmann <n0...@n0...>
Date: Wed May 19 16:50:51 2021 -0500
Update Doxygen comments.
diff --git a/src/debug.c b/src/debug.c
index 1aacbb56..7c9f5384 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -20,13 +20,14 @@
*/
/**
- * \addtogroup rig_internal
+ * \addtogroup rig
* @{
*/
/**
* \file debug.c
- * \brief control hamlib debugging functions
+ *
+ * \brief Control Hamlib debugging functions.
*/
#ifdef HAVE_CONFIG_H
@@ -52,9 +53,17 @@
#include <hamlib/rig_dll.h>
#include "misc.h"
-//! @cond Doxygen_Suppress
+/*! @} */
+
+
+/**
+ * \addtogroup rig_internal
+ * @{
+ */
+
+
+/** \brief Sets the number of hexadecimal pairs to print per line. */
#define DUMP_HEX_WIDTH 16
-//! @endcond
static int rig_debug_level = RIG_DEBUG_TRACE;
@@ -66,9 +75,17 @@ static rig_ptr_t rig_vprintf_arg;
extern HAMLIB_EXPORT(void) dump_hex(const unsigned char ptr[], size_t size);
/**
- * \param ptr Pointer to memory area
- * \param size Number of chars to words to dump
* \brief Do a hex dump of the unsigned char array.
+ *
+ * \param ptr Pointer to a character array.
+ * \param size Number of chars to words to dump.
+ *
+ * Prints the hex dump to `stderr` via rig_debug():
+ *
+ * ```
+ * 0000 4b 30 30 31 34 35 30 30 30 30 30 30 30 35 30 32 K001450000000502
+ * 0010 30 30 0d 0a 00..
+ * ```
*/
void dump_hex(const unsigned char ptr[], size_t size)
{
@@ -115,10 +132,24 @@ void dump_hex(const unsigned char ptr[], size_t size)
}
}
+/*! @} */
+
/**
- * \param debug_level
- * \brief Change the current debug level
+ * \addtogroup rig
+ * @{
+ */
+
+/**
+ * \brief Change the current debug level.
+ *
+ * \param debug_level Equivalent to the `-v` option of the utilities.
+ *
+ * Allows for dynamically changing the debugging output without reinitializing
+ * the library.
+ *
+ * Useful for programs that want to enable and disable debugging
+ * output without restarting.
*/
void HAMLIB_API rig_set_debug(enum rig_debug_level_e debug_level)
{
@@ -127,17 +158,28 @@ void HAMLIB_API rig_set_debug(enum rig_debug_level_e debug_level)
/**
- * \param debug_level
- * \brief Useful for dump_hex, etc.
+ * \brief Test if a given debug level is active.
+ *
+ * \param debug_level The level to test.
+ *
+ * May be used to determine if an action such as opening a dialog should
+ * happen only if a desired debug level is active.
+ *
+ * Also useful for dump_hex(), etc.
*/
int HAMLIB_API rig_need_debug(enum rig_debug_level_e debug_level)
{
return (debug_level <= rig_debug_level);
}
+
/**
- * \param flag
- * \brief Enbable/disable time stamp on debug output
+ * \brief Enable or disable the time stamp on debugging output.
+ *
+ * \param flag `TRUE` or `FALSE`.
+ *
+ * Sets or unsets the flag which controls whether debugging output includes a
+ * time stamp.
*/
void HAMLIB_API rig_set_debug_time_stamp(int flag)
{
@@ -162,10 +204,15 @@ char *date_strget(char *buf, int buflen)
}
//! @endcond
+
/**
- * \param debug_level
- * \param fmt
- * \brief Default is debugging messages are done through stderr
+ * \brief Print debugging messages through `stderr` by default.
+ *
+ * \param debug_level Debug level from none to most output.
+ * \param fmt Formatted character string to print.
+ *
+ * The formatted character string is passed to the `frprintf`(3) C library
+ * call and follows its format specification.
*/
#undef rig_debug
void HAMLIB_API rig_debug(enum rig_debug_level_e debug_level,
@@ -243,37 +290,36 @@ void HAMLIB_API rig_debug(enum rig_debug_level_e debug_level,
/**
- * \brief set callback to handle debug messages
- * \param cb The callback to install
- * \param arg A Pointer to some private data to pass later on to the callback
+ * \brief Set callback to handle debugging messages.
*
- * Install a callback for \a rig_debug messages.
-\code
-int
-rig_message_cb(enum rig_debug_level_e debug_level,
- rig_ptr_t user_data,
- const char *fmt,
- va_list ap)
-{
- char buf[1024];
-
- sprintf (buf, "Message(%s) ", (char*)user_data);
- syslog (LOG_USER, buf);
- vsprintf (buf, fmt, ap);
- syslog (LOG_USER, buf);
-
- return RIG_OK;
-}
-
- . . .
-
- char *cookie = "Foo";
- rig_set_debug_callback (rig_message_cb, (rig_ptr_t)cookie);
-\endcode
+ * \param cb The callback function to install.
+ * \param arg A Pointer to some private data to pass later on to the callback.
+ *
+ * Install a callback for rig_debug() messages.
+ * \code
+ * int
+ * rig_message_cb(enum rig_debug_level_e debug_level,
+ * rig_ptr_t user_data,
+ * const char *fmt,
+ * va_list ap)
+ * {
+ * char buf[1024];
+ *
+ * sprintf (buf, "Message(%s) ", (char*)user_data);
+ * syslog (LOG_USER, buf);
+ * vsprintf (buf, fmt, ap);
+ * syslog (LOG_USER, buf);
*
- * \return RIG_OK if the operation has been successful, otherwise
- * a negative value if an error occurred (in which case, cause
- * is set appropriately).
+ * return RIG_OK;
+ * }
+ *
+ * . . .
+ *
+ * char *cookie = "Foo";
+ * rig_set_debug_callback (rig_message_cb, (rig_ptr_t)cookie);
+ * \endcode
+ *
+ * \return A pointer to the previous callback that was set, if any.
*
* \sa rig_debug()
*/
@@ -289,8 +335,11 @@ vprintf_cb_t HAMLIB_API rig_set_debug_callback(vprintf_cb_t cb, rig_ptr_t arg)
/**
- * \brief change stderr to some different output
- * \param stream The stream to set output to
+ * \brief Change the output stream from `stderr` a different stream.
+ *
+ * \param stream The stream to direct debugging output.
+ *
+ * \sa `FILE`(3)
*/
FILE *HAMLIB_API rig_set_debug_file(FILE *stream)
{
commit 8e3e93da0fc2fb9857507cbe01743c05e8f733ae
Merge: cc1f277e 03352f29
Author: Mike Black W9MDB <mdb...@ya...>
Date: Wed May 19 15:24:24 2021 -0500
Merge branch 'master' of https://github.com/Hamlib/Hamlib
commit cc1f277e5f03ae9a70e1a0a62a32999b6543bfe3
Author: Mike Black W9MDB <mdb...@ya...>
Date: Wed May 19 13:17:46 2021 -0500
Beginning of multicast capability
https://github.com/Hamlib/Hamlib/issues/695
diff --git a/src/network.c b/src/network.c
index bd458412..2e4cc72e 100644
--- a/src/network.c
+++ b/src/network.c
@@ -121,26 +121,8 @@ static void handle_error(enum rig_debug_level_e lvl, const char *msg)
#endif
}
-/**
- * \brief Open network port using rig.state data
- *
- * Open Open network port using rig.state data.
- * NB: The signal PIPE will be ignored for the whole application.
- *
- * \param rp Port data structure (must spec port id eg hostname:port)
- * \param default_port Default network socket port
- * \return RIG_OK or < 0 if error
- */
-int network_open(hamlib_port_t *rp, int default_port)
+int network_init()
{
- int fd; /* File descriptor for the port */
- int status;
- struct addrinfo hints, *res, *saved_res;
- struct in6_addr serveraddr;
- char hoststr[256], portstr[6] = "";
-
- ENTERFUNC;
-
#ifdef __MINGW32__
WSADATA wsadata;
int ret;
@@ -163,6 +145,32 @@ int network_open(hamlib_port_t *rp, int default_port)
}
#endif
+ return RIG_OK;
+}
+
+/**
+ * \brief Open network port using rig.state data
+ *
+ * Open Open network port using rig.state data.
+ * NB: The signal PIPE will be ignored for the whole application.
+ *
+ * \param rp Port data structure (must spec port id eg hostname:port)
+ * \param default_port Default network socket port
+ * \return RIG_OK or < 0 if error
+ */
+int network_open(hamlib_port_t *rp, int default_port)
+{
+ int fd; /* File descriptor for the port */
+ int status;
+ struct addrinfo hints, *res, *saved_res;
+ struct in6_addr serveraddr;
+ char hoststr[256], portstr[6] = "";
+
+ ENTERFUNC;
+
+ status = network_init();
+
+ if (status != RIG_OK) { RETURNFUNC(status); }
if (!rp)
{
@@ -388,4 +396,28 @@ int network_close(hamlib_port_t *rp)
}
//! @endcond
+/**
+ * \brief Open multicast server using rig.state data
+ *
+ * Open Open multicast server using rig.state data.
+ * NB: The signal PIPE will be ignored for the whole application.
+ *
+ * \param rp Port data structure (must spec port id eg hostname:port -- hostname defaults to 224.0.1.1)
+ * \param default_port Default network socket port
+ * \return RIG_OK or < 0 if error
+ */
+int network_multicast_server(RIG *rig, const char *multicast_addr, int default_port)
+{
+ int status;
+
+ ENTERFUNC;
+ rig_debug(RIG_DEBUG_VERBOSE, "%s(%d):network_multicast_server under development\n", __FILE__, __LINE__);
+ rig_debug(RIG_DEBUG_VERBOSE, "%s(%d):ADDR=%s, port=%d\n", __FILE__, __LINE__, multicast_addr, default_port);
+ status = network_init();
+
+ if (status != RIG_OK) { RETURNFUNC(status); }
+
+ RETURNFUNC(RIG_OK);
+}
+
/** @} */
diff --git a/src/network.h b/src/network.h
index 1411d72a..111b0b36 100644
--- a/src/network.h
+++ b/src/network.h
@@ -29,6 +29,7 @@ __BEGIN_DECLS
/* Hamlib internal use, see rig.c */
int network_open(hamlib_port_t *p, int default_port);
+int network_multicast_server(RIG *rig, const char *multicast_addr, int default_port);
int network_close(hamlib_port_t *rp);
void network_flush(hamlib_port_t *rp);
diff --git a/tests/rigctld.c b/tests/rigctld.c
index 31ec01f6..d116a4e7 100644
--- a/tests/rigctld.c
+++ b/tests/rigctld.c
@@ -76,6 +76,7 @@
#include "iofunc.h"
#include "serial.h"
#include "sprintflst.h"
+#include "network.h"
#include "rigctl_parse.h"
@@ -109,6 +110,7 @@ static struct option long_options[] =
{"twiddle_timeout", 1, 0, 'W'},
{"uplink", 1, 0, 'x'},
{"debug-time-stamps", 0, 0, 'Z'},
+ {"multicast-addr", 1, 0, 'M'},
{0, 0, 0, 0}
};
@@ -142,6 +144,7 @@ static int volatile ctrl_c;
const char *portno = "4532";
const char *src_addr = NULL; /* INADDR_ANY */
+const char *multicast_addr = "224.0.1.1";
#define MAXCONFLEN 1024
@@ -542,6 +545,16 @@ int main(int argc, char *argv[])
rig_set_debug_time_stamp(1);
break;
+ case 'M':
+ if (!optarg)
+ {
+ usage(); /* wrong arg count */
+ exit(1);
+ }
+
+ multicast_addr = optarg;
+ break;
+
default:
usage(); /* unknown option? */
exit(1);
@@ -733,6 +746,15 @@ int main(int argc, char *argv[])
saved_result = result;
+ retcode = network_multicast_server(my_rig, multicast_addr, 4532);
+
+ if (retcode != RIG_OK)
+ {
+ rig_debug(RIG_DEBUG_ERR, "%s: network_multicast_server failed: %s\n", __FILE__,
+ rigerror(retcode));
+ // we will consider this non-fatal for now
+ }
+
do
{
sock_listen = socket(result->ai_family,
@@ -1222,6 +1244,7 @@ void usage(void)
" -W, --twiddle_rit suppress VFOB getfreq so RIT can be twiddled\n"
" -x, --uplink set uplink get_freq ignore, 1=Sub, 2=Main\n"
" -Z, --debug-time-stamps enable time stamps for debug messages\n"
+ " -M, --multicast-addr=addr set multicast addr, default 224.0.1.1\n"
" -h, --help display this help and exit\n"
" -V, --version output version information and exit\n\n",
portno);
commit 12ce326350ee32164d7c4b881dd22b1011d9110f
Author: Mike Black W9MDB <mdb...@ya...>
Date: Wed May 19 13:00:37 2021 -0500
Fix JSON example in README.multicast to be good JSON
https://github.com/Hamlib/Hamlib/issues/695
diff --git a/README.multicast b/README.multicast
index 6d31933e..a3d22677 100644
--- a/README.multicast
+++ b/README.multicast
@@ -56,14 +56,14 @@ Example JSON
"MinStrength": -100,
"MaxStrength": 0,
- // If Type=CENTER, the following fields will be present:
+ "__comment_spectrum_center__": "If Type=CENTER, the following fields will be present:"
"CenterFreq": 14267000,
"Span": 25000,
- // If SpectrumType=FIXED, the following fields will be present:
+ "__comment_spectrum_fixed__": "If SpectrumType=FIXED, the following fields will be present:"
"LowFreq": 14000000,
"HighFreq": 14250000
- }
+ },
"Split": 0,
"SatMode": 0,
commit 94fa261e9d298bdcf4a8357f83d8ad43be4fa050
Author: Mike Black W9MDB <mdb...@ya...>
Date: Wed May 19 10:29:33 2021 -0500
Update README.multicast proposal
https://github.com/Hamlib/Hamlib/issues/695
diff --git a/README.multicast b/README.multicast
index d1249604..6d31933e 100644
--- a/README.multicast
+++ b/README.multicast
@@ -44,16 +44,37 @@ Example JSON
"RX": 0,
"TX": 0
}],
+
+ "__comment_spectrum__": "Rigs that have spectrum output may include this data",
+ "Spectrum": {
+ "Length": 475,
+ "__comment_spectrum_data__": "2-char hex bytes so data len=2*Length",
+ "Data": "00AAFF75BD2AAA...",
+ "Type": "FIXED|CENTER",
+ "MinLevel": 0,
+ "MaxLevel": 140,
+ "MinStrength": -100,
+ "MaxStrength": 0,
+
+ // If Type=CENTER, the following fields will be present:
+ "CenterFreq": 14267000,
+ "Span": 25000,
+
+ // If SpectrumType=FIXED, the following fields will be present:
+ "LowFreq": 14000000,
+ "HighFreq": 14250000
+ }
+
"Split": 0,
"SatMode": 0,
"Rig": "Dummy",
"App": "Hamlib",
"__comment_version__": "protocol version date YYYYMMDD",
- "Version": "20210518",
+ "Version": "20210519",
"__comment_seq__": "Seq is 1-up sequence number 32-bit -- wraps around to 1 from 2^32-1",
"Seq": 1,
- "__comment_crc__": "32-bit CRC of all data replacing the CRC value with 0x00000000",
- "CRC": "0xf49f4708"
+ "__comment_crc__": "32-bit CRC of entire JSON record replacing the CRC value with 0x00000000",
+ "CRC": "0x00000000"
}
Will be able to set freq, mode, width, ptt
-----------------------------------------------------------------------
Summary of changes:
README.multicast | 27 +++++++++--
src/debug.c | 141 +++++++++++++++++++++++++++++++++++++------------------
src/network.c | 70 +++++++++++++++++++--------
src/network.h | 1 +
tests/rigctld.c | 23 +++++++++
5 files changed, 194 insertions(+), 68 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Nate B. <n0...@us...> - 2021-05-19 03:52:59
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via 03352f298f8a7e3ca882668840f8fb11f1fd49f7 (commit)
via 81e93480c4768ad2b21dc28a916e61562947f80b (commit)
via a29c298deba571ff45c2923b2187a87b75c1f45e (commit)
via b1e84abdedc05cb3e02724a4ecb07723239b4352 (commit)
from 4b8a12a8c53bd2c94f1f77655b1760669c9bc299 (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 03352f298f8a7e3ca882668840f8fb11f1fd49f7
Merge: 4b8a12a8 81e93480
Author: Nate Bargmann <n0...@n0...>
Date: Tue May 18 22:52:08 2021 -0500
Merge pull request #706 from N0NB/doxygen_work
Doxygen work
commit 81e93480c4768ad2b21dc28a916e61562947f80b
Author: Nate Bargmann <n0...@n0...>
Date: Tue May 18 22:42:17 2021 -0500
Update Doxygen comments
diff --git a/src/cm108.c b/src/cm108.c
index 2de83c94..9c942edf 100644
--- a/src/cm108.c
+++ b/src/cm108.c
@@ -26,8 +26,11 @@
*/
/**
- * \brief CM108 GPIO
* \file cm108.c
+ * \brief CM108 GPIO support.
+ *
+ * CM108 Audio chips found on many USB audio interfaces have controllable
+ * General Purpose Input/Output pins.
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
@@ -73,9 +76,15 @@
/**
- * \brief Open CM108 HID port (/dev/hidrawX)
- * \param port
- * \return file descriptor
+ * \brief Open CM108 HID port (/dev/hidraw<i>X</i>).
+ *
+ * \param port The port structure.
+ *
+ * \return File descriptor, otherwise a **negative value** if an error
+ * occurred (in which case, cause is set appropriately).
+ *
+ * \retval RIG_EINVAL The port pathname is empty or no CM108 device detected.
+ * \retval RIG_EIO The `open`(2) system call returned a **negative value**.
*/
int cm108_open(hamlib_port_t *port)
{
@@ -144,8 +153,14 @@ int cm108_open(hamlib_port_t *port)
/**
- * \brief Close CM108 HID port
- * \param port
+ * \brief Close a CM108 HID port.
+ *
+ * \param port The port structure
+ *
+ * \return Zero if the port was closed successfully, otherwise -1 if an error
+ * occurred (in which case, the system `errno`(3) is set appropriately).
+ *
+ * \sa The `close`(2) system call.
*/
int cm108_close(hamlib_port_t *port)
{
@@ -156,10 +171,18 @@ int cm108_close(hamlib_port_t *port)
/**
- * \brief Set or unset Push to talk bit on CM108 GPIO
- * \param p
- * \param pttx RIG_PTT_ON --> Set PTT
- * \return RIG_OK or < 0 error
+ * \brief Set or unset the Push To Talk bit on a CM108 GPIO.
+ *
+ * \param p The port structure.
+ * \param pttx RIG_PTT_ON --> Set PTT, else unset PTT.
+ *
+ * \return RIG_OK on success, otherwise a **negative value** if an error
+ * occurred (in which case, cause is set appropriately).
+ *
+ * \retval RIG_OK Setting or unsetting the PTT was successful.
+ * \retval RIG_EINVAL The file descriptor is invalid or the PTT type is
+ * unsupported.
+ * \retval RIG_EIO The `write`(2) system call returned a **negative value**.
*/
int cm108_ptt_set(hamlib_port_t *p, ptt_t pttx)
{
@@ -232,10 +255,17 @@ int cm108_ptt_set(hamlib_port_t *p, ptt_t pttx)
/**
- * \brief Get state of Push to Talk from CM108 GPIO
- * \param p
- * \param pttx return value (must be non NULL)
- * \return RIG_OK or < 0 error
+ * \brief Get the state of Push To Talk from a CM108 GPIO.
+ *
+ * \param p The port structure.
+ * \param pttx Return value (must be non NULL).
+ *
+ * \return RIG_OK on success, otherwise a **negative value** if an error
+ * occurred (in which case, cause is set appropriately).
+ *
+ * \retval RIG_OK Getting the PTT state was successful.
+ * \retval RIG_ENIMPL Getting the state is not yet implemented.
+ * \retval RIG_ENAVAIL Getting the state is not available for this PTT type.
*/
int cm108_ptt_get(hamlib_port_t *p, ptt_t *pttx)
{
@@ -259,6 +289,7 @@ int cm108_ptt_get(hamlib_port_t *p, ptt_t *pttx)
return RIG_OK;
}
+
#ifdef XXREMOVEXX
// Not referenced anywhere
/**
commit a29c298deba571ff45c2923b2187a87b75c1f45e
Author: Nate Bargmann <n0...@n0...>
Date: Tue May 18 19:00:00 2021 -0500
Update Doxygen comments
diff --git a/src/cal.c b/src/cal.c
index f9ba6912..8abd75a7 100644
--- a/src/cal.c
+++ b/src/cal.c
@@ -27,7 +27,7 @@
/**
* \file cal.c
- * \brief Calibration routines
+ * \brief Calibration routines.
*/
#ifdef HAVE_CONFIG_H
@@ -41,17 +41,24 @@
/**
- * \brief Convert raw data to a calibrated integer value, according to table
- * \param rawval input value
- * \param cal calibration table
- * \return calibrated integer value
-
- * cal_table_t is a data type suited to hold linear calibration
- * cal_table_t.size tell the number of plot cal_table_t.table contains
+ * \brief Convert raw data to a calibrated integer value, according to a
+ * calibration table.
+ *
+ * \param rawval Input value.
+ * \param cal Calibration table,
+ *
+ * cal_table_t is a data type suited to hold linear calibration.
+ *
+ * cal_table_t.size is the number of plots cal_table_t.table contains.
+ *
* If a value is below or equal to cal_table_t.table[0].raw,
- * rig_raw2val() will return cal_table_t.table[0].val
- * If a value is greater or equal to cal_table_t.table[cal_table_t.size-1].raw,
- * rig_raw2val() will return cal_table_t.table[cal_table_t.size-1].val
+ * rig_raw2val() will return cal_table_t.table[0].val.
+ *
+ * If a value is greater or equal to
+ * cal_table_t.table[cal_table_t.size-1].raw, rig_raw2val() will return
+ * cal_table_t.table[cal_table_t.size-1].val.
+ *
+ * \return Calibrated integer value.
*/
float HAMLIB_API rig_raw2val(int rawval, const cal_table_t *cal)
{
@@ -111,18 +118,26 @@ float HAMLIB_API rig_raw2val(int rawval, const cal_table_t *cal)
return cal->table[i].val - interpolation;
}
-/**
- * \brief Convert raw data to a calibrated floating-point value, according to table
- * \param rawval input value
- * \param cal calibration table
- * \return calibrated floating-point value
- * cal_table_float_t is a data type suited to hold linear calibration
- * cal_table_float_t.size tell the number of plot cal_table_t.table contains
+/**
+ * \brief Convert raw data to a calibrated floating-point value, according to
+ * a calibration table.
+ *
+ * \param rawval Input value.
+ * \param cal Calibration table.
+ *
+ * cal_table_float_t is a data type suited to hold linear calibration.
+ *
+ * cal_table_float_t.size tell the number of plot cal_table_t.table contains.
+ *
* If a value is below or equal to cal_table_float_t.table[0].raw,
- * rig_raw2val_float() will return cal_table_float_t.table[0].val
- * If a value is greater or equal to cal_table_float_t.table[cal_table_float_t.size-1].raw,
- * rig_raw2val_float() will return cal_table_float_t.table[cal_table_float_t.size-1].val
+ * rig_raw2val_float() will return cal_table_float_t.table[0].val.
+ *
+ * If a value is greater or equal to
+ * cal_table_float_t.table[cal_table_float_t.size-1].raw, rig_raw2val_float()
+ * will return cal_table_float_t.table[cal_table_float_t.size-1].val.
+ *
+ * \return calibrated floating-point value
*/
float HAMLIB_API rig_raw2val_float(int rawval, const cal_table_float_t *cal)
{
commit b1e84abdedc05cb3e02724a4ecb07723239b4352
Author: Nate Bargmann <n0...@n0...>
Date: Tue May 18 18:59:09 2021 -0500
Add most all files needed to SRCDOCLST
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 79cdfe15..bcb3e2af 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -5,9 +5,41 @@ dist_man_MANS = man1/ampctl.1 man1/ampctld.1 \
man1/rigswr.1 man1/rotctl.1 man1/rotctld.1 man1/rigctlcom.1 \
man7/hamlib.7 man7/hamlib-primer.7 man7/hamlib-utilities.7
-SRCDOCLST = ../src/rig.c ../src/rotator.c ../src/tones.c ../src/locator.c \
- ../src/event.c ../src/conf.c ../src/mem.c ../src/settings.c
+SRCDOCLST = \
+ ../include/hamlib/amplifier.h \
+ ../include/hamlib/amplist.h \
+ ../include/hamlib/rig.h \
+ ../include/hamlib/rotator.h \
+ ../include/hamlib/rotlist.h \
+ ../src/amp_conf.c \
+ ../src/amp_settings.c \
+ ../src/amplifier.c \
+ ../src/cal.c \
+ ../src/cm108.c \
+ ../src/conf.c \
+ ../src/debug.c \
+ ../src/event.c \
+ ../src/ext.c \
+ ../src/extamp.c \
+ ../src/locator.c \
+ ../src/mem.c \
+ ../src/misc.c \
+ ../src/network.c \
+ ../src/parallel.c \
+ ../src/rig.c \
+ ../src/rot_conf.c \
+ ../src/rot_ext.c \
+ ../src/rot_settings.c \
+ ../src/rotator.c \
+ ../src/tones.c \
+ ../src/serial.c \
+ ../src/settings.c \
+ ../src/sleep.c \
+ ../src/token.h \
+ ../src/tones.c \
+ ../src/usb_port.c
+# Just the file names, the paths are assigned below.
SCRIPTSLST = build-w32.sh build-w64.sh
-----------------------------------------------------------------------
Summary of changes:
doc/Makefile.am | 36 +++++++++++++++++++++++++++++++++--
src/cal.c | 57 +++++++++++++++++++++++++++++++++++--------------------
src/cm108.c | 59 +++++++++++++++++++++++++++++++++++++++++++--------------
3 files changed, 115 insertions(+), 37 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Nate B. <n0...@us...> - 2021-05-18 16:28:40
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via 4b8a12a8c53bd2c94f1f77655b1760669c9bc299 (commit)
via 394c61fa442da425ed916e326d1dd2e7bc8d9ae5 (commit)
via 225ab6f85d63011c67f0e5df0d2cdf7d7f5a921b (commit)
from e8c7a198ea93a6ec5208d76494d85b56c5b9f1b9 (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 4b8a12a8c53bd2c94f1f77655b1760669c9bc299
Merge: 225ab6f8 394c61fa
Author: Nate Bargmann <n0...@n0...>
Date: Tue May 18 11:26:04 2021 -0500
Merge pull request #705 from N0NB/doxygen_work
Enable optional generation of the PDF manual
commit 394c61fa442da425ed916e326d1dd2e7bc8d9ae5
Author: Nate Bargmann <n0...@n0...>
Date: Tue May 18 11:16:15 2021 -0500
Enable optional generation of the PDF manual
In the event anyone wants a PDF version of the reference manual, it can
be generated now.
diff --git a/README.developer b/README.developer
index 0c441692..e49ccda3 100644
--- a/README.developer
+++ b/README.developer
@@ -267,10 +267,6 @@ Optional, but highly recommended:
N.B.: The libusb-1.0 package is required for building most of the 'kit'
backend. The older version of libusb 0.1.x is no longer supported.
-Documentation:
-* Doxygen
-* GNU Source-highlight
-
N.B.: Some systems can have several versions of the autotools installed. In
that case, autoconf may be called "autoconf2.59", autoheader
"autoheader2.59", and automake "automake-1.9", aclocal "aclocal-1.9" or a
@@ -376,6 +372,44 @@ then 'ldconfig' will need to be run as the root user so that applications
using the Hamlib libraries can find them.
+1.3.1 Doxygen generated reference manual
+
+The following packages need to be installed:
+* Doxygen
+* GNU Source-highlight
+
+1.3.1.1 HTML manual
+
+In the top level of the build directory:
+
+ cd doc
+ make doc
+
+will build the HTML manual. The resulting 'doc/html' directory contains all
+of the files needed for the HTML manual. The 'index.html' file is the entry
+point to the manual.
+
+1.3.1.2 PDF manual
+
+To generate the PDF version of the reference manual the following texlive
+packages are required (Debian package names shown):
+* texlive-latex-base
+* texlive-latex-recommended
+* texlive-latex-extra
+
+Set GENERATE_LATEX in 'doc/hamlib.cfg.in' to 'YES' which will enable the LaTEX
+build. Then run:
+
+ make doc
+
+as above and once the run is complete:
+
+ cd latex
+ make
+
+The resulting generated document in the 'latex' directory is 'refman.pdf'.
+
+
1.4. Feedback
The Hamlib team is very interested to hear from you, how Hamlib builds and
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 72de81e7..79cdfe15 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -14,10 +14,12 @@ SCRIPTSLST = build-w32.sh build-w64.sh
# Use GNU source-highlight to generate highlighted shell scripts for the
# Doxygen manual.
doc: hamlib.cfg $(SRCDOCLST)
- for script in $(SCRIPTSLST) ; do \
- source-highlight -n -i $(top_srcdir)/scripts/$${script} -o $(top_builddir)/scripts/$${script}.html ; \
- done ; \
+ for script in $(SCRIPTSLST) ; \
+ do \
+ source-highlight -n -f html -i $(top_srcdir)/scripts/$${script} -o $(top_builddir)/scripts/$${script}.html ; \
+ source-highlight -n -f latex -i $(top_srcdir)/scripts/$${script} -o $(top_builddir)/scripts/$${script}.tex ; \
+ done
doxygen hamlib.cfg
clean-local:
- -rm -rf $(top_builddir)/doc/html $(top_builddir)/scripts/build-w*.sh.html
+ -rm -rf $(top_builddir)/doc/html $(top_builddir)/doc/latex $(top_builddir)/scripts/build-w*
diff --git a/doc/hamlib.cfg.in b/doc/hamlib.cfg.in
index 310330e5..569c6c14 100644
--- a/doc/hamlib.cfg.in
+++ b/doc/hamlib.cfg.in
@@ -14,6 +14,15 @@ GENERATE_RTF = NO
GENERATE_MAN = NO # User can set to YES for local man pages
MAN_EXTENSION = .3
+# Set GENERATE_LATEX to YES to generate the needed files for the PDF manual
+# and run 'make doc'. Then 'cd latex ; make' to generate the PDF manual.
+#
+# See section 1.3.1.2 in @top_srcdir@/README.developer for the needed LaTEX
+# packages.
+USE_PDFLATEX = YES
+PDF_HYPERLINKS = YES
+EXTRA_PACKAGES = pmboxdraw
+
# Input
CASE_SENSE_NAMES = YES
FULL_PATH_NAMES = NO
@@ -29,9 +38,8 @@ INCLUDE_PATH = @top_srcdir@/include
EXAMPLE_PATH = @top_srcdir@/tests/testrig.c \
@top_srcdir@ \
- @top_srcdir@/scripts/README.build-Windows \
- @top_builddir@/scripts/build-w32.sh.html \
- @top_builddir@/scripts/build-w64.sh.html
+ @top_srcdir@/scripts \
+ @top_builddir@/scripts
QUIET = YES
diff --git a/doc/index.doxygen b/doc/index.doxygen
index c1740079..58ebc9cf 100644
--- a/doc/index.doxygen
+++ b/doc/index.doxygen
@@ -87,8 +87,10 @@ GNU/Linux.
\verbinclude README.build-Windows
\subsection W32 The build-w32.sh script
\htmlinclude build-w32.sh.html
+\latexinclude build-w32.sh.tex
\subsection W64 The build-w64.sh script
\htmlinclude build-w64.sh.html
+\latexinclude build-w64.sh.tex
*/
/*! \page Rdmeosx README.osx
commit 225ab6f85d63011c67f0e5df0d2cdf7d7f5a921b
Author: Mike Black W9MDB <mdb...@ya...>
Date: Tue May 18 08:58:21 2021 -0500
Update multicast draft protocol
diff --git a/README.multicast b/README.multicast
index 150788d1..d1249604 100644
--- a/README.multicast
+++ b/README.multicast
@@ -25,30 +25,35 @@ CRC=0xf49f4708 (this is just an example CRC and not accurate for this example)
Example JSON
{
- "VFO1": { // unlimited number of VFOs possible
+ "__comment1__": "customizable rig identification -- will allow multiple rigs to be on the multicast",
+ "ID": "Rig#1",
+ "vfos": [
+ {
"VFO": "VFOA",
- "Freq": 14074000, // Hz
+ "Freq": 14074000,
"Mode": "USB",
- "Width": 5000, .. // Hz
- "RX": 0, // boolean values 0 = off, 1 = on
- "TX": 0,
+ "Width": 5000,
+ "RX": 0,
+ "TX": 0
},
- "VFO2": {
+ {
"VFO": "VFOB",
"Freq": 14076000,
"Mode": "USB",
"Width": 5000,
"RX": 0,
- "TX": 0,
- },
+ "TX": 0
+ }],
"Split": 0,
- "SatMode": 0
- "ID": "Rig#1", // customizable rig identification
+ "SatMode": 0,
"Rig": "Dummy",
"App": "Hamlib",
- "Version": "20210429", // protocol version date YYYYMMDD
- "Seq": 1, // 1-up sequence number 32-bit -- wraps around to 1 from 2^32-1
- "CRC": "0xf49f4708" // 32-bit CRC of all data replacing the CRC value with 0x00000000
+ "__comment_version__": "protocol version date YYYYMMDD",
+ "Version": "20210518",
+ "__comment_seq__": "Seq is 1-up sequence number 32-bit -- wraps around to 1 from 2^32-1",
+ "Seq": 1,
+ "__comment_crc__": "32-bit CRC of all data replacing the CRC value with 0x00000000",
+ "CRC": "0xf49f4708"
}
Will be able to set freq, mode, width, ptt
-----------------------------------------------------------------------
Summary of changes:
README.developer | 42 ++++++++++++++++++++++++++++++++++++++----
README.multicast | 31 ++++++++++++++++++-------------
doc/Makefile.am | 10 ++++++----
doc/hamlib.cfg.in | 14 +++++++++++---
doc/index.doxygen | 2 ++
5 files changed, 75 insertions(+), 24 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-05-18 12:12:42
|
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 e8c7a198ea93a6ec5208d76494d85b56c5b9f1b9 (commit)
via c408d88b5e3301da2a7e68e527dc65d73084ae88 (commit)
from ed45495835a6694f3b9c035b3d39de71b408b824 (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 e8c7a198ea93a6ec5208d76494d85b56c5b9f1b9
Merge: c408d88b ed454958
Author: Mike Black W9MDB <mdb...@ya...>
Date: Tue May 18 07:11:43 2021 -0500
Merge branch 'master' of https://github.com/Hamlib/Hamlib
commit c408d88b5e3301da2a7e68e527dc65d73084ae88
Author: Mike Black W9MDB <mdb...@ya...>
Date: Tue May 18 07:10:00 2021 -0500
Increase sleep from 10ms to 50ms during set_ptt OFF
Some problems reported on Fake It mode in JTDX with rigs unable to set freq after PTT OFF.
diff --git a/src/rig.c b/src/rig.c
index ef78b831..4eb102c8 100644
--- a/src/rig.c
+++ b/src/rig.c
@@ -2947,7 +2947,7 @@ int HAMLIB_API rig_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
// some rigs like the FT-2000 with the SCU-17 need just a bit of time to let the relays work
// can affect fake it mode in WSJT-X when the rig is still in transmit and freq change
// is requested on a rig that can't change freq on a transmitting VFO
- if (ptt != RIG_PTT_ON) { hl_usleep(10 * 1000); }
+ if (ptt != RIG_PTT_ON) { hl_usleep(50 * 1000); }
rig->state.cache.ptt = ptt;
elapsed_ms(&rig->state.cache.time_ptt, HAMLIB_ELAPSED_SET);
-----------------------------------------------------------------------
Summary of changes:
src/rig.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Nate B. <n0...@us...> - 2021-05-17 23:41: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 ed45495835a6694f3b9c035b3d39de71b408b824 (commit)
via 1501ad78ead599eeb59371c28d9053aaf9e2fe30 (commit)
from 6e623fb1655c7a235fa4db54cde7206cbc99833d (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 ed45495835a6694f3b9c035b3d39de71b408b824
Merge: 6e623fb1 1501ad78
Author: Nate Bargmann <n0...@n0...>
Date: Mon May 17 18:34:54 2021 -0500
Merge pull request #704 from N0NB/doxygen_work
Remove security page as it is for GitHub only
commit 1501ad78ead599eeb59371c28d9053aaf9e2fe30
Author: Nate Bargmann <n0...@n0...>
Date: Mon May 17 18:31:19 2021 -0500
Remove security page as it is for GitHub only
Distribute other files ommitted from the 4.2 release for documentation
generation. Caveat--don't rush!
diff --git a/Makefile.am b/Makefile.am
index a509dc7b..57e711b7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -7,7 +7,8 @@ pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = hamlib.pc
EXTRA_DIST = PLAN LICENSE hamlib.m4 hamlib.pc.in README.developer \
- README.betatester README.win32 Android.mk
+ README.betatester README.freqranges README.multicast README.osx \
+ Android.mk
doc_DATA = ChangeLog COPYING COPYING.LIB LICENSE \
README README.betatester README.developer
diff --git a/doc/index.doxygen b/doc/index.doxygen
index 93229d8b..c1740079 100644
--- a/doc/index.doxygen
+++ b/doc/index.doxygen
@@ -24,7 +24,6 @@ These text files are distributed with the Hamlib package.
\subpage Rdmeosx "Mac OS X";
\subpage Rdmefrq "Frequency range changes";
\subpage Rdmemulti "Multicast support";
-\subpage Security "Security policy";
\li Other files: \subpage INSTALL;
\subpage AUTHORS;
@@ -104,11 +103,6 @@ GNU/Linux.
\verbinclude README.multicast
*/
-/* FIXME: figure out how to include Markdown for HTML output. */
-/*! \page Security SECURITY.md
-\include SECURITY.md
-*/
-
/*! \page INSTALL INSTALL
\verbinclude INSTALL
*/
-----------------------------------------------------------------------
Summary of changes:
Makefile.am | 3 ++-
doc/index.doxygen | 6 ------
2 files changed, 2 insertions(+), 7 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Nate B. <n0...@us...> - 2021-05-17 22:51:00
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via 6e623fb1655c7a235fa4db54cde7206cbc99833d (commit)
via 2a4330394733992bd283e81b92e9f87dbd643499 (commit)
from 300da9c8dac986e20a05677f868daf24b03a9c1a (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 6e623fb1655c7a235fa4db54cde7206cbc99833d
Merge: 300da9c8 2a433039
Author: Nate Bargmann <n0...@n0...>
Date: Mon May 17 17:49:39 2021 -0500
Merge pull request #703 from N0NB/doxygen_work
Use GNU Source-highlight for documentation build
commit 2a4330394733992bd283e81b92e9f87dbd643499
Author: Nate Bargmann <n0...@n0...>
Date: Mon May 17 17:35:27 2021 -0500
Use GNU Source-highlight for documentation build
Generate highlighted and line numbered files for the Windows build
scripts to be included in the generated documentation.
Add clean-local target to doc/Makefile.am to clean generated document
files.
Document requirement for GNU Source-highlight.
diff --git a/NEWS b/NEWS
index 425f1c54..5232ec5c 100644
--- a/NEWS
+++ b/NEWS
@@ -7,51 +7,52 @@ Copyright (C) 2000-2021 Michael Black W9MDB, and others
Please send Hamlib bug reports to ham...@li...
Version 4.3
- * 2021-??-??
+ * 2021-??-??
+ * Generating documentation now requires GNU source-highlighter.
Version 4.2
- * 2021-05-17
- * New rig_get_mode_bandwidths -- returns token set for bandwidths for given mode
- Rig command: \get_mode_bandwidths CW
- Mode=CW
- Normal=500Hz
- Narrow=50Hz
- Wide=2400Hz
- * New rig_get_info -- returns token set for all vfos where order does not matter
- This is a string return to allow for easy future expansion without changing the API
- New tokens may be introduced and can be skipped if not used by clients
- Rig command: \get_rig_info
- VFO=Main Freq=145000000 Mode=None Width=0 RX=1 TX=1
- VFO=VFOB Freq=145000000 Mode=FM Width=15000 RX=0 TX=0
- Split=0 SatMode=0
- Rig=Dummy
- App=Hamlib
- Version=20210429
- CRC=0xf49f4708
- * New rig_get_vfo_info
- Rig command: \get_vfo_info VFOA
- Freq: 145000000
- Mode: None
- Width: 0
- Split: 0
- SatMode: 0
-
- * FILPATHLEN has changed to HAMLIB_FILPATHLEN
-
- * USRP lib and gnuradio are deprecated and will be removed in 5.0
- * Added Radan rotator
- * Added Malachite SDR
- * Major rework for PRM80
- * Add twiddle_timeout and twiddle_rit --set-conf options
- rigctld --set-conf=twiddle_timeout=5,twiddle_rit=1
- This will set the twiddle timeout to 5 seconds and turn on twiddle_rit
- For twiddle timeout VFOB will not be polled for 5 seconds after VFO twiddling
- is detected
- * rigctld --twiddle is deprecated and will be removed in 5.0 along with
- get_twiddle and set_twiddle
- * Rework Doxygen manual including default layout for Doxygen 1.9.1. So far
- the amplifier, rotator, and utilities API sections have been updated. The
- rig (radio) section remains to be updated.
+ * 2021-05-17
+ * New rig_get_mode_bandwidths -- returns token set for bandwidths for given mode
+ Rig command: \get_mode_bandwidths CW
+ Mode=CW
+ Normal=500Hz
+ Narrow=50Hz
+ Wide=2400Hz
+ * New rig_get_info -- returns token set for all vfos where order does not matter
+ This is a string return to allow for easy future expansion without changing the API
+ New tokens may be introduced and can be skipped if not used by clients
+ Rig command: \get_rig_info
+ VFO=Main Freq=145000000 Mode=None Width=0 RX=1 TX=1
+ VFO=VFOB Freq=145000000 Mode=FM Width=15000 RX=0 TX=0
+ Split=0 SatMode=0
+ Rig=Dummy
+ App=Hamlib
+ Version=20210429
+ CRC=0xf49f4708
+ * New rig_get_vfo_info
+ Rig command: \get_vfo_info VFOA
+ Freq: 145000000
+ Mode: None
+ Width: 0
+ Split: 0
+ SatMode: 0
+
+ * FILPATHLEN has changed to HAMLIB_FILPATHLEN
+
+ * USRP lib and gnuradio are deprecated and will be removed in 5.0
+ * Added Radan rotator
+ * Added Malachite SDR
+ * Major rework for PRM80
+ * Add twiddle_timeout and twiddle_rit --set-conf options
+ rigctld --set-conf=twiddle_timeout=5,twiddle_rit=1
+ This will set the twiddle timeout to 5 seconds and turn on twiddle_rit
+ For twiddle timeout VFOB will not be polled for 5 seconds after VFO twiddling
+ is detected
+ * rigctld --twiddle is deprecated and will be removed in 5.0 along with
+ get_twiddle and set_twiddle
+ * Rework Doxygen manual including default layout for Doxygen 1.9.1. So far
+ the amplifier, rotator, and utilities API sections have been updated. The
+ rig (radio) section remains to be updated.
Version 4.1
2021-01-31
diff --git a/README.developer b/README.developer
index 1c57945b..0c441692 100644
--- a/README.developer
+++ b/README.developer
@@ -269,6 +269,7 @@ backend. The older version of libusb 0.1.x is no longer supported.
Documentation:
* Doxygen
+* GNU Source-highlight
N.B.: Some systems can have several versions of the autotools installed. In
that case, autoconf may be called "autoconf2.59", autoheader
diff --git a/doc/Makefile.am b/doc/Makefile.am
index cdf653ea..72de81e7 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -8,5 +8,16 @@ dist_man_MANS = man1/ampctl.1 man1/ampctld.1 \
SRCDOCLST = ../src/rig.c ../src/rotator.c ../src/tones.c ../src/locator.c \
../src/event.c ../src/conf.c ../src/mem.c ../src/settings.c
+SCRIPTSLST = build-w32.sh build-w64.sh
+
+
+# Use GNU source-highlight to generate highlighted shell scripts for the
+# Doxygen manual.
doc: hamlib.cfg $(SRCDOCLST)
+ for script in $(SCRIPTSLST) ; do \
+ source-highlight -n -i $(top_srcdir)/scripts/$${script} -o $(top_builddir)/scripts/$${script}.html ; \
+ done ; \
doxygen hamlib.cfg
+
+clean-local:
+ -rm -rf $(top_builddir)/doc/html $(top_builddir)/scripts/build-w*.sh.html
diff --git a/doc/hamlib.cfg.in b/doc/hamlib.cfg.in
index 9bca92e3..310330e5 100644
--- a/doc/hamlib.cfg.in
+++ b/doc/hamlib.cfg.in
@@ -30,8 +30,8 @@ INCLUDE_PATH = @top_srcdir@/include
EXAMPLE_PATH = @top_srcdir@/tests/testrig.c \
@top_srcdir@ \
@top_srcdir@/scripts/README.build-Windows \
- @top_srcdir@/scripts/build-w32.sh \
- @top_srcdir@/scripts/build-w64.sh
+ @top_builddir@/scripts/build-w32.sh.html \
+ @top_builddir@/scripts/build-w64.sh.html
QUIET = YES
diff --git a/doc/index.doxygen b/doc/index.doxygen
index 1d6103f0..93229d8b 100644
--- a/doc/index.doxygen
+++ b/doc/index.doxygen
@@ -87,9 +87,9 @@ GNU/Linux.
\section Build README.build-Windows
\verbinclude README.build-Windows
\subsection W32 The build-w32.sh script
-\include{lineno} build-w32.sh
+\htmlinclude build-w32.sh.html
\subsection W64 The build-w64.sh script
-\include{lineno} build-w64.sh
+\htmlinclude build-w64.sh.html
*/
/*! \page Rdmeosx README.osx
-----------------------------------------------------------------------
Summary of changes:
NEWS | 87 ++++++++++++++++++++++++++++---------------------------
README.developer | 1 +
doc/Makefile.am | 11 +++++++
doc/hamlib.cfg.in | 4 +--
doc/index.doxygen | 4 +--
5 files changed, 60 insertions(+), 47 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Nate B. <n0...@us...> - 2021-05-17 22:33:36
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via 300da9c8dac986e20a05677f868daf24b03a9c1a (commit)
via aaee375d48cbe1411c110d556429fdfcb1414eee (commit)
from fdf1f7f6f01ef4f265fcd7a33859e0a976756389 (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 300da9c8dac986e20a05677f868daf24b03a9c1a
Merge: fdf1f7f6 aaee375d
Author: Nate Bargmann <n0...@n0...>
Date: Mon May 17 17:32:16 2021 -0500
Merge pull request #702 from N0NB/doxygen_work
Distribute logo image file for the Doxygen manual
commit aaee375d48cbe1411c110d556429fdfcb1414eee
Author: Nate Bargmann <n0...@n0...>
Date: Mon May 17 15:15:17 2021 -0500
Distribute logo image file for the Doxygen manual
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 0bf6d047..cdf653ea 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,4 +1,4 @@
-EXTRA_DIST = hamlib.cfg index.doxygen hamlib.css footer.html
+EXTRA_DIST = hamlib.cfg index.doxygen hamlib.css footer.html hamlib.png
dist_man_MANS = man1/ampctl.1 man1/ampctld.1 \
man1/rigctl.1 man1/rigctld.1 man1/rigmem.1 man1/rigsmtr.1 \
-----------------------------------------------------------------------
Summary of changes:
doc/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-05-17 05:06: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 fdf1f7f6f01ef4f265fcd7a33859e0a976756389 (commit)
from 561b8d0785161eaf2f9bc70b1f86089e0cae2505 (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 fdf1f7f6f01ef4f265fcd7a33859e0a976756389
Author: Mike Black W9MDB <mdb...@ya...>
Date: Mon May 17 00:05:16 2021 -0500
Fix newline in help in rigctld.c
diff --git a/tests/rigctld.c b/tests/rigctld.c
index 4dd07053..31ec01f6 100644
--- a/tests/rigctld.c
+++ b/tests/rigctld.c
@@ -1219,7 +1219,7 @@ void usage(void)
" -o, --vfo do not default to VFO_CURR, require extra vfo arg\n"
" -v, --verbose set verbose mode, cumulative (-v to -vvvvv)\n"
" -W, --twiddle_timeout timeout after detecting vfo manual change\n"
- " -W, --twiddle_rit suppress VFOB getfreq so RIT can be twiddled"
+ " -W, --twiddle_rit suppress VFOB getfreq so RIT can be twiddled\n"
" -x, --uplink set uplink get_freq ignore, 1=Sub, 2=Main\n"
" -Z, --debug-time-stamps enable time stamps for debug messages\n"
" -h, --help display this help and exit\n"
-----------------------------------------------------------------------
Summary of changes:
tests/rigctld.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Nate B. <n0...@us...> - 2021-05-17 02:45:29
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The annotated tag, 4.2 has been created
at 5123acdb3e08f1d1f0271316d0406a112e62207d (tag)
tagging cdad07b5f66c5bc0f993511d333fe55554f6d8f9 (commit)
tagged by Nate Bargmann
on Sun May 16 21:43:56 2021 -0500
- Log -----------------------------------------------------------------
Hamlib 4.2 release
-----BEGIN PGP SIGNATURE-----
iQGzBAABCgAdFiEEG5vcSeqIHtMzWHg79yYl4u2+1ZgFAmCh2J8ACgkQ9yYl4u2+
1ZgGwQwAynD/B50F2kaEBfPFYHtYkbvnQ3JRr81Ev7OPONpn+mIFq/tvwTr6obMy
AIf1rLm5GaXwa178dqDfL1NgZE18BQUq5S+AjbRCbmetSyn2Ov3X6WWtGgYyTmgU
CSp2fsOool2xhoSCd86LleVTQoX0NFGxgIKgZt58btI+B0hhBPbgSo/LhPllyFFA
Iv7KbeR7qaIy56PUJI4dyRpxFLT1pef7cFpDy3g4kr/Yra/d0Tp4cNF8fg86ivHU
1lsP+g45WQDtDfla48mqSVRdg+DITu4GJdeyQ86URPY7YTSdEV7biryrPisMBYAG
oH9BcRxP4qpqJM0cDA9100Hw9mWcCn0QkQEIdToDWuq2a2Gbj/wB4QpJgPVtvEFz
IrX5jPIrAxcaD9T94YZedlhje+MEXKr5p/OHAXoqhZUlm8uQrgmeIPJWXLqxG97j
SwyP7bcQtwbKS/yRHw4w4feyPxdcr6LAhmXozss96a71qJ88k0Tt3QleP5wiWboO
gtJAXiLn
=xOKW
-----END PGP SIGNATURE-----
(no author) (1):
New repository initialized by cvs2svn.
Adrian Chadd (1):
Upgrade TS-711 and TS-811 to work.
Agis Zisimatos (1):
easycomm: Return the correct value of pointer val
Alessandro Zummo, IZ1PRB (36):
Remove const from priv_caps to allow kenwood_init to initialize default values if they're missing
Call kenwood_init in each and every driver
Use an appropriate debug level
Support get/set_powerstat on pcr100
Add kenwood_simple_cmd
Make set_ptt behave as before, fix set_ant for ts570.c
ts450: remove RIG_FUNC_TONE from has_xx_func if tone unit is not detected
ts450,ts690,ts850: use FL command to get/set filters in get/set_mode. (code from ts850.c)
ts450: indentation fixes
remove fixed command terminator (;) from generic code
ts140,ts2000,ts480,ts570,ts680,ts850,ts870s: remove usage of fixed ; and EOM
fix tabs
thg71,tmv7,ts450s,ts690: verify rig id at rig_open
ts450: implement set_channel
remove unused parameter from get_kenwood_func
ts570,ts850,ts870s,ts140,ts480,ts680: use kenwood_simple_cmd where possible
Replace __FUNCTION__, which is gcc specific and was deprecated a long time ago, with __func__, which is at least defined in C99.
generic, ts850: implemented CTCSS TN command (reported not working for ts850, should now be fixed)
Add description for the kenwood mode n. 8
implemented set/get_ext_param (voice, fine, xit, rit). enabled on ts450 and ts850
Added my call sign
removed comment about switch optimizatons. the compiler will generate the assembly code in a different order which is usually based on the case value. other compiler optimizations might also affect it, so it's useless to optimize the order.
check ptt status before set_ptt. enabled on ts850.
style fixes
band up/down was inverted
Try to compensate for leftover characters
Try to cope withe the PCR100 and PCR1000 at the same time
Bumped out to beta, solved a few bugs. Tested with PCR100/1000/1500.
kenwood: send the whole buffer at once, added kenwood_cmd
- removed EOM, it's handled by kenwood_transaction - fixed tabs and spaces - added generic routine for vfo errors - set_mem: do not switch vfo if already in mem mode - simplified invocation of some commands - buffer optimizations - added PARM_BEEP and PARM_APO - fixed getting of LEVEL_RFPOWER - fixed get_ant
tmv7: removed EOM
thg71: removed EOM
thf7: - wrong rfpower level granularity - added .reset - call kenwood_open - use generic th_set_vfo
th: fixed formatting issue
th: fixed stack corruption
th: fixed a missing newline
Alex V Flinsch, KC2IVL (8):
Initial changes for ft100
Initial release
initial release
fixed various command options
new file, list of tones/codes and sequence used by various yaesu rigs
added get frequency to ft100 code
added getinfo func hdr
*** empty log message ***
Alexander Sack (1):
Get firmware revision level from K3/KX3.
Alexander Schultze (3):
easycomm: include a new EasyComm3 to support move speed and infostring
update EasyComm3 to include setting and getting of config and status
easycomm: implement get/set config, easycom include status and error bytes, fix get_info
Alexandru Csete OZ9AEC (34):
Added new stylesheet to make API docs look better.
Modified to use new stylesheet.
Added doxygen comments.
Added rotator.h and rotlist.h to the input list.
Applied Tommi's improvements from the FT-857 backend with the following changes and additions:
Full RF power scale corresponds to 10 bars, not 15.
Added RIT, XIT and IF shift ranges to dummy backend.
Cast constant caps to variable caps in order to avoid compiler warnings.
Cast from const to variable in order to avoid compiler warnings.
- Cast unsigned char to char in order to avoid compiler warnings. - Ensure that all variables have a value before they are used (ft920). - Disable unused functions and variables (frg100). - Incremented backend version numbers.
Use tone_t for pcr1_ctcss_list. Changed arg 4 of pcr_transaction to unsigned. Cast the other mismatches to (char *).
Cast unsigned char to char in order to avoid compiler warnings. Incremented backend version number.
- Cast unsigned char to char in order to avoid compiler warnings. - Ensure that all variables have a value before they are used (tentec.c).
- Cast unsigned char to char in order to avoid compiler warnings. - Incremented backend version number.
- Cast/change unsigned char to char in order to fix compile warnings. - Incremented backend version number.
- Cast/change unsigned char to char in order to fix compile warnings. - Incremented backend version numbers.
- Cast/change unsigned char to char in order to fix compile warnings. - Incremented backend version numbers.
- Cast/change unsigned char to char in order to fix compile warnings. - Incremented backend version number.
- Cast/change unsigned char to char in order to fix compile warnings. - Incremented backend version numbers.
- Cast unsigned char to char in order to avoid compiler warnings. - Handle all enum values in switch statements.
Fixed type mismatches that caused compile warnings.
Fixed type mismatches that caused compile warnings.
Initialise icom_val to avoid compiler warning.
Fixed type mismatches between signed and unsigned char. There are a few very suspicious 'if' statements in icom.c and frame.c
- Fixed type mismatches and unhandled switch cases. - Incremented backend version numbers.
Cast constant caps to variable caps in order to avoid compiler warnings.
Updated.
Added infor about w (send_cmd).
Max serial rate is 9600. Changed backend status to stable.
Escape the backslash character.
The 765 can do RIG_SCAN_PROG and RIG_SCAN_MEM.
Fixed S-meter reading to use calibration table since frontend always uses RAWSTR.
Fixed RF power reading and added power2mw and mw2power.
Fixed RIG_LEVEL_STRENGTH reading.
Andrew Errington (1):
Initial support for CM108 GPIO contorl of PTT
Ben Coleman, NJ8J (6):
Fixed bug in rpcrig_set_parm (using RIG_LEVEL_IS_FLOAT instead of RIG_PARM_FLOAT)
Fixed same bug in rigctl_get_parm.
Added checking of return string from rig on set (non-retrieval) commands. Added code for COMP function. Added alinco_set_parm & tweaked dx77 capabilities.
Handle setting Keyer speed and CW Pitch
Added NJ8J's email address.
Change email address for NJ8J
Berndt Josef Wulf, VK5ABN (11):
Implemented rig_set_channel()
Implemented set_parm() for BACKLIGHT operation
Commented out RIG_MODE_PKTFM overlooked at the submission of previous code
Implemented RIG_MODE_PKTFM and RIG_MODE_PKTLSB modes
Changed debug message format for freq_t from long long to double
ft990_get_ptt() now uses the FT990_SF_XMIT instead of FT990_SF_PTT. FT990_SF_PTT only returns status of PTT activated by CAT commands, whereas FT990_SF_XMIT reports the actual status of the ptt line.
ft990_get_mem(): Fixed bug that prevented the reporting of current channel number when vfo != RIG_VFO_MEM
Fixed erroneous return value
Fixed mispelled name for VK5ABN
Added missing modes to RX/TX caps
Fixed bug in ft990_set_mode that caused RTTY interchanged modes USB/LSB Fixed bugs in ft990_get_channel
Bill Barker (1):
Add test for Flex 6300 ID
Bill Somerville (212):
Patch submission for IC-756
Patch to allow same serial port for PTT and CAT.
Patch to fix broken Yaesu backend with FT-2000(D)
Fix rig_open not failing when PTT/DCD port is unavailable.
Fix Icom IC-756 filter handling.
Fix Yaesu newcat backend set_tx_vfo issue.
Add support for Data Modes on Icom "Pro" models.
Fix Icom IC-726 mode handling.
Fix Kenwood TS-2000 split operation.
Fix Kenwood Split Operation for TS50 & TS480.
Fix Kenwood TS-870s split and bandwidth set/get.
Correct receive buffer length for IS; comamnd.
Fix Kenwood CAT transaction busy retry mechanism.
Fix Kenwood get split VFO function.
Add data sub-mode support for TS590s.
Correct order of MD and DA commands for TS590s.
Get firmware revision for TS590s in rig_open.
Fix TS590s firmware defect.
Fix Kenwood get_vfo function returning wrong VFO in split TX.
Make Kenwood TS590s firmware defect fixup revision specific.
Extend TS590s firmware defect fixup to both VFOs.
Fix Icom IC-756 Pro III get data mode.
Add spilt mode get and set for Elecraft K3.
Fix data sub-modes on Elecraft K3.
Fix Elecraft Data Mode Translation.
Fix Elecraft K3 Data Sub-Mode Setting.
Fix Yaesu FT1000MP and FT1000MP Mk V modes.
Fix configure.ac
Fix a warning message.
Added option to not use VFO XCHG command when setting split parameters.
Fix a buffer overflow in the Windows termios emulation.
Fix pkg-config generation.
Fix Icom IC-756Pro mode get/set.
Facility for rigctl to read commands from standard input.
Add a pause command to the rigctl command set.
Prefix action function names so as not to clash with system names.
Prefix action function names so as not to clash with system names.
Corrected typos in rigctl.1 manpage.
Add read commands from stdin and pause command features to rotctl.
Merge branch 'rigctl-stdin' of ssh://git.code.sf.net/u/bsomervi/hamlib into rigctl-stdin
Fix manpage errors.
Remove redundant RIG_PTT_SERIAL_CAT enum from ptt_t
Only check for serial control line conflicts if PTT shares CAT port
Fix Ten-Tec Orion get/set split functions
Icom IC-7410 has VFO A/B not MAIN/SUB
Added IC-7410 data modes
Add retry mechanism for Yaesu "newcat" backend
Implement retries for Yaesu "newcat" rigs
Disable auto information mode on open
Add retry mechanism for Yaesu "newcat" backend
Implement retries for Yaesu "newcat" rigs
Disable auto information mode on open
Merge branch 'yaesu-retries' of ssh://git.code.sf.net/u/bsomervi/hamlib into yaesu-retries
RIG_OK is zero and need not be negated and this will not change
Fix response length expected error in K3 back end
Data mode support for the Icom IC-7700
Data mode support for the Icom IC-9100
Data mode support for the Icom IC-7200
Add support for the Kenwood TS-590SG
Kenwood TS-590SG
Always clear serial control lines when used for PTT
Disable AI mode on open for Kenwood/Elecraft rigs
Add more diagnostics and error checks to serial line control
Move serial line control error checks to lower level routines
Merge branch 'master' into kenwood-ai-off-at-start
Merge branch 'master' into ptt-control-on-cat-port
Fix serial i/o on Windows.
Yaesu newcat style command response reading improvements
Increase communications timeout for Icom rigs
Kenwood AIn; command has no reply
Revert read_string() to partial results are a success status
Remove gratuitous sleeps before function exits
Error checks on simulated direct VFO addressing
Elecraft K2 RTTY modes are not FSK
Kenwood and Elecraft rigs sometimes ignore commands
Removed kenwood_cmd function and replaced uses of it
Allow for failed test command on the K2
Elecraft K3 has 1 stop bit
Kenwood TS-570 series IF returns current frequency
Switch to "ID;" command for verification as no "AI;" on TS-840s
Increase Elecraft K2 comms timeout and retries
Switch Kenwood TS940 to generic kenwood CAT functions
Improve command verification for Kenwood & Elecraft
Use local buffer in kenwood transaction funciton
Clarify the handling of Kenwood CAT message terminators
Further clarification in the implementation of kenwood_transaction()
Removed redundant precondition test
Remove kenwood_simple_cmd as kenwood_transaction has that functionality
Call kenwood_open() for TS-2000 to ensure AI mode is disabled
Allow for bad ID from DDUtil in TS-2000 mode
Allow one extra byte in read_string() length to accomodate terminator
Enable data modes for the Icom IC-7100
Allow for PowerSDR ID in Kenwood TS2000 emulation mode
Fix TenTec Argonaut message lengths and timeout
Fix TenTec set split command
Implement get PTT status for the TenTec Argonaut
Fix error with width in set mode for the TT argonaut
Yaesu FT540 can only change the frequency of the current VFO
Fix defect in Kenwood TS-940 IF command response parsing
Fix response lengths for the TT Jupiter 538
Do not attempt CAT PTT commands on the Icom IC-706mkIIG
Use correct argument type for serial control line functions
Initial back end implementation for the Kenwood TS-990s
Mode set is not VFO targetable on the Kenwood TS990s
The Kenwood TS990s only does split Tx on SUB VFO
The doesn't appear to be a way of getting PTT/SEND on the TS990s
Lower both RTS and DTR on alternate PTT serial port
Honour any error status from serial port calls
Dummy get_ptt function needs to read RTS/DTR/PARALLEL
Make autogen.sh agnostic to whitespace in paths
Increase the number or retries for most Kenwood rigs
Command validation for Yaesu set commands
Remove unecessary delays from TS-940S backend
Proper IPv6 and dual stack networking
Fix compiler warnings
Proper IPv6 and dual stack networking for rotator net daemon
Attempt to restore AI status on exit
Allow for poor emulations of Kenwood rigs that have no ID command
Use correct function to execute set type commands with no response
Add a new command line option '--no-restore-ai' ('-n') to rigctl
Fix FT-817/857/897 issues and add some missing functionality
Fix missing PKTUSB mode setting code for FT-817 & FT-897
Fix a logic error in band detection during IC-910 set frequency
Add missing configuration getters
Detect C-IV NAK returns as rejected commands
Elecraft rigs do not switch VFO in IF command responses during split Tx.
Redundant split mode directives on Elecraft rigs cause Tx failures
Only use IPv6 features on Windows versions that support it (>=XP)
Improve IPv6 portability and consistency
Add 23cms to IC-910(H) backend
Implement combined split VFO frequency and mode setting.
Initial implementation of rig_{set,get}_split_freq_mode() for FT-857.
Implement rig_{set,get}_split_freq_mode() for IC-756 series.
Add {get,set}_splitfrequency_mode for the IC-910(H)
Elide unnecessary CAT commands when setting split frequency and mode
Do not swap VFO unnecessarily
Better set frequency semantics for the IC-910(h)
VFO targetable get frequency operation for the Icom IC-910(h)
Make sure right band is used when setting frequency on IC-910(H)
Use rig state rig port retry option rather than from capabilities
Use a sensible port timeout value for the Kenwood TS-850
Further attempts to simplify and improve Icom CAT for split operating
Add RIG_PASSBAND_NOCHANGE as possible set_{split_,split_freq_,}mode argument
Switch to POSIXLY_CORRECT mode for getopt_long()
Fix a regression introduced in 222ad74
Do not crash if expected CTCSS tones not sepcified
Do not attempt to query AI state on the TS-450s as it is not supported
Some more Kenwood rigs with no AI query
Adjust rig_list_foreach to allow use for unregistering
Fix an issue presenting on the Yaesu FT-450(D)
Release the serial port used for PTT when possible
Change the IC7600 & IC7800 set/get mode to versions that support DATA modes
Add rig_{open,close} functions to TS-790 backend
Revised kenwood rig busy response handling
Add get and set split functions for the TS450S
Simplify and fix defects in the FT991 back end
Fix some endian issues in the si570/AVR SDR back ends
Fix a state machine defect with repeated PTT reset calls
Do not pass --no-cpp_precomp to compilers on Mac OS X
Allow RIG_LEVEL_STRENGTH queries over the network link
Stop rigctld and rotctld crashing when service threads cannot write to clients
Use snprintf throughout kenwood/kenwood.c for buffer safety
Fix off-by-one issue in reading memory mode from IF command response
Fix some issues with commands not supported by TS-2000 CAT emulations
Add best guess transmit status to rig state structure
Take out unecessary delays in K(X)3(S) back end.
FT-817 status queries honour retries and timeout
Make rig_open() call in rigctld lazy and add graceful termination
Simplify SWIG interface definition and hide 64-bit values from Lua binding
Remove unnecessary delays from TS-990 and TS-2000 back ends
Change frequency setting for the FT-747GX to something more basic
Fix an incorrect error return value from win32_serial_select()
Fix timeout issues with the Ten-Tec Orion/Eagle
Ensure compilation works with a pre C11 compiler
Make code C90 compliant again
Move unnecessary global and file static variables to the stack
Simplify unnecessary persistence of extended response state
Fix misunderstanding of netrigctl_transaction() return value
Made PTT and DCD options consistent between rigctl and rigctld
Report unrecognised PTT and DCD types in rigctl and rigctld
Update i/o functions to support GPIO(N) port closure
Fixed erroneous messages in rig_close with GPIO(N) PTT or DCD types
Remove duplication across GPIO and GPION handling of PTT and DCD
Improved get PTT state handling in dummy backend
Simplify closing of device files
Repair a regression with the dummy get PTT functionality
Revert "Add debug to serial.c"
Repair a regression with the dummy get PTT functionality
Revert "Add debug to serial.c"
Fix regression with slow responses from SmartSDR causing errors
Deal with remote PTT type at the client end
Avoid 'echo -n' as macOS sh doesn't support it
Fixing an operator precedence defect
Updates to the TH-D7A/E back end
Less ambiguous variable name and repair merge issue in prior commit
Add missing config parameters for rig power on/off and screen-saver
New power on option rather than power on/off
Make version recording safe for parallel builds without breaking make dist
Make version recording safe for parallel builds
Ensure old hamlibdatetime.h headers in the source dir are ignored
Merge branch 'safe-scs-versioning' of ssh://git.code.sf.net/u/bsomervi/hamlib into safe-scs-versioning
Fix make dist versioning
Use BUILT_SOURCES make mechanism as intended
Fix rebuild dependency
Build hamlibdatetime.h every time
Force copy over existing
Minimize rebuilding
Correct use of sh if
Another attempt at a reliable SCS version header generation
Remove temporary file
Add missing shared library API exports
Add missing export definition
Blaine Kubesh (8):
added Icom803 to icmarine
added Icom803 to icmarine
added Icom803 to icmarine
Update ic-m803 remote-id to 20
Update icm803.c
Update AUTHORS
undo author changes
Update icm803.c
Bob Freeman (1):
New CNCTRK rotor backend
Brian G. Lucas (10):
Pretty much a complete re-write of thd72.c, since the old one didn't work at all. Many commands have been tested with real hardware. But more work remains to be done.
WIP: thd72 driver. More level, func, and parm stuff works.
WIP: thd72 driver. Try to simplify the menu based interface.
WIP: thd72 driver. First cut at get_channel(). Other cleanup.
WIP: thd72 driver. More interfaces implemented. Other cleanup.
Implement some more interfaces. Comment out get_chan_all_cb because the block read routine doesn't work.
Fix a format so that it works with Windows. Can't test it because I have no Windows machines.
Fix RFPOWER level for FT-450D. It uses 5-100, rather than 0-255 that the FT-450 does.
In newcat_open(), initialize rig_id in case any subsequent commands need it.
Some calls to thd72_get_menu_item where passing wrong values for range check.
C-Elegans (1):
Add ability to have rigctld display transverter frequency
Charles Suprin (7):
Add file for TM-D710 support.
Merge branch 'master' of ssh://hamlib.git.sourceforge.net/gitroot/hamlib/hamlib
Add D710 to riglist.
Add D710 code to kenwood library.
Register D710 interface.
Initial D710 Implementation.
Register D710 interface.
Charles Suprin, AA1VS (3):
extend th_get_vfo_char to support D700
Changed th_set_freq to round and select step size to use. Allows 6.25kHz and 5kHz channelization.
Use new th_set_freq for TM-D700
Chris Karpinsky, AA1VL (7):
add serial_flush() method to clean rx buffer
initial stab at this for the Yaesu FT-817
add ft817.*
add ft817
bump the backend status to ALPHA
Initial entry of cgirig giving ability to use hamlib from a web browser.
increased post write delay to 300
Chris Ruvolo (4):
TS-690: deal with optional tone board using TS-450 logic
TS-690 does not implement the PC command to get/set output power level
TS-690 does not implement the GT command to get/set AGC rate
TS-690: bump version
Chuck Hemker, N2POR (1):
Use RIG_TARGETABLE_MODE in rig_set_mode and rig_get_mode
DL1YCF (6):
Merge branch 'master' of https://github.com/Hamlib/Hamlib
Merge branch 'master' of https://github.com/Hamlib/Hamlib
Merge branch 'master' of https://github.com/Hamlib/Hamlib
Merge branch 'master' of https://github.com/Hamlib/Hamlib
Merge branch 'master' of https://github.com/Hamlib/Hamlib
Merge branch 'master' of https://github.com/Hamlib/Hamlib
Dale E. Edmons, KD7ENI (19):
Added comments to commandline in rigctl (second time) --Dale
Started TS-2000 update/overhaul --Dale
Copied too much stuff, backed out what I broke.
Bring ts2k.c more in line with current CVS.
Changed ts2000.c to ts2000.h.
Start of rig menuing functions.
New file.
Renamed ts2000.c.new ts2000.h
Bring code more in line with CVS code.
Changes often, so added status. Will delete when things stabilize.
Corrected status to CVS branch.
Renamed new ts2000.c to ts2000.h
Wouldn't compile. Removed ts2k.c. Haven't got all new rig.h stuff removed.
Temp kludge to make ts2k.c compile (keeps Hamlib from compiling!).
Updated status.
Added working TS-2000 files. There are some changes left out but this is the minimum I could commit and have a functional rig. The cost is that I've broken kylix and others that duplicate rig.h. I'm in the process of repairing the damage. Please be patient. I hope a day or so, but am asking for up to a week. E-mail me about *anything* you find broken. Kylix (and similar) is (are) known to not work.
Changed name back to original.
Had to re-run automake kenwood/Makefile.
1) Updated branch_ts2k with respect to HEAD. 2) Working ts2k_menu. (only in RIG_MODEL_TS2K) 3) Split TS-2000 into experimental and standard versions: RIG_MODEL_TS2000 = standard, RIG_MODEL_TS2K = experimental. 4) Basic command parser in tests/rc. Will open/close rig or copy a freq from one rig/vfo to another rig/vfo. Very cool. Very basic. Very experimental. 5) Added test programs. a) testcmd - calls parser (no command prompt yet!) b) testts2k - replacement for testrig (with trivial modification) c) testptt - testts2k/testrig should not transmit. TX stuff in testptt. 6) Used crowbar to merge HEAD into branch_ts2k. Working on clean-up. 7) I'm sure I've forgotten or neglected to mention some other stuff.
Daniel Estévez (2):
Fix DIG MODE for FT817-ND
Fix DIG MODE for FT817-ND
Daniele Forsi (5):
Set the executable bits on py3test.py
Fix spelling errors
Fix more spelling errors
Fix more spelling errors
Fix typos
Daniele Forsi IU5HKX (1):
Fix a [missingInclude] "information" when running cppcheck --check-config
Dario Ventura (3):
New Prosistel rotor backend from IZ7CRX
Add elevation code to Prosistel backend
TS2000 Satellite mode and Gpredict
Dariusz Bismor, SQ9KEJ (1):
rigmem: implement CSV file loading
David Fannin (1):
Submission for new backend model (134) for Yaesu FT-DX1200
Davide Gerhard (3):
tests/{memcsv.c,memsave.c}: partially revert commit 4072f9f4
ic746.c: correct chanbuf length, fix channel structure and support split
ic746.c: add ic746pro_set_channel() to load memory from csv
Dawid Szymanski (2):
ICOM Voice Keyer implemented.
typo fix
Diane Bruce, VA3DB (5):
- first cut at fixing configure to recognise --without-tcl-binding and --without-python-binding options
- gt_HEADER_INTTYPES_H is definitely bogus here, leftover from what?
- document debian/FreeBSD needs for AUTOMAKE etc. - add in libtoolize which should be there
- These should have been commented out.
- Extra comma on RIG_STATUS_BUGGY can cause a compiler error.
Dieter Röver (1):
Fix bug in vfo_comp calculation in Hamlib
Ekki Plicht (DF4OR) (2):
New model Icom IC-R8600
Patch for Icom DCS code handling
Elliott Liggett (1):
Added functionality for the IC-7300 auto antenna tuner
Eriks Dobelis (2):
ft817: adding delay before next retry after returning from tx to rx
ft817: Moving delay value into #define section of the header
Ervin Hegedus (9):
RIG_PASSBAND_NORMAL wasn't handled correctly when rig_set_mode() was called - fixed
Fixed SWIG `Setting a const char * variable may leak memory' error
Fixed Kenwood filter cmd when passband is set to 500Hz
Merged from upstream
Merge branch 'master' of http://git.code.sf.net/p/hamlib/code
Added Lua binding and demo script
Added new example to Python demo script (set/get float type level)
Change variable length argument handling in affected functions
Fix two typos
Ervin Hegedüs (1):
rig.swg: New properly formatted macro
Evgeniy Titorenko (1):
Add Radant AZV-1 Rotator controller protocol.
Francois Retief (21):
Added read_serial function to read strings from a port.
Corrected some comments
Added code to hexdump to right align ASCII dump column
added private caps for rig termination character
add private caps and more commands.
Changed to a new transaction function and adde quite a few commands.
add private caps to store the termination character of Kenwood rigs commands.
added a kenwood_init and _cleanup routine for priv caps & priv data.
Added a new function: LCD Lamp ON/OFF (for Kenwood TH-7DA)
check trn state of rig in rig_open.
Initial commit of Kylix binding
New backend for rotators
New RPC backend for rotators
Added rot_move function
Fix macro name
Added rot_move function
Added easycomm and rpcrot backends
Fixed circular dependency for rpc.rigd and rpc.rotd
regenerated
Added IC-910 rig.
Added constants for the IC-910 rig.
Frank Goenninger (3):
Add ADAT ADT-200A backend
adat updates from Frank, DG1SBG
ADAT fixes on Windows
Frank Singleton, VK3FCS (165):
Initial revision
Initial revision
*** empty log message ***
*** empty log message ***
*** empty log message ***
Initial revision
Initial revision
*** empty log message ***
*** empty log message ***
added build_all ,cleanall and verify targets
*** empty log message ***
initial top level makefile
add some things
initial import
initial import
initial import
fixed some typos
use rig_open and rig_close
added rig_open and rig_close
fixed cmd_sat_on / off
added sat-on and sat_off to test
changed cmd_get_rx_status, must do tx also
updated test()
all reads use while (1) and break
added ../common as object path
added rig_open and rig_close
using rig_open and rig_close and serial.h
use common dir for serial stuff
use ft747 on serial port /dev/ttyS0
read uses while(1) and break
use while(1) and break
added read_sleep
use read_sleep now from serial.h
using read_sleep from serial.h
had rx and tx status swapped (document error?)
removed cmd_get_update
using CVS instead of RCS directories
use MODE_xx defines
cannot use const int in case statements ?? so use #define instead
use #defines for MODE_XXX used in case statements
working out freq conversion, unfinished
playing with test routines
long int cmd_get_freq_mode_status_main_vfo(int fd, unsigned char *mode);
long int cmd_get_freq_mode_status_main_vfo(int fd, unsigned char *mode)
frq = cmd_get_freq_mode_status_main_vfo(fd, &mode);
starting with the cmd_set commands now
starting on cmd_set commands now
starting on cmd_set_freq commands now
add scanning todo
now set sat rx and tx freq and mode also
fix typo
dump raw hex data when writing and reading
trying some cms_set_freq_xxx commands
added routines for dec <-> packed decimal conversion
minor
added generic hex dump routine, static void dump_hex(unsigned char *ptr, int size, int width);
removed unwanted debug printf's
removed dump_hex from here..
calc_freq_from_packed4 is about to be replaced
calc_packed_from_char and calc_char_from_packed now here
cleanup
cleanup
void dump_hex(unsigned char *ptr, int size, int width);
adding dcs tables and repeater offset in Hz
describe faulty yaesu documentation
added README.license for GPL
added GPL license info
included full GPL license
Updated docs to point to http://sourceforge.net/projects/hamlib/ and added a C code snippet on how to use the API.
added -I$(COMMON_DIR) to find rig.h
added -I$(COMMON_DIR) to find rig.h
adding capabilities
initial capabilities stuff
starting to add rig_caps stuff
starting to add rig_caps stuff
starting to add rig_caps stuff.
added GPL stuff and comments
adding rig_caps stuff
adding rig_cap stuff
adding rig_caps stuff
add capabilities and preferences
adding rig_caps functionality
adding rig_caps stuff
frontend reduction on backend function namespace - phew !!
frontend API clarification
removed old open_port2() using old rig_caps
fixed some typos, added 3 more candidates for API
missing ; in some enums
converting to frontend/backend structure compiles ok
removed open_port() and write_block()
removed open_port() and write_block()
fixed typos, added &ft747_caps in rig_caps
changing to frontend/backend style
converting to frontend/backend style
added 3 more cmd_* for API examples
Example of setting rig Main VFO to 439.700 Mhz FM
cleanup comments
added extern const struct rig_caps ft747_caps;
still thinking about set/get strategy
minor updates
added extra rig caps
added some set/get examples with return code checking
added testrig to Makefile, no linking yet
added usleep to read_sleep()
updated rig_caps structure
*** empty log message ***
test making a shared lib (at last) for the frontend - more todo
test making a shared lib for the frontend - make hamlib
describe frontend/backend structure
updated code snippet example
started ft747_set_ptt and ft747_set_vfo
starting to implement set/get pairs
added typedef enum ptt_type_e ptt_type_t;
added VFO types to enum
starting on libhamlib Makefile, added ./lib and ./include under common
make, make install, and make clean work ok, using ./lib and ./include directories also.
make, make install, and make clean work ok, using ./lib and ./include directories also.
removed "make verify". Added reference to common/Makefile
added printf("testrig:main() has been called \n"); for testing linking
makefile for testing testrig linking
alternative rig_base declaration removes references to rig_caps at compile time. should populate it another way -- FS
added printf's to confirm rig.c (hamlib) is being called ok
better libhamlib.so version :-)
added ft847_open and ft847_close to enable CAT ON/OFF
added ft747_open and ft747_close
updated lib names for backend to libhamlib-xxxxx.so
API updates - added set/get_mode
merge with TRN stuff and add some set/get_mode and vfo stuff
added post_write_delay
cvs mails to hamlib-cvs-digest
cvs mail update works ok :-)
minor fixes
updated ptt/mode/vfo
added set/get freq to use generic bcd etc
more set_freq() examples
1. Added VFO as target for some set/get cmds. 2. ./testrig still runs ok using RIG_VFO_CURR.
minor update to active VFO handling in _set_vfo
some new defines for FT747_VFO_A/B
minor updates to active vfo handling
added ptt handling example, stand back !
trying different approach to storing cmd sequence. _set_ptt is being converted. Needs tidying up though. Some sequences are complete, and can be read from static data. Incomplete sequences will eventually be copied form static declaration, and completed in priv data.
Removed static stuff from functions. Also, begin to implement table driven command translation from API to rig native. priv now contains a cmd table that is used for backend commands towards rig.
Added some new freq/mode combinations.
converting ft847 to table driven, similar to ft747.
more table driven stuff for ft847. cat/ptt/freq being converted.
Added ft847_send_priv_cmd(), converted some part of API to use this. Added _set_mode to work now. TODO: put _send_priv_cmd into yaesu.[ch] so ft747 can use also. Turned on PTT also (stand back)..
rig_cleanup and rig_close not calling backend
removed unused calc_ functions.
removed old API functions, general cleanup tested rig_close and rig_cleanup
Initial release, common yaesu declareations etc.
add version tag
nseq uses YAESU_CMD_LENGTH
Initial yaesu Makefile
Moved from ft747 and ft847 dirs
common yaesu handling
common yaesu dir
Begin to use common yaesu code
general cleanup, added _send_priv_cmd
added targetable_vfo value to caps
minor cleanup
ChangeLog history started
Initial import for ChangeLog handling
starting to convert rig struct to readable form
more of convert rig struct to readable form
Changelog update for HAMLIB-1.1.1
Gerardo Richarte (1):
gs232b.c: Improve get_position string parsing
Gisle Vanem (1):
Enable verbose mode in bindings/pytest.py
Greg Troxel (1):
Warning about dodgy code in drake.c
HB9EIK (4):
Initial release ELAD FDM DUO
Update ELAD files
Update build system for ELAD backend
Update copyright for fdm_duo.c
Hans Van Ingelgom (1):
Added Peaberry V1 and V2 models
Hegedüs Ervin (4):
Merge branch 'master' of http://git.code.sf.net/p/hamlib/code
Check SWIG string functions for some languages
Leave off multiply 'typedef const char * const_char_string' definition (in rig.swg and rotator.swg)
Fixed int[10] type variable error in bindings
Jae Stutzman (5):
Added HPSDR backend
Clears potential garbage data in read buffer prior to command being sent
Updated PiHPSDR backend defaults
Use Windows ioctlsocket to avoid buffer overrun
Added new AGC control for PiHPSDR
James Watson, HZ1JW (2):
Added ic7200 to icom
Corrected modes in ic7200.c
Jaroslav Skarvada (2):
Fix hardcoded pcconfig libdir
Fix serial_port DCD squelch
Jeroen Vreeken (9):
Add support for GPIO PTT.
Add missing breaks and improve error messages
Add Dorji DRA818 modules (VHF and UHF variants) Also works with NiceRF SA818 modules
Merge branch 'master' of git://git.code.sf.net/p/hamlib/code
Small fixes to DRA818 volume handling
Add GPIO and GPION options for DCD. Also bump abi version since the config params struct needed resizing.
Merge branch 'master' of github.com:Hamlib/Hamlib
GPIO working after debugging
Merge branch 'master' of github.com:Hamlib/Hamlib
Johan Ström (1):
Backup serial options on open, restore on close
John Paul Adrian Glaubitz (1):
dummy/dummy.c: Fix unaligned access in dummy_get_level()
Jonathan Bastien-Filiatrault (3):
Correct FT; command that does not exist on the FT-891.
Allow setting split mode without smashing the VFOB frequency.
Scale power values correctly for Yaesu FT-891.
Jonny public (1):
ether6: New rotor backend from Jonny, DG9OAA
Joop Stakenborg, PG4I (116):
update (kenwood is not a WIP anymore)
first implementation of kenwood_get_ptt
enable get_ptt for this rig
add get_ptt for this rig
additional protocol checks and cleanups
fix signal strength
add RIG_LEVEL_RFPOWER
fix_compilation
add rit capabilities
bring comands in sync with other kenwood rigs
add rit capabilities
send_morse added
explain set_rit
fix get_ctcss_tone by using IF command
typo
add xit capabilities
add set_level and get_level
bring rig in sync with other kenwood rigs
bump version numbers
nothing returned by the rig for these commands
fix get_level_agc
fix set_level_agc
getting in sync with the debian 1.1.2 package
remove template files
initial checkin
make this NMU for now
correct the path for copying files in the apropriate package
do not install the old changelog
versioning not used
move .la, .a, .so files to the correct package
include rpc.rigd and rpc.rotd
include pkgconfig support
don't create shlibs file for drake, jrc and easycomm libraries
move hamlib1 to the top so the documentations gets installed correctly
make building easier, call autogen.sh
INSTALL file not used
build the documentation package
we don't have to call configure twice
cleanup
remove some build dependencies and don't call autogen.sh
ts450s uses IF command for get_vfo, get_freq and get_mode
minor bugfix, bump to beta
add CWR and RTTYR
this rig does not have a command for reading IF bandwidth
retrieve passband with FW command
passband should be calculated after mode is set
use rig_passband_normal here
various lintian fixes
one last lintian fix
use FW command to set bandpass
cw filters for normal, narrow and wide
more filters
get_mode and set_mode for this rig
filters
some comments
correct rit
add get_level
cleanups
more modes
set_level for this rig
should use kenwood_get_freq
minor bug
add rpm support
need hamlib.spec for 'make rpm'
make rpm will fail with a '-' in the version number
a working spec file
update debian build for rotorez and fodtrack, minor fixes
unofficial
fix the debian build script, new maintainer
update the debian build tree to the latest
correct baudrate for the ts-950, use the information field IF for get_vfo by default (supported by most kenwood rigs), ts870s will use the much shorter FR command for get_vfo
correct baudrate for some rigs and add ts-950 to the id_list
ts-850 returns ID 009 according to martin, OK1RR
fix 'make rpm'
build for hamlib-1.1.5
not needed
sync with latest debian package and add tcl, c++, python and perl bindings
correct spelling
s-meter calibration by Matt Dawson
basic functionality by Matt Dawson, tested with grig and xlog
lifetime e-mail address :-)
sync with latest debian release
more functionality, mode and frequency get by Matt Dawson
only switch tx vfo is split is on
set attenuator level
export convenience function get_kenwood_level, so they can be use by other backends
add RIG_LEVEL_SWR, copied from ts850
add RIG_LEVEL_COMP, RIG_LEVEL_AGC, copied from ts850
bump version, no preamp
really add ALC read this time, only change meter if needed, cleanups
split has_get_level and has_set_level
fix coding, python2.4 compatibility
fix compilation warnings
more compilation warnings nuked, use tone_t for ctcss_list
use size_t
fix more compilation warnings, int->size_t, unsigned char->char
more unsigned char->char and int->size_t transitions
set functions should have ack_len zero, also need to check other rigs
make sure we use ack_len=0 for functions that return nothing (set functions)
more unsigned char->char and int->size_t transitions
extend rig capabilities, patch by Tom, DL1JBE
add RIG_LEVEL_STRENGTH to caps, set post write delay to 0 and do some cleanups
re-establish post-write delay
remove rpath backdoor
long long really needed here?
updates by matt, GW0VNR
long long really needed here? - patch by diane Bruce
distribute footer.html
correct set/get power
try better s-meter readings
packages renamed
obsolete
sync with latest debian release
no need to link to python
sync with latest, python changes
another debian update: use 'make distclean' in the rules file
Joshua Lynch (4):
initial SatEL rotator support
factored io functions out. improve reliability...i hope.
fixed state bug. reconnecting would disable motion every other connect.
merged upstream/master into master
Juergen Rinas, DC3BW (4):
added antenna switching...
added a few get_level/set_level get_function/set_functions.
* fixed set_func (concerns most kenwood rigs) * added 115200 to the list of baudrates in probeallrigs_kenwood()
* fixed ptt * expanded frequency range (available after firmware update) according to http://www.kenwood.com/i/products/info/amateur/ts_480/firmware/pop_ts480_e.htm * added tuning steps * added filter list * increased version info
Julian Cable (3):
WinRadio G313: Updates from Julian Campbell
wrg313api.c: Fix Win32 (MinGW) build issue
Use Automake conditionals for G313 build
Kamal Mostafa (3):
Fix mingw32 cross-compilation procedure and config
Do not let macros/ac_python_devel.m4 trash CPPFLAGS and LIBS
Fix spelling errors
Kamal Mostafa, KA6MAL (19):
Hard-code length of hamlib_version and hamlib_copyright strings to stay compliant with hamlib 1.2 ABI and avoid spurious "consider relinking" warnings from dynamic loader.
Removed stale debian/ dir from the hamlib source (it is maintained in the Debian diff and isn't useful in this tree).
Update bundled libltdl (libtool) to version 2.2.6b to address CVE-2009-3736. - autogen.sh: never downgrade our bundled libltdl/ (only run libtoolize if system version is newer than our bundled version). - autofixer.sh: script removed as libtool 1.x is no longer allowed. - configure.ac: (not enabled) optional setting to deprecate embedded libltdl/.
Added Kamal Mostafa and Jaime Robles as maintainers for Debian packaging.
Fix build --with-python-binding breakage introduced by Python 2.6: Do not reference LOCALMODLIBS, else it will add libraries to our link line (e.g -lssl) which are not necessarily installed.
Elektor 507 frequency selection resolution improvements, contributed by John Nogatch AC6SL.
Move backend libraries into /usr/lib/hamlib directory.
Force automake to invoke the C (not C++) linker in kit/ when no C++ is in use.
python: fix --with-python-binding configure macro
fix configure.ac paths for FreeBSD
Remove bundled libltdl (libtool)
README.developer: restore libtool prerequisite text
Fix segfault on improper -C syntax
configure: add check and advice for missing ltdl.h
configure: refine advice for missing ltdl.h
source warnings cleanup: rpcgen-generated code
source warnings cleanup: #if-0 out a few unused routines
source warnings cleanup: #ifdef out unused FT-840 routines
source warnings cleanup: rotorez_rot_reset wrapper for stop
Kayne (1):
Updated k3_set_modes to work on KX3
Kosta Arvanitis (1):
Allow IC-7410 to send cw messages
Kārlis Millers (1):
Merge pull request #1 from Hamlib/master
Ladislav Vaiz (3):
Add Android build support
Android build updates for monolithic build
Initial support for FUNcube Dongle Pro
Larry Gadallah (1):
AR7030+: Error reading signal strength for low signal levels.
Larry Gadallah, VE6VQ (20):
Added Larry Gadallah as maintainer of AOR AR7030+
Added AOR AR7030 Plus
Added caps for AR7030+
Added caps for AR7030+
Added AR7030+
Alpha version of AR7030+ backend
Alpha version of AR7030+ backend
Rationalized naming convention, ran everything through lint.
Rationalized naming convention, ran everything through lint.
Fixed SVN tags
Fixed SVN tags
Added AR7030P utilities in ar7030p_utils.c
Initial version of utility functions for AR7030 Plus receiver
Removed utility/helper functions, added/updated Rig API functions
Added new I/O helper functions, IR code definitions
Added private data to support channel information
Added init/cleanup functions, started implementation of mem/channel access functions
Added prototypes for pbsToHz() and hzToPBS() helper functions. Added comments to denote mey_sq, mey_pb, and mey_id labels
Added implementation for pbsToHz() and hzToPBS() helper functions.
Added various memory/VFO functions.
Magne Mæhre (1):
Enable set_powerstat (turning radio on/off) for IC-7100.
Malcolm Herring (62):
init branch
init branch
New model: Icom IC-R6
Icom IC-R10 & 20 testing complete. Move to Beta
ignore build
Complete R6 commands
Add IC-R30
daily
fix tones
Merge remote-tracking branch 'Hamlib/master'
update
Merge branch 'master' into icr6
ICR6 new functions
merge
update
Merge remote-tracking branch 'Hamlib/master'
commands 00-15
Merge branch 'master' into icr30
icr30 updates
Automatically detect CI-V echo state
Icom R8600 to Alpha
Update contributors
Merge branch 'master' into origin/master
Fix Icom DCS SQL funnctions
Merge remote-tracking branch 'Hamlib/master'
Merge remote-tracking branch 'Hamlib/master'
Prepare for D-STAR implementation
Merge remote-tracking branch 'Hamlib/master'
Initial implementation of icom extended operations
more extended operations
Merge remote-tracking branch 'Hamlib/master'
more ext functions
fix merge conflicts
more ext_cmd updates
ic7100 ext functions
Merge remote-tracking branch 'mdblack/master'
Merge branch 'master' of https://github.com/malcolmh/Hamlib
add token list for ext operations
Merge remote-tracking branch 'mdblack/master'
more ext operations
Merge remote-tracking branch 'mdblack/master'
custom ops using ext ops scheme
custom level ops
Merge remote-tracking branch 'mdblack/master'
Merge remote-tracking branch 'Hamlib/master'
add scope functions
update IC7100
update rigs for new functions
Merge remote-tracking branch 'Hamlib/master'
new directory structure
Merge remote-tracking branch 'Hamlib/master'
correct powerstat caps
Merge remote-tracking branch 'Hamlib/master'
New custom parm implementations
restore get_powerstat
correct rig_close cap
Merge remote-tracking branch 'Hamlib/master'
Merge remote-tracking branch 'Hamlib/master'
Merge remote-tracking branch 'Hamlib/master'
add g/set_ext_func to API
additional error checking for extended operations
Add Macports to README.osx
Mark J. Fine (25):
Fixed post-write-delay timing
Added support for ECSS/FAX and meter strength
Added support for meter strength
Added ECSS support to R8B and reconfigured default filter modes
Reconfigured default filter modes
Updated to reflect recent changes within v1.2.2cvs-2
Fixed CWPITCH function on IC-R75 to use 'set mode data' command. Added level granularity steps
included other rig_ prefixes
fixed get_powerstat to read correctly when memory channel is blank
Added memory switching function in set_vfo Added set memory channel# in radio in set_mem
Added set_vfo command for vfo/mem switching Corrected handling of "vacant" memory channels
Correctly detect if in memory mode in get_vfo() Reduced large decision trees with bitwise math
Added set/get channel functions
Updated set/get channel functions
Made get_channel aware of untunable blank memory channel
accounted for dual preamp (10 & 20db)
Fixed passband width return for IC-756PROII
Added FM narrow to passband spec
Added a provisional define for a variable bandwidth control
Added a provisional variable bandwidth control to the RIG_LEVEL enumeration
Added provisions for a variable bandwidth control Added provisions for a tone control Corrected problems with Squelch (SQL) and Notch (NOTCHF) controls
Added provisions for a variable bandwidth control (BWC)
Fixed low-end of freq range from 100kHz to 10kHz.
Fixed several differences in 535/545 commands
Added missing manual notch switch for the NRD-545
Martin Cooper (2):
Don't expect a response when none is required.
Don't send EasyComm I commands to EasyComm II rotators.
Martin Ewing (7):
Add test for valid set frequency, esp. for VFOA (ham band only) Expand valid range_lists for full hardware ranges Fix tt565_transaction to allow Morse commands.
Orion.c: remove spurious debug statement.
implement level settting and misc fixes
remove debug stmt
Increment Jupiter version
Trim TS950 commands that are not provided by CAT
jupiter.c: Updates from Martin, AA6E
Martin Ewing, AA6E (69):
specified buffer lengths, added default vfo A setting
Fix SWR & S-meter, set ATT, set AGC, add rough STR_CAL func.
Fix timeout, add retry, better S-mtr scale
various bug fixes
Added RIG_LEVEL_CWPITCH, RIG_LEVEL_KEYSPD, send_morse()
Added RIG_FUNC_TUNER, RIG_FUNC_LOCK and RIG_FUNC_VOX, fixed MEM_CAP.
Added VFO_OPS, promote to Beta
Support LEVEL_VOX, VOXGAIN, ANTIVOX Support LEVEL_NR as Orion NB setting (firmware bug), FUNC_NB -> NB=0,4
Add get_, set_ant (ignores rx only ant)
Added Orion, Orion 2 info
Squashed warnings about signedness
Orion S-meter cal
minor - add doxygen info for enums
minor - doxygen parameters
doxygen formatting
add comments
info on generating docs
doc improvements
add comment
documentation
documentation
allow atten = 0 dB
patch from SM6PPS
fix enum documentation
documentation page
documentation
documentation
split orion.c and add doc info
documentation
SM6PPS mods for AOR 5000a
further rx-320 mods by Ken Prox
use binary mode VFO requests
correct CHANNEL_CAPS sytax
Dead simple sample Hamlib program
Correct float vs int interpolation options
Add autodetect version 1 or 2 firmware (using rig_get_info). Correct V1 calibration. Make V2 calibration the default. Signal RIG_LEVEL_STRENGTH supported.
Moved firmware detection to new tt565_open routine, where it is done every time the rig is opened.
Add more functions to example program.
Ensure printable get_info string
Fix bug that seg faulted when get_info returned null. (No reward points!)
Add S meter operations to sample program.
Adjust retry & timeout values to help in case of no response from rig, i.e., if rig power happens to be off. Prettify some code indents.
Better error handling, reliability for serial I/O. Misc prettification.
TT Omni VI / Plus improvements
Fix typo
Fix Omni VI PTT function
Update Icom info
Declutter
Omni VI memories, rit/xit
Fix serial I/O error checking
Add author. (credits info added to web page, also)
Switch back to ASCII freq. setting because of hardware(?) bug.
Add AF, RF gain and squelch level capability.
Add thanks to W1RFI & ARRL
minor changes
RIG_STATUS_ALPHA reflecting initial tests.
fix missing comma
use rawstrength.i which matters in PPC compile
fix string handling in LEVEL_RAWSTR
Orion - implement RIG_LEVEL_STRENGTH
Example updates
Orion: Allow frontend to handle RIG_LEVEL_STRENGTH
Minor comment re rit/xit
Downgrade ERR to WARN (i/o retry)
Init revision - tnx Stephane
Autofixer sets up for libtool v1 or v2
autofixer.sh supportin libtool v1 and v2
minor update
repair echo cmd
Max Lock (1):
Addition of support for CM108B PTT
Michael Black (1307):
TenTec Omni VII update from W9MDB
New XG3 backend
Fixes to termios.c on W32 targets
xg3 patch
Check TS-590S for EU or US firmware
New backend for FT-991
Flush the debug stream
Omni VII to set VFO_CURR correctly
Omni VII patch for WSJT-X
FT-991 patch
Small FT-991 patch for WSJT support
Omni VII patch
FT-857 and FT-991 patches
Fix possible frequency overflow on Kenwood and Yaesu
Add get_freq to FRG-100
Clean up clang warnings on adat.c
Clear up a clang compiler warning in kenwood/elecraft.h
Clean up clang warnings in tentec
Fix port->pathname checks
Quell clang warnings in tests directory
Various Yaesu updates
Simply define TRUE to 1 in omnivii.c
Allow the ft757gx to work with WSJT-X.
Remove input redirects in autogen.sh
Initial support for the IC-7300
Add send_morse to icom rigs
tmd710 patch
Icom frame patch
Exposed constants via function calls
Remove define
Merge branch 'master' of https://github.com/N0NB/hamlib
Changed some modules to LGPL in lieu of GPL
Fixed buffer overflow in rigctl_parse and rotctl_parse
Merge branch 'master' of https://github.com/N0NB/hamlib
Move K3 DT0 before mode switch, add version info to electraft rig open, WSJT-X VOX rig split now works
Merge branch 'master' of https://github.com/N0NB/hamlib
Added IC-7850/51 -- works with WSJT-X
Merge branch 'master' of https://github.com/N0NB/hamlib
Add ic7850 ic7851 -- works with wsjtx
Add ic7850 ic7851 -- works with wsjtx
Merger 7850/51 into 785x
Fix ft991_get_mode
Added ft891 backend
Fix ic785x default addr to 0x8e
Fix FT-891 recognition
IC-M710 now working with WSJST-X
Add icm710.h to icmarine Makefile.am
Merge pull request #1 from Hamlib/master
Fix FT857 to return the SMeter-based value
Reduce debug info in flrig.c
Change RIG_MODE and RIG_FUNC to 64-bit values
Merge hamlib head
Add PRXll macro for 64-bit use
Fixup for 64-bit in memcsv.c
64 bit mods to netrigctl.c testrig.c
Add TS-890S as derivative of TS-480 plus new modes
Add XHCG to ic706.c
Change rmode_t to uint64_t and remove unneeded casts
Fix RIG_MODE structure in src/msic.c
Fix some 64bit items and add RIG_FUNC_NB2 for TS-890S
Suppress GCC unused-return warning
Fix rig_idx2settings for 64-bit sprintf_list functions
Fix flrig when WSJT-X startup causes rig mode change Increase flrig timeout value Add USB mode to flrig Fix flrig memory leak Fix bug where constant value was being trashed
Add PKT modes to ts590.c
Add BC2 and NB2 functions for newer kenwoods Change RIG_SETTING_MAX for 64-bit compatibility
All kenwoods to have 3-char commands for functions and return whatever value the rig returns instead of 0/1 Changes to add more ts890 capabilities, e.g. NB2, BC2
Fix kenwoood BC BC2 returns
Fix kenwood BC BC2 return
merge master
New utility to allow non-hamlib-aware programs to use hamlib rigs via COM ports Virtual com ports providing a TS-2000 Emulator Example connecting N1MM or such to FLRig via COM5/COM6 virtual COM pair rigctlcom -m 4 -R COM5 -S 115200 N1MM connects to COM6 TS-2000 115200 8N1
Add TUNER on/off fnction for Yaesu rigs
Fix segfault in rigctlcom with no args and improve usage
Add rigctlcom to install scripts
Add FT847UNI for early serial number units that are one-way comm
Add rigctlcom to gitignore
Reduce verbosity in FLRig
Ensure buf is zeroed in kenwood_safe_transaction to avoid return random data
Reduce verbosity of rig_strrmode and read_string
Improve error handling in network_flush when disconnect happens
Reduce verbosity of rig_strvfo
netrigctl can now do vfo mode -- has automatic detection of rigctld vfo mode rigctl automatically detects vfo mode of rigctld rigctli and rigctld recommend vfo mode if not selected
Merge branch 'master' of https://github.com/Hamlib/Hamlib
Fix memset in kenwood.c
Fix network_flush as it was not actually flushing before This was causing an infinite loop and WSJT-X to lock up using flex6xxx backend
network.c astyle applied
Add ability for rigctlcom to work with Ham Radio Deluxe
astyle format of rigctlcom.c
Relax chk_vfo requirement for backward compatibility
astyle for netrigctl.c
Merge branch 'master' of https://github.com/Hamlib/Hamlib
Fix ts590 RIG_LEVEL_AF
astyle ts590.c
Update TS590 version and make it STABLE
Add set/get powerstat for ic785x.c
Have kenwood set_powerstat ON wait for get_powerstat
Fix set_powerstat wait lo...
[truncated message content] |
|
From: Nate B. <n0...@us...> - 2021-05-17 02:42: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, Hamlib-4.2 has been created
at cdad07b5f66c5bc0f993511d333fe55554f6d8f9 (commit)
- Log -----------------------------------------------------------------
commit cdad07b5f66c5bc0f993511d333fe55554f6d8f9
Author: Nate Bargmann <n0...@n0...>
Date: Sun May 16 21:40:24 2021 -0500
Advance to 4.2 for release
diff --git a/configure.ac b/configure.ac
index 7086bb01..4fdd14a9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,7 +14,7 @@ dnl Please do not use '-' in the version number, as package managers will fail,
dnl however, the use of '~' should be fine as apt (others?) will treat
dnl it as an earlier version than the actual release. TNX KA6MAL
dnl PACKAGE_NAME + " " + PACKAGE_VERSION must not exceed 20 chars!
-AC_INIT([Hamlib],[4.2~git],[ham...@li...],[hamlib],[http://www.hamlib.org])
+AC_INIT([Hamlib],[4.2],[ham...@li...],[hamlib],[http://www.hamlib.org])
AC_CONFIG_SRCDIR([include/hamlib/rig.h])
AC_CONFIG_MACRO_DIR([macros])
-----------------------------------------------------------------------
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Nate B. <n0...@us...> - 2021-05-17 02:32:15
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via 561b8d0785161eaf2f9bc70b1f86089e0cae2505 (commit)
from fbd07524e2291974b32b75241115c35b974b0dba (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 561b8d0785161eaf2f9bc70b1f86089e0cae2505
Author: Nate Bargmann <n0...@n0...>
Date: Sun May 16 21:31:49 2021 -0500
Advance to 4.3~git
diff --git a/NEWS b/NEWS
index c82c9727..425f1c54 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,9 @@ Copyright (C) 2000-2021 Michael Black W9MDB, and others
Please send Hamlib bug reports to ham...@li...
+Version 4.3
+ * 2021-??-??
+
Version 4.2
* 2021-05-17
* New rig_get_mode_bandwidths -- returns token set for bandwidths for given mode
diff --git a/configure.ac b/configure.ac
index 7086bb01..eeb19891 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,7 +14,7 @@ dnl Please do not use '-' in the version number, as package managers will fail,
dnl however, the use of '~' should be fine as apt (others?) will treat
dnl it as an earlier version than the actual release. TNX KA6MAL
dnl PACKAGE_NAME + " " + PACKAGE_VERSION must not exceed 20 chars!
-AC_INIT([Hamlib],[4.2~git],[ham...@li...],[hamlib],[http://www.hamlib.org])
+AC_INIT([Hamlib],[4.3~git],[ham...@li...],[hamlib],[http://www.hamlib.org])
AC_CONFIG_SRCDIR([include/hamlib/rig.h])
AC_CONFIG_MACRO_DIR([macros])
@@ -56,7 +56,7 @@ dnl See README.release on setting these values
# Values given to -version-info when linking. See libtool documentation.
# Set them here to keep c++/Makefile and src/Makefile in sync.
ABI_VERSION=4
-ABI_REVISION=2
+ABI_REVISION=3
ABI_AGE=0
AC_DEFINE_UNQUOTED([ABI_VERSION], [$ABI_VERSION], [Frontend ABI version])
-----------------------------------------------------------------------
Summary of changes:
NEWS | 3 +++
configure.ac | 4 ++--
2 files changed, 5 insertions(+), 2 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|