[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 5fec08b26261259a14c75
Library to control radio transceivers and receivers
Brought to you by:
n0nb
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 |