[Hamlib-commits] Hamlib -- Ham radio control libraries branch Hamlib-4.0 updated. c7de6e8b1979c7c36
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Nate B. <n0...@us...> - 2020-11-03 18:11:22
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, Hamlib-4.0 has been updated via c7de6e8b1979c7c36ed5fb56bba6ff6d49445a68 (commit) via 060a9a3001efc361c6541ad20d2af8f8798bd70c (commit) via 6760e9abe1552985555e31da55d3c90bc024606a (commit) via aab674c6b0d678514d9d6e98d68a7af41b2d25bb (commit) via 1db05ed27c18e1da59fc18d3bae88a055f2f5152 (commit) via c5dd5728aa44a4590a8595de4a236306a8f6211e (commit) via 4e055a81a3f5218201a60aba7792c3750effdda8 (commit) via a34fdf5267011d3853c5702f8ea91ce9a4b4cd23 (commit) via 1aa5f5be8b593eb6b08424f33732f4247414e452 (commit) via b5c97fca61279cbf1c3ed3df3a6cd608bca094c0 (commit) via 08680a5f281d070f02db9c8f742bb61318a196a9 (commit) via 459a0303c31bba55a7a20603dda9fa4e4295b29d (commit) via acfb0d4c9ec218e426af622f570f355b87fbff05 (commit) via f4848a8e0f8b74368b2c15ff495967ba1718c315 (commit) via 8e44485802b32fa9dbbea1186f802b521994665c (commit) via 6eca8e7fb836f14bd0896692e11e76a1c27c564e (commit) via 3096b403888b4d255c29896ea4a822e21cb2fd78 (commit) via d19eb9ff3c4d4411336273a8fb42d98ede418fd0 (commit) via 88a0ef4609bed069de117932812758813d8a6444 (commit) via 3da2b6e16d662333da57889db36012599bc0eeff (commit) via 8b9e45216ea92b8ad2b818cd7769836ca92a20a6 (commit) via 1133b783e430352267e2e12413add23983acb403 (commit) via 0b2d68d1f233681cacebfb148b3813b915cbfdc9 (commit) via 98e87d91d5390d3e58cec68c1c03e30aad698a24 (commit) via 31e99eae1ab44160696086df2410cb72eff7d47b (commit) via 71000b3ddce80aee28b781656ff61fc4fe02500d (commit) via d86f5497665dbaafb5f74fb0dd673426fe2fb8ea (commit) via d393a0628226a36f577ab563b125b6afcb6ce645 (commit) via d372c900fa1fb988d671ef40204d977ca3c69c30 (commit) via d4ed8960b7be485dee2c067252d039f71c853ddc (commit) via 811dff427c3b303394a43f8d101d59fe1a910913 (commit) via 93ba14a43a171d215938c3faa61739921541397f (commit) via 7993f573b7f835b0dc8006f717b78b6fc685d2f8 (commit) via 22e76e652f2cef202a8193bfddb3a27e100fd238 (commit) via 2ac168720b2ebf9c4f297ee5116b84e6a9922745 (commit) via 0b39620b545722f31158f043c7cb7d867e587222 (commit) via bd0bb6a4271ca2af4e95f13d037a6994b8c74dfc (commit) via 4e355eb7601e860051fe42ae7c850a5e79cf3101 (commit) via 9ffc407980174d3f1487d1c76495000c9f0e52d6 (commit) via bf553fd918e324a2f8c5d10c1c8df1833a7614de (commit) via 1a786f80546b595f8a1266f242e6d5eb0912ca09 (commit) via 1366190ab615e6973fdccb5d4aa1c85b85fe4fab (commit) via c46d6cd7286feba256ae5013141cf5892ff17a24 (commit) via 1b001dfdebd4764179771fe3afaa2904b982817e (commit) via 671afffc428ae706da8732dc9fffd73888ec998d (commit) via cd137d7a8c720b24251967d998e6666a229129a2 (commit) via 1d89d74f7b4d7c294c54ca78e210657bc77fd708 (commit) via afed664b2c340327bc8912c39375c57d496ea5aa (commit) via d819e59a80e7e569c59bc74309b1fa1dd6561da9 (commit) via 502ff7b16183a0f30669e676e8d244bc4611b5d0 (commit) via 09ddeeace89290328908b739a95f0e978f79bdca (commit) via 5898c1dc1d0e863ee1ba91af1cb594933b12c59d (commit) via 3b992dde73fda2a0074a322617e76c256ee51a43 (commit) via 1449c2662dd87a46ae4fd5105141825b5bf02add (commit) via 8ca3dd8d28b3b0e3d4fc884ff844b0c2ae4f92ca (commit) via e2a537880bc5907090c107cc2ec215f132e011d2 (commit) via 1c19332593e56509c570aa1333d0e3ec9cf48f49 (commit) via 1d369ae3d7a2c0ad20c5880af6824278bc37527b (commit) via 1c1194e3da5bafd4b48cb28c733c4c74c17d3e9d (commit) via d3b5dbae94dde590156104e1f72c57fafaa278ac (commit) via e1d1850e2f5b663bb9ef67b8842acd54dff48bd1 (commit) via edf6ac5c9998bf9fa736981e60daaa87989f42a8 (commit) via 8acdf59680c5145a300d3a7fa00101e2f1635109 (commit) via ab724e8cfb1771e3a458295d68ca6deab9215256 (commit) via b52b0ca8cb9e1300d00c9c0f31b585ff0f7bc9ea (commit) via b72f759956ab0ebc16247e65f8118926f1ce64e9 (commit) via 5010932c6f354c56cdd488ebaa082f1764c85ae4 (commit) via 9f4be67d4b3e35dd435a445e11b38a5ba11b7e3e (commit) via 992fedd4d260e5be51f3920c3c4347a0d8cded98 (commit) via f0807e49027384bc0a8f39ee4c3b65490b2c733f (commit) via afca207f1e856fcea0cd3ca54dbc20be611c1c3f (commit) via 454c3a69ac6b5fc026d67b9a54b8094b11554151 (commit) via d340f747c1a2d0283d9512b775931b8d2a56367d (commit) via efebaa7d2d949ca5f1523987e9e1b2aa1d0fc9b3 (commit) via 7a4403d5ee8ac0c1dada07b151706342fe1afa98 (commit) via 0808e93ce580fde1e9b914b7fac65fe36809a43d (commit) via 5f8ac53163402ce7389a2e9022bb59aaf1688326 (commit) via 49f1396c31da2c53731bf02709c0059cec3eaee1 (commit) via 7de961ceedd6c7b81014f759ab46ecf7e1541d44 (commit) via 552516a27a03832cb8dae363a743a4c865c04771 (commit) via a7c91ef16acb935cb8db28608a795a87e29f58b2 (commit) via c2f37f7caee55344a4307d8d7fccdb8835bb6597 (commit) via 7c3c9ab1bc940d4a1d72751fa09edb000a8b2822 (commit) via 2a2d56e95744bf26e233c35c0804a0543a894d98 (commit) via 686be18bedb3efc0f8d8943ec7232c23a7623eb7 (commit) via 9eecff3cb9460da0d05c71e8ce7e57f5793fd682 (commit) via 4818743b6a0ce76391ece55b7f4d6a2d9ed1a673 (commit) via 000cf575ebcdf1497ac6ae21bf305219f1ac7d4c (commit) via b12758e92ef3240120946a0712b01381cc7b5c78 (commit) via 67c0217827c040e35271bfcb8326e535788a297a (commit) via 40f48ea32c014baed27c955e03ebb7c8b7dc276b (commit) via 86ce977b12d36e4dbb3976acd80a182b77053470 (commit) via 06ce8bb3520291cad8197eda98ea2a3bb5702efc (commit) via 2ba07c15efc039b981277df770f5784a1c54ded2 (commit) via 72eec4e01cd249f47c220d63ee1ad3afb5bc05b6 (commit) via 75a1356dd856ab3cf25fee7b0c786af61433d6aa (commit) via 549701b0bbc74153ba7be3e6087db80db3d3dd41 (commit) via f813ad37625e84d28bd45ea0bae3241f9bfbce2a (commit) via d5978eefa8808cbe9a92e8c5e7fb6005408373d2 (commit) via 70a2ca58dd247cf89b6615e4315a5548ed902d50 (commit) via dfa88dc89cbd99bff9625a4a03011313bb594975 (commit) via 8e813bc21983f262e9f6f830aca1b2dd0c0f5025 (commit) via a01f9cd1a76d698f56c486da26560b4133925b3d (commit) via 24b1b6d7b995e2a67440762eb5e7c8324a432dd5 (commit) via befb922093999f711388d383e0ea2eb4828a6669 (commit) via b93461a93a4632652d03f03e61d89066f5b56ca9 (commit) via 498c2fb3685669f41528fe700f06684f18c5ebe9 (commit) via ce05352f4241b9a63c344a8d8d339daea1e3f597 (commit) via e2941a60da26adb71bb5cce7d70fc8edb1a8010c (commit) via 3f55b1cf67e3a6b147456256414a5b2fb731a321 (commit) via b595a405e9b3962ae4fdb3bc697faeec3e0fffe2 (commit) via 836d82f7b3956f8a22b061825f7faedc739a4b70 (commit) via a2527b40a00c5aa2d7b9e0ab347ac4d872ac8035 (commit) via 90e69e22b53725a49ac32dda5706690efe79a520 (commit) via d4863a25cf8dde34ccf9d56933fef28a3e2821b1 (commit) via f4387d260ea6f14567c90fb63064eaae8e4f5f78 (commit) via eb022a1c3c3bb69e86252274aa8c96d24cab6e5d (commit) via 3046a9b4a1a33aa22f9f09a2afa04369bcd2b4cf (commit) via 28308c13805bb56e4ae263945b9f2153c547799e (commit) via 151ca9573386f7733a435bd9df779bd63fb61ada (commit) via 33e67bcd49723883da29b32db37bbc9c1fbd83e4 (commit) via 2c25ee32ab1363a6a4de35ddf9389eec0644adde (commit) via 9682af9fe879beb471ab52f81bbdccb155ffc603 (commit) via 57dbecdc4ea266d52541eacd6116e4233e81e64a (commit) via 497c76b59d52ba7e4b867d25a39097d27db5252f (commit) via 1c4bc78b5dcf634c6f9110bb85b8340e371f030a (commit) via 2474eca66128e5e25018d6c51e42b72a408178c3 (commit) via f87015da96726aaddfa5b8de2a4fd84e7f8e7673 (commit) via f44b4c507eb14554d3ad86487443b5c57ac127f8 (commit) via dee3c9989f7106e0b096fb543f1e99913a7da64a (commit) via dfe4dbcf838e4155f74fa8ea438a871068a5f133 (commit) via 3fadcb16c746c4294e3cb006b7500c971c9500d7 (commit) via 73a975c125e55914d03d3cfb576584825975c962 (commit) via 0ea6ac10130c6d45825d46adbf3f4823cf6b4b9c (commit) via 491a7207a111c368467e39039495fd605c65d879 (commit) via c717c9e38c064e47614621aa2ef90d7dde63e70b (commit) via a152cbb9868f9b82a9687fcc12aa8988a9584892 (commit) via 0c4e6749af536eb051c464657dd1e287f8eb4ba2 (commit) via 3b772d34684cbd89f640eca07720dea6af20a121 (commit) via f9302ab96f46a382fdcb35cb05fe5a100bca6551 (commit) via efe98fac5fb19da41cd33ee2add550e31c5dc0c7 (commit) via 770a3ae4f05fa135f8c4d52e1d43649c196371a6 (commit) via c881225ca9598c751e0914399116a8b474434c3e (commit) via 008b24a3448e56fb860b76211147e9b6dd3a286b (commit) via 579338ad64c9f3583e29ddc3f2fea07f1e2884c2 (commit) via 7705ef01a7fa9bbdceed45427d8d40e819ab4c61 (commit) via 945f9aeb8e78b4f46176c8d0c8c9501c75390c79 (commit) via a612dbda169d16b97c3303a7ca80168a90d7ac6c (commit) via f37426adc588bc06c6d85c59fc20f2721f8ffbe1 (commit) via d8edf32c8a6f6a2f8695dbc1a963aa641ec30e1a (commit) via 5f72ad1b2955ff2e0e62290a35ac015dcb9bc309 (commit) via 189cb7f350b70233d55426c9946f7e900b54e502 (commit) via 691e3748712a4327e895d6f2b24580b111f22e69 (commit) via 2bc973a87d00a0072a8b2d2e7b176949bdb3d96d (commit) via 937b32a14d12bdc1ac5dfd15c3f838b1a4c24d42 (commit) via 7fedd4c864405a10a9b8e18cc47ced9c2eac419a (commit) via 69ba91cd3cef96e85455123a0616067af0fe3483 (commit) via 4a3769380b660d9981ac632724463cf31da729ee (commit) via 445481579e73b95ff21e5ac8cb2049b2b1121639 (commit) via 2b168e46133c5e3e4877c9a7a89d33e0cc16cf81 (commit) via ba80f66af956237a426f24f3aa752b9d87560301 (commit) via a6304a397c0b01218daca138ac14dec42bdbcc2e (commit) via 1245b24efc2888658a13e7896adc60ccae93ee81 (commit) via 7501bcb923a084d15f7095ca2d4a53af1e6beaee (commit) via bcad10f929bb445f891f5fdfff3d3241a268fe64 (commit) via 2b3a463646e4b02c481734ab3351f45ff9ed93ce (commit) via 496e43623f5eabddb5106efa0f38902dadc37068 (commit) via 9a494f859b176eab04e77f0284cab0de976aba74 (commit) via 025d88330ec62547a9ceef2f03e737690883c846 (commit) via a5be1c11768017ca7f62fb1f70c02f3b6d8bf4c5 (commit) via 8755d281ccbd128a061534b3c873260054f12e72 (commit) via 60d99bd53dec79fa0a98b5e8f70527d70697a304 (commit) via bf7cd03190ef97e97a4249097fe15db1c78827e4 (commit) via 28a07754d81edfdb4648e2073313fa8874fce24b (commit) via 6b7af78fadfc7a94cb937ad8ec8a6e4683e5cdbe (commit) via b7f4e2783ee776a8ec9049da06c75167638e41a7 (commit) via 12c3cb85d05f2c5ecea577ce30e7a74a058f8175 (commit) via eab1aed335dd73df4c81485f082c44e05c6962fa (commit) via f052c3878514e93f3eaca647026a781b6b1338e9 (commit) via b23c2f0c43582876174fd982b256b9cb7684b41f (commit) via 6910a61fd326cbbf986de431f25f8e98d654f80a (commit) via ef3ab588a025c8f5687b49902744306ce95d3a56 (commit) via 2ae05ebba65b8a7b61775361e3d8dc72eb12f6ff (commit) via 44f8a974454d6329210fda702cb7e26cb97df735 (commit) via 78e227cca02094c90a0b6a81d50c02353abc71cb (commit) via 10e5c7872533bbe4b4efce565ad0052dcd432ca7 (commit) via 875ef7fcf213a3d0cadbc9b6ab8a586641b2534b (commit) via 97cecb3137fad566bb7192cef6906450067918ca (commit) via d08223357917f0589580bf98b707272a3114728e (commit) via d02055238a54cd8dd17adb38892a682d9367003d (commit) via f5df7d154a170876f1598052cc35d435f88aab76 (commit) via 66c31c42e26044ba84832e9d605631a05e65fae9 (commit) via d7265846c56ff3e77e0158af82b01db6d298c918 (commit) via 65e3bbb3c1c09ecb7559e630454a48936ddf1ce8 (commit) via ff1be43c09cd1d6e410039dfd6e9fac8d759f1c8 (commit) via a02bddea5c833b6135bc023e00a5d27f3c2ae743 (commit) via f77be9bcdbfd355047e5453f02031dcbcf62a48e (commit) via c0c970ca6b7745bf08e94ad9f0b22a90a744257c (commit) via 5b518ad9e9baefba80d0a94b33fb5242f84a8537 (commit) via b64b7fd14d064507b8774d0092a14778d9a22467 (commit) from 506cd8118442173ee275c60651bf80c09974a76e (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 c7de6e8b1979c7c36ed5fb56bba6ff6d49445a68 Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Nov 3 09:28:00 2020 -0600 Fix get/set_xit for Yaesu rigs to avoid vfo swapping Fix get_xit to return VFOA/B appropriately THe IF/OI commands apparently always return VFOA/B respectively so vfo swapping is not needed to read info https://github.com/Hamlib/Hamlib/issues/430 (cherry picked from commit 11058e63ff99ac345342b64e743e73ac746bb0fa) diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index ca3fa675..b43b143b 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -1170,6 +1170,29 @@ int newcat_set_vfo(RIG *rig, vfo_t vfo) return RIG_OK; } +// Either returns a valid RIG_VFO* or if < 0 an error code +static vfo_t newcat_set_vfo_if_needed(RIG *rig, vfo_t vfo) +{ + vfo_t oldvfo = rig->state.current_vfo; + + rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s, oldvfo=%s\n", __func__, rig_strvfo(vfo), + rig_strvfo(oldvfo)); + + if (oldvfo != vfo) + { + int ret; + ret = newcat_set_vfo(rig, vfo); + + if (ret != RIG_OK) + { + rig_debug(RIG_DEBUG_ERR, "%s: error setting vfo=%s\n", __func__, + rig_strvfo(vfo)); + return ret; + } + } + + return oldvfo; +} /* * rig_get_vfo @@ -1731,11 +1754,9 @@ int newcat_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo) return RIG_OK; } - int newcat_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit) { struct newcat_priv_data *priv = (struct newcat_priv_data *)rig->state.priv; - int vfo_swap = 0; vfo_t oldvfo; int ret; @@ -1744,19 +1765,9 @@ int newcat_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit) return -RIG_ENAVAIL; } - if (rig->state.current_vfo != vfo) - { - oldvfo = rig->state.current_vfo; - ret = newcat_set_vfo(rig, vfo); - - if (ret != RIG_OK) - { - rig_debug(RIG_DEBUG_ERR, "%s: error setting vfo=%s\n", __func__, - rig_strvfo(vfo)); - } + oldvfo = newcat_set_vfo_if_needed(rig, vfo); - vfo_swap = 1; - } + if (oldvfo < 0) { return oldvfo; } if (rit > rig->caps->max_rit) { @@ -1785,16 +1796,9 @@ int newcat_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit) ret = newcat_set_cmd(rig); - if (vfo_swap) - { - newcat_set_vfo(rig, oldvfo); + oldvfo = newcat_set_vfo_if_needed(rig, oldvfo); - if (ret != RIG_OK) - { - rig_debug(RIG_DEBUG_ERR, "%s: error setting vfo=%s\n", __func__, - rig_strvfo(vfo)); - } - } + if (oldvfo < 0) { return oldvfo; } return ret; } @@ -1865,12 +1869,18 @@ int newcat_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit) int newcat_set_xit(RIG *rig, vfo_t vfo, shortfreq_t xit) { struct newcat_priv_data *priv = (struct newcat_priv_data *)rig->state.priv; + vfo_t oldvfo; + int ret; if (!newcat_valid_command(rig, "XT")) { return -RIG_ENAVAIL; } + oldvfo = newcat_set_vfo_if_needed(rig, vfo); + + if (oldvfo < 0) { return oldvfo; } + if (xit > rig->caps->max_xit) { xit = rig->caps->max_xit; /* + */ @@ -1897,7 +1907,13 @@ int newcat_set_xit(RIG *rig, vfo_t vfo, shortfreq_t xit) labs(xit), cat_term); } - return newcat_set_cmd(rig); + ret = newcat_set_cmd(rig); + + oldvfo = newcat_set_vfo_if_needed(rig, vfo); + + if (oldvfo < 0) { return oldvfo; } + + return ret; } @@ -1907,8 +1923,14 @@ int newcat_get_xit(RIG *rig, vfo_t vfo, shortfreq_t *xit) char *retval; int err; int offset = 0; + char *cmd = "IF"; + + if (vfo == RIG_VFO_B || vfo == RIG_VFO_SUB) + { + cmd = "OI"; + } - if (!newcat_valid_command(rig, "IF")) + if (!newcat_valid_command(rig, cmd)) { return -RIG_ENAVAIL; } @@ -1917,7 +1939,7 @@ int newcat_get_xit(RIG *rig, vfo_t vfo, shortfreq_t *xit) rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); - snprintf(priv->cmd_str, sizeof(priv->cmd_str), "%s%c", "IF", cat_term); + snprintf(priv->cmd_str, sizeof(priv->cmd_str), "%s%c", cmd, cat_term); rig_debug(RIG_DEBUG_TRACE, "%s: cmd_str = %s\n", __func__, priv->cmd_str); diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h index bae618a3..a1e416f0 100644 --- a/rigs/yaesu/newcat.h +++ b/rigs/yaesu/newcat.h @@ -50,7 +50,7 @@ typedef char ncboolean; /* shared function version */ -#define NEWCAT_VER "20201102" +#define NEWCAT_VER "20201103" /* Hopefully large enough for future use, 128 chars plus '\0' */ #define NEWCAT_DATA_LEN 129 commit 060a9a3001efc361c6541ad20d2af8f8798bd70c Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Nov 3 15:24:06 2020 +0000 Fix set_mode for IC-7000 https://github.com/Hamlib/Hamlib/issues/428 (cherry picked from commit 20fc303686ee4fdb94d20d746936fd1249d091ec) diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index fadfd433..7b12a79d 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -1700,12 +1700,13 @@ int icom_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) return err; } - /* IC-731 and IC-735 don't support passband data */ + /* IC-731, IC-735, IC-7000 don't support passband data */ /* IC-726 & IC-475A/E also limited support - only on CW */ /* TODO: G4WJS CW wide/narrow are possible with above two radios */ if (priv->civ_731_mode || rig->caps->rig_model == RIG_MODEL_OS456 || rig->caps->rig_model == RIG_MODEL_IC726 - || rig->caps->rig_model == RIG_MODEL_IC475) + || rig->caps->rig_model == RIG_MODEL_IC475 + || rig->caps->rig_model == RIG_MODEL_IC7000) { icmode_ext = -1; } diff --git a/rigs/icom/icom.h b/rigs/icom/icom.h index a52b9069..b264776a 100644 --- a/rigs/icom/icom.h +++ b/rigs/icom/icom.h @@ -30,7 +30,7 @@ #include <sys/time.h> #endif -#define BACKEND_VER "20201018" +#define BACKEND_VER "20201103" /* * defines used by comp_cal_str in rig.c commit 6760e9abe1552985555e31da55d3c90bc024606a Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Nov 2 17:21:20 2020 -0600 Change yaesu newcat_get_rit to use "OI" instead of vfo swapping Change yaesu newcat_set_rit to do vfo swap if needed https://github.com/Hamlib/Hamlib/issues/430 (cherry picked from commit 072cd6107f55a45acfd32abd2999c0698fda357f) diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 285bdef0..ca3fa675 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -1735,12 +1735,29 @@ int newcat_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo) int newcat_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit) { struct newcat_priv_data *priv = (struct newcat_priv_data *)rig->state.priv; + int vfo_swap = 0; + vfo_t oldvfo; + int ret; if (!newcat_valid_command(rig, "RT")) { return -RIG_ENAVAIL; } + if (rig->state.current_vfo != vfo) + { + oldvfo = rig->state.current_vfo; + ret = newcat_set_vfo(rig, vfo); + + if (ret != RIG_OK) + { + rig_debug(RIG_DEBUG_ERR, "%s: error setting vfo=%s\n", __func__, + rig_strvfo(vfo)); + } + + vfo_swap = 1; + } + if (rit > rig->caps->max_rit) { rit = rig->caps->max_rit; /* + */ @@ -1766,7 +1783,20 @@ int newcat_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit) labs(rit), cat_term); } - return newcat_set_cmd(rig); + ret = newcat_set_cmd(rig); + + if (vfo_swap) + { + newcat_set_vfo(rig, oldvfo); + + if (ret != RIG_OK) + { + rig_debug(RIG_DEBUG_ERR, "%s: error setting vfo=%s\n", __func__, + rig_strvfo(vfo)); + } + } + + return ret; } @@ -1776,8 +1806,14 @@ int newcat_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit) char *retval; int err; int offset = 0; + char *cmd = "IF"; - if (!newcat_valid_command(rig, "IF")) + if (vfo == RIG_VFO_B || vfo == RIG_VFO_SUB) + { + cmd = "OI"; + } + + if (!newcat_valid_command(rig, cmd)) { return -RIG_ENAVAIL; } @@ -1786,7 +1822,7 @@ int newcat_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit) rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); - snprintf(priv->cmd_str, sizeof(priv->cmd_str), "%s%c", "IF", cat_term); + snprintf(priv->cmd_str, sizeof(priv->cmd_str), "%s%c", cmd, cat_term); rig_debug(RIG_DEBUG_TRACE, "%s: cmd_str = %s\n", __func__, priv->cmd_str); diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h index 85ff10a2..bae618a3 100644 --- a/rigs/yaesu/newcat.h +++ b/rigs/yaesu/newcat.h @@ -50,7 +50,7 @@ typedef char ncboolean; /* shared function version */ -#define NEWCAT_VER "20201029" +#define NEWCAT_VER "20201102" /* Hopefully large enough for future use, 128 chars plus '\0' */ #define NEWCAT_DATA_LEN 129 commit aab674c6b0d678514d9d6e98d68a7af41b2d25bb Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Nov 1 17:05:29 2020 -0600 Remove bad targetable code from rigs https://github.com/Hamlib/Hamlib/issues/430 https://github.com/Hamlib/Hamlib/issues/414 (cherry picked from commit 51b4e0966c56b4b8b1cfcef897b30e7a9bbc9752) diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 6cbe4c89..fadfd433 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -814,11 +814,6 @@ icom_rig_open(RIG *rig) #if 0 // do not do this here -- needs to be done when ranges are requested instead as this is very slow icom_get_freq_range(rig); // try get to get rig range capability dyamically #endif - // All Icom rigs as of 20201031 do not need VFO switch for PTT and RITXIT - // They are non-VFO specific commands - // If they ever become VFO specific implement in the backend - //rig->caps->targetable_vfo |= RIG_TARGETABLE_PTT | RIG_TARGETABLE_RITXIT | - // RIG_TARGETABLE_MEM | RIG_TARGETABLE_BANK; return RIG_OK; } diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index 3ea19292..0565508d 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -938,12 +938,6 @@ int kenwood_open(RIG *rig) // mismatched IDs can still be tested rig->state.rigport.retry = retry_save; - // All Kenwood rigs as of 20201031 do not need VFO switch for PTT and RITXIT - // They are non-VFO specific commands - // If they ever become VFO specific implement in the backend - // newcat.c version is getting segfault here -- read only? - //rig->caps->targetable_vfo |= RIG_TARGETABLE_PTT | RIG_TARGETABLE_RITXIT | - // RIG_TARGETABLE_MEM | RIG_TARGETABLE_BANK; return RIG_OK; } diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index bec7b8a5..285bdef0 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -529,14 +529,6 @@ int newcat_open(RIG *rig) /* Initialize rig_id in case any subsequent commands need it */ (void)newcat_get_rigid(rig); - // All Yaeus rigs as of 20201031 do not need VFO switch for PTT and RITXIT - // They are non-VFO specific commands - // A couple of rigs do have vfo-specific in the backends - // If they ever become VFO specific implement in the backend - // this is getting a segfault on Linux -- read only?? - //rig->caps->targetable_vfo |= RIG_TARGETABLE_PTT | RIG_TARGETABLE_RITXIT | - // RIG_TARGETABLE_MEM | RIG_TARGETABLE_BANK; - return RIG_OK; } commit 1db05ed27c18e1da59fc18d3bae88a055f2f5152 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Nov 1 17:00:44 2020 -0600 Add TARGETABLE_COMMON to rig.h (cherry picked from commit 335a75518c2690f8adcd52e00bdd14112ebc0ec8) diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 2550ab1c..8a27d782 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -473,6 +473,7 @@ typedef unsigned int vfo_t; #define RIG_TARGETABLE_PTT (1<<7) #define RIG_TARGETABLE_MEM (1<<8) #define RIG_TARGETABLE_BANK (1<<9) +#define RIG_TARGETABLE_COMMON (RIG_TARGETABLE_RITXIT | RIG_TARGETABLE_PTT | RIG_TARGETABLE_MEM | RIG_TARGETABLE_BANK) #define RIG_TARGETABLE_ALL 0x7fffffff //! @endcond // commit c5dd5728aa44a4590a8595de4a236306a8f6211e Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Nov 1 16:59:05 2020 -0600 Add TARGETABLE_COMMON to ftdx101.c (cherry picked from commit ccdeffbcd82b4ca7ac96e1c6436cf04d36f3320b) diff --git a/rigs/yaesu/ftdx101.c b/rigs/yaesu/ftdx101.c index 5b6358f9..a330c1e1 100644 --- a/rigs/yaesu/ftdx101.c +++ b/rigs/yaesu/ftdx101.c @@ -78,7 +78,7 @@ const struct rig_caps ftdx101d_caps = RIG_MODEL(RIG_MODEL_FTDX101D), .model_name = "FTDX101D", .mfg_name = "Yaesu", - .version = NEWCAT_VER ".5", + .version = NEWCAT_VER ".6", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -113,7 +113,7 @@ const struct rig_caps ftdx101d_caps = .max_xit = Hz(9999), .max_ifshift = Hz(1200), .vfo_ops = FTDX101_VFO_OPS, - .targetable_vfo = RIG_TARGETABLE_FREQ | RIG_TARGETABLE_MODE | RIG_TARGETABLE_FUNC | RIG_TARGETABLE_LEVEL, + .targetable_vfo = RIG_TARGETABLE_FREQ | RIG_TARGETABLE_MODE | RIG_TARGETABLE_FUNC | RIG_TARGETABLE_LEVEL | RIG_TARGETABLE_COMMON, .transceive = RIG_TRN_OFF, /* May enable later as the FTDX101 has an Auto Info command */ .bank_qty = 0, .chan_desc_sz = 0, commit 4e055a81a3f5218201a60aba7792c3750effdda8 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Nov 1 15:35:17 2020 -0600 Backing out targetable flags due to segfault on Linux https://github.com/Hamlib/Hamlib/issues/431 (cherry picked from commit fd9e5d841b63675df33350fbec5f885c8e90fb95) diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index c8b70ebd..6cbe4c89 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -817,8 +817,8 @@ icom_rig_open(RIG *rig) // All Icom rigs as of 20201031 do not need VFO switch for PTT and RITXIT // They are non-VFO specific commands // If they ever become VFO specific implement in the backend - rig->caps->targetable_vfo |= RIG_TARGETABLE_PTT | RIG_TARGETABLE_RITXIT | - RIG_TARGETABLE_MEM | RIG_TARGETABLE_BANK; + //rig->caps->targetable_vfo |= RIG_TARGETABLE_PTT | RIG_TARGETABLE_RITXIT | + // RIG_TARGETABLE_MEM | RIG_TARGETABLE_BANK; return RIG_OK; } diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index e6eef492..3ea19292 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -941,9 +941,9 @@ int kenwood_open(RIG *rig) // All Kenwood rigs as of 20201031 do not need VFO switch for PTT and RITXIT // They are non-VFO specific commands // If they ever become VFO specific implement in the backend - - rig->caps->targetable_vfo |= RIG_TARGETABLE_PTT | RIG_TARGETABLE_RITXIT | - RIG_TARGETABLE_MEM | RIG_TARGETABLE_BANK; + // newcat.c version is getting segfault here -- read only? + //rig->caps->targetable_vfo |= RIG_TARGETABLE_PTT | RIG_TARGETABLE_RITXIT | + // RIG_TARGETABLE_MEM | RIG_TARGETABLE_BANK; return RIG_OK; } diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 0aedb5e9..bec7b8a5 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -533,8 +533,9 @@ int newcat_open(RIG *rig) // They are non-VFO specific commands // A couple of rigs do have vfo-specific in the backends // If they ever become VFO specific implement in the backend - rig->caps->targetable_vfo |= RIG_TARGETABLE_PTT | RIG_TARGETABLE_RITXIT | - RIG_TARGETABLE_MEM | RIG_TARGETABLE_BANK; + // this is getting a segfault on Linux -- read only?? + //rig->caps->targetable_vfo |= RIG_TARGETABLE_PTT | RIG_TARGETABLE_RITXIT | + // RIG_TARGETABLE_MEM | RIG_TARGETABLE_BANK; return RIG_OK; } commit a34fdf5267011d3853c5702f8ea91ce9a4b4cd23 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Nov 1 07:48:52 2020 -0600 Added two more targetable flags for MEM and BANK to avoid VFO swapping https://github.com/Hamlib/Hamlib/issues/430 https://github.com/Hamlib/Hamlib/issues/414 (cherry picked from commit 5721db70be80957797162271c84629280bc06edf) diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 013ad650..2550ab1c 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -459,7 +459,7 @@ typedef unsigned int vfo_t; * RIG_TARGETABLE_PURE means a pure targetable radio on every command * In rig.c lack of a flag will case a VFO change if needed * So setting this flag will mean the backend handles any VFO needs - * For many rigs RITXIT and PTT are non-VFO commands so need these flags + * For many rigs RITXIT, PTT, MEM, and BANK are non-VFO commands so need these flags to avoid unnecessary VFO swapping */ //! @cond Doxygen_Suppress #define RIG_TARGETABLE_NONE 0 @@ -471,6 +471,8 @@ typedef unsigned int vfo_t; #define RIG_TARGETABLE_LEVEL (1<<5) #define RIG_TARGETABLE_RITXIT (1<<6) #define RIG_TARGETABLE_PTT (1<<7) +#define RIG_TARGETABLE_MEM (1<<8) +#define RIG_TARGETABLE_BANK (1<<9) #define RIG_TARGETABLE_ALL 0x7fffffff //! @endcond // diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index d7bc08d8..c8b70ebd 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -817,7 +817,8 @@ icom_rig_open(RIG *rig) // All Icom rigs as of 20201031 do not need VFO switch for PTT and RITXIT // They are non-VFO specific commands // If they ever become VFO specific implement in the backend - rig->caps->targetable_vfo |= RIG_TARGETABLE_PTT | RIG_TARGETABLE_RITXIT; + rig->caps->targetable_vfo |= RIG_TARGETABLE_PTT | RIG_TARGETABLE_RITXIT | + RIG_TARGETABLE_MEM | RIG_TARGETABLE_BANK; return RIG_OK; } diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index 6dea3477..e6eef492 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -942,7 +942,8 @@ int kenwood_open(RIG *rig) // They are non-VFO specific commands // If they ever become VFO specific implement in the backend - rig->caps->targetable_vfo |= RIG_TARGETABLE_PTT | RIG_TARGETABLE_RITXIT; + rig->caps->targetable_vfo |= RIG_TARGETABLE_PTT | RIG_TARGETABLE_RITXIT | + RIG_TARGETABLE_MEM | RIG_TARGETABLE_BANK; return RIG_OK; } diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index ad8bac00..0aedb5e9 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -533,7 +533,8 @@ int newcat_open(RIG *rig) // They are non-VFO specific commands // A couple of rigs do have vfo-specific in the backends // If they ever become VFO specific implement in the backend - rig->caps->targetable_vfo |= RIG_TARGETABLE_PTT | RIG_TARGETABLE_RITXIT; + rig->caps->targetable_vfo |= RIG_TARGETABLE_PTT | RIG_TARGETABLE_RITXIT | + RIG_TARGETABLE_MEM | RIG_TARGETABLE_BANK; return RIG_OK; } diff --git a/src/mem.c b/src/mem.c index 837ec149..9d347cf9 100644 --- a/src/mem.c +++ b/src/mem.c @@ -89,7 +89,7 @@ int HAMLIB_API rig_set_mem(RIG *rig, vfo_t vfo, int ch) return -RIG_ENAVAIL; } - if ((caps->targetable_vfo & RIG_TARGETABLE_PURE) + if ((caps->targetable_vfo & RIG_TARGETABLE_MEM) || vfo == RIG_VFO_CURR || vfo == rig->state.current_vfo) { @@ -152,7 +152,7 @@ int HAMLIB_API rig_get_mem(RIG *rig, vfo_t vfo, int *ch) return -RIG_ENAVAIL; } - if ((caps->targetable_vfo & RIG_TARGETABLE_PURE) + if ((caps->targetable_vfo & RIG_TARGETABLE_MEM) || vfo == RIG_VFO_CURR || vfo == rig->state.current_vfo) { @@ -215,7 +215,7 @@ int HAMLIB_API rig_set_bank(RIG *rig, vfo_t vfo, int bank) return -RIG_ENAVAIL; } - if ((caps->targetable_vfo & RIG_TARGETABLE_PURE) + if ((caps->targetable_vfo & RIG_TARGETABLE_BANK) || vfo == RIG_VFO_CURR || vfo == rig->state.current_vfo) { commit 1aa5f5be8b593eb6b08424f33732f4247414e452 Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Oct 31 17:19:08 2020 -0500 Add RIG_TARGETABLE_PTT and RIG_TARGETABLE_RITXIT For most rigs these are non-vfo specific commands so we can avoid doing VFO switching Add flags to all Yaesu, Icom, and Kenwood in rig_open Some rigs do have VFO specific but it's already in the backend More rigs can use these flags..TBD... https://github.com/Hamlib/Hamlib/issues/430 (cherry picked from commit 74356b3a99c836bbcb3f784ce2f39284a02cfb0b) diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 03474a84..013ad650 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -457,6 +457,9 @@ typedef unsigned int vfo_t; /* * targetable bitfields, for internal use. * RIG_TARGETABLE_PURE means a pure targetable radio on every command + * In rig.c lack of a flag will case a VFO change if needed + * So setting this flag will mean the backend handles any VFO needs + * For many rigs RITXIT and PTT are non-VFO commands so need these flags */ //! @cond Doxygen_Suppress #define RIG_TARGETABLE_NONE 0 @@ -466,6 +469,8 @@ typedef unsigned int vfo_t; #define RIG_TARGETABLE_TONE (1<<3) #define RIG_TARGETABLE_FUNC (1<<4) #define RIG_TARGETABLE_LEVEL (1<<5) +#define RIG_TARGETABLE_RITXIT (1<<6) +#define RIG_TARGETABLE_PTT (1<<7) #define RIG_TARGETABLE_ALL 0x7fffffff //! @endcond // diff --git a/rigs/dummy/dummy.c b/rigs/dummy/dummy.c index 1eb02497..c214ce3c 100644 --- a/rigs/dummy/dummy.c +++ b/rigs/dummy/dummy.c @@ -2078,7 +2078,7 @@ struct rig_caps dummy_caps = .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_OTHER, - .targetable_vfo = 0, + .targetable_vfo = RIG_TARGETABLE_PTT|RIG_TARGETABLE_RITXIT, .ptt_type = RIG_PTT_RIG, .dcd_type = RIG_DCD_RIG, .port_type = RIG_PORT_NONE, @@ -2243,7 +2243,7 @@ struct rig_caps dummy_no_vfo_caps = .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_OTHER, - .targetable_vfo = 0, + .targetable_vfo = RIG_TARGETABLE_PTT|RIG_TARGETABLE_RITXIT, .ptt_type = RIG_PTT_RIG, .dcd_type = RIG_DCD_RIG, .port_type = RIG_PORT_NONE, diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index fadfd433..d7bc08d8 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -814,6 +814,10 @@ icom_rig_open(RIG *rig) #if 0 // do not do this here -- needs to be done when ranges are requested instead as this is very slow icom_get_freq_range(rig); // try get to get rig range capability dyamically #endif + // All Icom rigs as of 20201031 do not need VFO switch for PTT and RITXIT + // They are non-VFO specific commands + // If they ever become VFO specific implement in the backend + rig->caps->targetable_vfo |= RIG_TARGETABLE_PTT | RIG_TARGETABLE_RITXIT; return RIG_OK; } diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index a8e7d79b..6dea3477 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -937,6 +937,12 @@ int kenwood_open(RIG *rig) // we're making this non fatal // mismatched IDs can still be tested rig->state.rigport.retry = retry_save; + + // All Kenwood rigs as of 20201031 do not need VFO switch for PTT and RITXIT + // They are non-VFO specific commands + // If they ever become VFO specific implement in the backend + + rig->caps->targetable_vfo |= RIG_TARGETABLE_PTT | RIG_TARGETABLE_RITXIT; return RIG_OK; } diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 285bdef0..ad8bac00 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -529,6 +529,12 @@ int newcat_open(RIG *rig) /* Initialize rig_id in case any subsequent commands need it */ (void)newcat_get_rigid(rig); + // All Yaeus rigs as of 20201031 do not need VFO switch for PTT and RITXIT + // They are non-VFO specific commands + // A couple of rigs do have vfo-specific in the backends + // If they ever become VFO specific implement in the backend + rig->caps->targetable_vfo |= RIG_TARGETABLE_PTT | RIG_TARGETABLE_RITXIT; + return RIG_OK; } diff --git a/src/rig.c b/src/rig.c index ffeb0b4b..69a990dd 100644 --- a/src/rig.c +++ b/src/rig.c @@ -2271,7 +2271,7 @@ int HAMLIB_API rig_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) return -RIG_ENIMPL; } - if ((caps->targetable_vfo & RIG_TARGETABLE_PURE) + if ((caps->targetable_vfo & RIG_TARGETABLE_PTT) || vfo == RIG_VFO_CURR || vfo == rig->state.current_vfo) { @@ -2486,7 +2486,7 @@ int HAMLIB_API rig_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) return RIG_OK; } - if ((caps->targetable_vfo & RIG_TARGETABLE_PURE) + if ((caps->targetable_vfo & RIG_TARGETABLE_PTT) || vfo == RIG_VFO_CURR || vfo == rig->state.current_vfo) { @@ -3860,7 +3860,7 @@ int HAMLIB_API rig_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit) return -RIG_ENAVAIL; } - if ((caps->targetable_vfo & RIG_TARGETABLE_PURE) + if ((caps->targetable_vfo & RIG_TARGETABLE_RITXIT) || vfo == RIG_VFO_CURR || vfo == rig->state.current_vfo) { @@ -3928,7 +3928,7 @@ int HAMLIB_API rig_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit) return -RIG_ENAVAIL; } - if ((caps->targetable_vfo & RIG_TARGETABLE_PURE) + if ((caps->targetable_vfo & RIG_TARGETABLE_RITXIT) || vfo == RIG_VFO_CURR || vfo == rig->state.current_vfo) { @@ -3996,7 +3996,7 @@ int HAMLIB_API rig_set_xit(RIG *rig, vfo_t vfo, shortfreq_t xit) return -RIG_ENAVAIL; } - if ((caps->targetable_vfo & RIG_TARGETABLE_PURE) + if ((caps->targetable_vfo & RIG_TARGETABLE_RITXIT) || vfo == RIG_VFO_CURR || vfo == rig->state.current_vfo) { @@ -4064,7 +4064,7 @@ int HAMLIB_API rig_get_xit(RIG *rig, vfo_t vfo, shortfreq_t *xit) return -RIG_ENAVAIL; } - if ((caps->targetable_vfo & RIG_TARGETABLE_PURE) + if ((caps->targetable_vfo & RIG_TARGETABLE_RITXIT) || vfo == RIG_VFO_CURR || vfo == rig->state.current_vfo) { commit b5c97fca61279cbf1c3ed3df3a6cd608bca094c0 Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Oct 31 17:18:08 2020 -0500 Fix cppcheck for memcsv.c (cherry picked from commit fe672e8115de4bd557498e26bfb199e196548e20) diff --git a/tests/memcsv.c b/tests/memcsv.c index b5ed3b0c..0bbade49 100644 --- a/tests/memcsv.c +++ b/tests/memcsv.c @@ -304,7 +304,7 @@ static char *mystrtok(char *s, char delim) } } - // cppcheck-suppress nullPointerArithmeticRedundantCheck + // cppcheck-suppress * return str + ent_pos; } commit 08680a5f281d070f02db9c8f742bb61318a196a9 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Oct 29 23:47:43 2020 -0500 WSJT-X is working with the IC-729 so promotint to stable https://github.com/Hamlib/Hamlib/issues/429 (cherry picked from commit 06cc95de56dcb3fcb58f79e88c75387437416773) diff --git a/rigs/icom/ic728.c b/rigs/icom/ic728.c index d799f753..2b2617b2 100644 --- a/rigs/icom/ic728.c +++ b/rigs/icom/ic728.c @@ -183,7 +183,7 @@ const struct rig_caps ic729_caps = .mfg_name = "Icom", .version = BACKEND_VER ".0", .copyright = "LGPL", - .status = RIG_STATUS_ALPHA, + .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, .ptt_type = RIG_PTT_NONE, .dcd_type = RIG_DCD_NONE, commit 459a0303c31bba55a7a20603dda9fa4e4295b29d Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Oct 29 22:45:57 2020 -0500 Finish IC-729 addition https://github.com/Hamlib/Hamlib/issues/429 (cherry picked from commit f55d50c7bcfc5a32e6a9fa7c6c0ab21e2a2791a8) diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index eab78ea7..fadfd433 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -7570,6 +7570,7 @@ DECLARE_INITRIG_BACKEND(icom) rig_register(&ic781_caps); rig_register(&ic707_caps); rig_register(&ic728_caps); + rig_register(&ic729_caps); rig_register(&ic820h_caps); rig_register(&ic821h_caps); diff --git a/rigs/icom/icom.h b/rigs/icom/icom.h index 808b7521..a52b9069 100644 --- a/rigs/icom/icom.h +++ b/rigs/icom/icom.h @@ -347,6 +347,7 @@ extern const struct rig_caps ic718_caps; extern const struct rig_caps ic725_caps; extern const struct rig_caps ic726_caps; extern const struct rig_caps ic728_caps; +extern const struct rig_caps ic729_caps; extern const struct rig_caps ic735_caps; extern const struct rig_caps ic736_caps; extern const struct rig_caps ic737_caps; commit acfb0d4c9ec218e426af622f570f355b87fbff05 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Oct 29 22:30:34 2020 -0500 Add IC-729 https://github.com/Hamlib/Hamlib/issues/429 (cherry picked from commit c8eaafb499948cb28ea41205dbd4b81ae0d76a90) diff --git a/rigs/icom/ic728.c b/rigs/icom/ic728.c index 5d75075b..d799f753 100644 --- a/rigs/icom/ic728.c +++ b/rigs/icom/ic728.c @@ -168,3 +168,121 @@ const struct rig_caps ic728_caps = }; +static const struct icom_priv_caps ic729_priv_caps = +{ + 0x3a, /* default address */ + 0, /* 731 mode */ + 0, /* no XCHG */ + ic737_ts_sc_list +}; + +const struct rig_caps ic729_caps = +{ + RIG_MODEL(RIG_MODEL_IC729), + .model_name = "IC-729", + .mfg_name = "Icom", + .version = BACKEND_VER ".0", + .copyright = "LGPL", + .status = RIG_STATUS_ALPHA, + .rig_type = RIG_TYPE_TRANSCEIVER, + .ptt_type = RIG_PTT_NONE, + .dcd_type = RIG_DCD_NONE, + .port_type = RIG_PORT_SERIAL, + .serial_rate_min = 1200, + .serial_rate_max = 9600, + .serial_data_bits = 8, + .serial_stop_bits = 2, + .serial_parity = RIG_PARITY_NONE, + .serial_handshake = RIG_HANDSHAKE_NONE, + .write_delay = 0, + .post_write_delay = 0, + .timeout = 1000, + .retry = 3, + .has_get_func = RIG_FUNC_NONE, + .has_set_func = RIG_FUNC_NONE, + .has_get_level = RIG_LEVEL_NONE, + .has_set_level = RIG_LEVEL_NONE, + .has_get_parm = RIG_PARM_NONE, + .has_set_parm = RIG_PARM_NONE, + .level_gran = {}, + .parm_gran = {}, + .ctcss_list = NULL, + .dcs_list = NULL, + .preamp = { RIG_DBLST_END, }, + .attenuator = { RIG_DBLST_END, }, + .max_rit = Hz(0), + .max_xit = Hz(0), + .max_ifshift = Hz(0), + .targetable_vfo = 0, + .vfo_ops = IC728_VFO_OPS, + .scan_ops = IC728_SCAN_OPS, + .transceive = RIG_TRN_RIG, + .bank_qty = 0, + .chan_desc_sz = 0, + + .chan_list = { + { 1, 26, RIG_MTYPE_MEM, IC_MIN_MEM_CAP }, + RIG_CHAN_END, + }, + + .rx_range_list1 = { + {kHz(500), MHz(30), IC728_ALL_RX_MODES, -1, -1, IC728_VFO_ALL}, + RIG_FRNG_END, + }, + .tx_range_list1 = { + FRQ_RNG_HF(1, IC728_OTHER_TX_MODES, W(10), W(100), IC728_VFO_ALL, IC728_ANTS), + FRQ_RNG_HF(1, IC728_AM_TX_MODES, W(10), W(40), IC728_VFO_ALL, IC728_ANTS), /* AM class */ + RIG_FRNG_END, + }, + + .rx_range_list2 = { + {kHz(500), MHz(30), IC728_ALL_RX_MODES, -1, -1, IC728_VFO_ALL}, + RIG_FRNG_END, + }, + .tx_range_list2 = { + FRQ_RNG_HF(2, IC728_OTHER_TX_MODES, W(10), W(100), IC728_VFO_ALL, IC728_ANTS), + FRQ_RNG_HF(2, IC728_AM_TX_MODES, W(10), W(40), IC728_VFO_ALL, IC728_ANTS), /* AM class */ + RIG_FRNG_END, + }, + + .tuning_steps = { + {IC728_ALL_RX_MODES, 10}, /* basic resolution, there's no set_ts */ + RIG_TS_END, + }, + /* mode/filter list, remember: order matters! */ + .filters = { + {RIG_MODE_SSB | RIG_MODE_CW, kHz(2.1)}, + {RIG_MODE_AM, kHz(6)}, + {RIG_MODE_FM, kHz(12)}, + RIG_FLT_END, + }, + + .cfgparams = icom_cfg_params, + .set_conf = icom_set_conf, + .get_conf = icom_get_conf, + + .priv = (void *)& ic729_priv_caps, + .rig_init = icom_init, + .rig_cleanup = icom_cleanup, + .rig_open = icom_rig_open, + .rig_close = icom_rig_close, + + .set_freq = icom_set_freq, + .get_freq = icom_get_freq, + .set_mode = icom_set_mode, + .get_mode = icom_get_mode, + .set_vfo = icom_set_vfo, + .set_split_vfo = icom_set_split_vfo, + .set_split_freq = icom_set_split_freq, + .get_split_freq = icom_get_split_freq, + .set_split_mode = icom_set_split_mode, + .get_split_mode = icom_get_split_mode, + + .scan = icom_scan, + + .decode_event = icom_decode_event, + .set_mem = icom_set_mem, + .vfo_op = icom_vfo_op, + +}; + commit f4848a8e0f8b74368b2c15ff495967ba1718c315 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Oct 29 12:54:35 2020 -0500 remove some cppcheck statements not needed anymore (cherry picked from commit 07447c881d8efd68205f06a183fab08cb09372ce) diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index b81db412..03474a84 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -24,13 +24,9 @@ #ifndef _RIG_H #define _RIG_H 1 -// cppcheck-suppress * #include <stdio.h> -// cppcheck-suppress * #include <stdarg.h> -// cppcheck-suppress * #include <inttypes.h> -// cppcheck-suppress * #include <time.h> /* Rig list is in a separate file so as not to mess up w/ this one */ @@ -2787,7 +2783,6 @@ extern HAMLIB_EXPORT(int) rig_set_cache_timeout_ms(RIG *rig, hamlib_cache_t sele extern HAMLIB_EXPORT(int) rig_set_vfo_opt(RIG *rig, int status); -// cppcheck-suppress * typedef unsigned long rig_useconds_t; extern HAMLIB_EXPORT(int) hl_usleep(rig_useconds_t msec); commit 8e44485802b32fa9dbbea1186f802b521994665c Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Oct 29 12:54:13 2020 -0500 update newcat.h version (cherry picked from commit 73d05831f3e896c5b336f1588bcb643c2a4f821a) diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h index ff2bb045..85ff10a2 100644 --- a/rigs/yaesu/newcat.h +++ b/rigs/yaesu/newcat.h @@ -50,7 +50,7 @@ typedef char ncboolean; /* shared function version */ -#define NEWCAT_VER "20201028" +#define NEWCAT_VER "20201029" /* Hopefully large enough for future use, 128 chars plus '\0' */ #define NEWCAT_DATA_LEN 129 commit 6eca8e7fb836f14bd0896692e11e76a1c27c564e Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Oct 29 12:53:39 2020 -0500 remove some cppcheck statements not needed anymore (cherry picked from commit 378cbfb0082cfd02fcfff740f56afdedf21dd225) diff --git a/rigs/icom/icom.h b/rigs/icom/icom.h index 4e0bcd06..808b7521 100644 --- a/rigs/icom/icom.h +++ b/rigs/icom/icom.h @@ -27,7 +27,6 @@ #include "tones.h" #ifdef HAVE_SYS_TIME_H -// cppcheck-suppress * #include <sys/time.h> #endif commit 3096b403888b4d255c29896ea4a822e21cb2fd78 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Oct 29 12:52:54 2020 -0500 remove some cppcheck statements not needed anymore (cherry picked from commit 0fef98fc43c37c9da7ccea2cd29123aa30ae29b9) diff --git a/src/iofunc.h b/src/iofunc.h index a1edbdff..efe8b668 100644 --- a/src/iofunc.h +++ b/src/iofunc.h @@ -22,7 +22,6 @@ #ifndef _IOFUNC_H #define _IOFUNC_H 1 -// cppcheck-suppress * #include <sys/types.h> #include <hamlib/rig.h> diff --git a/src/misc.h b/src/misc.h index 24aa869f..5378f1da 100644 --- a/src/misc.h +++ b/src/misc.h @@ -84,12 +84,10 @@ extern int no_restore_ai; /* needs config.h included beforehand in .c file */ #ifdef HAVE_INTTYPES_H -// cppcheck-suppress * # include <inttypes.h> #endif #ifdef HAVE_SYS_TIME_H -// cppcheck-suppress * # include <sys/time.h> #endif diff --git a/src/parallel.h b/src/parallel.h index 56afaca2..c676ee43 100644 --- a/src/parallel.h +++ b/src/parallel.h @@ -27,7 +27,6 @@ #include "iofunc.h" #ifdef HAVE_LINUX_PARPORT_H -// cppcheck-suppress * # include <linux/parport.h> #endif commit d19eb9ff3c4d4411336273a8fb42d98ede418fd0 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Oct 29 12:52:09 2020 -0500 remove some cppcheck statements not needed anymore (cherry picked from commit ce7a30f038417be93507b44f5aa1ff723aa5ac80) diff --git a/tests/memcsv.c b/tests/memcsv.c index 8e27088f..b5ed3b0c 100644 --- a/tests/memcsv.c +++ b/tests/memcsv.c @@ -25,20 +25,13 @@ # include "config.h" #endif -// cppcheck-suppress * #include <stdio.h> -// cppcheck-suppress * #include <stdlib.h> -// cppcheck-suppress * #include <string.h> -// cppcheck-suppress * #include <unistd.h> -// cppcheck-suppress * #include <ctype.h> -// cppcheck-suppress * #include <errno.h> -// cppcheck-suppress * #include <getopt.h> #include <hamlib/rig.h> @@ -311,7 +304,7 @@ static char *mystrtok(char *s, char delim) } } - // cppcheck-suppress * + // cppcheck-suppress nullPointerArithmeticRedundantCheck return str + ent_pos; } commit 88a0ef4609bed069de117932812758813d8a6444 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Oct 29 10:24:25 2020 -0500 Fix newcat_band_index frequencies https://github.com/Hamlib/Hamlib/issues/424 (cherry picked from commit 9f65348f496cdb4325a5ff916e0d8a30637a7aba) diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index ed52d54b..285bdef0 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -391,28 +391,29 @@ static ncboolean newcat_valid_command(RIG *rig, char const *const command); */ static int newcat_band_index(freq_t freq) { - // FTDX101D has band=12=MW...what is that? + // FTDX101D has band=12=MW Medium Wave int band = 11; // general // what about 13? - if (freq >= 420 && freq < 470) { band = 16; } - else if (freq >= 144 && freq < 148) { band = 15; } - else if (freq >= 118 && freq < 164) { band = 14; } - else if (freq >= 70 && freq < 75) { band = 17; } - else if (freq >= 50 && freq < 54) { band = 10; } + if (freq >= MHz(420) && freq < MHz(470)) { band = 16; } + else if (freq >= MHz(144) && freq < MHz(148)) { band = 15; } + else if (freq >= MHz(118) && freq < MHz(164)) { band = 14; } + else if (freq >= MHz(70) && freq < MHz(75)) { band = 17; } + else if (freq >= MHz(50) && freq < MHz(54)) { band = 10; } // do we need to restrict ranges below here? - else if (freq >= 28) { band = 9; } - else if (freq >= 24.5) { band = 8; } - else if (freq >= 21) { band = 7; } - else if (freq >= 18) { band = 6; } - else if (freq >= 14) { band = 5; } - else if (freq >= 10) { band = 4; } - else if (freq >= 7) { band = 3; } - else if (freq >= 5) { band = 2; } - else if (freq >= 3.5) { band = 1; } - else if (freq >= 1.8) { band = 0; } - - rig_debug(RIG_DEBUG_TRACE, "%s: band=%d\n", __func__, band); + else if (freq >= MHz(28)) { band = 9; } + else if (freq >= MHz(24.5)) { band = 8; } + else if (freq >= MHz(21)) { band = 7; } + else if (freq >= MHz(18)) { band = 6; } + else if (freq >= MHz(14)) { band = 5; } + else if (freq >= MHz(10)) { band = 4; } + else if (freq >= MHz(7)) { band = 3; } + else if (freq >= MHz(5)) { band = 2; } + else if (freq >= MHz(3.5)) { band = 1; } + else if (freq >= MHz(1.8)) { band = 0; } + else if (freq >= MHz(0.5)) { band = 12; } // MW Medium Wave + + rig_debug(RIG_DEBUG_TRACE, "%s: freq=%g, band=%d\n", __func__, freq, band); return band; } commit 3da2b6e16d662333da57889db36012599bc0eeff Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Oct 29 08:17:40 2020 -0500 Enhance ic7000 set bandwidth and prompt ic7000 to stable https://github.com/Hamlib/Hamlib/issues/428 (cherry picked from commit 31b20c003cc1b4025fff51a85d76468dbfd22031) diff --git a/rigs/icom/ic7000.c b/rigs/icom/ic7000.c index b2169943..b722be8d 100644 --- a/rigs/icom/ic7000.c +++ b/rigs/icom/ic7000.c @@ -135,6 +135,35 @@ struct cmdparams ic7000_extcmds[] = { {.s = RIG_PARM_NONE} } }; +/* + * This function does the special bandwidth coding for IC-7000 + */ +static int ic7000_r2i_mode(RIG *rig, rmode_t mode, pbwidth_t width, + unsigned char *md, signed char *pd) +{ + int err; + + err = rig2icom_mode(rig, mode, width, md, pd); + + if (err != RIG_OK) + { + return err; + } + + // CAT section of manual says: nn = 0 -40 > bw = 50Hz > 3600Hz + // Tested by Ian G3VPX 20201029 + // 0 - 9 > bw 50Hz to 500Hz in 50Hz steps + // 10 - 40 > bw 600Hz to 3600Hz in 100Hz steps + if (width != RIG_PASSBAND_NOCHANGE) + { + if (width <= 500) { *pd = width / 50 - 1; } + else if (width <= 3600) { *pd = width / 100 + 4; } + else { *pd = 40; } + } + + return RIG_OK; +} + /* * IC-7000 rig capabilities. */ @@ -152,6 +181,7 @@ static const struct icom_priv_caps IC7000_priv_caps = { .level = -1, .icom_level = 0 }, }, .extcmds = ic7000_extcmds, + .r2i_mode = ic7000_r2i_mode }; const struct rig_caps ic7000_caps = @@ -159,9 +189,9 @@ const struct rig_caps ic7000_caps = RIG_MODEL(RIG_MODEL_IC7000), .model_name = "IC-7000", .mfg_name = "Icom", - .version = BACKEND_VER ".0", + .version = BACKEND_VER ".1", .copyright = "LGPL", - .status = RIG_STATUS_BETA, + .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, .ptt_type = RIG_PTT_RIG, .dcd_type = RIG_DCD_RIG, commit 8b9e45216ea92b8ad2b818cd7769836ca92a20a6 Author: Nate Bargmann <n0...@n0...> Date: Thu Oct 29 07:43:56 2020 -0500 Match rigs/yaesu/newcat.c and ftdx1010.h to the version in the master branch This likely means that its behavior is entirely broken in this branch up to this commit due to trying to fix cherry-pick conflicts and choosing the wrong one... diff --git a/rigs/yaesu/ftdx101.h b/rigs/yaesu/ftdx101.h index b810fcb7..66be4a8a 100644 --- a/rigs/yaesu/ftdx101.h +++ b/rigs/yaesu/ftdx101.h @@ -71,6 +71,7 @@ RIG_OP_UP|RIG_OP_DOWN|RIG_OP_BAND_UP|RIG_OP_BAND_DOWN|\ RIG_OP_TO_VFO|RIG_OP_FROM_VFO|RIG_OP_TOGGLE) +// Based on testing with G3VPX Ian Sumner #define FTDX101D_SWR_CAL \ { \ 8, \ diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index d3a28274..ed52d54b 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -151,15 +151,49 @@ const cal_table_float_t yaesu_default_alc_cal = { 3, { - // Based on testing with G3VPX Ian Sumner - {0, 1.0f}, - {26, 1.2f}, - {52, 1.5f}, - {89, 2.0f}, - {126, 3.0f}, - {173, 4.0f}, - {236, 5.0f}, - {255, 25.0f}, + {0, 0.0f}, + {128, 1.0f}, + {255, 2.0f}, + } +}; + +// TODO: Provide sane defaults +const cal_table_float_t yaesu_default_comp_meter_cal = +{ + 2, + { + {0, 0.0f}, + {255, 1.0f}, + } +}; + +// TODO: Provide sane defaults +const cal_table_float_t yaesu_default_rfpower_meter_cal = +{ + 2, + { + {0, 0.0f}, + {255, 1.0f}, + } +}; + +// TODO: Provide sane defaults +const cal_table_float_t yaesu_default_vd_meter_cal = +{ + 2, + { + {0, 0.0f}, + {255, 1.0f}, + } +}; + +// TODO: Provide sane defaults +const cal_table_float_t yaesu_default_id_meter_cal = +{ + 2, + { + {0, 0.0f}, + {255, 1.0f}, } }; commit 1133b783e430352267e2e12413add23983acb403 Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Oct 28 09:43:26 2020 -0500 Fix newcat_band_index May need some more restrictions if people are using odd frequencies https://github.com/Hamlib/Hamlib/issues/424 (cherry picked from commit bd47d262b8e415e04a569126a31406641b9d8ea3) diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 2c372e62..d3a28274 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -360,9 +360,13 @@ static int newcat_band_index(freq_t freq) // FTDX101D has band=12=MW...what is that? int band = 11; // general - if (freq >= 70) { band = 17; } - // what about 11-16? - else if (freq >= 50) { band = 10; } + // what about 13? + if (freq >= 420 && freq < 470) { band = 16; } + else if (freq >= 144 && freq < 148) { band = 15; } + else if (freq >= 118 && freq < 164) { band = 14; } + else if (freq >= 70 && freq < 75) { band = 17; } + else if (freq >= 50 && freq < 54) { band = 10; } + // do we need to restrict ranges below here? else if (freq >= 28) { band = 9; } else if (freq >= 24.5) { band = 8; } else if (freq >= 21) { band = 7; } commit 0b2d68d1f233681cacebfb148b3813b915cbfdc9 Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Oct 28 09:26:06 2020 -0500 Fix newcat_band_index https://github.com/Hamlib/Hamlib/issues/424 (cherry picked from commit cc529aab0cd57347a562d1cc3ca040400ed5afbf) diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 2976f66e..2c372e62 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -360,19 +360,19 @@ static int newcat_band_index(freq_t freq) // FTDX101D has band=12=MW...what is that? int band = 11; // general - if (freq >= 1.8) { band = 0; } - else if (freq >= 3.5) { band = 1; } - else if (freq >= 5) { band = 2; } - else if (freq >= 7) { band = 3; } - else if (freq >= 10) { band = 4; } - else if (freq >= 14) { band = 5; } - else if (freq >= 18) { band = 6; } - else if (freq >= 21) { band = 7; } - else if (freq >= 24.5) { band = 8; } - else if (freq >= 28) { band = 9; } - else if (freq >= 50) { band = 10; } + if (freq >= 70) { band = 17; } // what about 11-16? - else if (freq >= 70) { band = 17; } + else if (freq >= 50) { band = 10; } + else if (freq >= 28) { band = 9; } + else if (freq >= 24.5) { band = 8; } + else if (freq >= 21) { band = 7; } + else if (freq >= 18) { band = 6; } + else if (freq >= 14) { band = 5; } + else if (freq >= 10) { band = 4; } + else if (freq >= 7) { band = 3; } + else if (freq >= 5) { band = 2; } + else if (freq >= 3.5) { band = 1; } + else if (freq >= 1.8) { band = 0; } rig_debug(RIG_DEBUG_TRACE, "%s: band=%d\n", __func__, band); return band; commit 98e87d91d5390d3e58cec68c1c03e30aad698a24 Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Oct 28 08:53:55 2020 -0500 Make the BS cmd write the band instead of read it in newcat.c https://github.com/Hamlib/Hamlib/issues/424 (cherry picked from commit aeabe40acde2fb7a86e204bcde7d707bc41e8f8a) diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index c30f16e0..2976f66e 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -731,7 +731,8 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) if (newcat_valid_command(rig, "BS") && newcat_band_index(freq) != newcat_band_index(rig->state.current_freq)) { - snprintf(priv->cmd_str, sizeof(priv->cmd_str), "BS%c", cat_term); + snprintf(priv->cmd_str, sizeof(priv->cmd_str), "BS%02d%c", + ... [truncated message content] |