hamlib-cvs-digest Mailing List for Ham Radio Control Libraries (Page 20)
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
(20) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Michael B. <mdb...@us...> - 2021-01-20 23:43:25
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 140ccbefd4e62a1dcdf8f6eaaa593d7ef99b7262 (commit) from c93da3c5d43957a4df93c2af976e573105bb2db4 (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 140ccbefd4e62a1dcdf8f6eaaa593d7ef99b7262 Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Jan 20 17:43:06 2021 -0600 Prevent FT450 from doing VFOB actions while transmitting diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 22c38158..5ee11f7d 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -779,6 +779,9 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) current VFO so we must use the VS[0|1]; command to check and select the correct VFO before setting the frequency */ + // Plus we can't do the VFO swap if transmitting + if (target_vfo == 'B' && rig->state.cache.ptt == RIG_PTT_ON) return -RIG_ENTARGET; + snprintf(priv->cmd_str, sizeof(priv->cmd_str), "VS%c", cat_term); if (RIG_OK != (err = newcat_get_cmd(rig))) ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/newcat.c | 3 +++ 1 file changed, 3 insertions(+) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-01-20 23:27:59
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via c93da3c5d43957a4df93c2af976e573105bb2db4 (commit) from 5a9daf5f0e7fd416c5125e9336775d2936980f28 (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 c93da3c5d43957a4df93c2af976e573105bb2db4 Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Jan 20 17:27:41 2021 -0600 Fix FT450 FB command to swap VFOs diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index fe1060b6..22c38158 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -991,8 +991,25 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) // cppcheck-suppress * - snprintf(priv->cmd_str, sizeof(priv->cmd_str), "F%c%0*"PRIll"%c", c, - priv->width_frequency, (int64_t)freq, cat_term); + if (RIG_MODEL_FT450 == caps->rig_model) + { + if (c == 'B') + { + snprintf(priv->cmd_str, sizeof(priv->cmd_str), "VS1;F%c%0*"PRIll"%c;VS0;", c, + priv->width_frequency, (int64_t)freq, cat_term); + } + else + { + snprintf(priv->cmd_str, sizeof(priv->cmd_str), "F%c%0*"PRIll"%c", c, + priv->width_frequency, (int64_t)freq, cat_term); + } + } + else + { + snprintf(priv->cmd_str, sizeof(priv->cmd_str), "F%c%0*"PRIll"%c", c, + priv->width_frequency, (int64_t)freq, cat_term); + } + rig_debug(RIG_DEBUG_TRACE, "%s:%d cmd_str = %s\n", __func__, __LINE__, priv->cmd_str); @@ -1279,7 +1296,7 @@ int newcat_set_vfo(RIG *rig, vfo_t vfo) rig_strvfo(vfo)); // we can't change VFO while transmitting - if (rig->state.cache.ptt == RIG_PTT_ON) return RIG_OK; + if (rig->state.cache.ptt == RIG_PTT_ON) { return RIG_OK; } if (!newcat_valid_command(rig, command)) { @@ -9661,7 +9678,8 @@ int newcat_set_cmd_validate(RIG *rig) // for the BS command we can only run it once // so we'll assume it worked // maybe Yaeus will make this command more intelligent - if (strstr(priv->cmd_str,"BS")) return RIG_OK; + if (strstr(priv->cmd_str, "BS")) { return RIG_OK; } + // if the first two chars match we are validated if (strncmp(priv->cmd_str, "VS", 2) == 0 && strncmp(priv->cmd_str, priv->ret_data, 2) == 0) { RETURNFUNC(RIG_OK); } ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/newcat.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-01-20 21:08:45
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 5a9daf5f0e7fd416c5125e9336775d2936980f28 (commit) via f81c9158a870fdb76f9d66f32b006d1a1d073b16 (commit) from 5fec08b26261259a14c75e032feea7304f0b8482 (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 5a9daf5f0e7fd416c5125e9336775d2936980f28 Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Jan 20 15:07:59 2021 -0600 Fix ic703 and ic705 RIG_LEVEL_RFPOWER_METER_WATTS to scale to 10W instead of 100W diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 8d9739eb..014169bc 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -3111,8 +3111,15 @@ int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) } else { + float scale = 100; + if (rig->caps->rig_model == RIG_MODEL_IC705 + || rig->caps->rig_model == RIG_MODEL_IC703) + { + scale = 10; + } val->f = - rig_raw2val_float(icom_val, &rig->caps->rfpower_meter_cal) * 100; + rig_raw2val_float(icom_val, &rig->caps->rfpower_meter_cal) * scale; + } } break; diff --git a/rigs/icom/icom.h b/rigs/icom/icom.h index 7d28b6e6..34e055a9 100644 --- a/rigs/icom/icom.h +++ b/rigs/icom/icom.h @@ -30,7 +30,7 @@ #include <sys/time.h> #endif -#define BACKEND_VER "20210113" +#define BACKEND_VER "20210120" /* * defines used by comp_cal_str in rig.c commit f81c9158a870fdb76f9d66f32b006d1a1d073b16 Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Jan 20 15:06:14 2021 -0600 Update newcat.h version diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h index 7ee0befd..15615a35 100644 --- a/rigs/yaesu/newcat.h +++ b/rigs/yaesu/newcat.h @@ -50,7 +50,7 @@ typedef char ncboolean; /* shared function version */ -#define NEWCAT_VER "20210119" +#define NEWCAT_VER "20210120" /* Hopefully large enough for future use, 128 chars plus '\0' */ #define NEWCAT_DATA_LEN 129 ----------------------------------------------------------------------- Summary of changes: rigs/icom/icom.c | 9 ++++++++- rigs/icom/icom.h | 2 +- rigs/yaesu/newcat.h | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-01-20 17:34: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 5fec08b26261259a14c75e032feea7304f0b8482 (commit) from 8cad9dc2006cf440326542666ece1bddfc6a1828 (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 5fec08b26261259a14c75e032feea7304f0b8482 Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Jan 20 11:34:30 2021 -0600 Add disable_yaesu_bandselect option diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index c2149dcb..c90b5dbd 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -2190,6 +2190,7 @@ struct rig_state { int power_now; /*!< Current RF power level in rig units */ int power_min; /*!< Minimum RF power level in rig units */ int power_max; /*!< Maximum RF power level in rig units */ + unsigned char disable_yaesu_bandselect; /*!< Disables Yaeus band select logic */ }; //! @cond Doxygen_Suppress diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 1ab55c88..fe1060b6 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -845,6 +845,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) } if (newcat_valid_command(rig, "BS") && changing + && !rig->state.disable_yaesu_bandselect // remove the split check here -- hopefully works OK //&& !rig->state.cache.split && !is_ft891 // 891 does not remember bandwidth so don't do this diff --git a/src/conf.c b/src/conf.c index a018d304..40b096f2 100644 --- a/src/conf.c +++ b/src/conf.c @@ -138,6 +138,11 @@ static const struct confparams frontend_cfg_params[] = "True enables compatible rigs to have their screen saver disabled on open", "0", RIG_CONF_CHECKBUTTON, { } }, + { + TOK_DISABLE_YAESU_BANDSELECT, "disable_yaesu_bandselect", "Disable Yaesu band select logic", + "True disables the automatic band select on band change for Yaesu rigs", + "0", RIG_CONF_CHECKBUTTON, { } + }, { TOK_PTT_SHARE, "ptt_share", "Share ptt port with other apps", "True enables ptt port to be shared with other apps", @@ -590,6 +595,15 @@ static int frontend_set_conf(RIG *rig, token_t token, const char *val) rs->auto_disable_screensaver = val_i ? 1 : 0; break; + case TOK_DISABLE_YAESU_BANDSELECT: + if (1 != sscanf(val, "%d", &val_i)) + { + return -RIG_EINVAL; //value format error + } + + rs->disable_yaesu_bandselect = val_i ? 1 : 0; + break; + case TOK_PTT_SHARE: if (1 != sscanf(val, "%d", &val_i)) { @@ -928,6 +942,19 @@ static int frontend_get_conf(RIG *rig, token_t token, char *val) sprintf(val, "%d", rs->auto_disable_screensaver); break; + case TOK_PTT_SHARE: + sprintf(val, "%d", rs->ptt_share); + break; + + case TOK_FLUSHX: + sprintf(val, "%d", rs->rigport.flushx); + break; + + case TOK_DISABLE_YAESU_BANDSELECT: + sprintf(val, "%d", rs->disable_yaesu_bandselect); + break; + + default: return -RIG_EINVAL; } diff --git a/src/token.h b/src/token.h index 4d85e2fb..2ae86f89 100644 --- a/src/token.h +++ b/src/token.h @@ -112,6 +112,8 @@ #define TOK_AUTO_POWER_ON TOKEN_FRONTEND(124) /** \brief rig: Auto disable screensaver */ #define TOK_AUTO_DISABLE_SCREENSAVER TOKEN_FRONTEND(125) +/** \brief rig: Disable Yaesu band select logic */ +#define TOK_DISABLE_YAESU_BANDSELECT TOKEN_FRONTEND(126) /* * rotator specific tokens * (strictly, should be documented as rotator_internal) ----------------------------------------------------------------------- Summary of changes: include/hamlib/rig.h | 1 + rigs/yaesu/newcat.c | 1 + src/conf.c | 27 +++++++++++++++++++++++++++ src/token.h | 2 ++ 4 files changed, 31 insertions(+) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-01-20 17:17: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 8cad9dc2006cf440326542666ece1bddfc6a1828 (commit) from a4d9dac5cef15a7e4941472e142c2bd15b622f81 (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 8cad9dc2006cf440326542666ece1bddfc6a1828 Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Jan 20 11:16:48 2021 -0600 Adding testrigopen.c diff --git a/tests/testrigopen.c b/tests/testrigopen.c new file mode 100644 index 00000000..65845ee2 --- /dev/null +++ b/tests/testrigopen.c @@ -0,0 +1,62 @@ +/* + * Hamlib sample program + */ + +#include <stdio.h> +#include <string.h> +#include <unistd.h> +#include <stdlib.h> +#include <sys/time.h> + +#include <hamlib/rig.h> + +#include "misc.h" + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#define SERIAL_PORT "/dev/ttyUSB0" + +int callback(const struct rig_caps *caps, rig_ptr_t rigp) +{ + RIG *rig = (RIG*) rigp; + + rig = rig_init(caps->rig_model); + + if (!rig) + { + fprintf(stderr, "Unknown rig num: %d\n", caps->rig_model); + fprintf(stderr, "Please check riglist.h\n"); + exit(1); /* whoops! something went wrong (mem alloc?) */ + } + + char *port = "/dev/pts/3"; + strcpy(rig->state.rigport.pathname, port); + + printf("%20s:", caps->model_name); + fflush(stdout); + struct timeval start,end; + gettimeofday(&start,NULL); + rig_open(rig); + gettimeofday(&end,NULL); + double dstart = start.tv_sec + start.tv_usec/1e6; + double dend = end.tv_sec + end.tv_usec/(double)1e6; + printf(" %.1f\n", dend - dstart); + + rig_close(rig); /* close port */ + rig_cleanup(rig); /* if you care about memory */ + return 1; +} + +int main(int argc, char *argv[]) +{ + RIG rig; + printf("testing rig timeouts when rig powered off\n"); + + /* Turn off backend debugging output */ + rig_set_debug_level(RIG_DEBUG_NONE); + rig_load_all_backends(); + rig_list_foreach(callback, &rig); + return 0; +} ----------------------------------------------------------------------- Summary of changes: tests/testrigopen.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 tests/testrigopen.c hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-01-20 17:15:35
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via a4d9dac5cef15a7e4941472e142c2bd15b622f81 (commit) from 05728f74ebbc1488a030dddeab9a49a36543b109 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a4d9dac5cef15a7e4941472e142c2bd15b622f81 Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Jan 20 11:15:12 2021 -0600 Add testritgcaps to make clean diff --git a/tests/Makefile.am b/tests/Makefile.am index c6a9aa0b..aaaca511 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -126,4 +126,4 @@ FORCE: dist-hook: test ./ -ef $(srcdir)/ || test ! -f hamlibdatetime.h || cp -f hamlibdatetime.h $(srcdir)/ -CLEANFILES = testrig.sh testfreq.sh testbcd.sh testloc.sh +CLEANFILES = testrig.sh testfreq.sh testbcd.sh testloc.sh testrigcaps.sh ----------------------------------------------------------------------- Summary of changes: tests/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-01-20 16:47:16
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 05728f74ebbc1488a030dddeab9a49a36543b109 (commit) via e32e47a858541bb7ac7d9eea66b3d178fc36e1e6 (commit) via 0ad3c94e9bd9f7734809c2821e468201eda765fe (commit) via 81cc189f5794d9d9bf4138a137e3c82741c3f72f (commit) from 14251b237dde212c7e9bb2addd24b9e3672c4c47 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 05728f74ebbc1488a030dddeab9a49a36543b109 Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Jan 20 10:46:07 2021 -0600 Fix testrigcaps.c diff --git a/tests/testrigcaps.c b/tests/testrigcaps.c new file mode 100644 index 00000000..4a223461 --- /dev/null +++ b/tests/testrigcaps.c @@ -0,0 +1,37 @@ +#include <stdio.h> +#include <hamlib/rig.h> + +int main() +{ + printf("Check rig_caps offsets\n"); + printf("If changed can affect shared library API\n"); + RIG *rig; + int retcode = 0; + rig_set_debug_level(RIG_DEBUG_NONE); + rig = rig_init(1); + void *p1 = &rig->state.rigport; + void *p2 = &rig->state.vfo_list; + unsigned long offset = p2 - p1; + printf("offset vfo_list=%ld\n", offset); + int expected = 13280; + if (offset != expected) + { + printf("offset of vfo_list has changed!!!\n"); + printf("was %d, now %lu\n", expected, offset ); + retcode = 1; + } + + p2 = &rig->state.power_max; + offset = p2 - p1; + printf("offset power_max=%ld\n", offset); + + expected = 13696; + if (offset != expected) + { + printf("offset of power_max has changed!!!\n"); + printf("was %d, now %lu\n", expected, offset ); + retcode = 1; + } + + return retcode; +} commit e32e47a858541bb7ac7d9eea66b3d178fc36e1e6 Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Jan 20 10:44:37 2021 -0600 Add testrigcaps to catch potential shared library problems Add testrigopen to test time it takes to timeout when rig is powered off diff --git a/tests/Makefile.am b/tests/Makefile.am index 7b63aef5..c6a9aa0b 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -10,7 +10,7 @@ DISTCLEANFILES = rigctl.log rigctl.sum testbcd.log testbcd.sum hamlibdatetime.h bin_PROGRAMS = rigctl rigctld rigmem rigsmtr rigswr rotctl rotctld rigctlcom ampctl ampctld -check_PROGRAMS = dumpmem testrig testtrn testbcd testfreq listrigs testloc rig_bench cachetest cachetest2 +check_PROGRAMS = dumpmem testrig testrigopen testrigcaps testtrn testbcd testfreq listrigs testloc rig_bench cachetest cachetest2 RIGCOMMONSRC = rigctl_parse.c rigctl_parse.h dumpcaps.c sprintflst.c sprintflst.h uthash.h hamlibdatetime.h ROTCOMMONSRC = rotctl_parse.c rotctl_parse.h dumpcaps_rot.c sprintflst.c sprintflst.h uthash.h hamlibdatetime.h @@ -77,7 +77,7 @@ EXTRA_DIST = rigmatrix_head.html rig_split_lst.awk testctld.pl testrotctld.pl \ hamlibdatetime.h.in # Support 'make check' target for simple tests -check_SCRIPTS = testrig.sh testfreq.sh testbcd.sh testloc.sh +check_SCRIPTS = testrig.sh testfreq.sh testbcd.sh testloc.sh testrigcaps.sh TESTS = $(check_SCRIPTS) @@ -98,6 +98,10 @@ testloc.sh: echo './testloc EM79UT96LW 5' > testloc.sh chmod +x ./testloc.sh +testrigcaps.sh: + echo './testrigcaps' > testrigcaps.sh + chmod +x ./testrigcaps.sh + # If we have a .git directory then we will generate the hamlibdate.h # file and replace it if it is different. Fall back to a copy of a # generic hamlibdatetime.h.in in the source tree. Build looks in build commit 0ad3c94e9bd9f7734809c2821e468201eda765fe Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Jan 20 07:51:01 2021 -0600 Fix ft1000mp.c retry since retries are done in read_block now diff --git a/rigs/yaesu/ft1000mp.c b/rigs/yaesu/ft1000mp.c index 2b41b2ca..c887ec00 100644 --- a/rigs/yaesu/ft1000mp.c +++ b/rigs/yaesu/ft1000mp.c @@ -222,7 +222,7 @@ const struct rig_caps ft1000mp_caps = RIG_MODEL(RIG_MODEL_FT1000MP), .model_name = "FT-1000MP", .mfg_name = "Yaesu", - .version = "20200731.0", + .version = "20210120.0", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -356,7 +356,7 @@ const struct rig_caps ft1000mpmkv_caps = RIG_MODEL(RIG_MODEL_FT1000MPMKV), .model_name = "MARK-V FT-1000MP", .mfg_name = "Yaesu", - .version = "20200731.0", + .version = "20210120.0", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -490,7 +490,7 @@ const struct rig_caps ft1000mpmkvfld_caps = RIG_MODEL(RIG_MODEL_FT1000MPMKVFLD), .model_name = "MARK-V Field FT-1000MP", .mfg_name = "Yaesu", - .version = "20200731.0", + .version = "20210120.0", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -1528,7 +1528,9 @@ static int ft1000mp_get_update_data(RIG *rig, unsigned char ci, p = (struct ft1000mp_priv_data *)rig->state.priv; rig_s = &rig->state; - do + // timeout retries are done in read_block now + // based on rig backed retry value +// do { /* send UPDATE command to fetch data*/ ft1000mp_send_priv_cmd(rig, ci); @@ -1538,9 +1540,10 @@ static int ft1000mp_get_update_data(RIG *rig, unsigned char ci, if (n == -RIG_ETIMEOUT) { rig_debug(RIG_DEBUG_TRACE, "%s: Timeout retry count = %d\n", __func__, retry); + //rig_debug(RIG_DEBUG_TRACE, "%s: Timeout\n", __func__, retry); } } - while (retry-- && n == -RIG_ETIMEOUT); +// while (retry-- && n == -RIG_ETIMEOUT); return n; commit 81cc189f5794d9d9bf4138a137e3c82741c3f72f Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Jan 20 07:20:46 2021 -0600 Update trxmanager model name diff --git a/rigs/dummy/trxmanager.c b/rigs/dummy/trxmanager.c index 51fa9d0e..a5cbf2f4 100644 --- a/rigs/dummy/trxmanager.c +++ b/rigs/dummy/trxmanager.c @@ -117,7 +117,7 @@ struct trxmanager_priv_data struct rig_caps trxmanager_caps = { RIG_MODEL(RIG_MODEL_TRXMANAGER_RIG), - .model_name = "5.7.630+", + .model_name = "TRXManager 5.7.630+", .mfg_name = "TRXManager", .version = BACKEND_VER ".0", .copyright = "LGPL", ----------------------------------------------------------------------- Summary of changes: rigs/dummy/trxmanager.c | 2 +- rigs/yaesu/ft1000mp.c | 13 ++++++++----- tests/Makefile.am | 8 ++++++-- tests/testrigcaps.c | 37 +++++++++++++++++++++++++++++++++++++ 4 files changed, 52 insertions(+), 8 deletions(-) create mode 100644 tests/testrigcaps.c hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-01-20 13:16:24
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 14251b237dde212c7e9bb2addd24b9e3672c4c47 (commit) from 3cd921c2d379faaa88eff1fef2d1de8bc7920273 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 14251b237dde212c7e9bb2addd24b9e3672c4c47 Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Jan 20 07:15:53 2021 -0600 Fix ft1000d.c retry diff --git a/rigs/yaesu/ft1000d.c b/rigs/yaesu/ft1000d.c index f30e0356..b2a3bd3e 100644 --- a/rigs/yaesu/ft1000d.c +++ b/rigs/yaesu/ft1000d.c @@ -158,7 +158,7 @@ const struct rig_caps ft1000d_caps = RIG_MODEL(RIG_MODEL_FT1000D), .model_name = "FT-1000D", .mfg_name = "Yaesu", - .version = "20201009.0", + .version = "20210120.0", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -3274,7 +3274,7 @@ int ft1000d_get_update_data(RIG *rig, unsigned char ci, unsigned short ch) n = read_block(&rig_s->rigport, p, rl); } - while (n < 0 && retry >= 0); + while (n < 0 && retry-- >= 0); if (n < 0) { ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/ft1000d.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-01-19 23:27:34
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 3cd921c2d379faaa88eff1fef2d1de8bc7920273 (commit) from 1e96b1f4d76afdef3f25928dbecf756d1663670c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 3cd921c2d379faaa88eff1fef2d1de8bc7920273 Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Jan 19 17:23:01 2021 -0600 Make the Yaesu BS command assume it worked as can't repeat it diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 02f06907..1ab55c88 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -9657,6 +9657,10 @@ int newcat_set_cmd_validate(RIG *rig) if (bytes > 0) { + // for the BS command we can only run it once + // so we'll assume it worked + // maybe Yaeus will make this command more intelligent + if (strstr(priv->cmd_str,"BS")) return RIG_OK; // if the first two chars match we are validated if (strncmp(priv->cmd_str, "VS", 2) == 0 && strncmp(priv->cmd_str, priv->ret_data, 2) == 0) { RETURNFUNC(RIG_OK); } ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/newcat.c | 4 ++++ 1 file changed, 4 insertions(+) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-01-19 18:12:52
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 1e96b1f4d76afdef3f25928dbecf756d1663670c (commit) from 0fe9b866d26189ab9071dc605de0ad60f2425a0d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 1e96b1f4d76afdef3f25928dbecf756d1663670c Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Jan 19 12:12:24 2021 -0600 Remove get_freq -- seems to be causing a problem with FLRig diff --git a/src/rig.c b/src/rig.c index 5b920e8f..228e4957 100644 --- a/src/rig.c +++ b/src/rig.c @@ -991,10 +991,10 @@ int HAMLIB_API rig_open(RIG *rig) } #endif - // read frequence to update internal status - freq_t freq; - if (caps->get_freq) rig_get_freq(rig, RIG_VFO_A, &freq); - if (caps->get_freq) rig_get_freq(rig, RIG_VFO_B, &freq); + // read frequency to update internal status +// freq_t freq; +// if (caps->get_freq) rig_get_freq(rig, RIG_VFO_A, &freq); +// if (caps->get_freq) rig_get_freq(rig, RIG_VFO_B, &freq); RETURNFUNC(RIG_OK); } ----------------------------------------------------------------------- Summary of changes: src/rig.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-01-19 17:19:13
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 0fe9b866d26189ab9071dc605de0ad60f2425a0d (commit) from 3d2ab7f379b5be2071d784bb5ef0b4311f41806c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 0fe9b866d26189ab9071dc605de0ad60f2425a0d Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Jan 19 11:18:38 2021 -0600 Update rigctl.1 man page for W command format diff --git a/doc/man1/rigctl.1 b/doc/man1/rigctl.1 index e695ce3f..fedc9fcd 100644 --- a/doc/man1/rigctl.1 +++ b/doc/man1/rigctl.1 @@ -1109,8 +1109,8 @@ option above, will terminate each command string sent to the radio. This character should not be a part of the input string. . .TP -.BR W ", " send_cmd_rx " \(aq" \fICmd\fP \(aq -Send a raw command string to the radio and expect a number of bytes returned. +.BR W ", " send_cmd_rx " \(aq" \fICmd\fP\(aq " " \fInbytes\FP +Send a raw command string to the radio and expect nbytes returned. .IP This is useful for testing and troubleshooting radio commands and responses when developing a backend. If the # of bytes requested is <= the number actually returned no timeout will occur. ----------------------------------------------------------------------- Summary of changes: doc/man1/rigctl.1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-01-19 17:12:20
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 3d2ab7f379b5be2071d784bb5ef0b4311f41806c (commit) from e622186bc3016e71369238f1030df0ae44f0ddf7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 3d2ab7f379b5be2071d784bb5ef0b4311f41806c Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Jan 19 11:11:19 2021 -0600 Yaesu newcat.c do no not try to set VFO when transmitting. diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 0d2abb5a..02f06907 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -1277,6 +1277,9 @@ int newcat_set_vfo(RIG *rig, vfo_t vfo) rig_debug(RIG_DEBUG_TRACE, "%s: passed vfo = %s\n", __func__, rig_strvfo(vfo)); + // we can't change VFO while transmitting + if (rig->state.cache.ptt == RIG_PTT_ON) return RIG_OK; + if (!newcat_valid_command(rig, command)) { RETURNFUNC(-RIG_ENAVAIL); ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/newcat.c | 3 +++ 1 file changed, 3 insertions(+) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-01-19 15:41:19
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via e622186bc3016e71369238f1030df0ae44f0ddf7 (commit) from fe53dce518aebcb55e89570a03ecfc0f962d919b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit e622186bc3016e71369238f1030df0ae44f0ddf7 Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Jan 19 09:39:39 2021 -0600 In newcat_set_cmd_validate helps if we get VFO_B when we want VFO_B diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 49baa847..0d2abb5a 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -836,7 +836,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) else { freq_t freqB; - rig_get_freq(rig, RIG_VFO_A, &freqB); + rig_get_freq(rig, RIG_VFO_B, &freqB); rig_debug(RIG_DEBUG_TRACE, "%s(%d)%s: checking VFOB for band change \n", __FILE__, __LINE__, __func__); ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/newcat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-01-19 13:18:37
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via fe53dce518aebcb55e89570a03ecfc0f962d919b (commit) via dd0765309e0c757db53bf69f004685a9d2b65b67 (commit) from bc607bfc1dc7586db23cea469dabb5705383c8a3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit fe53dce518aebcb55e89570a03ecfc0f962d919b Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Jan 19 07:18:05 2021 -0600 astyle newcat.c diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index a831991d..49baa847 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -822,6 +822,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) __LINE__, __func__, rig_strvfo(rig->state.current_vfo)); CACHE_RESET; + if (vfo == RIG_VFO_A || vfo == RIG_VFO_MAIN) { freq_t freqA; @@ -963,6 +964,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) // we need to update some info that BS may have caused CACHE_RESET; + if (vfo == RIG_VFO_A || vfo == RIG_VFO_MAIN) { rig_get_freq(rig, RIG_VFO_SUB, &tmp_freqA); commit dd0765309e0c757db53bf69f004685a9d2b65b67 Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Jan 19 07:17:07 2021 -0600 Added CACHE_RESET macro newcat_set_cmd_validate now queries VFO freq instead of using cache diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 2fb2bdb3..a831991d 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -821,38 +821,25 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) rig_debug(RIG_DEBUG_TRACE, "%s(%d)%s: rig->state.current_vfo=%s\n", __FILE__, __LINE__, __func__, rig_strvfo(rig->state.current_vfo)); + CACHE_RESET; if (vfo == RIG_VFO_A || vfo == RIG_VFO_MAIN) { + freq_t freqA; + rig_get_freq(rig, RIG_VFO_A, &freqA); rig_debug(RIG_DEBUG_TRACE, "%s(%d)%s: checking VFOA for band change \n", __FILE__, __LINE__, __func__); - if (rig->state.cache.freqMainA == 0) - { - freq_t freqtmp; - err = rig_get_freq(rig, RIG_VFO_CURR, &freqtmp); - - if (err != RIG_OK) { RETURNFUNC(err); } - } - - changing = newcat_band_index(freq) != newcat_band_index( - rig->state.cache.freqMainA); + changing = newcat_band_index(freq) != newcat_band_index(freqA); rig_debug(RIG_DEBUG_TRACE, "%s: VFO_A band changing=%d\n", __func__, changing); } else { + freq_t freqB; + rig_get_freq(rig, RIG_VFO_A, &freqB); rig_debug(RIG_DEBUG_TRACE, "%s(%d)%s: checking VFOB for band change \n", __FILE__, __LINE__, __func__); - if (rig->state.cache.freqMainB == 0) - { - freq_t freqtmp; - err = rig_get_freq(rig, RIG_VFO_CURR, &freqtmp); - - if (err != RIG_OK) { RETURNFUNC(err); } - } - - changing = newcat_band_index(freq) != newcat_band_index( - rig->state.cache.freqMainB); + changing = newcat_band_index(freq) != newcat_band_index(freqB); rig_debug(RIG_DEBUG_TRACE, "%s: VFO_B band changing=%d\n", __func__, changing); } @@ -975,6 +962,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) pbwidth_t tmp_width; // we need to update some info that BS may have caused + CACHE_RESET; if (vfo == RIG_VFO_A || vfo == RIG_VFO_MAIN) { rig_get_freq(rig, RIG_VFO_SUB, &tmp_freqA); diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h index 722c43d2..7ee0befd 100644 --- a/rigs/yaesu/newcat.h +++ b/rigs/yaesu/newcat.h @@ -50,7 +50,7 @@ typedef char ncboolean; /* shared function version */ -#define NEWCAT_VER "20210118" +#define NEWCAT_VER "20210119" /* Hopefully large enough for future use, 128 chars plus '\0' */ #define NEWCAT_DATA_LEN 129 diff --git a/src/misc.h b/src/misc.h index e86a6ccd..d4ff18e2 100644 --- a/src/misc.h +++ b/src/misc.h @@ -143,6 +143,20 @@ void errmsg(int err, char *s, const char *func, const char *file, int line); #define ENTERFUNC rig_debug(RIG_DEBUG_VERBOSE, "%s(%d):%s entered\n", __FILE__, __LINE__, __func__) #define RETURNFUNC(rc) {rig_debug(RIG_DEBUG_VERBOSE, "%s(%d):%s return\n", __FILE__, __LINE__, __func__);return rc;} +#define CACHE_RESET {\ + elapsed_ms(&rig->state.cache.time_freq, HAMLIB_ELAPSED_INVALIDATE);\ + elapsed_ms(&rig->state.cache.time_freqCurr, HAMLIB_ELAPSED_INVALIDATE);\ + elapsed_ms(&rig->state.cache.time_freqMainA, HAMLIB_ELAPSED_INVALIDATE);\ + elapsed_ms(&rig->state.cache.time_freqMainB, HAMLIB_ELAPSED_INVALIDATE);\ + elapsed_ms(&rig->state.cache.time_freqMainC, HAMLIB_ELAPSED_INVALIDATE);\ + elapsed_ms(&rig->state.cache.time_freqSubA, HAMLIB_ELAPSED_INVALIDATE);\ + elapsed_ms(&rig->state.cache.time_freqSubB, HAMLIB_ELAPSED_INVALIDATE);\ + elapsed_ms(&rig->state.cache.time_vfo, HAMLIB_ELAPSED_INVALIDATE);\ + elapsed_ms(&rig->state.cache.time_mode, HAMLIB_ELAPSED_INVALIDATE);\ + elapsed_ms(&rig->state.cache.time_ptt, HAMLIB_ELAPSED_INVALIDATE);\ + elapsed_ms(&rig->state.cache.time_split, HAMLIB_ELAPSED_INVALIDATE);\ + } + __END_DECLS #endif /* _MISC_H */ ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/newcat.c | 30 ++++++++++-------------------- rigs/yaesu/newcat.h | 2 +- src/misc.h | 14 ++++++++++++++ 3 files changed, 25 insertions(+), 21 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-01-19 12:35:16
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via bc607bfc1dc7586db23cea469dabb5705383c8a3 (commit) from bcc80fef79ef77b4242441e71ba09d6cd70650c0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit bc607bfc1dc7586db23cea469dabb5705383c8a3 Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Jan 19 06:30:00 2021 -0600 Add rig_get_freq to rig_open to set up internal status correctly diff --git a/src/rig.c b/src/rig.c index e27db2b5..5b920e8f 100644 --- a/src/rig.c +++ b/src/rig.c @@ -991,6 +991,10 @@ int HAMLIB_API rig_open(RIG *rig) } #endif + // read frequence to update internal status + freq_t freq; + if (caps->get_freq) rig_get_freq(rig, RIG_VFO_A, &freq); + if (caps->get_freq) rig_get_freq(rig, RIG_VFO_B, &freq); RETURNFUNC(RIG_OK); } ----------------------------------------------------------------------- Summary of changes: src/rig.c | 4 ++++ 1 file changed, 4 insertions(+) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-01-19 04:37:20
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via bcc80fef79ef77b4242441e71ba09d6cd70650c0 (commit) via 00cc6e848f9d26cc6a97f7b101c0ef88c57fe73d (commit) from 2eda4bf1a72116f07e8aab4032264d7dd755cdbf (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit bcc80fef79ef77b4242441e71ba09d6cd70650c0 Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Jan 18 22:35:59 2021 -0600 In newcat_set_cmd_validate make exception processing for VS command Return other cmds to full string comparison to validate data sent == data recvd diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 459a0912..2fb2bdb3 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -9665,7 +9665,9 @@ int newcat_set_cmd_validate(RIG *rig) if (bytes > 0) { // if the first two chars match we are validated - if (strncmp(priv->cmd_str, priv->ret_data, 2) == 0) { RETURNFUNC(RIG_OK); } + if (strncmp(priv->cmd_str, "VS", 2) == 0 + && strncmp(priv->cmd_str, priv->ret_data, 2) == 0) { RETURNFUNC(RIG_OK); } + else if (strcmp(priv->cmd_str, priv->ret_data) == 0) { RETURNFUNC(RIG_OK); } else { rc = -RIG_EPROTO; } } commit 00cc6e848f9d26cc6a97f7b101c0ef88c57fe73d Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Jan 18 22:30:49 2021 -0600 Fix double ;; in newcat_set_cmd_validate Only ask for freq from other vfo that may have been changed by band select diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index b4e6e9c4..459a0912 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -866,12 +866,12 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) if (rig->state.current_vfo != vfo) { // then we need to change vfos, BS, and change back - snprintf(priv->cmd_str, sizeof(priv->cmd_str), "VS1;BS%02d%c;VS0;", - newcat_band_index(freq), cat_term); + snprintf(priv->cmd_str, sizeof(priv->cmd_str), "VS1;BS%02d;VS0;", + newcat_band_index(freq)); if (vfo == RIG_VFO_A || vfo == RIG_VFO_MAIN) - snprintf(priv->cmd_str, sizeof(priv->cmd_str), "VS0;BS%02d%c;VS1;", - newcat_band_index(freq), cat_term); + snprintf(priv->cmd_str, sizeof(priv->cmd_str), "VS0;BS%02d;VS1;", + newcat_band_index(freq)); } else { @@ -951,6 +951,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) freq_t tmp_freqA, tmp_freqB; rmode_t tmp_mode; pbwidth_t tmp_width; + rig_get_freq(rig, RIG_VFO_MAIN, &tmp_freqA); rig_get_freq(rig, RIG_VFO_SUB, &tmp_freqB); rig_get_mode(rig, RIG_VFO_MAIN, &tmp_mode, &tmp_width); @@ -972,8 +973,17 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) freq_t tmp_freqA, tmp_freqB; rmode_t tmp_mode; pbwidth_t tmp_width; - rig_get_freq(rig, RIG_VFO_MAIN, &tmp_freqA); - rig_get_freq(rig, RIG_VFO_SUB, &tmp_freqB); + + // we need to update some info that BS may have caused + if (vfo == RIG_VFO_A || vfo == RIG_VFO_MAIN) + { + rig_get_freq(rig, RIG_VFO_SUB, &tmp_freqA); + } + else + { + rig_get_freq(rig, RIG_VFO_MAIN, &tmp_freqB); + } + rig_get_mode(rig, RIG_VFO_MAIN, &tmp_mode, &tmp_width); rig_get_mode(rig, RIG_VFO_SUB, &tmp_mode, &tmp_width); ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/newcat.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-01-18 23:51:17
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 2eda4bf1a72116f07e8aab4032264d7dd755cdbf (commit) from cf21f7d65c87e512f6179c24607c6ec06447856c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 2eda4bf1a72116f07e8aab4032264d7dd755cdbf Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Jan 18 17:49:05 2021 -0600 Use only 1st 2 chars for newcat_set_command_validate check diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 2e176d36..b4e6e9c4 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -9654,8 +9654,8 @@ int newcat_set_cmd_validate(RIG *rig) if (bytes > 0) { - // if they match we are validated - if (strcmp(priv->cmd_str, priv->ret_data) == 0) { RETURNFUNC(RIG_OK); } + // if the first two chars match we are validated + if (strncmp(priv->cmd_str, priv->ret_data, 2) == 0) { RETURNFUNC(RIG_OK); } else { rc = -RIG_EPROTO; } } ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/newcat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-01-18 23:15:35
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via cf21f7d65c87e512f6179c24607c6ec06447856c (commit) from 2365297cacd077e5ae2943d054d49c43103d9480 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit cf21f7d65c87e512f6179c24607c6ec06447856c Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Jan 18 17:15:10 2021 -0600 Fix vfo check for band change diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index ab2c5d88..2e176d36 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -821,8 +821,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) rig_debug(RIG_DEBUG_TRACE, "%s(%d)%s: rig->state.current_vfo=%s\n", __FILE__, __LINE__, __func__, rig_strvfo(rig->state.current_vfo)); - if (rig->state.current_vfo == RIG_VFO_A - || rig->state.current_vfo == RIG_VFO_MAIN) + if (vfo == RIG_VFO_A || vfo == RIG_VFO_MAIN) { rig_debug(RIG_DEBUG_TRACE, "%s(%d)%s: checking VFOA for band change \n", __FILE__, __LINE__, __func__); ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/newcat.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-01-18 22:41:09
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 2365297cacd077e5ae2943d054d49c43103d9480 (commit) via c43211e3a5b03ffecf26f677122210afa257d37a (commit) from 2654503779c286da567ab64e95f551f163120b79 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 2365297cacd077e5ae2943d054d49c43103d9480 Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Jan 18 16:39:57 2021 -0600 In yaesu band select disable setting other VFO. Hopefully this works OK diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 5efb972e..ab2c5d88 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -886,6 +886,8 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) __func__, rigerror(err)); } + +#if 0 // disable for testing else { // Also need to do this for the other VFO on some Yaesu rigs @@ -964,6 +966,26 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) } } +#endif + // after band select re-read things -- may not have to change anything + // reading both VFOs is really only needed for rigs with just one VFO stack + // but we read them all to ensure we cover both types + freq_t tmp_freqA, tmp_freqB; + rmode_t tmp_mode; + pbwidth_t tmp_width; + rig_get_freq(rig, RIG_VFO_MAIN, &tmp_freqA); + rig_get_freq(rig, RIG_VFO_SUB, &tmp_freqB); + rig_get_mode(rig, RIG_VFO_MAIN, &tmp_mode, &tmp_width); + rig_get_mode(rig, RIG_VFO_SUB, &tmp_mode, &tmp_width); + + if ((target_vfo == 0 && tmp_freqA == freq) + || (target_vfo == 1 && tmp_freqB == freq)) + { + rig_debug(RIG_DEBUG_VERBOSE, + "%s: freq after band select already set to %"PRIfreq"\n", __func__, freq); + RETURNFUNC(RIG_OK); // we're done then!! + } + // just drop through } commit c43211e3a5b03ffecf26f677122210afa257d37a Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Jan 18 10:05:37 2021 -0600 Reduce timeout for newcat_rig_open to allow powered off rig to be detected faster Now takes a bit over 1 second instead of over 10 seconds Powered on rigs should still work the same diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 74c4d121..5efb972e 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -526,6 +526,9 @@ int newcat_open(RIG *rig) /* get current AI state so it can be restored */ priv->trn_state = -1; + // for this sequence we will shorten the timeout so we can detect rig is powered off faster + int timeout = rig->state.rigport.timeout; + rig->state.rigport.timeout = 100; newcat_get_trn(rig, &priv->trn_state); /* ignore errors */ /* Currently we cannot cope with AI mode so turn it off in case @@ -538,6 +541,7 @@ int newcat_open(RIG *rig) /* Initialize rig_id in case any subsequent commands need it */ (void)newcat_get_rigid(rig); rig_debug(RIG_DEBUG_VERBOSE, "%s: rig_id=%d\n", __func__, priv->rig_id); + rig->state.rigport.timeout = timeout; #if 0 // possible future enhancement? @@ -814,29 +818,40 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) // And only when not in split mode (note this check has been removed for testing) int changing; - rig_debug(RIG_DEBUG_TRACE, "%s(%d)%s: rig->state.current_vfo=%s\n", __FILE__, __LINE__, __func__, rig_strvfo(rig->state.current_vfo)); - if (rig->state.current_vfo == RIG_VFO_A || rig->state.current_vfo == RIG_VFO_MAIN) + rig_debug(RIG_DEBUG_TRACE, "%s(%d)%s: rig->state.current_vfo=%s\n", __FILE__, + __LINE__, __func__, rig_strvfo(rig->state.current_vfo)); + + if (rig->state.current_vfo == RIG_VFO_A + || rig->state.current_vfo == RIG_VFO_MAIN) { - rig_debug(RIG_DEBUG_TRACE, "%s(%d)%s: checking VFOA for band change \n", __FILE__, __LINE__, __func__); + rig_debug(RIG_DEBUG_TRACE, "%s(%d)%s: checking VFOA for band change \n", + __FILE__, __LINE__, __func__); + if (rig->state.cache.freqMainA == 0) { freq_t freqtmp; - err = rig_get_freq(rig,RIG_VFO_CURR,&freqtmp); - if (err != RIG_OK) RETURNFUNC(err); + err = rig_get_freq(rig, RIG_VFO_CURR, &freqtmp); + + if (err != RIG_OK) { RETURNFUNC(err); } } + changing = newcat_band_index(freq) != newcat_band_index( rig->state.cache.freqMainA); rig_debug(RIG_DEBUG_TRACE, "%s: VFO_A band changing=%d\n", __func__, changing); } else { - rig_debug(RIG_DEBUG_TRACE, "%s(%d)%s: checking VFOB for band change \n", __FILE__, __LINE__, __func__); + rig_debug(RIG_DEBUG_TRACE, "%s(%d)%s: checking VFOB for band change \n", + __FILE__, __LINE__, __func__); + if (rig->state.cache.freqMainB == 0) { freq_t freqtmp; - err = rig_get_freq(rig,RIG_VFO_CURR,&freqtmp); - if (err != RIG_OK) RETURNFUNC(err); + err = rig_get_freq(rig, RIG_VFO_CURR, &freqtmp); + + if (err != RIG_OK) { RETURNFUNC(err); } } + changing = newcat_band_index(freq) != newcat_band_index( rig->state.cache.freqMainB); rig_debug(RIG_DEBUG_TRACE, "%s: VFO_B band changing=%d\n", __func__, changing); @@ -6599,7 +6614,7 @@ ncboolean newcat_is_rig(RIG *rig, rig_model_t model) //rig_debug(RIG_DEBUG_TRACE, "%s(%d):%s called\n", __FILE__, __LINE__, __func__); is_rig = (model == rig->caps->rig_model) ? TRUE : FALSE; - return(is_rig); + return (is_rig); } diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h index ea6a6c22..722c43d2 100644 --- a/rigs/yaesu/newcat.h +++ b/rigs/yaesu/newcat.h @@ -50,7 +50,7 @@ typedef char ncboolean; /* shared function version */ -#define NEWCAT_VER "20210117" +#define NEWCAT_VER "20210118" /* Hopefully large enough for future use, 128 chars plus '\0' */ #define NEWCAT_DATA_LEN 129 ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/newcat.c | 55 ++++++++++++++++++++++++++++++++++++++++++++--------- rigs/yaesu/newcat.h | 2 +- 2 files changed, 47 insertions(+), 10 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-01-18 14:48:37
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 2654503779c286da567ab64e95f551f163120b79 (commit) from 60279707e2b5d494d9b431789f9b97ea9edc1717 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 2654503779c286da567ab64e95f551f163120b79 Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Jan 18 08:48:10 2021 -0600 small improvement on caching check logic diff --git a/src/rig.c b/src/rig.c index 1889add0..e27db2b5 100644 --- a/src/rig.c +++ b/src/rig.c @@ -1673,10 +1673,8 @@ int HAMLIB_API rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) //cache_ms = elapsed_ms(&rig->state.cache.time_freq, HAMLIB_ELAPSED_GET); //rig_debug(RIG_DEBUG_TRACE, "%s: cache check2 age=%dms\n", __func__, cache_ms); - if (freq != 0 && cache_ms < rig->state.cache.timeout_ms - && rig->state.cache.vfo_freq == vfo) + if (freq != 0 && cache_ms < rig->state.cache.timeout_ms) { - *freq = rig->state.cache.freq; rig_debug(RIG_DEBUG_TRACE, "%s: %s cache hit age=%dms, freq=%.0f\n", __func__, rig_strvfo(vfo), cache_ms, *freq); RETURNFUNC(RIG_OK); ----------------------------------------------------------------------- Summary of changes: src/rig.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-01-18 14:39:14
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 60279707e2b5d494d9b431789f9b97ea9edc1717 (commit) from 5cd82c40262f6ddccd47ff74c739d770646dc509 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 60279707e2b5d494d9b431789f9b97ea9edc1717 Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Jan 18 08:28:20 2021 -0600 Fix VFOB caching diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 5dfc56f8..c2149dcb 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -2074,9 +2074,12 @@ struct rig_cache { freq_t freqCurr; // VFO_CURR freq_t freqMainA; // VFO_A, VFO_MAIN, and VFO_MAINA freq_t freqMainB; // VFO_B, VFO_SUB, and VFO_MAINB - freq_t freqMainC; // VFO_C (future MainC?) + freq_t freqMainC; // VFO_C, VFO_MAINC freq_t freqSubA; // VFO_SUBA -- only for rigs with dual Sub VFOs freq_t freqSubB; // VFO_SUBB -- only for rigs with dual Sub VFOs +#if 0 // future + freq_t freqSubC; // VFO_SUBC -- only for rigs with 3 Sub VFOs +#endif rmode_t mode; pbwidth_t width; ptt_t ptt; diff --git a/src/rig.c b/src/rig.c old mode 100755 new mode 100644 index df405654..1889add0 --- a/src/rig.c +++ b/src/rig.c @@ -1322,6 +1322,11 @@ int twiddling(RIG *rig) /* caching prototype to be fully implemented in 4.1 */ static int set_cache_freq(RIG *rig, vfo_t vfo, freq_t freq) { + rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s, current_vfo=%s\n", __func__, + rig_strvfo(vfo), rig_strvfo(rig->state.current_vfo)); + + if (vfo == RIG_VFO_CURR) { vfo = rig->state.current_vfo; } + switch (vfo) { case RIG_VFO_CURR: @@ -1343,10 +1348,13 @@ static int set_cache_freq(RIG *rig, vfo_t vfo, freq_t freq) elapsed_ms(&rig->state.cache.time_freqMainB, HAMLIB_ELAPSED_SET); break; +#if 0 + case RIG_VFO_C: // is there a MainC/SubC we need to cover? rig->state.cache.freqMainC = freq; elapsed_ms(&rig->state.cache.time_freqMainC, HAMLIB_ELAPSED_SET); break; +#endif case RIG_VFO_SUB_A: rig->state.cache.freqSubA = freq; @@ -1370,32 +1378,56 @@ static int set_cache_freq(RIG *rig, vfo_t vfo, freq_t freq) /* caching prototype to be fully implemented in 4.1 */ static int get_cache_freq(RIG *rig, vfo_t vfo, freq_t *freq, int *cache_ms) { + rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s, current_vfo=%s\n", __func__, + rig_strvfo(vfo), rig_strvfo(rig->state.current_vfo)); + + if (vfo == RIG_VFO_CURR) { vfo = rig->state.current_vfo; } + // VFO_C to be implemented switch (vfo) { case RIG_VFO_CURR: *freq = rig->state.cache.freqCurr; + *cache_ms = elapsed_ms(&rig->state.cache.time_freqCurr, HAMLIB_ELAPSED_GET); break; case RIG_VFO_A: case RIG_VFO_MAIN: case RIG_VFO_MAIN_A: *freq = rig->state.cache.freqMainA; + *cache_ms = elapsed_ms(&rig->state.cache.time_freqMainA, HAMLIB_ELAPSED_GET); break; case RIG_VFO_B: case RIG_VFO_SUB: *freq = rig->state.cache.freqMainB; + *cache_ms = elapsed_ms(&rig->state.cache.time_freqMainB, HAMLIB_ELAPSED_GET); break; case RIG_VFO_SUB_A: *freq = rig->state.cache.freqSubA; + *cache_ms = elapsed_ms(&rig->state.cache.time_freqSubA, HAMLIB_ELAPSED_GET); break; case RIG_VFO_SUB_B: *freq = rig->state.cache.freqSubB; + *cache_ms = elapsed_ms(&rig->state.cache.time_freqSubB, HAMLIB_ELAPSED_GET); + break; + +#if 0 // future + + case RIG_VFO_C: + case RIG_VFO_MAINC: + *freq = rig->state.cache.freqMainC; + *cache_ms = rig->state.cache.time_freqMainC; break; + case RIG_VFO_SUBC: + *freq = rig->state.cache.freqSubC; + *cache_ms = rig->state.cache.time_freqSubC; + break; +#endif + default: rig_debug(RIG_DEBUG_ERR, "%s: unknown vfo?, vfo=%s\n", __func__, rig_strvfo(vfo)); @@ -1462,7 +1494,8 @@ int HAMLIB_API rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { rig_debug(RIG_DEBUG_TRACE, "%s: Ignoring set_freq due to VFO twiddling\n", __func__); - RETURNFUNC(RIG_OK); // would be better as error but other software won't handle errors + RETURNFUNC( + RIG_OK); // would be better as error but other software won't handle errors } rig_debug(RIG_DEBUG_TRACE, "%s: TARGETABLE_FREQ vfo=%s\n", __func__, @@ -1485,7 +1518,8 @@ int HAMLIB_API rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { rig_debug(RIG_DEBUG_TRACE, "%s: Ignoring set_freq due to VFO twiddling\n", __func__); - RETURNFUNC(RIG_OK); // would be better as error but other software won't handle errors + RETURNFUNC( + RIG_OK); // would be better as error but other software won't handle errors } curr_vfo = rig->state.current_vfo; @@ -1632,12 +1666,15 @@ int HAMLIB_API rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) //future 4.1 caching + cache_ms = 10000; get_cache_freq(rig, vfo, freq, &cache_ms); + rig_debug(RIG_DEBUG_TRACE, "%s: cache check1 age=%dms\n", __func__, cache_ms); //future 4.1 caching needs to check individual VFO timeouts - cache_ms = elapsed_ms(&rig->state.cache.time_freq, HAMLIB_ELAPSED_GET); - rig_debug(RIG_DEBUG_TRACE, "%s: cache check age=%dms\n", __func__, cache_ms); + //cache_ms = elapsed_ms(&rig->state.cache.time_freq, HAMLIB_ELAPSED_GET); + //rig_debug(RIG_DEBUG_TRACE, "%s: cache check2 age=%dms\n", __func__, cache_ms); - if (cache_ms < rig->state.cache.timeout_ms && rig->state.cache.vfo_freq == vfo) + if (freq != 0 && cache_ms < rig->state.cache.timeout_ms + && rig->state.cache.vfo_freq == vfo) { *freq = rig->state.cache.freq; rig_debug(RIG_DEBUG_TRACE, "%s: %s cache hit age=%dms, freq=%.0f\n", __func__, @@ -2160,7 +2197,8 @@ int HAMLIB_API rig_set_vfo(RIG *rig, vfo_t vfo) { rig_debug(RIG_DEBUG_TRACE, "%s: Ignoring set_vfo due to VFO twiddling\n", __func__); - RETURNFUNC(RIG_OK); // would be better as error but other software won't handle errors + RETURNFUNC( + RIG_OK); // would be better as error but other software won't handle errors } retcode = caps->set_vfo(rig, vfo); @@ -4550,7 +4588,7 @@ int HAMLIB_API rig_mW2power(RIG *rig, *power = 1.0; } - RETURNFUNC (mwpower > txrange->high_power ? RIG_OK : -RIG_ETRUNC); + RETURNFUNC(mwpower > txrange->high_power ? RIG_OK : -RIG_ETRUNC); } @@ -4782,7 +4820,7 @@ vfo_op_t HAMLIB_API rig_has_vfo_op(RIG *rig, vfo_op_t op) RETURNFUNC(0); } - RETURNFUNC (rig->caps->vfo_ops & op); + RETURNFUNC(rig->caps->vfo_ops & op); } @@ -4880,7 +4918,7 @@ scan_t HAMLIB_API rig_has_scan(RIG *rig, scan_t scan) RETURNFUNC(0); } - RETURNFUNC (rig->caps->scan_ops & scan); + RETURNFUNC(rig->caps->scan_ops & scan); } ----------------------------------------------------------------------- Summary of changes: include/hamlib/rig.h | 5 ++++- src/rig.c | 56 +++++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 51 insertions(+), 10 deletions(-) mode change 100755 => 100644 src/rig.c hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-01-18 04:25:48
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 5cd82c40262f6ddccd47ff74c739d770646dc509 (commit) from ce96f424835a5140c000639a17dec5bb45c4ee07 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 5cd82c40262f6ddccd47ff74c739d770646dc509 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jan 17 22:24:39 2021 -0600 Change print format on a few freq items diff --git a/src/rig.c b/src/rig.c index 908d4f4a..df405654 100755 --- a/src/rig.c +++ b/src/rig.c @@ -1402,7 +1402,7 @@ static int get_cache_freq(RIG *rig, vfo_t vfo, freq_t *freq, int *cache_ms) RETURNFUNC(-RIG_EINVAL); } - rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s, freq=%g\n", __func__, rig_strvfo(vfo), + rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s, freq=%.0f\n", __func__, rig_strvfo(vfo), (double)*freq); RETURNFUNC(RIG_OK); } @@ -1427,7 +1427,7 @@ int HAMLIB_API rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq) int retcode; freq_t freq_new = freq; - rig_debug(RIG_DEBUG_VERBOSE, "%s called vfo=%s, freq=%g\n", __func__, + rig_debug(RIG_DEBUG_VERBOSE, "%s called vfo=%s, freq=%.0f\n", __func__, rig_strvfo(vfo), freq); if (CHECK_RIG_ARG(rig)) @@ -1535,7 +1535,7 @@ int HAMLIB_API rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq) if (freq_new != freq) { - rig_debug(RIG_DEBUG_TRACE, "%s: Asked freq=%g, got freq=%g\n", __func__, + rig_debug(RIG_DEBUG_TRACE, "%s: Asked freq=%.0fg, got freq=%.0fg\n", __func__, freq, freq_new); } ----------------------------------------------------------------------- Summary of changes: src/rig.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-01-17 23:17:12
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via ce96f424835a5140c000639a17dec5bb45c4ee07 (commit) via 34d7eb6c33296172c77af67b000d9104dcac0d40 (commit) from 4d7c988bec70c17350189f83a0a8700d2de6e939 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit ce96f424835a5140c000639a17dec5bb45c4ee07 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jan 17 17:16:50 2021 -0600 Fix RETURNFUNC in misc.h diff --git a/src/misc.h b/src/misc.h index e3b803c3..e86a6ccd 100644 --- a/src/misc.h +++ b/src/misc.h @@ -141,7 +141,7 @@ extern HAMLIB_EXPORT(int) parse_hoststr(char *host, char hoststr[256], char port void errmsg(int err, char *s, const char *func, const char *file, int line); #define ERRMSG(err, s) errmsg(err, s, __func__, __FILE__, __LINE__) #define ENTERFUNC rig_debug(RIG_DEBUG_VERBOSE, "%s(%d):%s entered\n", __FILE__, __LINE__, __func__) -#define RETURNFUNC(rc) rig_debug(RIG_DEBUG_VERBOSE, "%s(%d):%s return\n", __FILE__, __LINE__, __func__);return rc +#define RETURNFUNC(rc) {rig_debug(RIG_DEBUG_VERBOSE, "%s(%d):%s return\n", __FILE__, __LINE__, __func__);return rc;} __END_DECLS commit 34d7eb6c33296172c77af67b000d9104dcac0d40 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jan 17 15:50:00 2021 -0600 prm80 add extra read_string for 2-line response to set_freq diff --git a/rigs/prm80/prm80.c b/rigs/prm80/prm80.c index 5c69a462..0a026921 100644 --- a/rigs/prm80/prm80.c +++ b/rigs/prm80/prm80.c @@ -248,14 +248,19 @@ int prm80_reset(RIG *rig, reset_t reset) int prm80_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { char freqbuf[BUFSZ]; + char data[BUFSZ]; int freq_len; + int rc; + struct rig_state *rs = &rig->state; /* wild guess */ freq_len = sprintf(freqbuf, "R%04X%04X", (unsigned)(freq / 12500.), (unsigned)(freq / 12500.)); - return prm80_transaction(rig, freqbuf, freq_len, NULL, NULL); + rc = prm80_transaction(rig, freqbuf, freq_len, NULL, NULL); + read_string(&rs->rigport, data, BUFSZ, LF, strlen(LF)); + return rc; } /* ----------------------------------------------------------------------- Summary of changes: rigs/prm80/prm80.c | 7 ++++++- src/misc.h | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-01-17 21:36:34
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 4d7c988bec70c17350189f83a0a8700d2de6e939 (commit) from b1b6a0a7711e48a1c3b2a3e7f85a3e029929d4bc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 4d7c988bec70c17350189f83a0a8700d2de6e939 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jan 17 15:35:40 2021 -0600 Add some debug and another attempt to fix rig_set_cmd_validate setting the frequency correctly diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index d8607a5b..74c4d121 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -814,9 +814,10 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) // And only when not in split mode (note this check has been removed for testing) int changing; - rig_debug(RIG_DEBUG_TRACE, "%s: rig->state.current_vfo=%s\n", __func__, rig_strvfo(rig->state.current_vfo)); - if (target_vfo == 0) + rig_debug(RIG_DEBUG_TRACE, "%s(%d)%s: rig->state.current_vfo=%s\n", __FILE__, __LINE__, __func__, rig_strvfo(rig->state.current_vfo)); + if (rig->state.current_vfo == RIG_VFO_A || rig->state.current_vfo == RIG_VFO_MAIN) { + rig_debug(RIG_DEBUG_TRACE, "%s(%d)%s: checking VFOA for band change \n", __FILE__, __LINE__, __func__); if (rig->state.cache.freqMainA == 0) { freq_t freqtmp; @@ -825,10 +826,11 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) } changing = newcat_band_index(freq) != newcat_band_index( rig->state.cache.freqMainA); - rig_debug(RIG_DEBUG_TRACE, "%s: VFO_A freq changing=%d\n", __func__, changing); + rig_debug(RIG_DEBUG_TRACE, "%s: VFO_A band changing=%d\n", __func__, changing); } else { + rig_debug(RIG_DEBUG_TRACE, "%s(%d)%s: checking VFOB for band change \n", __FILE__, __LINE__, __func__); if (rig->state.cache.freqMainB == 0) { freq_t freqtmp; @@ -837,7 +839,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) } changing = newcat_band_index(freq) != newcat_band_index( rig->state.cache.freqMainB); - rig_debug(RIG_DEBUG_TRACE, "%s: VFO_B freq changing=%d\n", __func__, changing); + rig_debug(RIG_DEBUG_TRACE, "%s: VFO_B band changing=%d\n", __func__, changing); } if (newcat_valid_command(rig, "BS") && changing @@ -6464,7 +6466,7 @@ ncboolean newcat_valid_command(RIG *rig, char const *const command) int search_high; int search_low; - ENTERFUNC; + //ENTERFUNC; rig_debug(RIG_DEBUG_TRACE, "%s %s\n", __func__, command); caps = rig->caps; ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/newcat.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-01-17 17:59:49
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via b1b6a0a7711e48a1c3b2a3e7f85a3e029929d4bc (commit) from 6e25cdd6b9b6e09b8649231757bc8ad129725192 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b1b6a0a7711e48a1c3b2a3e7f85a3e029929d4bc Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jan 17 11:59:26 2021 -0600 Fix range_list check in src.c diff --git a/src/rig.c b/src/rig.c index a9fbd91e..908d4f4a 100755 --- a/src/rig.c +++ b/src/rig.c @@ -426,7 +426,7 @@ RIG *HAMLIB_API rig_init(rig_model_t rig_model) sizeof(struct freq_range_list)*FRQRANGESIZ); // if we don't have list1 we'll try list2 - if (rs->rx_range_list == NULL) + if (rs->rx_range_list[0].startf == 0) { rig_debug(RIG_DEBUG_TRACE, "%s: rx_range_list1 is empty, using rx_range_list2\n", __func__); ----------------------------------------------------------------------- Summary of changes: src/rig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |