[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 8c11f888a38776877727c
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Michael B. <mdb...@us...> - 2021-03-20 21:59:23
|
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 8c11f888a38776877727c99e5ee388c3ee8005bc (commit) via ae3fef1e0cdd8234aaa3608f21ee2d02712abdb1 (commit) via 1fdbebd7b2d489f0b8aa660c40e6e1c1dbc75e7c (commit) via bb43078b25b17c9ec4c83da096882d5ea92fbfee (commit) from 80e199b302af7d5354438551a355e0fafee170bd (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 8c11f888a38776877727c99e5ee388c3ee8005bc Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Mar 20 16:58:38 2021 -0500 Fix rigctld return blank mode for rig_get_vfo_info diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index eb44fec8..4adc1b3b 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -2233,16 +2233,18 @@ declare_proto_rig(get_vfo_info) } rig_debug(RIG_DEBUG_ERR, "%s: vfo=%s, freq=%.0f, mode=%s, width=%d\n", __func__, rig_strvfo(vfo), freq, rig_strrmode(mode), (int)width); + const char * modestr = rig_strrmode(mode); + if (strlen(modestr) == 0) modestr = "None"; if ((interactive && prompt) || (interactive && !prompt && ext_resp)) { fprintf(fout, "%s: %.0f\n", cmd->arg1, freq); - fprintf(fout, "%s: %s\n", cmd->arg2, rig_strrmode(mode)); + fprintf(fout, "%s: %s\n", cmd->arg2, modestr); fprintf(fout, "%s: %d\n", cmd->arg3, (int)width); fprintf(fout, "%s: %d\n", cmd->arg4, (int)split); } else { - fprintf(fout, "%.0f\n%s\n%d\n", freq, rig_strrmode(mode), (int)width); + fprintf(fout, "%.0f\n%s\n%d\n", freq, modestr, (int)width); } RETURNFUNC(retval); commit ae3fef1e0cdd8234aaa3608f21ee2d02712abdb1 Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Mar 20 16:57:46 2021 -0500 Disable set_ptt confirmation logic. Seems many rigs can't deal with it. https://github.com/Hamlib/Hamlib/issues/623 diff --git a/src/rig.c b/src/rig.c index 163274af..c869dc1b 100644 --- a/src/rig.c +++ b/src/rig.c @@ -2641,6 +2641,7 @@ int HAMLIB_API rig_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) if (retcode != RIG_OK) { RETURNFUNC(retcode); } +#if 0 hl_usleep(50 * 1000); // give PTT a chance to do it's thing // don't use the cached value and check to see if it worked @@ -2656,8 +2657,10 @@ int HAMLIB_API rig_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) rigerror(retcode)); retcode = RIG_OK; // fake the retcode so we retry } - if (tptt != ptt) { rig_debug(RIG_DEBUG_WARN, "%s: failed, retry=%d\n", __func__, retry); } +#else + tptt = ptt; +#endif } while (tptt != ptt && retry-- > 0 && retcode == RIG_OK); } @@ -2685,9 +2688,13 @@ int HAMLIB_API rig_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) if (retcode != RIG_OK) { RETURNFUNC(retcode); } +#if 0 retcode = rig_get_ptt(rig, vfo, &tptt); if (tptt != ptt) { rig_debug(RIG_DEBUG_WARN, "%s: failed, retry=%d\n", __func__, retry); } +#else + tptt = ptt; +#endif } while (tptt != ptt && retry-- > 0 && retcode == RIG_OK); commit 1fdbebd7b2d489f0b8aa660c40e6e1c1dbc75e7c Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Mar 20 11:51:41 2021 -0500 Fix rigctlcom VFOB set_freq https://github.com/Hamlib/Hamlib/issues/620 diff --git a/tests/rigctlcom.c b/tests/rigctlcom.c index a9448959..bf4eba7c 100644 --- a/tests/rigctlcom.c +++ b/tests/rigctlcom.c @@ -1507,7 +1507,7 @@ static int handle_ts2000(void *arg) freq_t freq; sscanf((char *)arg + 2, "%"SCNfreq, &freq); - return rig_set_freq(my_rig, vfo_fixup(my_rig, RIG_VFO_A), freq); + return rig_set_freq(my_rig, vfo_fixup(my_rig, RIG_VFO_B), freq); } else if (strncmp(arg, "MD", 2) == 0) { commit bb43078b25b17c9ec4c83da096882d5ea92fbfee Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Mar 20 11:21:11 2021 -0500 More work on SATMODE for rigctlcom.c https://github.com/Hamlib/Hamlib/issues/620 diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index d136de7d..eb44fec8 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -2227,7 +2227,11 @@ declare_proto_rig(get_vfo_info) split_t split; retval = rig_get_vfo_info(rig, vfo, &freq, &mode, &width, &split); - rig_debug(RIG_DEBUG_ERR, "%s: vfo=%s\n", __func__, rig_strvfo(vfo)); + if (retval != RIG_OK) + { + rig_debug(RIG_DEBUG_ERR, "%s: vfo=%s\n", __func__, rig_strvfo(vfo)); + } + rig_debug(RIG_DEBUG_ERR, "%s: vfo=%s, freq=%.0f, mode=%s, width=%d\n", __func__, rig_strvfo(vfo), freq, rig_strrmode(mode), (int)width); if ((interactive && prompt) || (interactive && !prompt && ext_resp)) { diff --git a/tests/rigctlcom.c b/tests/rigctlcom.c index e78e2b4c..a9448959 100644 --- a/tests/rigctlcom.c +++ b/tests/rigctlcom.c @@ -878,9 +878,28 @@ static int handle_ts2000(void *arg) return write_block2((void *)__func__, &my_com, response, strlen(response)); } // Now some commands to set things - else if (strncmp(arg,"SA",2) == 0) + else if (strncmp(arg, "SA", 2) == 0) { - // todo -- make rigs changes based on TS-2000 bit flags + if (strcmp(arg, "SA;") == 0) + { + // should we silently fail with RIG_OK instead? TBD + RETURNFUNC(-RIG_ENIMPL); + } + + if (strlen(arg) > 3 && ((char *)arg)[2] == '1') + { + if (my_rig->caps->has_set_func) + { + int retval = rig_set_func(my_rig, RIG_VFO_CURR, RIG_FUNC_SATMODE, + ((char *)arg)[2] == '1' ? 1 : 0); + return retval; + } + else + { + RETURNFUNC(-RIG_ENAVAIL); + } + } + return RIG_OK; } else if (strcmp(arg, "TX;") == 0) ----------------------------------------------------------------------- Summary of changes: src/rig.c | 9 ++++++++- tests/rigctl_parse.c | 12 +++++++++--- tests/rigctlcom.c | 25 ++++++++++++++++++++++--- 3 files changed, 39 insertions(+), 7 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |