[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 6d3046e0122a349d0cb18
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Nate B. <n0...@us...> - 2021-09-10 19:29:43
|
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 6d3046e0122a349d0cb1823041c20e3bbbaa0215 (commit) via 5db5c47ce26252743ed72e4937be922a79a1bff8 (commit) via e881993433d8eb48b217ff4c1110689ee330090d (commit) via fe2f24cba3a87e3436937812158516e79c220aa0 (commit) via 720f8fa86ea04c1f849c7f19870ceda0b97a3a6e (commit) via 3edc59dbd2ce7ecd0eb47a6673b73df71fad13a5 (commit) via d6c1c4ec78f1f627911632dd1e584bf56094f90f (commit) via 9134fa55c99a30c624e5c0b13a40b7622cd6aba4 (commit) via 998e19bdd4a3c1c94d0b974a3b03268ac0d547fd (commit) via 3e1b06432bd27fc26b41d030a8631ae85ee7e2fb (commit) via 037db1379bb34d8c92b1ca9d5754bb689d274dda (commit) via f064241c64cd72e045aed5f8e2b48f439a63fc4d (commit) via f2c60aa33adfe5051b403e76efd4420c3f25cfdf (commit) via e900b4f9dc7e6c9328d6726f1d66152595d6e2bc (commit) via 4679d0f2ef34d2e8600cb861ce5a024e09766803 (commit) via c53a288cd8e7b920cc3fbbf97ef5500371f9b218 (commit) via cd194b64502a0f23ee5ac98a3510e9a07569f95f (commit) via c7dbbfbc323ae53a6498e01a49ce58a6211fc885 (commit) via b06a3c1714b416c0d5eca2000ae9ea785ffaa5d5 (commit) via 5aa1572a304fc894fc436277a6f8dc2062944012 (commit) via 6f02f38fdc752270b7cac6311bc8434d0d624600 (commit) via 49b2eca6c1d355ce15e15c897e6ef241c989f9e2 (commit) via e9d32ed6c9390ac6151cd11259b31f39bd5d9bb0 (commit) via 187dcff6c5d2d8261584322fdaaeaae9182c8413 (commit) via 4cf092fc0bdf77365e0df1aa77a1f7e5fe59db97 (commit) via 83b887ca8c4450f3bcc330e2f22d2ab6b5570ba1 (commit) via 53035454f241ded78231275de73dd1b2379ad88d (commit) via 775fc832f6dab9b55f6b101411408b68de93a723 (commit) via 12889cd95711fcff392d62b17f557b52d8f9d4e7 (commit) via e825e5b4c994ba70721bf731d9ef052820d5c3c5 (commit) via d6350d1f0f9b3a2a7d36ace5ee70d6ff44fc6945 (commit) via 0e67bcd1fc55c9af2149588dbc290975a48ab493 (commit) via 99b7a2da24dca2fd3bbec4f0957feceff5552d0b (commit) via 731eb39df84dca6d2e6b7b7686d34a38f89b0487 (commit) via e78a8258ce2ebe86dd1494067524e4059ed9f314 (commit) via 9162127e9c719b61d95fc26a948b56ee1b84ed52 (commit) via b6837801a65591dcc9ed64701b5cfd174ffeb7cc (commit) via 287e79d31895b18a7457397be841971a58537def (commit) via 5a8922b5b54d17502afb3185fdcdf22b7d94390e (commit) via f196d14b8449db864f88e81159a41c9f8f93ba8c (commit) via 3cdf09388fca2cc06ac575a0f457de3c129e2461 (commit) via 9dce7680d086b8f1e2771c888b7283c0f84d9b54 (commit) via 4c62b3d2bee00b8c5248269441a1eaa753fd371c (commit) via 44157ad114db04767f2cf0756d3568f04660a3d8 (commit) via 32de5c34854b0d382159a09ff54ffa406be9e9af (commit) via d48f1aed426b8c2b7215eef23a1b6cc685988038 (commit) via 20221524f89a30a0faff30572fd8af5284b795c1 (commit) via ecf53e22efca028da46a9963365fdf5e53e5127f (commit) via e16a77aaa66a71ee948788278bbfbb08e040eb18 (commit) via 39d3c2f6818c6e2c208b55b3b1afe13623899f6d (commit) via 970dff70a3538fbf25500e3e4be4a3784a60bb01 (commit) via 95a737ea56fd5da65af86b261d0fed6253b99952 (commit) via 76b3f6196cbc2de246a7897f00b581f4b8b760fd (commit) via 7b6105720288b6495fcf99680845b135b0ff08ea (commit) via 8092588d97ee165db9b6e9dc81cda6d5e4f8622f (commit) via 21038df9f6c6eb1ca5a7c84731bd2347232ce8e1 (commit) via a0e692006f197ee3495d1c915e1b2844902ea8fe (commit) via fe46bcf540c31755c4f6e2a90049196050e1d056 (commit) via 72099a63ce52794309d228ecbfb3fb6493d06bc5 (commit) via 623bef2f61a6624f02bf9ff8dcb15c0e1f275d19 (commit) via 32460321ab1be1bcab8072acc6abde5e3905b69d (commit) via fa4fa7a1d937efcaa8d7507d5955db5d7919313b (commit) via 124e2c30c7673a312fb60195f8d1dc806dee72e7 (commit) via c04c4cbd2ae0b006b79b7fb84675807e0d173abf (commit) via 83590a0868e23cd3ba7f377fc26cd5ba7c97a44d (commit) via d5028e7ba4c346b41f41bf6e2c4b0546bf3339c6 (commit) via 31696351a9660899bb68311ad6602e64cfd1628c (commit) via fcdacb254037ec0423295fced437a8e4d1e5175b (commit) via 3dde32f53499050486d44e1283d5ca8e36342ed6 (commit) via 6a9432a0c7edc56aac7c7ccd11e10b7059a443a4 (commit) via 1c7b4ab80674ba981b56ea2d4d086fead1b1e1da (commit) via eecffd31be0b072a121f20aca9ea1d4bbc20866b (commit) via a851da80e210564f077aa6366c07c2be760e5004 (commit) via aedcc4191c56ae61c5f8f840accf2a8fb38aebfc (commit) via 9b650f9dc533d90b39d5c4a6dc57cb58adbe68f4 (commit) via 9c44e29ec697a62d52b70eeb8ebec8f4eb6f29b9 (commit) via c823564a2af6755f5a524003a0786442878451af (commit) via 49c7e09142db692693f68d2d959465a8d3a438d8 (commit) via 49240c9846c9d4c730e9cbe154ec07a496c4ec7d (commit) via 5a2cbdda219107e97971fdc21297005e34ce0f1c (commit) via dd6224bc5b322592d6db4551523b972b3861d801 (commit) via 19c5e3e0a73c761e3bdd4f2009354661876ea67d (commit) via 82b0a8a84ebcbd3d5c5b0acd29d0cc9e252ef839 (commit) via 2fb5343cc17c1354e77fe6b6ca1fee953471abda (commit) via 617a38ff45c160950491ca3cc7ba5ff8a3a3b3b6 (commit) via c9860abe9f59b3a541cd3bb50693260c02332586 (commit) via f85cb7cb809d1b337ee2728832da0a7a9b12d06f (commit) via a305b4f205f6a33f36d0b5f518351d60d881ddd2 (commit) via bfd08203626fd6af5f42e22c1533a47a55697c07 (commit) via 447fda06813e82db5549018e286fb9da2d62c8ca (commit) via 4c371ca40acffa8cc7df498cac870fcd1d983d09 (commit) via 9311519461aeb32f6ea6526d8ec2c7edcb2eb3bd (commit) via 18bbd6b7a790d595760706749ed6c326b57cba0d (commit) via 61020e950cc3b979630dca8be4bab4ca8003a3da (commit) via d97eba3c7046ce743ae61965c49c3b26fb6fc676 (commit) via 012b939a197eda184beae6b6ba93fdbdeda3f69a (commit) via 5ece51ef2f30bebf9c1f40e2303a190a04c1ee5f (commit) via 78160a1bf6d9d0493514dc9092e2dd0859740f6f (commit) via 9849a1bcaf438c08ac0ea31cad825b9157f80f0c (commit) via cb9ea39c660d8a9c5a74f389ba252976dcc7d5c6 (commit) via 3fabc0b50384c17ce56f2662e4c2587aca5ed7a2 (commit) via b2560982fe8ccfeefe656773d62df7863440b560 (commit) via 36b42332778ef3398dd08a6c237544c1ff385480 (commit) via 181571a9709475b7be4f37160c67a5f23da1bddb (commit) via 724891246af901b76adca5b84a6a21b849754a29 (commit) via 908b18246e5a0020ca49717f2887e28c616b72bd (commit) via 356f23b0fbe2c996738cd0cc641133a7324d1e74 (commit) via 67181bf7c9fa942ae2c5dd61810b2f6584328349 (commit) via 6cb90f5260de62234a6e4358d256120113b110dd (commit) via 2e48c2470b28abb105f2cf9a38fc230c15f98982 (commit) via 9c75ab3d40a9a4677e0d15b24acce28af2fb9b31 (commit) via 67597b50c7949ad7f013e8d4d994715391500ef0 (commit) via d59d75c20a4ca851d50d1d879640867ec03fbdc7 (commit) via 72de08b3e074f971d4c7ff439c8d62e6f0464bac (commit) via e0f468d2c61bffb3adbdc641a020a95abc0c3e38 (commit) via 06327322efe20e47730357a00e53f4ca769539c5 (commit) via 12b4dda856217cc60c6b392d4c5274a91e398198 (commit) via c95adac2b1f3d7404cd4d2c551440b32333609e9 (commit) via c5bc57b719d01734525e198b0a424ed479301af4 (commit) via 0ebf99742e91e1ff17f88003bf78bee25355bae1 (commit) via 06f471d5c880eeb6783595dcbb8304a7b32e3903 (commit) via 2bfd09e59386305024a08653e8d91ffb6f022d88 (commit) from d1c824be5ca38efd9ca68e2ef5febe567cb2f686 (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 6d3046e0122a349d0cb1823041c20e3bbbaa0215 Merge: 5db5c47c fe2f24cb Author: Michael Black <mdb...@ya...> Date: Fri Sep 10 05:48:01 2021 -0500 Merge pull request #793 from wutje/improve_doc Improve doc commit 5db5c47ce26252743ed72e4937be922a79a1bff8 Author: Mike Black W9MDB <mdb...@ya...> Date: Fri Sep 10 05:46:13 2021 -0500 Fix rigctl send_morse command when in vfo mode diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 4d350be3..4d5580da 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -321,7 +321,7 @@ static struct test_table test_list[] = { '*', "reset", ACTION(reset), ARG_IN, "Reset" }, { 'w', "send_cmd", ACTION(send_cmd), ARG_IN1 | ARG_IN_LINE | ARG_OUT2 | ARG_NOVFO, "Cmd", "Reply" }, { 'W', "send_cmd_rx", ACTION(send_cmd), ARG_IN | ARG_OUT2 | ARG_NOVFO, "Cmd", "Reply"}, - { 'b', "send_morse", ACTION(send_morse), ARG_IN | ARG_IN_LINE, "Morse" }, + { 'b', "send_morse", ACTION(send_morse), ARG_IN | ARG_NOVFO | ARG_IN_LINE, "Morse" }, { 0xbb, "stop_morse", ACTION(stop_morse), }, { 0xbc, "wait_morse", ACTION(wait_morse), }, { 0x94, "send_voice_mem", ACTION(send_voice_mem), ARG_IN, "Voice Mem#" }, commit e881993433d8eb48b217ff4c1110689ee330090d Author: Mike Black W9MDB <mdb...@ya...> Date: Fri Sep 10 05:36:42 2021 -0500 Fix segfault in kenwood_set_vfo https://github.com/Hamlib/Hamlib/issues/794 diff --git a/Segfault-award b/Segfault-award index f80986d0..db4d10af 100644 --- a/Segfault-award +++ b/Segfault-award @@ -25,3 +25,7 @@ Here is the list of the brave fellows: * Chuck Ritola fclose of fsockin or fsockout when null https://github.com/Hamlib/Hamlib/issues/757 + +* John Nelson G4KLA 09/2021 + kenwood_set_vfo + https://github.com/Hamlib/Hamlib/issues/794 diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index a03a8ea6..7b5ef5ec 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -1053,7 +1053,7 @@ int kenwood_get_if(RIG *rig) */ int kenwood_set_vfo(RIG *rig, vfo_t vfo) { - char cmdbuf[6]; + char cmdbuf[12]; int retval; char vfo_function; struct kenwood_priv_data *priv = rig->state.priv; @@ -1231,7 +1231,7 @@ int kenwood_get_vfo_main_sub(RIG *rig, vfo_t *vfo) int kenwood_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t txvfo) { struct kenwood_priv_data *priv = rig->state.priv; - char cmdbuf[6]; + char cmdbuf[12]; int retval; unsigned char vfo_function; commit fe2f24cba3a87e3436937812158516e79c220aa0 Author: Wouter van Gulik <pa...@gm...> Date: Thu Sep 9 22:47:57 2021 +0200 Make make_crc_table and gen_crc static. diff --git a/src/rig.c b/src/rig.c index 31c45ed0..aeae9f2a 100644 --- a/src/rig.c +++ b/src/rig.c @@ -6484,7 +6484,7 @@ const char *HAMLIB_API rig_get_info(RIG *rig) } -void make_crc_table(unsigned long crcTable[]) +static void make_crc_table(unsigned long crcTable[]) { unsigned long POLYNOMIAL = 0xEDB88320; unsigned long remainder; @@ -6516,7 +6516,7 @@ void make_crc_table(unsigned long crcTable[]) static unsigned long crcTable[256]; -unsigned long gen_crc(unsigned char *p, size_t n) +static unsigned long gen_crc(unsigned char *p, size_t n) { unsigned long crc = 0xfffffffful; size_t i; commit 720f8fa86ea04c1f849c7f19870ceda0b97a3a6e Author: Wouter van Gulik <pa...@gm...> Date: Thu Sep 9 22:42:55 2021 +0200 Fix documentation for get_info. Memory is not allocated! Prevent users from trying to free it. diff --git a/src/rig.c b/src/rig.c index a8e3d339..31c45ed0 100644 --- a/src/rig.c +++ b/src/rig.c @@ -6463,9 +6463,9 @@ int HAMLIB_API rig_set_vfo_opt(RIG *rig, int status) * Retrieves some general information from the radio. * This can include firmware revision, exact model name, or just nothing. * - * \return a pointer to freshly allocated memory containing the ASCIIZ string + * \return a pointer to memory containing the ASCIIZ string * if the operation has been successful, otherwise NULL if an error occurred - * or get_info not part of capabilities. + * or if get_info is not part of the capabilities. */ const char *HAMLIB_API rig_get_info(RIG *rig) { commit 3edc59dbd2ce7ecd0eb47a6673b73df71fad13a5 Author: Wouter van Gulik <pa...@gm...> Date: Thu Sep 9 22:36:43 2021 +0200 Add documentation for rig_get_cache. Note that it misses all sanity check on the input, but at least that is now documented. Made rig_check_rig_caps and twiddling static, they are not exported but Doxygen includes all globally visible function. diff --git a/src/rig.c b/src/rig.c index 842720f3..a8e3d339 100644 --- a/src/rig.c +++ b/src/rig.c @@ -329,7 +329,7 @@ void *caps_test_macro_name = &caps_test.macro_name; // check and show WARN if rig_caps structure doesn't match // this tests for shared library incompatibility -int rig_check_rig_caps() +static int rig_check_rig_caps() { int rc = RIG_OK; @@ -1580,6 +1580,25 @@ static int set_cache_freq(RIG *rig, vfo_t vfo, freq_t freq) return RIG_OK; } +/** + * \brief get cached values for a VFO + * \param rig The rig handle + * \param vfo The VFO to get information from + * \param freq The frequency is stored here + * \param cache_ms_freq The age of the last frequency update in ms + * \param mode The mode is stored here + * \param cache_ms_mode The age of the last mode update in ms + * \param width The width is stored here + * \param cache_ms_width The age of the last width update in ms + * + * Use this to query the cache and then determine to actually fetch data from + * the rig. + * + * \note All pointers must be given. No pointer can be left at NULL + * + * \return RIG_OK + * + */ int rig_get_cache(RIG *rig, vfo_t vfo, freq_t *freq, int *cache_ms_freq, rmode_t *mode, int *cache_ms_mode, pbwidth_t *width, int *cache_ms_width) { @@ -1708,7 +1727,7 @@ int rig_get_cache(RIG *rig, vfo_t vfo, freq_t *freq, int *cache_ms_freq, // detect if somebody is twiddling the VFO // indicator is last set freq doesn't match current freq // so we have to query freq every time we set freq or vfo to handle this -int twiddling(RIG *rig) +static int twiddling(RIG *rig) { const struct rig_caps *caps; commit d6c1c4ec78f1f627911632dd1e584bf56094f90f Author: Wouter van Gulik <pa...@gm...> Date: Thu Sep 9 22:15:16 2021 +0200 rig.c/rig_reset Make defines a link in the documentation diff --git a/src/rig.c b/src/rig.c index 5c0b6da8..842720f3 100644 --- a/src/rig.c +++ b/src/rig.c @@ -5623,7 +5623,7 @@ int HAMLIB_API rig_get_powerstat(RIG *rig, powerstat_t *status) * \param reset The reset operation to perform * * Resets the radio. - * See RIG_RESET_NONE, RIG_RESET_SOFT and RIG_RESET_MCALL defines + * See #RIG_RESET_NONE, #RIG_RESET_SOFT and #RIG_RESET_MCALL defines * for the \a reset. * * \return RIG_OK if the operation has been successful, otherwise commit 9134fa55c99a30c624e5c0b13a40b7622cd6aba4 Author: Wouter van Gulik <pa...@gm...> Date: Wed Sep 8 22:57:04 2021 +0200 rig.c: Fix Doxygen for rigerror diff --git a/src/rig.c b/src/rig.c index e4b4ad8d..5c0b6da8 100644 --- a/src/rig.c +++ b/src/rig.c @@ -286,6 +286,10 @@ int foreach_opened_rig(int (*cfunc)(RIG *, rig_ptr_t), rig_ptr_t data) #endif /* !DOC_HIDDEN */ +char debugmsgsave[DEBUGMSGSAVE_SIZE] = "No message"; +char debugmsgsave2[DEBUGMSGSAVE_SIZE] = "No message"; +char debugmsgsave3[DEBUGMSGSAVE_SIZE] = "No message"; + /** * \brief get string describing the error code * \param errnum The error code @@ -297,10 +301,6 @@ int foreach_opened_rig(int (*cfunc)(RIG *, rig_ptr_t), rig_ptr_t data) * * \todo support gettext/localization */ -char debugmsgsave[DEBUGMSGSAVE_SIZE] = "No message"; -char debugmsgsave2[DEBUGMSGSAVE_SIZE] = "No message"; -char debugmsgsave3[DEBUGMSGSAVE_SIZE] = "No message"; - const char *HAMLIB_API rigerror(int errnum) { errnum = abs(errnum); commit 998e19bdd4a3c1c94d0b974a3b03268ac0d547fd Author: Wouter van Gulik <pa...@gm...> Date: Wed Sep 8 22:45:36 2021 +0200 Fix Doxygen in rig.c. Commit c5c60f0 also touched Doxygen comments which was not intended. It replaced \return with \RETURNFUNC. Breaking Doxygen. diff --git a/src/rig.c b/src/rig.c index 1898aef4..e4b4ad8d 100644 --- a/src/rig.c +++ b/src/rig.c @@ -663,7 +663,7 @@ RIG *HAMLIB_API rig_init(rig_model_t rig_model) * Opens communication to a radio which \a RIG handle has been passed * by argument. * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -1110,7 +1110,7 @@ int HAMLIB_API rig_open(RIG *rig) * Closes communication to a radio which \a RIG handle has been passed * by argument that was previously open with rig_open(). * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -1288,7 +1288,7 @@ int HAMLIB_API rig_close(RIG *rig) * Releases a rig struct which port has eventually been closed already * with rig_close(). * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -1332,7 +1332,7 @@ int HAMLIB_API rig_cleanup(RIG *rig) * timeout seconds to stop rigctld when VFO is manually changed * turns on/off the radio. * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -1357,7 +1357,7 @@ int HAMLIB_API rig_set_twiddle(RIG *rig, int seconds) * \param rig The rig handle * \param seconds 1=Ignore Sub, 2=Ignore Main * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -1383,7 +1383,7 @@ int HAMLIB_API rig_set_uplink(RIG *rig, int val) * \param rig The rig handle * \param seconds The timeout value * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -1764,7 +1764,7 @@ int twiddling(RIG *rig) * * Sets the frequency of the target VFO. * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -1965,7 +1965,7 @@ int HAMLIB_API rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq) * The value stored at \a freq location equals RIG_FREQ_NONE when the current * frequency of the VFO is not defined (e.g. blank memory). * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -2183,7 +2183,7 @@ int HAMLIB_API rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) * The value stored at \a freq location equals RIG_FREQ_NONE when the current * frequency of the VFO is not defined (e.g. blank memory). * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -2211,7 +2211,7 @@ int HAMLIB_API rig_get_freqs(RIG *rig, freq_t *freqA, freq_t freqB) * unchanged from the current value or default for the mode determined * by the rig. * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -2310,7 +2310,7 @@ int HAMLIB_API rig_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) * Note that if either \a mode or \a width is NULL, -RIG_EINVAL is returned. * Both must be given even if only one is actually wanted. * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -2596,7 +2596,7 @@ pbwidth_t HAMLIB_API rig_passband_wide(RIG *rig, rmode_t mode) * for VFOA, VFOB, VFOC respectively or RIG_VFO_MEM for Memory mode. * Supported VFOs depends on rig capabilities. * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -2738,7 +2738,7 @@ int HAMLIB_API rig_set_vfo(RIG *rig, vfo_t vfo) * for VFOA, VFOB, VFOC respectively or RIG_VFO_MEM for Memory mode. * Supported VFOs depends on rig capabilities. * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -2818,7 +2818,7 @@ int HAMLIB_API rig_get_vfo(RIG *rig, vfo_t *vfo) * * Sets "Push-To-Talk" on/off. * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -3103,7 +3103,7 @@ int HAMLIB_API rig_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) * * Retrieves the status of PTT (are we on the air?). * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -3375,7 +3375,7 @@ int HAMLIB_API rig_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) * * Retrieves the status of DCD (is squelch open?). * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -3489,7 +3489,7 @@ int HAMLIB_API rig_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd) * * Sets the current repeater shift. * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -3560,7 +3560,7 @@ int HAMLIB_API rig_set_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift) * * Retrieves the current repeater shift. * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -3636,7 +3636,7 @@ int HAMLIB_API rig_get_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift) * * Sets the current repeater offset. * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -3706,7 +3706,7 @@ int HAMLIB_API rig_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t rptr_offs) * * Retrieves the current repeater offset. * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -3781,7 +3781,7 @@ int HAMLIB_API rig_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *rptr_offs) * * Sets the split(TX) frequency. * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -3932,7 +3932,7 @@ int HAMLIB_API rig_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) * * Retrieves the current split(TX) frequency. * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -4081,7 +4081,7 @@ int HAMLIB_API rig_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq) * * Sets the split(TX) mode. * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -4211,7 +4211,7 @@ int HAMLIB_API rig_set_split_mode(RIG *rig, * The value stored at \a tx_mode location equals RIG_MODE_NONE * when the current mode of the VFO is not defined (e.g. blank memory). * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -4345,7 +4345,7 @@ int HAMLIB_API rig_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode, * the rig VFOs have to be exchanged or swapped to complete this * combined function. * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -4460,7 +4460,7 @@ int HAMLIB_API rig_set_split_freq_mode(RIG *rig, * the rig VFOs have to be exchanged or swapped to complete this * combined function. * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -4518,7 +4518,7 @@ int HAMLIB_API rig_get_split_freq_mode(RIG *rig, * * Sets the current split mode. * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -4643,7 +4643,7 @@ int HAMLIB_API rig_set_split_vfo(RIG *rig, * * Retrieves the current split mode. * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -4775,7 +4775,7 @@ int HAMLIB_API rig_get_split_vfo(RIG *rig, * * Sets the current RIT offset. A value of 0 for \a rit disables RIT. * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -4846,7 +4846,7 @@ int HAMLIB_API rig_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit) * * Retrieves the current RIT offset. * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -4923,7 +4923,7 @@ int HAMLIB_API rig_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit) * * Sets the current XIT offset. A value of 0 for \a xit disables XIT. * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -4994,7 +4994,7 @@ int HAMLIB_API rig_set_xit(RIG *rig, vfo_t vfo, shortfreq_t xit) * * Retrieves the current XIT offset. * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -5071,7 +5071,7 @@ int HAMLIB_API rig_get_xit(RIG *rig, vfo_t vfo, shortfreq_t *xit) * * Sets the Tuning Step. * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -5142,7 +5142,7 @@ int HAMLIB_API rig_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts) * * Retrieves the current tuning step. * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -5223,7 +5223,7 @@ int HAMLIB_API rig_get_ts(RIG *rig, vfo_t vfo, shortfreq_t *ts) rig_set_ant(rig, RIG_VFO_RX, RIG_ANT_2); \endcode * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -5394,7 +5394,7 @@ int HAMLIB_API rig_get_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t *option, * also provided since the relative power is peculiar to a specific * freq and mode range of the radio. * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -5450,7 +5450,7 @@ int HAMLIB_API rig_power2mW(RIG *rig, * also provided since the relative power is peculiar to a specific * freq and mode range of the radio. * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -5547,7 +5547,7 @@ shortfreq_t HAMLIB_API rig_get_resolution(RIG *rig, rmode_t mode) * See #RIG_POWER_ON, #RIG_POWER_OFF and #RIG_POWER_STANDBY defines * for the \a status. * - * \RETURNFUNC(RIG_OK) if the operation has been successful, ortherwise + * \return RIG_OK if the operation has been successful, ortherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -5584,7 +5584,7 @@ int HAMLIB_API rig_set_powerstat(RIG *rig, powerstat_t status) * Retrieve the status of the radio. See RIG_POWER_ON, RIG_POWER_OFF and * RIG_POWER_STANDBY defines for the \a status. * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -5626,7 +5626,7 @@ int HAMLIB_API rig_get_powerstat(RIG *rig, powerstat_t *status) * See RIG_RESET_NONE, RIG_RESET_SOFT and RIG_RESET_MCALL defines * for the \a reset. * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -5701,7 +5701,7 @@ rig_model_t HAMLIB_API rig_probe(hamlib_port_t *port) * \warning this is really Experimental, It has been tested only * with IC-706MkIIG. any feedback welcome! --SF * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). */ @@ -5761,7 +5761,7 @@ vfo_op_t HAMLIB_API rig_has_vfo_op(RIG *rig, vfo_op_t op) * Performs Memory/VFO operation. * See #vfo_op_t for more information. * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -5865,7 +5865,7 @@ scan_t HAMLIB_API rig_has_scan(RIG *rig, scan_t scan) * Performs scanning operation. * See #scan_t for more information. * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -5937,7 +5937,7 @@ int HAMLIB_API rig_scan(RIG *rig, vfo_t vfo, scan_t scan, int ch) * Sends DTMF digits. * See DTMF change speed, etc. (TODO). * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -6013,7 +6013,7 @@ int HAMLIB_API rig_send_dtmf(RIG *rig, vfo_t vfo, const char *digits) * Receives DTMF digits (not blocking). * See DTMF change speed, etc. (TODO). * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -6088,7 +6088,7 @@ int HAMLIB_API rig_recv_dtmf(RIG *rig, vfo_t vfo, char *digits, int *length) * Sends morse message. * See keyer change speed, etc. (TODO). * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -6160,7 +6160,7 @@ int HAMLIB_API rig_send_morse(RIG *rig, vfo_t vfo, const char *msg) * * Stops the send morse message. * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -6258,7 +6258,7 @@ static int wait_morse_ptt(RIG *rig, vfo_t vfo) * * waits for the end of the morse message to be sent. * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -6315,7 +6315,7 @@ int HAMLIB_API rig_wait_morse(RIG *rig, vfo_t vfo) * * Sends voice memory content. * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is * set appropriately). * @@ -6599,7 +6599,7 @@ int HAMLIB_API rig_get_rig_info(RIG *rig, char *response, int max_response_len) * for VFOA, VFOB, VFOC respectively or RIG_VFO_MEM for Memory mode. * Supported VFOs depends on rig capabilities. * - * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise + * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case use rigerror(return) * for error message). * commit 3e1b06432bd27fc26b41d030a8631ae85ee7e2fb Author: Wouter van Gulik <pa...@gm...> Date: Wed Sep 8 22:35:14 2021 +0200 scripts: Update example in readme, since 4.0 817 is 1020 diff --git a/scripts/build-w32.sh b/scripts/build-w32.sh index 0f60eedc..aa8ad55b 100755 --- a/scripts/build-w32.sh +++ b/scripts/build-w32.sh @@ -129,9 +129,9 @@ directory. In short, the command syntax is of the form: - rigctl -m 120 -r COM1 -vvvvv + rigctl -m 1020 -r COM1 -vvvvv - -m -> Radio model 120, or Yaesu FT-817 (use 'rigctl -l' for a list) + -m -> Radio model 1020, or Yaesu FT-817 (use 'rigctl -l' for a list) -r -> Radio device, in this case COM1 -v -> Verbosity level. For testing four or five v characters are required. Five 'v's set a debug level of TRACE which generates a lot of screen diff --git a/scripts/build-w64-jtsdk.sh b/scripts/build-w64-jtsdk.sh index 9b07c0f7..af6e4c6b 100755 --- a/scripts/build-w64-jtsdk.sh +++ b/scripts/build-w64-jtsdk.sh @@ -139,9 +139,9 @@ directory. In short, the command syntax is of the form: - rigctl -m 120 -r COM1 -vvvvv + rigctl -m 1020 -r COM1 -vvvvv - -m -> Radio model 120, or Yaesu FT-817 (use 'rigctl -l' for a list) + -m -> Radio model 1020, or Yaesu FT-817 (use 'rigctl -l' for a list) -r -> Radio device, in this case COM1 -v -> Verbosity level. For testing four or five v characters are required. Five 'v's set a debug level of TRACE which generates a lot of screen diff --git a/scripts/build-w64.sh b/scripts/build-w64.sh index 9567414e..c2433578 100755 --- a/scripts/build-w64.sh +++ b/scripts/build-w64.sh @@ -129,9 +129,9 @@ directory. In short, the command syntax is of the form: - rigctl -m 120 -r COM1 -vvvvv + rigctl -m 1020 -r COM1 -vvvvv - -m -> Radio model 120, or Yaesu FT-817 (use 'rigctl -l' for a list) + -m -> Radio model 1020, or Yaesu FT-817 (use 'rigctl -l' for a list) -r -> Radio device, in this case COM1 -v -> Verbosity level. For testing four or five v characters are required. Five 'v's set a debug level of TRACE which generates a lot of screen commit 037db1379bb34d8c92b1ca9d5754bb689d274dda Author: Mike Black W9MDB <mdb...@ya...> Date: Tue Sep 7 23:01:57 2021 -0500 Update NEWS diff --git a/NEWS b/NEWS index d2e2d8cc..57f1e974 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,7 @@ Please send Hamlib bug reports to ham...@li... Version 4.4 * 2021-??-?? + * Icom rigs now default filter 2 when setting PKTUSB but user can override Version 4.3 * 2021-09-01 commit f064241c64cd72e045aed5f8e2b48f439a63fc4d Author: Mike Black W9MDB <mdb...@ya...> Date: Tue Sep 7 22:37:35 2021 -0500 Update testlibusb.c warning to "may be" instead of "will be" diff --git a/tests/testlibusb.c b/tests/testlibusb.c index f01369a8..660420ec 100644 --- a/tests/testlibusb.c +++ b/tests/testlibusb.c @@ -343,7 +343,7 @@ static int test_wrapped_device(const char *device_name) return 0; } #else -#warning LIBUSB-1.0.23 will be required in Hamlib > 4.3 +#warning LIBUSB-1.0.23 may be required in Hamlib > 4.3 static int test_wrapped_device(const char *device_name) { (void)device_name; commit f2c60aa33adfe5051b403e76efd4420c3f25cfdf Author: Mike Black W9MDB <mdb...@ya...> Date: Tue Sep 7 17:52:44 2021 -0500 Since Icom rigs default to filter 2 if a filter is not selected we will do the same when turning on data mode https://github.com/Hamlib/Hamlib/issues/791 diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index c316515e..d889ca57 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -1883,12 +1883,12 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode, case RIG_MODE_PKTFM: case RIG_MODE_PKTAM: datamode[0] = 0x01; - datamode[1] = 0x01; // default to filter 1 + datamode[1] = 0x02; // default to filter 2 break; default: datamode[0] = 0x00; - datamode[1] = 0x01; // default to filter 1 + datamode[1] = 0x02; // default to filter 2 break; } commit e900b4f9dc7e6c9328d6726f1d66152595d6e2bc Author: Mike Black W9MDB <mdb...@ya...> Date: Tue Sep 7 17:44:57 2021 -0500 Change set_icom_set_mode_with_data to not change mode unless necessary Should allow filters to stay where they are set if USB-D is the starting mode https://github.com/Hamlib/Hamlib/issues/791 diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 7d1d7eb9..c316515e 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -1790,6 +1790,8 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode, unsigned char ackbuf[MAXFRAMELEN]; int ack_len = sizeof(ackbuf); rmode_t icom_mode; + rmode_t tmode; + pbwidth_t twidth; //struct icom_priv_data *priv = (struct icom_priv_data *) rig->state.priv; unsigned char dm_sub_cmd = rig->caps->rig_model == RIG_MODEL_IC7200 ? 0x04 : S_MEM_DATA_MODE; @@ -1807,6 +1809,23 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode, ENTERFUNC; + // if our current mode and width is not changing do nothing + retval = rig_get_mode(rig, vfo, &tmode, &twidth); + + if (retval != RIG_OK) + { + rig_debug(RIG_DEBUG_ERR, "%s: get_mode failed: %s\n", __func__, + rigerror(retval)); + RETURNFUNC(retval); + } + + if (tmode == mode && width == RIG_PASSBAND_NOCHANGE) + { + rig_debug(RIG_DEBUG_TRACE, "%s: mode/width not changing\n", __func__); + RETURNFUNC(RIG_OK); + } + // looks like we need to change it + switch (mode) { diff --git a/rigs/icom/icom.h b/rigs/icom/icom.h index 6c6e3d42..96637003 100644 --- a/rigs/icom/icom.h +++ b/rigs/icom/icom.h @@ -30,7 +30,7 @@ #include <sys/time.h> #endif -#define BACKEND_VER "20210901" +#define BACKEND_VER "20210907" #define ICOM_IS_SECONDARY_VFO(vfo) ((vfo) & (RIG_VFO_B | RIG_VFO_SUB | RIG_VFO_SUB_B | RIG_VFO_MAIN_B)) #define ICOM_GET_VFO_NUMBER(vfo) (ICOM_IS_SECONDARY_VFO(vfo) ? 0x01 : 0x00) commit 4679d0f2ef34d2e8600cb861ce5a024e09766803 Author: Mike Black W9MDB <mdb...@ya...> Date: Tue Sep 7 07:03:53 2021 -0500 Make testlibusb.c compatible with libusb < 1.0.23 diff --git a/tests/testlibusb.c b/tests/testlibusb.c index b1a92c9d..f01369a8 100644 --- a/tests/testlibusb.c +++ b/tests/testlibusb.c @@ -218,7 +218,10 @@ static void print_device(libusb_device *dev, libusb_device_handle *handle) case LIBUSB_SPEED_SUPER: speed = "5G"; break; +#if defined(LIBUSB_API_VERSION) && (LIBUSB_API_VERSION >= 0x01000107) + case LIBUSB_SPEED_SUPER_PLUS: speed = "10G"; break; +#endif default: speed = "Unknown"; } commit c53a288cd8e7b920cc3fbbf97ef5500371f9b218 Author: Mike Black W9MDB <mdb...@ya...> Date: Mon Sep 6 07:41:33 2021 -0500 Add debug to show vfofixup being skipped due to satmode rig diff --git a/src/rig.c b/src/rig.c index bec62059..1898aef4 100644 --- a/src/rig.c +++ b/src/rig.c @@ -4549,8 +4549,12 @@ int HAMLIB_API rig_set_split_vfo(RIG *rig, RETURNFUNC(-RIG_ENAVAIL); } - // We fix up vfos for non-satmode rigs - if (!(rig->caps->has_get_func & RIG_FUNC_SATMODE)) + // We fix up vfos for non-satmode rigs only + if (rig->caps->has_get_func & RIG_FUNC_SATMODE) + { + rig_debug(RIG_DEBUG_TRACE, "%s: satmode rig...not fixing up vfos rx=%s tx=%s\n", __func__, rig_strvfo(rx_vfo), rig_strvfo(tx_vfo)); + } + else { rx_vfo = vfo_fixup(rig, rx_vfo, split); tx_vfo = vfo_fixup(rig, tx_vfo, split); commit cd194b64502a0f23ee5ac98a3510e9a07569f95f Merge: e9d32ed6 c7dbbfbc Author: Mike Black W9MDB <mdb...@ya...> Date: Sat Sep 4 16:53:02 2021 -0500 Merge branch 'master' of https://github.com/Hamlib/Hamlib commit c7dbbfbc323ae53a6498e01a49ce58a6211fc885 Merge: 187dcff6 b06a3c17 Author: Michael Black <mdb...@ya...> Date: Sat Sep 4 16:52:40 2021 -0500 Merge pull request #788 from wutje/ft817_improvements FT817: add get_ant. Add SWR level. Fix ALC, PWR commit b06a3c1714b416c0d5eca2000ae9ea785ffaa5d5 Merge: 5aa1572a 187dcff6 Author: Wouter van Gulik <pa...@gm...> Date: Sat Sep 4 23:16:18 2021 +0200 Merge branch 'master' into ft817_improvements diff --cc rigs/yaesu/ft897.c index 310080eb,4c4772ef..7952a71e --- a/rigs/yaesu/ft897.c +++ b/rigs/yaesu/ft897.c @@@ -75,7 -75,7 +75,8 @@@ #include "serial.h" #include "yaesu.h" #include "ft897.h" +#include "ft817.h" /* We use functions from the 817 code */ + #include "ft857.h" //Needed for ft857_set_vfo, ft857_get_vfo #include "misc.h" #include "tones.h" #include "bandplan.h" commit 5aa1572a304fc894fc436277a6f8dc2062944012 Merge: 6f02f38f d1c824be Author: Wouter van Gulik <pa...@gm...> Date: Sat Sep 4 23:08:48 2021 +0200 Merge branch 'master' into ft817_improvements diff --cc rigs/yaesu/ft817.c index 7e3619ac,73d67fd1..6fc58d71 --- a/rigs/yaesu/ft817.c +++ b/rigs/yaesu/ft817.c @@@ -1396,9 -1149,9 +1396,7 @@@ static int ft817_set_vfo(RIG *rig, vfo_ return ft817_send_cmd(rig, FT817_NATIVE_CAT_SET_VFOAB); } -- -- -int ft817_set_freq(RIG *rig, vfo_t vfo, freq_t freq) +static int ft817_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { unsigned char data[YAESU_CMD_LENGTH - 1]; int retval; diff --cc rigs/yaesu/ft817.h index 0e23be2e,97532dc0..475d74c0 --- a/rigs/yaesu/ft817.h +++ b/rigs/yaesu/ft817.h @@@ -75,8 -75,83 +75,7 @@@ */ #define FT817_CACHE_TIMEOUT 50 - -enum ft817_native_cmd_e -{ - FT817_NATIVE_CAT_LOCK_ON = 0, - FT817_NATIVE_CAT_LOCK_OFF, - FT817_NATIVE_CAT_PTT_ON, - FT817_NATIVE_CAT_PTT_OFF, - FT817_NATIVE_CAT_SET_FREQ, - FT817_NATIVE_CAT_SET_MODE_LSB, - FT817_NATIVE_CAT_SET_MODE_USB, - FT817_NATIVE_CAT_SET_MODE_CW, - FT817_NATIVE_CAT_SET_MODE_CWR, - FT817_NATIVE_CAT_SET_MODE_AM, - FT817_NATIVE_CAT_SET_MODE_FM, - FT817_NATIVE_CAT_SET_MODE_FM_N, - FT817_NATIVE_CAT_SET_MODE_DIG, - FT817_NATIVE_CAT_SET_MODE_PKT, - FT817_NATIVE_CAT_CLAR_ON, - FT817_NATIVE_CAT_CLAR_OFF, - FT817_NATIVE_CAT_SET_CLAR_FREQ, - FT817_NATIVE_CAT_SET_VFOAB, - FT817_NATIVE_CAT_SPLIT_ON, - FT817_NATIVE_CAT_SPLIT_OFF, - FT817_NATIVE_CAT_SET_RPT_SHIFT_MINUS, - FT817_NATIVE_CAT_SET_RPT_SHIFT_PLUS, - FT817_NATIVE_CAT_SET_RPT_SHIFT_SIMPLEX, - FT817_NATIVE_CAT_SET_RPT_OFFSET, - FT817_NATIVE_CAT_SET_DCS_ON, - FT817_NATIVE_CAT_SET_CTCSS_ON, - FT817_NATIVE_CAT_SET_CTCSS_ENC_ON, - FT817_NATIVE_CAT_SET_CTCSS_DCS_OFF, - FT817_NATIVE_CAT_SET_CTCSS_FREQ, - FT817_NATIVE_CAT_SET_DCS_CODE, - FT817_NATIVE_CAT_GET_RX_STATUS, - FT817_NATIVE_CAT_GET_TX_STATUS, - FT817_NATIVE_CAT_GET_FREQ_MODE_STATUS, - FT817_NATIVE_CAT_PWR_WAKE, - FT817_NATIVE_CAT_PWR_ON, - FT817_NATIVE_CAT_PWR_OFF, - FT817_NATIVE_CAT_EEPROM_READ, - FT817_NATIVE_SIZE /* end marker */ -}; - - -typedef enum ft817_native_cmd_e ft817_native_cmd_t; - -- -/* fixme: why declare static? it has no effect */ -static int ft817_init(RIG *rig); -static int ft817_open(RIG *rig); -static int ft817_cleanup(RIG *rig); -static int ft817_close(RIG *rig); -static int ft817_set_freq(RIG *rig, vfo_t vfo, freq_t freq); -static int ft817_get_freq(RIG *rig, vfo_t vfo, freq_t *freq); -static int ft817_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width); -static int ft817_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width); -static int ft817_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt); -static int ft817_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt); -static int ft817_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val); -static int ft817_set_func(RIG *rig, vfo_t vfo, setting_t func, int status); -static int ft817_set_dcs_code(RIG *rig, vfo_t vfo, tone_t code); -static int ft817_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone); -static int ft817_set_dcs_sql(RIG *rig, vfo_t vfo, tone_t code); -static int ft817_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone); -static int ft817_set_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t shift); -static int ft817_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t offs); -static int ft817_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit); -static int ft817_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd); int ft817_set_powerstat(RIG *rig, powerstat_t status); -static int ft817_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op); -static int ft817_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, - vfo_t *tx_vfo); -static int ft817_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, - vfo_t tx_vfo); -static int ft817_power2mW(RIG *rig, unsigned int *mwpower, float power, - freq_t freq, rmode_t mode); -static int ft817_mW2power(RIG *rig, float *power, unsigned int mwpower, - freq_t freq, rmode_t mode); +int ft817_read_ack(RIG *rig); #endif /* _FT817_H */ commit 6f02f38fdc752270b7cac6311bc8434d0d624600 Author: Wouter van Gulik <pa...@gm...> Date: Sun Aug 29 22:01:12 2021 +0200 Add 60m to the 818 tx capabilities, it is one fo the few differences between 818 and 817. diff --git a/rigs/yaesu/ft817.c b/rigs/yaesu/ft817.c index 1ee0e101..7e3619ac 100644 --- a/rigs/yaesu/ft817.c +++ b/rigs/yaesu/ft817.c @@ -500,7 +500,10 @@ const struct rig_caps ft818_caps = .tx_range_list1 = { FRQ_RNG_HF(1, FT817_OTHER_TX_MODES, W(0.5), W(5), FT817_VFO_ALL, FT817_ANTS), FRQ_RNG_HF(1, FT817_AM_TX_MODES, W(0.5), W(1.5), FT817_VFO_ALL, FT817_ANTS), - /* TODO 60m is available seems always available on the 818 */ + + /* One of the key differences between 817 and 818: the 818 has 60m! */ + FRQ_RNG_60m(1, FT817_OTHER_TX_MODES, W(0.5), W(5), FT817_VFO_ALL, FT817_ANTS), + FRQ_RNG_60m(1, FT817_AM_TX_MODES, W(0.5), W(1.5), FT817_VFO_ALL, FT817_ANTS), FRQ_RNG_6m(1, FT817_OTHER_TX_MODES, W(0.5), W(5), FT817_VFO_ALL, FT817_ANTS), FRQ_RNG_6m(1, FT817_AM_TX_MODES, W(0.5), W(1.5), FT817_VFO_ALL, FT817_ANTS), @@ -526,7 +529,10 @@ const struct rig_caps ft818_caps = .tx_range_list2 = { FRQ_RNG_HF(2, FT817_OTHER_TX_MODES, W(0.5), W(5), FT817_VFO_ALL, FT817_ANTS), FRQ_RNG_HF(2, FT817_AM_TX_MODES, W(0.5), W(1.5), FT817_VFO_ALL, FT817_ANTS), - /* FIXME: 60 meters in US version */ + + /* One of the key differences between 817 and 818: the 818 has 60m! */ + FRQ_RNG_60m(2, FT817_OTHER_TX_MODES, W(0.5), W(5), FT817_VFO_ALL, FT817_ANTS), + FRQ_RNG_60m(2, FT817_AM_TX_MODES, W(0.5), W(1.5), FT817_VFO_ALL, FT817_ANTS), FRQ_RNG_6m(2, FT817_OTHER_TX_MODES, W(0.5), W(5), FT817_VFO_ALL, FT817_ANTS), FRQ_RNG_6m(2, FT817_AM_TX_MODES, W(0.5), W(1.5), FT817_VFO_ALL, FT817_ANTS), commit 49b2eca6c1d355ce15e15c897e6ef241c989f9e2 Author: Wouter van Gulik <pa...@gm...> Date: Sat Sep 4 22:56:06 2021 +0200 Add get_ant for 817. NO TESTED! I ONLY HAVE A FT818! diff --git a/rigs/yaesu/ft817.c b/rigs/yaesu/ft817.c index 38bc56d2..1ee0e101 100644 --- a/rigs/yaesu/ft817.c +++ b/rigs/yaesu/ft817.c @@ -57,6 +57,7 @@ #include <stdlib.h> #include <string.h> /* String function definitions */ #include <unistd.h> /* UNIX standard function definitions */ +#include <stdbool.h> #ifdef HAVE_SYS_TIME_H #include <sys/time.h> @@ -172,6 +173,8 @@ static int ft817_mW2power(RIG *rig, float *power, unsigned int mwpower, freq_t freq, rmode_t mode); static int ft817_get_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t *option, ant_t *ant_curr, ant_t *ant_tx, ant_t *ant_rx); +static int ft818_get_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t *option, + ant_t *ant_curr, ant_t *ant_tx, ant_t *ant_rx); /* Native ft817 cmd set prototypes. These are READ ONLY as each */ /* rig instance will copy from these and modify if required . */ @@ -435,6 +438,7 @@ const struct rig_caps ft817_caps = .power2mW = ft817_power2mW, .mW2power = ft817_mW2power, .set_powerstat = ft817_set_powerstat, + .get_ant = ft817_get_ant, .get_level = ft817_get_level, .set_func = ft817_set_func, .vfo_op = ft817_vfo_op, @@ -581,7 +585,7 @@ const struct rig_caps ft818_caps = .power2mW = ft817_power2mW, .mW2power = ft817_mW2power, .set_powerstat = ft817_set_powerstat, - .get_ant = ft817_get_ant, + .get_ant = ft818_get_ant, .get_level = ft817_get_level, .set_func = ft817_set_func, .vfo_op = ft817_vfo_op, @@ -1020,6 +1024,7 @@ static int ft817_get_tx_level(RIG *rig, value_t *val, unsigned char *tx_level, c } val->f = rig_raw2val_float(*tx_level, cal); + rig_debug(RIG_DEBUG_VERBOSE, "%s: level %f\n", __func__, val->f); return RIG_OK; } @@ -1146,10 +1151,11 @@ static int ft817_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd) return RIG_OK; } -static int ft817_get_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t *option, - ant_t *ant_curr, ant_t *ant_tx, ant_t *ant_rx) +static int ft818_817_get_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t *option, + ant_t *ant_curr, ant_t *ant_tx, ant_t *ant_rx, bool is817) { - /* The FT818/817 has no targetable antenna, so rig.c switched the active VFO */ + /* The FT818/817 has no RIG_TARGETABLE_ALL + * so rig.c switched the active VFO to the one requested */ int ret; unsigned char eeprom_band, eeprom_ant; @@ -1176,7 +1182,7 @@ static int ft817_get_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t *option, } /* band info is 4 bit per VFO, for A lower nibble, B is upper nible */ - switch(vfo) { + switch (vfo) { case RIG_VFO_A: eeprom_band &= 0xF; break; @@ -1190,16 +1196,29 @@ static int ft817_get_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t *option, return -RIG_EINTERNAL; } + /* The 818 and the 817 differ in bands: the 818 has 60m. + * The band selection flags for the 818 and 817 thus differ: + * 2 means 60m on 818 and 40m for 817. + * And the rest of the values are shifted. + * + * So to make the code simple: if we have a 817 and 2 or higher band then + * add 1 to the value to align it on the 818 mapping. + */ + if (is817 && eeprom_band >= 2) + { + eeprom_band++; + } + /* The 817/818 does not have a antenna selection per VFO but per band. * So we read the band for the requested VFO and then map it to the * selected antenna. - * TODO THIS IS 818 specific info: the 817 does not have 60m and - * thus has a shifted numbering! */ - switch(eeprom_band) { + + + switch (eeprom_band) { case 0: /* 160M */ case 1: /* 80M */ - case 2: /* 60M */ + case 2: /* 60M, 818 only */ case 3: /* 40M */ case 4: /* 30M */ case 5: /* 20M */ @@ -1243,6 +1262,21 @@ static int ft817_get_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t *option, return RIG_OK; } +static int ft817_get_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t *option, + ant_t *ant_curr, ant_t *ant_tx, ant_t *ant_rx) +{ + return ft818_817_get_ant(rig, vfo, ant, option, ant_curr, ant_tx, ant_rx, + true); + +} + +static int ft818_get_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t *option, + ant_t *ant_curr, ant_t *ant_tx, ant_t *ant_rx) +{ + return ft818_817_get_ant(rig, vfo, ant, option, ant_curr, ant_tx, ant_rx, + false); + +} /* ---------------------------------------------------------------------- */ int ft817_read_ack(RIG *rig) commit e9d32ed6c9390ac6151cd11259b31f39bd5d9bb0 Merge: 06f471d5 187dcff6 Author: Mike Black W9MDB <mdb...@ya...> Date: Sat Sep 4 15:47:02 2021 -0500 Merge branch 'master' of https://github.com/Hamlib/Hamlib commit 187dcff6c5d2d8261584322fdaaeaae9182c8413 Merge: d1c824be 0ebf9974 Author: Michael Black <mdb...@ya...> Date: Sat Sep 4 15:46:51 2021 -0500 Merge pull request #787 from wutje/yeasu_move_native_cmd_to_c_file Yeasu rigs: move native command to C file, move function declaration to C file diff --cc rigs/yaesu/ft1000d.c index 15029354,4374842b..04b75b79 --- a/rigs/yaesu/ft1000d.c +++ b/rigs/yaesu/ft1000d.c @@@ -2329,9 -2439,10 +2435,9 @@@ static int ft1000d_get_vfo(RIG *rig, vf * In all other cases the passed vfo is selected if it differs * from the currently selected VFO. */ - int ft1000d_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *value) + static int ft1000d_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *value) { struct ft1000d_priv_data *priv; - struct rig_state *rig_s; unsigned char mdata[YAESU_CMD_LENGTH]; int err; @@@ -3296,8 -3408,10 +3402,8 @@@ static int ft1000d_get_update_data(RIG * Returns: RIG_OK if all called functions are successful, * otherwise returns error from called functiion */ - int ft1000d_send_static_cmd(RIG *rig, unsigned char ci) + static int ft1000d_send_static_cmd(RIG *rig, unsigned char ci) { - struct rig_state *rig_s; - struct ft1000d_priv_data *priv; int err; rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); @@@ -3400,8 -3520,9 +3506,8 @@@ static int ft1000d_send_dynamic_cmd(RI * Returns: RIG_OK if all called functions are successful, * otherwise returns error from called functiion */ - int ft1000d_send_dial_freq(RIG *rig, unsigned char ci, freq_t freq) + static int ft1000d_send_dial_freq(RIG *rig, unsigned char ci, freq_t freq) { - struct rig_state *rig_s; struct ft1000d_priv_data *priv; int err; // cppcheck-suppress * @@@ -3458,9 -3581,10 +3564,9 @@@ * Returns: RIG_OK if all called functions are successful, * otherwise returns error from called functiion */ - int ft1000d_send_rit_freq(RIG *rig, unsigned char ci, shortfreq_t rit) + static int ft1000d_send_rit_freq(RIG *rig, unsigned char ci, shortfreq_t rit) { struct ft1000d_priv_data *priv; - struct rig_state *rig_s; int err; rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); diff --cc rigs/yaesu/ft1000mp.c index 09c95396,5495255d..2f5b1390 --- a/rigs/yaesu/ft1000mp.c +++ b/rigs/yaesu/ft1000mp.c @@@ -713,8 -807,9 +801,8 @@@ static int ft1000mp_open(RIG *rig - int ft1000mp_set_freq(RIG *rig, vfo_t vfo, freq_t freq) + static int ft1000mp_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { - struct rig_state *rig_s; struct ft1000mp_priv_data *p; unsigned char *cmd; /* points to sequence to send */ int cmd_index = 0; diff --cc rigs/yaesu/ft600.c index 43755559,c82df768..04a2d953 --- a/rigs/yaesu/ft600.c +++ b/rigs/yaesu/ft600.c @@@ -376,8 -476,9 +468,8 @@@ static int ft600_get_level(RIG *rig, vf return RIG_OK; } - int ft600_set_freq(RIG *rig, vfo_t vfo, freq_t freq) + static int ft600_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { - struct rig_state *rig_s; unsigned char p_cmd[YAESU_CMD_LENGTH]; unsigned char cmd_index; /* index of sequence to send */ @@@ -392,10 -495,10 +484,10 @@@ freq = (int)freq / 10; to_bcd(p_cmd, freq, 8); /* store bcd format in in p_cmd */ - return write_block(&rig_s->rigport, (char *) p_cmd, YAESU_CMD_LENGTH); + return write_block(&rig->state.rigport, (char *) p_cmd, YAESU_CMD_LENGTH); } - int ft600_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) + static int ft600_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) { struct ft600_priv_data *priv = (struct ft600_priv_data *)rig->state.priv; diff --cc rigs/yaesu/ft847.c index addef755,ecc26205..986dfbc4 --- a/rigs/yaesu/ft847.c +++ b/rigs/yaesu/ft847.c @@@ -702,8 -855,9 +842,8 @@@ static int opcode_vfo(RIG *rig, unsigne */ - int ft847_s... [truncated message content] |