hamlib-cvs-digest Mailing List for Ham Radio Control Libraries (Page 24)
Library to control radio transceivers and receivers
Brought to you by:
n0nb
You can subscribe to this list here.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(57) |
Nov
(27) |
Dec
(25) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(41) |
Feb
(101) |
Mar
(60) |
Apr
(32) |
May
(32) |
Jun
(198) |
Jul
(95) |
Aug
(60) |
Sep
(48) |
Oct
(96) |
Nov
(27) |
Dec
(222) |
| 2002 |
Jan
(180) |
Feb
(46) |
Mar
(68) |
Apr
(11) |
May
(36) |
Jun
(34) |
Jul
(113) |
Aug
(42) |
Sep
(71) |
Oct
(65) |
Nov
(116) |
Dec
(40) |
| 2003 |
Jan
(32) |
Feb
(92) |
Mar
(29) |
Apr
(102) |
May
(21) |
Jun
(34) |
Jul
(3) |
Aug
(60) |
Sep
(30) |
Oct
(62) |
Nov
(57) |
Dec
(33) |
| 2004 |
Jan
(28) |
Feb
(46) |
Mar
(16) |
Apr
(14) |
May
(31) |
Jun
(21) |
Jul
(10) |
Aug
(80) |
Sep
(42) |
Oct
(11) |
Nov
(28) |
Dec
(13) |
| 2005 |
Jan
(35) |
Feb
(26) |
Mar
(20) |
Apr
(118) |
May
(2) |
Jun
(5) |
Jul
|
Aug
|
Sep
(5) |
Oct
(1) |
Nov
(13) |
Dec
(1) |
| 2006 |
Jan
(9) |
Feb
(25) |
Mar
(22) |
Apr
(6) |
May
|
Jun
|
Jul
(2) |
Aug
(1) |
Sep
(3) |
Oct
(46) |
Nov
(13) |
Dec
(7) |
| 2007 |
Jan
(9) |
Feb
(14) |
Mar
(3) |
Apr
|
May
(6) |
Jun
(1) |
Jul
|
Aug
(11) |
Sep
(7) |
Oct
(8) |
Nov
(41) |
Dec
(3) |
| 2008 |
Jan
(27) |
Feb
(16) |
Mar
(13) |
Apr
(23) |
May
(39) |
Jun
(4) |
Jul
(7) |
Aug
(1) |
Sep
(13) |
Oct
(52) |
Nov
(44) |
Dec
(55) |
| 2009 |
Jan
(72) |
Feb
(69) |
Mar
|
Apr
|
May
|
Jun
(13) |
Jul
(1) |
Aug
(6) |
Sep
(15) |
Oct
(11) |
Nov
(31) |
Dec
(20) |
| 2010 |
Jan
(24) |
Feb
(21) |
Mar
(22) |
Apr
(40) |
May
(38) |
Jun
(4) |
Jul
(2) |
Aug
(22) |
Sep
(19) |
Oct
(14) |
Nov
(5) |
Dec
(8) |
| 2011 |
Jan
(14) |
Feb
(36) |
Mar
(6) |
Apr
|
May
|
Jun
(23) |
Jul
(13) |
Aug
(8) |
Sep
(7) |
Oct
|
Nov
(3) |
Dec
(9) |
| 2012 |
Jan
(17) |
Feb
(13) |
Mar
(10) |
Apr
|
May
(1) |
Jun
(14) |
Jul
(4) |
Aug
(12) |
Sep
(2) |
Oct
(24) |
Nov
(14) |
Dec
(2) |
| 2013 |
Jan
(4) |
Feb
(3) |
Mar
(3) |
Apr
(3) |
May
(10) |
Jun
(4) |
Jul
(7) |
Aug
|
Sep
(15) |
Oct
(5) |
Nov
(1) |
Dec
(2) |
| 2014 |
Jan
|
Feb
(8) |
Mar
(1) |
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
(3) |
Oct
(7) |
Nov
(6) |
Dec
(3) |
| 2015 |
Jan
(4) |
Feb
(5) |
Mar
(8) |
Apr
(8) |
May
(2) |
Jun
|
Jul
(4) |
Aug
(7) |
Sep
(8) |
Oct
|
Nov
(6) |
Dec
(4) |
| 2016 |
Jan
(6) |
Feb
(26) |
Mar
(3) |
Apr
(10) |
May
(6) |
Jun
(5) |
Jul
(1) |
Aug
(4) |
Sep
(3) |
Oct
(4) |
Nov
(3) |
Dec
(10) |
| 2017 |
Jan
(11) |
Feb
(11) |
Mar
(2) |
Apr
(1) |
May
(7) |
Jun
(2) |
Jul
(11) |
Aug
(9) |
Sep
(5) |
Oct
(5) |
Nov
(1) |
Dec
(2) |
| 2018 |
Jan
(5) |
Feb
(2) |
Mar
(19) |
Apr
(7) |
May
(11) |
Jun
(3) |
Jul
(4) |
Aug
(10) |
Sep
(2) |
Oct
(8) |
Nov
(6) |
Dec
(9) |
| 2019 |
Jan
(9) |
Feb
(6) |
Mar
(2) |
Apr
(4) |
May
(6) |
Jun
(9) |
Jul
(6) |
Aug
(3) |
Sep
(5) |
Oct
(2) |
Nov
(8) |
Dec
(9) |
| 2020 |
Jan
(15) |
Feb
(1) |
Mar
(18) |
Apr
(33) |
May
(43) |
Jun
(87) |
Jul
(45) |
Aug
(8) |
Sep
(43) |
Oct
(3) |
Nov
(5) |
Dec
(42) |
| 2021 |
Jan
(116) |
Feb
(40) |
Mar
(58) |
Apr
(48) |
May
(29) |
Jun
(2) |
Jul
|
Aug
(22) |
Sep
(18) |
Oct
(1) |
Nov
|
Dec
(3) |
| 2022 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
(1) |
May
(2) |
Jun
(1) |
Jul
|
Aug
(1) |
Sep
|
Oct
(6) |
Nov
(2) |
Dec
(9) |
| 2023 |
Jan
(10) |
Feb
|
Mar
|
Apr
(10) |
May
(3) |
Jun
(1) |
Jul
(2) |
Aug
(4) |
Sep
(1) |
Oct
|
Nov
(2) |
Dec
(3) |
| 2024 |
Jan
(4) |
Feb
(1) |
Mar
(2) |
Apr
(2) |
May
(5) |
Jun
(3) |
Jul
(1) |
Aug
(2) |
Sep
|
Oct
(2) |
Nov
(3) |
Dec
(9) |
| 2025 |
Jan
(5) |
Feb
(5) |
Mar
|
Apr
(10) |
May
(20) |
Jun
(43) |
Jul
(24) |
Aug
(47) |
Sep
(38) |
Oct
(5) |
Nov
|
Dec
|
|
From: Michael B. <mdb...@us...> - 2021-01-17 14:19:31
|
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 9db79eb8412b10a0b6bd49d7655f8378c59e938d (commit)
from 70f27a0a03481ba607e1caad4d92c32373a1b6e1 (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 9db79eb8412b10a0b6bd49d7655f8378c59e938d
Author: Michael Black W9MDB <mdb...@ya...>
Date: Sun Jan 17 08:19:12 2021 -0600
Reduce debug level
diff --git a/src/network.c b/src/network.c
index 7273606d..07741a5b 100644
--- a/src/network.c
+++ b/src/network.c
@@ -139,7 +139,7 @@ int network_open(hamlib_port_t *rp, int default_port)
struct in6_addr serveraddr;
char hoststr[256], portstr[6] = "";
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
rig_debug(RIG_DEBUG_VERBOSE, "%s version 1.0\n", __func__);
#ifdef __MINGW32__
@@ -183,7 +183,7 @@ int network_open(hamlib_port_t *rp, int default_port)
if (status != RIG_OK) { return status; }
- rig_debug(RIG_DEBUG_ERR, "%s: hoststr=%s, portstr=%s\n", __func__, hoststr,
+ rig_debug(RIG_DEBUG_TRACE, "%s: hoststr=%s, portstr=%s\n", __func__, hoststr,
portstr);
}
-----------------------------------------------------------------------
Summary of changes:
src/network.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-17 14:09: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 70f27a0a03481ba607e1caad4d92c32373a1b6e1 (commit)
via 00a48edf5d52c45ce7a28e8880720bcd0ddf1216 (commit)
via 6e28ec4ec42da96bfb03dd070a5ed3f689961c82 (commit)
via 544777f935074cc3e8da7903d55bd29a34b50b36 (commit)
via c5c60f0f430a0a254f527e196aa542f83dcddffd (commit)
via 4b9ea6b1d436ab97d9141a230b744ebe488db6a6 (commit)
via 460e748742135825d93e15f7154c66827b86b916 (commit)
from a5ca77a66f8066cc734a5e077ae078dccf1c9870 (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 70f27a0a03481ba607e1caad4d92c32373a1b6e1
Author: Michael Black W9MDB <mdb...@ya...>
Date: Sun Jan 17 08:09:06 2021 -0600
Improve comment in misc.c
diff --git a/src/misc.c b/src/misc.c
index caa02e98..9dfdbe46 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -1637,7 +1637,7 @@ int HAMLIB_API parse_hoststr(char *hoststr, char host[256], char port[6])
// Handle device names 1st
if (strstr(hoststr, "/dev")) { return -1; }
- if (strstr(hoststr, "/")) { return -1; } // posible path -- no hostname starts with /
+ if (strstr(hoststr, "/")) { return -1; } // probably a path so not a hoststr
if (strncasecmp(hoststr, "com", 3) == 0) { return -1; }
commit 00a48edf5d52c45ce7a28e8880720bcd0ddf1216
Author: Michael Black W9MDB <mdb...@ya...>
Date: Sun Jan 17 08:08:34 2021 -0600
Increase retries and timeout on flrig.c
diff --git a/rigs/dummy/flrig.h b/rigs/dummy/flrig.h
index b9a876e9..10f2dda1 100644
--- a/rigs/dummy/flrig.h
+++ b/rigs/dummy/flrig.h
@@ -28,7 +28,7 @@
#include <sys/time.h>
#endif
-#define BACKEND_VER "20210116"
+#define BACKEND_VER "20210117"
#define EOM "\r"
#define TRUE 1
commit 6e28ec4ec42da96bfb03dd070a5ed3f689961c82
Author: Michael Black W9MDB <mdb...@ya...>
Date: Sun Jan 17 08:08:14 2021 -0600
Increase retries and timeout on flrig.c
diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c
index 4f50ecac..41f09cbb 100644
--- a/rigs/dummy/flrig.c
+++ b/rigs/dummy/flrig.c
@@ -125,7 +125,7 @@ const struct rig_caps flrig_caps =
.port_type = RIG_PORT_NETWORK,
.write_delay = 0,
.post_write_delay = 0,
- .timeout = 2000,
+ .timeout = 5000,
.retry = 5,
.has_get_func = RIG_FUNC_NONE,
@@ -518,7 +518,7 @@ static int flrig_transaction(RIG *rig, char *cmd, char *cmd_arg, char *value,
int value_len)
{
char xml[MAXXMLLEN];
- int retry = 2;
+ int retry = 5;
if (value)
{
commit 544777f935074cc3e8da7903d55bd29a34b50b36
Author: Michael Black W9MDB <mdb...@ya...>
Date: Sun Jan 17 07:32:42 2021 -0600
Fixed ENTER func error
diff --git a/src/rig.c b/src/rig.c
index 38cf5667..a9fbd91e 100755
--- a/src/rig.c
+++ b/src/rig.c
@@ -2122,7 +2122,7 @@ int HAMLIB_API rig_set_vfo(RIG *rig, vfo_t vfo)
int retcode;
freq_t curr_freq;
- ENTER;
+ ENTERFUNC;
rig_debug(RIG_DEBUG_VERBOSE, "%s called vfo=%s\n", __func__, rig_strvfo(vfo));
if (CHECK_RIG_ARG(rig))
commit c5c60f0f430a0a254f527e196aa542f83dcddffd
Author: Michael Black W9MDB <mdb...@ya...>
Date: Sun Jan 17 07:25:28 2021 -0600
First phase of improving debug messages
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index 0aec7db7..79e8529e 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -354,13 +354,6 @@ static const yaesu_newcat_commands_t valid_commands[] =
int valid_commands_count = sizeof(valid_commands) / sizeof(
yaesu_newcat_commands_t);
-static void errmsg(int err, const char *func, const char *file, int line,
- char *s)
-{
- rig_debug(RIG_DEBUG_ERR, "%s(%s:%d): %s: %s\b", __func__, file, line, s,
- rigerror(err));
-}
-
/*
* configuration Tokens
*
@@ -430,7 +423,7 @@ static int newcat_band_index(freq_t freq)
else if (freq >= MHz(0.5) && freq < MHz(1.705)) { band = 12; } // MW Medium Wave
rig_debug(RIG_DEBUG_TRACE, "%s: freq=%g, band=%d\n", __func__, freq, band);
- return band;
+ RETURNFUNC(band);
}
/*
@@ -450,14 +443,14 @@ int newcat_init(RIG *rig)
{
struct newcat_priv_data *priv;
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
rig->state.priv = (struct newcat_priv_data *) calloc(1,
sizeof(struct newcat_priv_data));
if (!rig->state.priv) /* whoops! memory shortage! */
{
- return -RIG_ENOMEM;
+ RETURNFUNC(-RIG_ENOMEM);
}
priv = rig->state.priv;
@@ -474,7 +467,7 @@ int newcat_init(RIG *rig)
priv->current_mem = NC_MEM_CHANNEL_NONE;
priv->fast_set_commands = FALSE;
- return RIG_OK;
+ RETURNFUNC(RIG_OK);
}
@@ -488,7 +481,7 @@ int newcat_init(RIG *rig)
int newcat_cleanup(RIG *rig)
{
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
if (rig->state.priv)
{
@@ -497,7 +490,7 @@ int newcat_cleanup(RIG *rig)
rig->state.priv = NULL;
- return RIG_OK;
+ RETURNFUNC(RIG_OK);
}
@@ -513,7 +506,7 @@ int newcat_open(RIG *rig)
struct newcat_priv_data *priv = rig->state.priv;
struct rig_state *rig_s = &rig->state;
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
rig_debug(RIG_DEBUG_TRACE, "%s: write_delay = %i msec\n",
__func__, rig_s->rigport.write_delay);
@@ -573,8 +566,7 @@ int newcat_open(RIG *rig)
#endif
- rig_debug(RIG_DEBUG_VERBOSE, "%s: returning RIG_OK\n", __func__);
- return RIG_OK;
+ RETURNFUNC(RIG_OK);
}
@@ -588,7 +580,7 @@ int newcat_close(RIG *rig)
struct newcat_priv_data *priv = rig->state.priv;
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
if (!no_restore_ai && priv->trn_state >= 0)
{
@@ -598,7 +590,7 @@ int newcat_close(RIG *rig)
supported */
}
- return RIG_OK;
+ RETURNFUNC(RIG_OK);
}
@@ -613,11 +605,13 @@ int newcat_set_conf(RIG *rig, token_t token, const char *val)
int ret = RIG_OK;
struct newcat_priv_data *priv;
+ ENTERFUNC;
+
priv = (struct newcat_priv_data *)rig->state.priv;
if (priv == NULL)
{
- return -RIG_EINTERNAL;
+ RETURNFUNC(-RIG_EINTERNAL);
}
switch (token)
@@ -631,7 +625,7 @@ int newcat_set_conf(RIG *rig, token_t token, const char *val)
if (end == val)
{
- return -RIG_EINVAL;
+ RETURNFUNC(-RIG_EINVAL);
}
if ((value == 0) || (value == 1))
@@ -640,7 +634,7 @@ int newcat_set_conf(RIG *rig, token_t token, const char *val)
}
else
{
- return -RIG_EINVAL;
+ RETURNFUNC(-RIG_EINVAL);
}
break;
@@ -649,7 +643,7 @@ int newcat_set_conf(RIG *rig, token_t token, const char *val)
ret = -RIG_EINVAL;
}
- return ret;
+ RETURNFUNC(ret);
}
@@ -664,11 +658,13 @@ int newcat_get_conf(RIG *rig, token_t token, char *val)
int ret = RIG_OK;
struct newcat_priv_data *priv;
+ ENTERFUNC;
+
priv = (struct newcat_priv_data *)rig->state.priv;
if (priv == NULL)
{
- return -RIG_EINTERNAL;
+ RETURNFUNC(-RIG_EINTERNAL);
}
switch (token)
@@ -676,7 +672,7 @@ int newcat_get_conf(RIG *rig, token_t token, char *val)
case TOK_FAST_SET_CMD:
if (sizeof(val) < 2)
{
- return -RIG_ENOMEM;
+ RETURNFUNC(-RIG_ENOMEM);
}
sprintf(val, "%d", priv->fast_set_commands);
@@ -686,7 +682,7 @@ int newcat_get_conf(RIG *rig, token_t token, char *val)
ret = -RIG_EINVAL;
}
- return ret;
+ RETURNFUNC(ret);
}
@@ -710,16 +706,16 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
struct newcat_priv_data *priv;
int special_60m = 0;
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
if (!newcat_valid_command(rig, "FA"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
if (!newcat_valid_command(rig, "FB"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
priv = (struct newcat_priv_data *)rig->state.priv;
@@ -733,7 +729,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
if (err < 0)
{
- errmsg(err, __func__, __FILE__, __LINE__, "newcat_set_vfo_from_alias");
+ ERRMSG(err, "newcat_set_vfo_from_alias");
return err;
}
@@ -761,7 +757,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
{
rig_debug(RIG_DEBUG_TRACE, "%s: 60M VFO_MEM exception, no freq change done\n",
__func__);
- return RIG_OK; /* make it look like we changed */
+ RETURNFUNC(RIG_OK); /* make it look like we changed */
}
c = 'A';
@@ -783,7 +779,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
if (RIG_OK != (err = newcat_get_cmd(rig)))
{
- errmsg(err, __func__, __FILE__, __LINE__, "newcat_get_cmd");
+ ERRMSG(err, "newcat_get_cmd");
return err;
}
@@ -794,7 +790,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
if (RIG_OK != (err = newcat_set_cmd(rig)))
{
- errmsg(err, __func__, __FILE__, __LINE__, "newcat_set_cmd failed");
+ ERRMSG(err,"newcat_set_cmd failed");
return err;
}
}
@@ -922,7 +918,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
{
rig_debug(RIG_DEBUG_VERBOSE,
"%s: freq after band select already set to %"PRIfreq"\n", __func__, freq);
- return RIG_OK; // we're done then!!
+ RETURNFUNC(RIG_OK); // we're done then!!
}
}
@@ -960,7 +956,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
}
}
- return RIG_OK;
+ RETURNFUNC(RIG_OK);
}
@@ -979,17 +975,17 @@ int newcat_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
char c;
int err;
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
rig_debug(RIG_DEBUG_TRACE, "%s: passed vfo = %s\n", __func__, rig_strvfo(vfo));
if (!newcat_valid_command(rig, "FA"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
if (!newcat_valid_command(rig, "FB"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
err = newcat_set_vfo_from_alias(rig, &vfo);
@@ -1017,7 +1013,7 @@ int newcat_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
default:
rig_debug(RIG_DEBUG_ERR, "%s: unsupported vfo=%s\n", __func__, rig_strvfo(vfo));
- return -RIG_EINVAL; /* sorry, unsupported VFO */
+ RETURNFUNC(-RIG_EINVAL); /* sorry, unsupported VFO */
}
/* Build the command string */
@@ -1025,7 +1021,7 @@ int newcat_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
if (!newcat_valid_command(rig, command))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "%s%c", command, cat_term);
@@ -1044,7 +1040,7 @@ int newcat_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
rig_debug(RIG_DEBUG_TRACE,
"%s: freq = %"PRIfreq" Hz for vfo %s\n", __func__, *freq, rig_strvfo(vfo));
- return RIG_OK;
+ RETURNFUNC(RIG_OK);
}
@@ -1056,11 +1052,11 @@ int newcat_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
priv = (struct newcat_priv_data *)rig->state.priv;
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
if (!newcat_valid_command(rig, "MD"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
@@ -1088,7 +1084,7 @@ int newcat_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
if (priv->cmd_str[3] == '0')
{
- return -RIG_EINVAL;
+ RETURNFUNC(-RIG_EINVAL);
}
err = newcat_set_cmd(rig);
@@ -1135,11 +1131,11 @@ int newcat_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
int err;
char main_sub_vfo = '0';
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
if (!newcat_valid_command(rig, "MD"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
err = newcat_set_vfo_from_alias(rig, &vfo);
@@ -1214,12 +1210,13 @@ int newcat_set_vfo(RIG *rig, vfo_t vfo)
priv->cache_start.tv_sec = 0; // invalidate the cache
- rig_debug(RIG_DEBUG_TRACE, "%s: called, passed vfo = %s\n", __func__,
+ ENTERFUNC;
+ rig_debug(RIG_DEBUG_TRACE, "%s: passed vfo = %s\n", __func__,
rig_strvfo(vfo));
if (!newcat_valid_command(rig, command))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
err = newcat_set_vfo_from_alias(rig,
@@ -1293,7 +1290,7 @@ int newcat_set_vfo(RIG *rig, vfo_t vfo)
/* Set current_vfo now */
state->current_vfo = vfo;
- return RIG_OK;
+ RETURNFUNC(RIG_OK);
default:
return -RIG_ENIMPL; /* sorry, VFO not implemented */
@@ -1316,7 +1313,7 @@ int newcat_set_vfo(RIG *rig, vfo_t vfo)
rig_debug(RIG_DEBUG_TRACE, "%s: rig->state.current_vfo = %s\n", __func__,
rig_strvfo(vfo));
- return RIG_OK;
+ RETURNFUNC(RIG_OK);
}
// Either returns a valid RIG_VFO* or if < 0 an error code
@@ -1324,6 +1321,7 @@ static vfo_t newcat_set_vfo_if_needed(RIG *rig, vfo_t vfo)
{
vfo_t oldvfo = rig->state.current_vfo;
+ ENTERFUNC;
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s, oldvfo=%s\n", __func__, rig_strvfo(vfo),
rig_strvfo(oldvfo));
@@ -1336,7 +1334,7 @@ static vfo_t newcat_set_vfo_if_needed(RIG *rig, vfo_t vfo)
{
rig_debug(RIG_DEBUG_ERR, "%s: error setting vfo=%s\n", __func__,
rig_strvfo(vfo));
- return ret;
+ RETURNFUNC(ret);
}
}
@@ -1360,17 +1358,17 @@ int newcat_get_vfo(RIG *rig, vfo_t *vfo)
vfo_t vfo_mode;
char const *command = "VS";
+ ENTERFUNC;
+
if (!vfo)
{
- return -RIG_EINVAL;
+ RETURNFUNC(-RIG_EINVAL);
}
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
-
/* Build the command string */
if (!newcat_valid_command(rig, command))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "%s;", command);
@@ -1422,7 +1420,7 @@ int newcat_get_vfo(RIG *rig, vfo_t *vfo)
rig_debug(RIG_DEBUG_TRACE, "%s: rig->state.current_vfo = %s\n", __func__,
rig_strvfo(state->current_vfo));
- return RIG_OK;
+ RETURNFUNC(RIG_OK);
}
@@ -1433,11 +1431,13 @@ int newcat_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
char txon[] = "TX1;";
char txoff[] = "TX0;";
+ ENTERFUNC;
+
priv->cache_start.tv_sec = 0; // invalidate the cache
if (!newcat_valid_command(rig, "TX"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
switch (ptt)
@@ -1464,7 +1464,7 @@ int newcat_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
break;
default:
- return -RIG_EINVAL;
+ RETURNFUNC(-RIG_EINVAL);
}
return err;
@@ -1477,9 +1477,11 @@ int newcat_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
char c;
int err;
+ ENTERFUNC;
+
if (!newcat_valid_command(rig, "TX"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "%s%c", "TX", cat_term);
@@ -1510,15 +1512,15 @@ int newcat_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
return -RIG_EPROTO;
}
- return RIG_OK;
+ RETURNFUNC(RIG_OK);
}
int newcat_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd)
{
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
@@ -1530,9 +1532,11 @@ int newcat_set_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift)
char command[] = "OS";
char main_sub_vfo = '0';
+ ENTERFUNC;
+
if (!newcat_valid_command(rig, command))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
/* Main or SUB vfo */
@@ -1563,7 +1567,7 @@ int newcat_set_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift)
break;
default:
- return -RIG_EINVAL;
+ RETURNFUNC(-RIG_EINVAL);
}
@@ -1581,11 +1585,11 @@ int newcat_get_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift)
char command[] = "OS";
char main_sub_vfo = '0';
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
if (!newcat_valid_command(rig, command))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
/* Set Main or SUB vfo */
@@ -1627,10 +1631,10 @@ int newcat_get_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift)
break;
default:
- return -RIG_EINVAL;
+ RETURNFUNC(-RIG_EINVAL);
}
- return RIG_OK;
+ RETURNFUNC(RIG_OK);
}
@@ -1641,7 +1645,7 @@ int newcat_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t offs)
char command[32];
freq_t freq = 0;
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
err = newcat_get_freq(rig, vfo, &freq); // Need to get freq to determine band
@@ -1673,7 +1677,7 @@ int newcat_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t offs)
else
{
// only valid on 10m and 6m bands
- return -RIG_EINVAL;
+ RETURNFUNC(-RIG_EINVAL);
}
// Step size is 1 kHz
@@ -1695,7 +1699,7 @@ int newcat_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t offs)
else
{
// only valid on 10m and 6m bands
- return -RIG_EINVAL;
+ RETURNFUNC(-RIG_EINVAL);
}
// Step size is 1 kHz
@@ -1717,7 +1721,7 @@ int newcat_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t offs)
else
{
// only valid on 10m and 6m bands
- return -RIG_EINVAL;
+ RETURNFUNC(-RIG_EINVAL);
}
// Step size is 1 kHz
@@ -1747,7 +1751,7 @@ int newcat_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t offs)
else
{
// only valid on 10m to 70cm bands
- return -RIG_EINVAL;
+ RETURNFUNC(-RIG_EINVAL);
}
// Step size is 1 kHz
@@ -1769,7 +1773,7 @@ int newcat_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t offs)
else
{
// only valid on 10m and 6m bands
- return -RIG_EINVAL;
+ RETURNFUNC(-RIG_EINVAL);
}
// Step size is 1 kHz
@@ -1791,7 +1795,7 @@ int newcat_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t offs)
else
{
// only valid on 10m and 6m bands
- return -RIG_EINVAL;
+ RETURNFUNC(-RIG_EINVAL);
}
// Step size is 1 kHz
@@ -1813,7 +1817,7 @@ int newcat_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t offs)
else
{
// only valid on 10m and 6m bands
- return -RIG_EINVAL;
+ RETURNFUNC(-RIG_EINVAL);
}
// Step size is 1 kHz
@@ -1839,7 +1843,7 @@ int newcat_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t offs)
else
{
// only valid on 10m and 6m bands
- return -RIG_EINVAL;
+ RETURNFUNC(-RIG_EINVAL);
}
// Step size is 1 kHz
@@ -1850,7 +1854,7 @@ int newcat_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t offs)
}
else
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
return newcat_set_cmd(rig);
@@ -1866,7 +1870,7 @@ int newcat_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *offs)
freq_t freq = 0;
int step;
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
err = newcat_get_freq(rig, vfo, &freq); // Need to get freq to determine band
@@ -1896,7 +1900,7 @@ int newcat_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *offs)
{
// only valid on 10m and 6m bands
*offs = 0;
- return RIG_OK;
+ RETURNFUNC(RIG_OK);
}
// Step size is 1 kHz
@@ -1916,7 +1920,7 @@ int newcat_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *offs)
{
// only valid on 10m and 6m bands
*offs = 0;
- return RIG_OK;
+ RETURNFUNC(RIG_OK);
}
// Step size is 1 kHz
@@ -1936,7 +1940,7 @@ int newcat_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *offs)
{
// only valid on 10m and 6m bands
*offs = 0;
- return RIG_OK;
+ RETURNFUNC(RIG_OK);
}
// Step size is 1 kHz
@@ -1964,7 +1968,7 @@ int newcat_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *offs)
{
// only valid on 10m to 70cm bands
*offs = 0;
- return RIG_OK;
+ RETURNFUNC(RIG_OK);
}
// Step size is 1 kHz
@@ -1984,7 +1988,7 @@ int newcat_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *offs)
{
// only valid on 10m and 6m bands
*offs = 0;
- return RIG_OK;
+ RETURNFUNC(RIG_OK);
}
// Step size is 1 kHz
@@ -2004,7 +2008,7 @@ int newcat_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *offs)
{
// only valid on 10m and 6m bands
*offs = 0;
- return RIG_OK;
+ RETURNFUNC(RIG_OK);
}
// Step size is 1 kHz
@@ -2024,7 +2028,7 @@ int newcat_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *offs)
{
// only valid on 10m and 6m bands
*offs = 0;
- return RIG_OK;
+ RETURNFUNC(RIG_OK);
}
// Step size is 1 kHz
@@ -2052,7 +2056,7 @@ int newcat_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *offs)
{
// only valid on 10m and 6m bands
*offs = 0;
- return RIG_OK;
+ RETURNFUNC(RIG_OK);
}
// Step size is 1 kHz
@@ -2060,7 +2064,7 @@ int newcat_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *offs)
}
else
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
err = newcat_get_cmd(rig);
@@ -2079,41 +2083,41 @@ int newcat_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *offs)
*offs = atoi(retoffs) * step;
- return RIG_OK;
+ RETURNFUNC(RIG_OK);
}
int newcat_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
{
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
int newcat_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
{
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
int newcat_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode,
pbwidth_t tx_width)
{
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
int newcat_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode,
pbwidth_t *tx_width)
{
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
@@ -2122,7 +2126,7 @@ int newcat_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
int err;
vfo_t rx_vfo;
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
err = newcat_set_vfo_from_alias(rig, &vfo);
@@ -2194,10 +2198,10 @@ int newcat_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
break;
default:
- return -RIG_EINVAL;
+ RETURNFUNC(-RIG_EINVAL);
}
- return RIG_OK;
+ RETURNFUNC(RIG_OK);
}
@@ -2205,7 +2209,7 @@ int newcat_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo)
{
int err;
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
err = newcat_set_vfo_from_alias(rig, &vfo);
@@ -2235,7 +2239,7 @@ int newcat_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo)
rig_strvfo(vfo),
rig_strvfo(*tx_vfo));
- return RIG_OK;
+ RETURNFUNC(RIG_OK);
}
int newcat_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit)
@@ -2244,9 +2248,11 @@ int newcat_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit)
vfo_t oldvfo;
int ret;
+ ENTERFUNC;
+
if (!newcat_valid_command(rig, "RT"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
oldvfo = newcat_set_vfo_if_needed(rig, vfo);
@@ -2284,7 +2290,7 @@ int newcat_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit)
if (oldvfo < 0) { return oldvfo; }
- return ret;
+ RETURNFUNC(ret);
}
@@ -2296,6 +2302,8 @@ int newcat_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit)
int offset = 0;
char *cmd = "IF";
+ ENTERFUNC;
+
if (vfo == RIG_VFO_B || vfo == RIG_VFO_SUB)
{
cmd = "OI";
@@ -2303,13 +2311,11 @@ int newcat_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit)
if (!newcat_valid_command(rig, cmd))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
*rit = 0;
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
-
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "%s%c", cmd, cat_term);
rig_debug(RIG_DEBUG_TRACE, "%s: cmd_str = %s\n", __func__, priv->cmd_str);
@@ -2346,7 +2352,7 @@ int newcat_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit)
// return the current offset even if turned off
*rit = (shortfreq_t) atoi(retval);
- return RIG_OK;
+ RETURNFUNC(RIG_OK);
}
@@ -2356,9 +2362,11 @@ int newcat_set_xit(RIG *rig, vfo_t vfo, shortfreq_t xit)
vfo_t oldvfo;
int ret;
+ ENTERFUNC;
+
if (!newcat_valid_command(rig, "XT"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
oldvfo = newcat_set_vfo_if_needed(rig, vfo);
@@ -2397,7 +2405,7 @@ int newcat_set_xit(RIG *rig, vfo_t vfo, shortfreq_t xit)
if (oldvfo < 0) { return oldvfo; }
- return ret;
+ RETURNFUNC(ret);
}
@@ -2409,6 +2417,8 @@ int newcat_get_xit(RIG *rig, vfo_t vfo, shortfreq_t *xit)
int offset = 0;
char *cmd = "IF";
+ ENTERFUNC;
+
if (vfo == RIG_VFO_B || vfo == RIG_VFO_SUB)
{
cmd = "OI";
@@ -2416,13 +2426,11 @@ int newcat_get_xit(RIG *rig, vfo_t vfo, shortfreq_t *xit)
if (!newcat_valid_command(rig, cmd))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
*xit = 0;
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
-
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "%s%c", cmd, cat_term);
rig_debug(RIG_DEBUG_TRACE, "%s: cmd_str = %s\n", __func__, priv->cmd_str);
@@ -2459,7 +2467,7 @@ int newcat_get_xit(RIG *rig, vfo_t vfo, shortfreq_t *xit)
// return the offset even when turned off
*xit = (shortfreq_t) atoi(retval);
- return RIG_OK;
+ RETURNFUNC(RIG_OK);
}
@@ -2470,7 +2478,7 @@ int newcat_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts)
rmode_t mode;
ncboolean ts_match;
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
err = newcat_get_mode(rig, vfo, &mode, &width);
@@ -2507,11 +2515,11 @@ int newcat_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts)
if (ts_match)
{
- return RIG_OK;
+ RETURNFUNC(RIG_OK);
}
else
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
}
@@ -2524,7 +2532,8 @@ int newcat_get_ts(RIG *rig, vfo_t vfo, shortfreq_t *ts)
ncboolean ts_match;
ncboolean fast_step = FALSE;
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+
+ ENTERFUNC;
err = newcat_get_mode(rig, vfo, &mode, &width);
@@ -2563,44 +2572,44 @@ int newcat_get_ts(RIG *rig, vfo_t vfo, shortfreq_t *ts)
if (ts_match)
{
- return RIG_OK;
+ RETURNFUNC(RIG_OK);
}
else
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
}
int newcat_set_dcs_code(RIG *rig, vfo_t vfo, tone_t code)
{
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
int newcat_get_dcs_code(RIG *rig, vfo_t vfo, tone_t *code)
{
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
int newcat_set_tone(RIG *rig, vfo_t vfo, tone_t tone)
{
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
int newcat_get_tone(RIG *rig, vfo_t vfo, tone_t *tone)
{
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
@@ -2612,16 +2621,16 @@ int newcat_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone)
ncboolean tone_match;
char main_sub_vfo = '0';
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
if (!newcat_valid_command(rig, "CN"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
if (!newcat_valid_command(rig, "CT"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
err = newcat_set_vfo_from_alias(rig, &vfo);
@@ -2648,7 +2657,7 @@ int newcat_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone)
if (tone_match == FALSE && tone != 0)
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
if (tone == 0) /* turn off ctcss */
@@ -2684,11 +2693,11 @@ int newcat_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone)
char cmd[] = "CN";
char main_sub_vfo = '0';
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
if (!newcat_valid_command(rig, cmd))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
err = newcat_set_vfo_from_alias(rig, &vfo);
@@ -2731,44 +2740,44 @@ int newcat_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone)
if (t < 0 || t > 49)
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
*tone = rig->caps->ctcss_list[t];
- return RIG_OK;
+ RETURNFUNC(RIG_OK);
}
int newcat_set_dcs_sql(RIG *rig, vfo_t vfo, tone_t code)
{
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
int newcat_get_dcs_sql(RIG *rig, vfo_t vfo, tone_t *code)
{
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
int newcat_set_tone_sql(RIG *rig, vfo_t vfo, tone_t tone)
{
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
int newcat_get_tone_sql(RIG *rig, vfo_t vfo, tone_t *tone)
{
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
@@ -2776,7 +2785,7 @@ int newcat_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone)
{
int err;
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
err = newcat_set_ctcss_tone(rig, vfo, tone);
@@ -2796,7 +2805,7 @@ int newcat_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone)
}
}
- return RIG_OK;
+ RETURNFUNC(RIG_OK);
}
@@ -2804,7 +2813,7 @@ int newcat_get_ctcss_sql(RIG *rig, vfo_t vfo, tone_t *tone)
{
int err;
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
err = newcat_get_ctcss_tone(rig, vfo, tone);
@@ -2817,9 +2826,9 @@ int newcat_power2mW(RIG *rig, unsigned int *mwpower, float power, freq_t freq,
{
int rig_id;
- rig_id = newcat_get_rigid(rig);
+ ENTERFUNC;
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ rig_id = newcat_get_rigid(rig);
switch (rig_id)
{
@@ -2895,7 +2904,7 @@ int newcat_power2mW(RIG *rig, unsigned int *mwpower, float power, freq_t freq,
*mwpower);
}
- return RIG_OK;
+ RETURNFUNC(RIG_OK);
}
@@ -2904,9 +2913,9 @@ int newcat_mW2power(RIG *rig, float *power, unsigned int mwpower, freq_t freq,
{
int rig_id;
- rig_id = newcat_get_rigid(rig);
+ ENTERFUNC;
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ rig_id = newcat_get_rigid(rig);
switch (rig_id)
{
@@ -2981,7 +2990,7 @@ int newcat_mW2power(RIG *rig, float *power, unsigned int mwpower, freq_t freq,
*power);
}
- return RIG_OK;
+ RETURNFUNC(RIG_OK);
}
@@ -2994,11 +3003,11 @@ int newcat_set_powerstat(RIG *rig, powerstat_t status)
int retry_save;
char ps;
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
if (!newcat_valid_command(rig, "PS"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
switch (status)
@@ -3017,7 +3026,7 @@ int newcat_set_powerstat(RIG *rig, powerstat_t status)
break;
default:
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "PS%c%c", ps, cat_term);
@@ -3038,7 +3047,7 @@ int newcat_set_powerstat(RIG *rig, powerstat_t status)
if (retval == RIG_OK)
{
rig->state.rigport.retry = retry_save;
- return retval;
+ RETURNFUNC(retval);
}
rig_debug(RIG_DEBUG_TRACE, "%s: Wait #%d for power up\n", __func__, i + 1);
@@ -3055,7 +3064,7 @@ int newcat_set_powerstat(RIG *rig, powerstat_t status)
retval = -RIG_ETIMEOUT;
}
- return retval;
+ RETURNFUNC(retval);
}
@@ -3069,13 +3078,13 @@ int newcat_get_powerstat(RIG *rig, powerstat_t *status)
char ps;
char command[] = "PS";
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
*status = RIG_POWER_OFF;
if (!newcat_valid_command(rig, command))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "%s%c", command, cat_term);
@@ -3099,18 +3108,18 @@ int newcat_get_powerstat(RIG *rig, powerstat_t *status)
break;
default:
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
- return RIG_OK;
+ RETURNFUNC(RIG_OK);
}
int newcat_reset(RIG *rig, reset_t reset)
{
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
@@ -3122,9 +3131,11 @@ int newcat_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option)
char command[] = "AN";
char main_sub_vfo = '0';
+ ENTERFUNC;
+
if (!newcat_valid_command(rig, command))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
/* Main or SUB vfo */
@@ -3153,12 +3164,12 @@ int newcat_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option)
case RIG_ANT_3:
if (newcat_is_rig(rig, RIG_MODEL_FT950))
{
- return -RIG_EINVAL;
+ RETURNFUNC(-RIG_EINVAL);
}
if (newcat_is_rig(rig, RIG_MODEL_FTDX1200))
{
- return -RIG_EINVAL;
+ RETURNFUNC(-RIG_EINVAL);
}
which_ant = '3';
@@ -3167,12 +3178,12 @@ int newcat_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option)
case RIG_ANT_4:
if (newcat_is_rig(rig, RIG_MODEL_FT950))
{
- return -RIG_EINVAL;
+ RETURNFUNC(-RIG_EINVAL);
}
if (newcat_is_rig(rig, RIG_MODEL_FTDX1200))
{
- return -RIG_EINVAL;
+ RETURNFUNC(-RIG_EINVAL);
}
which_ant = '4';
@@ -3181,12 +3192,12 @@ int newcat_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option)
case RIG_ANT_5:
if (newcat_is_rig(rig, RIG_MODEL_FT950))
{
- return -RIG_EINVAL;
+ RETURNFUNC(-RIG_EINVAL);
}
if (newcat_is_rig(rig, RIG_MODEL_FTDX1200))
{
- return -RIG_EINVAL;
+ RETURNFUNC(-RIG_EINVAL);
}
/* RX only, on FT-2000/FT-5000/FT-9000 */
@@ -3194,7 +3205,7 @@ int newcat_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option)
break;
default:
- return -RIG_EINVAL;
+ RETURNFUNC(-RIG_EINVAL);
}
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "%s%c%c%c", command,
@@ -3212,11 +3223,11 @@ int newcat_get_ant(RIG *rig, vfo_t vfo, ant_t dummy, value_t *option,
char command[] = "AN";
char main_sub_vfo = '0';
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
if (!newcat_valid_command(rig, command))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
/* Set Main or SUB vfo */
@@ -3270,7 +3281,7 @@ int newcat_get_ant(RIG *rig, vfo_t vfo, ant_t dummy, value_t *option,
return -RIG_EPROTO;
}
- return RIG_OK;
+ RETURNFUNC(RIG_OK);
}
@@ -3285,7 +3296,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
char main_sub_vfo = '0';
char *format;
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
/* Set Main or SUB vfo */
err = newcat_set_vfo_from_alias(rig, &vfo);
@@ -3305,7 +3316,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
case RIG_LEVEL_RFPOWER:
if (!newcat_valid_command(rig, "PC"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
if (is_ft950 || is_ftdx1200 || is_ftdx3000 || is_ft891 || is_ft991
@@ -3339,7 +3350,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
case RIG_LEVEL_AF:
if (!newcat_valid_command(rig, "AG"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
fpf = newcat_scale_float(255, val.f);
@@ -3350,7 +3361,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
case RIG_LEVEL_AGC:
if (!newcat_valid_command(rig, "GT"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
switch (val.i)
@@ -3376,7 +3387,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
break;
default:
- return -RIG_EINVAL;
+ RETURNFUNC(-RIG_EINVAL);
}
if (rig->caps->targetable_vfo & RIG_TARGETABLE_MODE)
@@ -3393,7 +3404,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
if (!newcat_valid_command(rig, "IS"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
if (is_ft991 || is_ftdx5000 || is_ftdx101)
@@ -3456,7 +3467,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
if (!newcat_valid_command(rig, "KP"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
if (val.i < 300)
@@ -3489,7 +3500,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
case RIG_LEVEL_KEYSPD:
if (!newcat_valid_command(rig, "KS"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "KS%03d%c", val.i, cat_term);
@@ -3502,7 +3513,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
if (!newcat_valid_command(rig, "MG"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
if (is_ft991 || is_ftdx5000 || is_ftdx101)
@@ -3537,7 +3548,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
case RIG_LEVEL_METER:
if (!newcat_valid_command(rig, "MS"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
if (is_ftdx101) // new format for the command with VFO selection
@@ -3564,7 +3575,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
case RIG_METER_PO:
if (newcat_is_rig(rig, RIG_MODEL_FT950))
{
- return RIG_OK;
+ RETURNFUNC(RIG_OK);
}
else
{
@@ -3587,7 +3598,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
rig_debug(RIG_DEBUG_ERR, "%s: unknown val.i=%d\n", __func__, val.i);
- default: return -RIG_EINVAL;
+ default: RETURNFUNC(-RIG_EINVAL);
}
break;
@@ -3595,7 +3606,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
case RIG_LEVEL_PREAMP:
if (!newcat_valid_command(rig, "PA"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
if (val.i == 0)
@@ -3623,7 +3634,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
if (strlen(priv->cmd_str) == 0)
{
- return -RIG_EINVAL;
+ RETURNFUNC(-RIG_EINVAL);
}
if (rig->caps->targetable_vfo & RIG_TARGETABLE_MODE)
@@ -3636,7 +3647,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
case RIG_LEVEL_ATT:
if (!newcat_valid_command(rig, "RA"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
if (val.i == 0)
@@ -3664,7 +3675,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
if (strlen(priv->cmd_str) == 0)
{
- return -RIG_EINVAL;
+ RETURNFUNC(-RIG_EINVAL);
}
if (rig->caps->targetable_vfo & RIG_TARGETABLE_MODE)
@@ -3677,7 +3688,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
case RIG_LEVEL_RF:
if (!newcat_valid_command(rig, "RG"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
if (is_ft891)
@@ -3697,7 +3708,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
case RIG_LEVEL_NR:
if (!newcat_valid_command(rig, "RL"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
if (newcat_is_rig(rig, RIG_MODEL_FT450))
@@ -3743,7 +3754,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
case RIG_LEVEL_COMP:
if (!newcat_valid_command(rig, "PL"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
if (is_ft2000 || is_ftdx9000 || is_ftdx5000)
@@ -3766,7 +3777,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
if (!newcat_valid_command(rig, "SD"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
// Convert 10/ths of dots to milliseconds using the current key speed
@@ -3859,7 +3870,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
case RIG_LEVEL_SQL:
if (!newcat_valid_command(rig, "SQ"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
if (is_ft891 || is_ft991 || is_ftdx101 || is_ftdx10)
@@ -3879,7 +3890,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
case RIG_LEVEL_VOXDELAY:
if (!newcat_valid_command(rig, "VD"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
/* VOX delay, api int (tenth of seconds), ms for rig */
@@ -3939,7 +3950,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
case RIG_LEVEL_VOXGAIN:
if (!newcat_valid_command(rig, "VG"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
if (is_ft2000 || is_ftdx9000 || is_ftdx5000)
@@ -3993,7 +4004,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
}
else
{
- return -RIG_EINVAL;
+ RETURNFUNC(-RIG_EINVAL);
}
break;
@@ -4001,7 +4012,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
case RIG_LEVEL_NOTCHF:
if (!newcat_valid_command(rig, "BP"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
val.i = val.i / 10;
@@ -4060,7 +4071,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
case RIG_LEVEL_MONITOR_GAIN:
if (!newcat_valid_command(rig, "ML"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
if (is_ftdx1200 || is_ftdx3000 || is_ft891 || is_ft991 || is_ftdx101
@@ -4085,7 +4096,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
break;
default:
- return -RIG_EINVAL;
+ RETURNFUNC(-RIG_EINVAL);
}
err = newcat_set_cmd(rig);
@@ -4109,7 +4120,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
char main_sub_vfo = '0';
int i;
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
/* Set Main or SUB vfo */
err = newcat_set_vfo_from_alias(rig, &vfo);
@@ -4129,7 +4140,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
case RIG_LEVEL_RFPOWER:
if (!newcat_valid_command(rig, "PC"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "PC%c", cat_term);
@@ -4138,7 +4149,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
case RIG_LEVEL_PREAMP:
if (!newcat_valid_command(rig, "PA"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "PA0%c", cat_term);
@@ -4153,7 +4164,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
case RIG_LEVEL_AF:
if (!newcat_valid_command(rig, "AG"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "AG%c%c", main_sub_vfo,
@@ -4163,7 +4174,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
case RIG_LEVEL_AGC:
if (!newcat_valid_command(rig, "GT"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "GT%c%c", main_sub_vfo,
@@ -4177,7 +4188,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
if (!newcat_valid_command(rig, "IS"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
if (is_ft991 || is_ftdx5000 || is_ftdx101)
@@ -4209,7 +4220,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
case RIG_LEVEL_CWPITCH:
if (!newcat_valid_command(rig, "KP"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "KP%c", cat_term);
@@ -4218,7 +4229,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
case RIG_LEVEL_KEYSPD:
if (!newcat_valid_command(rig, "KS"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "KS%c", cat_term);
@@ -4231,7 +4242,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
if (!newcat_valid_command(rig, "MG"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
if (is_ft991 || is_ftdx5000 || is_ftdx101)
@@ -4256,7 +4267,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
case RIG_LEVEL_METER:
if (!newcat_valid_command(rig, "MS"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "MS%c", cat_term);
@@ -4265,7 +4276,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
case RIG_LEVEL_ATT:
if (!newcat_valid_command(rig, "RA"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "RA0%c", cat_term);
@@ -4280,7 +4291,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
case RIG_LEVEL_RF:
if (!newcat_valid_command(rig, "RG"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "RG%c%c", main_sub_vfo,
@@ -4290,7 +4301,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
case RIG_LEVEL_COMP:
if (!newcat_valid_command(rig, "PL"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "PL%c", cat_term);
@@ -4299,7 +4310,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
case RIG_LEVEL_NR:
if (!newcat_valid_command(rig, "RL"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "RL0%c", cat_term);
@@ -4314,7 +4325,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
case RIG_LEVEL_BKINDL:
if (!newcat_valid_command(rig, "SD"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "SD%c", cat_term);
@@ -4323,7 +4334,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
case RIG_LEVEL_SQL:
if (!newcat_valid_command(rig, "SQ"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "SQ%c%c", main_sub_vfo,
@@ -4335,7 +4346,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
/* VOX delay, arg int (tenth of seconds) */
if (!newcat_valid_command(rig, "VD"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "VD%c", cat_term);
@@ -4344,7 +4355,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
case RIG_LEVEL_VOXGAIN:
if (!newcat_valid_command(rig, "VG"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "VG%c", cat_term);
@@ -4357,7 +4368,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
case RIG_LEVEL_RAWSTR:
if (!newcat_valid_command(rig, "SM"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "SM%c%c", main_sub_vfo,
@@ -4367,7 +4378,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
case RIG_LEVEL_SWR:
if (!newcat_valid_command(rig, "RM"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "RM6%c", cat_term);
@@ -4376,7 +4387,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
case RIG_LEVEL_ALC:
if (!newcat_valid_command(rig, "RM"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "RM4%c", cat_term);
@@ -4386,7 +4397,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
case RIG_LEVEL_RFPOWER_METER_WATTS:
if (!newcat_valid_command(rig, "RM"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
if (is_ftdx9000)
@@ -4403,7 +4414,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
case RIG_LEVEL_COMP_METER:
if (!newcat_valid_command(rig, "RM"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "RM3%c", cat_term);
@@ -4412,7 +4423,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
case RIG_LEVEL_VD_METER:
if (!newcat_valid_command(rig, "RM"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "RM8%c", cat_term);
@@ -4421,7 +4432,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
case RIG_LEVEL_ID_METER:
if (!newcat_valid_command(rig, "RM"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "RM7%c", cat_term);
@@ -4462,7 +4473,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
}
else
{
- return -RIG_EINVAL;
+ RETURNFUNC(-RIG_EINVAL);
}
break;
@@ -4470,7 +4481,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
case RIG_LEVEL_NOTCHF:
if (!newcat_valid_command(rig, "BP"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "BP01%c", cat_term);
@@ -4489,7 +4500,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
case RIG_LEVEL_MONITOR_GAIN:
if (!newcat_valid_command(rig, "ML"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
if (is_ftdx9000)
@@ -4504,7 +4515,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
break;
default:
- return -RIG_EINVAL;
+ RETURNFUNC(-RIG_EINVAL);
}
err = newcat_get_cmd(rig);
@@ -5024,10 +5035,10 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
break;
default:
- return -RIG_EINVAL;
+ RETURNFUNC(-RIG_EINVAL);
}
- return RIG_OK;
+ RETURNFUNC(RIG_OK);
}
@@ -5037,7 +5048,7 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
int err;
char main_sub_vfo = '0';
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+ ENTERFUNC;
/* Set Main or SUB vfo */
err = newcat_set_vfo_from_alias(rig, &vfo);
@@ -5061,7 +5072,7 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
if (!newcat_valid_command(rig, "BC"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
if (is_ft991 || is_ftdx5000 || is_ftdx101)
@@ -5096,7 +5107,7 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
if (!newcat_valid_command(rig, "BP"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
if (is_ft991 || is_ftdx5000 || is_ftdx101)
@@ -5127,7 +5138,7 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
case RIG_FUNC_FBKIN:
if (!newcat_valid_command(rig, "BI"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "BI%d%c", status ? 1 : 0,
@@ -5137,7 +5148,7 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
case RIG_FUNC_TONE:
if (!newcat_valid_command(rig, "CT"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "CT0%d%c", status ? 2 : 0,
@@ -5153,7 +5164,7 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
case RIG_FUNC_TSQL:
if (!newcat_valid_command(rig, "CT"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "CT0%d%c", status ? 1 : 0,
@@ -5169,7 +5180,7 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
case RIG_FUNC_LOCK:
if (!newcat_valid_command(rig, "LK"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
if (is_ftdx1200 || is_ftdx3000 || is_ftdx5000 || is_ftdx101)
@@ -5189,7 +5200,7 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
case RIG_FUNC_MON:
if (!newcat_valid_command(rig, "ML"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "ML0%03d%c", status ? 1 : 0,
@@ -5199,7 +5210,7 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
case RIG_FUNC_NB:
if (!newcat_valid_command(rig, "NB"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "NB0%d%c", status ? 1 : 0,
@@ -5219,7 +5230,7 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
if (!newcat_valid_command(rig, "NR"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
if (is_ft991 || is_ftdx5000 || is_ftdx101)
@@ -5254,7 +5265,7 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
if (!newcat_valid_command(rig, "PR"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
if (is_ft991 || is_ftdx5000 || is_ftdx101)
@@ -5291,7 +5302,7 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
case RIG_FUNC_VOX:
if (!newcat_valid_command(rig, "VX"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "VX%d%c", status ? 1 : 0,
@@ -5301,7 +5312,7 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
case RIG_FUNC_TUNER:
if (!newcat_valid_command(rig, "AC"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "AC00%d%c",
@@ -5312,7 +5323,7 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
case RIG_FUNC_RIT:
if (!newcat_valid_command(rig, "RT"))
{
- return -RIG_ENAVAIL;
+ RETURNFUNC(-RIG_ENAVAIL);
}
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "RT%d%c", status ? 1 : 0,
@@ -5322,7 +5333,7 @@ int newcat_set_func(RIG *rig, vfo_t ...
[truncated message content] |
|
From: Michael B. <mdb...@us...> - 2021-01-17 04:47:38
|
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 a5ca77a66f8066cc734a5e077ae078dccf1c9870 (commit)
from 8595c244e4cd3705212a652bfad0b2a2a49cf178 (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 a5ca77a66f8066cc734a5e077ae078dccf1c9870
Author: Michael Black W9MDB <mdb...@ya...>
Date: Sat Jan 16 22:45:17 2021 -0600
Change all Yaeus rigs to 2 stop bits
https://github.com/Hamlib/Hamlib/issues/511
diff --git a/rigs/yaesu/ft2000.c b/rigs/yaesu/ft2000.c
index c4428cf0..c8b35020 100644
--- a/rigs/yaesu/ft2000.c
+++ b/rigs/yaesu/ft2000.c
@@ -101,7 +101,7 @@ const struct rig_caps ft2000_caps =
.serial_rate_min = 4800, /* Default rate per manual */
.serial_rate_max = 38400,
.serial_data_bits = 8,
- .serial_stop_bits = 1, /* Assumed since manual makes no mention */
+ .serial_stop_bits = 2, /* Assumed since manual makes no mention */
.serial_parity = RIG_PARITY_NONE,
.serial_handshake = RIG_HANDSHAKE_HARDWARE,
.write_delay = FT2000_WRITE_DELAY,
diff --git a/rigs/yaesu/ft3000.c b/rigs/yaesu/ft3000.c
index c06274b6..1b0197e6 100644
--- a/rigs/yaesu/ft3000.c
+++ b/rigs/yaesu/ft3000.c
@@ -104,7 +104,7 @@ const struct rig_caps ftdx3000_caps =
.serial_rate_min = 4800, /* Default rate per manual */
.serial_rate_max = 38400,
.serial_data_bits = 8,
- .serial_stop_bits = 1, /* Assumed since manual makes no mention */
+ .serial_stop_bits = 2, /* Assumed since manual makes no mention */
.serial_parity = RIG_PARITY_NONE,
.serial_handshake = RIG_HANDSHAKE_HARDWARE,
.write_delay = FTDX5000_WRITE_DELAY,
diff --git a/rigs/yaesu/ft450.c b/rigs/yaesu/ft450.c
index 7bd00548..f3ac27d3 100644
--- a/rigs/yaesu/ft450.c
+++ b/rigs/yaesu/ft450.c
@@ -54,7 +54,7 @@ const struct rig_caps ft450_caps =
.serial_rate_min = 4800, /* Default rate per manual */
.serial_rate_max = 38400,
.serial_data_bits = 8,
- .serial_stop_bits = 1, /* Assumed since manual makes no mention */
+ .serial_stop_bits = 2, /* Assumed since manual makes no mention */
.serial_parity = RIG_PARITY_NONE,
.serial_handshake = RIG_HANDSHAKE_HARDWARE,
.write_delay = FT450_WRITE_DELAY,
diff --git a/rigs/yaesu/ft5000.c b/rigs/yaesu/ft5000.c
index 58c0327e..4baeecb3 100644
--- a/rigs/yaesu/ft5000.c
+++ b/rigs/yaesu/ft5000.c
@@ -98,7 +98,7 @@ const struct rig_caps ftdx5000_caps =
.serial_rate_min = 4800, /* Default rate per manual */
.serial_rate_max = 38400,
.serial_data_bits = 8,
- .serial_stop_bits = 1, /* Assumed since manual makes no mention */
+ .serial_stop_bits = 2, /* Assumed since manual makes no mention */
.serial_parity = RIG_PARITY_NONE,
.serial_handshake = RIG_HANDSHAKE_HARDWARE,
.write_delay = FTDX5000_WRITE_DELAY,
diff --git a/rigs/yaesu/ft891.c b/rigs/yaesu/ft891.c
index adc5efa4..1e99e713 100644
--- a/rigs/yaesu/ft891.c
+++ b/rigs/yaesu/ft891.c
@@ -60,7 +60,7 @@ const struct rig_caps ft891_caps =
.serial_rate_min = 4800, /* Default rate per manual */
.serial_rate_max = 38400,
.serial_data_bits = 8,
- .serial_stop_bits = 1, /* Assumed since manual makes no mention */
+ .serial_stop_bits = 2, /* Assumed since manual makes no mention */
.serial_parity = RIG_PARITY_NONE,
.serial_handshake = RIG_HANDSHAKE_HARDWARE,
.write_delay = FT891_WRITE_DELAY,
diff --git a/rigs/yaesu/ft9000.c b/rigs/yaesu/ft9000.c
index 746225c7..04d623d8 100644
--- a/rigs/yaesu/ft9000.c
+++ b/rigs/yaesu/ft9000.c
@@ -61,7 +61,7 @@ const struct rig_caps ft9000_caps =
.serial_rate_min = 4800, /* Default rate per manual */
.serial_rate_max = 38400,
.serial_data_bits = 8,
- .serial_stop_bits = 1, /* Assumed since manual makes no mention */
+ .serial_stop_bits = 2, /* Assumed since manual makes no mention */
.serial_parity = RIG_PARITY_NONE,
.serial_handshake = RIG_HANDSHAKE_HARDWARE,
.write_delay = FT9000_WRITE_DELAY,
diff --git a/rigs/yaesu/ft950.c b/rigs/yaesu/ft950.c
index 2d59ac14..54cff564 100644
--- a/rigs/yaesu/ft950.c
+++ b/rigs/yaesu/ft950.c
@@ -99,7 +99,7 @@ const struct rig_caps ft950_caps =
.serial_rate_min = 4800, /* Default rate per manual */
.serial_rate_max = 38400,
.serial_data_bits = 8,
- .serial_stop_bits = 1, /* Assumed since manual makes no mention */
+ .serial_stop_bits = 2, /* Assumed since manual makes no mention */
.serial_parity = RIG_PARITY_NONE,
.serial_handshake = RIG_HANDSHAKE_HARDWARE,
.write_delay = FT950_WRITE_DELAY,
diff --git a/rigs/yaesu/ft991.c b/rigs/yaesu/ft991.c
index ecf67299..89fd2014 100644
--- a/rigs/yaesu/ft991.c
+++ b/rigs/yaesu/ft991.c
@@ -59,7 +59,7 @@ const struct rig_caps ft991_caps =
.serial_rate_min = 4800, /* Default rate per manual */
.serial_rate_max = 38400,
.serial_data_bits = 8,
- .serial_stop_bits = 1, /* Assumed since manual makes no mention */
+ .serial_stop_bits = 2, /* Assumed since manual makes no mention */
.serial_parity = RIG_PARITY_NONE,
.serial_handshake = RIG_HANDSHAKE_HARDWARE,
.write_delay = FT991_WRITE_DELAY,
diff --git a/rigs/yaesu/ftdx10.c b/rigs/yaesu/ftdx10.c
index 40498068..4a911768 100644
--- a/rigs/yaesu/ftdx10.c
+++ b/rigs/yaesu/ftdx10.c
@@ -86,7 +86,7 @@ const struct rig_caps ftdx10_caps =
.serial_rate_min = 4800,
.serial_rate_max = 38400,
.serial_data_bits = 8,
- .serial_stop_bits = 1,
+ .serial_stop_bits = 2,
.serial_parity = RIG_PARITY_NONE,
.serial_handshake = RIG_HANDSHAKE_HARDWARE,
.write_delay = FTDX10_WRITE_DELAY,
-----------------------------------------------------------------------
Summary of changes:
rigs/yaesu/ft2000.c | 2 +-
rigs/yaesu/ft3000.c | 2 +-
rigs/yaesu/ft450.c | 2 +-
rigs/yaesu/ft5000.c | 2 +-
rigs/yaesu/ft891.c | 2 +-
rigs/yaesu/ft9000.c | 2 +-
rigs/yaesu/ft950.c | 2 +-
rigs/yaesu/ft991.c | 2 +-
rigs/yaesu/ftdx10.c | 2 +-
9 files changed, 9 insertions(+), 9 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-16 18:33: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 8595c244e4cd3705212a652bfad0b2a2a49cf178 (commit)
from 1affac778b2b902cc218ec664b9716a1410dfb4d (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 8595c244e4cd3705212a652bfad0b2a2a49cf178
Author: Michael Black W9MDB <mdb...@ya...>
Date: Sat Jan 16 12:32:18 2021 -0600
Add retries to flrig.c for set commands
Was getting some timeouts on these set commands
diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c
index 9711509f..4f50ecac 100644
--- a/rigs/dummy/flrig.c
+++ b/rigs/dummy/flrig.c
@@ -517,6 +517,7 @@ static int write_transaction(RIG *rig, char *xml, int xml_len)
static int flrig_transaction(RIG *rig, char *cmd, char *cmd_arg, char *value,
int value_len)
{
+ char xml[MAXXMLLEN];
int retry = 2;
if (value)
@@ -526,7 +527,6 @@ static int flrig_transaction(RIG *rig, char *cmd, char *cmd_arg, char *value,
do
{
- char xml[MAXXMLLEN];
char *pxml;
int retval;
@@ -551,7 +551,7 @@ static int flrig_transaction(RIG *rig, char *cmd, char *cmd_arg, char *value,
xml_parse(xml, value, value_len);
}
}
- while (value && strlen(value) == 0 && retry--); // we'll do retries if needed
+ while (((value && strlen(value) == 0) || (strlen(xml)==0)) && retry--); // we'll do retries if needed
if (value && strlen(value) == 0) { return RIG_EPROTO; }
diff --git a/rigs/dummy/flrig.h b/rigs/dummy/flrig.h
index 4c6633b3..b9a876e9 100644
--- a/rigs/dummy/flrig.h
+++ b/rigs/dummy/flrig.h
@@ -28,7 +28,7 @@
#include <sys/time.h>
#endif
-#define BACKEND_VER "20210112"
+#define BACKEND_VER "20210116"
#define EOM "\r"
#define TRUE 1
-----------------------------------------------------------------------
Summary of changes:
rigs/dummy/flrig.c | 4 ++--
rigs/dummy/flrig.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-16 18:19:53
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via 1affac778b2b902cc218ec664b9716a1410dfb4d (commit)
via 50a46431b2d5f263778c6cd09c7a416be4428d4b (commit)
from 4b2d63f9f0c713a1c6fcd67a6f23739338545663 (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 1affac778b2b902cc218ec664b9716a1410dfb4d
Author: Michael Black W9MDB <mdb...@ya...>
Date: Sat Jan 16 12:14:30 2021 -0600
Change ft1200 stop bits to 2. Found by Bill Sommerville with remote serial port testing.
Were getting many ?; responses with stopbits=1
diff --git a/rigs/yaesu/ft1200.c b/rigs/yaesu/ft1200.c
index 1a2da5d5..28b5eb92 100644
--- a/rigs/yaesu/ft1200.c
+++ b/rigs/yaesu/ft1200.c
@@ -89,7 +89,7 @@ const struct rig_caps ftdx1200_caps =
RIG_MODEL(RIG_MODEL_FTDX1200),
.model_name = "FTDX-1200",
.mfg_name = "Yaesu",
- .version = NEWCAT_VER ".0",
+ .version = NEWCAT_VER ".1",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,
@@ -99,7 +99,7 @@ const struct rig_caps ftdx1200_caps =
.serial_rate_min = 4800, /* Default rate per manual */
.serial_rate_max = 38400,
.serial_data_bits = 8,
- .serial_stop_bits = 1, /* Assumed since manual makes no mention */
+ .serial_stop_bits = 2, /* found by testing with remote serial port */
.serial_parity = RIG_PARITY_NONE,
.serial_handshake = RIG_HANDSHAKE_HARDWARE,
.write_delay = FTDX1200_WRITE_DELAY,
commit 50a46431b2d5f263778c6cd09c7a416be4428d4b
Author: Michael Black W9MDB <mdb...@ya...>
Date: Sat Jan 16 09:31:15 2021 -0600
Make newcat_set_cmd_validate change VFOs when needed for band select
https://github.com/Hamlib/Hamlib/issues/510
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index 875f9342..0aec7db7 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -352,11 +352,13 @@ static const yaesu_newcat_commands_t valid_commands[] =
};
int valid_commands_count = sizeof(valid_commands) / sizeof(
- yaesu_newcat_commands_t);
+ yaesu_newcat_commands_t);
-static void errmsg(int err, const char *func, const char *file, int line, char *s)
+static void errmsg(int err, const char *func, const char *file, int line,
+ char *s)
{
- rig_debug(RIG_DEBUG_ERR, "%s(%s:%d): %s: %s\b", __func__,file,line,s,rigerror(err));
+ rig_debug(RIG_DEBUG_ERR, "%s(%s:%d): %s: %s\b", __func__, file, line, s,
+ rigerror(err));
}
/*
@@ -792,7 +794,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
if (RIG_OK != (err = newcat_set_cmd(rig)))
{
- errmsg(err,__func__,__FILE__,__LINE__, "newcat_set_cmd failed");
+ errmsg(err, __func__, __FILE__, __LINE__, "newcat_set_cmd failed");
return err;
}
}
@@ -818,12 +820,14 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
if (vfo == RIG_VFO_A || vfo == RIG_VFO_MAIN)
{
- changing = newcat_band_index(freq) != newcat_band_index(rig->state.cache.freqMainA);
+ changing = newcat_band_index(freq) != newcat_band_index(
+ rig->state.cache.freqMainA);
rig_debug(RIG_DEBUG_TRACE, "%s: VFO_A freq changing=%d\n", __func__, changing);
}
else
{
- changing = newcat_band_index(freq) != newcat_band_index(rig->state.cache.freqMainB);
+ changing = newcat_band_index(freq) != newcat_band_index(
+ rig->state.cache.freqMainB);
rig_debug(RIG_DEBUG_TRACE, "%s: VFO_B freq changing=%d\n", __func__, changing);
}
@@ -831,10 +835,24 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
// remove the split check here -- hopefully works OK
//&& !rig->state.cache.split
&& !is_ft891 // 891 does not remember bandwidth so don't do this
- && rig->caps->get_vfo!=NULL && rig->caps->set_vfo!=NULL) // gotta' have get_vfo too
+ && rig->caps->get_vfo != NULL
+ && rig->caps->set_vfo != NULL) // gotta' have get_vfo too
{
- snprintf(priv->cmd_str, sizeof(priv->cmd_str), "BS%02d%c",
- newcat_band_index(freq), cat_term);
+ if (rig->state.current_vfo != vfo)
+ {
+ // then we need to change vfos, BS, and change back
+ snprintf(priv->cmd_str, sizeof(priv->cmd_str), "VS1;BS%02d%c;VS0;",
+ newcat_band_index(freq), cat_term);
+
+ if (vfo == RIG_VFO_A || vfo == RIG_VFO_MAIN)
+ snprintf(priv->cmd_str, sizeof(priv->cmd_str), "VS0;BS%02d%c;VS1;",
+ newcat_band_index(freq), cat_term);
+ }
+ else
+ {
+ snprintf(priv->cmd_str, sizeof(priv->cmd_str), "BS%02d%c",
+ newcat_band_index(freq), cat_term);
+ }
if (RIG_OK != (err = newcat_set_cmd(rig)))
{
@@ -883,9 +901,11 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
err = rig_set_vfo(rig, vfotmp == RIG_VFO_A ? RIG_VFO_A : RIG_VFO_B);
}
- if (err != RIG_OK) {
- rig_debug(RIG_DEBUG_ERR, "%s: rig_set_vfo failed: %s\n", __func__, rigerror(err));
- return err;
+ if (err != RIG_OK)
+ {
+ rig_debug(RIG_DEBUG_ERR, "%s: rig_set_vfo failed: %s\n", __func__,
+ rigerror(err));
+ return err;
}
// after band select re-read things -- may not have to change anything
-----------------------------------------------------------------------
Summary of changes:
rigs/yaesu/ft1200.c | 4 ++--
rigs/yaesu/newcat.c | 44 ++++++++++++++++++++++++++++++++------------
2 files changed, 34 insertions(+), 14 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-16 14:53: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 4b2d63f9f0c713a1c6fcd67a6f23739338545663 (commit)
from 174d4118977de3c461aaaedc929843b0e491b5ba (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 4b2d63f9f0c713a1c6fcd67a6f23739338545663
Author: Michael Black W9MDB <mdb...@ya...>
Date: Sat Jan 16 08:50:54 2021 -0600
Fix newcat_set_cmd_validate band change checking
https://github.com/Hamlib/Hamlib/issues/510
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index 5c2ba260..875f9342 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -352,7 +352,12 @@ static const yaesu_newcat_commands_t valid_commands[] =
};
int valid_commands_count = sizeof(valid_commands) / sizeof(
- yaesu_newcat_commands_t);
+ yaesu_newcat_commands_t);
+
+static void errmsg(int err, const char *func, const char *file, int line, char *s)
+{
+ rig_debug(RIG_DEBUG_ERR, "%s(%s:%d): %s: %s\b", __func__,file,line,s,rigerror(err));
+}
/*
* configuration Tokens
@@ -726,6 +731,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
if (err < 0)
{
+ errmsg(err, __func__, __FILE__, __LINE__, "newcat_set_vfo_from_alias");
return err;
}
@@ -775,6 +781,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
if (RIG_OK != (err = newcat_get_cmd(rig)))
{
+ errmsg(err, __func__, __FILE__, __LINE__, "newcat_get_cmd");
return err;
}
@@ -785,6 +792,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
if (RIG_OK != (err = newcat_set_cmd(rig)))
{
+ errmsg(err,__func__,__FILE__,__LINE__, "newcat_set_cmd failed");
return err;
}
}
@@ -810,12 +818,12 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
if (vfo == RIG_VFO_A || vfo == RIG_VFO_MAIN)
{
- changing = newcat_band_index(freq) != rig->state.cache.freqMainA;
+ changing = newcat_band_index(freq) != newcat_band_index(rig->state.cache.freqMainA);
rig_debug(RIG_DEBUG_TRACE, "%s: VFO_A freq changing=%d\n", __func__, changing);
}
else
{
- changing = newcat_band_index(freq) != rig->state.cache.freqMainB;
+ changing = newcat_band_index(freq) != newcat_band_index(rig->state.cache.freqMainB);
rig_debug(RIG_DEBUG_TRACE, "%s: VFO_B freq changing=%d\n", __func__, changing);
}
-----------------------------------------------------------------------
Summary of changes:
rigs/yaesu/newcat.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-16 13:39:45
|
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 174d4118977de3c461aaaedc929843b0e491b5ba (commit)
from f2b8096529a0a659a49337d0188fcc19883282b5 (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 174d4118977de3c461aaaedc929843b0e491b5ba
Author: Michael Black W9MDB <mdb...@ya...>
Date: Sat Jan 16 07:38:22 2021 -0600
Restrict newcat_set_cmd_validate BS to only rigs with get_vfo and set_vfo
https://github.com/Hamlib/Hamlib/issues/510
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index e236403f..5c2ba260 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -822,7 +822,8 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
if (newcat_valid_command(rig, "BS") && changing
// remove the split check here -- hopefully works OK
//&& !rig->state.cache.split
- && !is_ft891) // 891 does not remember bandwidth so don't do this
+ && !is_ft891 // 891 does not remember bandwidth so don't do this
+ && rig->caps->get_vfo!=NULL && rig->caps->set_vfo!=NULL) // gotta' have get_vfo too
{
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "BS%02d%c",
newcat_band_index(freq), cat_term);
@@ -874,7 +875,10 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
err = rig_set_vfo(rig, vfotmp == RIG_VFO_A ? RIG_VFO_A : RIG_VFO_B);
}
- if (err != RIG_OK) { return err; }
+ if (err != RIG_OK) {
+ rig_debug(RIG_DEBUG_ERR, "%s: rig_set_vfo failed: %s\n", __func__, rigerror(err));
+ return err;
+ }
// after band select re-read things -- may not have to change anything
freq_t tmp_freqA, tmp_freqB;
diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h
index 3033e920..dfa3bdb5 100644
--- a/rigs/yaesu/newcat.h
+++ b/rigs/yaesu/newcat.h
@@ -50,7 +50,7 @@
typedef char ncboolean;
/* shared function version */
-#define NEWCAT_VER "20210115"
+#define NEWCAT_VER "20210116"
/* Hopefully large enough for future use, 128 chars plus '\0' */
#define NEWCAT_DATA_LEN 129
-----------------------------------------------------------------------
Summary of changes:
rigs/yaesu/newcat.c | 8 ++++++--
rigs/yaesu/newcat.h | 2 +-
2 files changed, 7 insertions(+), 3 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-16 04:31:58
|
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 f2b8096529a0a659a49337d0188fcc19883282b5 (commit)
from 14493d4df5a26d606d3a145462eca7a759da1aee (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 f2b8096529a0a659a49337d0188fcc19883282b5
Author: Michael Black W9MDB <mdb...@ya...>
Date: Fri Jan 15 22:29:46 2021 -0600
Fix 2nd BS call in newcat.c
https://github.com/Hamlib/Hamlib/issues/510
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index ded0e20e..e236403f 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -854,6 +854,9 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
if (err != RIG_OK) { return err; }
+ snprintf(priv->cmd_str, sizeof(priv->cmd_str), "BS%02d%c",
+ newcat_band_index(freq), cat_term);
+
if (RIG_OK != (err = newcat_set_cmd(rig)))
{
rig_debug(RIG_DEBUG_ERR, "%s: Unexpected error with BS command#2=%s\n",
-----------------------------------------------------------------------
Summary of changes:
rigs/yaesu/newcat.c | 3 +++
1 file changed, 3 insertions(+)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-15 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 14493d4df5a26d606d3a145462eca7a759da1aee (commit)
from a7b9620f910e2270caca7a2381d200615560bbcc (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 14493d4df5a26d606d3a145462eca7a759da1aee
Author: Michael Black W9MDB <mdb...@ya...>
Date: Fri Jan 15 17:39:37 2021 -0600
newcat.c make band_index vfo check work for both VFOS
https://github.com/Hamlib/Hamlib/issues/510
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index 38116954..ded0e20e 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -842,7 +842,15 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
if (err != RIG_OK) { return err; }
- err = rig_set_vfo(rig, vfotmp == RIG_VFO_MAIN ? RIG_VFO_SUB : RIG_VFO_MAIN);
+ if (rig->state.vfo_list & RIG_VFO_MAIN)
+ {
+ err = rig_set_vfo(rig, vfotmp == RIG_VFO_MAIN ? RIG_VFO_SUB : RIG_VFO_MAIN);
+ }
+ else
+ {
+ err = rig_set_vfo(rig, vfotmp == RIG_VFO_A ? RIG_VFO_B : RIG_VFO_A);
+ }
+
if (err != RIG_OK) { return err; }
@@ -854,7 +862,14 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
}
// switch back to the starting vfo
- err = rig_set_vfo(rig, vfotmp == RIG_VFO_MAIN ? RIG_VFO_MAIN : RIG_VFO_SUB);
+ if (rig->state.vfo_list & RIG_VFO_MAIN)
+ {
+ err = rig_set_vfo(rig, vfotmp == RIG_VFO_MAIN ? RIG_VFO_MAIN : RIG_VFO_SUB);
+ }
+ else
+ {
+ err = rig_set_vfo(rig, vfotmp == RIG_VFO_A ? RIG_VFO_A : RIG_VFO_B);
+ }
if (err != RIG_OK) { return err; }
-----------------------------------------------------------------------
Summary of changes:
rigs/yaesu/newcat.c | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-15 23:29: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 a7b9620f910e2270caca7a2381d200615560bbcc (commit)
from 598b105e79f8adda2d3844b712028871e8265d6d (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 a7b9620f910e2270caca7a2381d200615560bbcc
Author: Michael Black W9MDB <mdb...@ya...>
Date: Fri Jan 15 17:29:02 2021 -0600
Make band_index detect change by VFO
https://github.com/Hamlib/Hamlib/issues/510
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index ef520dd7..38116954 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -806,8 +806,20 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
//
// Restore band memory if we can and band is changing -- we do it before we set the frequency
// And only when not in split mode (note this check has been removed for testing)
- if (newcat_valid_command(rig, "BS")
- && newcat_band_index(freq) != newcat_band_index(rig->state.current_freq)
+ int changing;
+
+ if (vfo == RIG_VFO_A || vfo == RIG_VFO_MAIN)
+ {
+ changing = newcat_band_index(freq) != rig->state.cache.freqMainA;
+ rig_debug(RIG_DEBUG_TRACE, "%s: VFO_A freq changing=%d\n", __func__, changing);
+ }
+ else
+ {
+ changing = newcat_band_index(freq) != rig->state.cache.freqMainB;
+ rig_debug(RIG_DEBUG_TRACE, "%s: VFO_B freq changing=%d\n", __func__, changing);
+ }
+
+ if (newcat_valid_command(rig, "BS") && changing
// remove the split check here -- hopefully works OK
//&& !rig->state.cache.split
&& !is_ft891) // 891 does not remember bandwidth so don't do this
-----------------------------------------------------------------------
Summary of changes:
rigs/yaesu/newcat.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-15 22:49:18
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via 598b105e79f8adda2d3844b712028871e8265d6d (commit)
via 28c7ee7f88959eee3968958578790fe7818ee73f (commit)
from 1cd433b0d4d338bc2058b636b1d98d372d46fc02 (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 598b105e79f8adda2d3844b712028871e8265d6d
Author: Michael Black W9MDB <mdb...@ya...>
Date: Fri Jan 15 16:48:32 2021 -0600
astyle files prepping for 4.1 release
diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c
index 46eea2de..9711509f 100644
--- a/rigs/dummy/flrig.c
+++ b/rigs/dummy/flrig.c
@@ -1883,7 +1883,7 @@ static int flrig_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
int retval;
char cmd_arg[MAXARGLEN];
char *cmd;
- char *param_type="i4";
+ char *param_type = "i4";
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s level=%d, val=%f\n", __func__,
rig_strvfo(vfo), (int)level, val.f);
@@ -1897,13 +1897,13 @@ static int flrig_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
switch (level)
{
- case RIG_LEVEL_RF: cmd = "rig.set_rfgain"; val.f*= 100; break;
+ case RIG_LEVEL_RF: cmd = "rig.set_rfgain"; val.f *= 100; break;
- case RIG_LEVEL_AF: cmd = "rig.set_volume"; val.f*= 100; break;
+ case RIG_LEVEL_AF: cmd = "rig.set_volume"; val.f *= 100; break;
- case RIG_LEVEL_MICGAIN: cmd = "rig.set_micgain"; val.f*= 100; break;
+ case RIG_LEVEL_MICGAIN: cmd = "rig.set_micgain"; val.f *= 100; break;
- case RIG_LEVEL_RFPOWER: cmd = "rig.set_power"; val.f*= 100; break;
+ case RIG_LEVEL_RFPOWER: cmd = "rig.set_power"; val.f *= 100; break;
default:
rig_debug(RIG_DEBUG_ERR, "%s: invalid level=%d\n", __func__, (int)level);
@@ -1949,7 +1949,7 @@ static int flrig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
case RIG_LEVEL_MICGAIN: cmd = "rig.get_micgain"; break;
case RIG_LEVEL_STRENGTH: cmd = "rig.get_smeter"; break;
-
+
case RIG_LEVEL_RFPOWER: cmd = "rig.get_power"; break;
case RIG_LEVEL_RFPOWER_METER_WATTS:
diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c
index d11f7087..8d9739eb 100644
--- a/rigs/icom/icom.c
+++ b/rigs/icom/icom.c
@@ -715,7 +715,7 @@ int icom_get_usb_echo_off(RIG *rig)
rig_debug(RIG_DEBUG_VERBOSE, "%s: ack_len=%d\n", __func__, ack_len);
- if (retval == -RIG_ETIMEOUT) return retval;
+ if (retval == -RIG_ETIMEOUT) { return retval; }
if (retval == RIG_OK)
{
diff --git a/rigs/kit/dwt.c b/rigs/kit/dwt.c
index 65252db5..787aba17 100644
--- a/rigs/kit/dwt.c
+++ b/rigs/kit/dwt.c
@@ -342,7 +342,7 @@ int dwtdll_cleanup(RIG *rig)
struct dwtdll_priv_data *priv = (struct dwtdll_priv_data *)rig->state.priv;
/* Clean up the dll access */
- if (priv) FreeLibrary(priv->dll);
+ if (priv) { FreeLibrary(priv->dll); }
if (rig->state.priv)
{
diff --git a/rigs/kit/elektor507.c b/rigs/kit/elektor507.c
index fcca4a2f..5ecc4687 100644
--- a/rigs/kit/elektor507.c
+++ b/rigs/kit/elektor507.c
@@ -345,7 +345,7 @@ int elektor507_cleanup(RIG *rig)
rig->state.priv;
/* Clean up the dll access */
- if (priv) FreeLibrary(priv->extra_priv.dll);
+ if (priv) { FreeLibrary(priv->extra_priv.dll); }
if (rig->state.priv)
{
diff --git a/rigs/winradio/g303.c b/rigs/winradio/g303.c
index dda2c5cc..0858449d 100644
--- a/rigs/winradio/g303.c
+++ b/rigs/winradio/g303.c
@@ -272,7 +272,7 @@ int g3_cleanup(RIG *rig)
struct g3_priv_data *priv = (struct g3_priv_data *)rig->state.priv;
/* Clean up the dll access */
- if (priv) FreeLibrary(priv->dll);
+ if (priv) { FreeLibrary(priv->dll); }
if (rig->state.priv)
{
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index bc182efb..ef520dd7 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -540,9 +540,10 @@ int newcat_open(RIG *rig)
rig_debug(RIG_DEBUG_VERBOSE, "%s: rig_id=%d\n", __func__, priv->rig_id);
#if 0 // possible future enhancement?
+
// some rigs have a CAT TOT timeout that defaults to 10ms
// so we'll increase CAT timeout to 100ms
- if (priv->rig_id == NC_RIGID_FT2000
+ if (priv->rig_id == NC_RIGID_FT2000
|| priv->rig_id == NC_RIGID_FT2000D
|| priv->rig_id == NC_RIGID_FT891
|| priv->rig_id == NC_RIGID_FT991
@@ -550,9 +551,11 @@ int newcat_open(RIG *rig)
{
int err;
char *cmd = "EX0291%c";
- if (priv->rig_id == NC_RIGID_FT950) cmd = "EX0271%c";
- else if (priv->rig_id == NC_RIGID_FT891) cmd = "EX05071c";
- else if (priv->rig_id == NC_RIGID_FT991) cmd = "EX0321c";
+
+ if (priv->rig_id == NC_RIGID_FT950) { cmd = "EX0271%c"; }
+ else if (priv->rig_id == NC_RIGID_FT891) { cmd = "EX05071c"; }
+ else if (priv->rig_id == NC_RIGID_FT991) { cmd = "EX0321c"; }
+
snprintf(priv->cmd_str, sizeof(priv->cmd_str), cmd, cat_term);
if (RIG_OK != (err = newcat_set_cmd(rig)))
@@ -560,6 +563,7 @@ int newcat_open(RIG *rig)
return err;
}
}
+
#endif
rig_debug(RIG_DEBUG_VERBOSE, "%s: returning RIG_OK\n", __func__);
@@ -804,7 +808,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
// And only when not in split mode (note this check has been removed for testing)
if (newcat_valid_command(rig, "BS")
&& newcat_band_index(freq) != newcat_band_index(rig->state.current_freq)
- // remove the split check here -- hopefully works OK
+ // remove the split check here -- hopefully works OK
//&& !rig->state.cache.split
&& !is_ft891) // 891 does not remember bandwidth so don't do this
{
@@ -813,7 +817,8 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
if (RIG_OK != (err = newcat_set_cmd(rig)))
{
- rig_debug(RIG_DEBUG_ERR, "%s: Unexpected error with BS command#1=%s\n", __func__,
+ rig_debug(RIG_DEBUG_ERR, "%s: Unexpected error with BS command#1=%s\n",
+ __func__,
rigerror(err));
}
else
@@ -821,18 +826,26 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
// Also need to do this for the other VFO on some Yaesu rigs
// is redundant for rigs where band stack includes both vfos
vfo_t vfotmp;
- err = rig_get_vfo(rig, &vfotmp);
- if (err != RIG_OK) return err;
- err = rig_set_vfo(rig, vfotmp==RIG_VFO_MAIN?RIG_VFO_SUB:RIG_VFO_MAIN);
- if (err != RIG_OK) return err;
+ err = rig_get_vfo(rig, &vfotmp);
+
+ if (err != RIG_OK) { return err; }
+
+ err = rig_set_vfo(rig, vfotmp == RIG_VFO_MAIN ? RIG_VFO_SUB : RIG_VFO_MAIN);
+
+ if (err != RIG_OK) { return err; }
+
if (RIG_OK != (err = newcat_set_cmd(rig)))
{
- rig_debug(RIG_DEBUG_ERR, "%s: Unexpected error with BS command#2=%s\n", __func__,
- rigerror(err));
+ rig_debug(RIG_DEBUG_ERR, "%s: Unexpected error with BS command#2=%s\n",
+ __func__,
+ rigerror(err));
}
+
// switch back to the starting vfo
- err = rig_set_vfo(rig, vfotmp==RIG_VFO_MAIN?RIG_VFO_MAIN:RIG_VFO_SUB);
- if (err != RIG_OK) return err;
+ err = rig_set_vfo(rig, vfotmp == RIG_VFO_MAIN ? RIG_VFO_MAIN : RIG_VFO_SUB);
+
+ if (err != RIG_OK) { return err; }
+
// after band select re-read things -- may not have to change anything
freq_t tmp_freqA, tmp_freqB;
rmode_t tmp_mode;
@@ -841,10 +854,12 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
rig_get_freq(rig, RIG_VFO_SUB, &tmp_freqB);
rig_get_mode(rig, RIG_VFO_MAIN, &tmp_mode, &tmp_width);
rig_get_mode(rig, RIG_VFO_SUB, &tmp_mode, &tmp_width);
+
if ((target_vfo == 0 && tmp_freqA == freq)
- || (target_vfo == 1 && tmp_freqB == freq))
+ || (target_vfo == 1 && tmp_freqB == freq))
{
- rig_debug(RIG_DEBUG_VERBOSE, "%s: freq after band select already set to %"PRIfreq"\n", __func__, freq);
+ rig_debug(RIG_DEBUG_VERBOSE,
+ "%s: freq after band select already set to %"PRIfreq"\n", __func__, freq);
return RIG_OK; // we're done then!!
}
}
@@ -2577,7 +2592,7 @@ int newcat_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone)
if (tone == 0) /* turn off ctcss */
{
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "CT%c0%c", main_sub_vfo,
- cat_term);
+ cat_term);
}
else
{
@@ -3309,7 +3324,8 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
break;
- case RIG_LEVEL_IF: {
+ case RIG_LEVEL_IF:
+ {
pbwidth_t width;
rmode_t mode = 0;
@@ -3362,11 +3378,13 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
// Some Yaesu rigs reject this command in AM/FM modes
if (is_ft991 || is_ftdx5000 || is_ftdx101)
{
- if (mode & RIG_MODE_AM || mode & RIG_MODE_FM || mode & RIG_MODE_AMN || mode & RIG_MODE_FMN)
+ if (mode & RIG_MODE_AM || mode & RIG_MODE_FM || mode & RIG_MODE_AMN
+ || mode & RIG_MODE_FMN)
{
priv->question_mark_response_means_rejected = 1;
}
}
+
break;
}
@@ -3415,7 +3433,8 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "KS%03d%c", val.i, cat_term);
break;
- case RIG_LEVEL_MICGAIN: {
+ case RIG_LEVEL_MICGAIN:
+ {
pbwidth_t width;
rmode_t mode = 0;
@@ -3449,6 +3468,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
priv->question_mark_response_means_rejected = 1;
}
}
+
break;
}
@@ -3655,6 +3675,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
priv->cmd_str[2] = main_sub_vfo;
}
}
+
break;
case RIG_LEVEL_COMP:
@@ -4087,7 +4108,8 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
cat_term);
break;
- case RIG_LEVEL_IF: {
+ case RIG_LEVEL_IF:
+ {
pbwidth_t width;
rmode_t mode = 0;
@@ -4112,11 +4134,13 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
// Some Yaesu rigs reject this command in AM/FM modes
if (is_ft991 || is_ftdx5000 || is_ftdx101)
{
- if (mode & RIG_MODE_AM || mode & RIG_MODE_FM || mode & RIG_MODE_AMN || mode & RIG_MODE_FMN)
+ if (mode & RIG_MODE_AM || mode & RIG_MODE_FM || mode & RIG_MODE_AMN
+ || mode & RIG_MODE_FMN)
{
priv->question_mark_response_means_rejected = 1;
}
}
+
break;
}
@@ -4138,7 +4162,8 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "KS%c", cat_term);
break;
- case RIG_LEVEL_MICGAIN: {
+ case RIG_LEVEL_MICGAIN:
+ {
pbwidth_t width;
rmode_t mode = 0;
@@ -4162,6 +4187,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
priv->question_mark_response_means_rejected = 1;
}
}
+
break;
}
@@ -4966,7 +4992,8 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
switch (func)
{
- case RIG_FUNC_ANF: {
+ case RIG_FUNC_ANF:
+ {
pbwidth_t width;
rmode_t mode = 0;
@@ -4996,10 +5023,12 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
priv->question_mark_response_means_rejected = 1;
}
}
+
break;
- }
+ }
- case RIG_FUNC_MN: {
+ case RIG_FUNC_MN:
+ {
pbwidth_t width;
rmode_t mode = 0;
@@ -5029,6 +5058,7 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
priv->question_mark_response_means_rejected = 1;
}
}
+
break;
}
@@ -5120,7 +5150,8 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
break;
- case RIG_FUNC_NR: {
+ case RIG_FUNC_NR:
+ {
pbwidth_t width;
rmode_t mode = 0;
@@ -5150,10 +5181,12 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
priv->question_mark_response_means_rejected = 1;
}
}
+
break;
}
- case RIG_FUNC_COMP: {
+ case RIG_FUNC_COMP:
+ {
pbwidth_t width;
rmode_t mode = 0;
@@ -5182,12 +5215,14 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
// Some Yaesu rigs reject this command in AM/FM/RTTY modes
if (is_ft991 || is_ftdx5000 || is_ftdx101)
{
- if (mode & RIG_MODE_AM || mode & RIG_MODE_FM || mode & RIG_MODE_AMN || mode & RIG_MODE_FMN ||
+ if (mode & RIG_MODE_AM || mode & RIG_MODE_FM || mode & RIG_MODE_AMN
+ || mode & RIG_MODE_FMN ||
mode & RIG_MODE_RTTY || mode & RIG_MODE_RTTYR)
{
priv->question_mark_response_means_rejected = 1;
}
}
+
break;
}
@@ -5263,7 +5298,8 @@ int newcat_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)
switch (func)
{
- case RIG_FUNC_ANF: {
+ case RIG_FUNC_ANF:
+ {
pbwidth_t width;
rmode_t mode = 0;
@@ -5292,6 +5328,7 @@ int newcat_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)
priv->question_mark_response_means_rejected = 1;
}
}
+
break;
}
@@ -9259,6 +9296,7 @@ int newcat_get_cmd(RIG *rig)
while (rc != RIG_OK && retry_count++ <= state->rigport.retry)
{
rig_flush(&state->rigport); /* discard any unsolicited data */
+
if (rc != -RIG_BUSBUSY)
{
/* send the command */
@@ -9326,6 +9364,7 @@ int newcat_get_cmd(RIG *rig)
break; /* retry */
case '?':
+
/* The ? response is ambiguous and undocumented by Yaesu, but for get commands it seems to
* indicate that the rig rejected the command because the state of the rig is not valid for the command
* or that the command parameter is invalid. Retrying the command does not fix the issue,
@@ -9346,13 +9385,14 @@ int newcat_get_cmd(RIG *rig)
*/
if (priv->question_mark_response_means_rejected)
{
- rig_debug(RIG_DEBUG_ERR, "%s: Command rejected by the rig (get): '%s'\n", __func__,
- priv->cmd_str);
+ rig_debug(RIG_DEBUG_ERR, "%s: Command rejected by the rig (get): '%s'\n",
+ __func__,
+ priv->cmd_str);
return -RIG_ERJCTED;
}
rig_debug(RIG_DEBUG_WARN, "%s: Rig busy - retrying %d of %d: '%s'\n", __func__,
- retry_count, state->rigport.retry, priv->cmd_str);
+ retry_count, state->rigport.retry, priv->cmd_str);
rc = -RIG_ERJCTED; /* retry */
break;
@@ -9398,76 +9438,88 @@ int newcat_set_cmd_validate(RIG *rig)
struct rig_state *state = &rig->state;
struct newcat_priv_data *priv = (struct newcat_priv_data *)rig->state.priv;
char valcmd[16];
- int retries=8;
- int retry=0;
+ int retries = 8;
+ int retry = 0;
int sleepms = 50;
int rc = -RIG_EPROTO;
rig_debug(RIG_DEBUG_TRACE, "%s: priv->cmd_str=%s\n", __func__, priv->cmd_str);
- if ((strncmp(priv->cmd_str,"FA",2)==0) && (strlen(priv->cmd_str)>3))
+
+ if ((strncmp(priv->cmd_str, "FA", 2) == 0) && (strlen(priv->cmd_str) > 3))
{
- strcpy(valcmd,"FA;");
+ strcpy(valcmd, "FA;");
}
- else if ((strncmp(priv->cmd_str,"FB",2)==0) && (strlen(priv->cmd_str)>3))
+ else if ((strncmp(priv->cmd_str, "FB", 2) == 0) && (strlen(priv->cmd_str) > 3))
{
- strcpy(valcmd,"FB;");
+ strcpy(valcmd, "FB;");
}
- else if ((strncmp(priv->cmd_str,"MD",2)==0) && (strlen(priv->cmd_str)>3))
+ else if ((strncmp(priv->cmd_str, "MD", 2) == 0) && (strlen(priv->cmd_str) > 3))
{
- strcpy(valcmd,priv->cmd_str); // pull the needed part of the cmd
- valcmd[3]=';';
- valcmd[4]=0;
+ strcpy(valcmd, priv->cmd_str); // pull the needed part of the cmd
+ valcmd[3] = ';';
+ valcmd[4] = 0;
}
- else if ((strncmp(priv->cmd_str,"TX",2)==0) && (strlen(priv->cmd_str)>3))
+ else if ((strncmp(priv->cmd_str, "TX", 2) == 0) && (strlen(priv->cmd_str) > 3))
{
- strcpy(valcmd,"TX;");
+ strcpy(valcmd, "TX;");
}
- else if ((strncmp(priv->cmd_str,"FT",2)==0) && (strlen(priv->cmd_str)>3))
+ else if ((strncmp(priv->cmd_str, "FT", 2) == 0) && (strlen(priv->cmd_str) > 3))
{
- strcpy(valcmd,"FT;");
+ strcpy(valcmd, "FT;");
}
- else if ((strncmp(priv->cmd_str,"AI",2)==0) && (strlen(priv->cmd_str)>3))
+ else if ((strncmp(priv->cmd_str, "AI", 2) == 0) && (strlen(priv->cmd_str) > 3))
{
- strcpy(valcmd,"AI;");
+ strcpy(valcmd, "AI;");
}
- else if ((strncmp(priv->cmd_str,"VS",2)==0) && (strlen(priv->cmd_str)>3))
+ else if ((strncmp(priv->cmd_str, "VS", 2) == 0) && (strlen(priv->cmd_str) > 3))
{
- strcpy(valcmd,"VS;");
+ strcpy(valcmd, "VS;");
}
else
{
rig_debug(RIG_DEBUG_ERR, "%s: %s not implemented\n", __func__, priv->cmd_str);
return -RIG_ENIMPL;
}
+
while (rc != RIG_OK && retry++ < retries)
{
int bytes;
char cmd[256]; // big enough
rig_flush(&state->rigport); /* discard any unsolicited data */
- snprintf(cmd,sizeof(cmd),"%s%s",priv->cmd_str,valcmd);
+ snprintf(cmd, sizeof(cmd), "%s%s", priv->cmd_str, valcmd);
rc = write_block(&state->rigport, cmd, strlen(cmd));
- if (rc != RIG_OK) return -RIG_EIO;
+
+ if (rc != RIG_OK) { return -RIG_EIO; }
+
bytes = read_string(&state->rigport, priv->ret_data, sizeof(priv->ret_data),
- &cat_term, sizeof(cat_term));
- if (strncmp(priv->cmd_str,"FT",2)==0 && strncmp(priv->ret_data,"FT",2)==0)
+ &cat_term, sizeof(cat_term));
+
+ if (strncmp(priv->cmd_str, "FT", 2) == 0
+ && strncmp(priv->ret_data, "FT", 2) == 0)
{
// FT command does not echo what's sent so we just check the basic command
return RIG_OK;
}
- if (strncmp(priv->cmd_str,"TX",2)==0 && strncmp(priv->ret_data,"TX",2)==0)
+
+ if (strncmp(priv->cmd_str, "TX", 2) == 0
+ && strncmp(priv->ret_data, "TX", 2) == 0)
{
// TX command does not echo what's sent so we just check the basic command
return RIG_OK;
}
+
if (bytes > 0)
{
// if they match we are validated
- if (strcmp(priv->cmd_str, priv->ret_data)==0) return RIG_OK;
- else rc = -RIG_EPROTO;
+ if (strcmp(priv->cmd_str, priv->ret_data) == 0) { return RIG_OK; }
+ else { rc = -RIG_EPROTO; }
}
- rig_debug(RIG_DEBUG_ERR, "%s: cmd validation failed, '%s'!='%s', try#%d\n", __func__, priv->cmd_str, priv->ret_data, retry);
- hl_usleep(sleepms*1000);
- }
+
+ rig_debug(RIG_DEBUG_ERR, "%s: cmd validation failed, '%s'!='%s', try#%d\n",
+ __func__, priv->cmd_str, priv->ret_data, retry);
+ hl_usleep(sleepms * 1000);
+ }
+
return -RIG_EPROTO;
}
/*
@@ -9498,7 +9550,9 @@ int newcat_set_cmd(RIG *rig)
rig_debug(RIG_DEBUG_TRACE, "cmd_str = %s\n", priv->cmd_str);
rc = newcat_set_cmd_validate(rig);
- if (rc==RIG_OK) {
+
+ if (rc == RIG_OK)
+ {
rig_debug(RIG_DEBUG_TRACE, "%s: cmd_validate OK\n", __func__);
return RIG_OK;
}
@@ -9507,7 +9561,9 @@ int newcat_set_cmd(RIG *rig)
rig_debug(RIG_DEBUG_TRACE, "%s: set_cmd_validate failed\n", __func__);
return rc;
}
- rig_debug(RIG_DEBUG_TRACE, "%s: newcat_set_cmd_validate not implemented...continuing\n", __func__);
+
+ rig_debug(RIG_DEBUG_TRACE,
+ "%s: newcat_set_cmd_validate not implemented...continuing\n", __func__);
if (RIG_OK != (rc = write_block(&state->rigport, priv->cmd_str,
strlen(priv->cmd_str))))
@@ -9521,9 +9577,10 @@ int newcat_set_cmd(RIG *rig)
return RIG_OK;
}
- if (strncmp(priv->cmd_str,"BS",2)==0)
- { // the BS command needs time to do it's thing
- hl_usleep(200*1000);
+ if (strncmp(priv->cmd_str, "BS", 2) == 0)
+ {
+ // the BS command needs time to do it's thing
+ hl_usleep(200 * 1000);
priv->cache_start.tv_sec = 0; // invalidate the cache
}
@@ -9596,14 +9653,15 @@ int newcat_set_cmd(RIG *rig)
*/
if (priv->question_mark_response_means_rejected)
{
- rig_debug(RIG_DEBUG_ERR, "%s: Command rejected by the rig (set): '%s'\n", __func__,
+ rig_debug(RIG_DEBUG_ERR, "%s: Command rejected by the rig (set): '%s'\n",
+ __func__,
priv->cmd_str);
return -RIG_ERJCTED;
}
/* Rig busy wait please */
rig_debug(RIG_DEBUG_WARN, "%s: Rig busy - retrying: '%s'\n", __func__,
- priv->cmd_str);
+ priv->cmd_str);
/* read/flush the verify command reply which should still be there */
if ((rc = read_string(&state->rigport, priv->ret_data, sizeof(priv->ret_data),
diff --git a/src/misc.c b/src/misc.c
index bfe5d2ad..41ac1502 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -1636,6 +1636,7 @@ int HAMLIB_API parse_hoststr(char *hoststr, char host[256], char port[6])
// Handle device names 1st
if (strstr(hoststr, "/dev")) { return -1; }
+
if (strstr(hoststr, "/")) { return -1; } // posible path -- no hostname starts with /
if (strncasecmp(hoststr, "com", 3) == 0) { return -1; }
diff --git a/src/rig.c b/src/rig.c
index 06b29be1..edd87fd2 100644
--- a/src/rig.c
+++ b/src/rig.c
@@ -428,7 +428,8 @@ RIG *HAMLIB_API rig_init(rig_model_t rig_model)
// if we don't have list1 we'll try list2
if (rs->rx_range_list == NULL)
{
- rig_debug(RIG_DEBUG_TRACE, "%s: rx_range_list1 is empty, using rx_range_list2\n", __func__);
+ rig_debug(RIG_DEBUG_TRACE,
+ "%s: rx_range_list1 is empty, using rx_range_list2\n", __func__);
memcpy(rs->tx_range_list, caps->rx_range_list2,
sizeof(struct freq_range_list)*FRQRANGESIZ);
memcpy(rs->rx_range_list, caps->tx_range_list2,
commit 28c7ee7f88959eee3968958578790fe7818ee73f
Author: Michael Black W9MDB <mdb...@ya...>
Date: Fri Jan 15 16:36:07 2021 -0600
Add BS command for "other" VFO for Yaesu rigs
This should be redundant for rigs where the bandstack includes both VFOs
https://github.com/Hamlib/Hamlib/issues/510
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index 6e85d0d2..bc182efb 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -813,19 +813,34 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
if (RIG_OK != (err = newcat_set_cmd(rig)))
{
- rig_debug(RIG_DEBUG_ERR, "%s: Unexpected error with BS command=%s\n", __func__,
+ rig_debug(RIG_DEBUG_ERR, "%s: Unexpected error with BS command#1=%s\n", __func__,
rigerror(err));
}
else
{
+ // Also need to do this for the other VFO on some Yaesu rigs
+ // is redundant for rigs where band stack includes both vfos
+ vfo_t vfotmp;
+ err = rig_get_vfo(rig, &vfotmp);
+ if (err != RIG_OK) return err;
+ err = rig_set_vfo(rig, vfotmp==RIG_VFO_MAIN?RIG_VFO_SUB:RIG_VFO_MAIN);
+ if (err != RIG_OK) return err;
+ if (RIG_OK != (err = newcat_set_cmd(rig)))
+ {
+ rig_debug(RIG_DEBUG_ERR, "%s: Unexpected error with BS command#2=%s\n", __func__,
+ rigerror(err));
+ }
+ // switch back to the starting vfo
+ err = rig_set_vfo(rig, vfotmp==RIG_VFO_MAIN?RIG_VFO_MAIN:RIG_VFO_SUB);
+ if (err != RIG_OK) return err;
// after band select re-read things -- may not have to change anything
freq_t tmp_freqA, tmp_freqB;
rmode_t tmp_mode;
pbwidth_t tmp_width;
- rig_get_freq(rig, RIG_VFO_A, &tmp_freqA);
- rig_get_freq(rig, RIG_VFO_B, &tmp_freqB);
- rig_get_mode(rig, RIG_VFO_A, &tmp_mode, &tmp_width);
- rig_get_mode(rig, RIG_VFO_B, &tmp_mode, &tmp_width);
+ rig_get_freq(rig, RIG_VFO_MAIN, &tmp_freqA);
+ rig_get_freq(rig, RIG_VFO_SUB, &tmp_freqB);
+ rig_get_mode(rig, RIG_VFO_MAIN, &tmp_mode, &tmp_width);
+ rig_get_mode(rig, RIG_VFO_SUB, &tmp_mode, &tmp_width);
if ((target_vfo == 0 && tmp_freqA == freq)
|| (target_vfo == 1 && tmp_freqB == freq))
{
@@ -9415,6 +9430,10 @@ int newcat_set_cmd_validate(RIG *rig)
{
strcpy(valcmd,"AI;");
}
+ else if ((strncmp(priv->cmd_str,"VS",2)==0) && (strlen(priv->cmd_str)>3))
+ {
+ strcpy(valcmd,"VS;");
+ }
else
{
rig_debug(RIG_DEBUG_ERR, "%s: %s not implemented\n", __func__, priv->cmd_str);
-----------------------------------------------------------------------
Summary of changes:
rigs/dummy/flrig.c | 12 +--
rigs/icom/icom.c | 2 +-
rigs/kit/dwt.c | 2 +-
rigs/kit/elektor507.c | 2 +-
rigs/winradio/g303.c | 2 +-
rigs/yaesu/newcat.c | 201 ++++++++++++++++++++++++++++++++++----------------
src/misc.c | 1 +
src/rig.c | 3 +-
8 files changed, 152 insertions(+), 73 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-15 20:18:27
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via 1cd433b0d4d338bc2058b636b1d98d372d46fc02 (commit)
from fb026f7fafe5cda6f4dd9e8ac44591fe831e41c8 (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 1cd433b0d4d338bc2058b636b1d98d372d46fc02
Author: Michael Black W9MDB <mdb...@ya...>
Date: Fri Jan 15 14:17:35 2021 -0600
Increase newcat_set_cmd_validate retries to 8
https://github.com/Hamlib/Hamlib/issues/505
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index 16d6f433..6e85d0d2 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -9383,7 +9383,7 @@ int newcat_set_cmd_validate(RIG *rig)
struct rig_state *state = &rig->state;
struct newcat_priv_data *priv = (struct newcat_priv_data *)rig->state.priv;
char valcmd[16];
- int retries=5;
+ int retries=8;
int retry=0;
int sleepms = 50;
int rc = -RIG_EPROTO;
-----------------------------------------------------------------------
Summary of changes:
rigs/yaesu/newcat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-15 18:28:10
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via fb026f7fafe5cda6f4dd9e8ac44591fe831e41c8 (commit)
via c7a5ae3e347df4d5e1b9648854d6b1327784d0c8 (commit)
via c3ac828cdb5c98e13a64a1d9c8a0af38badb1a8a (commit)
from 59df7ccc23ce36b735fd118cf61b87a296028e20 (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 fb026f7fafe5cda6f4dd9e8ac44591fe831e41c8
Author: Michael Black W9MDB <mdb...@ya...>
Date: Fri Jan 15 12:27:04 2021 -0600
Remove BS from newcat_cmd_set_validate as there is no read capability
https://github.com/Hamlib/Hamlib/issues/505
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index 95ee5b5e..16d6f433 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -9411,10 +9411,6 @@ int newcat_set_cmd_validate(RIG *rig)
{
strcpy(valcmd,"FT;");
}
- else if ((strncmp(priv->cmd_str,"BS",2)==0) && (strlen(priv->cmd_str)>3))
- {
- strcpy(valcmd,"BS;");
- }
else if ((strncmp(priv->cmd_str,"AI",2)==0) && (strlen(priv->cmd_str)>3))
{
strcpy(valcmd,"AI;");
commit c7a5ae3e347df4d5e1b9648854d6b1327784d0c8
Author: Michael Black W9MDB <mdb...@ya...>
Date: Fri Jan 15 12:02:58 2021 -0600
Fix boo boo
https://github.com/Hamlib/Hamlib/issues/505
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index 7ae231fc..95ee5b5e 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -9429,7 +9429,7 @@ int newcat_set_cmd_validate(RIG *rig)
int bytes;
char cmd[256]; // big enough
rig_flush(&state->rigport); /* discard any unsolicited data */
- snprintf(cmd,sizeof(cmd),"%s%s",priv->cmd_str,priv->valcmd);
+ snprintf(cmd,sizeof(cmd),"%s%s",priv->cmd_str,valcmd);
rc = write_block(&state->rigport, cmd, strlen(cmd));
if (rc != RIG_OK) return -RIG_EIO;
bytes = read_string(&state->rigport, priv->ret_data, sizeof(priv->ret_data),
commit c3ac828cdb5c98e13a64a1d9c8a0af38badb1a8a
Author: Michael Black W9MDB <mdb...@ya...>
Date: Fri Jan 15 12:01:06 2021 -0600
Combine writes in newcat_set_cmd_validate to speed up timing
https://github.com/Hamlib/Hamlib/issues/505
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index d1f95695..7ae231fc 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -9427,10 +9427,10 @@ int newcat_set_cmd_validate(RIG *rig)
while (rc != RIG_OK && retry++ < retries)
{
int bytes;
+ char cmd[256]; // big enough
rig_flush(&state->rigport); /* discard any unsolicited data */
- rc = write_block(&state->rigport, priv->cmd_str, strlen(priv->cmd_str));
- if (rc != RIG_OK) return -RIG_EIO;
- rc = write_block(&state->rigport, valcmd, strlen(valcmd));
+ snprintf(cmd,sizeof(cmd),"%s%s",priv->cmd_str,priv->valcmd);
+ rc = write_block(&state->rigport, cmd, strlen(cmd));
if (rc != RIG_OK) return -RIG_EIO;
bytes = read_string(&state->rigport, priv->ret_data, sizeof(priv->ret_data),
&cat_term, sizeof(cat_term));
-----------------------------------------------------------------------
Summary of changes:
rigs/yaesu/newcat.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-15 17:51:07
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via 59df7ccc23ce36b735fd118cf61b87a296028e20 (commit)
from a2c43875431414beac4cfd99e569ee5d89df0c58 (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 59df7ccc23ce36b735fd118cf61b87a296028e20
Author: Michael Black W9MDB <mdb...@ya...>
Date: Fri Jan 15 11:44:50 2021 -0600
Fix newcat_set_cmd_validate TX command
https://github.com/Hamlib/Hamlib/issues/505
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index a357fbe1..d1f95695 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -9439,6 +9439,11 @@ int newcat_set_cmd_validate(RIG *rig)
// FT command does not echo what's sent so we just check the basic command
return RIG_OK;
}
+ if (strncmp(priv->cmd_str,"TX",2)==0 && strncmp(priv->ret_data,"TX",2)==0)
+ {
+ // TX command does not echo what's sent so we just check the basic command
+ return RIG_OK;
+ }
if (bytes > 0)
{
// if they match we are validated
-----------------------------------------------------------------------
Summary of changes:
rigs/yaesu/newcat.c | 5 +++++
1 file changed, 5 insertions(+)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-15 17:18:02
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via a2c43875431414beac4cfd99e569ee5d89df0c58 (commit)
from ad2c20f611ba1d2511d021edddef67d9b9ed7480 (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 a2c43875431414beac4cfd99e569ee5d89df0c58
Author: Michael Black W9MDB <mdb...@ya...>
Date: Fri Jan 15 11:17:23 2021 -0600
Fit newcat_set_command_validate FT comparison
https://github.com/Hamlib/Hamlib/issues/505
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index 990de8ef..a357fbe1 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -9434,6 +9434,11 @@ int newcat_set_cmd_validate(RIG *rig)
if (rc != RIG_OK) return -RIG_EIO;
bytes = read_string(&state->rigport, priv->ret_data, sizeof(priv->ret_data),
&cat_term, sizeof(cat_term));
+ if (strncmp(priv->cmd_str,"FT",2)==0 && strncmp(priv->ret_data,"FT",2)==0)
+ {
+ // FT command does not echo what's sent so we just check the basic command
+ return RIG_OK;
+ }
if (bytes > 0)
{
// if they match we are validated
-----------------------------------------------------------------------
Summary of changes:
rigs/yaesu/newcat.c | 5 +++++
1 file changed, 5 insertions(+)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-15 16:59:28
|
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 ad2c20f611ba1d2511d021edddef67d9b9ed7480 (commit)
via ea9a70674366640b42a3d0949251f3606e88d15c (commit)
from 517fb87b8bded5478510bc903e52347715503591 (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 ad2c20f611ba1d2511d021edddef67d9b9ed7480
Author: Michael Black W9MDB <mdb...@ya...>
Date: Fri Jan 15 10:58:47 2021 -0600
Fix newcat_set_cmd_validate read_string check
https://github.com/Hamlib/Hamlib/issues/505
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index 893ba768..990de8ef 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -9426,14 +9426,15 @@ int newcat_set_cmd_validate(RIG *rig)
}
while (rc != RIG_OK && retry++ < retries)
{
+ int bytes;
rig_flush(&state->rigport); /* discard any unsolicited data */
rc = write_block(&state->rigport, priv->cmd_str, strlen(priv->cmd_str));
if (rc != RIG_OK) return -RIG_EIO;
rc = write_block(&state->rigport, valcmd, strlen(valcmd));
if (rc != RIG_OK) return -RIG_EIO;
- rc = read_string(&state->rigport, priv->ret_data, sizeof(priv->ret_data),
+ bytes = read_string(&state->rigport, priv->ret_data, sizeof(priv->ret_data),
&cat_term, sizeof(cat_term));
- if (rc == RIG_OK)
+ if (bytes > 0)
{
// if they match we are validated
if (strcmp(priv->cmd_str, priv->ret_data)==0) return RIG_OK;
commit ea9a70674366640b42a3d0949251f3606e88d15c
Author: Michael Black W9MDB <mdb...@ya...>
Date: Fri Jan 15 10:56:27 2021 -0600
Add debug for newcat_set_cmd_validate
https://github.com/Hamlib/Hamlib/issues/505
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index b1336f6e..893ba768 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -9439,9 +9439,9 @@ int newcat_set_cmd_validate(RIG *rig)
if (strcmp(priv->cmd_str, priv->ret_data)==0) return RIG_OK;
else rc = -RIG_EPROTO;
}
- rig_debug(RIG_DEBUG_ERR, "%s: cmd validation failed, try#%d\n", __func__, retry);
+ rig_debug(RIG_DEBUG_ERR, "%s: cmd validation failed, '%s'!='%s', try#%d\n", __func__, priv->cmd_str, priv->ret_data, retry);
hl_usleep(sleepms*1000);
- } while(--retry > 0);
+ }
return -RIG_EPROTO;
}
/*
diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h
index 3ad84a0d..3033e920 100644
--- a/rigs/yaesu/newcat.h
+++ b/rigs/yaesu/newcat.h
@@ -50,7 +50,7 @@
typedef char ncboolean;
/* shared function version */
-#define NEWCAT_VER "20210114"
+#define NEWCAT_VER "20210115"
/* Hopefully large enough for future use, 128 chars plus '\0' */
#define NEWCAT_DATA_LEN 129
-----------------------------------------------------------------------
Summary of changes:
rigs/yaesu/newcat.c | 9 +++++----
rigs/yaesu/newcat.h | 2 +-
2 files changed, 6 insertions(+), 5 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-14 23:26:22
|
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 517fb87b8bded5478510bc903e52347715503591 (commit)
from 6f4ce3a7878cf5d2416a1b0f63e329433c6987e3 (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 517fb87b8bded5478510bc903e52347715503591
Author: Michael Black W9MDB <mdb...@ya...>
Date: Thu Jan 14 17:25:39 2021 -0600
Fix MD command in newcat_set_cmd_validate
https://github.com/Hamlib/Hamlib/issues/505
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index 8cb7072e..b1336f6e 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -9382,7 +9382,7 @@ int newcat_set_cmd_validate(RIG *rig)
{
struct rig_state *state = &rig->state;
struct newcat_priv_data *priv = (struct newcat_priv_data *)rig->state.priv;
- char *valcmd;
+ char valcmd[16];
int retries=5;
int retry=0;
int sleepms = 50;
@@ -9391,31 +9391,33 @@ int newcat_set_cmd_validate(RIG *rig)
rig_debug(RIG_DEBUG_TRACE, "%s: priv->cmd_str=%s\n", __func__, priv->cmd_str);
if ((strncmp(priv->cmd_str,"FA",2)==0) && (strlen(priv->cmd_str)>3))
{
- valcmd = "FA;";
+ strcpy(valcmd,"FA;");
}
else if ((strncmp(priv->cmd_str,"FB",2)==0) && (strlen(priv->cmd_str)>3))
{
- valcmd = "FB;";
+ strcpy(valcmd,"FB;");
}
else if ((strncmp(priv->cmd_str,"MD",2)==0) && (strlen(priv->cmd_str)>3))
{
- valcmd = "MD;";
+ strcpy(valcmd,priv->cmd_str); // pull the needed part of the cmd
+ valcmd[3]=';';
+ valcmd[4]=0;
}
else if ((strncmp(priv->cmd_str,"TX",2)==0) && (strlen(priv->cmd_str)>3))
{
- valcmd = "TX;";
+ strcpy(valcmd,"TX;");
}
else if ((strncmp(priv->cmd_str,"FT",2)==0) && (strlen(priv->cmd_str)>3))
{
- valcmd = "FT;";
+ strcpy(valcmd,"FT;");
}
else if ((strncmp(priv->cmd_str,"BS",2)==0) && (strlen(priv->cmd_str)>3))
{
- valcmd = "BS;";
+ strcpy(valcmd,"BS;");
}
else if ((strncmp(priv->cmd_str,"AI",2)==0) && (strlen(priv->cmd_str)>3))
{
- valcmd = "AI;";
+ strcpy(valcmd,"AI;");
}
else
{
-----------------------------------------------------------------------
Summary of changes:
rigs/yaesu/newcat.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-14 22:56:09
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via 6f4ce3a7878cf5d2416a1b0f63e329433c6987e3 (commit)
from 6779d04581b8c6dba61e6097c936c8c1ea471fd3 (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 6f4ce3a7878cf5d2416a1b0f63e329433c6987e3
Author: Michael Black W9MDB <mdb...@ya...>
Date: Thu Jan 14 16:55:12 2021 -0600
Have EPROTO return when newcat_set_cmd_validate fails that way
ENIMPL will fall through
https://github.com/Hamlib/Hamlib/issues/505
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index e8765a44..8cb7072e 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -9469,11 +9469,17 @@ int newcat_set_cmd(RIG *rig)
/* send the command */
rig_debug(RIG_DEBUG_TRACE, "cmd_str = %s\n", priv->cmd_str);
- if (newcat_set_cmd_validate(rig)==RIG_OK) {
+ rc = newcat_set_cmd_validate(rig);
+ if (rc==RIG_OK) {
rig_debug(RIG_DEBUG_TRACE, "%s: cmd_validate OK\n", __func__);
return RIG_OK;
}
- rig_debug(RIG_DEBUG_TRACE, "%s: cmd_validate not OK...continuing\n", __func__);
+ else if (rc == -RIG_EPROTO)
+ {
+ rig_debug(RIG_DEBUG_TRACE, "%s: set_cmd_validate failed\n", __func__);
+ return rc;
+ }
+ rig_debug(RIG_DEBUG_TRACE, "%s: newcat_set_cmd_validate not implemented...continuing\n", __func__);
if (RIG_OK != (rc = write_block(&state->rigport, priv->cmd_str,
strlen(priv->cmd_str))))
-----------------------------------------------------------------------
Summary of changes:
rigs/yaesu/newcat.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-14 22:39: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 6779d04581b8c6dba61e6097c936c8c1ea471fd3 (commit)
via 30c2d34d87076d2d3ad85da45df95ef4d7397155 (commit)
from 32d5f2b49e69ad00e91acd6f0f3030f9923f3878 (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 6779d04581b8c6dba61e6097c936c8c1ea471fd3
Author: Michael Black W9MDB <mdb...@ya...>
Date: Thu Jan 14 16:38:31 2021 -0600
Add rig_flush to newcat_set_cmd_validate
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index 78e3cde3..e8765a44 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -9424,6 +9424,7 @@ int newcat_set_cmd_validate(RIG *rig)
}
while (rc != RIG_OK && retry++ < retries)
{
+ rig_flush(&state->rigport); /* discard any unsolicited data */
rc = write_block(&state->rigport, priv->cmd_str, strlen(priv->cmd_str));
if (rc != RIG_OK) return -RIG_EIO;
rc = write_block(&state->rigport, valcmd, strlen(valcmd));
commit 30c2d34d87076d2d3ad85da45df95ef4d7397155
Author: Michael Black W9MDB <mdb...@ya...>
Date: Thu Jan 14 16:32:55 2021 -0600
Implemented new Yaesu retry mechanism using command validation technique
Cmds that are implemented are verified and 5 tries are made if answer != request
https://github.com/Hamlib/Hamlib/issues/505
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index b7fe8f39..78e3cde3 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -9374,6 +9374,73 @@ int newcat_get_cmd(RIG *rig)
return rc;
}
+/*
+ * This tries to set and read to validate the set command actually worked
+ * returns RIG_OK if set, -RIG_EIMPL if not implemented yet, or -RIG_EPROTO if unsuccesful
+ */
+int newcat_set_cmd_validate(RIG *rig)
+{
+ struct rig_state *state = &rig->state;
+ struct newcat_priv_data *priv = (struct newcat_priv_data *)rig->state.priv;
+ char *valcmd;
+ int retries=5;
+ int retry=0;
+ int sleepms = 50;
+ int rc = -RIG_EPROTO;
+
+ rig_debug(RIG_DEBUG_TRACE, "%s: priv->cmd_str=%s\n", __func__, priv->cmd_str);
+ if ((strncmp(priv->cmd_str,"FA",2)==0) && (strlen(priv->cmd_str)>3))
+ {
+ valcmd = "FA;";
+ }
+ else if ((strncmp(priv->cmd_str,"FB",2)==0) && (strlen(priv->cmd_str)>3))
+ {
+ valcmd = "FB;";
+ }
+ else if ((strncmp(priv->cmd_str,"MD",2)==0) && (strlen(priv->cmd_str)>3))
+ {
+ valcmd = "MD;";
+ }
+ else if ((strncmp(priv->cmd_str,"TX",2)==0) && (strlen(priv->cmd_str)>3))
+ {
+ valcmd = "TX;";
+ }
+ else if ((strncmp(priv->cmd_str,"FT",2)==0) && (strlen(priv->cmd_str)>3))
+ {
+ valcmd = "FT;";
+ }
+ else if ((strncmp(priv->cmd_str,"BS",2)==0) && (strlen(priv->cmd_str)>3))
+ {
+ valcmd = "BS;";
+ }
+ else if ((strncmp(priv->cmd_str,"AI",2)==0) && (strlen(priv->cmd_str)>3))
+ {
+ valcmd = "AI;";
+ }
+ else
+ {
+ rig_debug(RIG_DEBUG_ERR, "%s: %s not implemented\n", __func__, priv->cmd_str);
+ return -RIG_ENIMPL;
+ }
+ while (rc != RIG_OK && retry++ < retries)
+ {
+ rc = write_block(&state->rigport, priv->cmd_str, strlen(priv->cmd_str));
+ if (rc != RIG_OK) return -RIG_EIO;
+ rc = write_block(&state->rigport, valcmd, strlen(valcmd));
+ if (rc != RIG_OK) return -RIG_EIO;
+ rc = read_string(&state->rigport, priv->ret_data, sizeof(priv->ret_data),
+ &cat_term, sizeof(cat_term));
+ if (rc == RIG_OK)
+ {
+ // if they match we are validated
+ if (strcmp(priv->cmd_str, priv->ret_data)==0) return RIG_OK;
+ else rc = -RIG_EPROTO;
+ }
+ rig_debug(RIG_DEBUG_ERR, "%s: cmd validation failed, try#%d\n", __func__, retry);
+ hl_usleep(sleepms*1000);
+ } while(--retry > 0);
+ return -RIG_EPROTO;
+}
/*
* Writes a null terminated command string from priv->cmd_str to the
* CAT port that is not expected to have a response.
@@ -9401,6 +9468,12 @@ int newcat_set_cmd(RIG *rig)
/* send the command */
rig_debug(RIG_DEBUG_TRACE, "cmd_str = %s\n", priv->cmd_str);
+ if (newcat_set_cmd_validate(rig)==RIG_OK) {
+ rig_debug(RIG_DEBUG_TRACE, "%s: cmd_validate OK\n", __func__);
+ return RIG_OK;
+ }
+ rig_debug(RIG_DEBUG_TRACE, "%s: cmd_validate not OK...continuing\n", __func__);
+
if (RIG_OK != (rc = write_block(&state->rigport, priv->cmd_str,
strlen(priv->cmd_str))))
{
diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h
index 452cb283..3ad84a0d 100644
--- a/rigs/yaesu/newcat.h
+++ b/rigs/yaesu/newcat.h
@@ -50,7 +50,7 @@
typedef char ncboolean;
/* shared function version */
-#define NEWCAT_VER "20210113"
+#define NEWCAT_VER "20210114"
/* Hopefully large enough for future use, 128 chars plus '\0' */
#define NEWCAT_DATA_LEN 129
-----------------------------------------------------------------------
Summary of changes:
rigs/yaesu/newcat.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++
rigs/yaesu/newcat.h | 2 +-
2 files changed, 75 insertions(+), 1 deletion(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-13 21:39:28
|
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 32d5f2b49e69ad00e91acd6f0f3030f9923f3878 (commit)
via 65d45a07be19e4db6c2bc21f29ff412c03719ca9 (commit)
from 8024ffb93731de1b658cc156e8ce158e0341efea (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 32d5f2b49e69ad00e91acd6f0f3030f9923f3878
Author: Michael Black W9MDB <mdb...@ya...>
Date: Wed Jan 13 15:38:20 2021 -0600
In newcat.c give the BS command 200ms to do it's thing
Allow BS command when in split mode
We now re-read freq/mode after BS and just return if frequency is already set correctly
https://github.com/Hamlib/Hamlib/issues/505
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index d4ce36e8..b7fe8f39 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -801,13 +801,13 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
//
// Restore band memory if we can and band is changing -- we do it before we set the frequency
- // And only when not in split mode
+ // And only when not in split mode (note this check has been removed for testing)
if (newcat_valid_command(rig, "BS")
&& newcat_band_index(freq) != newcat_band_index(rig->state.current_freq)
- && !rig->state.cache.split
+ // remove the split check here -- hopefully works OK
+ //&& !rig->state.cache.split
&& !is_ft891) // 891 does not remember bandwidth so don't do this
{
- hl_usleep(200*1000); // seems we need some time before doing band select 200ms enough?
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "BS%02d%c",
newcat_band_index(freq), cat_term);
@@ -816,6 +816,23 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
rig_debug(RIG_DEBUG_ERR, "%s: Unexpected error with BS command=%s\n", __func__,
rigerror(err));
}
+ else
+ {
+ // after band select re-read things -- may not have to change anything
+ freq_t tmp_freqA, tmp_freqB;
+ rmode_t tmp_mode;
+ pbwidth_t tmp_width;
+ rig_get_freq(rig, RIG_VFO_A, &tmp_freqA);
+ rig_get_freq(rig, RIG_VFO_B, &tmp_freqB);
+ rig_get_mode(rig, RIG_VFO_A, &tmp_mode, &tmp_width);
+ rig_get_mode(rig, RIG_VFO_B, &tmp_mode, &tmp_width);
+ if ((target_vfo == 0 && tmp_freqA == freq)
+ || (target_vfo == 1 && tmp_freqB == freq))
+ {
+ rig_debug(RIG_DEBUG_VERBOSE, "%s: freq after band select already set to %"PRIfreq"\n", __func__, freq);
+ return RIG_OK; // we're done then!!
+ }
+ }
// just drop through
}
@@ -9396,7 +9413,12 @@ int newcat_set_cmd(RIG *rig)
return RIG_OK;
}
- hl_usleep(11*1000); // some Yaeus rigs have 10ms timeout -- does this fix the ?; reponse problem?
+ if (strncmp(priv->cmd_str,"BS",2)==0)
+ { // the BS command needs time to do it's thing
+ hl_usleep(200*1000);
+ priv->cache_start.tv_sec = 0; // invalidate the cache
+ }
+
/* send the verification command */
rig_debug(RIG_DEBUG_TRACE, "cmd_str = %s\n", verify_cmd);
commit 65d45a07be19e4db6c2bc21f29ff412c03719ca9
Author: Michael Black W9MDB <mdb...@ya...>
Date: Wed Jan 13 15:08:40 2021 -0600
Add cmd list to prm80.c
diff --git a/rigs/prm80/prm80.c b/rigs/prm80/prm80.c
index 580f8a3f..63f720fd 100644
--- a/rigs/prm80/prm80.c
+++ b/rigs/prm80/prm80.c
@@ -45,6 +45,75 @@
#define BUFSZ 64
+/* V3 commands
+ * retrieved from https://sourceforge.net/projects/prm80/
+MessageVersion: DB "PRM8060 V3.0", 0
+
+MessageAide: DB "H",0Dh,0Ah
+ DB " Commandes disponibles :",0Dh,0Ah
+ DB " [0] = Reset.",0Dh,0Ah
+ DB " [1] a [5] = Show 80c552 port state P1 to P5.",0Dh,0Ah
+ DB " [A] = Set serial communication to 1200 bps.",0Dh,0Ah
+ DB " [B] = Set serial communication to 4800 bps.",0Dh,0Ah
+ DB " [C] = Print channels list.",0Dh,0Ah
+ DB " [D] = Set system byte.",0Dh,0Ah
+ DB " [E] = Show system state (Mode-Chan-Chanstate-Sql-Vol-Lock-RX freq-TX freq).",0Dh,0Ah
+ DB " [F] = Set squelch.",0Dh,0Ah
+ DB " [H] = Print this help page.",0Dh,0Ah
+ DB " [I] = Erase and init RAM and EEPROM.",0Dh,0Ah
+ DB " [K] = Set lock byte.",0Dh,0Ah
+ DB " [L] = Print latch state.",0Dh,0Ah
+ DB " [M] = Edit external RAM manualy.",0Dh,0Ah
+ DB " [N] = Set current channel.",0Dh,0Ah
+ DB " [O] = Set volume.",0Dh,0Ah
+ DB " [P] = Edit/Add channel.",0Dh,0Ah
+ DB " [Q] = Set channels number.",0Dh,0Ah
+ DB " [R] = Set synthetiser frequencies.",0Dh,0Ah
+ DB " [U] = Print 80c552 internal RAM.",0Dh,0Ah
+ DB " [S] = Copy EEPROM to external RAM.",0Dh,0Ah
+ DB " [T] = Set current channel state.",0Dh,0Ah
+ DB " [V] = Print firmware version.",0Dh,0Ah
+ DB " [X] = Copy external RAM to EEPROM.",0Dh,0Ah
+ DB " [Y] = Print first 2 kb from the EEPROM I2C 24c16.",0Dh,0Ah
+ DB " [Z] = Print external RAM ($0000 to $07FF).",0Dh,0Ah,0
+*/
+
+/* V4 commands
+ * retrieved from https://sourceforge.net/projects/prm80/
+ *
+MessageVersion:
+IF TARGET EQ 8060
+ DB "PRM8060 V4.0"
+ELSEIF TARGET EQ 8070
+ DB "PRM8070 V4.0"
+ENDIF
+
+MessageAide: DB "H",0Dh,0Ah
+ DB " Commandes disponibles :",0Dh,0Ah
+ DB " [0] = Reset.",0Dh,0Ah
+ DB " [1] a [5] = Show 80c552 port state P1 to P5.",0Dh,0Ah
+ DB " [C] = Print channels list.",0Dh,0Ah
+ DB " [D] = Set system byte.",0Dh,0Ah
+ DB " [E] = Show system state (Mode-Chan-Chanstate-Sql-Vol-Lock-RX freq-TX freq).",0Dh,0Ah
+ DB " [F] = Set squelch.",0Dh,0Ah
+ DB " [H] = Print this help page.",0Dh,0Ah
+ DB " [I] = Erase and init RAM and EEPROM.",0Dh,0Ah
+ DB " [K] = Set lock byte.",0Dh,0Ah
+ DB " [L] = Print latch state.",0Dh,0Ah
+ DB " [M] = Edit external RAM manualy.",0Dh,0Ah
+ DB " [N] = Set current channel.",0Dh,0Ah
+ DB " [O] = Set volume.",0Dh,0Ah
+ DB " [P] = Edit/Add channel.",0Dh,0Ah
+ DB " [Q] = Set channels number.",0Dh,0Ah
+ DB " [R] = Set synthetiser frequencies.",0Dh,0Ah
+ DB " [U] = Print 80c552 internal RAM.",0Dh,0Ah
+ DB " [S] = Copy EEPROM to external RAM.",0Dh,0Ah
+ DB " [T] = Set current channel state.",0Dh,0Ah
+ DB " [V] = Print firmware version.",0Dh,0Ah
+ DB " [X] = Copy external RAM to EEPROM.",0Dh,0Ah
+ DB " [Y] = Print first 2 kb from the EEPROM I2C 24c16.",0Dh,0Ah
+ DB " [Z] = Print external RAM ($0000 to $07FF).",0Dh,0Ah,0
+*/
/*
[0] = Reset.
[C] = Print channels list.
-----------------------------------------------------------------------
Summary of changes:
rigs/prm80/prm80.c | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++
rigs/yaesu/newcat.c | 30 +++++++++++++++++++----
2 files changed, 95 insertions(+), 4 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-13 18:42:57
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via 8024ffb93731de1b658cc156e8ce158e0341efea (commit)
from b5de94da2abcf2ba4edf4ced94f1531f6b416e13 (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 8024ffb93731de1b658cc156e8ce158e0341efea
Author: Michael Black W9MDB <mdb...@ya...>
Date: Wed Jan 13 12:42:03 2021 -0600
Change icom_get_usb_echo_off to return TIMEOUT when it occurs instead of RIG_OK
https://github.com/Hamlib/Hamlib/issues/509
diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c
index f50429b7..d11f7087 100644
--- a/rigs/icom/icom.c
+++ b/rigs/icom/icom.c
@@ -715,6 +715,8 @@ int icom_get_usb_echo_off(RIG *rig)
rig_debug(RIG_DEBUG_VERBOSE, "%s: ack_len=%d\n", __func__, ack_len);
+ if (retval == -RIG_ETIMEOUT) return retval;
+
if (retval == RIG_OK)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s: USB echo on detected\n",
diff --git a/rigs/icom/icom.h b/rigs/icom/icom.h
index 413d2c98..7d28b6e6 100644
--- a/rigs/icom/icom.h
+++ b/rigs/icom/icom.h
@@ -30,7 +30,7 @@
#include <sys/time.h>
#endif
-#define BACKEND_VER "20210107"
+#define BACKEND_VER "20210113"
/*
* defines used by comp_cal_str in rig.c
-----------------------------------------------------------------------
Summary of changes:
rigs/icom/icom.c | 2 ++
rigs/icom/icom.h | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-13 15:42:48
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via b5de94da2abcf2ba4edf4ced94f1531f6b416e13 (commit)
from b4627b75ba065d22c85fa71d045486702be1e199 (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 b5de94da2abcf2ba4edf4ced94f1531f6b416e13
Author: Michael Black W9MDB <mdb...@ya...>
Date: Wed Jan 13 09:40:20 2021 -0600
Try adding an 11ms delay on set commands before the ID; is sent
FT2000 is seeing repeated ?; responses and timing may be important
https://github.com/Hamlib/Hamlib/issues/505
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index 245dcab9..d4ce36e8 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -9396,6 +9396,7 @@ int newcat_set_cmd(RIG *rig)
return RIG_OK;
}
+ hl_usleep(11*1000); // some Yaeus rigs have 10ms timeout -- does this fix the ?; reponse problem?
/* send the verification command */
rig_debug(RIG_DEBUG_TRACE, "cmd_str = %s\n", verify_cmd);
-----------------------------------------------------------------------
Summary of changes:
rigs/yaesu/newcat.c | 1 +
1 file changed, 1 insertion(+)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-13 14:51:48
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via b4627b75ba065d22c85fa71d045486702be1e199 (commit)
via 4e9791d8b9cf561ea4faa7b70864614dc15b34c9 (commit)
via 00a7f2c749396160b289d6250ffe898336e89040 (commit)
from a9a806f8e02d859a3778728247dc87ebaa81a133 (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 b4627b75ba065d22c85fa71d045486702be1e199
Author: Michael Black W9MDB <mdb...@ya...>
Date: Wed Jan 13 08:48:48 2021 -0600
Fix newcat.c retry when read command returns ?;
https://github.com/Hamlib/Hamlib/issues/505
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index 2b733653..245dcab9 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -539,6 +539,29 @@ int newcat_open(RIG *rig)
(void)newcat_get_rigid(rig);
rig_debug(RIG_DEBUG_VERBOSE, "%s: rig_id=%d\n", __func__, priv->rig_id);
+#if 0 // possible future enhancement?
+ // some rigs have a CAT TOT timeout that defaults to 10ms
+ // so we'll increase CAT timeout to 100ms
+ if (priv->rig_id == NC_RIGID_FT2000
+ || priv->rig_id == NC_RIGID_FT2000D
+ || priv->rig_id == NC_RIGID_FT891
+ || priv->rig_id == NC_RIGID_FT991
+ || priv->rig_id == NC_RIGID_FT950)
+ {
+ int err;
+ char *cmd = "EX0291%c";
+ if (priv->rig_id == NC_RIGID_FT950) cmd = "EX0271%c";
+ else if (priv->rig_id == NC_RIGID_FT891) cmd = "EX05071c";
+ else if (priv->rig_id == NC_RIGID_FT991) cmd = "EX0321c";
+ snprintf(priv->cmd_str, sizeof(priv->cmd_str), cmd, cat_term);
+
+ if (RIG_OK != (err = newcat_set_cmd(rig)))
+ {
+ return err;
+ }
+ }
+#endif
+
rig_debug(RIG_DEBUG_VERBOSE, "%s: returning RIG_OK\n", __func__);
return RIG_OK;
}
@@ -784,6 +807,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
&& !rig->state.cache.split
&& !is_ft891) // 891 does not remember bandwidth so don't do this
{
+ hl_usleep(200*1000); // seems we need some time before doing band select 200ms enough?
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "BS%02d%c",
newcat_band_index(freq), cat_term);
@@ -883,6 +907,7 @@ int newcat_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
break;
default:
+ rig_debug(RIG_DEBUG_ERR, "%s: unsupported vfo=%s\n", __func__, rig_strvfo(vfo));
return -RIG_EINVAL; /* sorry, unsupported VFO */
}
@@ -9201,9 +9226,9 @@ int newcat_get_cmd(RIG *rig)
while (rc != RIG_OK && retry_count++ <= state->rigport.retry)
{
+ rig_flush(&state->rigport); /* discard any unsolicited data */
if (rc != -RIG_BUSBUSY)
{
- rig_flush(&state->rigport); /* discard any unsolicited data */
/* send the command */
rig_debug(RIG_DEBUG_TRACE, "cmd_str = %s\n", priv->cmd_str);
@@ -9294,8 +9319,8 @@ int newcat_get_cmd(RIG *rig)
return -RIG_ERJCTED;
}
- rig_debug(RIG_DEBUG_WARN, "%s: Rig busy - retrying: '%s'\n", __func__,
- priv->cmd_str);
+ rig_debug(RIG_DEBUG_WARN, "%s: Rig busy - retrying %d of %d: '%s'\n", __func__,
+ retry_count, state->rigport.retry, priv->cmd_str);
rc = -RIG_ERJCTED; /* retry */
break;
@@ -9449,17 +9474,12 @@ int newcat_set_cmd(RIG *rig)
rig_debug(RIG_DEBUG_WARN, "%s: Rig busy - retrying: '%s'\n", __func__,
priv->cmd_str);
- /* read the verify command reply */
+ /* read/flush the verify command reply which should still be there */
if ((rc = read_string(&state->rigport, priv->ret_data, sizeof(priv->ret_data),
&cat_term, sizeof(cat_term))) > 0)
{
rig_debug(RIG_DEBUG_TRACE, "%s: read count = %d, ret_data = %s\n",
__func__, rc, priv->ret_data);
- rc = RIG_OK; /* probably recovered and read verification */
- }
- else
- {
- /* probably a timeout */
rc = -RIG_BUSBUSY; /* retry */
}
diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h
index 7c8918da..452cb283 100644
--- a/rigs/yaesu/newcat.h
+++ b/rigs/yaesu/newcat.h
@@ -50,7 +50,7 @@
typedef char ncboolean;
/* shared function version */
-#define NEWCAT_VER "20210112"
+#define NEWCAT_VER "20210113"
/* Hopefully large enough for future use, 128 chars plus '\0' */
#define NEWCAT_DATA_LEN 129
commit 4e9791d8b9cf561ea4faa7b70864614dc15b34c9
Author: Michael Black W9MDB <mdb...@ya...>
Date: Tue Jan 12 23:03:54 2021 -0600
Update flrig version
diff --git a/rigs/dummy/flrig.h b/rigs/dummy/flrig.h
index dd0ecc19..4c6633b3 100644
--- a/rigs/dummy/flrig.h
+++ b/rigs/dummy/flrig.h
@@ -28,7 +28,7 @@
#include <sys/time.h>
#endif
-#define BACKEND_VER "20201231"
+#define BACKEND_VER "20210112"
#define EOM "\r"
#define TRUE 1
commit 00a7f2c749396160b289d6250ffe898336e89040
Author: Michael Black W9MDB <mdb...@ya...>
Date: Tue Jan 12 23:03:20 2021 -0600
Fix flrig set_micgain to use i4 format
diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c
index dacd414c..46eea2de 100644
--- a/rigs/dummy/flrig.c
+++ b/rigs/dummy/flrig.c
@@ -58,7 +58,7 @@
RIG_MODE_FM | RIG_MODE_WFM | RIG_MODE_FMN | RIG_MODE_PKTFM |\
RIG_MODE_C4FM)
-#define FLRIG_LEVELS (RIG_LEVEL_AF | RIG_LEVEL_RF | RIG_LEVEL_MICGAIN | RIG_LEVEL_STRENGTH | RIG_LEVEL_RFPOWER_METER | RIG_LEVEL_RFPOWER_METER_WATTS)
+#define FLRIG_LEVELS (RIG_LEVEL_AF | RIG_LEVEL_RF | RIG_LEVEL_MICGAIN | RIG_LEVEL_STRENGTH | RIG_LEVEL_RFPOWER_METER | RIG_LEVEL_RFPOWER_METER_WATTS | RIG_LEVEL_RFPOWER)
#define streq(s1,s2) (strcmp(s1,s2)==0)
@@ -1883,6 +1883,7 @@ static int flrig_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
int retval;
char cmd_arg[MAXARGLEN];
char *cmd;
+ char *param_type="i4";
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s level=%d, val=%f\n", __func__,
rig_strvfo(vfo), (int)level, val.f);
@@ -1894,23 +1895,26 @@ static int flrig_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
return -RIG_EINVAL;
}
- sprintf(cmd_arg,
- "<params><param><value><double>%d</double></value></param></params>",
- (int)val.f);
-
switch (level)
{
- case RIG_LEVEL_RF: cmd = "rig.set_rfgain"; break;
+ case RIG_LEVEL_RF: cmd = "rig.set_rfgain"; val.f*= 100; break;
+
+ case RIG_LEVEL_AF: cmd = "rig.set_volume"; val.f*= 100; break;
- case RIG_LEVEL_AF: cmd = "rig.set_volume"; break;
+ case RIG_LEVEL_MICGAIN: cmd = "rig.set_micgain"; val.f*= 100; break;
- case RIG_LEVEL_MICGAIN: cmd = "rig.set_micgain"; break;
+ case RIG_LEVEL_RFPOWER: cmd = "rig.set_power"; val.f*= 100; break;
default:
rig_debug(RIG_DEBUG_ERR, "%s: invalid level=%d\n", __func__, (int)level);
return -RIG_EINVAL;
}
+ sprintf(cmd_arg,
+ "<params><param><value><%s>%d</%s></value></param></params>",
+ param_type, (int)val.f, param_type);
+
+
retval = flrig_transaction(rig, cmd, cmd_arg, NULL, 0);
if (retval < 0)
@@ -1945,6 +1949,8 @@ static int flrig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
case RIG_LEVEL_MICGAIN: cmd = "rig.get_micgain"; break;
case RIG_LEVEL_STRENGTH: cmd = "rig.get_smeter"; break;
+
+ case RIG_LEVEL_RFPOWER: cmd = "rig.get_power"; break;
case RIG_LEVEL_RFPOWER_METER_WATTS:
case RIG_LEVEL_RFPOWER_METER: cmd = "rig.get_pwrmeter"; break;
@@ -1972,6 +1978,11 @@ static int flrig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
rig_debug(RIG_DEBUG_TRACE, "%s: val.i='%s'(%d)\n", __func__, value, val->i);
break;
+ case RIG_LEVEL_RFPOWER:
+ val->f = atof(value) / 100.0 * priv->powermeter_scale;
+ rig_debug(RIG_DEBUG_TRACE, "%s: val.f='%s'(%g)\n", __func__, value, val->f);
+ break;
+
case RIG_LEVEL_RFPOWER_METER:
val->f = atof(value) / 100.0 * priv->powermeter_scale;
rig_debug(RIG_DEBUG_TRACE, "%s: val.f='%s'(%g)\n", __func__, value, val->f);
-----------------------------------------------------------------------
Summary of changes:
rigs/dummy/flrig.c | 27 +++++++++++++++++++--------
rigs/dummy/flrig.h | 2 +-
rigs/yaesu/newcat.c | 38 +++++++++++++++++++++++++++++---------
rigs/yaesu/newcat.h | 2 +-
4 files changed, 50 insertions(+), 19 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-12 22:27: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 a9a806f8e02d859a3778728247dc87ebaa81a133 (commit)
via c46ac9b47422cac41f7c918a8b0ae1dda1b2c067 (commit)
via 49128645b11bec3cda0d55bca67ca272e5db7287 (commit)
via 7be0af03628373a4bfb792f330f64d189305f82b (commit)
via 5e00a54ca06d40f57905ed1c212d58da3c9f4835 (commit)
via 23e94a5375a1063f4599aec31a28b2f90c4fb6ef (commit)
via 2c224a9ca119c0ec12ef87fe45a3b776ab0212a2 (commit)
via 3af9f06fa5dacfd6ca39ac4adc4705acc1ae3a87 (commit)
via cce1db9ee1300464285517d3bf51d2071f9066c9 (commit)
via c1a0e15464e96fd35a4a740c1970b1dc613a43ff (commit)
via dd4076355d7b864b102d270476aa77c06cd86618 (commit)
from 935b520b441fc9a33b38a126ac633d623c2dbada (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 a9a806f8e02d859a3778728247dc87ebaa81a133
Merge: 2c224a9c c46ac9b4
Author: Michael Black <mdb...@ya...>
Date: Tue Jan 12 16:22:21 2021 -0600
Merge pull request #507 from mikaelnousiainen/fix-yaesu-newcat-retries
Re-enable Yaesu question mark handling and fix newcat_get_cmd retries in case of question mark response (2nd attempt)
commit c46ac9b47422cac41f7c918a8b0ae1dda1b2c067
Author: Mikael Nousiainen <mik...@ik...>
Date: Wed Jan 13 00:10:52 2021 +0200
Get MICGAIN is also rejected in RTTY modes by certain Yaesu newcat rigs
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index 35375347..b3dad6ca 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -4090,14 +4090,32 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "KS%c", cat_term);
break;
- case RIG_LEVEL_MICGAIN:
+ case RIG_LEVEL_MICGAIN: {
+ pbwidth_t width;
+ rmode_t mode = 0;
+
if (!newcat_valid_command(rig, "MG"))
{
return -RIG_ENAVAIL;
}
+ if (is_ft991 || is_ftdx5000 || is_ftdx101)
+ {
+ newcat_get_mode(rig, vfo, &mode, &width);
+ }
+
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "MG%c", cat_term);
+
+ // Some Yaesu rigs reject this command in RTTY modes
+ if (is_ft991 || is_ftdx5000 || is_ftdx101)
+ {
+ if (mode & RIG_MODE_RTTY || mode & RIG_MODE_RTTYR)
+ {
+ priv->question_mark_response_means_rejected = 1;
+ }
+ }
break;
+ }
case RIG_LEVEL_METER:
if (!newcat_valid_command(rig, "MS"))
commit 49128645b11bec3cda0d55bca67ca272e5db7287
Author: Mikael Nousiainen <mik...@ik...>
Date: Wed Jan 13 00:04:10 2021 +0200
Set comp is also rejected in AM/FM/RTTY modes by certain Yaesu newcat rigs
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index f6df3b26..35375347 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -5067,6 +5067,7 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
{
newcat_get_mode(rig, vfo, &mode, &width);
}
+
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "NR0%d%c", status ? 1 : 0,
cat_term);
@@ -5086,12 +5087,20 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
break;
}
- case RIG_FUNC_COMP:
+ case RIG_FUNC_COMP: {
+ pbwidth_t width;
+ rmode_t mode = 0;
+
if (!newcat_valid_command(rig, "PR"))
{
return -RIG_ENAVAIL;
}
+ if (is_ft991 || is_ftdx5000 || is_ftdx101)
+ {
+ newcat_get_mode(rig, vfo, &mode, &width);
+ }
+
if (is_ft891 || is_ft991 || is_ftdx1200 || is_ftdx3000 || is_ftdx101)
{
// There seems to be an error in the manuals for some of these rigs stating that values should be 1 = OFF and 2 = ON, but they are 0 = OFF and 1 = ON instead
@@ -5104,7 +5113,17 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
cat_term);
}
+ // Some Yaesu rigs reject this command in AM/FM/RTTY modes
+ if (is_ft991 || is_ftdx5000 || is_ftdx101)
+ {
+ if (mode & RIG_MODE_AM || mode & RIG_MODE_FM || mode & RIG_MODE_AMN || mode & RIG_MODE_FMN ||
+ mode & RIG_MODE_RTTY || mode & RIG_MODE_RTTYR)
+ {
+ priv->question_mark_response_means_rejected = 1;
+ }
+ }
break;
+ }
case RIG_FUNC_VOX:
if (!newcat_valid_command(rig, "VX"))
commit 7be0af03628373a4bfb792f330f64d189305f82b
Author: Mikael Nousiainen <mik...@ik...>
Date: Wed Jan 13 00:01:10 2021 +0200
IF shift is rejected also in AM mode
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index 58604f7e..f6df3b26 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -4061,10 +4061,10 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
priv->cmd_str[2] = main_sub_vfo;
}
- // Some Yaesu rigs reject this command in FM mode
+ // Some Yaesu rigs reject this command in AM/FM modes
if (is_ft991 || is_ftdx5000 || is_ftdx101)
{
- if (mode & RIG_MODE_FM || mode & RIG_MODE_FMN)
+ if (mode & RIG_MODE_AM || mode & RIG_MODE_FM || mode & RIG_MODE_AMN || mode & RIG_MODE_FMN)
{
priv->question_mark_response_means_rejected = 1;
}
commit 5e00a54ca06d40f57905ed1c212d58da3c9f4835
Author: Mikael Nousiainen <mik...@ik...>
Date: Tue Jan 12 23:57:49 2021 +0200
Get mode command was conflicting with other commands
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index e7dd88fa..58604f7e 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -3261,12 +3261,20 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
break;
- case RIG_LEVEL_IF:
+ case RIG_LEVEL_IF: {
+ pbwidth_t width;
+ rmode_t mode = 0;
+
if (!newcat_valid_command(rig, "IS"))
{
return -RIG_ENAVAIL;
}
+ if (is_ft991 || is_ftdx5000 || is_ftdx101)
+ {
+ newcat_get_mode(rig, vfo, &mode, &width);
+ }
+
rig_debug(RIG_DEBUG_TRACE, "%s: LEVEL_IF val.i=%d\n", __func__, val.i);
if (abs(val.i) > rig->caps->max_ifshift)
@@ -3306,16 +3314,13 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
// Some Yaesu rigs reject this command in AM/FM modes
if (is_ft991 || is_ftdx5000 || is_ftdx101)
{
- pbwidth_t width;
- rmode_t mode;
- err = newcat_get_mode(rig, vfo, &mode, &width);
-
if (mode & RIG_MODE_AM || mode & RIG_MODE_FM || mode & RIG_MODE_AMN || mode & RIG_MODE_FMN)
{
priv->question_mark_response_means_rejected = 1;
}
}
break;
+ }
case RIG_LEVEL_CWPITCH:
{
@@ -3362,12 +3367,20 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "KS%03d%c", val.i, cat_term);
break;
- case RIG_LEVEL_MICGAIN:
+ case RIG_LEVEL_MICGAIN: {
+ pbwidth_t width;
+ rmode_t mode = 0;
+
if (!newcat_valid_command(rig, "MG"))
{
return -RIG_ENAVAIL;
}
+ if (is_ft991 || is_ftdx5000 || is_ftdx101)
+ {
+ newcat_get_mode(rig, vfo, &mode, &width);
+ }
+
if (is_ftdx1200 || is_ftdx3000 || is_ft891 || is_ft991 || is_ftdx101
|| is_ftdx10)
{
@@ -3383,16 +3396,13 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
// Some Yaesu rigs reject this command in RTTY modes
if (is_ft991 || is_ftdx5000 || is_ftdx101)
{
- pbwidth_t width;
- rmode_t mode;
- err = newcat_get_mode(rig, vfo, &mode, &width);
-
if (mode & RIG_MODE_RTTY || mode & RIG_MODE_RTTYR)
{
priv->question_mark_response_means_rejected = 1;
}
}
break;
+ }
case RIG_LEVEL_METER:
if (!newcat_valid_command(rig, "MS"))
@@ -4029,12 +4039,20 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
cat_term);
break;
- case RIG_LEVEL_IF:
+ case RIG_LEVEL_IF: {
+ pbwidth_t width;
+ rmode_t mode = 0;
+
if (!newcat_valid_command(rig, "IS"))
{
return -RIG_ENAVAIL;
}
+ if (is_ft991 || is_ftdx5000 || is_ftdx101)
+ {
+ newcat_get_mode(rig, vfo, &mode, &width);
+ }
+
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "IS%c%c", main_sub_vfo,
cat_term);
@@ -4046,16 +4064,13 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
// Some Yaesu rigs reject this command in FM mode
if (is_ft991 || is_ftdx5000 || is_ftdx101)
{
- pbwidth_t width;
- rmode_t mode;
- err = newcat_get_mode(rig, vfo, &mode, &width);
-
if (mode & RIG_MODE_FM || mode & RIG_MODE_FMN)
{
priv->question_mark_response_means_rejected = 1;
}
}
break;
+ }
case RIG_LEVEL_CWPITCH:
if (!newcat_valid_command(rig, "KP"))
@@ -4885,12 +4900,20 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
switch (func)
{
- case RIG_FUNC_ANF:
+ case RIG_FUNC_ANF: {
+ pbwidth_t width;
+ rmode_t mode = 0;
+
if (!newcat_valid_command(rig, "BC"))
{
return -RIG_ENAVAIL;
}
+ if (is_ft991 || is_ftdx5000 || is_ftdx101)
+ {
+ err = newcat_get_mode(rig, vfo, &mode, &width);
+ }
+
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "BC0%d%c", status ? 1 : 0,
cat_term);
@@ -4902,23 +4925,28 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
// Some Yaesu rigs reject this command in FM mode
if (is_ft991 || is_ftdx5000 || is_ftdx101)
{
- pbwidth_t width;
- rmode_t mode;
- err = newcat_get_mode(rig, vfo, &mode, &width);
-
if (mode & RIG_MODE_FM || mode & RIG_MODE_FMN)
{
priv->question_mark_response_means_rejected = 1;
}
}
break;
+ }
+
+ case RIG_FUNC_MN: {
+ pbwidth_t width;
+ rmode_t mode = 0;
- case RIG_FUNC_MN:
if (!newcat_valid_command(rig, "BP"))
{
return -RIG_ENAVAIL;
}
+ if (is_ft991 || is_ftdx5000 || is_ftdx101)
+ {
+ newcat_get_mode(rig, vfo, &mode, &width);
+ }
+
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "BP00%03d%c", status ? 1 : 0,
cat_term);
@@ -4930,16 +4958,13 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
// Some Yaesu rigs reject this command in FM mode
if (is_ft991 || is_ftdx5000 || is_ftdx101)
{
- pbwidth_t width;
- rmode_t mode;
- err = newcat_get_mode(rig, vfo, &mode, &width);
-
if (mode & RIG_MODE_FM || mode & RIG_MODE_FMN)
{
priv->question_mark_response_means_rejected = 1;
}
}
break;
+ }
case RIG_FUNC_FBKIN:
if (!newcat_valid_command(rig, "BI"))
@@ -5029,12 +5054,19 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
break;
- case RIG_FUNC_NR:
+ case RIG_FUNC_NR: {
+ pbwidth_t width;
+ rmode_t mode = 0;
+
if (!newcat_valid_command(rig, "NR"))
{
return -RIG_ENAVAIL;
}
+ if (is_ft991 || is_ftdx5000 || is_ftdx101)
+ {
+ newcat_get_mode(rig, vfo, &mode, &width);
+ }
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "NR0%d%c", status ? 1 : 0,
cat_term);
@@ -5046,16 +5078,13 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
// Some Yaesu rigs reject this command in FM mode
if (is_ft991 || is_ftdx5000 || is_ftdx101)
{
- pbwidth_t width;
- rmode_t mode;
- err = newcat_get_mode(rig, vfo, &mode, &width);
-
if (mode & RIG_MODE_FM || mode & RIG_MODE_FMN)
{
priv->question_mark_response_means_rejected = 1;
}
}
break;
+ }
case RIG_FUNC_COMP:
if (!newcat_valid_command(rig, "PR"))
@@ -5149,12 +5178,20 @@ int newcat_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)
switch (func)
{
- case RIG_FUNC_ANF:
+ case RIG_FUNC_ANF: {
+ pbwidth_t width;
+ rmode_t mode = 0;
+
if (!newcat_valid_command(rig, "BC"))
{
return -RIG_ENAVAIL;
}
+ if (is_ft991 || is_ftdx5000 || is_ftdx101)
+ {
+ err = newcat_get_mode(rig, vfo, &mode, &width);
+ }
+
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "BC0%c", cat_term);
if (rig->caps->targetable_vfo & RIG_TARGETABLE_MODE)
@@ -5165,16 +5202,13 @@ int newcat_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)
// Some Yaesu rigs reject this command in FM mode
if (is_ft991 || is_ftdx5000 || is_ftdx101)
{
- pbwidth_t width;
- rmode_t mode;
- err = newcat_get_mode(rig, vfo, &mode, &width);
-
if (mode & RIG_MODE_FM || mode & RIG_MODE_FMN)
{
priv->question_mark_response_means_rejected = 1;
}
}
break;
+ }
case RIG_FUNC_MN:
if (!newcat_valid_command(rig, "BP"))
commit 23e94a5375a1063f4599aec31a28b2f90c4fb6ef
Author: Mikael Nousiainen <mik...@ik...>
Date: Tue Jan 12 23:42:49 2021 +0200
Make skipping of retries for certain Yaesu newcat commands rig and mode-specific
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index 4f11ecce..e7dd88fa 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -3304,7 +3304,17 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
}
// Some Yaesu rigs reject this command in AM/FM modes
- priv->question_mark_response_means_rejected = 1;
+ if (is_ft991 || is_ftdx5000 || is_ftdx101)
+ {
+ pbwidth_t width;
+ rmode_t mode;
+ err = newcat_get_mode(rig, vfo, &mode, &width);
+
+ if (mode & RIG_MODE_AM || mode & RIG_MODE_FM || mode & RIG_MODE_AMN || mode & RIG_MODE_FMN)
+ {
+ priv->question_mark_response_means_rejected = 1;
+ }
+ }
break;
case RIG_LEVEL_CWPITCH:
@@ -3371,7 +3381,17 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "MG%03d%c", fpf, cat_term);
// Some Yaesu rigs reject this command in RTTY modes
- priv->question_mark_response_means_rejected = 1;
+ if (is_ft991 || is_ftdx5000 || is_ftdx101)
+ {
+ pbwidth_t width;
+ rmode_t mode;
+ err = newcat_get_mode(rig, vfo, &mode, &width);
+
+ if (mode & RIG_MODE_RTTY || mode & RIG_MODE_RTTYR)
+ {
+ priv->question_mark_response_means_rejected = 1;
+ }
+ }
break;
case RIG_LEVEL_METER:
@@ -3577,9 +3597,6 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
priv->cmd_str[2] = main_sub_vfo;
}
}
-
- // Some Yaesu rigs reject this command in AM/FM modes
- priv->question_mark_response_means_rejected = 1;
break;
case RIG_LEVEL_COMP:
@@ -4026,6 +4043,18 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
priv->cmd_str[2] = main_sub_vfo;
}
+ // Some Yaesu rigs reject this command in FM mode
+ if (is_ft991 || is_ftdx5000 || is_ftdx101)
+ {
+ pbwidth_t width;
+ rmode_t mode;
+ err = newcat_get_mode(rig, vfo, &mode, &width);
+
+ if (mode & RIG_MODE_FM || mode & RIG_MODE_FMN)
+ {
+ priv->question_mark_response_means_rejected = 1;
+ }
+ }
break;
case RIG_LEVEL_CWPITCH:
@@ -4311,6 +4340,9 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
err = newcat_get_cmd(rig);
+ // Clear flag after executing command
+ priv->question_mark_response_means_rejected = 0;
+
if (err != RIG_OK)
{
return err;
@@ -4867,8 +4899,18 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
priv->cmd_str[2] = main_sub_vfo;
}
- // Some Yaesu rigs reject this command in AM/FM modes
- priv->question_mark_response_means_rejected = 1;
+ // Some Yaesu rigs reject this command in FM mode
+ if (is_ft991 || is_ftdx5000 || is_ftdx101)
+ {
+ pbwidth_t width;
+ rmode_t mode;
+ err = newcat_get_mode(rig, vfo, &mode, &width);
+
+ if (mode & RIG_MODE_FM || mode & RIG_MODE_FMN)
+ {
+ priv->question_mark_response_means_rejected = 1;
+ }
+ }
break;
case RIG_FUNC_MN:
@@ -4885,8 +4927,18 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
priv->cmd_str[2] = main_sub_vfo;
}
- // Some Yaesu rigs reject this command in AM/FM modes
- priv->question_mark_response_means_rejected = 1;
+ // Some Yaesu rigs reject this command in FM mode
+ if (is_ft991 || is_ftdx5000 || is_ftdx101)
+ {
+ pbwidth_t width;
+ rmode_t mode;
+ err = newcat_get_mode(rig, vfo, &mode, &width);
+
+ if (mode & RIG_MODE_FM || mode & RIG_MODE_FMN)
+ {
+ priv->question_mark_response_means_rejected = 1;
+ }
+ }
break;
case RIG_FUNC_FBKIN:
@@ -4991,8 +5043,18 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
priv->cmd_str[2] = main_sub_vfo;
}
- // Some Yaesu rigs reject this command in AM/FM modes
- priv->question_mark_response_means_rejected = 1;
+ // Some Yaesu rigs reject this command in FM mode
+ if (is_ft991 || is_ftdx5000 || is_ftdx101)
+ {
+ pbwidth_t width;
+ rmode_t mode;
+ err = newcat_get_mode(rig, vfo, &mode, &width);
+
+ if (mode & RIG_MODE_FM || mode & RIG_MODE_FMN)
+ {
+ priv->question_mark_response_means_rejected = 1;
+ }
+ }
break;
case RIG_FUNC_COMP:
@@ -5100,6 +5162,18 @@ int newcat_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)
priv->cmd_str[2] = main_sub_vfo;
}
+ // Some Yaesu rigs reject this command in FM mode
+ if (is_ft991 || is_ftdx5000 || is_ftdx101)
+ {
+ pbwidth_t width;
+ rmode_t mode;
+ err = newcat_get_mode(rig, vfo, &mode, &width);
+
+ if (mode & RIG_MODE_FM || mode & RIG_MODE_FMN)
+ {
+ priv->question_mark_response_means_rejected = 1;
+ }
+ }
break;
case RIG_FUNC_MN:
@@ -5261,7 +5335,12 @@ int newcat_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)
return -RIG_EINVAL;
}
- if (RIG_OK != (err = newcat_get_cmd(rig)))
+ err = newcat_get_cmd(rig);
+
+ // Clear flag after executing command
+ priv->question_mark_response_means_rejected = 0;
+
+ if (err != RIG_OK)
{
return err;
}
commit 2c224a9ca119c0ec12ef87fe45a3b776ab0212a2
Merge: 935b520b 3af9f06f
Author: Michael Black <mdb...@ya...>
Date: Tue Jan 12 15:05:44 2021 -0600
Merge pull request #508 from mikaelnousiainen/fix-yaesu-ctcss-off
All Yaesu newcat rigs use the same format for turning CTCSS ON/OFF
commit 3af9f06fa5dacfd6ca39ac4adc4705acc1ae3a87
Author: Mikael Nousiainen <mik...@ik...>
Date: Tue Jan 12 23:01:54 2021 +0200
All Yaesu newcat rigs use the same format for turning CTCSS ON/OFF
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index d5863a75..ad8515c4 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -2519,17 +2519,8 @@ int newcat_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone)
if (tone == 0) /* turn off ctcss */
{
- if (is_ft891 || is_ft991 || is_ftdx101)
- {
- // note ftdx101 cat manual says CTP1P2; not CTP1P2P3; so is this correct?
- snprintf(priv->cmd_str, sizeof(priv->cmd_str), "CT%c00%c", main_sub_vfo,
- cat_term);
- }
- else
- {
- snprintf(priv->cmd_str, sizeof(priv->cmd_str), "CT%c0%c", main_sub_vfo,
- cat_term);
- }
+ snprintf(priv->cmd_str, sizeof(priv->cmd_str), "CT%c0%c", main_sub_vfo,
+ cat_term);
}
else
{
commit cce1db9ee1300464285517d3bf51d2071f9066c9
Merge: c1a0e154 935b520b
Author: Mikael Nousiainen <mik...@ik...>
Date: Tue Jan 12 22:18:35 2021 +0200
Fix conflicts
diff --cc rigs/yaesu/newcat.c
index f2c52d90,d5863a75..4f11ecce
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@@ -9146,18 -9160,9 +9146,18 @@@ int newcat_get_cmd(RIG *rig
* Followup 20201213 FTDX3000 FB; command returning ?; so do NOT abort
* see https://github.com/Hamlib/Hamlib/issues/464
*/
- rig_debug(RIG_DEBUG_ERR, "%s: Command rejected by the rig#1: '%s'\n", __func__,
- priv->cmd_str);
- // return -RIG_ERJCTED;
+ if (priv->question_mark_response_means_rejected)
+ {
- rig_debug(RIG_DEBUG_ERR, "%s: Command rejected by the rig: '%s'\n", __func__,
++ rig_debug(RIG_DEBUG_ERR, "%s: Command rejected by the rig (get): '%s'\n", __func__,
+ priv->cmd_str);
+ return -RIG_ERJCTED;
+ }
+
+ rig_debug(RIG_DEBUG_WARN, "%s: Rig busy - retrying: '%s'\n", __func__,
+ priv->cmd_str);
+
+ rc = -RIG_ERJCTED; /* retry */
+ break;
}
continue;
@@@ -9299,8 -9304,8 +9299,8 @@@ int newcat_set_cmd(RIG *rig
*/
if (priv->question_mark_response_means_rejected)
{
- rig_debug(RIG_DEBUG_ERR, "%s: Command rejected by the rig: '%s'\n", __func__,
- priv->cmd_str);
- rig_debug(RIG_DEBUG_ERR, "%s: Command rejected by the rig#2: '%s'\n", __func__,
++ rig_debug(RIG_DEBUG_ERR, "%s: Command rejected by the rig (set): '%s'\n", __func__,
+ priv->cmd_str);
return -RIG_ERJCTED;
}
commit c1a0e15464e96fd35a4a740c1970b1dc613a43ff
Author: Mikael Nousiainen <mik...@ik...>
Date: Tue Jan 12 22:13:11 2021 +0200
Fix error codes to allow retries in newcat_get_cmd
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index 972f2af6..f2c52d90 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -9085,19 +9085,17 @@ int newcat_get_cmd(RIG *rig)
rc = RIG_OK; /* received something */
/* Check that command termination is correct - alternative is
- response is longer that the buffer */
+ response is longer than the buffer */
if (cat_term != priv->ret_data[strlen(priv->ret_data) - 1])
{
rig_debug(RIG_DEBUG_ERR, "%s: Command is not correctly terminated '%s'\n",
__func__, priv->ret_data);
- // we were using BUSBUSY but microham devices need retries
- //rc = -RIG_BUSBUSY; /* don't write command again */
- // rc = -RIG_EPROTO;
+ rc = -RIG_EPROTO; /* retry */
/* we could decrement retry_count
here but there is a danger of
infinite looping so we just use up
a retry for safety's sake */
- continue; /* retry */
+ continue;
}
/* check for error codes */
@@ -9158,7 +9156,7 @@ int newcat_get_cmd(RIG *rig)
rig_debug(RIG_DEBUG_WARN, "%s: Rig busy - retrying: '%s'\n", __func__,
priv->cmd_str);
- rc = -RIG_BUSBUSY; /* retry */
+ rc = -RIG_ERJCTED; /* retry */
break;
}
commit dd4076355d7b864b102d270476aa77c06cd86618
Author: Mikael Nousiainen <mik...@ik...>
Date: Tue Jan 12 11:00:18 2021 +0200
Re-enable Yaesu question mark handling and fix newcat_get_cmd retries in case of question mark response
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index 20ef392a..972f2af6 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -3304,9 +3304,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
}
// Some Yaesu rigs reject this command in AM/FM modes
- // Disabling as it's too general
- // Need to be rig/mode specific
- //priv->question_mark_response_means_rejected = 1;
+ priv->question_mark_response_means_rejected = 1;
break;
case RIG_LEVEL_CWPITCH:
@@ -3373,9 +3371,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "MG%03d%c", fpf, cat_term);
// Some Yaesu rigs reject this command in RTTY modes
- // Disabling as it's too general
- // Need to be rig/mode specific
- //priv->question_mark_response_means_rejected = 1;
+ priv->question_mark_response_means_rejected = 1;
break;
case RIG_LEVEL_METER:
@@ -3583,9 +3579,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
}
// Some Yaesu rigs reject this command in AM/FM modes
- // Disabling as it's too general
- // Need to be rig/mode specific
- //priv->question_mark_response_means_rejected = 1;
+ priv->question_mark_response_means_rejected = 1;
break;
case RIG_LEVEL_COMP:
@@ -4874,9 +4868,7 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
}
// Some Yaesu rigs reject this command in AM/FM modes
- // Disabling as it's too general
- // Need to be rig/mode specific
- //priv->question_mark_response_means_rejected = 1;
+ priv->question_mark_response_means_rejected = 1;
break;
case RIG_FUNC_MN:
@@ -4894,9 +4886,7 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
}
// Some Yaesu rigs reject this command in AM/FM modes
- // Disabling as it's too general
- // Need to be rig/mode specific
- //priv->question_mark_response_means_rejected = 1;
+ priv->question_mark_response_means_rejected = 1;
break;
case RIG_FUNC_FBKIN:
@@ -5002,9 +4992,7 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
}
// Some Yaesu rigs reject this command in AM/FM modes
- // Disabling as it's too general
- // Need to be rig/mode specific
- //priv->question_mark_response_means_rejected = 1;
+ priv->question_mark_response_means_rejected = 1;
break;
case RIG_FUNC_COMP:
@@ -9160,9 +9148,18 @@ int newcat_get_cmd(RIG *rig)
* Followup 20201213 FTDX3000 FB; command returning ?; so do NOT abort
* see https://github.com/Hamlib/Hamlib/issues/464
*/
- rig_debug(RIG_DEBUG_ERR, "%s: Command rejected by the rig: '%s'\n", __func__,
- priv->cmd_str);
- // return -RIG_ERJCTED;
+ if (priv->question_mark_response_means_rejected)
+ {
+ rig_debug(RIG_DEBUG_ERR, "%s: Command rejected by the rig: '%s'\n", __func__,
+ priv->cmd_str);
+ return -RIG_ERJCTED;
+ }
+
+ rig_debug(RIG_DEBUG_WARN, "%s: Rig busy - retrying: '%s'\n", __func__,
+ priv->cmd_str);
+
+ rc = -RIG_BUSBUSY; /* retry */
+ break;
}
continue;
@@ -9305,12 +9302,13 @@ int newcat_set_cmd(RIG *rig)
if (priv->question_mark_response_means_rejected)
{
rig_debug(RIG_DEBUG_ERR, "%s: Command rejected by the rig: '%s'\n", __func__,
- priv->cmd_str);
+ priv->cmd_str);
return -RIG_ERJCTED;
}
/* Rig busy wait please */
- rig_debug(RIG_DEBUG_WARN, "%s: Rig busy - retrying\n", __func__);
+ rig_debug(RIG_DEBUG_WARN, "%s: Rig busy - retrying: '%s'\n", __func__,
+ priv->cmd_str);
/* read the verify command reply */
if ((rc = read_string(&state->rigport, priv->ret_data, sizeof(priv->ret_data),
diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h
index 29471517..7c8918da 100644
--- a/rigs/yaesu/newcat.h
+++ b/rigs/yaesu/newcat.h
@@ -50,7 +50,7 @@
typedef char ncboolean;
/* shared function version */
-#define NEWCAT_VER "20210111"
+#define NEWCAT_VER "20210112"
/* Hopefully large enough for future use, 128 chars plus '\0' */
#define NEWCAT_DATA_LEN 129
-----------------------------------------------------------------------
Summary of changes:
rigs/yaesu/newcat.c | 245 ++++++++++++++++++++++++++++++++++++++++------------
rigs/yaesu/newcat.h | 2 +-
2 files changed, 192 insertions(+), 55 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-01-12 13:15:39
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via 935b520b441fc9a33b38a126ac633d623c2dbada (commit)
from 614f08b6720e3d8d44821bf47405866529f94920 (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 935b520b441fc9a33b38a126ac633d623c2dbada
Author: Michael Black W9MDB <mdb...@ya...>
Date: Tue Jan 12 07:13:50 2021 -0600
Change debug message in newcat.c so we can see which one it is
https://github.com/Hamlib/Hamlib/issues/505
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index 20ef392a..d5863a75 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -9160,7 +9160,7 @@ int newcat_get_cmd(RIG *rig)
* Followup 20201213 FTDX3000 FB; command returning ?; so do NOT abort
* see https://github.com/Hamlib/Hamlib/issues/464
*/
- rig_debug(RIG_DEBUG_ERR, "%s: Command rejected by the rig: '%s'\n", __func__,
+ rig_debug(RIG_DEBUG_ERR, "%s: Command rejected by the rig#1: '%s'\n", __func__,
priv->cmd_str);
// return -RIG_ERJCTED;
}
@@ -9304,7 +9304,7 @@ int newcat_set_cmd(RIG *rig)
*/
if (priv->question_mark_response_means_rejected)
{
- rig_debug(RIG_DEBUG_ERR, "%s: Command rejected by the rig: '%s'\n", __func__,
+ rig_debug(RIG_DEBUG_ERR, "%s: Command rejected by the rig#2: '%s'\n", __func__,
priv->cmd_str);
return -RIG_ERJCTED;
}
-----------------------------------------------------------------------
Summary of changes:
rigs/yaesu/newcat.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|