[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 2e321c5191382c0f359eb
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Nate B. <n0...@us...> - 2021-02-20 13: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 2e321c5191382c0f359eb85e58693e461a7f6549 (commit) via 707fe151d07f88b8a8d697bca7ac72b8cdd69848 (commit) via 132d896e894f3b0692244e45df686a8eebabd836 (commit) via 59d09e42a589f9040f9e7441395f655bd518e557 (commit) via 83c75fa8c6b7e2f63d86dcd9a29c909952c4b8ca (commit) via a6da45eb8b62bc10b53f1526af9049150ec4d407 (commit) via 49bcb07b8fbc4f5d23ebff3d7b9224faca47996d (commit) via 3a0ec1e1b4b5303c01e6aec9b90ce787f95d1681 (commit) via c3e9677a7edcce722299cd28629fb50297f4df35 (commit) via 132a5612f4064caecce0e133ff56f573f0783ed1 (commit) via 0f9a7fac07b13aa4015446074b6ac61632c02d80 (commit) via a9633cec39899d1f9a3fdaf7ffbbcfb06619c57e (commit) via 6a3b28e518ac8331915ad2555ef248f0a405cdee (commit) via 555bf9dc65ead752041f39679a6cab3c3fa6d324 (commit) via 53b18d4ec40eb034224cf62213e9ef8c4609ddeb (commit) from 1ad32d412460433724d18f411fffbf2f470a58c7 (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 2e321c5191382c0f359eb85e58693e461a7f6549 Merge: 59d09e42 707fe151 Author: Nate Bargmann <n0...@n0...> Date: Sat Feb 20 07:18:02 2021 -0600 Merge pull request #555 from N0NB/doxygen_work Doxygen work commit 707fe151d07f88b8a8d697bca7ac72b8cdd69848 Author: Nate Bargmann <n0...@n0...> Date: Sat Feb 20 07:15:25 2021 -0600 Update Doxygen comments in rot_conf.c diff --git a/src/rot_conf.c b/src/rot_conf.c index 9faa6aef..95c2a92a 100644 --- a/src/rot_conf.c +++ b/src/rot_conf.c @@ -25,7 +25,8 @@ */ /** - * \brief Rotator Configuration Interface + * \brief Rotator Configuration Interface. + * * \file rot_conf.c */ @@ -140,16 +141,29 @@ static const struct confparams rotfrontend_serial_cfg_params[] = { RIG_CONF_END, NULL, } }; +/** @} */ /* rotator definitions */ /** - * \brief Set rotator state info from alpha input - * \param rot - * \param token TOK_... specifying which info to set - * \param val input - * \return RIG_OK or < 0 error + * \addtogroup rot_internal + * @{ + */ + + +/** + * \brief Set a rotator state value from alpha input. + * \param rot The #ROT handle. + * \param token TOK_... specify which value to set. + * \param val Input. + * + * Assumes rot != NULL and val != NULL. + * + * \return RIG_OK or a **negative value** on error. + * + * \retval RIG_OK TOK_... value set successfully. + * \retval RIG_EINVAL TOK_.. value not set. * - * assumes rot!=NULL, val!=NULL + * \sa frontrot_get_conf() */ int frontrot_set_conf(ROT *rot, token_t token, const char *val) { @@ -335,11 +349,20 @@ int frontrot_set_conf(ROT *rot, token_t token, const char *val) /** - * \brief Get data from rotator state in alpha form - * \param rot non-null - * \param token TOK_... specifying which data to get - * \param val result non-null - * \return RIG_OK or < 0 if error + * \brief Query data from a rotator state in alpha form. + * + * \param rot The #ROT handle. + * \param token TOK_... specify which data to query. + * \param val Result. + * + * Assumes rot != NULL and val != NULL. + * + * \return RIG_OK or a **negative value** on error. + * + * \retval RIG_OK TOK_... value queried successfully. + * \retval RIG_EINVAL TOK_.. value not queried. + * + * \sa frontrot_set_conf() */ int frontrot_get_conf(ROT *rot, token_t token, char *val) { @@ -487,15 +510,31 @@ int frontrot_get_conf(ROT *rot, token_t token, char *val) return RIG_OK; } +/** @} */ /* rot_internal definitions */ /** - * \brief Executes cfunc on all the elements stored in the conf table - * \param rot non-null - * \param cfunc function(..) - * \param data + * \addtogroup rotator + * @{ + */ + + +/** + * \brief Executes cfunc on all the elements stored in the configuration + * parameters table. + * + * \param rot The #ROT handle. + * \param cfunc Pointer to the callback function(...). + * \param data Data for the callback function. + * + * Start first with backend configuration parameters table, then finish with + * frontend configuration parameters table. + * + * \return RIG_OK if the operation has been successful, otherwise a **negative + * value** if an error occurred (in which case, cause is set appropriately). * - * start first with backend conf table, then finish with frontend table + * \retval RIG_OK The \a cfunc action completed successfully. + * \retval RIG_EINVAL \a rot is NULL or inconsistent or \a cfunc is NULL. */ int HAMLIB_API rot_token_foreach(ROT *rot, int (*cfunc)(const struct confparams *, @@ -543,13 +582,23 @@ int HAMLIB_API rot_token_foreach(ROT *rot, /** - * \brief lookup conf token by its name, return pointer to confparams struct. - * \param rot - * \param name + * \brief Query a rotator configuration parameter token by its name. + * + * \param rot The #ROT handle. + * \param name Configuration parameter token name string. * \return confparams or NULL * - * lookup backend config table first, then fall back to frontend. - * TODO: should use Lex to speed it up, strcmp hurts! + * Use this function to get a pointer to the token in the #confparams + * structure. Searches the backend config params table first, then falls back + * to the frontend config params table. + * + * \return A pointer to the token in the #confparams structure or NULL if + * \a rot is NULL or inconsistent or if \a name is not found (how can the + * caller know which occurred?). + * + * \sa rot_token_lookup() + * + * TODO: Should use Lex to speed it up, strcmp() hurts! */ const struct confparams *HAMLIB_API rot_confparam_lookup(ROT *rot, const char *name) @@ -603,10 +652,18 @@ const struct confparams *HAMLIB_API rot_confparam_lookup(ROT *rot, /** - * \brief Simple lookup returning token id associated with name - * \param rot - * \param name - * \return token enum + * \brief Search for the token ID associated with a rotator configuration + * parameter token name. + * + * \param rot The #ROT handle. + * \param name Configuration parameter token name string. + * + * Searches the backend and frontend configuration parameters tables for the + * token ID. + * + * \return The token ID value or #RIG_CONF_END if the lookup failed. + * + * \sa rot_confparam_lookup() */ token_t HAMLIB_API rot_token_lookup(ROT *rot, const char *name) { @@ -626,16 +683,20 @@ token_t HAMLIB_API rot_token_lookup(ROT *rot, const char *name) /** - * \brief set a rotator configuration parameter - * \param rot The rot handle - * \param token The parameter - * \param val The value to set the parameter to + * \brief Set a rotator configuration parameter. * - * Sets a configuration parameter. + * \param rot The #ROT handle. + * \param token The token of the parameter to set. + * \param val The value to set the parameter to. * - * \return RIG_OK if the operation has been successful, otherwise - * a negative value if an error occurred (in which case, cause is - * set appropriately). + * Sets a rotator configuration parameter to \a val. + * + * \return RIG_OK if the operation has been successful, otherwise a **negative + * value** if an error occurred (in which case, cause is set appropriately). + * + * \retval RIG_OK The parameter was set successfully. + * \retval RIG_EINVAL \a rot is NULL or inconsistent or \a token is invalid. + * \retval RIG_ENAVAIL rot_caps#set_conf() capability is not available. * * \sa rot_get_conf() */ @@ -678,16 +739,20 @@ int HAMLIB_API rot_set_conf(ROT *rot, token_t token, const char *val) /** - * \brief get the value of a configuration parameter - * \param rot The rot handle - * \param token The parameter - * \param val The location where to store the value of config \a token + * \brief Query the value of a rotator configuration parameter. + * + * \param rot The #ROT handle. + * \param token The token of the parameter to query. + * \param val The location where to store the value of the configuration \a token. + * + * Retrieves the value of a configuration parameter associated with \a token. * - * Retrieves the value of a configuration parameter associated with \a token. + * \return RIG_OK if the operation has been successful, otherwise a **negative + * value** if an error occurred (in which case, cause is set appropriately). * - * \return RIG_OK if the operation has been successful, otherwise - * a negative value if an error occurred (in which case, cause is - * set appropriately). + * \retval RIG_OK Querying the parameter was successful. + * \retval RIG_EINVAL \a rot is NULL or inconsistent. + * \retval RIG_ENAVAIL rot_caps#get_conf() capability is not available. * * \sa rot_set_conf() */ commit 132d896e894f3b0692244e45df686a8eebabd836 Author: Nate Bargmann <n0...@n0...> Date: Sat Feb 20 07:13:55 2021 -0600 Add amp_internal subgroup to Doxygen documentation The amp_internal subgroup will document those items intended for Hamlib interal use, i.e. not a part of the public API. diff --git a/doc/index.doxygen b/doc/index.doxygen index 22670887..366239c1 100644 --- a/doc/index.doxygen +++ b/doc/index.doxygen @@ -106,5 +106,6 @@ Windows 32 bit on Debian GNU/Linux. * \defgroup rotator Rotator API * \defgroup rot_internal Rotator Internal API * \defgroup amplifier Amplifier API + * \defgroup amp_internal Amplifier Internal API * \defgroup utilities Utility Routines API */ diff --git a/src/amp_conf.c b/src/amp_conf.c index bc0b4bd3..b819e56f 100644 --- a/src/amp_conf.c +++ b/src/amp_conf.c @@ -108,16 +108,30 @@ static const struct confparams ampfrontend_serial_cfg_params[] = { RIG_CONF_END, NULL, } }; +/** @} */ /* amplifier definitions */ + + +/** + * \addtogroup amp_internal + * @{ + */ + -//! @cond Doxygen_Suppress /** - * \brief Set amplifier state info from alpha input - * \param amp - * \param token TOK_... specifying which info to set - * \param val input - * \return RIG_OK or < 0 error + * \brief Set an amplifier state value from alpha input. + * + * \param amp The #AMP handle. + * \param token TOK_... specify which value to set. + * \param val Input. * - * assumes amp!=NULL, val!=NULL + * Assumes amp != NULL and val != NULL. + * + * \return RIG_OK or a **negative value** error. + * + * \retval RIG_OK TOK_... value set successfully. + * \retval RIG_EINVAL TOK_.. value not set. + * + * \sa frontamp_get_conf() */ int frontamp_set_conf(AMP *amp, token_t token, const char *val) { @@ -295,16 +309,23 @@ int frontamp_set_conf(AMP *amp, token_t token, const char *val) return RIG_OK; } -//! @endcond -//! @cond Doxygen_Suppress /** - * \brief Get data from amplifier state in alpha form - * \param amp non-null - * \param token TOK_... specifying which data to get - * \param val result non-null - * \return RIG_OK or < 0 if error + * \brief Query data from an amplifier state in alpha form. + * + * \param amp The #AMP handle. + * \param token TOK_... specify which data to query. + * \param val Result. + * + * Assumes amp != NULL and val != NULL. + * + * \return RIG_OK or a **negative value** on error. + * + * \retval RIG_OK TOK_... value queried successfully. + * \retval RIG_EINVAL TOK_.. value not queried. + * + * \sa frontamp_set_conf() */ int frontamp_get_conf(AMP *amp, token_t token, char *val) { @@ -432,18 +453,33 @@ int frontamp_get_conf(AMP *amp, token_t token, char *val) return RIG_OK; } -//! @endcond +/** @} */ /* amp_internal definitions */ + + +/** + * \addtogroup amplifier + * @{ + */ #ifdef XXREMOVEDXXC // Not referenced anywhere /** - * \brief Executes cfunc on all the elements stored in the conf table - * \param amp non-null - * \param cfunc function(..) - * \param data + * \brief Executes cfunc on all the elements stored in the configuration + * parameters table. * - * start first with backend conf table, then finish with frontend table + * \param amp The #AMP handle. + * \param cfunc Pointer to the callback function(...). + * \param data Data for the callback function. + * + * Start first with backend configuration parameters table, then finish with + * frontend configuration parameters table. + * + * \return RIG_OK if the operation has been successful, otherwise a **negative + * value** if an error occurred (in which case, cause is set appropriately). + * + * \retval RIG_OK The \a cfunc action completed successfully. + * \retval RIG_EINVAL \a amp is NULL or inconsistent or \a cfunc is NULL. */ int HAMLIB_API amp_token_foreach(AMP *amp, int (*cfunc)(const struct confparams *, @@ -502,7 +538,7 @@ int HAMLIB_API amp_token_foreach(AMP *amp, * to the frontend config params table. * * \return A pointer to the token in the #confparams structure or NULL if - * \a amp is NULL or inconsistent or if \a token is not found (how can the + * \a amp is NULL or inconsistent or if \a name is not found (how can the * caller know which occurred?). * * \sa amp_token_lookup() @@ -566,7 +602,7 @@ const struct confparams *HAMLIB_API amp_confparam_lookup(AMP *amp, * Searches the backend and frontend configuration parameters tables for the * token ID. * - * \return The token ID value or RIG_CONF_END if the lookup failed. + * \return The token ID value or #RIG_CONF_END if the lookup failed. * * \sa amp_confparam_lookup() */ @@ -590,9 +626,9 @@ token_t HAMLIB_API amp_token_lookup(AMP *amp, const char *name) /** * \brief Set an amplifier configuration parameter. * - * \param amp The #AMP handle. + * \param amp The #AMP handle. * \param token The token of the parameter to set. - * \param val The value to set the parameter to. + * \param val The value to set the parameter to. * * Sets an amplifier configuration parameter to \a val. * commit 59d09e42a589f9040f9e7441395f655bd518e557 Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Feb 20 00:02:58 2021 -0600 Add USER-U USER-L modes to flrig.c for TS480 diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index 7b69d628..16028125 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -914,6 +914,8 @@ static int flrig_open(RIG *rig) else if (streq(p, "USB-D1")) { modeMapAdd(&modes, RIG_MODE_PKTUSB, p); } else if (streq(p, "USB-D2")) { modeMapAdd(&modes, RIG_MODE_PKTUSB, p); } else if (streq(p, "USB-D3")) { modeMapAdd(&modes, RIG_MODE_PKTUSB, p); } + else if (streq(p, "USER-U")) { modeMapAdd(&modes, RIG_MODE_PKTUSB, p); } + else if (streq(p, "USER-L")) { modeMapAdd(&modes, RIG_MODE_PKTLSB, p); } else if (streq(p, "W-FM")) { modeMapAdd(&modes, RIG_MODE_WFM, p); } else if (streq(p, "WFM")) { modeMapAdd(&modes, RIG_MODE_WFM, p); } else if (streq(p, "UCW")) { modeMapAdd(&modes, RIG_MODE_CW, p); } diff --git a/rigs/dummy/flrig.h b/rigs/dummy/flrig.h index b2cccb69..879df79b 100644 --- a/rigs/dummy/flrig.h +++ b/rigs/dummy/flrig.h @@ -28,7 +28,7 @@ #include <sys/time.h> #endif -#define BACKEND_VER "20210215" +#define BACKEND_VER "20210220" #define EOM "\r" #define TRUE 1 commit 83c75fa8c6b7e2f63d86dcd9a29c909952c4b8ca Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Feb 19 22:49:46 2021 -0600 Fixing AF RFWPOWER and STRENGTH for TS480 https://github.com/Hamlib/Hamlib/issues/553 diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index 26956254..e6f8bef0 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -2322,7 +2322,7 @@ static int kenwood_get_power_minmax(RIG *rig, int *power_now, int *power_min, rig_debug(RIG_DEBUG_TRACE, "%s: retval=%d\n", __func__, retval); - if (RIG_IS_TS890S) + if (RIG_IS_TS890S || RIG_IS_TS480) { expval = 6; } @@ -2677,7 +2677,7 @@ int kenwood_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) break; case RIG_LEVEL_STRENGTH: - if (RIG_IS_TS590S || RIG_IS_TS590SG) + if (RIG_IS_TS590S || RIG_IS_TS590SG || RIG_IS_TS480) { cmd = "SM0"; len = 3; diff --git a/rigs/kenwood/ts480.c b/rigs/kenwood/ts480.c index 7d781bcc..6a701e44 100644 --- a/rigs/kenwood/ts480.c +++ b/rigs/kenwood/ts480.c @@ -119,7 +119,7 @@ kenwood_ts480_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) return kenwood_set_level(rig, vfo, level, val); case RIG_LEVEL_RF: - if (rig->caps->rig_model == RIG_MODEL_TS890S) + if (RIG_IS_TS890S) { rf_max_level = 255; } @@ -132,7 +132,7 @@ kenwood_ts480_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) case RIG_LEVEL_SQL: kenwood_val = val.f * 255; /* possible values for TS480 are 000.. 255 */ - if (rig->caps->rig_model == RIG_MODEL_TS890S) + if (RIG_IS_TS890S) { sprintf(levelbuf, "SQ%03d", kenwood_val); } @@ -148,7 +148,7 @@ kenwood_ts480_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) /* hamlib argument is int, possible values rig.h:enum agc_level_e */ /* possible values for TS480 000(=off), 001(=fast), 002(=slow) */ /* possible values for TS890 0(=off), 1(=slow), 2(=mid), 3(=fast), 4(=off/Last) */ - if (rig->caps->rig_model == RIG_MODEL_TS890S) + if (RIG_IS_TS890S) { rig_debug(RIG_DEBUG_VERBOSE, "%s TS890S RIG_LEVEL_AGC\n", __func__); @@ -220,7 +220,7 @@ kenwood_ts480_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) /* - * kenwood_get_level + * kenwood_ts480_get_level * Assumes rig!=NULL, val!=NULL */ int @@ -235,7 +235,7 @@ kenwood_ts480_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__); - if (rig->caps->rig_model == RIG_MODEL_TS890S) + if (RIG_IS_TS890S || RIG_IS_TS480) { rf_max_level = 255; } @@ -247,7 +247,7 @@ kenwood_ts480_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) switch (level) { case RIG_LEVEL_AF: - if (rig->caps->rig_model == RIG_MODEL_TS890S) + if (RIG_IS_TS890S) { retval = kenwood_transaction(rig, "AG", ackbuf, sizeof(ackbuf)); offset_level = 2; @@ -279,6 +279,10 @@ kenwood_ts480_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) return RIG_OK; case RIG_LEVEL_RF: + if (RIG_IS_TS480) + { + rf_max_level = 100; + } retval = kenwood_transaction(rig, "RG", ackbuf, sizeof(ackbuf)); if (RIG_OK != retval) @@ -302,7 +306,7 @@ kenwood_ts480_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) return RIG_OK; case RIG_LEVEL_SQL: - if (rig->caps->rig_model == RIG_MODEL_TS890S) + if (RIG_IS_TS890S) { retval = kenwood_transaction(rig, "SQ", ackbuf, sizeof(ackbuf)); ack_len_expected = 5; @@ -334,7 +338,7 @@ kenwood_ts480_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) return RIG_OK; case RIG_LEVEL_AGC: - if (rig->caps->rig_model == RIG_MODEL_TS890S) + if (RIG_IS_TS890S) { retval = kenwood_transaction(rig, "GC", ackbuf, sizeof(ackbuf)); ack_len_expected = 3; @@ -364,7 +368,7 @@ kenwood_ts480_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) break; case '1': - if (rig->caps->rig_model == RIG_MODEL_TS890S) + if (RIG_IS_TS890S) { val->i = RIG_AGC_SLOW; } @@ -376,7 +380,7 @@ kenwood_ts480_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) break; case '2': - if (rig->caps->rig_model == RIG_MODEL_TS890S) + if (RIG_IS_TS890S) { val->i = RIG_AGC_MEDIUM; } commit a6da45eb8b62bc10b53f1526af9049150ec4d407 Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Feb 19 14:41:28 2021 -0600 Fix for TS480 RFPOWER read -- was not able to handle the long command string https://github.com/Hamlib/Hamlib/issues/553 diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index eddade3c..26956254 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -2276,6 +2276,9 @@ static int kenwood_get_power_minmax(RIG *rig, int *power_now, int *power_min, switch (rig->caps->rig_model) { + // TS480 can't handle the long command string + // We can treat it like the TS890S + case RIG_MODEL_TS480: // TS890S can't take power levels outside 5-100 and 5-25 // So all we'll do is read power_now case RIG_MODEL_TS890S: commit 49bcb07b8fbc4f5d23ebff3d7b9224faca47996d Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Feb 19 14:32:54 2021 -0600 Add MICGAIN and STRENGTH to ts480.c https://github.com/Hamlib/Hamlib/issues/553 diff --git a/rigs/kenwood/ts480.c b/rigs/kenwood/ts480.c index 8f192a4b..7d781bcc 100644 --- a/rigs/kenwood/ts480.c +++ b/rigs/kenwood/ts480.c @@ -401,10 +401,11 @@ kenwood_ts480_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) return RIG_OK; + case RIG_LEVEL_STRENGTH: + case RIG_LEVEL_MICGAIN: case RIG_LEVEL_RFPOWER: return kenwood_get_level(rig, vfo, level, val); - case RIG_LEVEL_MICGAIN: case RIG_LEVEL_PREAMP: case RIG_LEVEL_IF: case RIG_LEVEL_APF: commit 3a0ec1e1b4b5303c01e6aec9b90ce787f95d1681 Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Feb 19 14:27:21 2021 -0600 fix type in ts480 ag_level diff --git a/rigs/kenwood/ts480.c b/rigs/kenwood/ts480.c index 2720db8e..8f192a4b 100644 --- a/rigs/kenwood/ts480.c +++ b/rigs/kenwood/ts480.c @@ -115,7 +115,7 @@ kenwood_ts480_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) return kenwood_set_level(rig, vfo, level, val); case RIG_LEVEL_AF: - priv->ag_format =22; + priv->ag_format =2; return kenwood_set_level(rig, vfo, level, val); case RIG_LEVEL_RF: commit c3e9677a7edcce722299cd28629fb50297f4df35 Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Feb 19 09:38:30 2021 -0600 Fix ts480 LEVEL_AF and add LEVEL_STRENGHT and LEVEL_MICGAIN https://github.com/Hamlib/Hamlib/issues/553 diff --git a/rigs/kenwood/ts480.c b/rigs/kenwood/ts480.c index 54044bce..2720db8e 100644 --- a/rigs/kenwood/ts480.c +++ b/rigs/kenwood/ts480.c @@ -39,7 +39,7 @@ #define TS480_AM_TX_MODES RIG_MODE_AM #define TS480_VFO (RIG_VFO_A|RIG_VFO_B) -#define TS480_LEVEL_ALL (RIG_LEVEL_RFPOWER|RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_SQL|RIG_LEVEL_AGC) +#define TS480_LEVEL_ALL (RIG_LEVEL_RFPOWER|RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_SQL|RIG_LEVEL_AGC|RIG_LEVEL_MICGAIN|RIG_LEVEL_STRENGTH) #define TS480_FUNC_ALL (RIG_FUNC_NB|RIG_FUNC_COMP|RIG_FUNC_VOX|RIG_FUNC_NR|RIG_FUNC_NR|RIG_FUNC_BC|RIG_FUNC_BC2|RIG_FUNC_RIT|RIG_FUNC_XIT) #define TS890_FUNC_ALL (RIG_FUNC_NB|RIG_FUNC_NB2|RIG_FUNC_COMP|RIG_FUNC_VOX|RIG_FUNC_NR|RIG_FUNC_NR|RIG_FUNC_BC|RIG_FUNC_BC2|RIG_FUNC_RIT|RIG_FUNC_XIT) @@ -105,6 +105,7 @@ kenwood_ts480_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) char levelbuf[16]; int kenwood_val; int rf_max_level = 100; /* 100 for TS-480 and 255 for TS-890S */ + struct kenwood_priv_data *priv = rig->state.priv; rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__); commit 132a5612f4064caecce0e133ff56f573f0783ed1 Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Feb 19 09:33:12 2021 -0600 Fix ts480 get_level for LEVEL_AF https://github.com/Hamlib/Hamlib/issues/new diff --git a/rigs/kenwood/ts480.c b/rigs/kenwood/ts480.c index 0f6a97ac..54044bce 100644 --- a/rigs/kenwood/ts480.c +++ b/rigs/kenwood/ts480.c @@ -114,6 +114,7 @@ kenwood_ts480_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) return kenwood_set_level(rig, vfo, level, val); case RIG_LEVEL_AF: + priv->ag_format =22; return kenwood_set_level(rig, vfo, level, val); case RIG_LEVEL_RF: @@ -447,7 +448,7 @@ const struct rig_caps ts480_caps = RIG_MODEL(RIG_MODEL_TS480), .model_name = "TS-480", .mfg_name = "Kenwood", - .version = BACKEND_VER ".0", + .version = BACKEND_VER ".1", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, commit 0f9a7fac07b13aa4015446074b6ac61632c02d80 Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Feb 19 08:44:02 2021 -0600 Add -RIG_EINVAL when set_level > 1.0 diff --git a/rigs/dummy/dummy.c b/rigs/dummy/dummy.c index abb3043a..4c524325 100644 --- a/rigs/dummy/dummy.c +++ b/rigs/dummy/dummy.c @@ -1006,6 +1006,7 @@ static int dummy_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) if (RIG_LEVEL_IS_FLOAT(level)) { + if (val.f > 1.0) RETURNFUNC(-RIG_EINVAL); sprintf(lstr, "%f", val.f); } else diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index fe5aadac..a63f0602 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -2419,6 +2419,7 @@ int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) */ if (RIG_LEVEL_IS_FLOAT(level)) { + if (val.f > 1.0) RETURNFUNC(-RIG_EINVAL); icom_val = val.f * 255; } else diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index 48427e84..eddade3c 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -2385,6 +2385,7 @@ int kenwood_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) if (RIG_LEVEL_IS_FLOAT(level)) { + if (val.f > 1.0) RETURNFUNC(-RIG_EINVAL); kenwood_val = val.f * 255; } else commit a9633cec39899d1f9a3fdaf7ffbbcfb06619c57e Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Feb 19 07:47:31 2021 -0600 Update newcat.h version diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h index 0403c150..36c7aceb 100644 --- a/rigs/yaesu/newcat.h +++ b/rigs/yaesu/newcat.h @@ -50,7 +50,7 @@ typedef char ncboolean; /* shared function version */ -#define NEWCAT_VER "20210213" +#define NEWCAT_VER "20210219" /* Hopefully large enough for future use, 128 chars plus '\0' */ #define NEWCAT_DATA_LEN 129 commit 6a3b28e518ac8331915ad2555ef248f0a405cdee Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Feb 19 07:46:32 2021 -0600 In newcat.c check LEVEL values to ensure they are in the range 0-1 diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index dacfa13f..75dbaf41 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -3474,6 +3474,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) { RETURNFUNC(-RIG_ENAVAIL); } + if (val.f > 1.0) RETURNFUNC(-RIG_EINVAL); fpf = newcat_scale_float(255, val.f); snprintf(priv->cmd_str, sizeof(priv->cmd_str), "AG%c%03d%c", main_sub_vfo, fpf, @@ -3643,6 +3644,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) newcat_get_mode(rig, vfo, &mode, &width); } + if (val.f > 1.0) RETURNFUNC(-RIG_EINVAL); if (is_ftdx1200 || is_ftdx3000 || is_ft891 || is_ft991 || is_ftdx101 || is_ftdx10) { @@ -4196,6 +4198,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) RETURNFUNC(-RIG_ENAVAIL); } + if (val.f > 1.0) RETURNFUNC(-RIG_EINVAL); if (is_ftdx1200 || is_ftdx3000 || is_ft891 || is_ft991 || is_ftdx101 || is_ftdx10) { commit 555bf9dc65ead752041f39679a6cab3c3fa6d324 Merge: 53b18d4e 1ad32d41 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Feb 18 23:57:33 2021 -0600 Merge branch 'master' of https://github.com/Hamlib/Hamlib commit 53b18d4ec40eb034224cf62213e9ef8c4609ddeb Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Feb 18 23:45:14 2021 -0600 Add Main/Sub vfos to dummy.c for testing diff --git a/rigs/dummy/dummy.c b/rigs/dummy/dummy.c index ed6a46ac..abb3043a 100644 --- a/rigs/dummy/dummy.c +++ b/rigs/dummy/dummy.c @@ -505,8 +505,10 @@ static int dummy_set_vfo(RIG *rig, vfo_t vfo) case RIG_VFO_VFO: /* FIXME */ case RIG_VFO_RX: + case RIG_VFO_MAIN: priv->curr = &priv->vfo_a; break; case RIG_VFO_A: priv->curr = &priv->vfo_a; break; + case RIG_VFO_SUB: priv->curr = &priv->vfo_b; break; case RIG_VFO_B: priv->curr = &priv->vfo_b; break; case RIG_VFO_MEM: @@ -2242,7 +2244,7 @@ struct rig_caps dummy_no_vfo_caps = RIG_MODEL(RIG_MODEL_DUMMY_NOVFO), .model_name = "Dummy No VFO", .mfg_name = "Hamlib", - .version = "20200606.0", + .version = "20210218.0", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_OTHER, ----------------------------------------------------------------------- Summary of changes: doc/index.doxygen | 1 + rigs/dummy/dummy.c | 5 +- rigs/dummy/flrig.c | 2 + rigs/dummy/flrig.h | 2 +- rigs/icom/icom.c | 1 + rigs/kenwood/kenwood.c | 8 ++- rigs/kenwood/ts480.c | 33 ++++++----- rigs/yaesu/newcat.c | 3 + rigs/yaesu/newcat.h | 2 +- src/amp_conf.c | 84 ++++++++++++++++++++-------- src/rot_conf.c | 149 +++++++++++++++++++++++++++++++++++-------------- 11 files changed, 206 insertions(+), 84 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |