[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 306345442cc5a16ee04e3
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Michael B. <mdb...@us...> - 2021-02-08 23:02:40
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 306345442cc5a16ee04e3ac277ced75454892385 (commit) via 54aca796718be1c289c9ca1d6c04e6e4fc7a0c9f (commit) via 360704908b212718de23fd258e0fa0166dec59f5 (commit) from 31b28202ee13dd2a83d9ff2597cf814982afb2d8 (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 306345442cc5a16ee04e3ac277ced75454892385 Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Feb 8 16:59:07 2021 -0600 Fix 2nd argument parsing in rigctl_parse.c diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 9ccbd83e..aa31f355 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -948,7 +948,6 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc, if (interactive) { - int index = 1; arg1[0] = fgetc(fin); arg1[1] = 0; rig_debug(RIG_DEBUG_TRACE, "%s: debug4 arg1=%c\n", __func__, arg1[0]); @@ -956,10 +955,9 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc, if (prompt && arg1[0] == 0x0a) { fprintf_flush(fout, "%s: ", cmd_entry->arg1); - index = 0; } - if (scanfc(fin, "%s", &arg1[index]) < 1) + if (scanfc(fin, "%s", arg1) < 1) { rig_debug(RIG_DEBUG_WARN, "%s: nothing to scan#8?\n", __func__); return -1; commit 54aca796718be1c289c9ca1d6c04e6e4fc7a0c9f Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Feb 8 16:29:04 2021 -0600 Change ptt check in newcat.c set_freq to check ptt only for affected rigs https://github.com/Hamlib/Hamlib/issues/540 diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index b5c9174f..fd013bd4 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -787,20 +787,17 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) if (vfo != rig->state.tx_vfo) return -RIG_ENTARGET; } - ptt_t ptt; - if (RIG_OK != (err = newcat_get_ptt(rig, vfo, &ptt))) + if (is_ftdx3000 || is_ftdx5000) { - ERRMSG(err, "newcat_set_cmd failed"); - RETURNFUNC(err); - } - - if (ptt == RIG_PTT_ON) // we have a few rigs that can't set TX VFO while PTT_ON - { - // should be true whether we're on VFOA or VFOB but only restricting VFOB right now - // we return RIG_OK as we dont' want - if (is_ftdx3000) { return RIG_ENTARGET; } + // we have a few rigs that can't set freq while PTT_ON + ptt_t ptt; + if (RIG_OK != (err = newcat_get_ptt(rig, vfo, &ptt))) + { + ERRMSG(err, "newcat_set_cmd failed"); + RETURNFUNC(err); + } - if (is_ftdx5000) { return RIG_ENTARGET; } + if (ptt) { return RIG_ENTARGET; } } if (RIG_MODEL_FT450 == caps->rig_model) diff --git a/src/rig.c b/src/rig.c index 3fe55bc7..c69f0259 100644 --- a/src/rig.c +++ b/src/rig.c @@ -1839,6 +1839,30 @@ int HAMLIB_API rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) RETURNFUNC(retcode); } +/** + * \brief get the frequency of VFOA and VFOB + * \param rig The rig handle + * \param freqA The location where to store the VFOA/Main frequency + * \param freqB The location where to store the VFOB/Sub frequency + * + * Retrieves the frequency of VFOA/Main and VFOB/Sub + * The value stored at \a freq location equals RIG_FREQ_NONE when the current + * frequency of the VFO is not defined (e.g. blank memory). + * + * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * a negative value if an error occurred (in which case, cause is + * set appropriately). + * + * \sa rig_set_freq() + */ +int HAMLIB_API rig_get_freqs(RIG *rig, freq_t *freqA, freq_t freqB) +{ + // we will attempt to avoid vfo swapping in this routine + + return -RIG_ENIMPL; + +} + /** * \brief set the mode of the target VFO commit 360704908b212718de23fd258e0fa0166dec59f5 Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Feb 8 16:01:51 2021 -0600 Change newcat.c ptt check to get_ptt instead of cache Signalink was hanging on to PTT just a bit longer than the CAT ptt https://github.com/Hamlib/Hamlib/issues/540 diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 16e60894..b5c9174f 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -787,8 +787,14 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) if (vfo != rig->state.tx_vfo) return -RIG_ENTARGET; } - if (rig->state.cache.ptt == - RIG_PTT_ON) // we have a few rigs that can't set TX VFO while PTT_ON + ptt_t ptt; + if (RIG_OK != (err = newcat_get_ptt(rig, vfo, &ptt))) + { + ERRMSG(err, "newcat_set_cmd failed"); + RETURNFUNC(err); + } + + if (ptt == RIG_PTT_ON) // we have a few rigs that can't set TX VFO while PTT_ON { // should be true whether we're on VFOA or VFOB but only restricting VFOB right now // we return RIG_OK as we dont' want diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h index 1cef76dc..b74821ea 100644 --- a/rigs/yaesu/newcat.h +++ b/rigs/yaesu/newcat.h @@ -50,7 +50,7 @@ typedef char ncboolean; /* shared function version */ -#define NEWCAT_VER "20210130" +#define NEWCAT_VER "20210208" /* Hopefully large enough for future use, 128 chars plus '\0' */ #define NEWCAT_DATA_LEN 129 ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/newcat.c | 15 +++++++++------ rigs/yaesu/newcat.h | 2 +- src/rig.c | 24 ++++++++++++++++++++++++ tests/rigctl_parse.c | 4 +--- 4 files changed, 35 insertions(+), 10 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |