[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 1b89407a8d64a6895f935
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Michael B. <mdb...@us...> - 2021-01-24 23:20: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 1b89407a8d64a6895f935afc8dec8f032336be16 (commit) via b5c60e50fb83bd9aa80af7f7c7199e5920835dc2 (commit) via 018c053d7b60abb47ebe7efa48065a78f1d19147 (commit) via d75a23d15615a03cf95f11ee5216b893960dcf47 (commit) via 7e6adc6d2a69e6bb41809f59e9103c8cc156fae3 (commit) from f1fd159b9a964328b3811181ea9354773c253686 (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 1b89407a8d64a6895f935afc8dec8f032336be16 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jan 24 17:19:58 2021 -0600 Fix compilation of rigctld.c on mingw diff --git a/tests/rigctld.c b/tests/rigctld.c index 7e74f03b..bd33cb8f 100644 --- a/tests/rigctld.c +++ b/tests/rigctld.c @@ -972,6 +972,7 @@ int main(int argc, char *argv[]) static FILE*get_fsockout(struct handle_data *handle_data_arg) { #ifdef __MINGW32__ + int sock_osfhandle = _open_osfhandle(handle_data_arg->sock, _O_RDONLY); return _fdopen(sock_osfhandle, "wb"); #else return fdopen(handle_data_arg->sock, "wb"); @@ -986,7 +987,7 @@ static FILE* get_fsockin(struct handle_data *handle_data_arg) if (sock_osfhandle == -1) { rig_debug(RIG_DEBUG_ERR, "_open_osfhandle error: %s\n", strerror(errno)); - goto handle_exit; + return NULL; } return _fdopen(sock_osfhandle, "rb"); commit b5c60e50fb83bd9aa80af7f7c7199e5920835dc2 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jan 24 16:01:19 2021 -0600 Fix newcat.c compile error diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 1edde1b3..973217a8 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -781,9 +781,9 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { rig_debug(RIG_DEBUG_TRACE, "%s: ftdx101 check vfo OK, vfo=%s, tx_vfo=%s\n", __func__, rig_strvfo(vfo), rig_strvfo(rig->state.tx_vfo)); // when in split we can change VFOB but not VFOA - if (rig->state.split == RIG_SPLIT_ON && target_vfo == '0') return -RIG_ENTARGET; + if (rig->state.cache.split == RIG_SPLIT_ON && target_vfo == '0') return -RIG_ENTARGET; // when not in split we can't change VFOA at all - if (rig->state.split == RIG_SPLIT_OFF && target_vfo == '0') return -RIG_ENTARGET; + if (rig->state.cache.split == RIG_SPLIT_OFF && target_vfo == '0') return -RIG_ENTARGET; if (vfo != rig->state.tx_vfo) return -RIG_ENTARGET; } commit 018c053d7b60abb47ebe7efa48065a78f1d19147 Merge: d75a23d1 f1fd159b Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jan 24 12:58:53 2021 -0600 Merge branch 'master' of http://github.com/Hamlib/Hamlib commit d75a23d15615a03cf95f11ee5216b893960dcf47 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jan 24 12:52:44 2021 -0600 Fix ftdx101d set_freq behavior depending on split mode and VFO requested diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index e0773367..1edde1b3 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -779,8 +779,11 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) // but they can change the TX vfo if (is_ftdx101 && rig->state.cache.ptt == RIG_PTT_ON) { - // then we can't change freq on the non-tx VFO rig_debug(RIG_DEBUG_TRACE, "%s: ftdx101 check vfo OK, vfo=%s, tx_vfo=%s\n", __func__, rig_strvfo(vfo), rig_strvfo(rig->state.tx_vfo)); + // when in split we can change VFOB but not VFOA + if (rig->state.split == RIG_SPLIT_ON && target_vfo == '0') return -RIG_ENTARGET; + // when not in split we can't change VFOA at all + if (rig->state.split == RIG_SPLIT_OFF && target_vfo == '0') return -RIG_ENTARGET; if (vfo != rig->state.tx_vfo) return -RIG_ENTARGET; } commit 7e6adc6d2a69e6bb41809f59e9103c8cc156fae3 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jan 24 12:25:29 2021 -0600 Prevent ftdx101d from setting frequency on the non-tx vfo when in split mode diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 3d9c04ea..e0773367 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -775,6 +775,15 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) target_vfo = 'A' == c ? '0' : '1'; + // some rigs like FTDX101D cannot change non-TX vfo freq + // but they can change the TX vfo + if (is_ftdx101 && rig->state.cache.ptt == RIG_PTT_ON) + { + // then we can't change freq on the non-tx VFO + rig_debug(RIG_DEBUG_TRACE, "%s: ftdx101 check vfo OK, vfo=%s, tx_vfo=%s\n", __func__, rig_strvfo(vfo), rig_strvfo(rig->state.tx_vfo)); + 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 { @@ -6687,6 +6696,7 @@ ncboolean newcat_is_rig(RIG *rig, rig_model_t model) /* * newcat_set_tx_vfo does not set priv->curr_vfo + * does set rig->state.tx_vfo */ int newcat_set_tx_vfo(RIG *rig, vfo_t tx_vfo) { @@ -6762,9 +6772,10 @@ int newcat_set_tx_vfo(RIG *rig, vfo_t tx_vfo) snprintf(priv->cmd_str, sizeof(priv->cmd_str), "%s%c%c", command, p1, cat_term); - rig_debug(RIG_DEBUG_TRACE, "cmd_str = %s\n", priv->cmd_str); + rig_debug(RIG_DEBUG_TRACE, "cmd_str = %s, vfo=%s\n", priv->cmd_str, rig_strvfo(tx_vfo)); + + rig->state.tx_vfo = tx_vfo; - /* Set TX VFO */ RETURNFUNC(newcat_set_cmd(rig)); } diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h index bf6005ae..ba2e5096 100644 --- a/rigs/yaesu/newcat.h +++ b/rigs/yaesu/newcat.h @@ -50,7 +50,7 @@ typedef char ncboolean; /* shared function version */ -#define NEWCAT_VER "20210123" +#define NEWCAT_VER "20210124" /* Hopefully large enough for future use, 128 chars plus '\0' */ #define NEWCAT_DATA_LEN 129 ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/newcat.c | 5 ++++- tests/rigctld.c | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |