[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 6901bb1cdaf6f2e0647c8
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Michael B. <mdb...@us...> - 2021-04-09 20:20:54
|
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 6901bb1cdaf6f2e0647c8e549ffdd2d80d009334 (commit) via 7ea4fd17aa728555ea3b05b74dca0f5e8a7b4efe (commit) via 609c9ad8d52bd5f3c9d6611058f5afe89565c9a9 (commit) via def3aee7a613cc74123639603dffd65a9c2cf579 (commit) via e90147f83ca8d3df0391a4f072df6410ce673f0e (commit) via 716866bd45c8bddc938326a45a18fccfa0093b63 (commit) via 74654e18778e8441789b14b429b2b94798cb4ff5 (commit) via 4c8dc6e2451e9ef5d793c14294d73237ca136b73 (commit) via 313e46acf307396901899eb8d9ec450296851eb5 (commit) via 87ae220a1a1ca10824c537fd43a0b5a992fc86e7 (commit) via bddf8684143aeebc3bfcf7f4939e9ec64a6ee621 (commit) via 993a3162fd0f5f49f66af986202a4876388e2890 (commit) via 03b69afee667e9bfad14c93c3679c8ecc7ae4a25 (commit) via 72161dd316d99aa92aebb4139ebc6935386b963c (commit) via 0981fa630d3dac9854f35e5256ce835f284bdb08 (commit) via c02b079fb3de17e766399cfc82daae096f646751 (commit) via aa1972fb5d794184bf852b2cbf6ac5da73fc2a88 (commit) via 124a6faafd0c545fd7ec9a20bf6a582968d4c769 (commit) via 8d95db88d41bd5daa4c7b1174b5780b77a4408cb (commit) via eb0f5961042606ed143f219ff9e3d5cfc90d0c5f (commit) via 623287aa02823bf900b9ac7b7d94c6f84529d0a8 (commit) via 4c2f60b9b0e03bb83e36b4e4a8f2dc0e1b580e95 (commit) via f8c4f80fd64a8dfc1a16d23ab4fb5d41fb8cc9f7 (commit) via c25e8f9e5b5652ee18bd0c653b31d868dac06e0d (commit) via 502c41d7465883922a4caec186a4fa00efc0d427 (commit) via 7d2a5078c48f188a54609fd7b0bbe654764a850a (commit) via 809f2744e66ca52742e35c2c90422c990902b424 (commit) via 6cb6043a432b65f88c747856996ee2e94a092637 (commit) via 1bd2cf37d7d779ce84dcb3930ec4418fd8faa957 (commit) via 2b104ba37d8b6dbe72b084bfec892e3019365c48 (commit) from bbc8e00074fbcb43b77badeba8028e1800e58bdb (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 6901bb1cdaf6f2e0647c8e549ffdd2d80d009334 Author: Mike Black W9MDB <mdb...@ya...> Date: Fri Apr 9 15:16:41 2021 -0500 Remove vfo_mode printout diff --git a/tests/rigctld.c b/tests/rigctld.c index 2cc7c262..93fcbada 100644 --- a/tests/rigctld.c +++ b/tests/rigctld.c @@ -548,11 +548,13 @@ int main(int argc, char *argv[]) } } +#if 0 if (!vfo_mode) { printf("Recommend using --vfo switch for rigctld if client supports it\n"); printf("rigctl and netrigctl will automatically detect vfo mode\n"); } +#endif rig_set_debug(verbose); commit 7ea4fd17aa728555ea3b05b74dca0f5e8a7b4efe Author: Mike Black W9MDB <mdb...@ya...> Date: Thu Apr 8 22:37:36 2021 -0500 Fix icom.c default vfo to usa VFOA/Main as appropriate https://github.com/Hamlib/Hamlib/issues/654 diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 5ad415ba..ad83437e 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -1251,7 +1251,9 @@ int icom_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) if (rig->state.current_vfo == RIG_VFO_NONE) { - retval = rig_set_vfo(rig, RIG_VFO_A); // we default to VFOA + // we default to VFOA/MAIN as appropriate + vfo = (rig->state.vfo_list & RIG_VFO_B) ? RIG_VFO_A : RIG_VFO_MAIN; + retval = rig_set_vfo(rig, vfo); if (retval != RIG_OK) { diff --git a/rigs/icom/icom.h b/rigs/icom/icom.h index 286e6536..fd44e5a2 100644 --- a/rigs/icom/icom.h +++ b/rigs/icom/icom.h @@ -30,7 +30,7 @@ #include <sys/time.h> #endif -#define BACKEND_VER "20210330" +#define BACKEND_VER "20210408" /* * defines used by comp_cal_str in rig.c commit 609c9ad8d52bd5f3c9d6611058f5afe89565c9a9 Author: Mike Black W9MDB <mdb...@ya...> Date: Thu Apr 8 16:16:35 2021 -0500 Temporarily disable fast_set_ptt in flrig.c -- not working in FLRig 1.3.54.14 diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index 88071859..775a1ad7 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -852,7 +852,11 @@ static int flrig_open(RIG *rig) value_t val; val.i = 1; // we'll try fast and if it fails turn it off priv->has_set_freq_fast = 1; +#if 0 priv->has_set_ptt_fast = 1; // they both will be there +#else + priv->has_set_ptt_fast = 0; // Broken in FLRig 1.3.54.14 and before +#endif rig_set_ext_parm(rig, TOK_FLRIG_FAST_SET_FREQ, val); rig_set_ext_parm(rig, TOK_FLRIG_FAST_SET_PTT, val); commit def3aee7a613cc74123639603dffd65a9c2cf579 Author: Mike Black W9MDB <mdb...@ya...> Date: Thu Apr 8 14:29:40 2021 -0500 Add set_ptt_fast capability to flrig.c as default if available diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index ed6ee2a0..88071859 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -145,7 +145,7 @@ const struct rig_caps flrig_caps = RIG_MODEL(RIG_MODEL_FLRIG), .model_name = "FLRig", .mfg_name = "FLRig", - .version = "20210407", + .version = "20210408", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -1253,7 +1253,15 @@ static int flrig_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) sprintf(cmd_arg, "<params><param><value><i4>%d</i4></value></param></params>", ptt); - retval = flrig_transaction(rig, "rig.set_ptt", cmd_arg, NULL, 0); + + value_t val; + char *cmd = "rig.set_ptt"; + rig_get_ext_parm(rig, TOK_FLRIG_FAST_SET_PTT, &val); + rig_debug(RIG_DEBUG_VERBOSE, "%s: fast_set_ptt=%d\n", __func__, val.i); + + if (val.i) { cmd = "rig.set_ptt_fast"; } + + retval = flrig_transaction(rig, cmd, cmd_arg, NULL, 0); if (retval != RIG_OK) { commit e90147f83ca8d3df0391a4f072df6410ce673f0e Merge: 74654e18 716866bd Author: Nate Bargmann <n0...@n0...> Date: Wed Apr 7 11:12:35 2021 -0500 Merge pull request #653 from N0NB/doxygen_work Update Doxygen comments in commit 716866bd45c8bddc938326a45a18fccfa0093b63 Author: Nate Bargmann <n0...@n0...> Date: Wed Apr 7 11:08:02 2021 -0500 Update Doxygen comments in amp_settings.c amplifier.c rot_settings.c diff --git a/src/amp_settings.c b/src/amp_settings.c index 81aeda23..6493664a 100644 --- a/src/amp_settings.c +++ b/src/amp_settings.c @@ -50,19 +50,23 @@ /** - * \brief Check retrieval ability of level settings. + * \brief Check which level settings can be queried. * * \param amp The #AMP handle. - * \param level The level settings to check. + * \param level The level settings bitmap. * - * Checks if an amplifier is capable of *getting* a level setting. Since the - * \a level is an OR'ed bitwise argument, more than one level can be checked - * at the same time. + * Checks if an amplifier is capable of *getting* a level setting. Since the + * \a level is an OR'ed bitwise argument, more than one level can be checked + * at the same time. * - * EXAMPLE: \code if (amp_has_get_level(my_amp, AMP_LVL_SWR)) disp_SWR();\endcode + * EXAMPLE: + * \code + * if (amp_has_get_level(my_amp, AMP_LVL_SWR)) + * my_disp_SWR(); + * \endcode * * \return A bit map of supported level settings that can be retrieved, - * otherwise 0 if none supported. + * otherwise 0 if none supported or \a amp is NULL or inconsistent. * * \sa amp_has_set_level(), amp_get_level() */ diff --git a/src/amplifier.c b/src/amplifier.c index 7f518b1b..c56364e0 100644 --- a/src/amplifier.c +++ b/src/amplifier.c @@ -703,6 +703,8 @@ const char *HAMLIB_API amp_get_info(AMP *amp) * * Query the \a val corresponding to the \a level. * + * \note \a val can be any type defined by #value_t. + * * \return RIG_OK if the operation was successful, otherwise a **negative * value** if an error occurred (in which case, cause is set appropriately). * diff --git a/src/rot_settings.c b/src/rot_settings.c index 5ac67118..749834bb 100644 --- a/src/rot_settings.c +++ b/src/rot_settings.c @@ -1,17 +1,3 @@ -/** - * \addtogroup rotator - * @{ - */ - -/** - * \file rot_settings.c - * \brief rotator func/level/parm interface - * \author Mikael Nousiainen - * \date 2020 - * - * Hamlib interface is a frontend implementing wrapper functions. - */ - /* * Hamlib Interface - rotator func/level/parm * Copyright (c) 2020 by Mikael Nousiainen @@ -33,6 +19,22 @@ * */ +/** + * \addtogroup rotator + * @{ + */ + +/** + * \file rot_settings.c + * \brief Rotator functions/levels/parameters interface. + * + * \author Mikael Nousiainen + * \date 2020 + * + * This Hamlib interface is a frontend implementing wrapper functions. + */ + + #ifdef HAVE_CONFIG_H # include "config.h" #endif @@ -58,18 +60,24 @@ /** - * \brief set a rotator level setting - * \param rig The rotator handle - * \param level The level setting - * \param val The value to set the level setting to + * \brief Set a rotator level to a given value. + * + * \param rot The #ROT handle. + * \param level The level to set. + * \param val The value of the level. + * + * Set \a level to \a val. * - * Sets the level of a setting. - * The level value \a val can be a float or an integer. See #value_t - * for more information. + * \note \a val can be any type defined by #value_t. + * \note As this function calls rot_has_set_level(), this may be considered a + * higher level API. * - * \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 Setting the level was successful. + * \retval RIG_EINVAL \a rot is NULL or inconsistent. + * \retval RIG_ENAVAIL rot_caps#set_level() capability is not available. * * \sa rot_has_set_level(), rot_get_level() */ @@ -96,18 +104,24 @@ int HAMLIB_API rot_set_level(ROT *rot, setting_t level, value_t val) /** - * \brief get the value of a level - * \param rig The rotator handle - * \param level The level setting - * \param val The location where to store the value of \a level + * \brief Query the value of a requested rotator level. + * + * \param rot The #ROT handle. + * \param level The requested level. + * \param val The variable to store the \a level value. + * + * Query the \a val corresponding to the \a level. * - * Retrieves the value of a \a level. - * The level value \a val can be a float or an integer. See #value_t - * for more information. + * \note \a val can be any type defined by #value_t. + * \note As this function calls rot_has_get_level(), this may be considered a + * higher level API. * - * \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 The query was successful. + * \retval RIG_EINVAL \a rot is NULL or inconsistent. + * \retval RIG_ENAVAIL rot_caps#get_level() capability is not available. * * \sa rot_has_get_level(), rot_set_level() */ @@ -135,18 +149,24 @@ int HAMLIB_API rot_get_level(ROT *rot, setting_t level, value_t *val) /** - * \brief set a rotator parameter - * \param rig The rotator handle - * \param parm The parameter - * \param val The value to set the parameter + * \brief Set a rotator parameter to a given value. + * + * \param rot The #ROT handle. + * \param parm The parameter to set. + * \param val The value of the parameter. * - * Sets a parameter. - * The parameter value \a val can be a float or an integer. See #value_t - * for more information. + * Sets \a parm 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). + * \note \a val can be any type defined by #value_t. + * \note As this function calls rot_has_set_parm(), this may be considered a + * higher level API. + * + * \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. + * \retval RIG_ENAVAIL rot_caps#set_parm() capability is not available. * * \sa rot_has_set_parm(), rot_get_parm() */ @@ -169,18 +189,24 @@ int HAMLIB_API rot_set_parm(ROT *rot, setting_t parm, value_t val) /** - * \brief get the value of a parameter - * \param rig The rotator handle - * \param parm The parameter - * \param val The location where to store the value of \a parm + * \brief Query the value of a requested rotator parameter. + * + * \param rot The #ROT handle. + * \param parm The requested parameter. + * \param val The variable to store the \a parm value. + * + * Query the \a val corresponding to the \a parm. * - * Retrieves the value of a \a parm. - * The parameter value \a val can be a float or an integer. See #value_t - * for more information. + * \note \a val can be any type defined by #value_t. + * \note As this function calls rot_has_get_parm(), this may be considered a + * higher level API. * - * \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 The parameter was queried successfully. + * \retval RIG_EINVAL \a rot is NULL or inconsistent. + * \retval RIG_ENAVAIL rot_caps#get_parm() capability is not available. * * \sa rot_has_get_parm(), rot_set_parm() */ @@ -203,20 +229,28 @@ int HAMLIB_API rot_get_parm(ROT *rot, setting_t parm, value_t *val) /** - * \brief check retrieval ability of level settings - * \param rig The rotator handle - * \param level The level settings + * \brief Check which rotator level settings can be queried. * - * Checks if a rotator is capable of *getting* a level setting. - * Since the \a level is an OR'ed bitwise argument, more than - * one level can be checked at the same time. + * \param rot The #ROT handle. + * \param level The level settings bitmap. * - * EXAMPLE: if (rot_has_get_level(my_rig, RIG_LEVEL_SPEED)) + * Checks if a rotator is capable of *getting* a level setting. Since + * \a level is an OR'ed bitwise argument, more than one level can be checked + * at the same time. * - * \return a bit map of supported level settings that can be retrieved, - * otherwise 0 if none supported. + * EXAMPLE: + * \code + * if (rot_has_get_level(my_rot, ROT_LEVEL_SPEED)) + * my_get_speed(&my_speed); + * \endcode * - * \sa rot_has_set_level(), rot_get_level() + * \note As this function is called by rot_get_level(), this may be considered + * a lower level API. + * + * \return A bit map of supported level settings that can be retrieved, + * otherwise 0 if none supported or \a rot is NULL or inconsistent. + * + * \sa rot_get_level(), rot_has_set_level() */ setting_t HAMLIB_API rot_has_get_level(ROT *rot, setting_t level) { @@ -234,20 +268,27 @@ setting_t HAMLIB_API rot_has_get_level(ROT *rot, setting_t level) /** - * \brief check settable ability of level settings - * \param rig The rotator handle - * \param level The level settings + * \brief Query the rotator levels that may be set. * - * Checks if a rotator can *set* a level setting. - * Since the \a level is an OR'ed bitwise argument, more than - * one level can be check at the same time. + * \param rot The #ROT handle. + * \param level The level settings bitmap. * - * EXAMPLE: if (rot_has_set_level(my_rig, ROT_LEVEL_SPEED)) + * Checks if a rotator can *set* a level setting. Since \a level is an OR'ed + * bitwise argument, more than one level can be checked at the same time. * - * \return a bit map of supported level settings that can be set, - * otherwise 0 if none supported. + * EXAMPLE: + * \code + * if (rot_has_set_level(my_rot, ROT_LEVEL_SPEED)) + * my_set_speed(MEDIUM); + * \endcode * - * \sa rot_has_get_level(), rot_set_level() + * \note As this function is called by rot_set_level(), this may be considered + * a lower level API. + * + * \return A bit map of supported level settings that can be set, otherwise 0 + * if none supported or \a rot is NULL or inconsistent. + * + * \sa rot_set_level(), rot_has_get_level() */ setting_t HAMLIB_API rot_has_set_level(ROT *rot, setting_t level) { @@ -264,20 +305,28 @@ setting_t HAMLIB_API rot_has_set_level(ROT *rot, setting_t level) /** - * \brief check retrieval ability of parameter settings - * \param rig The rotator handle - * \param parm The parameter settings + * \brief Check which rotator parameter settings can be queried. * - * Checks if a rotator is capable of *getting* a parm setting. - * Since the \a parm is an OR'ed bitwise argument, more than - * one parameter can be checked at the same time. + * \param rot The #ROT handle. + * \param parm The parameter settings bitmap. * - * EXAMPLE: if (rot_has_get_parm(my_rig, ROT_PARM_NONE)) + * Checks if a rotator is capable of *getting* a parameter setting. Since + * \a parm is an OR'ed bitwise argument, more than one parameter can be + * checked at the same time. * - * \return a bit map of supported parameter settings that can be retrieved, - * otherwise 0 if none supported. + * EXAMPLE: + * \code + * if (rot_has_get_parm(my_rot, ROT_PARM_NONE)) + * my_get_parms(&parms); + * \endcode * - * \sa rot_has_set_parm(), rot_get_parm() + * \note As this function is called by rot_get_parm(), this may be considered + * a lower level API. + * + * \return A bit map of supported parameter settings that can be retrieved, + * otherwise 0 if none supported or \a rot is NULL or inconsistent. + * + * \sa rot_get_parm(), rot_has_set_parm() */ setting_t HAMLIB_API rot_has_get_parm(ROT *rot, setting_t parm) { @@ -293,20 +342,28 @@ setting_t HAMLIB_API rot_has_get_parm(ROT *rot, setting_t parm) /** - * \brief check settable ability of parameter settings - * \param rig The rotator handle - * \param parm The parameter settings + * \brief Query the rotator parameters that may be set. * - * Checks if a rotator can *set* a parameter setting. - * Since the \a parm is an OR'ed bitwise argument, more than - * one parameter can be check at the same time. + * \param rot The #ROT handle. + * \param parm The parameter settings bitmap. * - * EXAMPLE: if (rot_has_set_parm(my_rig, RIG_PARM_NONE)) + * Checks if a rotator can *set* a parameter setting. Since \a parm is an + * OR'ed bitwise argument, more than one parameter can be checked at the same + * time. * - * \return a bit map of supported parameter settings that can be set, - * otherwise 0 if none supported. + * EXAMPLE: + * \code + * if (rot_has_set_parm(my_rig, ROT_PARM_NONE)) + * my_set_parm(parameter); + * \endcode * - * \sa rot_has_get_parm(), rot_set_parm() + * \note As this function is called by rot_set_parm(), this may be considered + * a lower level API. + * + * \return A bit map of supported parameter settings that can be set, + * otherwise 0 if none supported or \a rot is NULL or inconsistent. + * + * \sa rot_set_parm(), rot_has_get_parm() */ setting_t HAMLIB_API rot_has_set_parm(ROT *rot, setting_t parm) { @@ -322,20 +379,27 @@ setting_t HAMLIB_API rot_has_set_parm(ROT *rot, setting_t parm) /** - * \brief check ability of rotator functions - * \param rig The rotator handle - * \param func The functions + * \brief Check which rotator functions can be queried. + * + * \param rot The #ROT handle. + * \param func The functions bitmap. + * + * Checks if a rotator supports a set of functions. Since \a func is an OR'ed + * bitwise argument, more than one function can be checked at the same time. * - * Checks if a rotator supports a set of functions. - * Since the \a func is an OR'ed bitwise argument, more than - * one function can be checked at the same time. + * EXAMPLE: + * \code + * if (rot_has_get_func(my_rig, RIG_FUNC_NONE)) + * do_something(); + * \endcode * - * EXAMPLE: if (rot_has_get_func(my_rig, RIG_FUNC_NONE)) + * \note As this function is called by rot_get_func(), this may be considered + * a lower level API. * - * \return a bit map of supported functions, - * otherwise 0 if none supported. + * \return A bit map of supported functions that can be retrieved, otherwise 0 + * if none supported or \a rot is NULL or inconsistent. * - * \sa rot_has_set_func(), rot_get_func() + * \sa rot_get_func(), rot_has_set_func() */ setting_t HAMLIB_API rot_has_get_func(ROT *rot, setting_t func) { @@ -352,18 +416,25 @@ setting_t HAMLIB_API rot_has_get_func(ROT *rot, setting_t func) /** - * \brief check ability of rotator functions - * \param rig The rotator handle - * \param func The functions + * \brief Query support of rotator functions. * - * Checks if a rotator supports a set of functions. - * Since the \a func is an OR'ed bitwise argument, more than - * one function can be checked at the same time. + * \param rot The #ROT handle. + * \param func The functions bitmap. * - * EXAMPLE: if (rot_has_set_func(my_rig, RIG_FUNC_NONE)) + * Checks if a rotator supports a set of functions. Since \a func is an OR'ed + * bitwise argument, more than one function can be checked at the same time. * - * \return a bit map of supported functions, - * otherwise 0 if none supported. + * EXAMPLE: + * \code + * if (rot_has_set_func(my_rig, RIG_FUNC_NONE)) + * do_this_func(my_func); + * \endcode + * + * \note As this function is called by rot_set_func(), this may be considered + * a lower level API. + * + * \return A bit map of supported functions that can be set, otherwise 0 if + * none supported or \a rot is NULL or inconsistent. * * \sa rot_set_func(), rot_has_get_func() */ @@ -381,19 +452,25 @@ setting_t HAMLIB_API rot_has_set_func(ROT *rot, setting_t func) /** - * \brief activate/de-activate functions of rotator - * \param rig The rotator handle - * \param func The function to activate - * \param status The status (on or off) to set to + * \brief Activate or deactivate functions of a rotator. + * + * \param rot The #ROT handle. + * \param func The function to activate or deactivate. + * \param status The status (On or Off) to set. + * + * Activate or deactivate a function of the rotator. * - * Activate/de-activate a function of the radio. + * The \a status argument is a value that is not NULL for "activate", + * "deactivate" otherwise, much as TRUE or FALSE boolean definitions in the C + * language. * - * The \a status argument is a non null value for "activate", - * "de-activate" otherwise, much as TRUE/FALSE definitions in C language. + * \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 The function was activated or deactivated successfully. + * \retval RIG_EINVAL \a rot is NULL or inconsistent. + * \retval RIG_ENAVAIL rot_caps#set_func() capability is not available or + * \a func is not supported. * * \sa rot_get_func() */ @@ -420,20 +497,24 @@ int HAMLIB_API rot_set_func(ROT *rot, setting_t func, int status) /** - * \brief get the status of functions of the rotator - * \param rig The rotator handle - * \param func The function to get the status - * \param status The location where to store the function status + * \brief Query the status of functions of the rotator. * - * Retrieves the status (on/off) of a function of the rotator. - * Upon return, \a status will hold the status of the function, - * The value pointer to by the \a status argument is a non null - * value for "on", "off" otherwise, much as TRUE/FALSE - * definitions in C language. + * \param rot The #ROT handle. + * \param func The function to query the status. + * \param status The variable to store the function status. * - * \return RIG_OK if the operation has been successful, otherwise - * a negative value if an error occurred (in which case, cause is - * set appropriately). + * Retrieves the status (On or Off) of a function of the rotator. Upon + * return, \a status will hold the status of the function. The value pointed + * to by the \a status argument is not NULL for "On", or "Off" otherwise, much + * as TRUE or FALSE boolean definitions in the C language. + * + * \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 function status was queried successfully. + * \retval RIG_EINVAL \a rot is NULL or inconsistent. + * \retval RIG_ENAVAIL rot_caps#get_func() capability is not available or + * \a func is not supported. * * \sa rot_set_func() */ @@ -461,16 +542,22 @@ int HAMLIB_API rot_get_func(ROT *rot, setting_t func, int *status) /** - * \brief set a rotator level extra parameter - * \param rig The rotator handle - * \param token The parameter - * \param val The value to set the parameter to + * \brief Set a rotator extension level to a given value. + * + * \param rot The #ROT handle. + * \param token The extension level token. + * \param val The value of the extension level. + * + * Set extension level \a token to \a val. + * + * \note \a val can be any type defined by #value_t. * - * Sets an level extra parameter. + * \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 The extension level was set successfully. + * \retval RIG_EINVAL \a rot is NULL or inconsistent. + * \retval RIG_ENAVAIL rot_caps#set_ext_level() capability is not available. * * \sa rot_get_ext_level() */ @@ -497,16 +584,20 @@ int HAMLIB_API rot_set_ext_level(ROT *rot, token_t token, value_t val) /** - * \brief get the value of a level extra parameter - * \param rig The rotator handle - * \param token The parameter - * \param val The location where to store the value of \a token + * \brief Query the value of a requested rotator extension level. * - * Retrieves the value of a level extra parameter associated with \a token. + * \param rot The #ROT handle. + * \param token The extension level token. + * \param val The location where to store the value of \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). + * Query the \a val corresponding to the extension level \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). + * + * \retval RIG_OK The extension level was queried successfully. + * \retval RIG_EINVAL \a rot is NULL or inconsistent. + * \retval RIG_ENAVAIL rot_caps#get_ext_level() capability is not available. * * \sa rot_set_ext_level() */ @@ -533,16 +624,24 @@ int HAMLIB_API rot_get_ext_level(ROT *rot, token_t token, value_t *val) /** - * \brief set a rotator function extra parameter - * \param rig The rotator handle - * \param token The parameter - * \param status The value to set the parameter to + * \brief Activate or deactivate extension functions of a rotator. + * + * \param rot The #ROT handle. + * \param token The extension function to activate or deactivate. + * \param status The status (On or Off) to set. + * + * Activate or deactivate an extension function of the rotator. * - * Sets a function extra parameter. + * The \a status argument is a value that is not NULL for "activate", + * "deactivate" otherwise, much as TRUE or FALSE boolean definitions in the C + * language. * - * \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 The extension function status was set successfully. + * \retval RIG_EINVAL \a rot is NULL or inconsistent. + * \retval RIG_ENAVAIL rot_caps#get_ext_func() capability is not available. * * \sa rot_get_ext_func() */ @@ -569,16 +668,24 @@ int HAMLIB_API rot_set_ext_func(ROT *rot, token_t token, int status) /** - * \brief get the value of a function extra parameter - * \param rig The rotator handle - * \param token The parameter - * \param status The location where to store the value of \a token + * \brief Query the status of extension functions of a rotator. + * + * \param rot The #ROT handle. + * \param token The extension function to query the status. + * \param status The variable to store the extension function status. + * + * Retrieves the status (On or Off) of an extension function of the rotator. + * Upon return, \a status will hold the status of the extension function. The + * value pointed to by the \a status argument is not NULL for "On", or "Off" + * otherwise, much as TRUE or FALSE boolean definitions in the C language. * - * Retrieves the value of a function extra 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 The extension function status was queried successfully. + * \retval RIG_EINVAL \a rot is NULL or inconsistent. + * \retval RIG_ENAVAIL rot_caps#get_ext_func() capability is not available or + * \a token is not supported. * * \sa rot_set_ext_func() */ @@ -605,16 +712,22 @@ int HAMLIB_API rot_get_ext_func(ROT *rot, token_t token, int *status) /** - * \brief set a rotator parm extra parameter - * \param rig The rotator handle - * \param token The parameter - * \param val The value to set the parameter to + * \brief Set a rotator extension parameter to a given value. + * + * \param rot The #ROT handle. + * \param token The extension parameter token. + * \param val The value of the extension parameter. + * + * Set an extension parameter \a token to \a val. * - * Sets an parm extra parameter. + * \note \a val can be any type defined by #value_t. * - * \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 The extension parameter was set successfully. + * \retval RIG_EINVAL \a rot is NULL or inconsistent. + * \retval RIG_ENAVAIL rot_caps#set_ext_parm() capability is not available. * * \sa rot_get_ext_parm() */ @@ -637,16 +750,22 @@ int HAMLIB_API rot_set_ext_parm(ROT *rot, token_t token, value_t val) /** - * \brief get the value of a parm extra parameter - * \param rig The rotator handle - * \param token The parameter - * \param val The location where to store the value of \a token + * \brief Query the value of a requested rotator extension parameter. + * + * \param rot The #ROT handle. + * \param token The extension parameter to query the status. + * \param val The variable to store the extension parameter status. + * + * Query the \a val corresponding to the extension parameter \a token. + * + * \note \a val can be any type defined by #value_t. * - * Retrieves the value of a parm extra 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 The extension parameter was queried successfully. + * \retval RIG_EINVAL \a rot is NULL or inconsistent. + * \retval RIG_ENAVAIL rot_caps#get_ext_parm() capability is not available. * * \sa rot_set_ext_parm() */ commit 74654e18778e8441789b14b429b2b94798cb4ff5 Merge: 4c8dc6e2 313e46ac Author: Mike Black W9MDB <mdb...@ya...> Date: Wed Apr 7 08:28:06 2021 -0500 Merge branch 'master' of https://github.com/Hamlib/Hamlib commit 4c8dc6e2451e9ef5d793c14294d73237ca136b73 Author: Mike Black W9MDB <mdb...@ya...> Date: Wed Apr 7 08:26:18 2021 -0500 Fix flrig vfo inaccessible in flrig_set_split_freq_mode https://github.com/Hamlib/Hamlib/issues/651 diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index a63c94c9..ed6ee2a0 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -145,7 +145,7 @@ const struct rig_caps flrig_caps = RIG_MODEL(RIG_MODEL_FLRIG), .model_name = "FLRig", .mfg_name = "FLRig", - .version = "20210403", + .version = "20210407", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -1955,11 +1955,7 @@ static int flrig_set_split_freq_mode(RIG *rig, vfo_t vfo, freq_t freq, ENTERFUNC; - if (vfo != RIG_VFO_CURR && vfo != RIG_VFO_TX) - { - RETURNFUNC(-RIG_ENTARGET); - } - + // we alway do split on VFOB retval = flrig_set_freq(rig, RIG_VFO_B, freq); if (retval != RIG_OK) commit 313e46acf307396901899eb8d9ec450296851eb5 Merge: bddf8684 87ae220a Author: Michael Black <mdb...@ya...> Date: Wed Apr 7 07:37:04 2021 -0500 Merge pull request #649 from mdblack98/master Update build-w64-jtsdk.sh commit 87ae220a1a1ca10824c537fd43a0b5a992fc86e7 Author: Mike Black W9MDB <mdb...@ya...> Date: Wed Apr 7 00:02:54 2021 -0500 Update build-w64-jtsdk.sh diff --git a/scripts/build-w64-jtsdk.sh b/scripts/build-w64-jtsdk.sh index c57a1f74..ddef2ea5 100755 --- a/scripts/build-w64-jtsdk.sh +++ b/scripts/build-w64-jtsdk.sh @@ -14,7 +14,11 @@ export PATH=$PATH:$GCCD_F:. # Set this to a desired directory -BUILD_DIR=~/builds +if [[ -z "${BUILD_BASE_DIR}" ]]; then + BUILD_DIR=~/builds +else + BUILD_DIR=~/${BUILD_BASE_DIR} +fi # Set this to LibUSB archive extracted in $BUILD_DIR LIBUSB_VER=libusb-1.0.24 @@ -233,7 +237,7 @@ END_OF_README LDFLAGS="-L${libusb_dir_f}/MinGW64/dll" -make -j 4 install +make -j ${CPUS} install mkdir -p ${ZIP_DIR}/bin ${ZIP_DIR}/lib/msvc ${ZIP_DIR}/lib/gcc ${ZIP_DIR}/include ${ZIP_DIR}/doc cp -a src/libhamlib.def ${ZIP_DIR}/lib/msvc/libhamlib-4.def commit bddf8684143aeebc3bfcf7f4939e9ec64a6ee621 Author: Mike Black W9MDB <mdb...@ya...> Date: Tue Apr 6 17:38:59 2021 -0500 Make Malachite do 2-freq set all the time -- seems to work well https://github.com/Hamlib/Hamlib/issues/645 diff --git a/rigs/kenwood/ts480.c b/rigs/kenwood/ts480.c index 457233d7..893b2d8c 100644 --- a/rigs/kenwood/ts480.c +++ b/rigs/kenwood/ts480.c @@ -948,15 +948,13 @@ int malachite_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { int retval; - // Malachite has bug on VHF and up where it takes two freq set to make it work - if (freq > 100e6) - { - retval = kenwood_set_freq(rig, vfo, freq + 1); + // Malachite has a bug where it takes two freq set to make it work + // under some band changes -- so we just do this all the time + retval = kenwood_set_freq(rig, vfo, freq + 1); - if (retval != RIG_OK) { RETURNFUNC(retval); } + if (retval != RIG_OK) { RETURNFUNC(retval); } - retval = kenwood_set_freq(rig, vfo, freq); - } + retval = kenwood_set_freq(rig, vfo, freq); RETURNFUNC(retval); } commit 993a3162fd0f5f49f66af986202a4876388e2890 Author: Mike Black W9MDB <mdb...@ya...> Date: Tue Apr 6 17:13:14 2021 -0500 Fix FTDX101 and FT9000 RFPOWER_METER_WATTS https://github.com/Hamlib/Hamlib/issues/641 diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 8c601c8a..8ed66d2d 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -4569,12 +4569,6 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) { snprintf(priv->cmd_str, sizeof(priv->cmd_str), "RM08%c", cat_term); } - - if (is_ftdx101d || is_ftdx101mp) - { - // separate meters for Main and Sub - snprintf(priv->cmd_str, sizeof(priv->cmd_str), "RM0%c", cat_term); - } else { snprintf(priv->cmd_str, sizeof(priv->cmd_str), "RM5%c", cat_term); diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h index 3c7b5e38..e9598c3e 100644 --- a/rigs/yaesu/newcat.h +++ b/rigs/yaesu/newcat.h @@ -50,7 +50,7 @@ typedef char ncboolean; /* shared function version */ -#define NEWCAT_VER "20210330" +#define NEWCAT_VER "20210406" /* Hopefully large enough for future use, 128 chars plus '\0' */ #define NEWCAT_DATA_LEN 129 commit 03b69afee667e9bfad14c93c3679c8ecc7ae4a25 Author: Mike Black W9MDB <mdb...@ya...> Date: Tue Apr 6 16:47:02 2021 -0500 Update NEWS for 4.2 release diff --git a/NEWS b/NEWS index ca7ea694..fede7ed1 100644 --- a/NEWS +++ b/NEWS @@ -7,10 +7,8 @@ Copyright (C) 2000-2021 Michael Black W9MDB, and others Please send Hamlib bug reports to ham...@li... Version 4.2 - * 2021-04-?? -- anticipated release date + * 2021-04-06 * Added Malachite SDR - * Frequency and PTT are now validated -- may solve some random problems - ** where freq and ptt get stuck or not changed * Major rework for PRM80 * Add twiddle_timeout and twiddle_rit --set-conf options rigctld --set-conf=twiddle_timeout=5,twiddle_rit=1 @@ -18,8 +16,6 @@ Version 4.2 For twiddle timeout VFOB will not be polled for 5 seconds after VFO twiddling is detected rigctld --twiddle is deprecated and will be removed in 5.0 along with get_twiddle and set_twiddle -Version 4.2 - Version 4.1 2021-01-31 * rigctld and rigs should be more robust for disconnect problems commit 72161dd316d99aa92aebb4139ebc6935386b963c Author: Mike Black W9MDB <mdb...@ya...> Date: Tue Apr 6 16:14:36 2021 -0500 https://github.com/Hamlib/Hamlib/issues/645 diff --git a/rigs/kenwood/ts480.c b/rigs/kenwood/ts480.c index 136cce32..457233d7 100644 --- a/rigs/kenwood/ts480.c +++ b/rigs/kenwood/ts480.c @@ -944,6 +944,23 @@ int malachite_init(RIG *rig) RETURNFUNC(RIG_OK); } +int malachite_set_freq(RIG *rig, vfo_t vfo, freq_t freq) +{ + int retval; + + // Malachite has bug on VHF and up where it takes two freq set to make it work + if (freq > 100e6) + { + retval = kenwood_set_freq(rig, vfo, freq + 1); + + if (retval != RIG_OK) { RETURNFUNC(retval); } + + retval = kenwood_set_freq(rig, vfo, freq); + } + + RETURNFUNC(retval); +} + /* * Malachite SDR rig capabilities. * Notice that some rigs share the same functions. @@ -986,12 +1003,12 @@ const struct rig_caps malachite_caps = .rig_init = malachite_init, .rig_open = kenwood_open, .rig_cleanup = kenwood_cleanup, - .set_freq = kenwood_set_freq, + .set_freq = malachite_set_freq, .get_freq = kenwood_get_freq, .set_mode = kenwood_set_mode, .get_mode = kenwood_get_mode, .set_vfo = kenwood_set_vfo, // Malachite only supports VFOA - .get_vfo = kenwood_get_vfo_if, + .get_vfo = kenwood_get_vfo_if, .set_powerstat = kenwood_set_powerstat, .get_powerstat = kenwood_get_powerstat, }; commit 0981fa630d3dac9854f35e5256ce835f284bdb08 Author: Mike Black W9MDB <mdb...@ya...> Date: Tue Apr 6 11:40:02 2021 -0500 astyle files diff --git a/src/rig.c b/src/rig.c index 872760bd..95c6688c 100644 --- a/src/rig.c +++ b/src/rig.c @@ -6003,9 +6003,13 @@ int HAMLIB_API rig_get_vfo_info(RIG *rig, vfo_t vfo, freq_t *freq, if (retval != RIG_OK) { RETURNFUNC(retval); } // we will ask for other vfo mode just once if not targetable - int allTheTimeA = vfo & (RIG_VFO_A | RIG_VFO_CURR | RIG_VFO_MAIN_A | RIG_VFO_SUB_A); - int allTheTimeB = (vfo &(RIG_VFO_B | RIG_VFO_SUB)) && (rig->caps->targetable_vfo & RIG_TARGETABLE_MODE); - int justOnceB = (vfo &(RIG_VFO_B | RIG_VFO_SUB)) && (rig->state.cache.modeMainB == RIG_MODE_NONE); + int allTheTimeA = vfo & (RIG_VFO_A | RIG_VFO_CURR | RIG_VFO_MAIN_A | + RIG_VFO_SUB_A); + int allTheTimeB = (vfo & (RIG_VFO_B | RIG_VFO_SUB)) + && (rig->caps->targetable_vfo & RIG_TARGETABLE_MODE); + int justOnceB = (vfo & (RIG_VFO_B | RIG_VFO_SUB)) + && (rig->state.cache.modeMainB == RIG_MODE_NONE); + if (allTheTimeA || allTheTimeB || justOnceB) { retval = rig_get_mode(rig, vfo, mode, width); commit c02b079fb3de17e766399cfc82daae096f646751 Author: Mike Black W9MDB <mdb...@ya...> Date: Tue Apr 6 10:45:18 2021 -0500 Update timeout values based on testing with Malchite SDR https://github.com/Hamlib/Hamlib/issues/645 diff --git a/rigs/dummy/netrigctl.c b/rigs/dummy/netrigctl.c index 08758db6..5d37ed83 100644 --- a/rigs/dummy/netrigctl.c +++ b/rigs/dummy/netrigctl.c @@ -2296,7 +2296,7 @@ struct rig_caps netrigctl_caps = .ptt_type = RIG_PTT_RIG_MICDATA, .dcd_type = RIG_DCD_RIG, .port_type = RIG_PORT_NETWORK, - .timeout = 1000, /* enough for the worst rig we have */ + .timeout = 3000, /* enough for the worst rig we have */ .retry = 5, /* 5 seconds total */ /* following fields updated in rig_state at opening time */ diff --git a/rigs/kenwood/ts480.c b/rigs/kenwood/ts480.c index 5f251858..136cce32 100644 --- a/rigs/kenwood/ts480.c +++ b/rigs/kenwood/ts480.c @@ -961,14 +961,14 @@ const struct rig_caps malachite_caps = .ptt_type = RIG_PTT_NONE, .port_type = RIG_PORT_SERIAL, .serial_rate_min = 4800, - .serial_rate_max = 115200, + .serial_rate_max = 38400, .serial_data_bits = 8, .serial_stop_bits = 1, .serial_parity = RIG_PARITY_NONE, .serial_handshake = RIG_HANDSHAKE_NONE, .write_delay = 0, - .post_write_delay = 0, - .timeout = 200, + .post_write_delay = 400, + .timeout = 3000, .retry = 3, .preamp = {0, RIG_DBLST_END,}, .attenuator = {0, RIG_DBLST_END,}, @@ -978,7 +978,8 @@ const struct rig_caps malachite_caps = .rx_range_list1 = { - {kHz(100), GHz(1), TS480_ALL_MODES, -1, -1, RIG_VFO_A, RIG_ANT_CURR, "Generic" }, + {kHz(50), MHz(250), TS480_ALL_MODES, -1, -1, RIG_VFO_A, RIG_ANT_CURR, "Generic" }, + {MHz(400), GHz(2), TS480_ALL_MODES, -1, -1, RIG_VFO_A, RIG_ANT_CURR, "Generic" }, RIG_FRNG_END, }, .priv = (void *)& ts480_priv_caps, commit aa1972fb5d794184bf852b2cbf6ac5da73fc2a88 Author: Mike Black W9MDB <mdb...@ya...> Date: Tue Apr 6 09:47:31 2021 -0500 Show match when rig model is recognized in kenwood.c diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index 9eedbfd8..8e3d674f 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -911,6 +911,7 @@ int kenwood_open(RIG *rig) int retval; split_t split; vfo_t tx_vfo; + rig_debug(RIG_DEBUG_VERBOSE, "%s: found the right driver for %s(%d)\n", __func__, rig->caps->model_name, rig->caps->rig_model); /* get current AI state so it can be restored */ kenwood_get_trn(rig, &priv->trn_state); /* ignore errors */ commit 124a6faafd0c545fd7ec9a20bf6a582968d4c769 Author: Mike Black W9MDB <mdb...@ya...> Date: Tue Apr 6 09:38:36 2021 -0500 More Malachite updates https://github.com/Hamlib/Hamlib/issues/645 diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index 704d3a9a..9eedbfd8 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -131,6 +131,7 @@ static const struct kenwood_id_string kenwood_id_string_list[] = { RIG_MODEL_THF6A, "TH-F6" }, { RIG_MODEL_THF7E, "TH-F7" }, { RIG_MODEL_THG71, "TH-G71" }, + { RIG_MODEL_MALACHITE, "020" }, { RIG_MODEL_NONE, NULL }, /* end marker */ }; @@ -867,7 +868,7 @@ int kenwood_open(RIG *rig) id); // Malachite SDR gives no reponse to ID and is supposed to be TS480 compatible - if (RIG_IS_TS480) { strcpy(id, "ID020"); } + if (RIG_IS_MALACHITE) { strcpy(id, "ID020"); } } diff --git a/rigs/kenwood/kenwood.h b/rigs/kenwood/kenwood.h index fda7d0d4..fc2e7654 100644 --- a/rigs/kenwood/kenwood.h +++ b/rigs/kenwood/kenwood.h @@ -104,6 +104,7 @@ extern const struct confparams kenwood_cfg_params[]; #define RIG_IS_XG3 (rig->caps->rig_model == RIG_MODEL_XG3) #define RIG_IS_PT8000A (rig->caps->rig_model == RIG_MODEL_PT8000A) #define RIG_IS_POWERSDR (rig->caps->rig_model == RIG_MODEL_POWERSDR) +#define RIG_IS_MALACHITE (rig->caps->rig_model == RIG_MODEL_MALACHITE) struct kenwood_priv_caps { commit 8d95db88d41bd5daa4c7b1174b5780b77a4408cb Author: Mike Black W9MDB <mdb...@ya...> Date: Tue Apr 6 09:12:20 2021 -0500 More Malachite updates https://github.com/Hamlib/Hamlib/issues/645 diff --git a/rigs/kenwood/ts480.c b/rigs/kenwood/ts480.c index 97bd2ebc..5f251858 100644 --- a/rigs/kenwood/ts480.c +++ b/rigs/kenwood/ts480.c @@ -978,7 +978,7 @@ const struct rig_caps malachite_caps = .rx_range_list1 = { - {kHz(100), GHz(1), TS480_ALL_MODES, -1, -1, RIG_VFO_A}, + {kHz(100), GHz(1), TS480_ALL_MODES, -1, -1, RIG_VFO_A, RIG_ANT_CURR, "Generic" }, RIG_FRNG_END, }, .priv = (void *)& ts480_priv_caps, commit eb0f5961042606ed143f219ff9e3d5cfc90d0c5f Author: Mike Black W9MDB <mdb...@ya...> Date: Tue Apr 6 09:07:42 2021 -0500 More Malachite updates https://github.com/Hamlib/Hamlib/issues/645 diff --git a/rigs/kenwood/ts480.c b/rigs/kenwood/ts480.c index 4d6a9759..97bd2ebc 100644 --- a/rigs/kenwood/ts480.c +++ b/rigs/kenwood/ts480.c @@ -969,9 +969,9 @@ const struct rig_caps malachite_caps = .write_delay = 0, .post_write_delay = 0, .timeout = 200, - .retry = 10, - .preamp = {12, RIG_DBLST_END,}, - .attenuator = {12, RIG_DBLST_END,}, + .retry = 3, + .preamp = {0, RIG_DBLST_END,}, + .attenuator = {0, RIG_DBLST_END,}, .max_ifshift = Hz(0), .targetable_vfo = RIG_TARGETABLE_FREQ, .transceive = RIG_TRN_POLL, @@ -987,33 +987,11 @@ const struct rig_caps malachite_caps = .rig_cleanup = kenwood_cleanup, .set_freq = kenwood_set_freq, .get_freq = kenwood_get_freq, - .set_rit = kenwood_set_rit, /* FIXME should this switch to rit mode or just set the frequency? */ - .get_rit = kenwood_get_rit, - .set_xit = kenwood_set_xit, /* FIXME should this switch to xit mode or just set the frequency? */ - .get_xit = kenwood_get_xit, .set_mode = kenwood_set_mode, .get_mode = kenwood_get_mode, - .set_vfo = kenwood_set_vfo, // Malachite does not support any VFOS - .get_vfo = kenwood_get_vfo_if, // Malachite does not support ant VFOS -// .set_split_vfo = kenwood_set_split_vfo, -// .get_split_vfo = kenwood_get_split_vfo_if, -// .get_ptt = kenwood_get_ptt, -// .set_ptt = kenwood_set_ptt, - .get_dcd = kenwood_get_dcd, + .set_vfo = kenwood_set_vfo, // Malachite only supports VFOA + .get_vfo = kenwood_get_vfo_if, .set_powerstat = kenwood_set_powerstat, .get_powerstat = kenwood_get_powerstat, - .get_info = kenwood_ts480_get_info, -// .reset = kenwood_reset, -// .set_ant = kenwood_set_ant, -// .get_ant = kenwood_get_ant, -// .scan = kenwood_scan, /* not working, invalid arguments using rigctl; kenwood_scan does only support on/off and not tone and CTCSS scan */ -// .has_set_level = TS480_LEVEL_ALL, -// .has_get_level = TS480_LEVEL_ALL, -// .set_level = kenwood_ts480_set_level, -// .get_level = kenwood_ts480_get_level, -// .has_get_func = TS480_FUNC_ALL, -// .has_set_func = TS480_FUNC_ALL, -// .set_func = kenwood_set_func, -// .get_func = kenwood_get_func, }; commit 623287aa02823bf900b9ac7b7d94c6f84529d0a8 Author: Mike Black W9MDB <mdb...@ya...> Date: Tue Apr 6 08:54:53 2021 -0500 Updates for Malchite SDR https://github.com/Hamlib/Hamlib/issues/645 diff --git a/rigs/kenwood/ts480.c b/rigs/kenwood/ts480.c index 8d8a4342..4d6a9759 100644 --- a/rigs/kenwood/ts480.c +++ b/rigs/kenwood/ts480.c @@ -995,25 +995,25 @@ const struct rig_caps malachite_caps = .get_mode = kenwood_get_mode, .set_vfo = kenwood_set_vfo, // Malachite does not support any VFOS .get_vfo = kenwood_get_vfo_if, // Malachite does not support ant VFOS - .set_split_vfo = kenwood_set_split_vfo, - .get_split_vfo = kenwood_get_split_vfo_if, - .get_ptt = kenwood_get_ptt, - .set_ptt = kenwood_set_ptt, +// .set_split_vfo = kenwood_set_split_vfo, +// .get_split_vfo = kenwood_get_split_vfo_if, +// .get_ptt = kenwood_get_ptt, +// .set_ptt = kenwood_set_ptt, .get_dcd = kenwood_get_dcd, .set_powerstat = kenwood_set_powerstat, .get_powerstat = kenwood_get_powerstat, .get_info = kenwood_ts480_get_info, - .reset = kenwood_reset, - .set_ant = kenwood_set_ant, - .get_ant = kenwood_get_ant, - .scan = kenwood_scan, /* not working, invalid arguments using rigctl; kenwood_scan does only support on/off and not tone and CTCSS scan */ - .has_set_level = TS480_LEVEL_ALL, - .has_get_level = TS480_LEVEL_ALL, - .set_level = kenwood_ts480_set_level, - .get_level = kenwood_ts480_get_level, - .has_get_func = TS480_FUNC_ALL, - .has_set_func = TS480_FUNC_ALL, - .set_func = kenwood_set_func, - .get_func = kenwood_get_func, +// .reset = kenwood_reset, +// .set_ant = kenwood_set_ant, +// .get_ant = kenwood_get_ant, +// .scan = kenwood_scan, /* not working, invalid arguments using rigctl; kenwood_scan does only support on/off and not tone and CTCSS scan */ +// .has_set_level = TS480_LEVEL_ALL, +// .has_get_level = TS480_LEVEL_ALL, +// .set_level = kenwood_ts480_set_level, +// .get_level = kenwood_ts480_get_level, +// .has_get_func = TS480_FUNC_ALL, +// .has_set_func = TS480_FUNC_ALL, +// .set_func = kenwood_set_func, +// .get_func = kenwood_get_func, }; commit 4c2f60b9b0e03bb83e36b4e4a8f2dc0e1b580e95 Author: Mike Black W9MDB <mdb...@ya...> Date: Tue Apr 6 08:46:49 2021 -0500 Fix no_id check in kenwood.c for Malchite SDR https://github.com/Hamlib/Hamlib/issues/645 diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index a925becf..704d3a9a 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -334,7 +334,7 @@ transaction_write: if (retval == RIG_OK && strncmp(cmdstr, "RX", 2) == 0) { goto transaction_quit; } // Malachite SDR cannot send ID after FA - if (priv->no_id) { RETURNFUNC(RIG_OK); } + if (!datasize && priv->no_id) { RETURNFUNC(RIG_OK); } if (!datasize) { diff --git a/rigs/kenwood/kenwood.h b/rigs/kenwood/kenwood.h index 1aa8f855..fda7d0d4 100644 --- a/rigs/kenwood/kenwood.h +++ b/rigs/kenwood/kenwood.h @@ -28,7 +28,7 @@ #include "token.h" #include "misc.h" -#define BACKEND_VER "20210404" +#define BACKEND_VER "20210406" #define EOM_KEN ';' #define EOM_TH '\r' diff --git a/rigs/kenwood/ts480.c b/rigs/kenwood/ts480.c index 8597d99f..8d8a4342 100644 --- a/rigs/kenwood/ts480.c +++ b/rigs/kenwood/ts480.c @@ -955,13 +955,10 @@ const struct rig_caps malachite_caps = .model_name = "DSP", .mfg_name = "Malachite", .version = BACKEND_VER ".0", - .mfg_name = "Malachite", - .version = BACKEND_VER ".0", .copyright = "LGPL", .status = RIG_STATUS_STABLE, - .rig_type = RIG_TYPE_TRANSCEIVER, - .ptt_type = RIG_PTT_RIG_MICDATA, - .dcd_type = RIG_DCD_RIG, + .rig_type = RIG_TYPE_RECEIVER, + .ptt_type = RIG_PTT_NONE, .port_type = RIG_PORT_SERIAL, .serial_rate_min = 4800, .serial_rate_max = 115200, @@ -975,92 +972,14 @@ const struct rig_caps malachite_caps = .retry = 10, .preamp = {12, RIG_DBLST_END,}, .attenuator = {12, RIG_DBLST_END,}, - .max_rit = kHz(9.99), - .max_xit = kHz(9.99), .max_ifshift = Hz(0), .targetable_vfo = RIG_TARGETABLE_FREQ, - .transceive = RIG_TRN_RIG, + .transceive = RIG_TRN_POLL, .rx_range_list1 = { - {kHz(100), Hz(59999999), TS480_ALL_MODES, -1, -1, TS480_VFO}, + {kHz(100), GHz(1), TS480_ALL_MODES, -1, -1, RIG_VFO_A}, RIG_FRNG_END, - }, /*!< Receive frequency range list for ITU region 1 */ - .tx_range_list1 = { - {kHz(1810), kHz(1850), TS480_OTHER_TX_MODES, 5000, 100000, TS480_VFO}, /* 100W class */ - {kHz(1810), kHz(1850), TS480_AM_TX_MODES, 5000, 25000, TS480_VFO}, /* 25W class */ - {kHz(3500), kHz(3800), TS480_OTHER_TX_MODES, 5000, 100000, TS480_VFO}, - {kHz(3500), kHz(3800), TS480_AM_TX_MODES, 5000, 25000, TS480_VFO}, - {MHz(7), kHz(7200), TS480_OTHER_TX_MODES, 5000, 100000, TS480_VFO}, - {MHz(7), kHz(7200), TS480_AM_TX_MODES, 5000, 25000, TS480_VFO}, - {kHz(10100), kHz(10150), TS480_OTHER_TX_MODES, 5000, 100000, TS480_VFO}, - {kHz(10100), kHz(10150), TS480_AM_TX_MODES, 5000, 25000, TS480_VFO}, - {MHz(14), kHz(14350), TS480_OTHER_TX_MODES, 5000, 100000, TS480_VFO}, - {MHz(14), kHz(14350), TS480_AM_TX_MODES, 5000, 25000, TS480_VFO}, - {kHz(18068), kHz(18168), TS480_OTHER_TX_MODES, 5000, 100000, TS480_VFO}, - {kHz(18068), kHz(18168), TS480_AM_TX_MODES, 5000, 25000, TS480_VFO}, - {MHz(21), kHz(21450), TS480_OTHER_TX_MODES, 5000, 100000, TS480_VFO}, - {MHz(21), kHz(21450), TS480_AM_TX_MODES, 5000, 25000, TS480_VFO}, - {kHz(24890), kHz(24990), TS480_OTHER_TX_MODES, 5000, 100000, TS480_VFO}, - {kHz(24890), kHz(24990), TS480_AM_TX_MODES, 5000, 25000, TS480_VFO}, - {MHz(28), kHz(29700), TS480_OTHER_TX_MODES, 5000, 100000, TS480_VFO}, - {MHz(28), kHz(29700), TS480_AM_TX_MODES, 5000, 25000, TS480_VFO}, - {MHz(50), kHz(52000), TS480_OTHER_TX_MODES, 5000, 100000, TS480_VFO}, - {MHz(50), kHz(52000), TS480_AM_TX_MODES, 5000, 25000, TS480_VFO}, - RIG_FRNG_END, - }, /*!< Transmit frequency range list for ITU region 1 */ - .rx_range_list2 = { - {kHz(100), Hz(59999999), TS480_ALL_MODES, -1, -1, TS480_VFO}, - RIG_FRNG_END, - }, /*!< Receive frequency range list for ITU region 2 */ - .tx_range_list2 = { - {kHz(1800), MHz(2) - 1, TS480_OTHER_TX_MODES, 5000, 100000, TS480_VFO}, /* 100W class */ - {kHz(1800), MHz(2) - 1, TS480_AM_TX_MODES, 5000, 25000, TS480_VFO}, /* 25W class */ - {kHz(3500), MHz(4) - 1, TS480_OTHER_TX_MODES, 5000, 100000, TS480_VFO}, - {kHz(3500), MHz(4) - 1, TS480_AM_TX_MODES, 5000, 25000, TS480_VFO}, - {kHz(5250), kHz(5450), TS480_OTHER_TX_MODES, 5000, 100000, TS480_VFO}, - {kHz(5250), kHz(5450), TS480_AM_TX_MODES, 5000, 25000, TS480_VFO}, - {MHz(7), kHz(7300), TS480_OTHER_TX_MODES, 5000, 100000, TS480_VFO}, - {MHz(7), kHz(7300), TS480_AM_TX_MODES, 5000, 25000, TS480_VFO}, - {kHz(10100), kHz(10150), TS480_OTHER_TX_MODES, 5000, 100000, TS480_VFO}, - {MHz(14), kHz(14350), TS480_AM_TX_MODES, 5000, 25000, TS480_VFO}, - {kHz(18068), kHz(18168), TS480_OTHER_TX_MODES, 5000, 100000, TS480_VFO}, - {kHz(18068), kHz(18168), TS480_AM_TX_MODES, 5000, 25000, TS480_VFO}, - {MHz(21), kHz(21450), TS480_OTHER_TX_MODES, 5000, 100000, TS480_VFO}, - {MHz(21), kHz(21450), TS480_AM_TX_MODES, 5000, 25000, TS480_VFO}, - {kHz(24890), kHz(24990), TS480_OTHER_TX_MODES, 5000, 100000, TS480_VFO}, - {kHz(24890), kHz(24990), TS480_AM_TX_MODES, 5000, 25000, TS480_VFO}, - {MHz(28), kHz(29700), TS480_OTHER_TX_MODES, 5000, 100000, TS480_VFO}, - {MHz(28), kHz(29700), TS480_AM_TX_MODES, 5000, 25000, TS480_VFO}, - {MHz(50), kHz(52000), TS480_OTHER_TX_MODES, 5000, 100000, TS480_VFO}, - {MHz(50), kHz(52000), TS480_AM_TX_MODES, 5000, 25000, TS480_VFO}, - RIG_FRNG_END, - }, /*!< Transmit frequency range list for ITU region 2 */ - .tuning_steps = { - {TS480_ALL_MODES, kHz(1)}, - {TS480_ALL_MODES, Hz(2500)}, - {TS480_ALL_MODES, kHz(5)}, - {TS480_ALL_MODES, Hz(6250)}, - {TS480_ALL_MODES, kHz(10)}, - {TS480_ALL_MODES, Hz(12500)}, - {TS480_ALL_MODES, kHz(15)}, - {TS480_ALL_MODES, kHz(20)}, - {TS480_ALL_MODES, kHz(25)}, - {TS480_ALL_MODES, kHz(30)}, - {TS480_ALL_MODES, kHz(100)}, - {TS480_ALL_MODES, kHz(500)}, - {TS480_ALL_MODES, MHz(1)}, - {TS480_ALL_MODES, 0}, /* any tuning step */ - RIG_TS_END, - }, - /* mode/filter list, remember: order matters! */ - .filters = { - {RIG_MODE_SSB, kHz(2.4)}, - {RIG_MODE_CW, Hz(200)}, - {RIG_MODE_RTTY, Hz(500)}, - {RIG_MODE_AM, kHz(9)}, - {RIG_MODE_FM, kHz(14)}, - RIG_FLT_END, }, .priv = (void *)& ts480_priv_caps, .rig_init = malachite_init, @@ -1074,8 +993,8 @@ const struct rig_caps malachite_caps = .get_xit = kenwood_get_xit, .set_mode = kenwood_set_mode, .get_mode = kenwood_get_mode, -// .set_vfo = kenwood_set_vfo, // Malachite does not support any VFOS -// .get_vfo = kenwood_get_vfo_if, // Malachite does not support ant VFOS + .set_vfo = kenwood_set_vfo, // Malachite does not support any VFOS + .get_vfo = kenwood_get_vfo_if, // Malachite does not support ant VFOS .set_split_vfo = kenwood_set_split_vfo, .get_split_vfo = kenwood_get_split_vfo_if, .get_ptt = kenwood_get_ptt, commit f8c4f80fd64a8dfc1a16d23ab4fb5d41fb8cc9f7 Author: Mike Black W9MDB <mdb...@ya...> Date: Tue Apr 6 07:22:28 2021 -0500 Add C++11 check to ampclass.h diff --git a/include/hamlib/ampclass.h b/include/hamlib/ampclass.h index a626ef21..69a9617c 100644 --- a/include/hamlib/ampclass.h +++ b/include/hamlib/ampclass.h @@ -38,10 +38,12 @@ public: virtual ~Amplifier(); +#if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201103L) || __cplusplus >= 201103L) Amplifier(const Amplifier&) = default; Amplifier(Amplifier&&) = default; Amplifier& operator=(const Amplifier&) = default; Amplifier& operator=(Amplifier&&) = default; +#endif const struct amp_caps *caps; commit c25e8f9e5b5652ee18bd0c653b31d868dac06e0d Author: Mike Black W9MDB <mdb...@ya...> Date: Tue Apr 6 07:22:19 2021 -0500 Add TX/RX VFOs to dummy.c diff --git a/rigs/dummy/dummy.c b/rigs/dummy/dummy.c index 1bc0a4ce..a7c65380 100644 --- a/rigs/dummy/dummy.c +++ b/rigs/dummy/dummy.c @@ -2080,7 +2080,7 @@ static int dummy_mW2power(RIG *rig, float *power, unsigned int mwpower, #define DUMMY_VFO_OP 0x7ffffffUL /* All possible VFO OPs */ #define DUMMY_SCAN 0x7ffffffUL /* All possible scan OPs */ -#define DUMMY_VFOS (RIG_VFO_A|RIG_VFO_B|RIG_VFO_C|RIG_VFO_MEM|RIG_VFO_MAIN|RIG_VFO_SUB|RIG_VFO_MAIN_A|RIG_VFO_MAIN_B|RIG_VFO_SUB_A|RIG_VFO_SUB_B) +#define DUMMY_VFOS (RIG_VFO_TX|RIG_VFO_TX|RIG_VFO_A|RIG_VFO_B|RIG_VFO_C|RIG_VFO_MEM|RIG_VFO_MAIN|RIG_VFO_SUB|RIG_VFO_MAIN_A|RIG_VFO_MAIN_B|RIG_VFO_SUB_A|RIG_VFO_SUB_B) #define DUMMY_MODES (RIG_MODE_AM | RIG_MODE_CW | RIG_MODE_RTTY | \ RIG_MODE_SSB | RIG_MODE_FM | RIG_MODE_WFM | \ commit 502c... [truncated message content] |