hamlib-cvs-digest Mailing List for Ham Radio Control Libraries (Page 29)
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
(29) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Michael B. <mdb...@us...> - 2020-07-04 04:40:41
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via b2dce86e91f0a75fb1ac5448a77409d8fc3af16e (commit) from dee097366dfb7b3cbd95f847225b9e1cf0e9c15a (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 b2dce86e91f0a75fb1ac5448a77409d8fc3af16e Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Jul 3 23:40:20 2020 -0500 Add comment about IC-756 data mode diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 3b6e2f72..5b7c4117 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -1575,7 +1575,9 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode, switch (mode) { - case RIG_MODE_PKTUSB: + case RIG_MODE_PKTUSB: + // xFE xFE x6E xE0 x1A x06 x01 xFD switchs mod input from MIC to ACC + // This apparently works for IC-756ProIII but nobody has asked for it yet icom_mode = RIG_MODE_USB; break; ----------------------------------------------------------------------- Summary of changes: rigs/icom/icom.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2020-07-04 04:06:36
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via dee097366dfb7b3cbd95f847225b9e1cf0e9c15a (commit) from 3d7ddc7e034d636b99afb5efec51f586117aed0a (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 dee097366dfb7b3cbd95f847225b9e1cf0e9c15a Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Jul 3 22:32:14 2020 -0500 Fix cppcheck warnings diff --git a/dummy/netampctl.c b/dummy/netampctl.c index cca93ac1..7d1a66c0 100644 --- a/dummy/netampctl.c +++ b/dummy/netampctl.c @@ -106,15 +106,19 @@ static int netampctl_open(AMP *amp) { ret = read_string(&->state.ampport, buf, BUF_MAX, "\n", sizeof("\n")); - if (ret <= 0) + if (ret > 0) { - return (ret < 0) ? ret : -RIG_EPROTO; + rig_debug(RIG_DEBUG_VERBOSE, "%s called, string=%s\n", __func__, buf); } - - rig_debug(RIG_DEBUG_VERBOSE, "%s called, string=%s\n", __func__, buf); } while (ret > 0); + if (ret < 0) + { + return -RIG_EPROTO; + } + + return RIG_OK; } ----------------------------------------------------------------------- Summary of changes: dummy/netampctl.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2020-07-03 22:25:30
|
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 3d7ddc7e034d636b99afb5efec51f586117aed0a (commit) via 57c76ed3c4ae8d022b3c42f4c1b7c72a63dae24a (commit) via 557eff4f65784d1f0bffa16f9e342fe0018aa0c0 (commit) via 045c0cff2124de134cc20c0fdb3525cb7e46af62 (commit) via 0ecf32f2a72f5d6dc29c72f0f22ed4c6dfb9d971 (commit) via 2e0c5f568767bccbf6fb6fcf87e12296f528b932 (commit) via a3bb987e23479c7aca3f719336fe5c0c63bb2399 (commit) from 0c2b39c2e08d5b549058715785d5a837d83de15e (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 3d7ddc7e034d636b99afb5efec51f586117aed0a Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Jul 3 17:14:09 2020 -0500 Fix cppcheck warnings diff --git a/src/register.c b/src/register.c index 0515fe87..659b91fa 100644 --- a/src/register.c +++ b/src/register.c @@ -299,7 +299,7 @@ int HAMLIB_API rig_check_backend(rig_model_t rig_model) if (be_idx == -1) { rig_debug(RIG_DEBUG_VERBOSE, - "rig_check_backend: unsupported backend %d for model %u\n", + "rig_check_backend: unsupported backend %u for model %u\n", RIG_BACKEND_NUM(rig_model), rig_model); return -RIG_ENAVAIL; commit 57c76ed3c4ae8d022b3c42f4c1b7c72a63dae24a Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Jul 3 17:10:25 2020 -0500 Fix cppcheck warnings diff --git a/rotators/rotorez/rotorez.c b/rotators/rotorez/rotorez.c index 015c2165..36d684c3 100644 --- a/rotators/rotorez/rotorez.c +++ b/rotators/rotorez/rotorez.c @@ -552,7 +552,7 @@ static int rotorez_rot_get_position(ROT *rot, azimuth_t *azimuth, err = -RIG_EINVAL; } } - else if (err == AZ_READ_LEN && az[0] == ';') + else if (err == AZ_READ_LEN) { /* Check if remaining chars are digits if az[0] == ';' */ for (p = az + 1; p < az + 4; p++) commit 557eff4f65784d1f0bffa16f9e342fe0018aa0c0 Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Jul 3 17:01:49 2020 -0500 Fix cppcheck warnings diff --git a/rigs/adat/adat.c b/rigs/adat/adat.c index f71b2d11..098f47c1 100644 --- a/rigs/adat/adat.c +++ b/rigs/adat/adat.c @@ -1488,7 +1488,7 @@ int adat_get_single_cmd_result(RIG *pRig) pcPos = acBuf; - if ((nRC == RIG_OK) && (pcPos != NULL)) + if ((nRC == RIG_OK)) { int nBufLength = 0; commit 045c0cff2124de134cc20c0fdb3525cb7e46af62 Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Jul 3 16:59:52 2020 -0500 Fix cppcheck warnings diff --git a/dummy/netrigctl.c b/dummy/netrigctl.c index d8b5a116..89a5dd32 100644 --- a/dummy/netrigctl.c +++ b/dummy/netrigctl.c @@ -718,7 +718,7 @@ static int netrigctl_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, return (ret < 0) ? ret : -RIG_EPROTO; } - if (ret > 0 && buf[ret - 1] == '\n') { buf[ret - 1] = '\0'; } /* chomp */ + if (buf[ret - 1] == '\n') { buf[ret - 1] = '\0'; } /* chomp */ *mode = rig_parse_mode(buf); @@ -790,7 +790,7 @@ static int netrigctl_get_vfo(RIG *rig, vfo_t *vfo) return (ret < 0) ? ret : -RIG_EPROTO; } - if (ret > 0 && buf[ret - 1] == '\n') { buf[ret - 1] = '\0'; } /* chomp */ + if (buf[ret - 1] == '\n') { buf[ret - 1] = '\0'; } /* chomp */ *vfo = rig_parse_vfo(buf); @@ -935,7 +935,7 @@ static int netrigctl_get_rptr_shift(RIG *rig, vfo_t vfo, return (ret < 0) ? ret : -RIG_EPROTO; } - if (ret > 0 && buf[ret - 1] == '\n') { buf[ret - 1] = '\0'; } /* chomp */ + if (buf[ret - 1] == '\n') { buf[ret - 1] = '\0'; } /* chomp */ *rptr_shift = rig_parse_rptr_shift(buf); @@ -1329,7 +1329,7 @@ static int netrigctl_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode, return (ret < 0) ? ret : -RIG_EPROTO; } - if (ret > 0 && buf[ret - 1] == '\n') { buf[ret - 1] = '\0'; } /* chomp */ + if (buf[ret - 1] == '\n') { buf[ret - 1] = '\0'; } /* chomp */ *tx_mode = rig_parse_mode(buf); @@ -1407,7 +1407,7 @@ static int netrigctl_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, } - if (ret > 0 && buf[ret - 1] == '\n') { buf[ret - 1] = '\0'; } /* chomp */ + if (buf[ret - 1] == '\n') { buf[ret - 1] = '\0'; } /* chomp */ *tx_vfo = rig_parse_vfo(buf); commit 0ecf32f2a72f5d6dc29c72f0f22ed4c6dfb9d971 Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Jul 3 16:56:59 2020 -0500 Fix cppcheck warning diff --git a/dummy/flrig.c b/dummy/flrig.c index 2fecbdb9..c26b00d3 100644 --- a/dummy/flrig.c +++ b/dummy/flrig.c @@ -376,7 +376,7 @@ static char *xml_parse(char *xml, char *value, int value_len) xml_parse2(next, value, value_len); } - if (strstr(value, "faultString")) + if ( value && strstr(value, "faultString")) { rig_debug(RIG_DEBUG_ERR, "%s error:\n%s\n", __func__, value); value[0] = 0; /* truncate to give empty response */ commit 2e0c5f568767bccbf6fb6fcf87e12296f528b932 Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Jul 3 16:20:23 2020 -0500 Fix cppcheck warnings diff --git a/src/misc.c b/src/misc.c index a4efb69e..a2ef2246 100644 --- a/src/misc.c +++ b/src/misc.c @@ -1382,7 +1382,7 @@ vfo_t HAMLIB_API vfo_fixup(RIG *rig, vfo_t vfo) int HAMLIB_API parse_hoststr(char *hoststr, char host[256], char port[6]) { unsigned int net1, net2, net3, net4, net5, net6, net7, net8; - char dummy[2], link[32], *p; + char dummy[6], link[32], *p; host[0] = 0; port[0] = 0; dummy[0] = 0; @@ -1471,7 +1471,7 @@ int HAMLIB_API parse_hoststr(char *hoststr, char host[256], char port[6]) return RIG_OK; } - if (sscanf(hoststr, ":%5[0-9]%s", port, + if (sscanf(hoststr, ":%5[0-9]%1s", port, dummy) == 1) // just a port if you please { sprintf(hoststr, "%s:%s\n", "localhost", port); commit a3bb987e23479c7aca3f719336fe5c0c63bb2399 Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Jul 3 16:17:59 2020 -0500 Fix cppcheck warnings diff --git a/rigs/yaesu/ft817.c b/rigs/yaesu/ft817.c index 027ad8ca..ced515e3 100644 --- a/rigs/yaesu/ft817.c +++ b/rigs/yaesu/ft817.c @@ -629,7 +629,6 @@ static int ft817_get_status(RIG *rig, int status) int ft817_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) { struct ft817_priv_data *p = (struct ft817_priv_data *) rig->state.priv; - int n; freq_t f1 = 0, f2 = 0; int retries = rig->state.rigport.retry + 1; // +1 because, because 2 steps are needed even in best scenario @@ -638,6 +637,7 @@ int ft817_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) while ((f1 == 0 || f1 != f2) && retries-- > 0) { + int n; rig_debug(RIG_DEBUG_TRACE, "%s: retries=%d\n", __func__, retries); if ((n = ft817_get_status(rig, FT817_NATIVE_CAT_GET_FREQ_MODE_STATUS)) < 0) @@ -955,13 +955,11 @@ int ft817_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd) int ft817_read_ack(RIG *rig) { char dummy; - int n; - rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); if (rig->state.rigport.post_write_delay == 0) { - if ((n = read_block(&rig->state.rigport, &dummy, 1)) < 0) + if (read_block(&rig->state.rigport, &dummy, 1) < 0) { rig_debug(RIG_DEBUG_ERR, "%s: error reading ack\n", __func__); rig_debug(RIG_DEBUG_ERR, "%s: adjusting post_write_delay to avoid ack\n", ----------------------------------------------------------------------- Summary of changes: dummy/flrig.c | 2 +- dummy/netrigctl.c | 10 +++++----- rigs/adat/adat.c | 2 +- rigs/yaesu/ft817.c | 6 ++---- rotators/rotorez/rotorez.c | 2 +- src/misc.c | 4 ++-- src/register.c | 2 +- 7 files changed, 13 insertions(+), 15 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2020-07-03 13:38:52
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 0c2b39c2e08d5b549058715785d5a837d83de15e (commit) from b181c1720cdea86b66b1dc98f08581405b9eecb9 (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 0c2b39c2e08d5b549058715785d5a837d83de15e Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Jul 3 08:38:33 2020 -0500 small change to debug statement diff --git a/src/misc.c b/src/misc.c index ca9b48bd..a4efb69e 100644 --- a/src/misc.c +++ b/src/misc.c @@ -1300,7 +1300,7 @@ double HAMLIB_API elapsed_ms(struct timespec *start, int option) elapsed_msec = ((stop.tv_sec - start->tv_sec) + (stop.tv_nsec / 1e9 - start->tv_nsec / 1e9)) * 1e3; - rig_debug(RIG_DEBUG_TRACE, "%s: elapsed_msecs=%g\n", __func__, elapsed_msec); + rig_debug(RIG_DEBUG_TRACE, "%s: elapsed_msecs=%.0f\n", __func__, elapsed_msec); if (elapsed_msec < 0 || option == HAMLIB_ELAPSED_INVALIDATE) { return 1000000; } ----------------------------------------------------------------------- Summary of changes: src/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2020-07-03 13:37: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 b181c1720cdea86b66b1dc98f08581405b9eecb9 (commit) from 88cf2f6da62be50a26f76fce0aa8785ab0a3ae90 (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 b181c1720cdea86b66b1dc98f08581405b9eecb9 Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Jul 3 08:37:17 2020 -0500 Fix compile error on cachetest2.c diff --git a/tests/cachetest2.c b/tests/cachetest2.c index 1ead2ef8..db427cbb 100644 --- a/tests/cachetest2.c +++ b/tests/cachetest2.c @@ -56,7 +56,7 @@ int main(int argc, char *argv[]) return 1; } - rig_set_cache_timeout_ms(my_rig, CACHE_ALL, cache_timeout); + rig_set_cache_timeout_ms(my_rig, HAMLIB_CACHE_ALL, cache_timeout); /* Give me ID info, e.g., firmware version. */ info_buf = (char *)rig_get_info(my_rig); ----------------------------------------------------------------------- Summary of changes: tests/cachetest2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2020-07-03 13:35: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 88cf2f6da62be50a26f76fce0aa8785ab0a3ae90 (commit) from 4bd024c2388d2c9c0693bfdd94a73c0369535161 (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 88cf2f6da62be50a26f76fce0aa8785ab0a3ae90 Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Jul 3 08:35:39 2020 -0500 Fix compile error on cachetest.c diff --git a/tests/cachetest.c b/tests/cachetest.c index 54342fd5..466bf776 100644 --- a/tests/cachetest.c +++ b/tests/cachetest.c @@ -91,7 +91,7 @@ int main(int argc, char *argv[]) return 1; } - rig_set_cache_timeout_ms(my_rig, CACHE_ALL, cache_timeout); + rig_set_cache_timeout_ms(my_rig, HAMLIB_CACHE_ALL, cache_timeout); /* Give me ID info, e.g., firmware version. */ info_buf = (char *)rig_get_info(my_rig); ----------------------------------------------------------------------- Summary of changes: tests/cachetest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2020-07-03 13:05: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 4bd024c2388d2c9c0693bfdd94a73c0369535161 (commit) from e31500842cedc1188908439dc1b999a2444e8a99 (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 4bd024c2388d2c9c0693bfdd94a73c0369535161 Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Jul 3 08:05:13 2020 -0500 Fix come valgrind errors diff --git a/dummy/netrigctl.c b/dummy/netrigctl.c index dad7d075..d8b5a116 100644 --- a/dummy/netrigctl.c +++ b/dummy/netrigctl.c @@ -629,8 +629,8 @@ static int netrigctl_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) char vfotmp[16]; #endif - rig_debug(RIG_DEBUG_VERBOSE, "%s called, vfo=%s, freq=%.0f\n", __func__, - rig_strvfo(vfo), *freq); + rig_debug(RIG_DEBUG_VERBOSE, "%s called, vfo=%s\n", __func__, + rig_strvfo(vfo)); ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), vfo); diff --git a/rigs/icom/frame.c b/rigs/icom/frame.c index 3510dd12..bb91b2f9 100644 --- a/rigs/icom/frame.c +++ b/rigs/icom/frame.c @@ -115,6 +115,7 @@ int icom_one_transaction(RIG *rig, int cmd, int subcmd, int frm_len, retval; int ctrl_id; + sendbuf[0] = buf[0] = 0; rs = &rig->state; priv = (struct icom_priv_data *)rs->priv; priv_caps = (struct icom_priv_caps *)rig->caps->priv; @@ -232,6 +233,7 @@ int icom_one_transaction(RIG *rig, int cmd, int subcmd, * FIXME: handle pading/collisions * ACKFRMLEN is the smallest frame we can expect from the rig */ + buf[0] = 0; frm_len = read_icom_frame(&rs->rigport, buf, sizeof(buf)); if (memcmp(buf, sendbuf, frm_len) == 0 && priv->serial_USB_echo_off) diff --git a/src/misc.c b/src/misc.c index b715a998..ca9b48bd 100644 --- a/src/misc.c +++ b/src/misc.c @@ -1292,7 +1292,8 @@ double HAMLIB_API elapsed_ms(struct timespec *start, int option) case HAMLIB_ELAPSED_INVALIDATE: clock_gettime(CLOCK_REALTIME, start); - start->tv_sec -= 3600; + stop = *start; + start->tv_sec -= 10; // ten seconds should be more than enough break; } ----------------------------------------------------------------------- Summary of changes: dummy/netrigctl.c | 4 ++-- rigs/icom/frame.c | 2 ++ src/misc.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2020-07-02 20:54:43
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via e31500842cedc1188908439dc1b999a2444e8a99 (commit) from df3285de60a3400cba0712fc4a35955b420fa962 (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 e31500842cedc1188908439dc1b999a2444e8a99 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Jul 2 15:54:26 2020 -0500 Ensure cache invalidated before re-reading freq in set_freq diff --git a/src/rig.c b/src/rig.c index f4282f62..6cf1cd80 100644 --- a/src/rig.c +++ b/src/rig.c @@ -1368,6 +1368,7 @@ int HAMLIB_API rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq) #endif ) { + elapsed_ms(&rig->state.cache.time_freq, HAMLIB_ELAPSED_INVALIDATE); retcode = rig_get_freq(rig, vfo, &freq_new); if (retcode != RIG_OK) { return retcode; } ----------------------------------------------------------------------- Summary of changes: src/rig.c | 1 + 1 file changed, 1 insertion(+) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2020-07-02 17:31:30
|
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 df3285de60a3400cba0712fc4a35955b420fa962 (commit) from 1ad029bfb3322b3ef34f67d732c7e29ba450e979 (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 df3285de60a3400cba0712fc4a35955b420fa962 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Jul 2 12:31:09 2020 -0500 Add FT818 to rigs as copy of FT817 diff --git a/include/hamlib/riglist.h b/include/hamlib/riglist.h index 0c4c5ae6..559aa160 100644 --- a/include/hamlib/riglist.h +++ b/include/hamlib/riglist.h @@ -117,6 +117,7 @@ #define RIG_MODEL_FT847UNI RIG_MAKE_MODEL(RIG_YAESU, 38) #define RIG_MODEL_FT600 RIG_MAKE_MODEL(RIG_YAESU, 39) #define RIG_MODEL_FTDX101D RIG_MAKE_MODEL(RIG_YAESU, 40) +#define RIG_MODEL_FT818 RIG_MAKE_MODEL(RIG_YAESU, 41) /* diff --git a/rigs/yaesu/ft817.c b/rigs/yaesu/ft817.c index 1715f371..027ad8ca 100644 --- a/rigs/yaesu/ft817.c +++ b/rigs/yaesu/ft817.c @@ -297,6 +297,144 @@ const struct rig_caps ft817_caps = .vfo_op = ft817_vfo_op, }; +const struct rig_caps ft818_caps = +{ + RIG_MODEL(RIG_MODEL_FT818), + .model_name = "FT-818", + .mfg_name = "Yaesu", + .version = "20200629.0", + .copyright = "LGPL", + .status = RIG_STATUS_STABLE, + .rig_type = RIG_TYPE_TRANSCEIVER, + .ptt_type = RIG_PTT_RIG, + .dcd_type = RIG_DCD_RIG, + .port_type = RIG_PORT_SERIAL, + .serial_rate_min = 4800, + .serial_rate_max = 38400, + .serial_data_bits = 8, + .serial_stop_bits = 2, + .serial_parity = RIG_PARITY_NONE, + .serial_handshake = RIG_HANDSHAKE_NONE, + .write_delay = FT817_WRITE_DELAY, + .post_write_delay = FT817_POST_WRITE_DELAY, + .timeout = FT817_TIMEOUT, + .retry = 5, + .has_get_func = RIG_FUNC_NONE, + .has_set_func = RIG_FUNC_LOCK | RIG_FUNC_TONE | RIG_FUNC_TSQL, + .has_get_level = RIG_LEVEL_STRENGTH | RIG_LEVEL_RAWSTR | RIG_LEVEL_RFPOWER, + .has_set_level = RIG_LEVEL_NONE, + .has_get_parm = RIG_PARM_NONE, + .has_set_parm = RIG_PARM_NONE, + .level_gran = {}, /* granularity */ + .parm_gran = {}, + .ctcss_list = common_ctcss_list, + .dcs_list = common_dcs_list, /* only 104 out of 106 supported */ + .preamp = { RIG_DBLST_END, }, + .attenuator = { RIG_DBLST_END, }, + .max_rit = Hz(9990), + .max_xit = Hz(0), + .max_ifshift = Hz(0), + .vfo_ops = RIG_OP_TOGGLE, + .targetable_vfo = 0, + .transceive = RIG_TRN_OFF, + .bank_qty = 0, + .chan_desc_sz = 0, + .chan_list = { RIG_CHAN_END, }, + + .rx_range_list1 = { + {kHz(100), MHz(56), FT817_ALL_RX_MODES, -1, -1}, + {MHz(76), MHz(108), RIG_MODE_WFM, -1, -1}, + {MHz(118), MHz(164), FT817_ALL_RX_MODES, -1, -1}, + {MHz(420), MHz(470), FT817_ALL_RX_MODES, -1, -1}, + RIG_FRNG_END, + }, + .tx_range_list1 = { + FRQ_RNG_HF(1, FT817_OTHER_TX_MODES, W(0.5), W(5), FT817_VFO_ALL, FT817_ANTS), + FRQ_RNG_HF(1, FT817_AM_TX_MODES, W(0.5), W(1.5), FT817_VFO_ALL, FT817_ANTS), + + FRQ_RNG_6m(1, FT817_OTHER_TX_MODES, W(0.5), W(5), FT817_VFO_ALL, FT817_ANTS), + FRQ_RNG_6m(1, FT817_AM_TX_MODES, W(0.5), W(1.5), FT817_VFO_ALL, FT817_ANTS), + + FRQ_RNG_2m(1, FT817_OTHER_TX_MODES, W(0.5), W(5), FT817_VFO_ALL, FT817_ANTS), + FRQ_RNG_2m(1, FT817_AM_TX_MODES, W(0.5), W(1.5), FT817_VFO_ALL, FT817_ANTS), + + FRQ_RNG_70cm(1, FT817_OTHER_TX_MODES, W(0.5), W(5), FT817_VFO_ALL, FT817_ANTS), + FRQ_RNG_70cm(1, FT817_AM_TX_MODES, W(0.5), W(1.5), FT817_VFO_ALL, FT817_ANTS), + + RIG_FRNG_END, + }, + + + .rx_range_list2 = { + {kHz(100), MHz(56), FT817_ALL_RX_MODES, -1, -1}, + {MHz(76), MHz(108), RIG_MODE_WFM, -1, -1}, + {MHz(118), MHz(164), FT817_ALL_RX_MODES, -1, -1}, + {MHz(420), MHz(470), FT817_ALL_RX_MODES, -1, -1}, + RIG_FRNG_END, + }, + + .tx_range_list2 = { + FRQ_RNG_HF(2, FT817_OTHER_TX_MODES, W(0.5), W(5), FT817_VFO_ALL, FT817_ANTS), + FRQ_RNG_HF(2, FT817_AM_TX_MODES, W(0.5), W(1.5), FT817_VFO_ALL, FT817_ANTS), + /* FIXME: 60 meters in US version */ + + FRQ_RNG_6m(2, FT817_OTHER_TX_MODES, W(0.5), W(5), FT817_VFO_ALL, FT817_ANTS), + FRQ_RNG_6m(2, FT817_AM_TX_MODES, W(0.5), W(1.5), FT817_VFO_ALL, FT817_ANTS), + + FRQ_RNG_2m(2, FT817_OTHER_TX_MODES, W(0.5), W(5), FT817_VFO_ALL, FT817_ANTS), + FRQ_RNG_2m(2, FT817_AM_TX_MODES, W(0.5), W(1.5), FT817_VFO_ALL, FT817_ANTS), + + FRQ_RNG_70cm(2, FT817_OTHER_TX_MODES, W(0.5), W(5), FT817_VFO_ALL, FT817_ANTS), + FRQ_RNG_70cm(2, FT817_AM_TX_MODES, W(0.5), W(1.5), FT817_VFO_ALL, FT817_ANTS), + + RIG_FRNG_END, + }, + + .tuning_steps = { + {FT817_SSB_CW_RX_MODES, Hz(10)}, + {FT817_AM_FM_RX_MODES | RIG_MODE_WFM, Hz(100)}, + RIG_TS_END, + }, + + .filters = { + {FT817_SSB_CW_RX_MODES, kHz(2.2)}, /* normal passband */ + {FT817_CWN_RX_MODES, 500}, /* CW and RTTY narrow */ + {RIG_MODE_AM, kHz(6)}, /* AM normal */ + {RIG_MODE_FM | RIG_MODE_PKTFM, kHz(9)}, + {RIG_MODE_WFM, kHz(15)}, + RIG_FLT_END, + }, + + .str_cal = FT817_STR_CAL, + + .rig_init = ft817_init, + .rig_cleanup = ft817_cleanup, + .rig_open = ft817_open, + .rig_close = ft817_close, + .set_freq = ft817_set_freq, + .get_freq = ft817_get_freq, + .set_mode = ft817_set_mode, + .get_mode = ft817_get_mode, + .set_ptt = ft817_set_ptt, + .get_ptt = ft817_get_ptt, + .get_dcd = ft817_get_dcd, + .set_rptr_shift = ft817_set_rptr_shift, + .set_rptr_offs = ft817_set_rptr_offs, + .set_split_vfo = ft817_set_split_vfo, + .get_split_vfo = ft817_get_split_vfo, + .set_rit = ft817_set_rit, + .set_dcs_code = ft817_set_dcs_code, + .set_ctcss_tone = ft817_set_ctcss_tone, + .set_dcs_sql = ft817_set_dcs_sql, + .set_ctcss_sql = ft817_set_ctcss_sql, + .power2mW = ft817_power2mW, + .mW2power = ft817_mW2power, + .set_powerstat = ft817_set_powerstat, + .get_level = ft817_get_level, + .set_func = ft817_set_func, + .vfo_op = ft817_vfo_op, +}; + /* ---------------------------------------------------------------------- */ int ft817_init(RIG *rig) diff --git a/rigs/yaesu/yaesu.c b/rigs/yaesu/yaesu.c index 39c3d9ea..7a96a5b2 100644 --- a/rigs/yaesu/yaesu.c +++ b/rigs/yaesu/yaesu.c @@ -112,6 +112,7 @@ DECLARE_INITRIG_BACKEND(yaesu) rig_register(&ft891_caps); rig_register(&ft847uni_caps); rig_register(&ftdx101d_caps); + rig_register(&ft818_caps); return RIG_OK; } diff --git a/rigs/yaesu/yaesu.h b/rigs/yaesu/yaesu.h index 3b1bd3ce..8a5e5165 100644 --- a/rigs/yaesu/yaesu.h +++ b/rigs/yaesu/yaesu.h @@ -81,5 +81,6 @@ extern const struct rig_caps vx1700_caps; extern const struct rig_caps ft1200_caps; extern const struct rig_caps ft847uni_caps; extern const struct rig_caps ftdx101d_caps; +extern const struct rig_caps ft818_caps; #endif /* _YAESU_H */ ----------------------------------------------------------------------- Summary of changes: include/hamlib/riglist.h | 1 + rigs/yaesu/ft817.c | 138 +++++++++++++++++++++++++++++++++++++++++++++++ rigs/yaesu/yaesu.c | 1 + rigs/yaesu/yaesu.h | 1 + 4 files changed, 141 insertions(+) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2020-07-02 16:18: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 1ad029bfb3322b3ef34f67d732c7e29ba450e979 (commit) via 4cb0f2917e1816574456b5c1912f49d5ecc959cf (commit) via c12f5d3d55277603dc27b78248d1f3cabc9bcbd5 (commit) via 5a02969257d3829af9adbaca0fb5a68a106d1f2b (commit) via fa08887471dfc9755dfd59e396bd684fa6bf0f36 (commit) via 613b7a6830ac59ab914b73a50d2dad23d91d0c84 (commit) from bda6d1d12d819942000ea1871645f41d91069772 (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 1ad029bfb3322b3ef34f67d732c7e29ba450e979 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Jul 2 11:18:33 2020 -0500 astyle rig.c diff --git a/src/rig.c b/src/rig.c index ca0101bb..f4282f62 100644 --- a/src/rig.c +++ b/src/rig.c @@ -1268,7 +1268,8 @@ int HAMLIB_API rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq) const struct rig_caps *caps; int retcode; - rig_debug(RIG_DEBUG_VERBOSE, "%s called vfo=%s, freq=%g\n", __func__, rig_strvfo(vfo), freq); + rig_debug(RIG_DEBUG_VERBOSE, "%s called vfo=%s, freq=%g\n", __func__, + rig_strvfo(vfo), freq); if (CHECK_RIG_ARG(rig)) { commit 4cb0f2917e1816574456b5c1912f49d5ecc959cf Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Jul 2 11:15:27 2020 -0500 Fix rig_debug in rig.c diff --git a/src/rig.c b/src/rig.c index 8860c897..ca0101bb 100644 --- a/src/rig.c +++ b/src/rig.c @@ -1268,7 +1268,7 @@ int HAMLIB_API rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq) const struct rig_caps *caps; int retcode; - rig_debug(RIG_DEBUG_VERBOSE, "%s called vfo=%s\n", __func__, rig_strvfo(vfo)); + rig_debug(RIG_DEBUG_VERBOSE, "%s called vfo=%s, freq=%g\n", __func__, rig_strvfo(vfo), freq); if (CHECK_RIG_ARG(rig)) { @@ -1374,7 +1374,7 @@ int HAMLIB_API rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq) if (freq_new != freq) { - rig_debug(RIG_DEBUG_TRACE, "%s: Asked freq=%.0f, got freq=%.0f\n", __func__, + rig_debug(RIG_DEBUG_TRACE, "%s: Asked freq=%g, got freq=%g\n", __func__, freq, freq_new); } commit c12f5d3d55277603dc27b78248d1f3cabc9bcbd5 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Jul 2 11:14:30 2020 -0500 Remove unused var from flrig.c diff --git a/dummy/flrig.c b/dummy/flrig.c index 3eecaeab..2fecbdb9 100644 --- a/dummy/flrig.c +++ b/dummy/flrig.c @@ -1014,7 +1014,6 @@ static int flrig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) static int flrig_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { int retval; - char value[MAXXMLLEN]; char cmd_arg[MAXARGLEN]; char *cmd; struct flrig_priv_data *priv = (struct flrig_priv_data *) rig->state.priv; commit 5a02969257d3829af9adbaca0fb5a68a106d1f2b Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Jul 2 10:45:58 2020 -0500 Fix debug in flrig.c diff --git a/dummy/flrig.c b/dummy/flrig.c index 03f89383..3eecaeab 100644 --- a/dummy/flrig.c +++ b/dummy/flrig.c @@ -1044,13 +1044,13 @@ static int flrig_set_freq(RIG *rig, vfo_t vfo, freq_t freq) if (vfo == RIG_VFO_A) { cmd = "rig.set_vfoA"; - rig_debug(RIG_DEBUG_TRACE, "rig.set_vfoA %s", value); + rig_debug(RIG_DEBUG_TRACE, "rig.set_vfoA %.0f", freq); priv->curr_freqA = freq; } else { cmd = "rig.set_vfoB"; - rig_debug(RIG_DEBUG_TRACE, "rig.set_vfoA %s", value); + rig_debug(RIG_DEBUG_TRACE, "rig.set_vfoA %.0f", freq); priv->curr_freqB = freq; } commit fa08887471dfc9755dfd59e396bd684fa6bf0f36 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Jul 2 10:23:41 2020 -0500 Change hamlib_cache_t enums to HAMLIB namespace diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index fe9f12fa..ef9c4627 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -1903,12 +1903,12 @@ typedef hamlib_port_t port_t; #define HAMLIB_ELAPSED_INVALIDATE 2 typedef enum { - CACHE_ALL, // to set all cache timeouts at once - CACHE_VFO, - CACHE_FREQ, - CACHE_MODE, - CACHE_PTT, - CACHE_SPLIT + HAMLIB_CACHE_ALL, // to set all cache timeouts at once + HAMLIB_CACHE_VFO, + HAMLIB_CACHE_FREQ, + HAMLIB_CACHE_MODE, + HAMLIB_CACHE_PTT, + HAMLIB_CACHE_SPLIT } hamlib_cache_t; /** diff --git a/src/conf.c b/src/conf.c index f343f8db..43c8bed7 100644 --- a/src/conf.c +++ b/src/conf.c @@ -549,7 +549,7 @@ static int frontend_set_conf(RIG *rig, token_t token, const char *val) break; case TOK_CACHE_TIMEOUT: - rig_set_cache_timeout_ms(rig, CACHE_ALL, atol(val)); + rig_set_cache_timeout_ms(rig, HAMLIB_CACHE_ALL, atol(val)); break; default: @@ -861,7 +861,7 @@ static int frontend_get_conf(RIG *rig, token_t token, char *val) break; case TOK_CACHE_TIMEOUT: - sprintf(val, "%d", rig_get_cache_timeout_ms(rig, CACHE_ALL)); + sprintf(val, "%d", rig_get_cache_timeout_ms(rig, HAMLIB_CACHE_ALL)); break; default: diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 31c1d28c..a6b75b60 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -4598,7 +4598,7 @@ declare_proto_rig(set_cache) int ms; CHKSCN1ARG(sscanf(arg1, "%d", &ms)); - return rig_set_cache_timeout_ms(rig, CACHE_ALL, ms); + return rig_set_cache_timeout_ms(rig, HAMLIB_CACHE_ALL, ms); } @@ -4607,7 +4607,7 @@ declare_proto_rig(get_cache) { int ms; - ms = rig_get_cache_timeout_ms(rig, CACHE_ALL); + ms = rig_get_cache_timeout_ms(rig, HAMLIB_CACHE_ALL); if ((interactive && prompt) || (interactive && !prompt && ext_resp)) { commit 613b7a6830ac59ab914b73a50d2dad23d91d0c84 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Jul 2 09:40:48 2020 -0500 Add get_freq to set_freq for confirmation if < 100Hz interval Should correct incorrect cache reporting and doppler issues https://github.com/Hamlib/Hamlib/issues/334 diff --git a/src/rig.c b/src/rig.c index e781aa61..8860c897 100644 --- a/src/rig.c +++ b/src/rig.c @@ -1352,17 +1352,38 @@ int HAMLIB_API rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq) } } - if (retcode == RIG_OK - && (vfo == RIG_VFO_CURR - || vfo == rig->state.current_vfo)) - { - rig->state.current_freq = freq; - } - if (retcode == RIG_OK) { + freq_t freq_new = freq; + + // verify our freq to ensure HZ mods are seen + // some rigs truncate or round e.g. 1,2,5,10,20,100Hz intervals + // we'll try this all the time and if it works out OK eliminate the #else + + if ((unsigned long long)freq % 100 != 0 // only need to do if < 100Hz interval +#if 0 + // do we need to only do this when cache is turned on? 2020-07-02 W9MDB + && rig->state.cache.timeout_ms > 0 +#endif + ) + { + retcode = rig_get_freq(rig, vfo, &freq_new); + + if (retcode != RIG_OK) { return retcode; } + } + + if (freq_new != freq) + { + rig_debug(RIG_DEBUG_TRACE, "%s: Asked freq=%.0f, got freq=%.0f\n", __func__, + freq, + freq_new); + } + + // update our current freq too + if (vfo == RIG_VFO_CURR || vfo == rig->state.current_vfo) { rig->state.current_freq = freq_new; } + elapsed_ms(&rig->state.cache.time_ptt, HAMLIB_ELAPSED_SET); - rig->state.cache.freq = freq; + rig->state.cache.freq = freq_new; rig->state.cache.vfo_freq = vfo; } @@ -1460,9 +1481,9 @@ int HAMLIB_API rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) if ((caps->targetable_vfo & RIG_TARGETABLE_FREQ) || vfo == RIG_VFO_CURR || vfo == rig->state.current_vfo || (rig->state.vfo_opt == 1 && rig->caps->rig_model == RIG_MODEL_NETRIGCTL)) -{ - // If rig does not have set_vfo we need to change vfo - if (vfo == RIG_VFO_CURR && caps->set_vfo == NULL) + { + // If rig does not have set_vfo we need to change vfo + if (vfo == RIG_VFO_CURR && caps->set_vfo == NULL) { vfo = vfo_fixup(rig, RIG_VFO_A); rig_debug(RIG_DEBUG_TRACE, "%s: no set_vfo so vfo=%s\n", __func__, @@ -1540,29 +1561,29 @@ int HAMLIB_API rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) /* VFO compensation */ if (rig->state.vfo_comp != 0.0) -{ - *freq = (freq_t)(*freq / (1.0 + (double)rig->state.vfo_comp)); + { + *freq = (freq_t)(*freq / (1.0 + (double)rig->state.vfo_comp)); } if (retcode == RIG_OK && (vfo == RIG_VFO_CURR || vfo == rig->state.current_vfo)) -{ - rig->state.current_freq = *freq; -} + { + rig->state.current_freq = *freq; + } -if (rig->state.lo_freq != 0.0) -{ - *freq += rig->state.lo_freq; -} + if (rig->state.lo_freq != 0.0) + { + *freq += rig->state.lo_freq; + } -cache_ms = elapsed_ms(&(rig->state.cache.time_freq), HAMLIB_ELAPSED_SET); - rig_debug(RIG_DEBUG_TRACE, "%s: cache reset age=%dms, vfo=%s, freq=%.0f\n", - __func__, cache_ms, rig_strvfo(vfo), *freq); - rig->state.cache.freq = *freq; - rig->state.cache.vfo_freq = vfo; + cache_ms = elapsed_ms(&(rig->state.cache.time_freq), HAMLIB_ELAPSED_SET); + rig_debug(RIG_DEBUG_TRACE, "%s: cache reset age=%dms, vfo=%s, freq=%.0f\n", + __func__, cache_ms, rig_strvfo(vfo), *freq); + rig->state.cache.freq = *freq; + rig->state.cache.vfo_freq = vfo; - return retcode; + return retcode; } @@ -2030,7 +2051,8 @@ int HAMLIB_API rig_get_vfo(RIG *rig, vfo_t *vfo) if (CHECK_RIG_ARG(rig) || !vfo) { - rig_debug(RIG_DEBUG_ERR, "%s: no rig and/or vfo? rig=%p, vfo=%p\n", __func__, rig, vfo); + rig_debug(RIG_DEBUG_ERR, "%s: no rig and/or vfo? rig=%p, vfo=%p\n", __func__, + rig, vfo); return -RIG_EINVAL; } @@ -2071,7 +2093,8 @@ int HAMLIB_API rig_get_vfo(RIG *rig, vfo_t *vfo) if (retcode != RIG_OK) { - rig_debug(RIG_DEBUG_ERR, "%s: returning %d(%s)\n", __func__, retcode,rigerror(retcode)); + rig_debug(RIG_DEBUG_ERR, "%s: returning %d(%s)\n", __func__, retcode, + rigerror(retcode)); } return retcode; ----------------------------------------------------------------------- Summary of changes: dummy/flrig.c | 5 ++-- include/hamlib/rig.h | 12 ++++---- src/conf.c | 4 +-- src/rig.c | 82 +++++++++++++++++++++++++++++++++------------------- tests/rigctl_parse.c | 4 +-- 5 files changed, 65 insertions(+), 42 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2020-07-02 13:32: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 bda6d1d12d819942000ea1871645f41d91069772 (commit) from d42d837162915a4411a203da1b291a17ebc575ad (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 bda6d1d12d819942000ea1871645f41d91069772 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Jul 2 08:32:01 2020 -0500 Fix make check compilation diff --git a/tests/cachetest.c b/tests/cachetest.c index f92758f4..54342fd5 100644 --- a/tests/cachetest.c +++ b/tests/cachetest.c @@ -101,7 +101,7 @@ int main(int argc, char *argv[]) printf("Rig_info: '%s'\n", info_buf); } - elapsed_ms(&startall, ELAPSED_SET); + elapsed_ms(&startall, HAMLIB_ELAPSED_SET); for (i = 0; i < loops; ++i) { @@ -111,51 +111,54 @@ int main(int argc, char *argv[]) ptt_t ptt; split_t split; - elapsed_ms(&start, ELAPSED_SET); + elapsed_ms(&start, HAMLIB_ELAPSED_SET); retcode = rig_get_vfo(my_rig, &vfo); if (retcode != RIG_OK) { printf("Get vfo failed?? Err=%s\n", rigerror(retcode)); } - printf("%4dms: VFO = %s\n", (int)elapsed_ms(&start, ELAPSED_GET), + printf("%4dms: VFO = %s\n", (int)elapsed_ms(&start, HAMLIB_ELAPSED_GET), rig_strvfo(vfo)); - elapsed_ms(&start, ELAPSED_SET); + elapsed_ms(&start, HAMLIB_ELAPSED_SET); retcode = rig_get_freq(my_rig, RIG_VFO_CURR, &freq); if (retcode != RIG_OK) { printf("Get freq failed?? Err=%s\n", rigerror(retcode)); } - printf("%4dms: VFO freq. = %.1f Hz\n", (int)elapsed_ms(&start, ELAPSED_GET), + printf("%4dms: VFO freq. = %.1f Hz\n", (int)elapsed_ms(&start, + HAMLIB_ELAPSED_GET), freq); - elapsed_ms(&start, ELAPSED_SET); + elapsed_ms(&start, HAMLIB_ELAPSED_SET); retcode = rig_get_mode(my_rig, RIG_VFO_CURR, &mode, &width); if (retcode != RIG_OK) { printf("Get mode failed?? Err=%s\n", rigerror(retcode)); } printf("%4dms: Current mode = %s, width = %ld\n", (int)elapsed_ms(&start, - ELAPSED_GET), + HAMLIB_ELAPSED_GET), rig_strrmode(mode), width); - elapsed_ms(&start, ELAPSED_SET); + elapsed_ms(&start, HAMLIB_ELAPSED_SET); retcode = rig_get_ptt(my_rig, RIG_VFO_A, &ptt); if (retcode != RIG_OK) { printf("Get ptt failed?? Err=%s\n", rigerror(retcode)); } - printf("%4dms: ptt=%d\n", (int)elapsed_ms(&start, ELAPSED_GET), ptt); + printf("%4dms: ptt=%d\n", (int)elapsed_ms(&start, HAMLIB_ELAPSED_GET), ptt); #if 1 - elapsed_ms(&start, ELAPSED_SET); + elapsed_ms(&start, HAMLIB_ELAPSED_SET); retcode = rig_get_split_vfo(my_rig, RIG_VFO_A, &split, &vfo); if (retcode != RIG_OK) { printf("Get split_vfo failed?? Err=%s\n", rigerror(retcode)); } - printf("%4dms: split=%d, tx_vfo=%s\n", (int)elapsed_ms(&start, ELAPSED_GET), + printf("%4dms: split=%d, tx_vfo=%s\n", (int)elapsed_ms(&start, + HAMLIB_ELAPSED_GET), split, rig_strvfo(vfo)); #endif } - printf("Elapsed %gsec\n", (int)elapsed_ms(&startall, ELAPSED_GET) / 1000.0); + printf("Elapsed %gsec\n", (int)elapsed_ms(&startall, + HAMLIB_ELAPSED_GET) / 1000.0); rig_close(my_rig); return 0; ----------------------------------------------------------------------- Summary of changes: tests/cachetest.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2020-07-02 03:34:46
|
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 d42d837162915a4411a203da1b291a17ebc575ad (commit) from f454cff0b71bc1dbcbfe2d3918d7387049be26f4 (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 d42d837162915a4411a203da1b291a17ebc575ad Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Jul 1 22:33:32 2020 -0500 Normalize cache namespaces to hamlib_ and HAMLIB_ diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 86f2cbdb..fe9f12fa 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -1898,9 +1898,9 @@ typedef struct hamlib_port { typedef hamlib_port_t port_t; #endif -#define ELAPSED_GET 0 -#define ELAPSED_SET 1 -#define ELAPSED_INVALIDATE 2 +#define HAMLIB_ELAPSED_GET 0 +#define HAMLIB_ELAPSED_SET 1 +#define HAMLIB_ELAPSED_INVALIDATE 2 typedef enum { CACHE_ALL, // to set all cache timeouts at once @@ -1909,7 +1909,7 @@ typedef enum { CACHE_MODE, CACHE_PTT, CACHE_SPLIT -} cache_t; +} hamlib_cache_t; /** * \brief Rig cache data @@ -2739,8 +2739,8 @@ extern HAMLIB_EXPORT(const char *) rig_copyright HAMLIB_PARAMS(()); extern HAMLIB_EXPORT(void) rig_no_restore_ai(); -extern HAMLIB_EXPORT(int) rig_get_cache_timeout_ms(RIG *rig, cache_t selection); -extern HAMLIB_EXPORT(int) rig_set_cache_timeout_ms(RIG *rig, cache_t selection, int ms); +extern HAMLIB_EXPORT(int) rig_get_cache_timeout_ms(RIG *rig, hamlib_cache_t selection); +extern HAMLIB_EXPORT(int) rig_set_cache_timeout_ms(RIG *rig, hamlib_cache_t selection, int ms); extern HAMLIB_EXPORT(int) rig_set_vfo_opt(RIG *rig, int status); diff --git a/src/misc.c b/src/misc.c index 9c0ffdeb..b715a998 100644 --- a/src/misc.c +++ b/src/misc.c @@ -1262,7 +1262,7 @@ double HAMLIB_API elapsed_ms(struct timespec *start, int option) struct timespec stop; double elapsed_msec; - if (option == ELAPSED_SET) + if (option == HAMLIB_ELAPSED_SET) { start->tv_sec = start->tv_nsec = 0; } @@ -1273,7 +1273,7 @@ double HAMLIB_API elapsed_ms(struct timespec *start, int option) switch (option) { - case ELAPSED_GET: + case HAMLIB_ELAPSED_GET: if (start->tv_nsec == 0) // if we haven't done SET yet { clock_gettime(CLOCK_REALTIME, start); @@ -1283,14 +1283,14 @@ double HAMLIB_API elapsed_ms(struct timespec *start, int option) clock_gettime(CLOCK_REALTIME, &stop); break; - case ELAPSED_SET: + case HAMLIB_ELAPSED_SET: clock_gettime(CLOCK_REALTIME, start); rig_debug(RIG_DEBUG_TRACE, "%s: after gettime, start = %ld,%ld\n", __func__, (long)start->tv_sec, (long)start->tv_nsec); return 999 * 1000; // so we can tell the difference in debug where we came from break; - case ELAPSED_INVALIDATE: + case HAMLIB_ELAPSED_INVALIDATE: clock_gettime(CLOCK_REALTIME, start); start->tv_sec -= 3600; break; @@ -1301,18 +1301,18 @@ double HAMLIB_API elapsed_ms(struct timespec *start, int option) rig_debug(RIG_DEBUG_TRACE, "%s: elapsed_msecs=%g\n", __func__, elapsed_msec); - if (elapsed_msec < 0 || option == ELAPSED_INVALIDATE) { return 1000000; } + if (elapsed_msec < 0 || option == HAMLIB_ELAPSED_INVALIDATE) { return 1000000; } return elapsed_msec; } -int HAMLIB_API rig_get_cache_timeout_ms(RIG *rig, cache_t selection) +int HAMLIB_API rig_get_cache_timeout_ms(RIG *rig, hamlib_cache_t selection) { rig_debug(RIG_DEBUG_TRACE, "%s: called selection=%d\n", __func__, selection); return rig->state.cache.timeout_ms; } -int HAMLIB_API rig_set_cache_timeout_ms(RIG *rig, cache_t selection, int ms) +int HAMLIB_API rig_set_cache_timeout_ms(RIG *rig, hamlib_cache_t selection, int ms) { rig_debug(RIG_DEBUG_TRACE, "%s: called selection=%d, ms=%d\n", __func__, selection, ms); diff --git a/src/rig.c b/src/rig.c index 91526c1b..e781aa61 100644 --- a/src/rig.c +++ b/src/rig.c @@ -1361,7 +1361,7 @@ int HAMLIB_API rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq) if (retcode == RIG_OK) { - elapsed_ms(&rig->state.cache.time_ptt, ELAPSED_SET); + elapsed_ms(&rig->state.cache.time_ptt, HAMLIB_ELAPSED_SET); rig->state.cache.freq = freq; rig->state.cache.vfo_freq = vfo; } @@ -1432,7 +1432,7 @@ int HAMLIB_API rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) } - cache_ms = elapsed_ms(&rig->state.cache.time_freq, ELAPSED_GET); + cache_ms = elapsed_ms(&rig->state.cache.time_freq, HAMLIB_ELAPSED_GET); rig_debug(RIG_DEBUG_TRACE, "%s: cache check age=%dms\n", __func__, cache_ms); if (cache_ms < rig->state.cache.timeout_ms && rig->state.cache.vfo_freq == vfo) @@ -1481,7 +1481,7 @@ int HAMLIB_API rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) case RIG_VFO_MAIN: case RIG_VFO_MAIN_A: rig->state.cache.freqMainA = *freq; - elapsed_ms(&rig->state.cache.time_freqMainA, ELAPSED_SET); + elapsed_ms(&rig->state.cache.time_freqMainA, HAMLIB_ELAPSED_SET); rig->state.cache.freqMainA = *freq; break; @@ -1489,17 +1489,17 @@ int HAMLIB_API rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) case RIG_VFO_SUB: case RIG_VFO_MAIN_B: rig->state.cache.freqMainB = *freq; - elapsed_ms(&rig->state.cache.time_freqMainB, ELAPSED_SET); + elapsed_ms(&rig->state.cache.time_freqMainB, HAMLIB_ELAPSED_SET); break; case RIG_VFO_SUB_A: rig->state.cache.freqSubA = *freq; - elapsed_ms(&rig->state.cache.time_freqSubA, ELAPSED_SET); + elapsed_ms(&rig->state.cache.time_freqSubA, HAMLIB_ELAPSED_SET); break; case RIG_VFO_SUB_B: rig->state.cache.freqSubB = *freq; - elapsed_ms(&rig->state.cache.time_freqSubB, ELAPSED_SET); + elapsed_ms(&rig->state.cache.time_freqSubB, HAMLIB_ELAPSED_SET); break; } @@ -1528,7 +1528,7 @@ int HAMLIB_API rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) if (RIG_OK == retcode) { - cache_ms = elapsed_ms(&(rig->state.cache.time_freq), ELAPSED_SET); + cache_ms = elapsed_ms(&(rig->state.cache.time_freq), HAMLIB_ELAPSED_SET); rig_debug(RIG_DEBUG_TRACE, "%s: cache reset age=%dms, vfo=%s, freq=%.0f\n", __func__, cache_ms, rig_strvfo(vfo), *freq); rig->state.cache.freq = *freq; @@ -1556,7 +1556,7 @@ if (rig->state.lo_freq != 0.0) } -cache_ms = elapsed_ms(&(rig->state.cache.time_freq), ELAPSED_SET); +cache_ms = elapsed_ms(&(rig->state.cache.time_freq), HAMLIB_ELAPSED_SET); rig_debug(RIG_DEBUG_TRACE, "%s: cache reset age=%dms, vfo=%s, freq=%.0f\n", __func__, cache_ms, rig_strvfo(vfo), *freq); rig->state.cache.freq = *freq; @@ -1648,7 +1648,7 @@ int HAMLIB_API rig_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) rig->state.cache.mode = mode; rig->state.cache.vfo_mode = vfo; - elapsed_ms(&rig->state.cache.time_mode, ELAPSED_SET); + elapsed_ms(&rig->state.cache.time_mode, HAMLIB_ELAPSED_SET); return retcode; } @@ -1696,7 +1696,7 @@ int HAMLIB_API rig_get_mode(RIG *rig, return -RIG_ENAVAIL; } - cache_ms = elapsed_ms(&rig->state.cache.time_mode, ELAPSED_GET); + cache_ms = elapsed_ms(&rig->state.cache.time_mode, HAMLIB_ELAPSED_GET); rig_debug(RIG_DEBUG_TRACE, "%s: cache check age=%dms\n", __func__, cache_ms); if (cache_ms < rig->state.cache.timeout_ms && rig->state.cache.vfo_mode == vfo) @@ -1761,7 +1761,7 @@ int HAMLIB_API rig_get_mode(RIG *rig, rig->state.cache.mode = *mode; rig->state.cache.width = *width; rig->state.cache.vfo_mode = vfo; - cache_ms = elapsed_ms(&rig->state.cache.time_mode, ELAPSED_SET); + cache_ms = elapsed_ms(&rig->state.cache.time_mode, HAMLIB_ELAPSED_SET); return retcode; } @@ -1995,9 +1995,9 @@ int HAMLIB_API rig_set_vfo(RIG *rig, vfo_t vfo) } // expire several cached items when we switch VFOs - elapsed_ms(&rig->state.cache.time_vfo, ELAPSED_INVALIDATE); - elapsed_ms(&rig->state.cache.time_freq, ELAPSED_INVALIDATE); - elapsed_ms(&rig->state.cache.time_mode, ELAPSED_INVALIDATE); + elapsed_ms(&rig->state.cache.time_vfo, HAMLIB_ELAPSED_INVALIDATE); + elapsed_ms(&rig->state.cache.time_freq, HAMLIB_ELAPSED_INVALIDATE); + elapsed_ms(&rig->state.cache.time_mode, HAMLIB_ELAPSED_INVALIDATE); rig_debug(RIG_DEBUG_TRACE, "%s: return %d, vfo=%s\n", __func__, retcode, rig_strvfo(vfo)); @@ -2042,7 +2042,7 @@ int HAMLIB_API rig_get_vfo(RIG *rig, vfo_t *vfo) return -RIG_ENAVAIL; } - cache_ms = elapsed_ms(&rig->state.cache.time_vfo, ELAPSED_GET); + cache_ms = elapsed_ms(&rig->state.cache.time_vfo, HAMLIB_ELAPSED_GET); rig_debug(RIG_DEBUG_TRACE, "%s: cache check age=%dms\n", __func__, cache_ms); if (cache_ms < rig->state.cache.timeout_ms) @@ -2062,11 +2062,11 @@ int HAMLIB_API rig_get_vfo(RIG *rig, vfo_t *vfo) { rig->state.current_vfo = *vfo; rig->state.cache.vfo = *vfo; - cache_ms = elapsed_ms(&rig->state.cache.time_vfo, ELAPSED_SET); + cache_ms = elapsed_ms(&rig->state.cache.time_vfo, HAMLIB_ELAPSED_SET); } else { - cache_ms = elapsed_ms(&rig->state.cache.time_vfo, ELAPSED_INVALIDATE); + cache_ms = elapsed_ms(&rig->state.cache.time_vfo, HAMLIB_ELAPSED_INVALIDATE); } if (retcode != RIG_OK) @@ -2273,7 +2273,7 @@ int HAMLIB_API rig_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) } rig->state.cache.ptt = ptt; - elapsed_ms(&rig->state.cache.time_ptt, ELAPSED_SET); + elapsed_ms(&rig->state.cache.time_ptt, HAMLIB_ELAPSED_SET); if (retcode != RIG_OK) { rig_debug(RIG_DEBUG_ERR, "%s: return code=%d\n", __func__, retcode); } @@ -2311,7 +2311,7 @@ int HAMLIB_API rig_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) return -RIG_EINVAL; } - cache_ms = elapsed_ms(&rig->state.cache.time_ptt, ELAPSED_GET); + cache_ms = elapsed_ms(&rig->state.cache.time_ptt, HAMLIB_ELAPSED_GET); rig_debug(RIG_DEBUG_TRACE, "%s: cache check age=%dms\n", __func__, cache_ms); if (cache_ms < rig->state.cache.timeout_ms) @@ -2346,7 +2346,7 @@ int HAMLIB_API rig_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) if (retcode == RIG_OK) { rig->state.cache.ptt = *ptt; - elapsed_ms(&rig->state.cache.time_ptt, ELAPSED_SET); + elapsed_ms(&rig->state.cache.time_ptt, HAMLIB_ELAPSED_SET); } return retcode; @@ -2374,7 +2374,7 @@ int HAMLIB_API rig_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) /* return the first error code */ retcode = rc2; rig->state.cache.ptt = *ptt; - elapsed_ms(&rig->state.cache.time_ptt, ELAPSED_SET); + elapsed_ms(&rig->state.cache.time_ptt, HAMLIB_ELAPSED_SET); } return retcode; @@ -2386,7 +2386,7 @@ int HAMLIB_API rig_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) if (retcode == RIG_OK) { - elapsed_ms(&rig->state.cache.time_ptt, ELAPSED_SET); + elapsed_ms(&rig->state.cache.time_ptt, HAMLIB_ELAPSED_SET); rig->state.cache.ptt = *ptt; } @@ -2407,7 +2407,7 @@ int HAMLIB_API rig_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) } rig->state.cache.ptt = *ptt; - elapsed_ms(&rig->state.cache.time_ptt, ELAPSED_SET); + elapsed_ms(&rig->state.cache.time_ptt, HAMLIB_ELAPSED_SET); return retcode; case RIG_PTT_SERIAL_DTR: @@ -2417,7 +2417,7 @@ int HAMLIB_API rig_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) if (retcode == RIG_OK) { - elapsed_ms(&rig->state.cache.time_ptt, ELAPSED_SET); + elapsed_ms(&rig->state.cache.time_ptt, HAMLIB_ELAPSED_SET); rig->state.cache.ptt = *ptt; } @@ -2438,7 +2438,7 @@ int HAMLIB_API rig_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) } rig->state.cache.ptt = *ptt; - elapsed_ms(&rig->state.cache.time_ptt, ELAPSED_SET); + elapsed_ms(&rig->state.cache.time_ptt, HAMLIB_ELAPSED_SET); return retcode; case RIG_PTT_PARALLEL: @@ -2448,7 +2448,7 @@ int HAMLIB_API rig_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) if (retcode == RIG_OK) { - elapsed_ms(&rig->state.cache.time_ptt, ELAPSED_SET); + elapsed_ms(&rig->state.cache.time_ptt, HAMLIB_ELAPSED_SET); rig->state.cache.ptt = *ptt; } @@ -2459,7 +2459,7 @@ int HAMLIB_API rig_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) if (retcode == RIG_OK) { - elapsed_ms(&rig->state.cache.time_ptt, ELAPSED_SET); + elapsed_ms(&rig->state.cache.time_ptt, HAMLIB_ELAPSED_SET); rig->state.cache.ptt = *ptt; } @@ -2472,7 +2472,7 @@ int HAMLIB_API rig_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) if (retcode == RIG_OK) { - elapsed_ms(&rig->state.cache.time_ptt, ELAPSED_SET); + elapsed_ms(&rig->state.cache.time_ptt, HAMLIB_ELAPSED_SET); rig->state.cache.ptt = *ptt; } @@ -2483,7 +2483,7 @@ int HAMLIB_API rig_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) if (retcode == RIG_OK) { - elapsed_ms(&rig->state.cache.time_ptt, ELAPSED_SET); + elapsed_ms(&rig->state.cache.time_ptt, HAMLIB_ELAPSED_SET); rig->state.cache.ptt = *ptt; } @@ -2497,14 +2497,14 @@ int HAMLIB_API rig_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) if (retcode == RIG_OK) { - elapsed_ms(&rig->state.cache.time_ptt, ELAPSED_SET); + elapsed_ms(&rig->state.cache.time_ptt, HAMLIB_ELAPSED_SET); rig->state.cache.ptt = *ptt; } return retcode; } - elapsed_ms(&rig->state.cache.time_ptt, ELAPSED_SET); + elapsed_ms(&rig->state.cache.time_ptt, HAMLIB_ELAPSED_SET); return gpio_ptt_get(&rig->state.pttport, ptt); case RIG_PTT_NONE: @@ -2514,7 +2514,7 @@ int HAMLIB_API rig_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) return -RIG_EINVAL; } - elapsed_ms(&rig->state.cache.time_ptt, ELAPSED_SET); + elapsed_ms(&rig->state.cache.time_ptt, HAMLIB_ELAPSED_SET); return RIG_OK; } @@ -3523,7 +3523,7 @@ int HAMLIB_API rig_set_split_vfo(RIG *rig, rig->state.cache.split = split; rig->state.cache.split_vfo = tx_vfo; - elapsed_ms(&rig->state.cache.time_split, ELAPSED_SET); + elapsed_ms(&rig->state.cache.time_split, HAMLIB_ELAPSED_SET); return retcode; } @@ -3558,7 +3558,7 @@ int HAMLIB_API rig_set_split_vfo(RIG *rig, rig->state.cache.split = split; rig->state.cache.split_vfo = tx_vfo; - elapsed_ms(&rig->state.cache.time_split, ELAPSED_SET); + elapsed_ms(&rig->state.cache.time_split, HAMLIB_ELAPSED_SET); return retcode; } @@ -3608,7 +3608,7 @@ int HAMLIB_API rig_get_split_vfo(RIG *rig, return -RIG_ENAVAIL; } - cache_ms = elapsed_ms(&rig->state.cache.time_split, ELAPSED_GET); + cache_ms = elapsed_ms(&rig->state.cache.time_split, HAMLIB_ELAPSED_GET); rig_debug(RIG_DEBUG_TRACE, "%s: cache check age=%dms\n", __func__, cache_ms); if (cache_ms < rig->state.cache.timeout_ms) @@ -3633,7 +3633,7 @@ int HAMLIB_API rig_get_split_vfo(RIG *rig, retcode = caps->get_split_vfo(rig, vfo, split, tx_vfo); rig->state.cache.split = *split; rig->state.cache.split_vfo = *tx_vfo; - elapsed_ms(&rig->state.cache.time_split, ELAPSED_SET); + elapsed_ms(&rig->state.cache.time_split, HAMLIB_ELAPSED_SET); return retcode; } @@ -3670,7 +3670,7 @@ int HAMLIB_API rig_get_split_vfo(RIG *rig, { rig->state.cache.split = *split; rig->state.cache.split_vfo = *tx_vfo; - elapsed_ms(&rig->state.cache.time_split, ELAPSED_SET); + elapsed_ms(&rig->state.cache.time_split, HAMLIB_ELAPSED_SET); } return retcode; ----------------------------------------------------------------------- Summary of changes: include/hamlib/rig.h | 12 ++++----- src/misc.c | 14 +++++----- src/rig.c | 74 ++++++++++++++++++++++++++-------------------------- 3 files changed, 50 insertions(+), 50 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2020-07-01 21:44: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 f454cff0b71bc1dbcbfe2d3918d7387049be26f4 (commit) from c332036efe325b94e827196f34eaf928de3b0d60 (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 f454cff0b71bc1dbcbfe2d3918d7387049be26f4 Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Jul 1 08:52:44 2020 -0500 Add check for -s switch on all utils to ensure integer is entered diff --git a/tests/ampctl.c b/tests/ampctl.c index 1fc31f27..1e7e9381 100644 --- a/tests/ampctl.c +++ b/tests/ampctl.c @@ -142,6 +142,7 @@ int main(int argc, char *argv[]) { int c; int option_index = 0; + char dummy[2]; c = getopt_long(argc, argv, @@ -191,7 +192,12 @@ int main(int argc, char *argv[]) exit(1); } - serial_rate = atoi(optarg); + if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) + { + fprintf(stderr, "Invalid baud rate of %s\n", optarg); + exit(1); + } + break; case 'C': diff --git a/tests/ampctld.c b/tests/ampctld.c index dde43452..e5244eae 100644 --- a/tests/ampctld.c +++ b/tests/ampctld.c @@ -185,6 +185,7 @@ int main(int argc, char *argv[]) { int c; int option_index = 0; + char dummy[2]; c = getopt_long(argc, argv, SHORT_OPTIONS, long_options, &option_index); @@ -230,7 +231,12 @@ int main(int argc, char *argv[]) exit(1); } - serial_rate = atoi(optarg); + if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) + { + fprintf(stderr, "Invalid baud rate of %s\n", optarg); + exit(1); + } + break; case 'C': diff --git a/tests/rigctl.c b/tests/rigctl.c index 901a7e81..2c9d7800 100644 --- a/tests/rigctl.c +++ b/tests/rigctl.c @@ -158,6 +158,7 @@ int main(int argc, char *argv[]) { int c; int option_index = 0; + char dummy[2]; c = getopt_long(argc, argv, @@ -353,7 +354,12 @@ int main(int argc, char *argv[]) exit(1); } - serial_rate = atoi(optarg); + if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) + { + fprintf(stderr, "Invalid baud rate of %s\n", optarg); + exit(1); + } + break; case 'C': diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index a4e9d084..31c1d28c 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -4085,9 +4085,9 @@ declare_proto_rig(dump_state) // backward compatible as new values will just generate warnings if (chk_vfo_executed) // for 3.3 compatiblility { - fprintf(fout, "vfo_ops=0x%x\n", rig->caps->vfo_ops); - fprintf(fout, "ptt_type=0x%x\n", rig->state.pttport.type.ptt); - fprintf(fout, "done\n"); + fprintf(fout, "vfo_ops=0x%x\n", rig->caps->vfo_ops); + fprintf(fout, "ptt_type=0x%x\n", rig->state.pttport.type.ptt); + fprintf(fout, "done\n"); } #if 0 // why isn't this implemented? Does anybody care? diff --git a/tests/rigctlcom.c b/tests/rigctlcom.c index 118d11f3..eda52b98 100644 --- a/tests/rigctlcom.c +++ b/tests/rigctlcom.c @@ -227,6 +227,7 @@ int main(int argc, char *argv[]) { int c; int option_index = 0; + char dummy[2]; c = getopt_long(argc, argv, @@ -393,7 +394,12 @@ int main(int argc, char *argv[]) exit(1); } - serial_rate = atoi(optarg); + if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) + { + fprintf(stderr, "Invalid baud rate of %s\n", optarg); + exit(1); + } + break; case 'S': diff --git a/tests/rigctld.c b/tests/rigctld.c index cc00e516..2b0baea7 100644 --- a/tests/rigctld.c +++ b/tests/rigctld.c @@ -265,6 +265,7 @@ int main(int argc, char *argv[]) { int c; int option_index = 0; + char dummy[2]; c = getopt_long(argc, argv, @@ -442,7 +443,12 @@ int main(int argc, char *argv[]) exit(1); } - serial_rate = atoi(optarg); + if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) + { + fprintf(stderr, "Invalid baud rate of %s\n", optarg); + exit(1); + } + break; case 'C': diff --git a/tests/rigmem.c b/tests/rigmem.c index 029f77e4..ca079663 100644 --- a/tests/rigmem.c +++ b/tests/rigmem.c @@ -115,6 +115,7 @@ int main(int argc, char *argv[]) { int c; int option_index = 0; + char dummy[2]; c = getopt_long(argc, argv, SHORT_OPTIONS, long_options, &option_index); @@ -170,7 +171,12 @@ int main(int argc, char *argv[]) exit(1); } - serial_rate = atoi(optarg); + if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) + { + fprintf(stderr, "Invalid baud rate of %s\n", optarg); + exit(1); + } + break; case 'C': diff --git a/tests/rigsmtr.c b/tests/rigsmtr.c index 071814e2..c27cb7c8 100644 --- a/tests/rigsmtr.c +++ b/tests/rigsmtr.c @@ -99,6 +99,7 @@ int main(int argc, char *argv[]) { int c; int option_index = 0; + char dummy[2]; c = getopt_long(argc, argv, SHORT_OPTIONS, long_options, &option_index); @@ -154,7 +155,12 @@ int main(int argc, char *argv[]) exit(1); } - serial_rate = atoi(optarg); + if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) + { + fprintf(stderr, "Invalid baud rate of %s\n", optarg); + exit(1); + } + break; case 'C': diff --git a/tests/rigswr.c b/tests/rigswr.c index 2901fe42..62bb949e 100644 --- a/tests/rigswr.c +++ b/tests/rigswr.c @@ -89,6 +89,7 @@ int main(int argc, char *argv[]) { int c; int option_index = 0; + char dummy[2]; c = getopt_long(argc, argv, SHORT_OPTIONS, long_options, &option_index); @@ -144,7 +145,12 @@ int main(int argc, char *argv[]) exit(1); } - serial_rate = atoi(optarg); + if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) + { + fprintf(stderr, "Invalid baud rate of %s\n", optarg); + exit(1); + } + break; case 'C': diff --git a/tests/rotctl.c b/tests/rotctl.c index f90fade1..dbcae748 100644 --- a/tests/rotctl.c +++ b/tests/rotctl.c @@ -147,6 +147,7 @@ int main(int argc, char *argv[]) { int c; int option_index = 0; + char dummy[2]; c = getopt_long(argc, argv, @@ -196,7 +197,12 @@ int main(int argc, char *argv[]) exit(1); } - serial_rate = atoi(optarg); + if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) + { + fprintf(stderr, "Invalid baud rate of %s\n", optarg); + exit(1); + } + break; case 'C': diff --git a/tests/rotctld.c b/tests/rotctld.c index 7c51f9bb..ffc33bbc 100644 --- a/tests/rotctld.c +++ b/tests/rotctld.c @@ -179,6 +179,7 @@ int main(int argc, char *argv[]) { int c; int option_index = 0; + char dummy[2]; c = getopt_long(argc, argv, SHORT_OPTIONS, long_options, &option_index); @@ -224,7 +225,12 @@ int main(int argc, char *argv[]) exit(1); } - serial_rate = atoi(optarg); + if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) + { + fprintf(stderr, "Invalid baud rate of %s\n", optarg); + exit(1); + } + break; case 'C': ----------------------------------------------------------------------- Summary of changes: tests/ampctl.c | 8 +++++++- tests/ampctld.c | 8 +++++++- tests/rigctl.c | 8 +++++++- tests/rigctl_parse.c | 6 +++--- tests/rigctlcom.c | 8 +++++++- tests/rigctld.c | 8 +++++++- tests/rigmem.c | 8 +++++++- tests/rigsmtr.c | 8 +++++++- tests/rigswr.c | 8 +++++++- tests/rotctl.c | 8 +++++++- tests/rotctld.c | 8 +++++++- 11 files changed, 73 insertions(+), 13 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2020-06-29 12:56:16
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via c332036efe325b94e827196f34eaf928de3b0d60 (commit) via 555dba37fb038c559607405507023ba956af444c (commit) from 3fbaeaf871cc6f0cc72e018a31d392aba36270b0 (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 c332036efe325b94e827196f34eaf928de3b0d60 Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Jun 29 07:55:55 2020 -0500 astyle ft817.c diff --git a/rigs/yaesu/ft817.c b/rigs/yaesu/ft817.c index fbdfc8ba..1715f371 100644 --- a/rigs/yaesu/ft817.c +++ b/rigs/yaesu/ft817.c @@ -392,6 +392,7 @@ static int ft817_read_eeprom(RIG *rig, unsigned short addr, unsigned char *out) unsigned char data[YAESU_CMD_LENGTH]; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); memcpy(data, (char *)p->pcs[FT817_NATIVE_CAT_EEPROM_READ].nseq, YAESU_CMD_LENGTH); @@ -424,6 +425,8 @@ static int ft817_get_status(RIG *rig, int status) int n; int retries = rig->state.rigport.retry; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + switch (status) { case FT817_NATIVE_CAT_GET_FREQ_MODE_STATUS: @@ -493,6 +496,8 @@ int ft817_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) int retries = rig->state.rigport.retry + 1; // +1 because, because 2 steps are needed even in best scenario + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + while ((f1 == 0 || f1 != f2) && retries-- > 0) { rig_debug(RIG_DEBUG_TRACE, "%s: retries=%d\n", __func__, retries); @@ -523,6 +528,8 @@ int ft817_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) { struct ft817_priv_data *p = (struct ft817_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (check_cache_timeout(&p->fm_status_tv)) { int n; @@ -604,6 +611,8 @@ int ft817_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo) struct ft817_priv_data *p = (struct ft817_priv_data *) rig->state.priv; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (check_cache_timeout(&p->tx_status_tv)) if ((n = ft817_get_status(rig, FT817_NATIVE_CAT_GET_TX_STATUS)) < 0) { @@ -634,6 +643,8 @@ int ft817_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) { struct ft817_priv_data *p = (struct ft817_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (check_cache_timeout(&p->tx_status_tv)) { int n; @@ -653,6 +664,8 @@ static int ft817_get_pometer_level(RIG *rig, value_t *val) { struct ft817_priv_data *p = (struct ft817_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (check_cache_timeout(&p->tx_status_tv)) { int n; @@ -687,6 +700,8 @@ static int ft817_get_smeter_level(RIG *rig, value_t *val) struct ft817_priv_data *p = (struct ft817_priv_data *) rig->state.priv; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (check_cache_timeout(&p->rx_status_tv)) if ((n = ft817_get_status(rig, FT817_NATIVE_CAT_GET_RX_STATUS)) < 0) { @@ -725,6 +740,8 @@ static int ft817_get_raw_smeter_level(RIG *rig, value_t *val) { struct ft817_priv_data *p = (struct ft817_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (check_cache_timeout(&p->rx_status_tv)) { int n; @@ -770,6 +787,8 @@ int ft817_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd) { struct ft817_priv_data *p = (struct ft817_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (check_cache_timeout(&p->rx_status_tv)) { int n; @@ -800,13 +819,17 @@ int ft817_read_ack(RIG *rig) char dummy; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (rig->state.rigport.post_write_delay == 0) { if ((n = read_block(&rig->state.rigport, &dummy, 1)) < 0) { rig_debug(RIG_DEBUG_ERR, "%s: error reading ack\n", __func__); - rig_debug(RIG_DEBUG_ERR, "%s: adjusting post_write_delay to avoid ack\n", __func__); - rig->state.rigport.post_write_delay = 10; // arbitrary choice right now of max 100 cmds/sec + rig_debug(RIG_DEBUG_ERR, "%s: adjusting post_write_delay to avoid ack\n", + __func__); + rig->state.rigport.post_write_delay = + 10; // arbitrary choice right now of max 100 cmds/sec return RIG_OK; // let it continue without checking for ack now } @@ -829,6 +852,8 @@ static int ft817_send_cmd(RIG *rig, int index) { struct ft817_priv_data *p = (struct ft817_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (p->pcs[index].ncomp == 0) { rig_debug(RIG_DEBUG_VERBOSE, "%s: Incomplete sequence\n", __func__); @@ -847,6 +872,8 @@ static int ft817_send_icmd(RIG *rig, int index, unsigned char *data) struct ft817_priv_data *p = (struct ft817_priv_data *) rig->state.priv; unsigned char cmd[YAESU_CMD_LENGTH]; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (p->pcs[index].ncomp == 1) { rig_debug(RIG_DEBUG_VERBOSE, "%s: Complete sequence\n", __func__); @@ -998,6 +1025,8 @@ int ft817_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) int ft817_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) { + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + switch (func) { case RIG_FUNC_LOCK: @@ -1205,6 +1234,8 @@ int ft817_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit) int ft817_set_powerstat(RIG *rig, powerstat_t status) { + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + switch (status) { case RIG_POWER_OFF: @@ -1221,6 +1252,8 @@ int ft817_set_powerstat(RIG *rig, powerstat_t status) int ft817_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op) { + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + switch (op) { int n; @@ -1287,6 +1320,7 @@ int ft817_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) int ft817_power2mW(RIG *rig, unsigned int *mwpower, float power, freq_t freq, rmode_t mode) { + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); *mwpower = (int)(power * 6000); return RIG_OK; } @@ -1296,6 +1330,7 @@ int ft817_power2mW(RIG *rig, unsigned int *mwpower, float power, int ft817_mW2power(RIG *rig, float *power, unsigned int mwpower, freq_t freq, rmode_t mode) { + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); *power = mwpower / 6000.0; return RIG_OK; } commit 555dba37fb038c559607405507023ba956af444c Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Jun 29 07:50:55 2020 -0500 Add debug to FT817/857/897 Add fallback to non-ack protocol with 10ms post_write_delay if ack error occurs https://github.com/Hamlib/Hamlib/issues/330 diff --git a/rigs/yaesu/ft817.c b/rigs/yaesu/ft817.c index 266c6715..fbdfc8ba 100644 --- a/rigs/yaesu/ft817.c +++ b/rigs/yaesu/ft817.c @@ -164,7 +164,7 @@ const struct rig_caps ft817_caps = RIG_MODEL(RIG_MODEL_FT817), .model_name = "FT-817", .mfg_name = "Yaesu", - .version = "20200625.0", + .version = "20200629.0", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -805,7 +805,9 @@ int ft817_read_ack(RIG *rig) if ((n = read_block(&rig->state.rigport, &dummy, 1)) < 0) { rig_debug(RIG_DEBUG_ERR, "%s: error reading ack\n", __func__); - return n; + rig_debug(RIG_DEBUG_ERR, "%s: adjusting post_write_delay to avoid ack\n", __func__); + rig->state.rigport.post_write_delay = 10; // arbitrary choice right now of max 100 cmds/sec + return RIG_OK; // let it continue without checking for ack now } rig_debug(RIG_DEBUG_TRACE, "%s: ack received (%d)\n", __func__, dummy); diff --git a/rigs/yaesu/ft857.c b/rigs/yaesu/ft857.c index de7c2480..518f7ba8 100644 --- a/rigs/yaesu/ft857.c +++ b/rigs/yaesu/ft857.c @@ -383,6 +383,7 @@ static int ft857_read_eeprom(RIG *rig, unsigned short addr, unsigned char *out) unsigned char data[YAESU_CMD_LENGTH]; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); memcpy(data, (char *)p->pcs[FT857_NATIVE_CAT_EEPROM_READ].nseq, YAESU_CMD_LENGTH); @@ -414,6 +415,8 @@ static int ft857_get_status(RIG *rig, int status) int len; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + switch (status) { case FT857_NATIVE_CAT_GET_FREQ_MODE_STATUS: @@ -477,6 +480,8 @@ static int ft857_send_cmd(RIG *rig, int index) { struct ft857_priv_data *p = (struct ft857_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (p->pcs[index].ncomp == 0) { rig_debug(RIG_DEBUG_VERBOSE, "%s: incomplete sequence\n", __func__); @@ -495,6 +500,8 @@ static int ft857_send_icmd(RIG *rig, int index, unsigned char *data) struct ft857_priv_data *p = (struct ft857_priv_data *) rig->state.priv; unsigned char cmd[YAESU_CMD_LENGTH]; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (p->pcs[index].ncomp == 1) { rig_debug(RIG_DEBUG_VERBOSE, "%s: complete sequence\n", __func__); @@ -515,6 +522,8 @@ int ft857_get_vfo(RIG *rig, vfo_t *vfo) unsigned char c; *vfo = RIG_VFO_B; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (ft857_read_eeprom(rig, 0x0068, &c) < 0) /* get vfo status */ { return -RIG_EPROTO; @@ -530,6 +539,8 @@ int ft857_set_vfo(RIG *rig, vfo_t vfo) vfo_t curvfo; int retval = ft857_get_vfo(rig, &curvfo); + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (retval != RIG_OK) { rig_debug(RIG_DEBUG_ERR, "%s: error get_vfo '%s'\n", __func__, @@ -549,6 +560,8 @@ int ft857_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) { struct ft857_priv_data *p = (struct ft857_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -572,6 +585,8 @@ int ft857_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) static void get_mode(RIG *rig, struct ft857_priv_data *priv, rmode_t *mode, pbwidth_t *width) { + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + switch (priv->fm_status[4] & 0x7f) { case 0x00: @@ -642,6 +657,8 @@ int ft857_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) { struct ft857_priv_data *p = (struct ft857_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -667,6 +684,8 @@ int ft857_get_split_freq_mode(RIG *rig, vfo_t vfo, freq_t *freq, rmode_t *mode, { int retcode; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR && vfo != RIG_VFO_TX) { return -RIG_ENTARGET; @@ -696,6 +715,8 @@ int ft857_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo) struct ft857_priv_data *p = (struct ft857_priv_data *) rig->state.priv; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -731,6 +752,8 @@ int ft857_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) { struct ft857_priv_data *p = (struct ft857_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -754,6 +777,7 @@ int ft857_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) static int ft857_get_pometer_level(RIG *rig, value_t *val) { struct ft857_priv_data *p = (struct ft857_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); if (check_cache_timeout(&p->tx_status_tv)) { @@ -785,6 +809,8 @@ static int ft857_get_smeter_level(RIG *rig, value_t *val) struct ft857_priv_data *p = (struct ft857_priv_data *) rig->state.priv; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (check_cache_timeout(&p->rx_status_tv)) if ((n = ft857_get_status(rig, FT857_NATIVE_CAT_GET_RX_STATUS)) < 0) { @@ -801,6 +827,8 @@ static int ft857_get_smeter_level(RIG *rig, value_t *val) int ft857_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) { + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -825,6 +853,8 @@ int ft857_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd) { struct ft857_priv_data *p = (struct ft857_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -857,6 +887,8 @@ int ft857_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { unsigned char data[YAESU_CMD_LENGTH - 1]; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -877,6 +909,8 @@ int ft857_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) { int index; /* index of sequence to send */ + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -945,6 +979,8 @@ int ft857_set_split_freq_mode(RIG *rig, vfo_t vfo, freq_t freq, rmode_t mode, { int retcode; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR && vfo != RIG_VFO_TX) { return -RIG_ENTARGET; @@ -973,6 +1009,8 @@ int ft857_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) { int index, n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -1011,6 +1049,8 @@ int ft857_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) { int index, n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -1047,6 +1087,8 @@ int ft857_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) int ft857_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) { + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -1118,6 +1160,8 @@ int ft857_set_dcs_code(RIG *rig, vfo_t vfo, tone_t code) unsigned char data[YAESU_CMD_LENGTH - 1]; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -1147,6 +1191,8 @@ int ft857_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone) unsigned char data[YAESU_CMD_LENGTH - 1]; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -1176,6 +1222,8 @@ int ft857_set_dcs_sql(RIG *rig, vfo_t vfo, tone_t code) unsigned char data[YAESU_CMD_LENGTH - 1]; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -1205,6 +1253,8 @@ int ft857_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone) unsigned char data[YAESU_CMD_LENGTH - 1]; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -1231,6 +1281,8 @@ int ft857_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone) int ft857_set_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t shift) { + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -1257,6 +1309,8 @@ int ft857_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t offs) { unsigned char data[YAESU_CMD_LENGTH - 1]; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -1275,6 +1329,8 @@ int ft857_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit) unsigned char data[YAESU_CMD_LENGTH - 1]; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -1307,6 +1363,8 @@ int ft857_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit) int ft857_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op) { + rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); + switch (op) { case RIG_OP_TOGGLE: diff --git a/rigs/yaesu/ft897.c b/rigs/yaesu/ft897.c index 5c2b8ef5..60600d8d 100644 --- a/rigs/yaesu/ft897.c +++ b/rigs/yaesu/ft897.c @@ -418,6 +418,7 @@ static int ft897_read_eeprom(RIG *rig, unsigned short addr, unsigned char *out) unsigned char data[YAESU_CMD_LENGTH]; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); memcpy(data, (char *)p->pcs[FT897_NATIVE_CAT_EEPROM_READ].nseq, YAESU_CMD_LENGTH); @@ -449,6 +450,8 @@ static int ft897_get_status(RIG *rig, int status) int len; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + switch (status) { case FT897_NATIVE_CAT_GET_FREQ_MODE_STATUS: @@ -510,6 +513,8 @@ int ft897_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) { struct ft897_priv_data *p = (struct ft897_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -534,6 +539,8 @@ int ft897_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) { struct ft897_priv_data *p = (struct ft897_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -621,6 +628,8 @@ int ft897_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) { struct ft897_priv_data *p = (struct ft897_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -645,6 +654,8 @@ static int ft897_get_pometer_level(RIG *rig, value_t *val) { struct ft897_priv_data *p = (struct ft897_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (check_cache_timeout(&p->tx_status_tv)) { int n; @@ -672,6 +683,8 @@ static int ft897_get_swr_level(RIG *rig, value_t *val) { struct ft897_priv_data *p = (struct ft897_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (check_cache_timeout(&p->tx_status_tv)) { int n; @@ -700,6 +713,8 @@ static int ft897_get_smeter_level(RIG *rig, value_t *val) struct ft897_priv_data *p = (struct ft897_priv_data *) rig->state.priv; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (check_cache_timeout(&p->rx_status_tv)) if ((n = ft897_get_status(rig, FT897_NATIVE_CAT_GET_RX_STATUS)) < 0) { @@ -717,6 +732,8 @@ static int ft897_get_rawstr_level(RIG *rig, value_t *val) { struct ft897_priv_data *p = (struct ft897_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (check_cache_timeout(&p->rx_status_tv)) { int n; @@ -734,6 +751,8 @@ static int ft897_get_rawstr_level(RIG *rig, value_t *val) int ft897_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) { + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -764,6 +783,8 @@ int ft897_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd) { struct ft897_priv_data *p = (struct ft897_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -800,6 +821,8 @@ static int ft897_send_cmd(RIG *rig, int index) { struct ft897_priv_data *p = (struct ft897_priv_data *) rig->state.priv; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (p->pcs[index].ncomp == 0) { rig_debug(RIG_DEBUG_VERBOSE, "%s: incomplete sequence\n", __func__); @@ -818,6 +841,8 @@ static int ft897_send_icmd(RIG *rig, int index, unsigned char *data) struct ft897_priv_data *p = (struct ft897_priv_data *) rig->state.priv; unsigned char cmd[YAESU_CMD_LENGTH]; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (p->pcs[index].ncomp == 1) { rig_debug(RIG_DEBUG_VERBOSE, "%s: Complete sequence\n", __func__); @@ -837,6 +862,8 @@ int ft897_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { unsigned char data[YAESU_CMD_LENGTH - 1]; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -859,6 +886,8 @@ int ft897_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) { int index; /* index of sequence to send */ + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -922,6 +951,8 @@ int ft897_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) { int index, n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -960,6 +991,8 @@ int ft897_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op) { int index, n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -993,6 +1026,8 @@ int ft897_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) { int index, n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -1032,6 +1067,8 @@ int ft897_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo) struct ft897_priv_data *p = (struct ft897_priv_data *) rig->state.priv; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -1065,6 +1102,8 @@ int ft897_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo) int ft897_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) { + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -1136,6 +1175,8 @@ int ft897_set_dcs_code(RIG *rig, vfo_t vfo, tone_t code) unsigned char data[YAESU_CMD_LENGTH - 1]; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -1165,6 +1206,8 @@ int ft897_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone) unsigned char data[YAESU_CMD_LENGTH - 1]; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -1194,6 +1237,8 @@ int ft897_set_dcs_sql(RIG *rig, vfo_t vfo, tone_t code) unsigned char data[YAESU_CMD_LENGTH - 1]; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -1223,6 +1268,8 @@ int ft897_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone) unsigned char data[YAESU_CMD_LENGTH - 1]; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -1249,6 +1296,8 @@ int ft897_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone) int ft897_set_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t shift) { + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -1275,6 +1324,8 @@ int ft897_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t offs) { unsigned char data[YAESU_CMD_LENGTH - 1]; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; @@ -1293,6 +1344,8 @@ int ft897_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit) unsigned char data[YAESU_CMD_LENGTH - 1]; int n; + rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + if (vfo != RIG_VFO_CURR) { return -RIG_ENTARGET; ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/ft817.c | 41 ++++++++++++++++++++++++++++++++++++-- rigs/yaesu/ft857.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ rigs/yaesu/ft897.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 150 insertions(+), 2 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2020-06-29 04:36: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 3fbaeaf871cc6f0cc72e018a31d392aba36270b0 (commit) via c70805902a270b63792a8c5dc3e8e7fa81866064 (commit) from 923700ea2f9111b0679671722f6bdc0a773c04e9 (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 3fbaeaf871cc6f0cc72e018a31d392aba36270b0 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jun 28 23:34:23 2020 -0500 Change ft857 and ft897 to use ft815_read_ack and dynamic post_write_delay instead of static This will support adjusting post_write_delay to hopefully fix a problem on older/slower Mac systems https://github.com/Hamlib/Hamlib/issues/330 diff --git a/rigs/yaesu/ft817.c b/rigs/yaesu/ft817.c index ce750356..266c6715 100644 --- a/rigs/yaesu/ft817.c +++ b/rigs/yaesu/ft817.c @@ -496,6 +496,7 @@ int ft817_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) while ((f1 == 0 || f1 != f2) && retries-- > 0) { rig_debug(RIG_DEBUG_TRACE, "%s: retries=%d\n", __func__, retries); + if ((n = ft817_get_status(rig, FT817_NATIVE_CAT_GET_FREQ_MODE_STATUS)) < 0) { return n; @@ -794,27 +795,27 @@ int ft817_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd) /* ---------------------------------------------------------------------- */ -static int ft817_read_ack(RIG *rig) +int ft817_read_ack(RIG *rig) { -#if (FT817_POST_WRITE_DELAY == 0) char dummy; int n; - if ((n = read_block(&rig->state.rigport, &dummy, 1)) < 0) + if (rig->state.rigport.post_write_delay == 0) { - rig_debug(RIG_DEBUG_ERR, "%s: error reading ack\n", __func__); - return n; - } + if ((n = read_block(&rig->state.rigport, &dummy, 1)) < 0) + { + rig_debug(RIG_DEBUG_ERR, "%s: error reading ack\n", __func__); + return n; + } - rig_debug(RIG_DEBUG_TRACE, "%s: ack received (%d)\n", __func__, dummy); + rig_debug(RIG_DEBUG_TRACE, "%s: ack received (%d)\n", __func__, dummy); - if (dummy != 0) - { - return -RIG_ERJCTED; + if (dummy != 0) + { + return -RIG_ERJCTED; + } } -#endif - return RIG_OK; } diff --git a/rigs/yaesu/ft857.c b/rigs/yaesu/ft857.c index dc062083..de7c2480 100644 --- a/rigs/yaesu/ft857.c +++ b/rigs/yaesu/ft857.c @@ -146,6 +146,7 @@ enum ft857_digi #define FT857_VFO_ALL (RIG_VFO_A|RIG_VFO_B) #define FT857_ANTS 0 +extern int ft817_read_ack(RIG *rig); static int ft857_send_icmd(RIG *rig, int index, unsigned char *data); const struct rig_caps ft857_caps = @@ -153,7 +154,7 @@ const struct rig_caps ft857_caps = RIG_MODEL(RIG_MODEL_FT857), .model_name = "FT-857", .mfg_name = "Yaesu", - .version = "20200323.0", + .version = "20200628.0", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -468,32 +469,6 @@ static int ft857_get_status(RIG *rig, int status) return RIG_OK; } -/* ---------------------------------------------------------------------- */ - -static int ft857_read_ack(RIG *rig) -{ -#if (FT857_POST_WRITE_DELAY == 0) - char dummy; - int n; - - if ((n = read_block(&rig->state.rigport, &dummy, 1)) < 0) - { - rig_debug(RIG_DEBUG_ERR, "%s: error reading ack\n", __func__); - return n; - } - - rig_debug(RIG_DEBUG_TRACE, "%s: ack received (%d)\n", __func__, dummy); - - if (dummy != 0) - { - return -RIG_ERJCTED; - } - -#endif - - return RIG_OK; -} - /* * private helper function to send a private command sequence. * Must only be complete sequences. @@ -509,7 +484,7 @@ static int ft857_send_cmd(RIG *rig, int index) } write_block(&rig->state.rigport, (char *) p->pcs[index].nseq, YAESU_CMD_LENGTH); - return ft857_read_ack(rig); + return ft817_read_ack(rig); } /* @@ -530,7 +505,7 @@ static int ft857_send_icmd(RIG *rig, int index, unsigned char *data) memcpy(cmd, data, YAESU_CMD_LENGTH - 1); write_block(&rig->state.rigport, (char *) cmd, YAESU_CMD_LENGTH); - return ft857_read_ack(rig); + return ft817_read_ack(rig); } /* ---------------------------------------------------------------------- */ diff --git a/rigs/yaesu/ft897.c b/rigs/yaesu/ft897.c index de84830e..5c2b8ef5 100644 --- a/rigs/yaesu/ft897.c +++ b/rigs/yaesu/ft897.c @@ -111,6 +111,7 @@ static int ft897_set_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift); static int ft897_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t offs); static int ft897_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit); static int ft897_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd); +extern int ft817_read_ack(RIG *rig); // static int ft897_set_powerstat(RIG *rig, powerstat_t status); /* Native ft897 cmd set prototypes. These are READ ONLY as each */ @@ -190,7 +191,7 @@ const struct rig_caps ft897_caps = RIG_MODEL(RIG_MODEL_FT897), .model_name = "FT-897", .mfg_name = "Yaesu", - .version = "20200607.0", + .version = "20200628.0", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -791,32 +792,6 @@ int ft897_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd) return RIG_OK; } -/* ---------------------------------------------------------------------- */ - -static int ft897_read_ack(RIG *rig) -{ -#if (FT897_POST_WRITE_DELAY == 0) - char dummy; - int n; - - if ((n = read_block(&rig->state.rigport, &dummy, 1)) < 0) - { - rig_debug(RIG_DEBUG_ERR, "%s: error reading ack\n", __func__); - return n; - } - - rig_debug(RIG_DEBUG_TRACE, "%s: ack received (%d)\n", __func__, dummy); - - if (dummy != 0) - { - return -RIG_ERJCTED; - } - -#endif - - return RIG_OK; -} - /* * private helper function to send a private command sequence. * Must only be complete sequences. @@ -832,7 +807,7 @@ static int ft897_send_cmd(RIG *rig, int index) } write_block(&rig->state.rigport, (char *) p->pcs[index].nseq, YAESU_CMD_LENGTH); - return ft897_read_ack(rig); + return ft817_read_ack(rig); } /* @@ -853,7 +828,7 @@ static int ft897_send_icmd(RIG *rig, int index, unsigned char *data) memcpy(cmd, data, YAESU_CMD_LENGTH - 1); write_block(&rig->state.rigport, (char *) cmd, YAESU_CMD_LENGTH); - return ft897_read_ack(rig); + return ft817_read_ack(rig); } /* ---------------------------------------------------------------------- */ commit c70805902a270b63792a8c5dc3e8e7fa81866064 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jun 28 23:34:11 2020 -0500 Reduce FT991 post_write_delay based on testing diff --git a/rigs/yaesu/ft991.h b/rigs/yaesu/ft991.h index 96876b09..e7dc988a 100644 --- a/rigs/yaesu/ft991.h +++ b/rigs/yaesu/ft991.h @@ -121,7 +121,7 @@ /* Delay sequential fast writes */ -#define FT991_POST_WRITE_DELAY 50 +#define FT991_POST_WRITE_DELAY 25 typedef struct { ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/ft817.c | 25 +++++++++++++------------ rigs/yaesu/ft857.c | 33 ++++----------------------------- rigs/yaesu/ft897.c | 33 ++++----------------------------- rigs/yaesu/ft991.h | 2 +- 4 files changed, 22 insertions(+), 71 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2020-06-28 17:19:44
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 923700ea2f9111b0679671722f6bdc0a773c04e9 (commit) from a789cb06bb654ae82df3a0da0009bec63290eec4 (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 923700ea2f9111b0679671722f6bdc0a773c04e9 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jun 28 12:17:24 2020 -0500 Add logic for port only call like rigctl -m 2 -r :4532 https://github.com/Hamlib/Hamlib/issues/331 diff --git a/src/misc.c b/src/misc.c index c665346e..9c0ffdeb 100644 --- a/src/misc.c +++ b/src/misc.c @@ -1470,6 +1470,14 @@ int HAMLIB_API parse_hoststr(char *hoststr, char host[256], char port[6]) return RIG_OK; } + if (sscanf(hoststr, ":%5[0-9]%s", port, + dummy) == 1) // just a port if you please + { + sprintf(hoststr, "%s:%s\n", "localhost", port); + rig_debug(RIG_DEBUG_VERBOSE, "%s: hoststr=%s\n", __func__, hoststr); + return RIG_OK; + } + // if we're here then we must have a hostname n = sscanf(hoststr, "%255[^:]:%5[0-9]%1s", host, port, dummy); @@ -1494,8 +1502,10 @@ int HAMLIB_API rig_flush(hamlib_port_t *port) if (port->type.rig != RIG_PORT_SERIAL) { - rig_debug(RIG_DEBUG_WARN, "%s: Expected serial port type!!\nWhat is this rig?\n", __func__); + rig_debug(RIG_DEBUG_WARN, + "%s: Expected serial port type!!\nWhat is this rig?\n", __func__); } + return serial_flush(port); // we must be on serial port } ----------------------------------------------------------------------- Summary of changes: src/misc.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2020-06-28 04:21: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 a789cb06bb654ae82df3a0da0009bec63290eec4 (commit) via 0ac0d4911aab6f0517ffe9ceb4bcdc5770169851 (commit) from 98f5e17ed35aa1f1ddb486eb657c8d795285c516 (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 a789cb06bb654ae82df3a0da0009bec63290eec4 Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Jun 27 23:21:39 2020 -0500 Remove unnecessary debug diff --git a/src/rig.c b/src/rig.c index e6563cdb..91526c1b 100644 --- a/src/rig.c +++ b/src/rig.c @@ -2205,8 +2205,6 @@ int HAMLIB_API rig_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) case RIG_PTT_SERIAL_RTS: - rig_debug(RIG_DEBUG_ERR, "%s: PTT RTS\n", __func__); - /* when the PTT port is not the control port we want to free the port when PTT is reset and seize the port when PTT is set, this allows limited sharing of the PTT port between @@ -2240,7 +2238,6 @@ int HAMLIB_API rig_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) } } - rig_debug(RIG_DEBUG_ERR, "%s: PTT RTS debug#2\n", __func__); retcode = ser_set_rts(&rig->state.pttport, ptt != RIG_PTT_OFF); if (strcmp(rs->pttport.pathname, rs->rigport.pathname) commit 0ac0d4911aab6f0517ffe9ceb4bcdc5770169851 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Jun 25 23:20:55 2020 -0500 Remove cache from FT-817 get_freq -- comments indicate 2 consistent reads are needed for some reason https://github.com/Hamlib/Hamlib/issues/329 diff --git a/rigs/yaesu/ft817.c b/rigs/yaesu/ft817.c index b1a87931..ce750356 100644 --- a/rigs/yaesu/ft817.c +++ b/rigs/yaesu/ft817.c @@ -164,7 +164,7 @@ const struct rig_caps ft817_caps = RIG_MODEL(RIG_MODEL_FT817), .model_name = "FT-817", .mfg_name = "Yaesu", - .version = "20200616.0", + .version = "20200625.0", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -495,14 +495,15 @@ int ft817_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) while ((f1 == 0 || f1 != f2) && retries-- > 0) { - if (check_cache_timeout(&p->fm_status_tv)) - if ((n = ft817_get_status(rig, FT817_NATIVE_CAT_GET_FREQ_MODE_STATUS)) < 0) - { - return n; - } + rig_debug(RIG_DEBUG_TRACE, "%s: retries=%d\n", __func__, retries); + if ((n = ft817_get_status(rig, FT817_NATIVE_CAT_GET_FREQ_MODE_STATUS)) < 0) + { + return n; + } f1 = f2; f2 = from_bcd_be(p->fm_status, 8); + dump_hex(p->fm_status, 5); } if (retries >= 0) diff --git a/rigs/yaesu/ft817.h b/rigs/yaesu/ft817.h index 5aa5ce93..aaaf293a 100644 --- a/rigs/yaesu/ft817.h +++ b/rigs/yaesu/ft817.h @@ -113,7 +113,7 @@ enum ft817_native_cmd_e { FT817_NATIVE_CAT_PWR_WAKE, FT817_NATIVE_CAT_PWR_ON, FT817_NATIVE_CAT_PWR_OFF, - FT817_NATIVE_CAT_EEPROM_READ, + FT817_NATIVE_CAT_EEPROM_READ, FT817_NATIVE_SIZE /* end marker */ }; ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/ft817.c | 13 +++++++------ rigs/yaesu/ft817.h | 2 +- src/rig.c | 3 --- 3 files changed, 8 insertions(+), 10 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2020-06-25 21:50: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 98f5e17ed35aa1f1ddb486eb657c8d795285c516 (commit) from ab7d998e380ca8a072f26225e0ec0bb7e4a5e6a0 (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 98f5e17ed35aa1f1ddb486eb657c8d795285c516 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Jun 25 16:49:51 2020 -0500 Reduce post write delay for FT991 to 25ms based on user testing diff --git a/rigs/yaesu/ft991.c b/rigs/yaesu/ft991.c index 60d020bf..82acde25 100644 --- a/rigs/yaesu/ft991.c +++ b/rigs/yaesu/ft991.c @@ -56,7 +56,7 @@ const struct rig_caps ft991_caps = RIG_MODEL(RIG_MODEL_FT991), .model_name = "FT-991", .mfg_name = "Yaesu", - .version = NEWCAT_VER ".1", + .version = NEWCAT_VER ".2", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/ft991.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2020-06-25 13:04:17
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via ab7d998e380ca8a072f26225e0ec0bb7e4a5e6a0 (commit) via 720c123be05a919d2b795e384e873d2dcb78b961 (commit) from bd1085af20e944fedc1a0a25bf8e1a0a523f5f30 (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 ab7d998e380ca8a072f26225e0ec0bb7e4a5e6a0 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Jun 25 08:03:59 2020 -0500 Undo FT920 RIG_PTT_RIG_MICDATA change diff --git a/rigs/yaesu/ft920.c b/rigs/yaesu/ft920.c index 58d9b74d..b721f1d8 100644 --- a/rigs/yaesu/ft920.c +++ b/rigs/yaesu/ft920.c @@ -151,11 +151,11 @@ const struct rig_caps ft920_caps = RIG_MODEL(RIG_MODEL_FT920), .model_name = "FT-920", .mfg_name = "Yaesu", - .version = "20200624.0", /* YYYYMMDD */ + .version = "20100823.0", /* YYYYMMDD */ .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, - .ptt_type = RIG_PTT_RIG_MICDATA, + .ptt_type = RIG_PTT_RIG, .dcd_type = RIG_DCD_NONE, .port_type = RIG_PORT_SERIAL, .serial_rate_min = 4800, commit 720c123be05a919d2b795e384e873d2dcb78b961 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Jun 25 05:54:06 2020 -0500 Add some debug to rig.c diff --git a/src/rig.c b/src/rig.c index 257a3205..e6563cdb 100644 --- a/src/rig.c +++ b/src/rig.c @@ -2030,6 +2030,7 @@ int HAMLIB_API rig_get_vfo(RIG *rig, vfo_t *vfo) if (CHECK_RIG_ARG(rig) || !vfo) { + rig_debug(RIG_DEBUG_ERR, "%s: no rig and/or vfo? rig=%p, vfo=%p\n", __func__, rig, vfo); return -RIG_EINVAL; } @@ -2037,6 +2038,7 @@ int HAMLIB_API rig_get_vfo(RIG *rig, vfo_t *vfo) if (caps->get_vfo == NULL) { + rig_debug(RIG_DEBUG_ERR, "%s: no get_vfo\n", __func__); return -RIG_ENAVAIL; } @@ -2067,6 +2069,11 @@ int HAMLIB_API rig_get_vfo(RIG *rig, vfo_t *vfo) cache_ms = elapsed_ms(&rig->state.cache.time_vfo, ELAPSED_INVALIDATE); } + if (retcode != RIG_OK) + { + rig_debug(RIG_DEBUG_ERR, "%s: returning %d(%s)\n", __func__, retcode,rigerror(retcode)); + } + return retcode; } ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/ft920.c | 4 ++-- src/rig.c | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2020-06-25 04:37:16
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via bd1085af20e944fedc1a0a25bf8e1a0a523f5f30 (commit) from 4c34b5d6d93274fab5d750a6d2d63d5d34f95524 (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 bd1085af20e944fedc1a0a25bf8e1a0a523f5f30 Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Jun 24 23:34:13 2020 -0500 Change timeout length on kenwood startup when com not responding to approx 10 seconds https://github.com/Hamlib/Hamlib/issues/311 diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index 11707f12..3d113757 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -700,9 +700,11 @@ int kenwood_open(RIG *rig) int err, i; char *idptr; char id[KENWOOD_MAX_BUF_LEN]; + int retry_save = rig->state.rigport.retry; rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + rig->state.rigport.retry = 0; err = kenwood_get_id(rig, id); if (err == RIG_OK) // some rigs give ID while in standby @@ -791,6 +793,7 @@ int kenwood_open(RIG *rig) if (RIG_OK != err) { rig_debug(RIG_DEBUG_ERR, "%s: no response from rig\n", __func__); + rig->state.rigport.retry = retry_save; return err; } @@ -804,6 +807,7 @@ int kenwood_open(RIG *rig) if (err != RIG_OK) { rig_debug(RIG_DEBUG_ERR, "%s: cannot get identification\n", __func__); + rig->state.rigport.retry = retry_save; return err; } } @@ -890,6 +894,7 @@ int kenwood_open(RIG *rig) // we're making this non fatal // mismatched IDs can still be tested + rig->state.rigport.retry = retry_save; return RIG_OK; } @@ -3473,13 +3478,15 @@ int kenwood_set_powerstat(RIG *rig, powerstat_t status) (status == RIG_POWER_ON) ? ";;;;PS1;" : "PS0", NULL, 0); int i = 0; - int retry = rig->state.rigport.retry / 3; + int retry_save = rig->state.rigport.retry; rig_debug(RIG_DEBUG_VERBOSE, "%s called status=%d\n", __func__, status); + rig->state.rigport.retry = 0; + if (status == RIG_POWER_ON) // wait for wakeup only { - for (i = 0; i < retry; ++i) // up to 10 seconds + for (i = 0; i < 8; ++i) // up to ~10 seconds including the timeouts { freq_t freq; sleep(1); @@ -3487,12 +3494,13 @@ int kenwood_set_powerstat(RIG *rig, powerstat_t status) if (retval == RIG_OK) { return retval; } - rig_debug(RIG_DEBUG_TRACE, "%s: Wait %d of %d for power up\n", __func__, i + 1, - retry); + rig_debug(RIG_DEBUG_TRACE, "%s: Wait #%d for power up\n", __func__, i + 1); } } - if (i == retry) + rig->state.rigport.retry = retry_save; + + if (i == 9) { rig_debug(RIG_DEBUG_TRACE, "%s: timeout waiting for powerup, try %d\n", __func__, @@ -4191,7 +4199,7 @@ DECLARE_PROBERIG_BACKEND(kenwood) port->write_delay = port->post_write_delay = 0; port->parm.serial.stop_bits = 2; - port->retry = 1; + port->retry = 0; /* * try for all different baud rates diff --git a/rigs/kenwood/kenwood.h b/rigs/kenwood/kenwood.h index c96827ca..ec48b6ab 100644 --- a/rigs/kenwood/kenwood.h +++ b/rigs/kenwood/kenwood.h @@ -27,7 +27,7 @@ #include <string.h> #include "token.h" -#define BACKEND_VER "20200621" +#define BACKEND_VER "20200624" #define EOM_KEN ';' #define EOM_TH '\r' ----------------------------------------------------------------------- Summary of changes: rigs/kenwood/kenwood.c | 20 ++++++++++++++------ rigs/kenwood/kenwood.h | 2 +- 2 files changed, 15 insertions(+), 7 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2020-06-24 17:48:24
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 4c34b5d6d93274fab5d750a6d2d63d5d34f95524 (commit) from 65de309e7066cb2967e9e6a9bc1790853c9c6ecf (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 4c34b5d6d93274fab5d750a6d2d63d5d34f95524 Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Jun 24 12:46:12 2020 -0500 Change FT920 to RIG_PTT_MICDATA https://github.com/Hamlib/Hamlib/issues/327 diff --git a/rigs/yaesu/ft920.c b/rigs/yaesu/ft920.c index b721f1d8..58d9b74d 100644 --- a/rigs/yaesu/ft920.c +++ b/rigs/yaesu/ft920.c @@ -151,11 +151,11 @@ const struct rig_caps ft920_caps = RIG_MODEL(RIG_MODEL_FT920), .model_name = "FT-920", .mfg_name = "Yaesu", - .version = "20100823.0", /* YYYYMMDD */ + .version = "20200624.0", /* YYYYMMDD */ .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, - .ptt_type = RIG_PTT_RIG, + .ptt_type = RIG_PTT_RIG_MICDATA, .dcd_type = RIG_DCD_NONE, .port_type = RIG_PORT_SERIAL, .serial_rate_min = 4800, ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/ft920.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2020-06-24 04:00: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 65de309e7066cb2967e9e6a9bc1790853c9c6ecf (commit) via c372bffeb30fdee0df25a382eee010b3ab6fc86f (commit) from a9d43a1fbeef8f4aca14906bb898bf74791b1598 (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 65de309e7066cb2967e9e6a9bc1790853c9c6ecf Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Jun 23 22:57:36 2020 -0500 Fix rigctlcom to work with Main/Sub rigs too https://github.com/Hamlib/Hamlib/issues/302 diff --git a/tests/rigctlcom.c b/tests/rigctlcom.c index b3b9a106..118d11f3 100644 --- a/tests/rigctlcom.c +++ b/tests/rigctlcom.c @@ -647,7 +647,7 @@ static rmode_t ts2000_get_mode() { rmode_t mode; pbwidth_t width; - rig_get_mode(my_rig, RIG_VFO_A, &mode, &width); + rig_get_mode(my_rig, vfo_fixup(my_rig, RIG_VFO_A), &mode, &width); // Perhaps we should emulate a rig that has PKT modes instead?? switch (mode) @@ -734,10 +734,10 @@ static int handle_ts2000(void *arg) int p13 = 0; // P13 Tone dummy value for now int p14 = 0; // P14 Tone Freq dummy value for now int p15 = 0; // P15 Shift status dummy value for now - int retval = rig_get_freq(my_rig, RIG_VFO_A, &freq); + int retval = rig_get_freq(my_rig, vfo_fixup(my_rig, RIG_VFO_A), &freq); char response[64]; char *fmt = - // cppcheck-suppress * + // cppcheck-suppress * "IF%011"PRIll"%04d+%05d%1d%1d%1d%02d%1d%1"PRIll"%1d%1d%1d%1d%02d%1d;"; if (retval != RIG_OK) @@ -746,7 +746,7 @@ static int handle_ts2000(void *arg) } mode = ts2000_get_mode(); - retval = rig_get_ptt(my_rig, RIG_VFO_A, &ptt); + retval = rig_get_ptt(my_rig, vfo_fixup(my_rig, RIG_VFO_A), &ptt); if (retval != RIG_OK) { @@ -771,10 +771,16 @@ static int handle_ts2000(void *arg) switch (vfo) { case RIG_VFO_A: + case RIG_VFO_MAIN: + case RIG_VFO_MAIN_A: + case RIG_VFO_SUB_A: vfo = 0; break; case RIG_VFO_B: + case RIG_VFO_SUB: + case RIG_VFO_MAIN_B: + case RIG_VFO_SUB_B: vfo = 1; break; @@ -822,7 +828,7 @@ static int handle_ts2000(void *arg) freq_t freq = 0; char response[32]; - int retval = rig_get_freq(my_rig, RIG_VFO_A, &freq); + int retval = rig_get_freq(my_rig, vfo_fixup(my_rig, RIG_VFO_A), &freq); if (retval != RIG_OK) { @@ -838,7 +844,7 @@ static int handle_ts2000(void *arg) { char response[32]; freq_t freq = 0; - int retval = rig_get_freq(my_rig, RIG_VFO_B, &freq); + int retval = rig_get_freq(my_rig, vfo_fixup(my_rig, RIG_VFO_B), &freq); if (retval != RIG_OK) { @@ -867,7 +873,7 @@ static int handle_ts2000(void *arg) // Now some commands to set things else if (strcmp(arg, "TX;") == 0) { - return rig_set_ptt(my_rig, RIG_VFO_A, 1); + return rig_set_ptt(my_rig, vfo_fixup(my_rig, RIG_VFO_A), 1); } else if (strcmp(arg, "AI0;") == 0) { @@ -881,11 +887,11 @@ static int handle_ts2000(void *arg) } else if (strcmp(arg, "FR0;") == 0) { - return rig_set_vfo(my_rig, RIG_VFO_A); + return rig_set_vfo(my_rig, vfo_fixup(my_rig, RIG_VFO_A)); } else if (strcmp(arg, "FR1;") == 0) { - return rig_set_vfo(my_rig, RIG_VFO_B); + return rig_set_vfo(my_rig, vfo_fixup(my_rig, RIG_VFO_B)); } else if (strcmp(arg, "FR;") == 0) { @@ -902,8 +908,8 @@ static int handle_ts2000(void *arg) } - if (vfo == RIG_VFO_A) { nvfo = 0; } - else if (vfo == RIG_VFO_B) { nvfo = 1; } + if (vfo == vfo_fixup(my_rig, RIG_VFO_A)) { nvfo = 0; } + else if (vfo == vfo_fixup(my_rig, RIG_VFO_B)) { nvfo = 1; } else { retval = -RIG_EPROTO; @@ -918,7 +924,7 @@ static int handle_ts2000(void *arg) else if (strcmp(arg, "FT;") == 0) { char response[32]; - vfo_t vfo, vfo_curr = RIG_VFO_A; + vfo_t vfo, vfo_curr = vfo_fixup(my_rig, RIG_VFO_A); split_t split; int nvfo = 0; int retval = rig_get_split_vfo(my_rig, vfo_curr, &split, &vfo); @@ -931,8 +937,8 @@ static int handle_ts2000(void *arg) } - if (vfo == RIG_VFO_A) { nvfo = 0; } - else if (vfo == RIG_VFO_B) { nvfo = 1; } + if (vfo == vfo_fixup(my_rig, RIG_VFO_A)) { nvfo = 0; } + else if (vfo == vfo_fixup(my_rig, RIG_VFO_B)) { nvfo = 1; } else { retval = -RIG_EPROTO; @@ -981,7 +987,8 @@ static int handle_ts2000(void *arg) { char response[32]; int valA; - int retval = rig_get_func(my_rig, RIG_VFO_A, RIG_FUNC_AIP, &valA); + int retval = rig_get_func(my_rig, vfo_fixup(my_rig, RIG_VFO_A), RIG_FUNC_AIP, + &valA); int valB; if (retval != RIG_OK) @@ -999,7 +1006,8 @@ static int handle_ts2000(void *arg) return retval; } - retval = rig_get_func(my_rig, RIG_VFO_B, RIG_FUNC_AIP, &valB); + retval = rig_get_func(my_rig, vfo_fixup(my_rig, RIG_VFO_B), RIG_FUNC_AIP, + &valB); if (retval != RIG_OK) { @@ -1024,7 +1032,7 @@ static int handle_ts2000(void *arg) (char *)arg); } - retval = rig_set_func(my_rig, RIG_VFO_A, RIG_FUNC_AIP, valA); + retval = rig_set_func(my_rig, vfo_fixup(my_rig, RIG_VFO_A), RIG_FUNC_AIP, valA); if (retval != RIG_OK) { @@ -1033,7 +1041,7 @@ static int handle_ts2000(void *arg) return retval; } - retval = rig_set_func(my_rig, RIG_VFO_B, RIG_FUNC_AIP, valB); + retval = rig_set_func(my_rig, vfo_fixup(my_rig, RIG_VFO_B), RIG_FUNC_AIP, valB); if (retval != RIG_OK) { @@ -1398,7 +1406,7 @@ static int handle_ts2000(void *arg) } else if (strcmp(arg, "DC;") == 0) { - vfo_t vfo, vfo_curr = RIG_VFO_A; + vfo_t vfo, vfo_curr = vfo_fixup(my_rig, RIG_VFO_A); split_t split; char response[32]; int retval = rig_get_split_vfo(my_rig, vfo_curr, &split, &vfo); @@ -1417,7 +1425,7 @@ static int handle_ts2000(void *arg) } else if (strncmp(arg, "DC", 2) == 0) { - vfo_t vfo_curr = RIG_VFO_A; + vfo_t vfo_curr = vfo_fixup(my_rig, RIG_VFO_A); split_t split; int isplit; int retval; @@ -1448,25 +1456,27 @@ static int handle_ts2000(void *arg) } else if (strcmp(arg, "FT0;") == 0) { - return rig_set_split_vfo(my_rig, RIG_VFO_A, RIG_VFO_A, 0); + return rig_set_split_vfo(my_rig, vfo_fixup(my_rig, RIG_VFO_A), vfo_fixup(my_rig, + RIG_VFO_A), 0); } else if (strcmp(arg, "FT1;") == 0) { - return rig_set_split_vfo(my_rig, RIG_VFO_B, RIG_VFO_B, 0); + return rig_set_split_vfo(my_rig, vfo_fixup(my_rig, RIG_VFO_B), vfo_fixup(my_rig, + RIG_VFO_B), 0); } else if (strncmp(arg, "FA0", 3) == 0) { freq_t freq; sscanf((char *)arg + 2, "%"SCNfreq, &freq); - return rig_set_freq(my_rig, RIG_VFO_A, freq); + return rig_set_freq(my_rig, vfo_fixup(my_rig, RIG_VFO_A), freq); } else if (strncmp(arg, "FB0", 3) == 0) { freq_t freq; sscanf((char *)arg + 2, "%"SCNfreq, &freq); - return rig_set_freq(my_rig, RIG_VFO_A, freq); + return rig_set_freq(my_rig, vfo_fixup(my_rig, RIG_VFO_A), freq); } else if (strncmp(arg, "MD", 2) == 0) { commit c372bffeb30fdee0df25a382eee010b3ab6fc86f Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Jun 23 17:39:07 2020 -0500 Add set VFOB modes to ft1000mp.c diff --git a/rigs/yaesu/ft1000mp.c b/rigs/yaesu/ft1000mp.c index 030b17fe..f1dead25 100644 --- a/rigs/yaesu/ft1000mp.c +++ b/rigs/yaesu/ft1000mp.c @@ -97,18 +97,18 @@ static const yaesu_cmd_set_t ncmd[] = { 1, { 0x00, 0x00, 0x00, 0x0a, 0x0c } }, /* vfo A mode set DATA-LSB */ { 1, { 0x00, 0x00, 0x00, 0x0b, 0x0c } }, /* vfo A mode set DATA-FM */ - /* { 1, { 0x00, 0x00, 0x00, 0x80, 0x0c } }, */ /* vfo B mode set LSB */ - /* { 1, { 0x00, 0x00, 0x00, 0x81, 0x0c } }, */ /* vfo B mode set USB */ - /* { 1, { 0x00, 0x00, 0x00, 0x82, 0x0c } }, */ /* vfo B mode set CW-USB */ - /* { 1, { 0x00, 0x00, 0x00, 0x83, 0x0c } }, */ /* vfo B mode set CW-LSB */ - /* { 1, { 0x00, 0x00, 0x00, 0x84, 0x0c } }, */ /* vfo B mode set AM */ - /* { 1, { 0x00, 0x00, 0x00, 0x85, 0x0c } }, */ /* vfo B mode set AM */ - /* { 1, { 0x00, 0x00, 0x00, 0x86, 0x0c } }, */ /* vfo B mode set FM */ - /* { 1, { 0x00, 0x00, 0x00, 0x87, 0x0c } }, */ /* vfo B mode set FMN */ - /* { 1, { 0x00, 0x00, 0x00, 0x88, 0x0c } }, */ /* vfo B mode set DATA-LSB */ - /* { 1, { 0x00, 0x00, 0x00, 0x89, 0x0c } }, */ /* vfo B mode set DATA-LSB */ - /* { 1, { 0x00, 0x00, 0x00, 0x8a, 0x0c } }, */ /* vfo B mode set DATA-USB */ - /* { 1, { 0x00, 0x00, 0x00, 0x8b, 0x0c } }, */ /* vfo B mode set DATA-FM */ + { 1, { 0x00, 0x00, 0x00, 0x80, 0x0c } }, /* vfo B mode set LSB */ + { 1, { 0x00, 0x00, 0x00, 0x81, 0x0c } }, /* vfo B mode set USB */ + { 1, { 0x00, 0x00, 0x00, 0x82, 0x0c } }, /* vfo B mode set CW-USB */ + { 1, { 0x00, 0x00, 0x00, 0x83, 0x0c } }, /* vfo B mode set CW-LSB */ + { 1, { 0x00, 0x00, 0x00, 0x84, 0x0c } }, /* vfo B mode set AM */ + { 1, { 0x00, 0x00, 0x00, 0x85, 0x0c } }, /* vfo B mode set AM */ + { 1, { 0x00, 0x00, 0x00, 0x86, 0x0c } }, /* vfo B mode set FM */ + { 1, { 0x00, 0x00, 0x00, 0x87, 0x0c } }, /* vfo B mode set FMN */ + { 1, { 0x00, 0x00, 0x00, 0x88, 0x0c } }, /* vfo B mode set DATA-LSB */ + { 1, { 0x00, 0x00, 0x00, 0x89, 0x0c } }, /* vfo B mode set DATA-LSB */ + { 1, { 0x00, 0x00, 0x00, 0x8a, 0x0c } }, /* vfo B mode set DATA-USB */ + { 1, { 0x00, 0x00, 0x00, 0x8b, 0x0c } }, /* vfo B mode set DATA-FM */ { 0, { 0x00, 0x00, 0x00, 0x00, 0x0e } }, /* update interval/pacing */ { 1, { 0x00, 0x00, 0x00, 0x00, 0x0F } }, /* PTT OFF */ @@ -216,7 +216,7 @@ const struct rig_caps ft1000mp_caps = RIG_MODEL(RIG_MODEL_FT1000MP), .model_name = "FT-1000MP", .mfg_name = "Yaesu", - .version = "20200622.0", + .version = "20200623.0", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -347,7 +347,7 @@ const struct rig_caps ft1000mpmkv_caps = RIG_MODEL(RIG_MODEL_FT1000MPMKV), .model_name = "MARK-V FT-1000MP", .mfg_name = "Yaesu", - .version = "202006ww.0", + .version = "20200623.0", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -478,7 +478,7 @@ const struct rig_caps ft1000mpmkvfld_caps = RIG_MODEL(RIG_MODEL_FT1000MPMKVFLD), .model_name = "MARK-V Field FT-1000MP", .mfg_name = "Yaesu", - .version = "20200622.0", + .version = "20200623.0", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -850,42 +850,52 @@ int ft1000mp_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) { case RIG_MODE_AM: cmd_index = FT1000MP_NATIVE_MODE_SET_AM; + if (vfo == RIG_VFO_B) cmd_index = FT1000MP_NATIVE_MODE_SET_AM_B; break; case RIG_MODE_CW: cmd_index = FT1000MP_NATIVE_MODE_SET_CWR; + if (vfo == RIG_VFO_B) cmd_index = FT1000MP_NATIVE_MODE_SET_CWR_B; break; case RIG_MODE_CWR: cmd_index = FT1000MP_NATIVE_MODE_SET_CW; + if (vfo == RIG_VFO_B) cmd_index = FT1000MP_NATIVE_MODE_SET_CW_B; break; case RIG_MODE_USB: cmd_index = FT1000MP_NATIVE_MODE_SET_USB; + if (vfo == RIG_VFO_B) cmd_index = FT1000MP_NATIVE_MODE_SET_USB_B; break; case RIG_MODE_LSB: cmd_index = FT1000MP_NATIVE_MODE_SET_LSB; + if (vfo == RIG_VFO_B) cmd_index = FT1000MP_NATIVE_MODE_SET_LSB_B; break; case RIG_MODE_FM: cmd_index = FT1000MP_NATIVE_MODE_SET_FM; + if (vfo == RIG_VFO_B) cmd_index = FT1000MP_NATIVE_MODE_SET_FM_B; break; case RIG_MODE_RTTY: cmd_index = FT1000MP_NATIVE_MODE_SET_RTTY_LSB; + if (vfo == RIG_VFO_B) cmd_index = FT1000MP_NATIVE_MODE_SET_RTTY_LSB_B; break; case RIG_MODE_RTTYR: cmd_index = FT1000MP_NATIVE_MODE_SET_RTTY_USB; + if (vfo == RIG_VFO_B) cmd_index = FT1000MP_NATIVE_MODE_SET_RTTY_USB_B; break; case RIG_MODE_PKTLSB: cmd_index = FT1000MP_NATIVE_MODE_SET_DATA_LSB; + if (vfo == RIG_VFO_B) cmd_index = FT1000MP_NATIVE_MODE_SET_DATA_LSB_B; break; case RIG_MODE_PKTFM: cmd_index = FT1000MP_NATIVE_MODE_SET_DATA_FM; + if (vfo == RIG_VFO_B) cmd_index = FT1000MP_NATIVE_MODE_SET_FM_B; break; default: diff --git a/rigs/yaesu/ft1000mp.h b/rigs/yaesu/ft1000mp.h index 04757f87..e74dd90a 100644 --- a/rigs/yaesu/ft1000mp.h +++ b/rigs/yaesu/ft1000mp.h @@ -92,6 +92,18 @@ enum ft1000mp_native_cmd_e { FT1000MP_NATIVE_MODE_SET_RTTY_USB, FT1000MP_NATIVE_MODE_SET_DATA_LSB, FT1000MP_NATIVE_MODE_SET_DATA_FM, + FT1000MP_NATIVE_MODE_SET_LSB_B, + FT1000MP_NATIVE_MODE_SET_USB_B, + FT1000MP_NATIVE_MODE_SET_CW_B, + FT1000MP_NATIVE_MODE_SET_CWR_B, + FT1000MP_NATIVE_MODE_SET_AM_B, + FT1000MP_NATIVE_MODE_SET_AMS_B, + FT1000MP_NATIVE_MODE_SET_FM_B, + FT1000MP_NATIVE_MODE_SET_FMW_B, + FT1000MP_NATIVE_MODE_SET_RTTY_LSB_B, + FT1000MP_NATIVE_MODE_SET_RTTY_USB_B, + FT1000MP_NATIVE_MODE_SET_DATA_LSB_B, + FT1000MP_NATIVE_MODE_SET_DATA_FM_B, FT1000MP_NATIVE_PACING, FT1000MP_NATIVE_PTT_OFF, FT1000MP_NATIVE_PTT_ON, ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/ft1000mp.c | 40 ++++++++++++++++++++++------------- rigs/yaesu/ft1000mp.h | 12 +++++++++++ tests/rigctlcom.c | 58 ++++++++++++++++++++++++++++++--------------------- 3 files changed, 71 insertions(+), 39 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2020-06-23 22:21:11
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via a9d43a1fbeef8f4aca14906bb898bf74791b1598 (commit) from afc6ee76fea6c90d34e826a3e8ee738bebe2627f (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 a9d43a1fbeef8f4aca14906bb898bf74791b1598 Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Jun 23 17:19:48 2020 -0500 Remove rig_flush from rigctlcom.c -- OmniRig not happy being flushed https://github.com/Hamlib/Hamlib/issues/273 diff --git a/tests/rigctlcom.c b/tests/rigctlcom.c index e2cdb95c..b3b9a106 100644 --- a/tests/rigctlcom.c +++ b/tests/rigctlcom.c @@ -614,7 +614,6 @@ int main(int argc, char *argv[]) char *stop_set = ";\n\r"; memset(ts2000, 0, sizeof(ts2000)); - rig_flush(&my_com); // get rid of anything in the queue status = read_string(&my_com, ts2000, ----------------------------------------------------------------------- Summary of changes: tests/rigctlcom.c | 1 - 1 file changed, 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2020-06-23 17:03:47
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via afc6ee76fea6c90d34e826a3e8ee738bebe2627f (commit) via dfef8770cd65386496f9ec8ed51d8eaf863be28a (commit) via 1fa84652f4bf27376d8ed3cff6bc203da8b357d8 (commit) via 055ac839c0b6b4c41148ed86a94c3e202cd3c021 (commit) from b6a960d48e12035a94530ad56ceff469849491fd (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 afc6ee76fea6c90d34e826a3e8ee738bebe2627f Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Jun 23 12:01:29 2020 -0500 Fix flrig.c compile warning diff --git a/dummy/flrig.c b/dummy/flrig.c index 49af67f9..03f89383 100644 --- a/dummy/flrig.c +++ b/dummy/flrig.c @@ -442,8 +442,8 @@ static int read_transaction(RIG *rig, char *xml, int xml_len) else { rig_debug(RIG_DEBUG_ERR, - "%s: xml buffer overflow!!\nTrying to add len=%d\n%sTo len=%d\n%s", __func__, - (int)strlen(tmp_buf), tmp_buf, (int)strlen(xml), xml); + "%s: xml buffer overflow!!\nTrying to add len=%d\nTo len=%d\n", __func__, + (int)strlen(tmp_buf), (int)strlen(xml)); return -RIG_EPROTO; } } commit dfef8770cd65386496f9ec8ed51d8eaf863be28a Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Jun 23 11:21:22 2020 -0500 Move chk_vfo_executed so it will work without readline support https://github.com/Hamlib/Hamlib/issues/326 diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 56f8d18e..a4e9d084 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -94,9 +94,10 @@ extern int read_history(); #define ARG_IN (ARG_IN1|ARG_IN2|ARG_IN3|ARG_IN4) #define ARG_OUT (ARG_OUT1|ARG_OUT2|ARG_OUT3|ARG_OUT4) +static int chk_vfo_executed; + /* variables for readline support */ #ifdef HAVE_LIBREADLINE -static int chk_vfo_executed; static char *input_line = (char *)NULL; static char *result = (char *)NULL; static char *parsed_input[sizeof(char *) * 5]; commit 1fa84652f4bf27376d8ed3cff6bc203da8b357d8 Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Jun 23 11:12:15 2020 -0500 Fix compatibility between 3.3 rigctl and 4.0 rigctld https://github.com/Hamlib/Hamlib/issues/326 diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 5d8c8f89..56f8d18e 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -96,6 +96,7 @@ extern int read_history(); /* variables for readline support */ #ifdef HAVE_LIBREADLINE +static int chk_vfo_executed; static char *input_line = (char *)NULL; static char *result = (char *)NULL; static char *parsed_input[sizeof(char *) * 5]; @@ -4081,9 +4082,12 @@ declare_proto_rig(dump_state) // protocol 1 allows fields can be listed/processed in any order // protocol 1 fields can be multi-line -- just write the thing to allow for it // backward compatible as new values will just generate warnings - fprintf(fout, "vfo_ops=0x%x\n", rig->caps->vfo_ops); - fprintf(fout, "ptt_type=0x%x\n", rig->state.pttport.type.ptt); - fprintf(fout, "done\n"); + if (chk_vfo_executed) // for 3.3 compatiblility + { + fprintf(fout, "vfo_ops=0x%x\n", rig->caps->vfo_ops); + fprintf(fout, "ptt_type=0x%x\n", rig->state.pttport.type.ptt); + fprintf(fout, "done\n"); + } #if 0 // why isn't this implemented? Does anybody care? gran_t level_gran[RIG_SETTING_MAX]; /*!< level granularity */ @@ -4520,6 +4524,8 @@ declare_proto_rig(chk_vfo) fprintf(fout, "%d\n", rig->state.vfo_opt); + chk_vfo_executed = 1; // this allows us to control dump_state version + return RIG_OK; } commit 055ac839c0b6b4c41148ed86a94c3e202cd3c021 Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Jun 23 10:14:10 2020 -0500 Add debug to rigctl_parse.c to show full command https://github.com/Hamlib/Hamlib/issues/326 diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 36e4fe99..5d8c8f89 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -730,6 +730,7 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc, *pcmd = '\0'; cmd = parse_arg((char *)cmd_name); + rig_debug(RIG_DEBUG_VERBOSE, "%s: cmd=%s\n", __func__, cmd_name); break; } ----------------------------------------------------------------------- Summary of changes: dummy/flrig.c | 4 ++-- tests/rigctl_parse.c | 14 +++++++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2020-06-23 14:02: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 b6a960d48e12035a94530ad56ceff469849491fd (commit) via b50975729ca5e44871f96db797617e9a0f9b820c (commit) via 1be5c71e76d60573c80c42699b95f1f7c7443d26 (commit) from 2c64ba9bbaa58b70efa0d89351e45256170e3c89 (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 b6a960d48e12035a94530ad56ceff469849491fd Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Jun 23 09:01:46 2020 -0500 All conversions to rig_flush now done https://github.com/Hamlib/Hamlib/issues/307 diff --git a/rigs/adat/adat.c b/rigs/adat/adat.c index 49e5403c..f71b2d11 100644 --- a/rigs/adat/adat.c +++ b/rigs/adat/adat.c @@ -1264,7 +1264,7 @@ int adat_send(RIG *pRig, "*** ADAT: %d %s (%s:%d): ENTRY. Params: pRig = %p, pcData = %s\n", gFnLevel, __func__, __FILE__, __LINE__, pRig, pcData); - serial_flush(&pRigState->rigport); + rig_flush(&pRigState->rigport); nRC = write_block(&pRigState->rigport, pcData, strlen(pcData)); @@ -1562,7 +1562,7 @@ int adat_get_single_cmd_result(RIG *pRig) } } - serial_flush(&pRigState->rigport); + rig_flush(&pRigState->rigport); pPriv->nRC = nRC; } diff --git a/rigs/alinco/dx77.c b/rigs/alinco/dx77.c index b6f07ce2..fb2ebc0c 100644 --- a/rigs/alinco/dx77.c +++ b/rigs/alinco/dx77.c @@ -308,7 +308,7 @@ int dx77_transaction(RIG *rig, rs = &rig->state; - serial_flush(&rs->rigport); + rig_flush(&rs->rigport); retval = write_block(&rs->rigport, cmd, cmd_len); diff --git a/rigs/alinco/dxsr8.c b/rigs/alinco/dxsr8.c index 86eae83e..ceda53d4 100644 --- a/rigs/alinco/dxsr8.c +++ b/rigs/alinco/dxsr8.c @@ -251,7 +251,7 @@ int dxsr8_transaction(RIG *rig, rs = &rig->state; - serial_flush(&rs->rigport); + rig_flush(&rs->rigport); retval = write_block(&rs->rigport, cmd, cmd_len); diff --git a/rigs/aor/aor.c b/rigs/aor/aor.c index b1300290..38430d36 100644 --- a/rigs/aor/aor.c +++ b/rigs/aor/aor.c @@ -80,7 +80,7 @@ static int aor_transaction(RIG *rig, const char *cmd, int cmd_len, char *data, rs = &rig->state; - serial_flush(&rs->rigport); + rig_flush(&rs->rigport); retval = write_block(&rs->rigport, cmd, cmd_len); diff --git a/rigs/aor/ar3000.c b/rigs/aor/ar3000.c index 0805bdea..b962ada0 100644 --- a/rigs/aor/ar3000.c +++ b/rigs/aor/ar3000.c @@ -196,7 +196,7 @@ static int ar3k_transaction(RIG *rig, const char *cmd, int cmd_len, char *data, rs = &rig->state; - serial_flush(&rs->rigport); + rig_flush(&rs->rigport); retval = write_block(&rs->rigport, cmd, cmd_len); diff --git a/rigs/aor/ar3030.c b/rigs/aor/ar3030.c index 4f836e28..edacb729 100644 --- a/rigs/aor/ar3030.c +++ b/rigs/aor/ar3030.c @@ -231,7 +231,7 @@ static int ar3030_transaction(RIG *rig, const char *cmd, int cmd_len, data = tmpdata; } - serial_flush(&rs->rigport); + rig_flush(&rs->rigport); do { @@ -315,7 +315,7 @@ int ar3030_close(RIG *rig) rig_debug(RIG_DEBUG_TRACE, "%s:\n", __func__); rs = &rig->state; - serial_flush(&rs->rigport); + rig_flush(&rs->rigport); retval = ar3030_transaction(rig, "Q" CR, strlen("Q" CR), NULL, NULL); rig_debug(RIG_DEBUG_TRACE, "%s: retval=%d\n", __func__, retval); diff --git a/rigs/aor/sr2200.c b/rigs/aor/sr2200.c index 0f90da7b..aac33f72 100644 --- a/rigs/aor/sr2200.c +++ b/rigs/aor/sr2200.c @@ -285,7 +285,7 @@ static int sr2200_transaction(RIG *rig, const char *cmd, int cmd_len, rs = &rig->state; - serial_flush(&rs->rigport); + rig_flush(&rs->rigport); retval = write_block(&rs->rigport, cmd, cmd_len); diff --git a/rigs/barrett/barrett.c b/rigs/barrett/barrett.c index 66e59dca..c251a425 100644 --- a/rigs/barrett/barrett.c +++ b/rigs/barrett/barrett.c @@ -231,7 +231,7 @@ int barrett_transaction(RIG *rig, char *cmd, int expected, char **result) cmd_len = snprintf(cmd_buf, sizeof(cmd_buf), "%s%s", cmd, EOM); - serial_flush(&rs->rigport); + rig_flush(&rs->rigport); retval = write_block(&rs->rigport, cmd_buf, cmd_len); if (retval < 0) diff --git a/rigs/drake/drake.c b/rigs/drake/drake.c index c8808dfe..06687252 100644 --- a/rigs/drake/drake.c +++ b/rigs/drake/drake.c @@ -69,7 +69,7 @@ int drake_transaction(RIG *rig, const char *cmd, int cmd_len, char *data, rs = &rig->state; - serial_flush(&rs->rigport); + rig_flush(&rs->rigport); retval = write_block(&rs->rigport, cmd, cmd_len); diff --git a/rigs/elad/elad.c b/rigs/elad/elad.c index 369da640..5173fed6 100644 --- a/rigs/elad/elad.c +++ b/rigs/elad/elad.c @@ -223,15 +223,7 @@ transaction_write: } /* flush anything in the read buffer before command is sent */ - if (rs->rigport.type.rig == RIG_PORT_NETWORK - || rs->rigport.type.rig == RIG_PORT_UDP_NETWORK) - { - network_flush(&rs->rigport); - } - else - { - serial_flush(&rs->rigport); - } + rig_flush(&rs->rigport); retval = write_block(&rs->rigport, cmd, len); diff --git a/rigs/icmarine/icmarine.c b/rigs/icmarine/icmarine.c index fcd26b88..d56a01e4 100644 --- a/rigs/icmarine/icmarine.c +++ b/rigs/icmarine/icmarine.c @@ -256,7 +256,7 @@ int icmarine_transaction(RIG *rig, const char *cmd, const char *param, rs = &rig->state; priv = (struct icmarine_priv_data *)rs->priv; - serial_flush(&rs->rigport); + rig_flush(&rs->rigport); /* command formating */ cmd_len = snprintf(cmdbuf, BUFSZ, "$PICOA,%02d,%02u,%s", diff --git a/rigs/icom/frame.c b/rigs/icom/frame.c index bc707a30..3510dd12 100644 --- a/rigs/icom/frame.c +++ b/rigs/icom/frame.c @@ -130,7 +130,7 @@ int icom_one_transaction(RIG *rig, int cmd, int subcmd, // cppcheck-suppress * Hold_Decode(rig); - serial_flush(&rs->rigport); + rig_flush(&rs->rigport); retval = write_block(&rs->rigport, (char *) sendbuf, frm_len); diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index c9a2988d..3b6e2f72 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -7279,7 +7279,7 @@ DECLARE_PROBERIG_BACKEND(icom) frm_len = make_cmd_frame((char *) buf, civ_addr, CTRLID, C_RD_TRXID, S_RD_TRXID, NULL, 0); - serial_flush(port); + rig_flush(port); write_block(port, (char *) buf, frm_len); /* read out the bytes we just sent @@ -7353,7 +7353,7 @@ DECLARE_PROBERIG_BACKEND(icom) frm_len = make_cmd_frame((char *) buf, civ_addr, CTRLID, C_CTL_MISC, S_OPTO_RDID, NULL, 0); - serial_flush(port); + rig_flush(port); write_block(port, (char *) buf, frm_len); /* read out the bytes we just sent diff --git a/rigs/jrc/jrc.c b/rigs/jrc/jrc.c index 5a6ca0d1..3f665ccf 100644 --- a/rigs/jrc/jrc.c +++ b/rigs/jrc/jrc.c @@ -75,7 +75,7 @@ static int jrc_transaction(RIG *rig, const char *cmd, int cmd_len, char *data, rs = &rig->state; - serial_flush(&rs->rigport); + rig_flush(&rs->rigport); // cppcheck-suppress * Hold_Decode(rig); diff --git a/rigs/kachina/kachina.c b/rigs/kachina/kachina.c index 72923ae4..2d798e35 100644 --- a/rigs/kachina/kachina.c +++ b/rigs/kachina/kachina.c @@ -84,7 +84,7 @@ static int kachina_transaction(RIG *rig, unsigned char cmd1, unsigned char cmd2) buf4[2] = cmd2; buf4[3] = ETX; - serial_flush(&rs->rigport); + rig_flush(&rs->rigport); retval = write_block(&rs->rigport, (char *) buf4, 4); @@ -119,7 +119,7 @@ static int kachina_trans_n(RIG *rig, unsigned char cmd1, const char *data, cmd_len = data_len + 3; - serial_flush(&rs->rigport); + rig_flush(&rs->rigport); retval = write_block(&rs->rigport, (char *) buf, cmd_len); @@ -270,7 +270,7 @@ int kachina_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) /* telemetry sent to the PC automatically at a 50msec rate */ - serial_flush(&rig->state.rigport); + rig_flush(&rig->state.rigport); count = read_string(&rig->state.rigport, (char *) buf, 31, rcv_signal_range, 128); diff --git a/rigs/kenwood/ic10.c b/rigs/kenwood/ic10.c index e1618184..5039ebcf 100644 --- a/rigs/kenwood/ic10.c +++ b/rigs/kenwood/ic10.c @@ -89,7 +89,7 @@ int ic10_transaction(RIG *rig, const char *cmd, int cmd_len, char *data, rs = &rig->state; transaction: - serial_flush(&rs->rigport); + rig_flush(&rs->rigport); retval = write_block(&rs->rigport, cmd, cmd_len); diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index 5bcee48d..11707f12 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -311,15 +311,7 @@ transaction_write: } /* flush anything in the read buffer before command is sent */ - if (rs->rigport.type.rig == RIG_PORT_NETWORK - || rs->rigport.type.rig == RIG_PORT_UDP_NETWORK) - { - network_flush(&rs->rigport); - } - else - { - serial_flush(&rs->rigport); - } + rig_flush(&rs->rigport); retval = write_block(&rs->rigport, cmd, len); diff --git a/rigs/kenwood/thd72.c b/rigs/kenwood/thd72.c index 0385c30e..7fcb32a5 100644 --- a/rigs/kenwood/thd72.c +++ b/rigs/kenwood/thd72.c @@ -1514,7 +1514,7 @@ int thd72_get_chan_all_cb(RIG *rig, chan_cb_t chan_cb, rig_ptr_t arg) hl_usleep(100 * 1000); /* let the pcr settle */ - serial_flush(rp); /* flush any remaining data */ + rig_flush(rp); /* flush any remaining data */ ret = ser_set_rts(rp, 1); /* setRTS or Hardware flow control? */ if (ret != RIG_OK) diff --git a/rigs/kenwood/thd74.c b/rigs/kenwood/thd74.c index 69ecbded..61649672 100644 --- a/rigs/kenwood/thd74.c +++ b/rigs/kenwood/thd74.c @@ -1526,7 +1526,7 @@ int thd74_get_chan_all_cb(RIG *rig, chan_cb_t chan_cb, rig_ptr_t arg) hl_usleep(100 * 1000); /* let the pcr settle */ - serial_flush(rp); /* flush any remaining data */ + rig_flush(rp); /* flush any remaining data */ ret = ser_set_rts(rp, 1); /* setRTS or Hardware flow control? */ if (ret != RIG_OK) diff --git a/rigs/kit/drt1.c b/rigs/kit/drt1.c index 78e6e4d3..5c59ea70 100644 --- a/rigs/kit/drt1.c +++ b/rigs/kit/drt1.c @@ -415,7 +415,7 @@ int drt1_set_freq(RIG *rig, vfo_t vfo, freq_t freq) priv = (struct drt1_priv_data *)rig->state.priv; - serial_flush(port); + rig_flush(port); /* Initialization */ ad_ioupd(port, 0); diff --git a/rigs/kit/elektor304.c b/rigs/kit/elektor304.c index 56280dd0..17449c9a 100644 --- a/rigs/kit/elektor304.c +++ b/rigs/kit/elektor304.c @@ -345,7 +345,7 @@ int elektor304_set_freq(RIG *rig, vfo_t vfo, freq_t freq) priv = (struct elektor304_priv_data *)rig->state.priv; - serial_flush(port); + rig_flush(port); /* Initialization */ ad_fsync(port, 0); diff --git a/rigs/kit/miniVNA.c b/rigs/kit/miniVNA.c index 0df35acf..03234325 100644 --- a/rigs/kit/miniVNA.c +++ b/rigs/kit/miniVNA.c @@ -46,7 +46,7 @@ static int miniVNA_set_freq(RIG *rig, vfo_t vfo, freq_t freq) rig_debug(RIG_DEBUG_TRACE, "%s called: %s %s\n", __func__, rig_strvfo(vfo), fstr); - serial_flush(&rig->state.rigport); + rig_flush(&rig->state.rigport); sprintf(cmdstr, "0\r%lu\r1\r0\r", (unsigned long int)(freq * DDS_RATIO)); diff --git a/rigs/kit/rs_hfiq.c b/rigs/kit/rs_hfiq.c index 7c2d1381..2ba78adf 100644 --- a/rigs/kit/rs_hfiq.c +++ b/rigs/kit/rs_hfiq.c @@ -79,7 +79,7 @@ static int rshfiq_open(RIG *rig) } } - serial_flush(&rig->state.rigport); + rig_flush(&rig->state.rigport); snprintf(versionstr, sizeof(versionstr), "*w\r"); rig_debug(RIG_DEBUG_TRACE, "%s: cmdstr = %s\n", __func__, versionstr); @@ -132,7 +132,7 @@ static int rshfiq_set_freq(RIG *rig, vfo_t vfo, freq_t freq) rig_debug(RIG_DEBUG_TRACE, "%s called: %s %s\n", __func__, rig_strvfo(vfo), fstr); - serial_flush(&rig->state.rigport); + rig_flush(&rig->state.rigport); snprintf(cmdstr, sizeof(cmdstr), "*f%lu\r", (unsigned long int)(freq)); @@ -150,7 +150,7 @@ static int rshfiq_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) char cmdstr[15]; char stopset[2]; int retval; - serial_flush(&rig->state.rigport); + rig_flush(&rig->state.rigport); stopset[0] = '\r'; stopset[1] = '\n'; diff --git a/rigs/lowe/lowe.c b/rigs/lowe/lowe.c index 7b236c68..72d3698e 100644 --- a/rigs/lowe/lowe.c +++ b/rigs/lowe/lowe.c @@ -63,7 +63,7 @@ int lowe_transaction(RIG *rig, const char *cmd, int cmd_len, char *data, rs = &rig->state; - serial_flush(&rs->rigport); + rig_flush(&rs->rigport); retval = write_block(&rs->rigport, cmd, cmd_len); diff --git a/rigs/pcr/pcr.c b/rigs/pcr/pcr.c index 8c3c7c0c..8352987f 100644 --- a/rigs/pcr/pcr.c +++ b/rigs/pcr/pcr.c @@ -384,7 +384,7 @@ pcr_transaction(RIG *rig, const char *cmd) if (!priv->auto_update) { - serial_flush(&rs->rigport); + rig_flush(&rs->rigport); } pcr_send(rig, cmd); @@ -582,7 +582,7 @@ pcr_open(RIG *rig) /* let the pcr settle and flush any remaining data*/ hl_usleep(100 * 1000); - serial_flush(&rs->rigport); + rig_flush(&rs->rigport); /* try powering on twice, sometimes the pcr answers H100 (off) */ pcr_send(rig, "H101"); @@ -591,7 +591,7 @@ pcr_open(RIG *rig) pcr_send(rig, "H101"); hl_usleep(100 * 250); - serial_flush(&rs->rigport); + rig_flush(&rs->rigport); /* return RIG_ERJCTED if power is off */ err = pcr_transaction(rig, "H1?"); diff --git a/rigs/prm80/prm80.c b/rigs/prm80/prm80.c index 77a1c31f..0b841a9d 100644 --- a/rigs/prm80/prm80.c +++ b/rigs/prm80/prm80.c @@ -78,7 +78,7 @@ static int prm80_transaction(RIG *rig, const char *cmd, int cmd_len, char *data, rs = &rig->state; - serial_flush(&rs->rigport); + rig_flush(&rs->rigport); retval = write_block(&rs->rigport, cmd, cmd_len); diff --git a/rigs/racal/ra37xx.c b/rigs/racal/ra37xx.c index 8e819b2d..ca09bf1e 100644 --- a/rigs/racal/ra37xx.c +++ b/rigs/racal/ra37xx.c @@ -104,7 +104,7 @@ static int ra37xx_one_transaction(RIG *rig, const char *cmd, char *data, cmd_len = sprintf(cmdbuf, SOM "%s" EOM, cmd); } - serial_flush(&rs->rigport); + rig_flush(&rs->rigport); retval = write_block(&rs->rigport, cmdbuf, cmd_len); diff --git a/rigs/racal/racal.c b/rigs/racal/racal.c index 695b1af8..96dd4ccf 100644 --- a/rigs/racal/racal.c +++ b/rigs/racal/racal.c @@ -84,7 +84,7 @@ static int racal_transaction(RIG *rig, const char *cmd, char *data, cmd_len = sprintf(cmdbuf, SOM "%u%s" EOM, priv->receiver_id, cmd); - serial_flush(&rs->rigport); + rig_flush(&rs->rigport); retval = write_block(&rs->rigport, cmdbuf, cmd_len); diff --git a/rigs/rft/rft.c b/rigs/rft/rft.c index 58a8dca3..06a154bb 100644 --- a/rigs/rft/rft.c +++ b/rigs/rft/rft.c @@ -55,7 +55,7 @@ int rft_transaction(RIG *rig, const char *cmd, int cmd_len, char *data, rs = &rig->state; - serial_flush(&rs->rigport); + rig_flush(&rs->rigport); retval = write_block(&rs->rigport, cmd, cmd_len); diff --git a/rigs/rs/gp2000.c b/rigs/rs/gp2000.c index ebf1548a..cbf9c5ab 100644 --- a/rigs/rs/gp2000.c +++ b/rigs/rs/gp2000.c @@ -71,7 +71,7 @@ gp2000_transaction(RIG *rig, const char *cmd, int cmd_len, char *data, rs = &rig->state; - serial_flush(&rs->rigport); + rig_flush(&rs->rigport); rig_debug(RIG_DEBUG_VERBOSE, "gp2000_transaction: len=%d,cmd=%s\n", cmd_len, cmd); diff --git a/rigs/rs/rs.c b/rigs/rs/rs.c index e7a34a03..138d680e 100644 --- a/rigs/rs/rs.c +++ b/rigs/rs/rs.c @@ -64,7 +64,7 @@ int rs_transaction(RIG *rig, const char *cmd, int cmd_len, char *data, rs = &rig->state; - serial_flush(&rs->rigport); + rig_flush(&rs->rigport); retval = write_block(&rs->rigport, cmd, cmd_len); diff --git a/rigs/skanti/skanti.c b/rigs/skanti/skanti.c index cc6e1bfe..20e103b0 100644 --- a/rigs/skanti/skanti.c +++ b/rigs/skanti/skanti.c @@ -71,7 +71,7 @@ static int skanti_transaction(RIG *rig, const char *cmd, int cmd_len, rs = &rig->state; - serial_flush(&rs->rigport); + rig_flush(&rs->rigport); retval = write_block(&rs->rigport, cmd, cmd_len); diff --git a/rigs/tapr/tapr.c b/rigs/tapr/tapr.c index aa201b1f..baf34356 100644 --- a/rigs/tapr/tapr.c +++ b/rigs/tapr/tapr.c @@ -58,7 +58,7 @@ static int tapr_cmd(RIG *rig, unsigned char cmd, unsigned char c1, rs = &rig->state; - serial_flush(&rs->rigport); + rig_flush(&rs->rigport); cmdbuf[0] = ESC; cmdbuf[1] = cmd; diff --git a/rigs/tentec/omnivii.c b/rigs/tentec/omnivii.c index cb978d8a..a2f495f3 100644 --- a/rigs/tentec/omnivii.c +++ b/rigs/tentec/omnivii.c @@ -268,7 +268,7 @@ static int tt588_transaction(RIG *rig, const char *cmd, int cmd_len, char *data, for (i = 0; i < 3; ++i) // We'll try 3 times { char xxbuf[32]; - serial_flush(&rs->rigport); + rig_flush(&rs->rigport); // We add 1 to data_len here for the null byte inserted by read_string eventually // That way all the callers can use the expected response length for the cmd_len paramter here diff --git a/rigs/tentec/orion.c b/rigs/tentec/orion.c index ece1a7ad..7a0a4208 100644 --- a/rigs/tentec/orion.c +++ b/rigs/tentec/orion.c @@ -130,7 +130,7 @@ static int tt565_transaction(RIG *rig, const char *cmd, int cmd_len, char *data, { int retval; rs = &rig->state; - serial_flush(&rs->rigport); /* discard pending i/p */ + rig_flush(&rs->rigport); /* discard pending i/p */ retval = write_block(&rs->rigport, cmd, cmd_len); if (retval != RIG_OK) diff --git a/rigs/tentec/paragon.c b/rigs/tentec/paragon.c index 9d9527bf..807c817f 100644 --- a/rigs/tentec/paragon.c +++ b/rigs/tentec/paragon.c @@ -582,7 +582,7 @@ int tt585_get_status_data(RIG *rig) return RIG_OK; } - serial_flush(rigport); + rig_flush(rigport); /* send STATUS comand to fetch data*/ diff --git a/rigs/tentec/rx331.c b/rigs/tentec/rx331.c index 88e04e1a..3161ad71 100644 --- a/rigs/tentec/rx331.c +++ b/rigs/tentec/rx331.c @@ -253,7 +253,7 @@ static int rx331_transaction(RIG *rig, const char *cmd, int cmd_len, char *data, rs = &rig->state; - serial_flush(&rs->rigport); + rig_flush(&rs->rigport); num_snprintf(str, BUFSZ, "$%u%s", priv->receiver_id, cmd); retval = write_block(&rs->rigport, str, strlen(str)); diff --git a/rigs/tentec/rx340.c b/rigs/tentec/rx340.c index b6f03ea7..ec9f81d8 100644 --- a/rigs/tentec/rx340.c +++ b/rigs/tentec/rx340.c @@ -204,7 +204,7 @@ static int rx340_transaction(RIG *rig, const char *cmd, int cmd_len, char *data, rs = &rig->state; - serial_flush(&rs->rigport); + rig_flush(&rs->rigport); retval = write_block(&rs->rigport, cmd, cmd_len); diff --git a/rigs/tentec/tentec.c b/rigs/tentec/tentec.c index dc7bb01b..7f21d96c 100644 --- a/rigs/tentec/tentec.c +++ b/rigs/tentec/tentec.c @@ -70,7 +70,7 @@ int tentec_transaction(RIG *rig, const char *cmd, int cmd_len, char *data, rs = &rig->state; - serial_flush(&rs->rigport); + rig_flush(&rs->rigport); retval = write_block(&rs->rigport, cmd, cmd_len); diff --git a/rigs/tentec/tt550.c b/rigs/tentec/tt550.c index 9612d4ec..20215f5c 100644 --- a/rigs/tentec/tt550.c +++ b/rigs/tentec/tt550.c @@ -85,7 +85,7 @@ tt550_transaction(RIG *rig, const char *cmd, int cmd_len, char *data, // cppcheck-suppress * Hold_Decode(rig); - serial_flush(&rs->rigport); + rig_flush(&rs->rigport); retval = write_block(&rs->rigport, cmd, cmd_len); diff --git a/rigs/uniden/uniden.c b/rigs/uniden/uniden.c index b19c07ab..7d50f91b 100644 --- a/rigs/uniden/uniden.c +++ b/rigs/uniden/uniden.c @@ -132,7 +132,7 @@ uniden_transaction(RIG *rig, const char *cmdstr, int cmd_len, transaction_write: - serial_flush(&rs->rigport); + rig_flush(&rs->rigport); if (cmdstr) { diff --git a/rigs/uniden/uniden_digital.c b/rigs/uniden/uniden_digital.c index bcb74a22..9c770fa8 100644 --- a/rigs/uniden/uniden_digital.c +++ b/rigs/uniden/uniden_digital.c @@ -114,7 +114,7 @@ uniden_digital_transaction(RIG *rig, const char *cmdstr, int cmd_len, transaction_write: - serial_flush(&rs->rigport); + rig_flush(&rs->rigport); if (cmdstr) { diff --git a/rigs/wj/wj.c b/rigs/wj/wj.c index b58f0f80..93563607 100644 --- a/rigs/wj/wj.c +++ b/rigs/wj/wj.c @@ -177,7 +177,7 @@ static int wj_transaction(RIG *rig, int monitor) /* buf[9]: not used if command byte, but must be transmitted */ - serial_flush(&rig->state.rigport); + rig_flush(&rig->state.rigport); retval = write_block(&rig->state.rigport, (char *) buf, CMDSZ); diff --git a/rigs/yaesu/frg100.c b/rigs/yaesu/frg100.c index 8bb3cf78..cb395100 100644 --- a/rigs/yaesu/frg100.c +++ b/rigs/yaesu/frg100.c @@ -233,7 +233,7 @@ static int frg100_do_transaction(RIG *rig, rs = &rig->state; memset(retbuf, 0, retbuf_len); - serial_flush(&rs->rigport); + rig_flush(&rs->rigport); retval = write_block(&rs->rigport, (const char *)cmd, YAESU_CMD_LENGTH); if (retval != RIG_OK) { return retval; } @@ -409,7 +409,7 @@ int frg100_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) return -RIG_EINVAL; } - serial_flush(&rig->state.rigport); + rig_flush(&rig->state.rigport); /* send READ STATUS(Meter only) cmd to rig */ retval = write_block(&rig->state.rigport, (char *) cmd, YAESU_CMD_LENGTH); diff --git a/rigs/yaesu/ft100.c b/rigs/yaesu/ft100.c index 32a90821..8083c363 100644 --- a/rigs/yaesu/ft100.c +++ b/rigs/yaesu/ft100.c @@ -403,7 +403,7 @@ static int ft100_read_status(RIG *rig) priv = (struct ft100_priv_data *)rig->state.priv; - serial_flush(&rig->state.rigport); + rig_flush(&rig->state.rigport); ret = ft100_send_priv_cmd(rig, FT100_NATIVE_CAT_READ_STATUS); @@ -432,7 +432,7 @@ static int ft100_read_flags(RIG *rig) rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); - serial_flush(&rig->state.rigport); + rig_flush(&rig->state.rigport); ret = ft100_send_priv_cmd(rig, FT100_NATIVE_CAT_READ_FLAGS); diff --git a/rigs/yaesu/ft1000mp.c b/rigs/yaesu/ft1000mp.c index 8c7ae3dc..030b17fe 100644 --- a/rigs/yaesu/ft1000mp.c +++ b/rigs/yaesu/ft1000mp.c @@ -1516,7 +1516,7 @@ static int ft1000mp_send_priv_cmd(RIG *rig, unsigned char ci) } cmd = (unsigned char *) p->pcs[cmd_index].nseq; /* get native sequence */ - serial_flush(&rig_s->rigport); + rig_flush(&rig_s->rigport); write_block(&rig_s->rigport, (char *) cmd, YAESU_CMD_LENGTH); return RIG_OK; diff --git a/rigs/yaesu/ft600.c b/rigs/yaesu/ft600.c index 5b7383f9..349fe6b3 100644 --- a/rigs/yaesu/ft600.c +++ b/rigs/yaesu/ft600.c @@ -313,7 +313,7 @@ static int ft600_read_status(RIG *rig) priv = (struct ft600_priv_data *)rig->state.priv; - serial_flush(&rig->state.rigport); + rig_flush(&rig->state.rigport); ret = ft600_send_priv_cmd(rig, FT600_NATIVE_CAT_READ_STATUS); diff --git a/rigs/yaesu/ft736.c b/rigs/yaesu/ft736.c index 60dda021..37abff24 100644 --- a/rigs/yaesu/ft736.c +++ b/rigs/yaesu/ft736.c @@ -440,7 +440,7 @@ int ft736_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd) unsigned char cmd[YAESU_CMD_LENGTH] = { 0x00, 0x00, 0x00, 0x00, 0xe7}; int retval; - serial_flush(&rig->state.rigport); + rig_flush(&rig->state.rigport); retval = write_block(&rig->state.rigport, (char *) cmd, YAESU_CMD_LENGTH); @@ -475,7 +475,7 @@ int ft736_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) return -RIG_EINVAL; } - serial_flush(&rig->state.rigport); + rig_flush(&rig->state.rigport); /* send Test S-meter cmd to rig */ retval = write_block(&rig->state.rigport, (char *) cmd, YAESU_CMD_LENGTH); diff --git a/rigs/yaesu/ft747.c b/rigs/yaesu/ft747.c index 4e33773f..5f36bc27 100644 --- a/rigs/yaesu/ft747.c +++ b/rigs/yaesu/ft747.c @@ -869,7 +869,7 @@ static int ft747_get_update_data(RIG *rig) { int ret; int port_timeout; - serial_flush(rigport); + rig_flush(rigport); /* send UPDATE comand to fetch data*/ diff --git a/rigs/yaesu/ft757gx.c b/rigs/yaesu/ft757gx.c index c097275f..5c9ca6f8 100644 --- a/rigs/yaesu/ft757gx.c +++ b/rigs/yaesu/ft757gx.c @@ -652,7 +652,7 @@ int ft757_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) return -RIG_EINVAL; } - serial_flush(&rig->state.rigport); + rig_flush(&rig->state.rigport); /* send READ STATUS(Meter only) cmd to rig */ retval = write_block(&rig->state.rigport, (char *)cmd, YAESU_CMD_LENGTH); @@ -702,7 +702,7 @@ int ft757_get_update_data(RIG *rig) does not fix things. So we restart the read from scratch, it works most of times. */ for (nbtries = 0 ; nbtries < maxtries ; nbtries++) { - serial_flush(&rig->state.rigport); + rig_flush(&rig->state.rigport); /* send READ STATUS cmd to rig */ retval = write_block(&rig->state.rigport, (char *)cmd, YAESU_CMD_LENGTH); diff --git a/rigs/yaesu/ft767gx.c b/rigs/yaesu/ft767gx.c index 5760078b..33c15d51 100644 --- a/rigs/yaesu/ft767gx.c +++ b/rigs/yaesu/ft767gx.c @@ -460,7 +460,7 @@ int ft767_open(RIG *rig) struct ft767_priv_data *priv = (struct ft767_priv_data *)rig->state.priv; int retval; - serial_flush(&rig->state.rigport); + rig_flush(&rig->state.rigport); /* send 0 delay PACING cmd to rig */ retval = ft767_enter_CAT(rig); @@ -492,7 +492,7 @@ int ft767_open(RIG *rig) int ft767_close(RIG *rig) { - serial_flush(&rig->state.rigport); + rig_flush(&rig->state.rigport); return RIG_OK; } @@ -1225,7 +1225,7 @@ int ft767_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) return -RIG_EINVAL; /* sorry, wrong VFO */ } - serial_flush(&rig->state.rigport); + rig_flush(&rig->state.rigport); retval = ft767_enter_CAT(rig); @@ -1538,7 +1538,7 @@ int ft767_get_update_data(RIG *rig) struct ft767_priv_data *priv = (struct ft767_priv_data *)rig->state.priv; int retval; - serial_flush(&rig->state.rigport); + rig_flush(&rig->state.rigport); /* Entering CAT updates our data structures */ retval = ft767_enter_CAT(rig); @@ -1569,7 +1569,7 @@ int ft767_set_split(RIG *rig, unsigned int split) int retval; unsigned int curr_split; - serial_flush(&rig->state.rigport); + rig_flush(&rig->state.rigport); /* Entering CAT updates our data structures */ retval = ft767_enter_CAT(rig); diff --git a/rigs/yaesu/ft817.c b/rigs/yaesu/ft817.c index 1f9c2388..b1a87931 100644 --- a/rigs/yaesu/ft817.c +++ b/rigs/yaesu/ft817.c @@ -451,7 +451,7 @@ static int ft817_get_status(RIG *rig, int status) do { - serial_flush(&rig->state.rigport); + rig_flush(&rig->state.rigport); write_block(&rig->state.rigport, (char *) p->pcs[status].nseq, YAESU_CMD_LENGTH); n = read_block(&rig->state.rigport, (char *) data, len); diff --git a/rigs/yaesu/ft847.c b/rigs/yaesu/ft847.c index 18eb6fe6..121bf38c 100644 --- a/rigs/yaesu/ft847.c +++ b/rigs/yaesu/ft847.c @@ -1143,7 +1143,7 @@ static int ft847_get_status(RIG *rig, int status_ci) return -RIG_EINTERNAL; } - serial_flush(&rig->state.rigport); + rig_flush(&rig->state.rigport); n = write_block(&rig->state.rigport, (char *) ncmd[status_ci].nseq, YAESU_CMD_LENGTH); diff --git a/rigs/yaesu/ft857.c b/rigs/yaesu/ft857.c index 2da3c002..dc062083 100644 --- a/rigs/yaesu/ft857.c +++ b/rigs/yaesu/ft857.c @@ -438,7 +438,7 @@ static int ft857_get_status(RIG *rig, int status) return -RIG_EINTERNAL; } - serial_flush(&rig->state.rigport); + rig_flush(&rig->state.rigport); write_block(&rig->state.rigport, (char *) p->pcs[status].nseq, YAESU_CMD_LENGTH); diff --git a/rigs/yaesu/ft897.c b/rigs/yaesu/ft897.c index ae20a39e..de84830e 100644 --- a/rigs/yaesu/ft897.c +++ b/rigs/yaesu/ft897.c @@ -473,7 +473,7 @@ static int ft897_get_status(RIG *rig, int status) return -RIG_EINTERNAL; } - serial_flush(&rig->state.rigport); + rig_flush(&rig->state.rigport); write_block(&rig->state.rigport, (char *) p->pcs[status].nseq, YAESU_CMD_LENGTH); diff --git a/rigs/yaesu/ft980.c b/rigs/yaesu/ft980.c index 5eebfa7b..461d0e5d 100644 --- a/rigs/yaesu/ft980.c +++ b/rigs/yaesu/ft980.c @@ -635,7 +635,7 @@ int ft980_transaction(RIG *rig, const unsigned char *cmd, unsigned char *data, int retval; char echo_back[YAESU_CMD_LENGTH]; - serial_flush(&rig->state.rigport); + rig_flush(&rig->state.rigport); retval = write_block(&rig->state.rigport, (const char *)cmd, YAESU_CMD_LENGTH); diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 8cc8b187..550dc55a 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -6520,7 +6520,7 @@ int newcat_set_cmd(RIG *rig) while (rc != RIG_OK && retry_count++ <= state->rigport.retry) { - serial_flush(&state->rigport); /* discard any unsolicited data */ + rig_flush(&state->rigport); /* discard any unsolicited data */ /* send the command */ rig_debug(RIG_DEBUG_TRACE, "cmd_str = %s\n", priv->cmd_str); diff --git a/rigs/yaesu/vr5000.c b/rigs/yaesu/vr5000.c index 35aacbb3..eeb403cf 100644 --- a/rigs/yaesu/vr5000.c +++ b/rigs/yaesu/vr5000.c @@ -412,7 +412,7 @@ int vr5000_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) return -RIG_EINVAL; } - serial_flush(&rig->state.rigport); + rig_flush(&rig->state.rigport); /* send READ STATUS(Meter only) cmd to rig */ retval = write_block(&rig->state.rigport, (char *) cmd, YAESU_CMD_LENGTH); @@ -446,7 +446,7 @@ int vr5000_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd) unsigned char cmd[YAESU_CMD_LENGTH] = { 0x00, 0x00, 0x00, 0x00, 0xe7}; int retval; - serial_flush(&rig->state.rigport); + rig_flush(&rig->state.rigport); /* send READ STATUS(Meter only) cmd to rig */ retval = write_block(&rig->state.rigport, (char *) cmd, YAESU_CMD_LENGTH); diff --git a/rigs/yaesu/vx1700.c b/rigs/yaesu/vx1700.c index 068c5753..f99b9c76 100644 --- a/rigs/yaesu/vx1700.c +++ b/rigs/yaesu/vx1700.c @@ -240,7 +240,7 @@ static int vx1700_do_transaction(RIG *rig, rs = &rig->state; memset(retbuf, 0, retbuf_len); - serial_flush(&rs->rigport); + rig_flush(&rs->rigport); retval = write_block(&rs->rigport, (const char *)cmd, YAESU_CMD_LENGTH); if (retval != RIG_OK) { return retval; } diff --git a/src/misc.c b/src/misc.c index b8f90c8d..c665346e 100644 --- a/src/misc.c +++ b/src/misc.c @@ -1492,7 +1492,11 @@ int HAMLIB_API rig_flush(hamlib_port_t *port) return RIG_OK; } - return serial_flush(port); + if (port->type.rig != RIG_PORT_SERIAL) + { + rig_debug(RIG_DEBUG_WARN, "%s: Expected serial port type!!\nWhat is this rig?\n", __func__); + } + return serial_flush(port); // we must be on serial port } //! @endcond diff --git a/src/serial.c b/src/serial.c index 35832044..72c7402e 100644 --- a/src/serial.c +++ b/src/serial.c @@ -203,9 +203,7 @@ int HAMLIB_API serial_open(hamlib_port_t *rp) /* * Open in Non-blocking mode. Watch for EAGAIN errors! */ - rig_debug(RIG_DEBUG_TRACE, "%s: OPEN before\n", __func__); fd = OPEN(rp->pathname, O_RDWR | O_NOCTTY | O_NDELAY); - rig_debug(RIG_DEBUG_TRACE, "%s: OPEN after\n", __func__); if (fd == -1) { @@ -220,9 +218,7 @@ int HAMLIB_API serial_open(hamlib_port_t *rp) rp->fd = fd; - rig_debug(RIG_DEBUG_TRACE, "%s: serial_setup before\n", __func__); err = serial_setup(rp); - rig_debug(RIG_DEBUG_TRACE, "%s: serial_setup after\n", __func__); if (err != RIG_OK) { @@ -230,9 +226,7 @@ int HAMLIB_API serial_open(hamlib_port_t *rp) return err; } - rig_debug(RIG_DEBUG_TRACE, "%s: serial_flush before\n", __func__); serial_flush(rp); // ensure nothing is there when we open - rig_debug(RIG_DEBUG_TRACE, "%s: serial_flush before\n", __func__); return RIG_OK; } commit b50975729ca5e44871f96db797617e9a0f9b820c Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Jun 23 08:44:27 2020 -0500 Rotators and amplifiers converted to rig_flush https://github.com/Hamlib/Hamlib/issues/307 diff --git a/amplifiers/elecraft/kpa.c b/amplifiers/elecraft/kpa.c index 5c78d54d..dc066de6 100644 --- a/amplifiers/elecraft/kpa.c +++ b/amplifiers/elecraft/kpa.c @@ -98,7 +98,7 @@ int kpa_flushbuffer(AMP *amp) rs = &->state; - return serial_flush(&rs->ampport); + return rig_flush(&rs->ampport); } int kpa_transaction(AMP *amp, const char *cmd, char *response, int response_len) diff --git a/rotators/celestron/celestron.c b/rotators/celestron/celestron.c index 4028b03c..f095b6fe 100644 --- a/rotators/celestron/celestron.c +++ b/rotators/celestron/celestron.c @@ -67,7 +67,7 @@ celestron_transaction(ROT *rot, const char *cmdstr, transaction_write: - serial_flush(&rs->rotport); + rig_flush(&rs->rotport); if (cmdstr) { diff --git a/rotators/easycomm/easycomm.c b/rotators/easycomm/easycomm.c index 0d565e91..bd2c7d19 100644 --- a/rotators/easycomm/easycomm.c +++ b/rotators/easycomm/easycomm.c @@ -63,7 +63,7 @@ easycomm_transaction(ROT *rot, const char *cmdstr, char *data, size_t data_len) } rs = &rot->state; - serial_flush(&rs->rotport); + rig_flush(&rs->rotport); retval = write_block(&rs->rotport, cmdstr, strlen(cmdstr)); if (retval != RIG_OK) diff --git a/rotators/gs232a/gs232.c b/rotators/gs232a/gs232.c index a2886402..b179b116 100644 --- a/rotators/gs232a/gs232.c +++ b/rotators/gs232a/gs232.c @@ -69,7 +69,7 @@ gs232_transaction(ROT *rot, const char *cmdstr, transaction_write: - serial_flush(&rs->rotport); + rig_flush(&rs->rotport); if (cmdstr) { diff --git a/rotators/gs232a/gs232a.c b/rotators/gs232a/gs232a.c index d837ed4b..f0718eee 100644 --- a/rotators/gs232a/gs232a.c +++ b/rotators/gs232a/gs232a.c @@ -74,7 +74,7 @@ gs232a_transaction(ROT *rot, const char *cmdstr, transaction_write: - serial_flush(&rs->rotport); + rig_flush(&rs->rotport); if (cmdstr) { diff --git a/rotators/gs232a/gs232b.c b/rotators/gs232a/gs232b.c index 935f4e4d..eebaad67 100644 --- a/rotators/gs232a/gs232b.c +++ b/rotators/gs232a/gs232b.c @@ -75,7 +75,7 @@ gs232b_transaction(ROT *rot, const char *cmdstr, transaction_write: - serial_flush(&rs->rotport); + rig_flush(&rs->rotport); if (cmdstr) { diff --git a/rotators/ioptron/rot_ioptron.c b/rotators/ioptron/rot_ioptron.c index bcdbc1a8..137d9916 100644 --- a/rotators/ioptron/rot_ioptron.c +++ b/rotators/ioptron/rot_ioptron.c @@ -83,7 +83,7 @@ ioptron_transaction(ROT *rot, const char *cmdstr, transaction_write: - serial_flush(&rs->rotport); + rig_flush(&rs->rotport); if (cmdstr) { diff --git a/rotators/m2/rc2800.c b/rotators/m2/rc2800.c index 2f7927e4..b2cd4379 100644 --- a/rotators/m2/rc2800.c +++ b/rotators/m2/rc2800.c @@ -179,7 +179,7 @@ rc2800_transaction(ROT *rot, const char *cmdstr, transaction_write: - serial_flush(&rs->rotport); + rig_flush(&rs->rotport); if (cmdstr) { diff --git a/rotators/meade/meade.c b/rotators/meade/meade.c index ec3438d5..0aaa9341 100644 --- a/rotators/meade/meade.c +++ b/rotators/meade/meade.c @@ -111,7 +111,7 @@ static int meade_transaction(ROT *rot, const char *cmdstr, while (1) { transaction: - serial_flush(&rs->rotport); + rig_flush(&rs->rotport); if (cmdstr) { diff --git a/rotators/prosistel/prosistel.c b/rotators/prosistel/prosistel.c index 3d0f80b8..7b892969 100644 --- a/rotators/prosistel/prosistel.c +++ b/rotators/prosistel/prosistel.c @@ -83,7 +83,7 @@ static int prosistel_transaction(ROT *rot, const char *cmdstr, transaction_write: - serial_flush(&rs->rotport); + rig_flush(&rs->rotport); if (cmdstr) { commit 1be5c71e76d60573c80c42699b95f1f7c7443d26 Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Jun 23 08:39:11 2020 -0500 More conversions to rig_flush https://github.com/Hamlib/Hamlib/issues/307 diff --git a/tests/ampctl_parse.c b/tests/ampctl_parse.c index cc2decb9..521301ba 100644 --- a/tests/ampctl_parse.c +++ b/tests/ampctl_parse.c @@ -1937,7 +1937,7 @@ declare_proto_amp(send_cmd) rs = &->state; - serial_flush(&rs->ampport); + rig_flush(&rs->ampport); retval = write_block(&rs->ampport, bufcmd, cmd_len); diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 3c9befc9..36e4fe99 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -4394,7 +4394,7 @@ declare_proto_rig(send_cmd) rs = &rig->state; - serial_flush(&rs->rigport); + rig_flush(&rs->rigport); rig_debug(RIG_DEBUG_TRACE, "%s: rigport=%d, bufcmd=%s, cmd_len=%d\n", __func__, rs->rigport.fd, hasbinary(bufcmd) ? "BINARY" : bufcmd, cmd_len); diff --git a/tests/rigctlcom.c b/tests/rigctlcom.c index e3f3f9f3..e2cdb95c 100644 --- a/tests/rigctlcom.c +++ b/tests/rigctlcom.c @@ -614,7 +614,7 @@ int main(int argc, char *argv[]) char *stop_set = ";\n\r"; memset(ts2000, 0, sizeof(ts2000)); - serial_flush(&my_com); // get rid of anything in the queue + rig_flush(&my_com); // get rid of anything in the queue status = read_string(&my_com, ts2000, diff --git a/tests/rotctl_parse.c b/tests/rotctl_parse.c index 87fb78c7..a0dce570 100644 --- a/tests/rotctl_parse.c +++ b/tests/rotctl_parse.c @@ -1959,7 +1959,7 @@ declare_proto_rot(send_cmd) rs = &rot->state; - serial_flush(&rs->rotport); + rig_flush(&rs->rotport); retval = write_block(&rs->rotport, bufcmd, cmd_len); ----------------------------------------------------------------------- Summary of changes: amplifiers/elecraft/kpa.c | 2 +- rigs/adat/adat.c | 4 ++-- rigs/alinco/dx77.c | 2 +- rigs/alinco/dxsr8.c | 2 +- rigs/aor/aor.c | 2 +- rigs/aor/ar3000.c | 2 +- rigs/aor/ar3030.c | 4 ++-- rigs/aor/sr2200.c | 2 +- rigs/barrett/barrett.c | 2 +- rigs/drake/drake.c | 2 +- rigs/elad/elad.c | 10 +--------- rigs/icmarine/icmarine.c | 2 +- rigs/icom/frame.c | 2 +- rigs/icom/icom.c | 4 ++-- rigs/jrc/jrc.c | 2 +- rigs/kachina/kachina.c | 6 +++--- rigs/kenwood/ic10.c | 2 +- rigs/kenwood/kenwood.c | 10 +--------- rigs/kenwood/thd72.c | 2 +- rigs/kenwood/thd74.c | 2 +- rigs/kit/drt1.c | 2 +- rigs/kit/elektor304.c | 2 +- rigs/kit/miniVNA.c | 2 +- rigs/kit/rs_hfiq.c | 6 +++--- rigs/lowe/lowe.c | 2 +- rigs/pcr/pcr.c | 6 +++--- rigs/prm80/prm80.c | 2 +- rigs/racal/ra37xx.c | 2 +- rigs/racal/racal.c | 2 +- rigs/rft/rft.c | 2 +- rigs/rs/gp2000.c | 2 +- rigs/rs/rs.c | 2 +- rigs/skanti/skanti.c | 2 +- rigs/tapr/tapr.c | 2 +- rigs/tentec/omnivii.c | 2 +- rigs/tentec/orion.c | 2 +- rigs/tentec/paragon.c | 2 +- rigs/tentec/rx331.c | 2 +- rigs/tentec/rx340.c | 2 +- rigs/tentec/tentec.c | 2 +- rigs/tentec/tt550.c | 2 +- rigs/uniden/uniden.c | 2 +- rigs/uniden/uniden_digital.c | 2 +- rigs/wj/wj.c | 2 +- rigs/yaesu/frg100.c | 4 ++-- rigs/yaesu/ft100.c | 4 ++-- rigs/yaesu/ft1000mp.c | 2 +- rigs/yaesu/ft600.c | 2 +- rigs/yaesu/ft736.c | 4 ++-- rigs/yaesu/ft747.c | 2 +- rigs/yaesu/ft757gx.c | 4 ++-- rigs/yaesu/ft767gx.c | 10 +++++----- rigs/yaesu/ft817.c | 2 +- rigs/yaesu/ft847.c | 2 +- rigs/yaesu/ft857.c | 2 +- rigs/yaesu/ft897.c | 2 +- rigs/yaesu/ft980.c | 2 +- rigs/yaesu/newcat.c | 2 +- rigs/yaesu/vr5000.c | 4 ++-- rigs/yaesu/vx1700.c | 2 +- rotators/celestron/celestron.c | 2 +- rotators/easycomm/easycomm.c | 2 +- rotators/gs232a/gs232.c | 2 +- rotators/gs232a/gs232a.c | 2 +- rotators/gs232a/gs232b.c | 2 +- rotators/ioptron/rot_ioptron.c | 2 +- rotators/m2/rc2800.c | 2 +- rotators/meade/meade.c | 2 +- rotators/prosistel/prosistel.c | 2 +- src/misc.c | 6 +++++- src/serial.c | 6 ------ tests/ampctl_parse.c | 2 +- tests/rigctl_parse.c | 2 +- tests/rigctlcom.c | 2 +- tests/rotctl_parse.c | 2 +- 75 files changed, 96 insertions(+), 114 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |