hamlib-cvs-digest Mailing List for Ham Radio Control Libraries (Page 17)
Library to control radio transceivers and receivers
Brought to you by:
n0nb
You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(57) |
Nov
(27) |
Dec
(25) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(41) |
Feb
(101) |
Mar
(60) |
Apr
(32) |
May
(32) |
Jun
(198) |
Jul
(95) |
Aug
(60) |
Sep
(48) |
Oct
(96) |
Nov
(27) |
Dec
(222) |
2002 |
Jan
(180) |
Feb
(46) |
Mar
(68) |
Apr
(11) |
May
(36) |
Jun
(34) |
Jul
(113) |
Aug
(42) |
Sep
(71) |
Oct
(65) |
Nov
(116) |
Dec
(40) |
2003 |
Jan
(32) |
Feb
(92) |
Mar
(29) |
Apr
(102) |
May
(21) |
Jun
(34) |
Jul
(3) |
Aug
(60) |
Sep
(30) |
Oct
(62) |
Nov
(57) |
Dec
(33) |
2004 |
Jan
(28) |
Feb
(46) |
Mar
(16) |
Apr
(14) |
May
(31) |
Jun
(21) |
Jul
(10) |
Aug
(80) |
Sep
(42) |
Oct
(11) |
Nov
(28) |
Dec
(13) |
2005 |
Jan
(35) |
Feb
(26) |
Mar
(20) |
Apr
(118) |
May
(2) |
Jun
(5) |
Jul
|
Aug
|
Sep
(5) |
Oct
(1) |
Nov
(13) |
Dec
(1) |
2006 |
Jan
(9) |
Feb
(25) |
Mar
(22) |
Apr
(6) |
May
|
Jun
|
Jul
(2) |
Aug
(1) |
Sep
(3) |
Oct
(46) |
Nov
(13) |
Dec
(7) |
2007 |
Jan
(9) |
Feb
(14) |
Mar
(3) |
Apr
|
May
(6) |
Jun
(1) |
Jul
|
Aug
(11) |
Sep
(7) |
Oct
(8) |
Nov
(41) |
Dec
(3) |
2008 |
Jan
(27) |
Feb
(16) |
Mar
(13) |
Apr
(23) |
May
(39) |
Jun
(4) |
Jul
(7) |
Aug
(1) |
Sep
(13) |
Oct
(52) |
Nov
(44) |
Dec
(55) |
2009 |
Jan
(72) |
Feb
(69) |
Mar
|
Apr
|
May
|
Jun
(13) |
Jul
(1) |
Aug
(6) |
Sep
(15) |
Oct
(11) |
Nov
(31) |
Dec
(20) |
2010 |
Jan
(24) |
Feb
(21) |
Mar
(22) |
Apr
(40) |
May
(38) |
Jun
(4) |
Jul
(2) |
Aug
(22) |
Sep
(19) |
Oct
(14) |
Nov
(5) |
Dec
(8) |
2011 |
Jan
(14) |
Feb
(36) |
Mar
(6) |
Apr
|
May
|
Jun
(23) |
Jul
(13) |
Aug
(8) |
Sep
(7) |
Oct
|
Nov
(3) |
Dec
(9) |
2012 |
Jan
(17) |
Feb
(13) |
Mar
(10) |
Apr
|
May
(1) |
Jun
(14) |
Jul
(4) |
Aug
(12) |
Sep
(2) |
Oct
(24) |
Nov
(14) |
Dec
(2) |
2013 |
Jan
(4) |
Feb
(3) |
Mar
(3) |
Apr
(3) |
May
(10) |
Jun
(4) |
Jul
(7) |
Aug
|
Sep
(15) |
Oct
(5) |
Nov
(1) |
Dec
(2) |
2014 |
Jan
|
Feb
(8) |
Mar
(1) |
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
(3) |
Oct
(7) |
Nov
(6) |
Dec
(3) |
2015 |
Jan
(4) |
Feb
(5) |
Mar
(8) |
Apr
(8) |
May
(2) |
Jun
|
Jul
(4) |
Aug
(7) |
Sep
(8) |
Oct
|
Nov
(6) |
Dec
(4) |
2016 |
Jan
(6) |
Feb
(26) |
Mar
(3) |
Apr
(10) |
May
(6) |
Jun
(5) |
Jul
(1) |
Aug
(4) |
Sep
(3) |
Oct
(4) |
Nov
(3) |
Dec
(10) |
2017 |
Jan
(11) |
Feb
(11) |
Mar
(2) |
Apr
(1) |
May
(7) |
Jun
(2) |
Jul
(11) |
Aug
(9) |
Sep
(5) |
Oct
(5) |
Nov
(1) |
Dec
(2) |
2018 |
Jan
(5) |
Feb
(2) |
Mar
(19) |
Apr
(7) |
May
(11) |
Jun
(3) |
Jul
(4) |
Aug
(10) |
Sep
(2) |
Oct
(8) |
Nov
(6) |
Dec
(9) |
2019 |
Jan
(9) |
Feb
(6) |
Mar
(2) |
Apr
(4) |
May
(6) |
Jun
(9) |
Jul
(6) |
Aug
(3) |
Sep
(5) |
Oct
(2) |
Nov
(8) |
Dec
(9) |
2020 |
Jan
(15) |
Feb
(1) |
Mar
(18) |
Apr
(33) |
May
(43) |
Jun
(87) |
Jul
(45) |
Aug
(8) |
Sep
(43) |
Oct
(3) |
Nov
(5) |
Dec
(42) |
2021 |
Jan
(116) |
Feb
(40) |
Mar
(58) |
Apr
(48) |
May
(29) |
Jun
(2) |
Jul
|
Aug
(22) |
Sep
(18) |
Oct
(1) |
Nov
|
Dec
(3) |
2022 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
(1) |
May
(2) |
Jun
(1) |
Jul
|
Aug
(1) |
Sep
|
Oct
(6) |
Nov
(2) |
Dec
(9) |
2023 |
Jan
(10) |
Feb
|
Mar
|
Apr
(10) |
May
(3) |
Jun
(1) |
Jul
(2) |
Aug
(4) |
Sep
(1) |
Oct
|
Nov
(2) |
Dec
(3) |
2024 |
Jan
(4) |
Feb
(1) |
Mar
(2) |
Apr
(2) |
May
(5) |
Jun
(3) |
Jul
(1) |
Aug
(2) |
Sep
|
Oct
(2) |
Nov
(3) |
Dec
(9) |
2025 |
Jan
(5) |
Feb
(5) |
Mar
|
Apr
(10) |
May
(20) |
Jun
(43) |
Jul
(24) |
Aug
(20) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Michael B. <mdb...@us...> - 2021-03-08 13:32:03
|
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 57ba6800f1bc918653a12612a88ec5abacfe70b4 (commit) from b4dd01f6f38ff64fd1c638d5aa59e8ca7c59ca67 (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 57ba6800f1bc918653a12612a88ec5abacfe70b4 Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Mar 8 07:31:21 2021 -0600 More debug info when frequency cannot be set diff --git a/src/rig.c b/src/rig.c index 0a807bd8..59036160 100644 --- a/src/rig.c +++ b/src/rig.c @@ -1618,7 +1618,7 @@ int HAMLIB_API rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq) if (retry == 0) { - rig_debug(RIG_DEBUG_ERR, "%s: unable to set frequency!!\n", __func__); + rig_debug(RIG_DEBUG_ERR, "%s: unable to set frequency!!, asked for %.0f, got %.0f\n", __func__, freq, tfreq); } } else ----------------------------------------------------------------------- Summary of changes: src/rig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-03-07 20:28:21
|
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 b4dd01f6f38ff64fd1c638d5aa59e8ca7c59ca67 (commit) via 8296ca7ecd64bb3f339cae8788c6bf564c60a4e7 (commit) via c1f539b1f6f113d3c209fa5f456fd6c160ed6304 (commit) via a35f39840c0117816850bd8ad8bab73e93021dcd (commit) via 307858f60c4c6dad3abc22c406ccf47aa32ebe73 (commit) via 94e51bfa245b6e5e2c1459a0098c49d1f8828943 (commit) via b2a0b15a67596c49f12f3f5c82dd167c2ae54b1e (commit) via 4cc1515f90d4209b4c80a7692ffd0818848f2365 (commit) via 4d116d2f6ccda1095e509683418839f9b7a84f77 (commit) via f2586d0acbe3cd4b683bbd8e85dbbdd50255e32c (commit) via 3cad5c9a30148c05e42ccb0b73d7cbabe29a508c (commit) via 1fcb9404b9138804e1a2c4c9d3cd0c80daf07fde (commit) via 2fb96a34b99ca69f80a47c96fb9674ef28956558 (commit) via 6577c0f564508281b560905516def0a325aa07eb (commit) via 3d613519d52b8520d7a66f03389b2a2b3abf0c0a (commit) via e6e04d258c7751608a587df5cb75d2f50d379181 (commit) via 175092a99c3a6f9470f461e0d9fac630f01999e3 (commit) via a791dc26993911cfed723ae37feddb2f6c7632b2 (commit) via e954a5df2d4f35d611b552338615ab766ba857f0 (commit) via 9a44b2777532d01bc189143a3205f8a276b50b55 (commit) via ef2e8a4d94d854c179e0ca16beef8c4147ee6eea (commit) via 3aac60b5dfd18214f644a8a8e66a1d056e23451a (commit) via 678f01d79d929d833254a468bef55756fd113b99 (commit) via b9afd75110b1d8c6e7b96f3c2e12069b3f7efa2c (commit) via ff9c1badfaf3772c20cc131d64115ce560d184a5 (commit) via 709f28100579b9b8d20f4a45f766a7caa684d86a (commit) via a33a4ee09886cda6cb60bbd912a1f1627e34e6b1 (commit) via f88c3f4a4c17dfb39877a2dc449c281ff6bf6a56 (commit) via c3a1b489b7ce034cc6a90276268f7d520ecff70d (commit) via 3413b3ab4e59f96eaf595cdfb3a1a04af7404bd6 (commit) via 2d33066df4f3ff4fd8deaca2e42c169b0fe72c17 (commit) via 0f542ecc4d910f476ed611cddd60e418ba1561a3 (commit) via 43569822a17f3d1c366224bb644bb99b3d825f0b (commit) via 4769baa7742df0af1cf0d755926155b4c43a59bc (commit) via 2c20b0afdb974ed0c290ea7c04ec2f6f97cd91f6 (commit) via 922d6bd0b315fc03cceca4a055b937cba3b99423 (commit) via 3f42111caa9ae500be1c6c10cfce8a59f20a1a28 (commit) via 65d105f2994e3d7638a60abcef1a70681d870b64 (commit) via 635372ae845ab536c1213f0c6b68e154a313bcbc (commit) via 3405ac2d1182e6d6d7e91f8117967cfc37d206a5 (commit) via 20df480b1e5e3a4ac5dfc3926d0b47af584c2fdf (commit) via 662d56c3841d2403888a13743ec65f54e2325c84 (commit) via 247c90d4b0ab588edcb108ff4ecef4214e83e245 (commit) via 1473793f14dad845e1cf7c71abb0dc104495ed94 (commit) via dd009d63ddfd689cce42d88d879f23b2674c68c1 (commit) via d33884750ad3661cf844fae07cdd39c8b50f6681 (commit) via 3ca0313fb49de55ee99bf10a8998ad1913e5704b (commit) via 8b456a18c461401c9e54110715b4fb10dac2c729 (commit) via e38b1469a280edfa0be63660e167b6457386054a (commit) via 5fd5bf521577f31dfa43c8a49d179e5ee1f71ed9 (commit) via 0acbc83a85f7793d7313ae69ed7169b73d6ec0a9 (commit) via 50c00cd1151ef5c069882d126c788b762498870a (commit) via f5135650b37acb0c033952ed5174a4aed16c8f54 (commit) via 5a8953439851c2ab8229ba122a5d4908ac9eceba (commit) via ac5550fc199d589d76a44b9d76142f22e01ddc87 (commit) via 20a7111c5471468162d9ef9065efafa3f8faef23 (commit) via a67c07a774660af546f65a874e25301670d3b18b (commit) via 87478b1fbedf600c402ba9257153f52f9f1bdd42 (commit) via 82126a4f097ac94b25902f3fccc34ec1722075c4 (commit) via 41bfd57eb389ef6e884f119ccc770af6acb17642 (commit) via 6d9f3e1c7bd0bf494064d83c7019e8f2dfa1800c (commit) via 6645419727d7ced4534b67b9776a7222b23cb35f (commit) via 1a8d3b45d302c10f1a85ceb11b557f7f929fc62e (commit) via 4402aff64613bf7721396d8bef9281f010e76399 (commit) via 221d87c2e443e069900281fe14a37ea87f78ff71 (commit) via 18d50bf7c40047d27cfb7b78e90fa9fe2321b277 (commit) via 8371f335cdaae65cb23f5564ac8ae111055707ad (commit) via 396d985261f456183dd65ff4d236971227a65227 (commit) via 5d18d9f38ffa5879b8414b99f8ae4402bfaa6104 (commit) via b1101a564a9d346731dafd0c23fcf367ec60acc1 (commit) via 28f565a8ef8a9c8f93eaecc602c1408629fa5c20 (commit) via 260c74653e27c39786dd3a5ee060d8029b1d02c1 (commit) via 2e56014426831a07349ebe83ed806a8d8f530f6c (commit) via 10fbe9bd4a93faa8a5e9b85d23bb0957bd3bdf60 (commit) via a5b12a12221dc16a572fcd8b999864584bf8c714 (commit) via a568374a7e6c687efc64dfff00b398a78afd69de (commit) via 1f23798efe19bce676ea62827c6509941757eeed (commit) via a5db433628c91ccde1b292c2601ce63759288fc5 (commit) via d45c86cfa7dfefe132b07b6580a8b1d44def1456 (commit) via f12b15b5ca82cda7e9314067940b17551e0cb182 (commit) via 0fe5b62e6ca970cd212cb6f7e7c4e7916d44bc2d (commit) via 635f45ef69e7d24cae38623f9f112d7e7405cea6 (commit) via f5e14a09b642b312ab7d3cb0ffd26c6c9742d026 (commit) via 52703c35d5f011ef006a1e13c7f53d3bf4d29e33 (commit) via 9fa3f59684f5699d3b6210c34c75066ae2e0cb14 (commit) via 6ad5a072c86f6aabdf0fa45b3bb6bc67b578742f (commit) via 8997f0129a56ecdb67cbf2ce3045dc12584b4427 (commit) via 5df06c4cbfee7b124095553d95183759d7675b82 (commit) via 2976239f3a95fcce39e91bc05574d4c1f1ca63ca (commit) via b4d6eb4aa29c0ccf788c58b629aec1ef8ea85853 (commit) via 7326f16291315b4156a418e150e08c7d0d287da1 (commit) via ee60a68becc3138b0d9fcb3e4a8a4325c54afc2e (commit) via abd8829df10eca1c5297c7f5bea6508ba96e3199 (commit) via 62523709ceed514a1b540b73c4f4d55d939fed9a (commit) via 1d7df8634834ae284369287ed9b95b05e0c3eb23 (commit) via 83c47fad4211692c3157d9dfcdf50dd0a39d749d (commit) via edf0019960342cb4cf477f18aea9edca09fd4849 (commit) via c9913526be7a7739b365c026cb70713bef48f66d (commit) via 7ac58fcd23f192c6cd3d944557a6be2aa3a762bb (commit) via df549c2d0fc17078e96bb4dc8c3d8257ed2993e8 (commit) via 67afeb85e79d629c4ef964f0b51821e13dad29f8 (commit) via db45d736d8830e28d511949b04ccd4ca30779f89 (commit) via 2bc59544ed82256e838c1be5008e3bffef885e05 (commit) via 317bf6626df0dea569af15483e5ac4c0c97e4e33 (commit) via 126e27dc91412fb6572ee00b2cf8b2b0cf52831e (commit) via 692e562e6649b8bff0dd6fdcb1c1e45804a98f5b (commit) via 6da15131229c1c964ac988a786d6b4aac8b31521 (commit) via 1772ccde8be5f8c81b2d8569031ff17a6c212f0d (commit) via 30a8258f4ee3f5a3d639e2ac9eca06969641fd00 (commit) via 26cfe0bb3f9d5a1f5cd0f2ae1290fb72bde18eb6 (commit) via da5a4ddc6e634bb9487edacd9857615d8bcdfd21 (commit) via 4729f2a0f252cec1cd36f27aa07b29d01c8f986a (commit) via b2a1955467dda5f4eeb51f075a26cfc2fb3c15e4 (commit) via 4f98d34ca50f4853f83c369f82667139bbab9114 (commit) via 2cef91c5e03dd2a3c164cf8b2c565221620f5190 (commit) via a708471c4422bd7bf538d3c29ce16f2b9962db39 (commit) via 6ca1b35046034eb69a9460697ca29f5ec73ccc55 (commit) via 8ccc9f07379c07af9584a6cc0e9a9eadd540411e (commit) via 9d714e639cb0ff2f869dbf7d86ca7431eb59d42c (commit) via db776b2d7917bc15569912d1599988547db78e58 (commit) via bb00c359801b5518407297905a6e5a89a49f0fdd (commit) via 6049f54ef415020acc3f38a15ebb4ce33bd7be49 (commit) via ce8e539d864d30eae6f8f02f67599bcc291e552c (commit) via b713314f7f97daa59b9ba30fc79c43a52a7b00bc (commit) via 27f9c304800b34927d2289b150705d5dfc8857bb (commit) via 9869e07af64a3ffe574e387d44ba7bac0ef201b7 (commit) via 6429a7ef725c0c8054e50a5edfae6ffd097cec11 (commit) via e7fa4b1c2b0aef6f6a4cafc8a2fec518e4da9ea2 (commit) via 7fee6e36a566c23eed0632f0a2d355b260cf2bdb (commit) via 2f53ae58e4705d7e026c3a25df3444f42bfa1bc3 (commit) via 6da2cf2eebcf99b6fce3f7c56b774740b9084879 (commit) via f6d22258106b8f763b9e4f04c854d8bb589157a4 (commit) via 84e4a6a88ca61ea591e39255a2cf57c452c4a165 (commit) via b835c47b23fab30816f2e90ed19200dc6d3f873d (commit) via 318b437fa5db765a04b4969e01e4146ce85eb3e3 (commit) via 9a6552c3cfefd83a91d2685edd8241e3a36bfd3e (commit) via f6fd0e887b4f4ff9fd283972c583bb8241076dd8 (commit) via 246886dde7391d30c67b2356a9e8bcc75f61fe62 (commit) via 2a60fd748b510807e803df518971a1674b0fd85e (commit) via f7de8ac738e6a368abebd5c4365398abbbb3bb9c (commit) via dc5e1bf6edcce1f2f748e6e3bc442870e8ea875e (commit) via 26ca39c214a6c95810a0de5a639a75eef75205ca (commit) via 7f6ce7a1906b61ec9abeddacfe6fc263bee7f752 (commit) via b67643bc439e29544c6cc8ae42c2feef671a3fe4 (commit) via 35cdf5fc3f501b659139297e7b655445516e69a6 (commit) via 252f939105c7b7f324fb5d24ec0924531a8d4c86 (commit) via af39f7cacaeab35c4b1fe11986b9dd5a635d0f3d (commit) via a3eaac9fafacc2a053079540bfc4f92830cb4706 (commit) via 4c68bc25afd1c5531eb3c8dbf45a1563ef51bf8a (commit) via 14cfb360fba5ca621a5e0935295675cd6493f0ad (commit) via 83def50c46437477f1f286ff7c8f1835c64d9a4d (commit) via 2b778fed634b5c1dc787dcef2ef20f2833006e6a (commit) via 7eb50d0d97db9ca3e74814d691909f4a6207277a (commit) via a1f5085f4cce79684fb0e08f15c506e99223ec00 (commit) via df6378a7b85ac6701a2a2d7aaca1c55673563257 (commit) via e5964fe670d112782d4864993e94edc992fd99b9 (commit) via b17f8dc9f691b7e2f102fd9caca1ab8be6ace144 (commit) via e64c1e8eb7ad16f133ef303f5ab0e9380883dc43 (commit) via f6cb3cb3427be2b1e014776df5ddcc94894502b1 (commit) via 0aec4d8bea6391664e867e51a2fef62205af1d4b (commit) via 965ad4c642dfbeffedebaf0cb5ad6d8ef3808e38 (commit) via c915d373e7e4ec6af640674152254bc2e17a94de (commit) via 3ecb7a6e9d98c085a73579a45cbc8a3b30f1f556 (commit) via c83eb29e2534cc8c054a0a3dd6d5fda84363a3bb (commit) from 8d57058412359636ec21df82d0d8ddb5371e868b (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 b4dd01f6f38ff64fd1c638d5aa59e8ca7c59ca67 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Mar 7 14:23:09 2021 -0600 Fix FTDX101MP detection and renamae ft101 to ft101d diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 6adc1687..10062080 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -90,7 +90,7 @@ typedef struct _yaesu_newcat_commands ncboolean ft5000; ncboolean ft1200; ncboolean ft3000; - ncboolean ft101; + ncboolean ft101d; ncboolean ft10; ncboolean ft101mp; } yaesu_newcat_commands_t; @@ -210,7 +210,7 @@ static ncboolean is_ftdx9000; static ncboolean is_ftdx5000; static ncboolean is_ftdx1200; static ncboolean is_ftdx3000; -static ncboolean is_ftdx101; +static ncboolean is_ftdx101d; static ncboolean is_ftdx101mp; static ncboolean is_ftdx10; @@ -785,7 +785,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) // some rigs like FTDX101D cannot change non-TX vfo freq // but they can change the TX vfo - if ((is_ftdx101 || is_ftdx101mp) && rig->state.cache.ptt == RIG_PTT_ON) + if ((is_ftdx101d || is_ftdx101mp) && rig->state.cache.ptt == RIG_PTT_ON) { rig_debug(RIG_DEBUG_TRACE, "%s: ftdx101 check vfo OK, vfo=%s, tx_vfo=%s\n", __func__, rig_strvfo(vfo), rig_strvfo(rig->state.tx_vfo)); @@ -1955,7 +1955,7 @@ int newcat_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t offs) snprintf(priv->cmd_str, sizeof(priv->cmd_str), "%s%04li%c", command, offs, cat_term); } - else if (is_ftdx101 || is_ftdx101mp || is_ftdx10) + else if (is_ftdx101d || is_ftdx101mp || is_ftdx10) { if (freq >= 28000000 && freq <= 29700000) { @@ -2163,7 +2163,7 @@ int newcat_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *offs) // Step size is 1 kHz step = 1000; } - else if (is_ftdx101 || is_ftdx101mp || is_ftdx10) + else if (is_ftdx101d || is_ftdx101mp || is_ftdx10) { if (freq >= 28000000 && freq <= 29700000) { @@ -2269,7 +2269,7 @@ int newcat_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) vfo = RIG_VFO_A; tx_vfo = RIG_SPLIT_ON == split ? RIG_VFO_B : RIG_VFO_A; } - else if (is_ftdx101 || is_ftdx101mp) + else if (is_ftdx101d || is_ftdx101mp) { vfo = RIG_VFO_MAIN; tx_vfo = RIG_SPLIT_ON == split ? RIG_VFO_SUB : RIG_VFO_MAIN; @@ -2796,7 +2796,7 @@ int newcat_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone) } else { - if (is_ft891 || is_ft991 || is_ftdx101 || is_ftdx101mp || is_ftdx10) + if (is_ft891 || is_ft991 || is_ftdx101d || is_ftdx101mp || is_ftdx10) { snprintf(priv->cmd_str, sizeof(priv->cmd_str), "CN%c0%03d%cCT%c2%c", main_sub_vfo, i, cat_term, main_sub_vfo, cat_term); @@ -2841,7 +2841,7 @@ int newcat_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone) main_sub_vfo = (RIG_VFO_B == vfo || RIG_VFO_SUB == vfo) ? '1' : '0'; } - if (is_ft891 || is_ft991 || is_ftdx101 || is_ftdx101mp || is_ftdx10) + if (is_ft891 || is_ft991 || is_ftdx101d || is_ftdx101mp || is_ftdx10) { snprintf(priv->cmd_str, sizeof(priv->cmd_str), "%s%c0%c", cmd, main_sub_vfo, cat_term); @@ -3454,7 +3454,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) } if (is_ft950 || is_ftdx1200 || is_ftdx3000 || is_ft891 || is_ft991 - || is_ftdx101 || is_ftdx101mp || is_ftdx10) + || is_ftdx101d || is_ftdx101mp || is_ftdx10) { scale = 100.; } @@ -3469,7 +3469,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) fpf = newcat_scale_float(scale, val.f); - if (is_ft950 || is_ft891 || is_ft991 || is_ftdx3000 || is_ftdx101 || is_ftdx101mp || is_ftdx10) + if (is_ft950 || is_ft891 || is_ft991 || is_ftdx3000 || is_ftdx101d || is_ftdx101mp || is_ftdx10) { // Minimum is 5 watts on these rigs if (fpf < 5) @@ -3543,7 +3543,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) RETURNFUNC(-RIG_ENAVAIL); } - if (is_ft991 || is_ftdx5000 || is_ftdx101 || is_ftdx101mp) + if (is_ft991 || is_ftdx5000 || is_ftdx101d || is_ftdx101mp) { newcat_get_mode(rig, vfo, &mode, &width); } @@ -3562,7 +3562,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) } } - if (is_ftdx101 || is_ftdx101mp || is_ftdx10) + if (is_ftdx101d || is_ftdx101mp || is_ftdx10) { snprintf(priv->cmd_str, sizeof(priv->cmd_str), "IS%c0%+.4d%c", main_sub_vfo, val.i, cat_term); @@ -3585,7 +3585,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) } // Some Yaesu rigs reject this command in AM/FM modes - if (is_ft991 || is_ftdx5000 || is_ftdx101 || is_ftdx101mp) + if (is_ft991 || is_ftdx5000 || is_ftdx101d || is_ftdx101mp) { if (mode & RIG_MODE_AM || mode & RIG_MODE_FM || mode & RIG_MODE_AMN || mode & RIG_MODE_FMN) @@ -3652,14 +3652,14 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) RETURNFUNC(-RIG_ENAVAIL); } - if (is_ft991 || is_ftdx5000 || is_ftdx101 || is_ftdx101mp) + if (is_ft991 || is_ftdx5000 || is_ftdx101d || is_ftdx101mp) { newcat_get_mode(rig, vfo, &mode, &width); } if (val.f > 1.0) { RETURNFUNC(-RIG_EINVAL); } - if (is_ftdx1200 || is_ftdx3000 || is_ft891 || is_ft991 || is_ftdx101 || is_ftdx101mp + if (is_ftdx1200 || is_ftdx3000 || is_ft891 || is_ft991 || is_ftdx101d || is_ftdx101mp || is_ftdx10) { fpf = newcat_scale_float(100, val.f); @@ -3672,7 +3672,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) snprintf(priv->cmd_str, sizeof(priv->cmd_str), "MG%03d%c", fpf, cat_term); // Some Yaesu rigs reject this command in RTTY modes - if (is_ft991 || is_ftdx5000 || is_ftdx101 || is_ftdx101mp) + if (is_ft991 || is_ftdx5000 || is_ftdx101d || is_ftdx101mp) { if (mode & RIG_MODE_RTTY || mode & RIG_MODE_RTTYR) { @@ -3689,7 +3689,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) RETURNFUNC(-RIG_ENAVAIL); } - if (is_ftdx101 || is_ftdx101mp) // new format for the command with VFO selection + if (is_ftdx101d || is_ftdx101mp) // new format for the command with VFO selection { format = "MS0%d;"; @@ -3928,7 +3928,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) millis = dot10ths_to_millis(val.i, keyspd.i); - if (is_ftdx101 || is_ftdx101mp || is_ftdx10) + if (is_ftdx101d || is_ftdx101mp || is_ftdx10) { if (millis <= 30) { snprintf(priv->cmd_str, sizeof(priv->cmd_str), "SD00;"); } else if (millis <= 50) { snprintf(priv->cmd_str, sizeof(priv->cmd_str), "SD01;"); } @@ -4011,7 +4011,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) RETURNFUNC(-RIG_ENAVAIL); } - if (is_ft891 || is_ft991 || is_ftdx101 || is_ftdx101mp || is_ftdx10) + if (is_ft891 || is_ft991 || is_ftdx101d || is_ftdx101mp || is_ftdx10) { scale = 100; } @@ -4049,7 +4049,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) snprintf(priv->cmd_str, sizeof(priv->cmd_str), "VD%04d%c", val.i, cat_term); } - else if (is_ftdx101 || is_ftdx101mp || is_ftdx10) // new lookup table argument + else if (is_ftdx101d || is_ftdx101mp || is_ftdx10) // new lookup table argument { rig_debug(RIG_DEBUG_TRACE, "%s: ft101 #1 val.i=%d\n", __func__, val.i); @@ -4105,7 +4105,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) break; case RIG_LEVEL_ANTIVOX: - if (is_ftdx101 || is_ftdx101mp || is_ftdx10) + if (is_ftdx101d || is_ftdx101mp || is_ftdx10) { fpf = newcat_scale_float(100, val.f); snprintf(priv->cmd_str, sizeof(priv->cmd_str), "AV%03d%c", fpf, cat_term); @@ -4170,7 +4170,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) } } - if (is_ft891 || is_ft991 || is_ftdx101 || is_ftdx101mp || is_ftdx10) + if (is_ft891 || is_ft991 || is_ftdx101d || is_ftdx101mp || is_ftdx10) { if (val.i > 320) { @@ -4214,7 +4214,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) if (val.f > 1.0) { RETURNFUNC(-RIG_EINVAL); } - if (is_ftdx1200 || is_ftdx3000 || is_ft891 || is_ft991 || is_ftdx101 || is_ftdx101mp + if (is_ftdx1200 || is_ftdx3000 || is_ft891 || is_ft991 || is_ftdx101d || is_ftdx101mp || is_ftdx10) { fpf = newcat_scale_float(100, val.f); @@ -4331,7 +4331,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) RETURNFUNC(-RIG_ENAVAIL); } - if (is_ft991 || is_ftdx5000 || is_ftdx101 || is_ftdx101mp) + if (is_ft991 || is_ftdx5000 || is_ftdx101d || is_ftdx101mp) { newcat_get_mode(rig, vfo, &mode, &width); } @@ -4345,7 +4345,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) } // Some Yaesu rigs reject this command in AM/FM modes - if (is_ft991 || is_ftdx5000 || is_ftdx101 || is_ftdx101mp) + if (is_ft991 || is_ftdx5000 || is_ftdx101d || is_ftdx101mp) { if (mode & RIG_MODE_AM || mode & RIG_MODE_FM || mode & RIG_MODE_AMN || mode & RIG_MODE_FMN) @@ -4385,7 +4385,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) RETURNFUNC(-RIG_ENAVAIL); } - if (is_ft991 || is_ftdx5000 || is_ftdx101 || is_ftdx101mp) + if (is_ft991 || is_ftdx5000 || is_ftdx101d || is_ftdx101mp) { newcat_get_mode(rig, vfo, &mode, &width); } @@ -4393,7 +4393,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) snprintf(priv->cmd_str, sizeof(priv->cmd_str), "MG%c", cat_term); // Some Yaesu rigs reject this command in RTTY modes - if (is_ft991 || is_ftdx5000 || is_ftdx101 || is_ftdx101mp) + if (is_ft991 || is_ftdx5000 || is_ftdx101d || is_ftdx101mp) { if (mode & RIG_MODE_RTTY || mode & RIG_MODE_RTTYR) { @@ -4545,7 +4545,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) snprintf(priv->cmd_str, sizeof(priv->cmd_str), "RM08%c", cat_term); } - if (is_ftdx101 || is_ftdx101mp) + if (is_ftdx101d || is_ftdx101mp) { // separate meters for Main and Sub snprintf(priv->cmd_str, sizeof(priv->cmd_str), "RM0%c", cat_term); @@ -4585,7 +4585,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) break; case RIG_LEVEL_ANTIVOX: - if (is_ftdx101 || is_ftdx101mp || is_ftdx10) + if (is_ftdx101d || is_ftdx101mp || is_ftdx10) { snprintf(priv->cmd_str, sizeof(priv->cmd_str), "AV%c", cat_term); } @@ -4687,7 +4687,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) { case RIG_LEVEL_RFPOWER: if (is_ft950 || is_ftdx1200 || is_ftdx3000 || is_ft891 || is_ft991 - || is_ftdx101 || is_ftdx101mp || is_ftdx10) + || is_ftdx101d || is_ftdx101mp || is_ftdx10) { scale = 100.; } @@ -4857,7 +4857,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) break; case RIG_LEVEL_MICGAIN: - if (is_ftdx1200 || is_ftdx3000 || is_ft891 || is_ft991 || is_ftdx101 || is_ftdx101mp + if (is_ftdx1200 || is_ftdx3000 || is_ft891 || is_ft991 || is_ftdx101d || is_ftdx101mp || is_ftdx10) { scale = 100.; @@ -4888,7 +4888,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) break; case RIG_LEVEL_SQL: - if (is_ft891 || is_ft991 || is_ftdx101 || is_ftdx101mp || is_ftdx10) + if (is_ft891 || is_ft991 || is_ftdx101d || is_ftdx101mp || is_ftdx10) { scale = 100.; } @@ -4906,7 +4906,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) int millis; value_t keyspd; - if (is_ftdx101 || is_ftdx101mp || is_ftdx10) + if (is_ftdx101d || is_ftdx101mp || is_ftdx10) { switch (raw_value) { @@ -4954,7 +4954,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) } if (is_ftdx1200 || is_ftdx3000 || is_ftdx5000 || is_ft891 || is_ft991 - || is_ftdx101 || is_ftdx101mp || is_ftdx10) + || is_ftdx101d || is_ftdx101mp || is_ftdx10) { val->i = round(rig_raw2val(atoi(retlvl), &yaesu_default_str_cal)); } @@ -5016,7 +5016,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) case RIG_LEVEL_VOXDELAY: val->i = atoi(retlvl); - if (is_ftdx101 || is_ftdx101mp) + if (is_ftdx101d || is_ftdx101mp) { switch (val->i) { @@ -5169,7 +5169,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) break; case RIG_LEVEL_MONITOR_GAIN: - if (is_ftdx1200 || is_ftdx3000 || is_ft891 || is_ft991 || is_ftdx101 || is_ftdx101mp) + if (is_ftdx1200 || is_ftdx3000 || is_ft891 || is_ft991 || is_ftdx101d || is_ftdx101mp) { scale = 100.; } @@ -5222,7 +5222,7 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) RETURNFUNC(-RIG_ENAVAIL); } - if (is_ft991 || is_ftdx5000 || is_ftdx101 || is_ftdx101mp) + if (is_ft991 || is_ftdx5000 || is_ftdx101d || is_ftdx101mp) { err = newcat_get_mode(rig, vfo, &mode, &width); } @@ -5236,7 +5236,7 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) } // Some Yaesu rigs reject this command in FM mode - if (is_ft991 || is_ftdx5000 || is_ftdx101 || is_ftdx101mp) + if (is_ft991 || is_ftdx5000 || is_ftdx101d || is_ftdx101mp) { if (mode & RIG_MODE_FM || mode & RIG_MODE_FMN) { @@ -5257,7 +5257,7 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) RETURNFUNC(-RIG_ENAVAIL); } - if (is_ft991 || is_ftdx5000 || is_ftdx101 || is_ftdx101mp) + if (is_ft991 || is_ftdx5000 || is_ftdx101d || is_ftdx101mp) { newcat_get_mode(rig, vfo, &mode, &width); } @@ -5271,7 +5271,7 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) } // Some Yaesu rigs reject this command in FM mode - if (is_ft991 || is_ftdx5000 || is_ftdx101 || is_ftdx101mp) + if (is_ft991 || is_ftdx5000 || is_ftdx101d || is_ftdx101mp) { if (mode & RIG_MODE_FM || mode & RIG_MODE_FMN) { @@ -5330,7 +5330,7 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) RETURNFUNC(-RIG_ENAVAIL); } - if (is_ftdx1200 || is_ftdx3000 || is_ftdx5000 || is_ftdx101 || is_ftdx101mp) + if (is_ftdx1200 || is_ftdx3000 || is_ftdx5000 || is_ftdx101d || is_ftdx101mp) { // These rigs can lock Main/Sub VFO dials individually snprintf(priv->cmd_str, sizeof(priv->cmd_str), "LK%d%c", status ? 7 : 4, @@ -5380,7 +5380,7 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) RETURNFUNC(-RIG_ENAVAIL); } - if (is_ft991 || is_ftdx5000 || is_ftdx101 || is_ftdx101mp) + if (is_ft991 || is_ftdx5000 || is_ftdx101d || is_ftdx101mp) { newcat_get_mode(rig, vfo, &mode, &width); } @@ -5394,7 +5394,7 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) } // Some Yaesu rigs reject this command in FM mode - if (is_ft991 || is_ftdx5000 || is_ftdx101 || is_ftdx101mp) + if (is_ft991 || is_ftdx5000 || is_ftdx101d || is_ftdx101mp) { if (mode & RIG_MODE_FM || mode & RIG_MODE_FMN) { @@ -5415,12 +5415,12 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) RETURNFUNC(-RIG_ENAVAIL); } - if (is_ft991 || is_ftdx5000 || is_ftdx101 || is_ftdx101mp) + if (is_ft991 || is_ftdx5000 || is_ftdx101d || is_ftdx101mp) { newcat_get_mode(rig, vfo, &mode, &width); } - if (is_ft891 || is_ft991 || is_ftdx1200 || is_ftdx3000 || is_ftdx101 || is_ftdx101mp) + if (is_ft891 || is_ft991 || is_ftdx1200 || is_ftdx3000 || is_ftdx101d || is_ftdx101mp) { // There seems to be an error in the manuals for some of these rigs stating that values should be 1 = OFF and 2 = ON, but they are 0 = OFF and 1 = ON instead snprintf(priv->cmd_str, sizeof(priv->cmd_str), "PR0%d%c", status ? 1 : 0, @@ -5433,7 +5433,7 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) } // Some Yaesu rigs reject this command in AM/FM/RTTY modes - if (is_ft991 || is_ftdx5000 || is_ftdx101 || is_ftdx101mp) + if (is_ft991 || is_ftdx5000 || is_ftdx101d || is_ftdx101mp) { if (mode & RIG_MODE_AM || mode & RIG_MODE_FM || mode & RIG_MODE_AMN || mode & RIG_MODE_FMN || @@ -5528,7 +5528,7 @@ int newcat_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status) RETURNFUNC(-RIG_ENAVAIL); } - if (is_ft991 || is_ftdx5000 || is_ftdx101 || is_ftdx101mp) + if (is_ft991 || is_ftdx5000 || is_ftdx101d || is_ftdx101mp) { err = newcat_get_mode(rig, vfo, &mode, &width); } @@ -5541,7 +5541,7 @@ int newcat_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status) } // Some Yaesu rigs reject this command in FM mode - if (is_ft991 || is_ftdx5000 || is_ftdx101 || is_ftdx101mp) + if (is_ft991 || is_ftdx5000 || is_ftdx101d || is_ftdx101mp) { if (mode & RIG_MODE_FM || mode & RIG_MODE_FMN) { @@ -5660,7 +5660,7 @@ int newcat_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status) RETURNFUNC(-RIG_ENAVAIL); } - if (is_ftdx1200 || is_ftdx3000 || is_ft891 || is_ft991 || is_ftdx101 || is_ftdx101mp) + if (is_ftdx1200 || is_ftdx3000 || is_ft891 || is_ft991 || is_ftdx101d || is_ftdx101mp) { snprintf(priv->cmd_str, sizeof(priv->cmd_str), "PR0%c", cat_term); } @@ -5748,7 +5748,7 @@ int newcat_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status) break; case RIG_FUNC_LOCK: - if (is_ftdx1200 || is_ftdx3000 || is_ftdx5000 || is_ftdx101 || is_ftdx101mp) + if (is_ftdx1200 || is_ftdx3000 || is_ftdx5000 || is_ftdx101d || is_ftdx101mp) { // These rigs can lock Main/Sub VFO dials individually *status = (retfunc[0] == '0' || retfunc[0] == '4') ? 0 : 1; @@ -6589,7 +6589,6 @@ ncboolean newcat_valid_command(RIG *rig, char const *const command) const struct rig_caps *caps; int search_high; int search_low; - struct newcat_priv_data *priv = (struct newcat_priv_data *)rig->state.priv; //ENTERFUNC; rig_debug(RIG_DEBUG_TRACE, "%s %s\n", __func__, command); @@ -6617,14 +6616,12 @@ ncboolean newcat_valid_command(RIG *rig, char const *const command) is_ftdx5000 = newcat_is_rig(rig, RIG_MODEL_FTDX5000); is_ftdx1200 = newcat_is_rig(rig, RIG_MODEL_FTDX1200); is_ftdx3000 = newcat_is_rig(rig, RIG_MODEL_FTDX3000); - is_ftdx101 = newcat_is_rig(rig, RIG_MODEL_FTDX101D) - && priv->rig_id == NC_RIGID_FTDX101D; - is_ftdx101mp = newcat_is_rig(rig, RIG_MODEL_FTDX101D) - && priv->rig_id == NC_RIGID_FTDX101MP; + is_ftdx101d = newcat_is_rig(rig, RIG_MODEL_FTDX101D); + is_ftdx101mp = newcat_is_rig(rig, RIG_MODEL_FTDX101MP); is_ftdx10 = newcat_is_rig(rig, RIG_MODEL_FTDX10); if (!is_ft450 && !is_ft950 && !is_ft891 && !is_ft991 && !is_ft2000 - && !is_ftdx5000 && !is_ftdx9000 && !is_ftdx1200 && !is_ftdx3000 && !is_ftdx101 && !is_ftdx101mp && !is_ftdx10) + && !is_ftdx5000 && !is_ftdx9000 && !is_ftdx1200 && !is_ftdx3000 && !is_ftdx101d && !is_ftdx101mp && !is_ftdx10) { rig_debug(RIG_DEBUG_ERR, "%s: '%s' is unknown\n", __func__, caps->model_name); RETURNFUNC(FALSE); @@ -6695,7 +6692,7 @@ ncboolean newcat_valid_command(RIG *rig, char const *const command) { RETURNFUNC(TRUE); } - else if (is_ftdx101 && valid_commands[search_index].ft101) + else if (is_ftdx101d && valid_commands[search_index].ft101d) { RETURNFUNC(TRUE); } @@ -6803,7 +6800,7 @@ int newcat_set_tx_vfo(RIG *rig, vfo_t tx_vfo) p1 = p1 + 2; /* use non-Toggle commands */ } - if (is_ftdx101 || is_ftdx101mp) + if (is_ftdx101d || is_ftdx101mp) { // what other Yaeus rigs should be using this? // The DX101D returns FT0 when in split and not transmitting @@ -6834,7 +6831,7 @@ int newcat_get_tx_vfo(RIG *rig, vfo_t *tx_vfo) ENTERFUNC; - if (is_ftdx101 || is_ftdx101mp) + if (is_ftdx101d || is_ftdx101mp) { // what other Yaeus rigs should be using this? // The DX101D returns FT0 when in split and not transmitting @@ -7690,7 +7687,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) RETURNFUNC(err); } } // end is_ftdx5000 - else if (is_ftdx101 || is_ftdx101mp || is_ftdx10) + else if (is_ftdx101d || is_ftdx101mp || is_ftdx10) { switch (mode) { @@ -7932,7 +7929,7 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) } /* end else */ - if (is_ftdx101 || is_ftdx101mp || is_ft891) + if (is_ftdx101d || is_ftdx101mp || is_ft891) { // some rigs now require the bandwidth be turned "on" int on = is_ft891; @@ -8934,7 +8931,7 @@ int newcat_get_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width) } /* end switch(mode) */ } /* end if is_ftdx5000 */ - else if (is_ftdx101 || is_ftdx101mp || is_ftdx10) + else if (is_ftdx101d || is_ftdx101mp || is_ftdx10) { rig_debug(RIG_DEBUG_TRACE, "%s: is_ftdx101 w=%d, mode=%s\n", __func__, w, rig_strrmode(mode)); commit 8296ca7ecd64bb3f339cae8788c6bf564c60a4e7 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Mar 7 14:12:12 2021 -0600 Fix FTDX101MP detection https://github.com/Hamlib/Hamlib/issues/586 diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index b307da3d..6adc1687 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -6695,7 +6695,11 @@ ncboolean newcat_valid_command(RIG *rig, char const *const command) { RETURNFUNC(TRUE); } - else if ((is_ftdx101 || is_ftdx101mp) && valid_commands[search_index].ft101) + else if (is_ftdx101 && valid_commands[search_index].ft101) + { + RETURNFUNC(TRUE); + } + else if (is_ftdx101mp && valid_commands[search_index].ft101mp) { RETURNFUNC(TRUE); } diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h index 5d344977..cc855037 100644 --- a/rigs/yaesu/newcat.h +++ b/rigs/yaesu/newcat.h @@ -50,7 +50,7 @@ typedef char ncboolean; /* shared function version */ -#define NEWCAT_VER "20210305" +#define NEWCAT_VER "20210307" /* Hopefully large enough for future use, 128 chars plus '\0' */ #define NEWCAT_DATA_LEN 129 commit c1f539b1f6f113d3c209fa5f456fd6c160ed6304 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Mar 7 12:02:26 2021 -0600 Add one more level of debug msg history diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 4afde0d4..7266bd79 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -2896,11 +2896,11 @@ rig_need_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level)); #define DEBUGMSGSAVE_SIZE 24000 extern HAMLIB_EXPORT_VAR(char) debugmsgsave[DEBUGMSGSAVE_SIZE]; // last debug msg extern HAMLIB_EXPORT_VAR(char) debugmsgsave2[DEBUGMSGSAVE_SIZE]; // last-1 debug msg +extern HAMLIB_EXPORT_VAR(char) debugmsgsave3[DEBUGMSGSAVE_SIZE]; // last-2 debug msg #ifndef __cplusplus #ifdef __GNUC__ // doing the debug macro with a dummy sprintf allows gcc to check the format string -//#define rig_debug(debug_level,fmt,...) { char xxxbuf[16384]="";snprintf(xxxbuf,sizeof(xxxbuf),fmt,__VA_ARGS__);rig_debug(debug_level,fmt,##__VA_ARGS__); } -#define rig_debug(debug_level,fmt,...) do { strcpy(debugmsgsave2, debugmsgsave);snprintf(debugmsgsave,sizeof(debugmsgsave),fmt,__VA_ARGS__);rig_debug(debug_level,fmt,##__VA_ARGS__); } while(0); +#define rig_debug(debug_level,fmt,...) do { strcpy(debugmsgsave3, debugmsgsave2);strcpy(debugmsgsave2, debugmsgsave);snprintf(debugmsgsave,sizeof(debugmsgsave),fmt,__VA_ARGS__);rig_debug(debug_level,fmt,##__VA_ARGS__); } while(0); #endif #endif extern HAMLIB_EXPORT(void) diff --git a/src/rig.c b/src/rig.c index 2e48d423..0a807bd8 100644 --- a/src/rig.c +++ b/src/rig.c @@ -293,6 +293,7 @@ int foreach_opened_rig(int (*cfunc)(RIG *, rig_ptr_t), rig_ptr_t data) */ 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) { @@ -310,8 +311,8 @@ const char *HAMLIB_API rigerror(int errnum) if (*p == '\n') { *p = 0; } - snprintf(msg, sizeof(msg), "%.80s\n%.15000s%.15000s", rigerror_table[errnum], - debugmsgsave2, debugmsgsave); + snprintf(msg, sizeof(msg), "%.80s\n%.15000s%.15000s%.15000s", rigerror_table[errnum], + debugmsgsave3,debugmsgsave2, debugmsgsave); return msg; } commit a35f39840c0117816850bd8ad8bab73e93021dcd Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Mar 7 11:50:13 2021 -0600 Fix gai_error to print the status instead of errno https://github.com/Hamlib/Hamlib/issues/589 diff --git a/src/network.c b/src/network.c index eaf48e37..98a49c15 100644 --- a/src/network.c +++ b/src/network.c @@ -225,7 +225,7 @@ int network_open(hamlib_port_t *rp, int default_port) "%s: cannot get host \"%s\": %s\n", __func__, rp->pathname, - gai_strerror(errno)); + gai_strerror(status)); RETURNFUNC(-RIG_ECONF); } commit 307858f60c4c6dad3abc22c406ccf47aa32ebe73 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Mar 7 11:42:01 2021 -0600 Add RETURNFUNC/ENTERFUNC to network.c https://github.com/Hamlib/Hamlib/issues/514 diff --git a/src/network.c b/src/network.c index b5a81000..eaf48e37 100644 --- a/src/network.c +++ b/src/network.c @@ -140,7 +140,6 @@ int network_open(hamlib_port_t *rp, int default_port) char hoststr[256], portstr[6] = ""; ENTERFUNC; - rig_debug(RIG_DEBUG_VERBOSE, "%s version 1.0\n", __func__); #ifdef __MINGW32__ WSADATA wsadata; @@ -148,14 +147,14 @@ int network_open(hamlib_port_t *rp, int default_port) if (!(wsstarted++) && WSAStartup(MAKEWORD(1, 1), &wsadata) == SOCKET_ERROR) { rig_debug(RIG_DEBUG_ERR, "%s: error creating socket\n", __func__); - return -RIG_EIO; + RETURNFUNC(-RIG_EIO); } #endif if (!rp) { - return -RIG_EINVAL; + RETURNFUNC(-RIG_EINVAL); } memset(&hints, 0, sizeof(hints)); @@ -181,7 +180,7 @@ int network_open(hamlib_port_t *rp, int default_port) { status = parse_hoststr(rp->pathname, hoststr, portstr); - if (status != RIG_OK) { return status; } + if (status != RIG_OK) { RETURNFUNC(status); } rig_debug(RIG_DEBUG_TRACE, "%s: hoststr=%s, portstr=%s\n", __func__, hoststr, portstr); @@ -227,7 +226,7 @@ int network_open(hamlib_port_t *rp, int default_port) __func__, rp->pathname, gai_strerror(errno)); - return -RIG_ECONF; + RETURNFUNC(-RIG_ECONF); } saved_res = res; @@ -246,7 +245,7 @@ int network_open(hamlib_port_t *rp, int default_port) { handle_error(RIG_DEBUG_ERR, "socket"); freeaddrinfo(saved_res); - return -RIG_EIO; + RETURNFUNC(-RIG_EIO); } if (connect(fd, res->ai_addr, res->ai_addrlen) == 0) @@ -274,12 +273,12 @@ int network_open(hamlib_port_t *rp, int default_port) "%s: failed to connect to %s\n", __func__, rp->pathname); - return -RIG_EIO; + RETURNFUNC(-RIG_EIO); } rp->fd = fd; - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -350,7 +349,7 @@ int network_close(hamlib_port_t *rp) { int ret; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + ENTERFUNC; #ifdef __MINGW32__ ret = closesocket(rp->fd); @@ -363,7 +362,7 @@ int network_close(hamlib_port_t *rp) #else ret = close(rp->fd); #endif - return ret; + RETURNFUNC(ret); } //! @endcond commit 94e51bfa245b6e5e2c1459a0098c49d1f8828943 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Mar 7 09:03:37 2021 -0600 rigctld.c add retry of rig_open with an IO error https://github.com/Hamlib/Hamlib/issues/560 diff --git a/tests/rigctld.c b/tests/rigctld.c index a59388a6..c4edaf6d 100644 --- a/tests/rigctld.c +++ b/tests/rigctld.c @@ -1087,13 +1087,26 @@ void *handle_socket(void *arg) #endif - // if socket error or rigctld gets RIG_EIO we'll try to reopen - if (ferror(fsockin)) + // if we get a hard error we try to reopen the rig again + // this should cover short dropouts that can occur + if (retcode == -RIG_EIO || retcode == 2) { - rig_debug(RIG_DEBUG_ERR, "%s: sockin err=%s\n", __func__, strerror(errno)); - return(NULL); + int retry = 3; + rig_debug(RIG_DEBUG_ERR, "%s: i/o error\n", __func__) + + do + { + retcode = rig_close(my_rig); + hl_usleep(1000 * 1000); + rig_debug(RIG_DEBUG_ERR, "%s: rig_close retcode=%d\n", __func__, retcode); + retcode = rig_open(my_rig); + rig_debug(RIG_DEBUG_ERR, "%s: rig_open retcode=%d\n", __func__, retcode); + } + while (retry-- > 0 && retcode != RIG_OK); + } + #if 0 if (ferror(fsockin) || ferror(fsockout) || retcode == 2) commit b2a0b15a67596c49f12f3f5c82dd167c2ae54b1e Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Mar 7 07:34:18 2021 -0600 Add FTDX101MP to newcat.c command table https://github.com/Hamlib/Hamlib/issues/586 diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index e657567e..b307da3d 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -92,6 +92,7 @@ typedef struct _yaesu_newcat_commands ncboolean ft3000; ncboolean ft101; ncboolean ft10; + ncboolean ft101mp; } yaesu_newcat_commands_t; /** @@ -231,126 +232,126 @@ static ncboolean is_ftdx10; */ static const yaesu_newcat_commands_t valid_commands[] = { - /* Command FT-450 FT-950 FT-891 FT-991 FT-2000 FT-9000 FT-5000 FT-1200 FT-3000 FTDX101D FTDX10 */ - {"AB", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"AC", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"AG", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"AI", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"AM", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"AN", FALSE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE }, - {"AO", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE }, - {"BA", FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE }, - {"BC", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"BD", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"BI", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"BM", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE }, - {"BP", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"BS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"BU", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"BY", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"CH", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"CN", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"CO", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"CS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"CT", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"DA", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"DN", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"DT", FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE }, - {"DP", FALSE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE }, - {"DS", TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE }, - {"ED", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"EK", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE }, - {"EM", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE }, - {"EN", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE }, - {"EU", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"EX", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"FA", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"FB", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"FK", FALSE, TRUE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, - {"FN", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE }, - {"FR", FALSE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"FS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"FT", TRUE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"GT", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"ID", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"IF", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"IS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"KM", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"KP", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"KR", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"KS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"KY", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"LK", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"LM", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"MA", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"MB", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE }, - {"MC", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"MD", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"MG", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"MK", TRUE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE }, - {"ML", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"MR", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"MS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"MT", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE }, - {"MW", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"MX", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"NA", TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"NB", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"NL", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"NR", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"OI", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"OS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"PA", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"PB", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"PC", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"PL", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"PR", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"PS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"QI", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"QR", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"QS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"RA", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"RC", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"RD", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"RF", FALSE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"RG", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"RI", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"RL", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"RM", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"RO", FALSE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE }, - {"RP", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE }, - {"RS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"RT", TRUE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"RU", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"SC", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"SD", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"SF", FALSE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"SH", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"SM", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"SQ", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, - {"SS", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE }, + /* Command FT-450 FT-950 FT-891 FT-991 FT-2000 FT-9000 FT-5000 FT-1200 FT-3000 FTDX101D FTDX10 FTDX101MP */ + {"AB", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"AC", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"AG", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"AI", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"AM", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"AN", FALSE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE }, + {"AO", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE }, + {"BA", FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"BC", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"BD", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"BI", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"BM", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE }, + {"BP", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"BS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"BU", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"BY", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"CH", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"CN", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"CO", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"CS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"CT", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"DA", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"DN", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"DT", FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, TRUE }, + {"DP", FALSE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, + {"DS", TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, + {"ED", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"EK", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, TRUE }, + {"EM", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE }, + {"EN", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"EU", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"EX", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"FA", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"FB", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"FK", FALSE, TRUE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE }, + {"FN", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE }, + {"FR", FALSE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"FS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"FT", TRUE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"GT", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"ID", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"IF", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"IS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"KM", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"KP", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"KR", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"KS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"KY", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"LK", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"LM", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"MA", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"MB", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE }, + {"MC", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"MD", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"MG", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"MK", TRUE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, + {"ML", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"MR", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"MS", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"MT", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE }, + {"MW", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"MX", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE }, + {"NA", ... [truncated message content] |
From: Nate B. <n0...@us...> - 2021-02-21 19:13:32
|
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 8d57058412359636ec21df82d0d8ddb5371e868b (commit) via 171aa9e89a82b875422183c07b2ca5de2d4fdecd (commit) from 62bcb66865a863c77967a0b4142bf668ac064c44 (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 8d57058412359636ec21df82d0d8ddb5371e868b Merge: 62bcb668 171aa9e8 Author: Nate Bargmann <n0...@n0...> Date: Sun Feb 21 13:13:03 2021 -0600 Merge pull request #557 from N0NB/doxygen_work Update and refine Doxygen comments for extension levels, etc. commit 171aa9e89a82b875422183c07b2ca5de2d4fdecd Author: Nate Bargmann <n0...@n0...> Date: Sun Feb 21 13:07:45 2021 -0600 Update and refine Doxygen comments for extension levels, etc. diff --git a/include/hamlib/amplifier.h b/include/hamlib/amplifier.h index 05ea5eb4..15624e6b 100644 --- a/include/hamlib/amplifier.h +++ b/include/hamlib/amplifier.h @@ -253,8 +253,8 @@ struct amp_caps setting_t levels; unsigned ext_levels; //! @endcond - const struct confparams *extlevels; /*!< Extension levels structure. */ - const struct confparams *extparms; /*!< Extension parameters structure. */ + const struct confparams *extlevels; /*!< Extension levels list. \sa extamp.c */ + const struct confparams *extparms; /*!< Extension parameters list. \sa extamp.c */ const char *macro_name; /*!< Amplifier model macro name. */ }; diff --git a/include/hamlib/rotator.h b/include/hamlib/rotator.h index e23c3410..1637a364 100644 --- a/include/hamlib/rotator.h +++ b/include/hamlib/rotator.h @@ -383,9 +383,9 @@ struct rot_caps { gran_t level_gran[RIG_SETTING_MAX]; /*!< level granularity (i.e. steps). */ gran_t parm_gran[RIG_SETTING_MAX]; /*!< parm granularity (i.e. steps). */ - const struct confparams *extparms; /*!< Extension parameter list, \sa ext.c. */ - const struct confparams *extlevels; /*!< Extension level list, \sa ext.c. */ - const struct confparams *extfuncs; /*!< Extension func list, \sa ext.c. */ + const struct confparams *extparms; /*!< Extension parameters list, \sa rot_ext.c. */ + const struct confparams *extlevels; /*!< Extension levels list, \sa rot_ext.c. */ + const struct confparams *extfuncs; /*!< Extension functions list, \sa rot_ext.c. */ int *ext_tokens; /*!< Extension token list. */ /* diff --git a/src/amplifier.c b/src/amplifier.c index 9aa5056e..60d30e08 100644 --- a/src/amplifier.c +++ b/src/amplifier.c @@ -220,7 +220,9 @@ AMP *HAMLIB_API amp_init(amp_model_t amp_model) /* * populate the amp->state - * TODO: read the Preferences here! + */ + /** + * \todo Read the Preferences here! */ rs = &->state; diff --git a/src/extamp.c b/src/extamp.c index a0dbd797..e9289035 100644 --- a/src/extamp.c +++ b/src/extamp.c @@ -29,6 +29,7 @@ /** * \file extamp.c * \brief Amplifier extension parameters and levels interface. + * * \author Michael Black * \date 2019 * @@ -55,8 +56,8 @@ /** - * \brief Executes \a cfunc on all the elements stored in the - * amp_caps::extlevels extension levels table. + * \brief Executes \a cfunc on all the elements stored in the amp_caps::extlevels + * extension levels table. * * \param amp The #AMP handle. * \param cfunc Callback function of each amp_caps::extlevels. @@ -65,8 +66,8 @@ * The callback function \a cfunc is called until it returns a value which is * not strictly positive. * - * \returns A zero value which means a normal end of iteration, or a negative - * value which means an abnormal end, + * \returns A zero value which means a normal end of iteration, or a + * **negative value** which means an abnormal end, * * \retval RIG_OK All extension levels elements successfully processed. * \retval RIG_EINVAL \a amp or \a cfunc is NULL or inconsistent. @@ -117,7 +118,7 @@ int HAMLIB_API amp_ext_level_foreach(AMP *amp, * strictly positive. * * \returns A zero value which means a normal end of iteration, or a - * negative value which means an abnormal end. + * **negative value** which means an abnormal end. * * \retval RIG_OK All extension parameters elements successfully processed. * \retval RIG_EINVAL \a amp or \a cfunc is NULL or inconsistent. @@ -163,15 +164,18 @@ int HAMLIB_API amp_ext_parm_foreach(AMP *amp, * \param amp The #AMP handle. * \param name The extension levels or parameters token name. * - * Searches the amp_caps::extlevels table first and then falls back to - * amp_caps::extparms. + * Searches the amp_caps::extlevels table and then the amp_caps::extparms + * table for the token by its name. + * + * \note As this function is called by amp_ext_token_lookup(), it can be + * considered a lower level API. * * \return A pointer to the containing #confparams structure member or NULL if * nothing found or if \a amp is NULL or inconsistent. * * \sa amp_ext_token_lookup() * - * TODO: should use Lex to speed it up, strcmp() hurts! + * \todo Should use Lex to speed it up, strcmp() hurts! */ const struct confparams *HAMLIB_API amp_ext_lookup(AMP *amp, const char *name) { @@ -205,13 +209,14 @@ const struct confparams *HAMLIB_API amp_ext_lookup(AMP *amp, const char *name) /** - * \brief Lookup an extension levels or parameters token by its constant value - * and return a pointer to the #confparams structure member. + * \brief Search for an extension levels or parameters token by its constant + * value and return a pointer to the #confparams structure member. * * \param amp The #AMP handle. * \param token The token value (constant). * - * Searches the amp_caps::extlevels table first and then falls back to amp_caps::extparms. + * Searches the amp_caps::extlevels table first and then the + * amp_caps::extparms for the token by its constant value. * * \return A pointer to the containing #confparams structure member or NULL if * nothing found or if \a amp is NULL or inconsistent. @@ -248,11 +253,14 @@ const struct confparams *HAMLIB_API amp_ext_lookup_tok(AMP *amp, token_t token) /** - * \brief Simple lookup returning the extension token ID associated with \a - * name. + * \brief Simple search returning the extension token ID associated with + * \a name. * * \param amp The #AMP handle. - * \param name The name string to search. + * \param name The token name string to search. + * + * \note As this function calls amp_ext_lookup(), it can be considered a + * higher level API. * * \return The token ID or RIG_CONF_END if there is a lookup failure. * diff --git a/src/rot_ext.c b/src/rot_ext.c index b3b19c2f..73aa4468 100644 --- a/src/rot_ext.c +++ b/src/rot_ext.c @@ -26,12 +26,16 @@ /** * \file rot_ext.c - * \brief Extension request parameter interface for rotators + * \brief Rotator extension parameters and levels interface. * - * An open-ended set of extension parameters, functions and levels are available - * for each rotator, as provided in the rotcaps extparms, extfuncs and extlevels lists. - * These provide a way to work with rotator-specific functions that don't fit into the - * basic "virtual rotator" of Hamlib. + * \author Mikael Nousiainen + * \date 2020 + * + * An open-ended set of extension parameters, functions and levels are + * available for each rotator, as provided in the rot_caps::extparms, + * rot_caps::extfuncs and rot_caps::extlevels lists. These provide a way to + * work with rotator-specific functions that don't fit into the basic "virtual + * rotator" of Hamlib. */ #ifdef HAVE_CONFIG_H @@ -71,15 +75,21 @@ static int rot_has_ext_token(ROT *rot, token_t token) /** - * \param rot The rotator handle - * \param cfunc callback function of each extfunc - * \param data cookie to be passed to \a cfunc callback - * \brief Executes cfunc on all the elements stored in the extfuncs table + * \brief Executes \a cfunc on all the elements stored in the + * rot_caps::extfuncs table. + * + * \param rot The #ROT handle. + * \param cfunc Callback function of each rot_caps::extfunc. + * \param data Cookie to be passed to the callback function \a cfunc. * * The callback \a cfunc is called until it returns a value which is not - * strictly positive. A zero value means a normal end of iteration, and a - * negative value an abnormal end, which will be the return value of - * rot_ext_func_foreach. + * strictly positive. + * + * \returns A zero value means a normal end of iteration, or a **negative + * value** which means an abnormal end. + * + * \retval RIG_OK All extension functions elements successfully processed. + * \retval RIG_EINVAL \a rot or \a cfunc is NULL or inconsistent. */ int HAMLIB_API rot_ext_func_foreach(ROT *rot, int (*cfunc)(ROT *, @@ -121,15 +131,21 @@ int HAMLIB_API rot_ext_func_foreach(ROT *rot, /** - * \param rot The rotator handle - * \param cfunc callback function of each extlevel - * \param data cookie to be passed to \a cfunc callback - * \brief Executes cfunc on all the elements stored in the extlevels table + * \brief Executes \a cfunc on all the elements stored in the + * rot_caps::extlevels extension levels table. + * + * \param rot The #ROT handle. + * \param cfunc Callback function of each rot_caps::extlevels. + * \param data Cookie to be passed to the callback function \a cfunc. * * The callback \a cfunc is called until it returns a value which is not - * strictly positive. A zero value means a normal end of iteration, and a - * negative value an abnormal end, which will be the return value of - * rot_ext_level_foreach. + * strictly positive. + * + * \returns A zero value which means a normal end of iteration, or a + * **negative value** which means an abnormal end. + * + * \retval RIG_OK All extension levels elements successfully processed. + * \retval RIG_EINVAL \a rot or \a cfunc is NULL or inconsistent. */ int HAMLIB_API rot_ext_level_foreach(ROT *rot, int (*cfunc)(ROT *, @@ -171,15 +187,21 @@ int HAMLIB_API rot_ext_level_foreach(ROT *rot, /** - * \param rot The rotator handle - * \param cfunc callback function of each extparm - * \param data cookie to be passed to \a cfunc callback - * \brief Executes cfunc on all the elements stored in the extparms table + * \brief Executes \a cfunc on all the elements stored in the + * rot_caps::extparms extension parameters table. * - * The callback \a cfunc is called until it returns a value which is not - * strictly positive. A zero value means a normal end of iteration, and a - * negative value an abnormal end, which will be the return value of - * rot_ext_parm_foreach. + * \param rot The #ROT handle. + * \param cfunc callback function of each rot_caps::extparms. + * \param data Cookie to be passed to the callback function \a cfunc. + * + * The callback function \a cfunc is called until it returns a value which is not + * strictly positive. + * + * \returns A zero value which means a normal end of iteration, or a + * **negative value** which means an abnormal end. + * + * \retval RIG_OK All extension parameters elements successfully processed. + * \retval RIG_EINVAL \a rot or \a cfunc is NULL or inconsistent. */ int HAMLIB_API rot_ext_parm_foreach(ROT *rot, int (*cfunc)(ROT *, @@ -221,15 +243,24 @@ int HAMLIB_API rot_ext_parm_foreach(ROT *rot, /** - * \param rot - * \param name - * \brief lookup ext token by its name, return pointer to confparams struct. + * \brief Lookup an extension functions, levels, or parameters token by its + * name and return a pointer to the containing #confparams structure member. + * + * \param rot The #ROT handle. + * \param name The extension functions, levels, or parameters token name. + * + * Searches the rot_caps::extlevels, rot_caps::extfuncs and the + * rot_caps::extparms tables in order for the token by its name. * - * Lookup extlevels table, then extfuncs, then extparms. + * \note As this function is called by rot_ext_token_lookup(), it can be + * considered a lower level API. * - * Returns NULL if nothing found + * \return A pointer to the containing #confparams structure member or NULL if + * nothing found or if \a rot is NULL or inconsistent. * - * TODO: should use Lex to speed it up, strcmp hurts! + * \sa rot_ext_token_lookup() + * + * \todo Should use Lex to speed it up, strcmp() hurts! */ const struct confparams *HAMLIB_API rot_ext_lookup(ROT *rot, const char *name) { @@ -270,13 +301,18 @@ const struct confparams *HAMLIB_API rot_ext_lookup(ROT *rot, const char *name) } /** - * \param rot - * \param token - * \brief lookup ext token, return pointer to confparams struct. + * \brief Searches for an extension levels, functions, or parameters token by + * its constant value and return a pointer to the #confparams structure + * member. + * + * \param rot The #ROT handle. + * \param token The token value (constant). * - * lookup extlevels table first, then extfuncs, then fall back to extparms. + * Searches the rot_caps::extlevels, rot_caps::extfuncs, and the + * rot_caps::extparms tables in order for the token by its constant value. * - * Returns NULL if nothing found + * \return A pointer to the containing #confparams structure member or NULL if + * nothing found or if \a rot is NULL or inconsistent. */ const struct confparams *HAMLIB_API rot_ext_lookup_tok(ROT *rot, token_t token) { @@ -318,9 +354,18 @@ const struct confparams *HAMLIB_API rot_ext_lookup_tok(ROT *rot, token_t token) /** - * \param rot - * \param name - * \brief Simple lookup returning token id associated with name + * \brief Simple search returning the extension token ID associated with + * \a name. + * + * \param rot The #ROT handle. + * \param name The token name string to search. + * + * \note As this function calls rot_ext_lookup(), it can be considered a + * higher level API. + * + * \return The token ID or RIG_CONF_END if there is a lookup failure. + * + * \sa rot_ext_lookup() */ token_t HAMLIB_API rot_ext_token_lookup(ROT *rot, const char *name) { diff --git a/src/rotator.c b/src/rotator.c index 159b85c7..e89d3b33 100644 --- a/src/rotator.c +++ b/src/rotator.c @@ -251,7 +251,9 @@ ROT *HAMLIB_API rot_init(rot_model_t rot_model) /* * populate the rot->state - * TODO: read the Preferences here! + */ + /** + * \todo Read the Preferences here! */ rs = &rot->state; ----------------------------------------------------------------------- Summary of changes: include/hamlib/amplifier.h | 4 +- include/hamlib/rotator.h | 6 +-- src/amplifier.c | 4 +- src/extamp.c | 36 ++++++++----- src/rot_ext.c | 127 ++++++++++++++++++++++++++++++--------------- src/rotator.c | 4 +- 6 files changed, 119 insertions(+), 62 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Nate B. <n0...@us...> - 2021-02-21 19:09:30
|
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 62bcb66865a863c77967a0b4142bf668ac064c44 (commit) via 529685ab6993951be1ec7672b90b087bf7f603bc (commit) via b0fc76ce445857d9e53eaefad1efc23627c94966 (commit) from 2e321c5191382c0f359eb85e58693e461a7f6549 (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 62bcb66865a863c77967a0b4142bf668ac064c44 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Feb 21 12:35:36 2021 -0600 Fix RFPOWER command for TS480 https://github.com/Hamlib/Hamlib/issues/553 diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index e6f8bef0..cae882f9 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -2339,7 +2339,7 @@ static int kenwood_get_power_minmax(RIG *rig, int *power_now, int *power_min, RETURNFUNC( -RIG_EPROTO); } - if (RIG_IS_TS890S) + if (RIG_IS_TS890S || RIG_IS_TS480) { n = sscanf(levelbuf, "PC%d;", power_now); diff --git a/rigs/kenwood/kenwood.h b/rigs/kenwood/kenwood.h index 83553879..66c735d2 100644 --- a/rigs/kenwood/kenwood.h +++ b/rigs/kenwood/kenwood.h @@ -27,7 +27,7 @@ #include <string.h> #include "token.h" -#define BACKEND_VER "20210209" +#define BACKEND_VER "20210221" #define EOM_KEN ';' #define EOM_TH '\r' commit 529685ab6993951be1ec7672b90b087bf7f603bc Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Feb 20 10:24:08 2021 -0600 Disable rigctld error check with rig_close/rig_open -- more investigation needed https://github.com/Hamlib/Hamlib/issues/556 diff --git a/tests/rigctld.c b/tests/rigctld.c index e65efc97..73dec16c 100644 --- a/tests/rigctld.c +++ b/tests/rigctld.c @@ -1092,6 +1092,7 @@ void *handle_socket(void *arg) RETURNFUNC(NULL); } +#if 0 if (ferror(fsockin) || ferror(fsockout) || retcode == 2) { if (ferror(fsockout)) fsockout = get_fsockout(handle_data_arg); @@ -1112,6 +1113,7 @@ void *handle_socket(void *arg) } while (retry-- > 0 && retcode != RIG_OK); } } +#endif } while (retcode == 0 || retcode == 2 || retcode == -RIG_ENAVAIL); commit b0fc76ce445857d9e53eaefad1efc23627c94966 Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Feb 20 08:13:08 2021 -0600 Update NEWS diff --git a/NEWS b/NEWS index 85782a0b..7c5dc423 100644 --- a/NEWS +++ b/NEWS @@ -10,8 +10,8 @@ Version 4.3 Add twiddle_timeout and twiddle_rit --set-conf options rigctld --set-conf=twiddle_timeout=5,twiddle_rit=1 This will set the twiddle timeout to 5 seconds and turn on twiddle_rit - For twiddle timeout VFOB will not be poller for 5 seconds after VFO twiddling is detected - rigctld --twiddle is deprecated and will be removed in 5.0 + For twiddle timeout VFOB will not be polled for 5 seconds after VFO twiddling is detected + rigctld --twiddle is deprecated and will be removed in 5.0 along with get_twiddle and set_twiddle Version 4.2 2021-??-?? ----------------------------------------------------------------------- Summary of changes: NEWS | 4 ++-- rigs/kenwood/kenwood.c | 2 +- rigs/kenwood/kenwood.h | 2 +- tests/rigctld.c | 2 ++ 4 files changed, 6 insertions(+), 4 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Nate B. <n0...@us...> - 2021-02-20 13:19:13
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 2e321c5191382c0f359eb85e58693e461a7f6549 (commit) via 707fe151d07f88b8a8d697bca7ac72b8cdd69848 (commit) via 132d896e894f3b0692244e45df686a8eebabd836 (commit) via 59d09e42a589f9040f9e7441395f655bd518e557 (commit) via 83c75fa8c6b7e2f63d86dcd9a29c909952c4b8ca (commit) via a6da45eb8b62bc10b53f1526af9049150ec4d407 (commit) via 49bcb07b8fbc4f5d23ebff3d7b9224faca47996d (commit) via 3a0ec1e1b4b5303c01e6aec9b90ce787f95d1681 (commit) via c3e9677a7edcce722299cd28629fb50297f4df35 (commit) via 132a5612f4064caecce0e133ff56f573f0783ed1 (commit) via 0f9a7fac07b13aa4015446074b6ac61632c02d80 (commit) via a9633cec39899d1f9a3fdaf7ffbbcfb06619c57e (commit) via 6a3b28e518ac8331915ad2555ef248f0a405cdee (commit) via 555bf9dc65ead752041f39679a6cab3c3fa6d324 (commit) via 53b18d4ec40eb034224cf62213e9ef8c4609ddeb (commit) from 1ad32d412460433724d18f411fffbf2f470a58c7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 2e321c5191382c0f359eb85e58693e461a7f6549 Merge: 59d09e42 707fe151 Author: Nate Bargmann <n0...@n0...> Date: Sat Feb 20 07:18:02 2021 -0600 Merge pull request #555 from N0NB/doxygen_work Doxygen work commit 707fe151d07f88b8a8d697bca7ac72b8cdd69848 Author: Nate Bargmann <n0...@n0...> Date: Sat Feb 20 07:15:25 2021 -0600 Update Doxygen comments in rot_conf.c diff --git a/src/rot_conf.c b/src/rot_conf.c index 9faa6aef..95c2a92a 100644 --- a/src/rot_conf.c +++ b/src/rot_conf.c @@ -25,7 +25,8 @@ */ /** - * \brief Rotator Configuration Interface + * \brief Rotator Configuration Interface. + * * \file rot_conf.c */ @@ -140,16 +141,29 @@ static const struct confparams rotfrontend_serial_cfg_params[] = { RIG_CONF_END, NULL, } }; +/** @} */ /* rotator definitions */ /** - * \brief Set rotator state info from alpha input - * \param rot - * \param token TOK_... specifying which info to set - * \param val input - * \return RIG_OK or < 0 error + * \addtogroup rot_internal + * @{ + */ + + +/** + * \brief Set a rotator state value from alpha input. + * \param rot The #ROT handle. + * \param token TOK_... specify which value to set. + * \param val Input. + * + * Assumes rot != NULL and val != NULL. + * + * \return RIG_OK or a **negative value** on error. + * + * \retval RIG_OK TOK_... value set successfully. + * \retval RIG_EINVAL TOK_.. value not set. * - * assumes rot!=NULL, val!=NULL + * \sa frontrot_get_conf() */ int frontrot_set_conf(ROT *rot, token_t token, const char *val) { @@ -335,11 +349,20 @@ int frontrot_set_conf(ROT *rot, token_t token, const char *val) /** - * \brief Get data from rotator state in alpha form - * \param rot non-null - * \param token TOK_... specifying which data to get - * \param val result non-null - * \return RIG_OK or < 0 if error + * \brief Query data from a rotator state in alpha form. + * + * \param rot The #ROT handle. + * \param token TOK_... specify which data to query. + * \param val Result. + * + * Assumes rot != NULL and val != NULL. + * + * \return RIG_OK or a **negative value** on error. + * + * \retval RIG_OK TOK_... value queried successfully. + * \retval RIG_EINVAL TOK_.. value not queried. + * + * \sa frontrot_set_conf() */ int frontrot_get_conf(ROT *rot, token_t token, char *val) { @@ -487,15 +510,31 @@ int frontrot_get_conf(ROT *rot, token_t token, char *val) return RIG_OK; } +/** @} */ /* rot_internal definitions */ /** - * \brief Executes cfunc on all the elements stored in the conf table - * \param rot non-null - * \param cfunc function(..) - * \param data + * \addtogroup rotator + * @{ + */ + + +/** + * \brief Executes cfunc on all the elements stored in the configuration + * parameters table. + * + * \param rot The #ROT handle. + * \param cfunc Pointer to the callback function(...). + * \param data Data for the callback function. + * + * Start first with backend configuration parameters table, then finish with + * frontend configuration parameters table. + * + * \return RIG_OK if the operation has been successful, otherwise a **negative + * value** if an error occurred (in which case, cause is set appropriately). * - * start first with backend conf table, then finish with frontend table + * \retval RIG_OK The \a cfunc action completed successfully. + * \retval RIG_EINVAL \a rot is NULL or inconsistent or \a cfunc is NULL. */ int HAMLIB_API rot_token_foreach(ROT *rot, int (*cfunc)(const struct confparams *, @@ -543,13 +582,23 @@ int HAMLIB_API rot_token_foreach(ROT *rot, /** - * \brief lookup conf token by its name, return pointer to confparams struct. - * \param rot - * \param name + * \brief Query a rotator configuration parameter token by its name. + * + * \param rot The #ROT handle. + * \param name Configuration parameter token name string. * \return confparams or NULL * - * lookup backend config table first, then fall back to frontend. - * TODO: should use Lex to speed it up, strcmp hurts! + * Use this function to get a pointer to the token in the #confparams + * structure. Searches the backend config params table first, then falls back + * to the frontend config params table. + * + * \return A pointer to the token in the #confparams structure or NULL if + * \a rot is NULL or inconsistent or if \a name is not found (how can the + * caller know which occurred?). + * + * \sa rot_token_lookup() + * + * TODO: Should use Lex to speed it up, strcmp() hurts! */ const struct confparams *HAMLIB_API rot_confparam_lookup(ROT *rot, const char *name) @@ -603,10 +652,18 @@ const struct confparams *HAMLIB_API rot_confparam_lookup(ROT *rot, /** - * \brief Simple lookup returning token id associated with name - * \param rot - * \param name - * \return token enum + * \brief Search for the token ID associated with a rotator configuration + * parameter token name. + * + * \param rot The #ROT handle. + * \param name Configuration parameter token name string. + * + * Searches the backend and frontend configuration parameters tables for the + * token ID. + * + * \return The token ID value or #RIG_CONF_END if the lookup failed. + * + * \sa rot_confparam_lookup() */ token_t HAMLIB_API rot_token_lookup(ROT *rot, const char *name) { @@ -626,16 +683,20 @@ token_t HAMLIB_API rot_token_lookup(ROT *rot, const char *name) /** - * \brief set a rotator configuration parameter - * \param rot The rot handle - * \param token The parameter - * \param val The value to set the parameter to + * \brief Set a rotator configuration parameter. * - * Sets a configuration parameter. + * \param rot The #ROT handle. + * \param token The token of the parameter to set. + * \param val The value to set the parameter to. * - * \return RIG_OK if the operation has been successful, otherwise - * a negative value if an error occurred (in which case, cause is - * set appropriately). + * Sets a rotator configuration parameter to \a val. + * + * \return RIG_OK if the operation has been successful, otherwise a **negative + * value** if an error occurred (in which case, cause is set appropriately). + * + * \retval RIG_OK The parameter was set successfully. + * \retval RIG_EINVAL \a rot is NULL or inconsistent or \a token is invalid. + * \retval RIG_ENAVAIL rot_caps#set_conf() capability is not available. * * \sa rot_get_conf() */ @@ -678,16 +739,20 @@ int HAMLIB_API rot_set_conf(ROT *rot, token_t token, const char *val) /** - * \brief get the value of a configuration parameter - * \param rot The rot handle - * \param token The parameter - * \param val The location where to store the value of config \a token + * \brief Query the value of a rotator configuration parameter. + * + * \param rot The #ROT handle. + * \param token The token of the parameter to query. + * \param val The location where to store the value of the configuration \a token. + * + * Retrieves the value of a configuration parameter associated with \a token. * - * Retrieves the value of a configuration parameter associated with \a token. + * \return RIG_OK if the operation has been successful, otherwise a **negative + * value** if an error occurred (in which case, cause is set appropriately). * - * \return RIG_OK if the operation has been successful, otherwise - * a negative value if an error occurred (in which case, cause is - * set appropriately). + * \retval RIG_OK Querying the parameter was successful. + * \retval RIG_EINVAL \a rot is NULL or inconsistent. + * \retval RIG_ENAVAIL rot_caps#get_conf() capability is not available. * * \sa rot_set_conf() */ commit 132d896e894f3b0692244e45df686a8eebabd836 Author: Nate Bargmann <n0...@n0...> Date: Sat Feb 20 07:13:55 2021 -0600 Add amp_internal subgroup to Doxygen documentation The amp_internal subgroup will document those items intended for Hamlib interal use, i.e. not a part of the public API. diff --git a/doc/index.doxygen b/doc/index.doxygen index 22670887..366239c1 100644 --- a/doc/index.doxygen +++ b/doc/index.doxygen @@ -106,5 +106,6 @@ Windows 32 bit on Debian GNU/Linux. * \defgroup rotator Rotator API * \defgroup rot_internal Rotator Internal API * \defgroup amplifier Amplifier API + * \defgroup amp_internal Amplifier Internal API * \defgroup utilities Utility Routines API */ diff --git a/src/amp_conf.c b/src/amp_conf.c index bc0b4bd3..b819e56f 100644 --- a/src/amp_conf.c +++ b/src/amp_conf.c @@ -108,16 +108,30 @@ static const struct confparams ampfrontend_serial_cfg_params[] = { RIG_CONF_END, NULL, } }; +/** @} */ /* amplifier definitions */ + + +/** + * \addtogroup amp_internal + * @{ + */ + -//! @cond Doxygen_Suppress /** - * \brief Set amplifier state info from alpha input - * \param amp - * \param token TOK_... specifying which info to set - * \param val input - * \return RIG_OK or < 0 error + * \brief Set an amplifier state value from alpha input. + * + * \param amp The #AMP handle. + * \param token TOK_... specify which value to set. + * \param val Input. * - * assumes amp!=NULL, val!=NULL + * Assumes amp != NULL and val != NULL. + * + * \return RIG_OK or a **negative value** error. + * + * \retval RIG_OK TOK_... value set successfully. + * \retval RIG_EINVAL TOK_.. value not set. + * + * \sa frontamp_get_conf() */ int frontamp_set_conf(AMP *amp, token_t token, const char *val) { @@ -295,16 +309,23 @@ int frontamp_set_conf(AMP *amp, token_t token, const char *val) return RIG_OK; } -//! @endcond -//! @cond Doxygen_Suppress /** - * \brief Get data from amplifier state in alpha form - * \param amp non-null - * \param token TOK_... specifying which data to get - * \param val result non-null - * \return RIG_OK or < 0 if error + * \brief Query data from an amplifier state in alpha form. + * + * \param amp The #AMP handle. + * \param token TOK_... specify which data to query. + * \param val Result. + * + * Assumes amp != NULL and val != NULL. + * + * \return RIG_OK or a **negative value** on error. + * + * \retval RIG_OK TOK_... value queried successfully. + * \retval RIG_EINVAL TOK_.. value not queried. + * + * \sa frontamp_set_conf() */ int frontamp_get_conf(AMP *amp, token_t token, char *val) { @@ -432,18 +453,33 @@ int frontamp_get_conf(AMP *amp, token_t token, char *val) return RIG_OK; } -//! @endcond +/** @} */ /* amp_internal definitions */ + + +/** + * \addtogroup amplifier + * @{ + */ #ifdef XXREMOVEDXXC // Not referenced anywhere /** - * \brief Executes cfunc on all the elements stored in the conf table - * \param amp non-null - * \param cfunc function(..) - * \param data + * \brief Executes cfunc on all the elements stored in the configuration + * parameters table. * - * start first with backend conf table, then finish with frontend table + * \param amp The #AMP handle. + * \param cfunc Pointer to the callback function(...). + * \param data Data for the callback function. + * + * Start first with backend configuration parameters table, then finish with + * frontend configuration parameters table. + * + * \return RIG_OK if the operation has been successful, otherwise a **negative + * value** if an error occurred (in which case, cause is set appropriately). + * + * \retval RIG_OK The \a cfunc action completed successfully. + * \retval RIG_EINVAL \a amp is NULL or inconsistent or \a cfunc is NULL. */ int HAMLIB_API amp_token_foreach(AMP *amp, int (*cfunc)(const struct confparams *, @@ -502,7 +538,7 @@ int HAMLIB_API amp_token_foreach(AMP *amp, * to the frontend config params table. * * \return A pointer to the token in the #confparams structure or NULL if - * \a amp is NULL or inconsistent or if \a token is not found (how can the + * \a amp is NULL or inconsistent or if \a name is not found (how can the * caller know which occurred?). * * \sa amp_token_lookup() @@ -566,7 +602,7 @@ const struct confparams *HAMLIB_API amp_confparam_lookup(AMP *amp, * Searches the backend and frontend configuration parameters tables for the * token ID. * - * \return The token ID value or RIG_CONF_END if the lookup failed. + * \return The token ID value or #RIG_CONF_END if the lookup failed. * * \sa amp_confparam_lookup() */ @@ -590,9 +626,9 @@ token_t HAMLIB_API amp_token_lookup(AMP *amp, const char *name) /** * \brief Set an amplifier configuration parameter. * - * \param amp The #AMP handle. + * \param amp The #AMP handle. * \param token The token of the parameter to set. - * \param val The value to set the parameter to. + * \param val The value to set the parameter to. * * Sets an amplifier configuration parameter to \a val. * commit 59d09e42a589f9040f9e7441395f655bd518e557 Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Feb 20 00:02:58 2021 -0600 Add USER-U USER-L modes to flrig.c for TS480 diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index 7b69d628..16028125 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -914,6 +914,8 @@ static int flrig_open(RIG *rig) else if (streq(p, "USB-D1")) { modeMapAdd(&modes, RIG_MODE_PKTUSB, p); } else if (streq(p, "USB-D2")) { modeMapAdd(&modes, RIG_MODE_PKTUSB, p); } else if (streq(p, "USB-D3")) { modeMapAdd(&modes, RIG_MODE_PKTUSB, p); } + else if (streq(p, "USER-U")) { modeMapAdd(&modes, RIG_MODE_PKTUSB, p); } + else if (streq(p, "USER-L")) { modeMapAdd(&modes, RIG_MODE_PKTLSB, p); } else if (streq(p, "W-FM")) { modeMapAdd(&modes, RIG_MODE_WFM, p); } else if (streq(p, "WFM")) { modeMapAdd(&modes, RIG_MODE_WFM, p); } else if (streq(p, "UCW")) { modeMapAdd(&modes, RIG_MODE_CW, p); } diff --git a/rigs/dummy/flrig.h b/rigs/dummy/flrig.h index b2cccb69..879df79b 100644 --- a/rigs/dummy/flrig.h +++ b/rigs/dummy/flrig.h @@ -28,7 +28,7 @@ #include <sys/time.h> #endif -#define BACKEND_VER "20210215" +#define BACKEND_VER "20210220" #define EOM "\r" #define TRUE 1 commit 83c75fa8c6b7e2f63d86dcd9a29c909952c4b8ca Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Feb 19 22:49:46 2021 -0600 Fixing AF RFWPOWER and STRENGTH for TS480 https://github.com/Hamlib/Hamlib/issues/553 diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index 26956254..e6f8bef0 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -2322,7 +2322,7 @@ static int kenwood_get_power_minmax(RIG *rig, int *power_now, int *power_min, rig_debug(RIG_DEBUG_TRACE, "%s: retval=%d\n", __func__, retval); - if (RIG_IS_TS890S) + if (RIG_IS_TS890S || RIG_IS_TS480) { expval = 6; } @@ -2677,7 +2677,7 @@ int kenwood_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) break; case RIG_LEVEL_STRENGTH: - if (RIG_IS_TS590S || RIG_IS_TS590SG) + if (RIG_IS_TS590S || RIG_IS_TS590SG || RIG_IS_TS480) { cmd = "SM0"; len = 3; diff --git a/rigs/kenwood/ts480.c b/rigs/kenwood/ts480.c index 7d781bcc..6a701e44 100644 --- a/rigs/kenwood/ts480.c +++ b/rigs/kenwood/ts480.c @@ -119,7 +119,7 @@ kenwood_ts480_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) return kenwood_set_level(rig, vfo, level, val); case RIG_LEVEL_RF: - if (rig->caps->rig_model == RIG_MODEL_TS890S) + if (RIG_IS_TS890S) { rf_max_level = 255; } @@ -132,7 +132,7 @@ kenwood_ts480_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) case RIG_LEVEL_SQL: kenwood_val = val.f * 255; /* possible values for TS480 are 000.. 255 */ - if (rig->caps->rig_model == RIG_MODEL_TS890S) + if (RIG_IS_TS890S) { sprintf(levelbuf, "SQ%03d", kenwood_val); } @@ -148,7 +148,7 @@ kenwood_ts480_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) /* hamlib argument is int, possible values rig.h:enum agc_level_e */ /* possible values for TS480 000(=off), 001(=fast), 002(=slow) */ /* possible values for TS890 0(=off), 1(=slow), 2(=mid), 3(=fast), 4(=off/Last) */ - if (rig->caps->rig_model == RIG_MODEL_TS890S) + if (RIG_IS_TS890S) { rig_debug(RIG_DEBUG_VERBOSE, "%s TS890S RIG_LEVEL_AGC\n", __func__); @@ -220,7 +220,7 @@ kenwood_ts480_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) /* - * kenwood_get_level + * kenwood_ts480_get_level * Assumes rig!=NULL, val!=NULL */ int @@ -235,7 +235,7 @@ kenwood_ts480_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__); - if (rig->caps->rig_model == RIG_MODEL_TS890S) + if (RIG_IS_TS890S || RIG_IS_TS480) { rf_max_level = 255; } @@ -247,7 +247,7 @@ kenwood_ts480_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) switch (level) { case RIG_LEVEL_AF: - if (rig->caps->rig_model == RIG_MODEL_TS890S) + if (RIG_IS_TS890S) { retval = kenwood_transaction(rig, "AG", ackbuf, sizeof(ackbuf)); offset_level = 2; @@ -279,6 +279,10 @@ kenwood_ts480_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) return RIG_OK; case RIG_LEVEL_RF: + if (RIG_IS_TS480) + { + rf_max_level = 100; + } retval = kenwood_transaction(rig, "RG", ackbuf, sizeof(ackbuf)); if (RIG_OK != retval) @@ -302,7 +306,7 @@ kenwood_ts480_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) return RIG_OK; case RIG_LEVEL_SQL: - if (rig->caps->rig_model == RIG_MODEL_TS890S) + if (RIG_IS_TS890S) { retval = kenwood_transaction(rig, "SQ", ackbuf, sizeof(ackbuf)); ack_len_expected = 5; @@ -334,7 +338,7 @@ kenwood_ts480_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) return RIG_OK; case RIG_LEVEL_AGC: - if (rig->caps->rig_model == RIG_MODEL_TS890S) + if (RIG_IS_TS890S) { retval = kenwood_transaction(rig, "GC", ackbuf, sizeof(ackbuf)); ack_len_expected = 3; @@ -364,7 +368,7 @@ kenwood_ts480_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) break; case '1': - if (rig->caps->rig_model == RIG_MODEL_TS890S) + if (RIG_IS_TS890S) { val->i = RIG_AGC_SLOW; } @@ -376,7 +380,7 @@ kenwood_ts480_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) break; case '2': - if (rig->caps->rig_model == RIG_MODEL_TS890S) + if (RIG_IS_TS890S) { val->i = RIG_AGC_MEDIUM; } commit a6da45eb8b62bc10b53f1526af9049150ec4d407 Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Feb 19 14:41:28 2021 -0600 Fix for TS480 RFPOWER read -- was not able to handle the long command string https://github.com/Hamlib/Hamlib/issues/553 diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index eddade3c..26956254 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -2276,6 +2276,9 @@ static int kenwood_get_power_minmax(RIG *rig, int *power_now, int *power_min, switch (rig->caps->rig_model) { + // TS480 can't handle the long command string + // We can treat it like the TS890S + case RIG_MODEL_TS480: // TS890S can't take power levels outside 5-100 and 5-25 // So all we'll do is read power_now case RIG_MODEL_TS890S: commit 49bcb07b8fbc4f5d23ebff3d7b9224faca47996d Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Feb 19 14:32:54 2021 -0600 Add MICGAIN and STRENGTH to ts480.c https://github.com/Hamlib/Hamlib/issues/553 diff --git a/rigs/kenwood/ts480.c b/rigs/kenwood/ts480.c index 8f192a4b..7d781bcc 100644 --- a/rigs/kenwood/ts480.c +++ b/rigs/kenwood/ts480.c @@ -401,10 +401,11 @@ kenwood_ts480_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) return RIG_OK; + case RIG_LEVEL_STRENGTH: + case RIG_LEVEL_MICGAIN: case RIG_LEVEL_RFPOWER: return kenwood_get_level(rig, vfo, level, val); - case RIG_LEVEL_MICGAIN: case RIG_LEVEL_PREAMP: case RIG_LEVEL_IF: case RIG_LEVEL_APF: commit 3a0ec1e1b4b5303c01e6aec9b90ce787f95d1681 Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Feb 19 14:27:21 2021 -0600 fix type in ts480 ag_level diff --git a/rigs/kenwood/ts480.c b/rigs/kenwood/ts480.c index 2720db8e..8f192a4b 100644 --- a/rigs/kenwood/ts480.c +++ b/rigs/kenwood/ts480.c @@ -115,7 +115,7 @@ kenwood_ts480_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) return kenwood_set_level(rig, vfo, level, val); case RIG_LEVEL_AF: - priv->ag_format =22; + priv->ag_format =2; return kenwood_set_level(rig, vfo, level, val); case RIG_LEVEL_RF: commit c3e9677a7edcce722299cd28629fb50297f4df35 Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Feb 19 09:38:30 2021 -0600 Fix ts480 LEVEL_AF and add LEVEL_STRENGHT and LEVEL_MICGAIN https://github.com/Hamlib/Hamlib/issues/553 diff --git a/rigs/kenwood/ts480.c b/rigs/kenwood/ts480.c index 54044bce..2720db8e 100644 --- a/rigs/kenwood/ts480.c +++ b/rigs/kenwood/ts480.c @@ -39,7 +39,7 @@ #define TS480_AM_TX_MODES RIG_MODE_AM #define TS480_VFO (RIG_VFO_A|RIG_VFO_B) -#define TS480_LEVEL_ALL (RIG_LEVEL_RFPOWER|RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_SQL|RIG_LEVEL_AGC) +#define TS480_LEVEL_ALL (RIG_LEVEL_RFPOWER|RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_SQL|RIG_LEVEL_AGC|RIG_LEVEL_MICGAIN|RIG_LEVEL_STRENGTH) #define TS480_FUNC_ALL (RIG_FUNC_NB|RIG_FUNC_COMP|RIG_FUNC_VOX|RIG_FUNC_NR|RIG_FUNC_NR|RIG_FUNC_BC|RIG_FUNC_BC2|RIG_FUNC_RIT|RIG_FUNC_XIT) #define TS890_FUNC_ALL (RIG_FUNC_NB|RIG_FUNC_NB2|RIG_FUNC_COMP|RIG_FUNC_VOX|RIG_FUNC_NR|RIG_FUNC_NR|RIG_FUNC_BC|RIG_FUNC_BC2|RIG_FUNC_RIT|RIG_FUNC_XIT) @@ -105,6 +105,7 @@ kenwood_ts480_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) char levelbuf[16]; int kenwood_val; int rf_max_level = 100; /* 100 for TS-480 and 255 for TS-890S */ + struct kenwood_priv_data *priv = rig->state.priv; rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__); commit 132a5612f4064caecce0e133ff56f573f0783ed1 Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Feb 19 09:33:12 2021 -0600 Fix ts480 get_level for LEVEL_AF https://github.com/Hamlib/Hamlib/issues/new diff --git a/rigs/kenwood/ts480.c b/rigs/kenwood/ts480.c index 0f6a97ac..54044bce 100644 --- a/rigs/kenwood/ts480.c +++ b/rigs/kenwood/ts480.c @@ -114,6 +114,7 @@ kenwood_ts480_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) return kenwood_set_level(rig, vfo, level, val); case RIG_LEVEL_AF: + priv->ag_format =22; return kenwood_set_level(rig, vfo, level, val); case RIG_LEVEL_RF: @@ -447,7 +448,7 @@ const struct rig_caps ts480_caps = RIG_MODEL(RIG_MODEL_TS480), .model_name = "TS-480", .mfg_name = "Kenwood", - .version = BACKEND_VER ".0", + .version = BACKEND_VER ".1", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, commit 0f9a7fac07b13aa4015446074b6ac61632c02d80 Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Feb 19 08:44:02 2021 -0600 Add -RIG_EINVAL when set_level > 1.0 diff --git a/rigs/dummy/dummy.c b/rigs/dummy/dummy.c index abb3043a..4c524325 100644 --- a/rigs/dummy/dummy.c +++ b/rigs/dummy/dummy.c @@ -1006,6 +1006,7 @@ static int dummy_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) if (RIG_LEVEL_IS_FLOAT(level)) { + if (val.f > 1.0) RETURNFUNC(-RIG_EINVAL); sprintf(lstr, "%f", val.f); } else diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index fe5aadac..a63f0602 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -2419,6 +2419,7 @@ int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) */ if (RIG_LEVEL_IS_FLOAT(level)) { + if (val.f > 1.0) RETURNFUNC(-RIG_EINVAL); icom_val = val.f * 255; } else diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index 48427e84..eddade3c 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -2385,6 +2385,7 @@ int kenwood_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) if (RIG_LEVEL_IS_FLOAT(level)) { + if (val.f > 1.0) RETURNFUNC(-RIG_EINVAL); kenwood_val = val.f * 255; } else commit a9633cec39899d1f9a3fdaf7ffbbcfb06619c57e Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Feb 19 07:47:31 2021 -0600 Update newcat.h version diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h index 0403c150..36c7aceb 100644 --- a/rigs/yaesu/newcat.h +++ b/rigs/yaesu/newcat.h @@ -50,7 +50,7 @@ typedef char ncboolean; /* shared function version */ -#define NEWCAT_VER "20210213" +#define NEWCAT_VER "20210219" /* Hopefully large enough for future use, 128 chars plus '\0' */ #define NEWCAT_DATA_LEN 129 commit 6a3b28e518ac8331915ad2555ef248f0a405cdee Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Feb 19 07:46:32 2021 -0600 In newcat.c check LEVEL values to ensure they are in the range 0-1 diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index dacfa13f..75dbaf41 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -3474,6 +3474,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) { RETURNFUNC(-RIG_ENAVAIL); } + if (val.f > 1.0) RETURNFUNC(-RIG_EINVAL); fpf = newcat_scale_float(255, val.f); snprintf(priv->cmd_str, sizeof(priv->cmd_str), "AG%c%03d%c", main_sub_vfo, fpf, @@ -3643,6 +3644,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) newcat_get_mode(rig, vfo, &mode, &width); } + if (val.f > 1.0) RETURNFUNC(-RIG_EINVAL); if (is_ftdx1200 || is_ftdx3000 || is_ft891 || is_ft991 || is_ftdx101 || is_ftdx10) { @@ -4196,6 +4198,7 @@ int newcat_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) RETURNFUNC(-RIG_ENAVAIL); } + if (val.f > 1.0) RETURNFUNC(-RIG_EINVAL); if (is_ftdx1200 || is_ftdx3000 || is_ft891 || is_ft991 || is_ftdx101 || is_ftdx10) { commit 555bf9dc65ead752041f39679a6cab3c3fa6d324 Merge: 53b18d4e 1ad32d41 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Feb 18 23:57:33 2021 -0600 Merge branch 'master' of https://github.com/Hamlib/Hamlib commit 53b18d4ec40eb034224cf62213e9ef8c4609ddeb Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Feb 18 23:45:14 2021 -0600 Add Main/Sub vfos to dummy.c for testing diff --git a/rigs/dummy/dummy.c b/rigs/dummy/dummy.c index ed6a46ac..abb3043a 100644 --- a/rigs/dummy/dummy.c +++ b/rigs/dummy/dummy.c @@ -505,8 +505,10 @@ static int dummy_set_vfo(RIG *rig, vfo_t vfo) case RIG_VFO_VFO: /* FIXME */ case RIG_VFO_RX: + case RIG_VFO_MAIN: priv->curr = &priv->vfo_a; break; case RIG_VFO_A: priv->curr = &priv->vfo_a; break; + case RIG_VFO_SUB: priv->curr = &priv->vfo_b; break; case RIG_VFO_B: priv->curr = &priv->vfo_b; break; case RIG_VFO_MEM: @@ -2242,7 +2244,7 @@ struct rig_caps dummy_no_vfo_caps = RIG_MODEL(RIG_MODEL_DUMMY_NOVFO), .model_name = "Dummy No VFO", .mfg_name = "Hamlib", - .version = "20200606.0", + .version = "20210218.0", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_OTHER, ----------------------------------------------------------------------- Summary of changes: doc/index.doxygen | 1 + rigs/dummy/dummy.c | 5 +- rigs/dummy/flrig.c | 2 + rigs/dummy/flrig.h | 2 +- rigs/icom/icom.c | 1 + rigs/kenwood/kenwood.c | 8 ++- rigs/kenwood/ts480.c | 33 ++++++----- rigs/yaesu/newcat.c | 3 + rigs/yaesu/newcat.h | 2 +- src/amp_conf.c | 84 ++++++++++++++++++++-------- src/rot_conf.c | 149 +++++++++++++++++++++++++++++++++++-------------- 11 files changed, 206 insertions(+), 84 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Nate B. <n0...@us...> - 2021-02-19 02:51:59
|
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 1ad32d412460433724d18f411fffbf2f470a58c7 (commit) via 4e3d1eb9b4f4955d7c17acd5acb5977d6e93709e (commit) via 68108c12192e28efabf89b71ec95970e21cd7050 (commit) from e59a7f09717406eef184279920c5b657008ac2e2 (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 1ad32d412460433724d18f411fffbf2f470a58c7 Merge: e59a7f09 4e3d1eb9 Author: Nate Bargmann <n0...@n0...> Date: Thu Feb 18 20:51:08 2021 -0600 Merge pull request #552 from N0NB/doxygen_work Doxygen work commit 4e3d1eb9b4f4955d7c17acd5acb5977d6e93709e Author: Nate Bargmann <n0...@n0...> Date: Thu Feb 18 20:45:47 2021 -0600 Update Doxygen comments in rotlist.h diff --git a/include/hamlib/rotlist.h b/include/hamlib/rotlist.h index 29de6eba..cdfe840c 100644 --- a/include/hamlib/rotlist.h +++ b/include/hamlib/rotlist.h @@ -35,46 +35,50 @@ */ /** - * \file rotlist.h - * \brief Hamlib rotator model definitions. + * \file rotlist.h + * \brief Hamlib rotator model definitions. * - * This file contains rotator model definitions for the Hamlib rotator API. - * Each distinct rotator type has a unique model number (ID) and is used by - * hamlib to identify and distinguish between the different hardware drivers. - * The exact model numbers can be acquired using the macros in this file. To - * obtain a list of supported rotator branches, one can use the statically - * defined ROT_BACKEND_LIST macro. To obtain a full list of supported - * rotators (including each model in every branch), the foreach_opened_rot() - * API function can be used. + * This file contains rotator model definitions for the Hamlib rotator + * Application Programming Interface (API). Each distinct rotator type has a + * unique model number (ID) and is used by Hamlib to identify and distinguish + * between the different hardware drivers. The exact model numbers can be + * acquired using the macros in this file. To obtain a list of supported + * rotator branches, one can use the statically defined ROT_BACKEND_LIST macro + * (defined in configure.ac). To obtain a full list of supported rotators + * (including each model in every branch), the foreach_opened_rot() API + * function can be used. * - * The model number, or ID, is used to tell Hamlib which rotator the client - * whishes to use. It is done with the rot_init() API call. + * The model number, or ID, is used to tell Hamlib which rotator the client + * wishes to use which is done with the rot_init() API call. */ /** - * \def ROT_MODEL_NONE - * \brief A macro that returns the model number for an unknown model. + * \def ROT_MODEL_NONE + * \brief A macro that returns the model number for an unknown model. * - * The none backend, as the name suggests, does nothing...mainly for internal use + * The none backend, as the name suggests, does nothing. It is mainly for + * internal use. */ #define ROT_MODEL_NONE 0 /** - * \def ROT_MODEL_DUMMY - * \brief A macro that returns the model number for the dummy backend. + * \brief A macro that returns the model number for the DUMMY backend. * - * The dummy backend, as the name suggests, is a backend which performs - * no hardware operations and always behaves as one would expect. It can - * be thought of as a hardware simulator and is very useful for testing - * client applications. + * \def ROT_MODEL_DUMMY + * + * The DUMMY backend, as the name suggests, is a backend which performs + * no hardware operations and always behaves as one would expect. It can + * be thought of as a hardware simulator and is very useful for testing + * client applications. */ /** - * \def ROT_MODEL_NETROTCTL - * \brief A macro that returns the model number for the Network backend. + * \brief A macro that returns the model number for the NETROTCTL backend. + * + * \def ROT_MODEL_NETROTCTL * - * This backend allows use of the rotctld daemon through the normal - * Hamlib API. + * The NETROTCTL backend allows use of the `rotctld` daemon through the normal + * Hamlib API. */ //! @cond Doxygen_Suppress #define ROT_DUMMY 0 @@ -84,30 +88,29 @@ #define ROT_MODEL_NETROTCTL ROT_MAKE_MODEL(ROT_DUMMY, 2) -/* - * Easycomm - */ - /** - * \def ROT_MODEL_EASYCOMM1 - * \brief A macro that returns the model number of the EasyComm 1 backend. + * \brief A macro that returns the model number of the EASYCOMM 1 backend. + * + * \def ROT_MODEL_EASYCOMM1 * - * The EasyComm 1 backend can be used with rotators that support the - * EASYCOMM I Standard. + * The EASYCOMM1 backend can be used with rotators that support the EASYCOMM + * I Standard. */ /** - * \def ROT_MODEL_EASYCOMM2 - * \brief A macro that returns the model number of the EasyComm 2 backend. + * \brief A macro that returns the model number of the EASYCOMM 2 backend. * - * The EasyComm 2 backend can be used with rotators that support the - * EASYCOMM II Standard. + * \def ROT_MODEL_EASYCOMM2 + * + * The EASYCOMM2 backend can be used with rotators that support the EASYCOMM + * II Standard. */ /** - * \def ROT_MODEL_EASYCOMM3 - * \brief A macro that returns the model number of the EasyComm 3 backend. + * \brief A macro that returns the model number of the EASYCOMM 3 backend. + * + * \def ROT_MODEL_EASYCOMM3 * - * The EasyComm 3 backend can be used with rotators that support the - * EASYCOMM III Standard. + * The EASYCOMM3 backend can be used with rotators that support the EASYCOMM + * III Standard. */ //! @cond Doxygen_Suppress #define ROT_EASYCOMM 2 @@ -119,11 +122,12 @@ /** - * \def ROT_MODEL_FODTRACK - * \brief A macro that returns the model number of the Fodtrack backend. + * \brief A macro that returns the model number of the FODTRACK backend. + * + * \def ROT_MODEL_FODTRACK * - * The Fodtrack backend can be used with rotators that support the - * FODTRACK Standard. + * The FODTRACK backend can be used with rotators that support the FODTRACK + * Standard. */ //! @cond Doxygen_Suppress #define ROT_FODTRACK 3 @@ -133,39 +137,44 @@ /** - * \def ROT_MODEL_ROTOREZ - * \brief A macro that returns the model number of the Rotor-EZ backend. + * \brief A macro that returns the model number of the ROTOREZ backend. * - * The Rotor-EZ backend can be used with Hy-Gain rotators that support - * the extended DCU command set by Idiom Press Rotor-EZ board. + * \def ROT_MODEL_ROTOREZ + * + * The ROTOREZ backend can be used with Hy-Gain rotators that support the + * extended DCU command set by the Idiom Press Rotor-EZ board. */ /** - * \def ROT_MODEL_ROTORCARD - * \brief A macro that returns the model number of the Rotor Card backend. + * \brief A macro that returns the model number of the ROTORCARD backend. + * + * \def ROT_MODEL_ROTORCARD * - * The Rotor-EZ backend can be used with Yaesu rotators that support the - * extended DCU command set by Idiom Press Rotor Card board. + * The ROTORCARD backend can be used with Yaesu rotators that support the + * extended DCU command set by the Idiom Press Rotor Card board. */ /** - * \def ROT_MODEL_DCU - * \brief A macro that returns the model number of the DCU backend. + * \brief A macro that returns the model number of the DCU backend. + * + * \def ROT_MODEL_DCU * - * The Rotor-EZ backend can be used with rotators that support the DCU - * command set by Hy-Gain (currently the DCU-1). + * The DCU backend can be used with rotators that support the DCU command set + * by Hy-Gain (currently the DCU-1). */ /** - * \def ROT_MODEL_ERC - * \brief A macro that returns the model number of the ERC backend. + * \brief A macro that returns the model number of the ERC backend. * - * The Rotor-EZ backend can be used with rotators that support the DCU - * command set by DF9GR (currently the ERC). + * \def ROT_MODEL_ERC + * + * The ERC backend can be used with rotators that support the DCU command set + * by DF9GR (currently the ERC). */ /** - * \def ROT_MODEL_RT21 - * \brief A macro that returns the model number of the RT21 backend. + * \brief A macro that returns the model number of the RT21 backend. + * + * \def ROT_MODEL_RT21 * - * The Rotor-EZ backend can be used with rotators that support the DCU - * command set by Green Heron (currently the RT-21). + * The RT21 backend can be used with rotators that support the DCU command set + * by Green Heron (currently the RT-21). */ //! @cond Doxygen_Suppress #define ROT_ROTOREZ 4 @@ -179,11 +188,12 @@ /** - * \def ROT_MODEL_SARTEK1 - * \brief A macro that returns the model number of the SARtek-1 backend. + * \brief A macro that returns the model number of the SARTEK1 backend. + * + * \def ROT_MODEL_SARTEK1 * - * The sartek backend can be used with rotators that support the SARtek - * protocol. + * The SARTEK1 backend can be used with rotators that support the SARtek + * protocol. */ //! @cond Doxygen_Suppress #define ROT_SARTEK 5 @@ -193,62 +203,101 @@ /** - * \def ROT_MODEL_GS232A - * \brief A macro that returns the model number of the GS-232A backend. + * \brief A macro that returns the model number of the GS232A backend. * - * The GS-232A backend can be used with rotators that support the GS-232A - * protocol. + * \def ROT_MODEL_GS232A + * + * The GS232A backend can be used with rotators that support the GS-232A + * protocol. */ /** - * \def ROT_MODEL_GS232_GENERIC - * \brief A macro that returns the model number of the GS-232 backend. + * \brief A macro that returns the model number of the GS232 backend. + * + * \def ROT_MODEL_GS232_GENERIC * - * The GS-232 backend can be used with rotators that support the generic (even if not coded correctly) GS-232 - * protocol. + * The GS232_GENERIC backend can be used with rotators that support the + * generic (even if not coded correctly) GS-232 protocol. */ /** - * \def ROT_MODEL_GS232B - * \brief A macro that returns the model number of the GS-232B backend. + * \brief A macro that returns the model number of the GS232B backend. + * + * \def ROT_MODEL_GS232B * - * The GS-232B backend can be used with rotators that support the GS-232B - * protocol. + * The GS232B backend can be used with rotators that support the GS232B + * protocol. */ /** - * \def ROT_MODEL_F1TETRACKER - * \brief A macro that returns the model number of the F1TETRACKER backend. + * \brief A macro that returns the model number of the F1TETRACKER backend. * - * The F1TETRACKER backend can be used with rotators that support the - * F1TETRACKER protocol. + * \def ROT_MODEL_F1TETRACKER + * + * The F1TETRACKER backend can be used with rotators that support the F1TE + * Tracker protocol. */ - /** - * \def ROT_MODEL_GS23 - * \brief A macro that returns the model number of the GS23 backend. +/** + * \brief A macro that returns the model number of the GS23 backend. + * + * \def ROT_MODEL_GS23 * - * The GS23 backend can be used with rotators that support the - * GS23 protocol. + * The GS23 backend can be used with rotators that support the GS-23 protocol. */ - /** - * \def ROT_MODEL_GS232 - * \brief A macro that returns the model number of the GS232 backend. +/** + * \brief A macro that returns the model number of the GS232 backend. + * + * \def ROT_MODEL_GS232 * - * The GS232 backend can be used with rotators that support the - * GS232 protocol. + * The GS232 backend can be used with rotators that support the GS-232 + * protocol. */ - /** - * \def ROT_MODEL_LVB - * \brief A macro that returns the model number of the LVB TRACKER backend. +/** + * \brief A macro that returns the model number of the LVB backend. * - * The AMSAT LVB TRACKER backend can be used with rotators that support the - * AMSAT LVB TRACKER GS232 based protocol. + * \def ROT_MODEL_LVB + * + * The LVB backend can be used with rotators that support the G6LVB AMSAT LVB + * Tracker GS-232 based protocol. + */ +/** + * \brief A macro that returns the model number of the ST2 backend. + * + * \def ROT_MODEL_ST2 + * + * The ST2 backend can be used with rotators that support the Fox Delta ST2 + * GS-232 based protocol. + */ +/** + * \brief A macro that returns the model number of the GS232A_AZ Azimuth backend. + * + * \def ROT_MODEL_GS232A_AZ + * + * The GS232A_AZ backend can be used with azimuth rotators that support the + * GS-232A protocol. */ - /** - * \def ROT_MODEL_ST2 - * \brief A macro that returns the model number of the Fox Delta ST2 backend. +/** + * \brief A macro that returns the model number of the GS232A_EL Elevation backend. + * + * \def ROT_MODEL_GS232A_EL * - * The Fox Delta ST2 backend can be used with rotators that support the - * Fox Delta ST2 GS232 based protocol. + * The GS232A_EL backend can be used with elevation rotators that support the + * GS-232A protocol. */ - +/** + * \brief A macro that returns the model number of the GS232B_AZ Azimuth backend. + * + * \def ROT_MODEL_GS232B_AZ + * + * The GS232B_AZ backend can be used with azimuth rotators that support the + * GS-232B protocol. + */ +/** + * \brief A macro that returns the model number of the GS232B_EL Elevation backend. + * + * \def ROT_MODEL_GS232B_EL + * + * The GS232B_EL backend can be used with elevation rotators that support the + * GS-232B protocol. + */ + //! @cond Doxygen_Suppress #define ROT_GS232A 6 #define ROT_BACKEND_GS232A "gs232a" @@ -266,11 +315,14 @@ #define ROT_MODEL_GS232B_AZ ROT_MAKE_MODEL(ROT_GS232A, 11) #define ROT_MODEL_GS232B_EL ROT_MAKE_MODEL(ROT_GS232A, 12) + /** - * \def ROT_MODEL_PCROTOR - * \brief A macro that returns the model number of the PcRotor/WA6UFQ backend. + * \brief A macro that returns the model number of the PCROTOR backend. * - * The kit backend can be used with home brewed rotators. + * \def ROT_MODEL_PCROTOR + * + * The PCROTOR backend is a member of the kit backend group that can be used + * with home brewed rotators. */ //! @cond Doxygen_Suppress #define ROT_KIT 7 @@ -280,8 +332,12 @@ /** - * \def ROT_MODEL_HD1780 - * \brief A macro that returns the model number of the HD 1780 backend. + * \brief A macro that returns the model number of the HD1780 backend. + * + * \def ROT_MODEL_HD1780 + * + * The HD1780 backend can be used with rotators that support the Heathkit + * HD-1780 protocol. */ //! @cond Doxygen_Suppress #define ROT_HEATHKIT 8 @@ -291,22 +347,28 @@ /** - * \def ROT_MODEL_SPID_ROT2PROG - * \brief A macro that returns the model number of the ROT2PROG backend. + * \brief A macro that returns the model number of the ROT2PROG backend. + * + * \def ROT_MODEL_SPID_ROT2PROG * - * The SPID backend can be used with rotators that support the SPID protocol. + * The SPID_ROT2PROG backend can be used with rotators that support the SPID + * azimuth and elevation protocol. */ /** - * \def ROT_MODEL_SPID_ROT1PROG - * \brief A macro that returns the model number of the ROT1PROG backend. + * \brief A macro that returns the model number of the ROT1PROG backend. + * + * \def ROT_MODEL_SPID_ROT1PROG * - * The SPID backend can be used with rotators that support the SPID protocol. + * The SPID_ROT1PROG backend can be used with rotators that support the SPID + * azimuth protocol. */ /** - * \def ROT_MODEL_SPID_MD01_ROT2PROG - * \brief A macro that returns the model number of the MD-01/02 (ROT2PROG protocol) backend. + * \brief A macro that returns the model number of the SPID_MD01_ROT2PROG backend. * - * The SPID backend can be used with rotators that support the SPID protocol. + * \def ROT_MODEL_SPID_MD01_ROT2PROG + * + * The SPID_MD01_ROT2PROG backend can be used with rotators that support the + * extended SPID ROT2PROG azimuth and elevation protocol. */ //! @cond Doxygen_Suppress #define ROT_SPID 9 @@ -318,11 +380,30 @@ /** - * \def ROT_MODEL_RC2800 - * \brief A macro that returns the model number of the RC2800 backend. + * \brief A macro that returns the model number of the RC2800 backend. + * + * \def ROT_MODEL_RC2800 + * + * The RC2800 backend can be used with rotators that support the M2 (M + * Squared) RC2800 protocol. + */ +/** + * \brief A macro that returns the model number of the RC2800_EARLY_AZ + * backend. + * + * \def ROT_MODEL_RC2800_EARLY_AZ * - * The M2 backend can be used with rotators that support the RC2800 protocol - * and alike. + * The RC2800_EARLY_AZ backend can be used with rotators that support the M2 + * (M Squared) RC2800 early azimuth protocol. + */ +/** + * \brief A macro that returns the model number of the RC2800_EARLY_AZEL + * backend. + * + * \def ROT_MODEL_RC2800_EARLY_AZEL + * + * The RC2800_EARLY_AZEL backend can be used with rotators that support the M2 + * (M Squared) RC2800 early azimuth and elevation protocol. */ //! @cond Doxygen_Suppress #define ROT_M2 10 @@ -334,16 +415,20 @@ /** - * \def ROT_MODEL_RCI_AZEL - * \brief A macro that returns the model number of the RCI_AZEL backend. + * \brief A macro that returns the model number of the RCI_AZEL backend. + * + * \def ROT_MODEL_RCI_AZEL * - * The ARS backend can be used with rotators that support the ARS protocol. + * The RCI_AZEL backend can be used with rotators that support the ARS azimuth + * and elevation protocol. */ /** - * \def ROT_MODEL_RCI_AZ - * \brief A macro that returns the model number of the RCI_AZ backend. + * \brief A macro that returns the model number of the RCI_AZ backend. + * + * \def ROT_MODEL_RCI_AZ * - * The ARS backend can be used with rotators that support the ARS protocol. + * The RCI_AZ backend can be used with rotators that support the ARS azimuth + * protocol. */ //! @cond Doxygen_Suppress #define ROT_ARS 11 @@ -354,11 +439,12 @@ /** - * \def ROT_MODEL_IF100 - * \brief A macro that returns the model number of the IF-100 backend. + * \brief A macro that returns the model number of the IF100 backend. * - * The AMSAT backend can be used with rotators that support, among other, the - * IF-100 interface. + * \def ROT_MODEL_IF100 + * + * The IF100 backend can be used with rotators that support the AMSAT IF-100 + * interface. */ //! @cond Doxygen_Suppress #define ROT_AMSAT 12 @@ -368,11 +454,12 @@ /** - * \def ROT_MODEL_TS7400 - * \brief A macro that returns the model number of the TS7400 backend. + * \brief A macro that returns the model number of the TS7400 backend. + * + * \def ROT_MODEL_TS7400 * - * The TS-7400 backend supports and embedded ARM board using the TS-7400 - * Linux board. More information is at http://www.embeddedarm.com + * The TS7400 backend supports an embedded ARM board using the TS-7400 Linux + * board. More information is at https://www.embeddedarm.com */ //! @cond Doxygen_Suppress #define ROT_TS7400 13 @@ -382,11 +469,12 @@ /** - * \def ROT_MODEL_NEXSTAR - * \brief A macro that returns the model number of the NEXSTAR backend. + * \brief A macro that returns the model number of the NEXSTAR backend. + * + * \def ROT_MODEL_NEXSTAR * - * The CELESTRON backend can be used with rotators that support the Celestron - * protocol and alike. + * The NEXSTAR backend can be used with rotators that support the Celestron + * NexStar protocol and alike. */ //! @cond Doxygen_Suppress #define ROT_CELESTRON 14 @@ -396,11 +484,12 @@ /** - * \def ROT_MODEL_ETHER6 - * \brief A macro that returns the model number of the Ether6 backend. + * \brief A macro that returns the model number of the ETHER6 backend. * - * The Ether6 backend can be used with rotators that support the Ether6 - * protocol and alike. + * \def ROT_MODEL_ETHER6 + * + * The ETHER6 backend can be used with rotators that support the Ether6 + * protocol. */ //! @cond Doxygen_Suppress #define ROT_ETHER6 15 @@ -410,11 +499,12 @@ /** - * \def ROT_MODEL_CNCTRK - * \brief A macro that returns the model number of the CNCTRK backend. + * \brief A macro that returns the model number of the CNCTRK backend. + * + * \def ROT_MODEL_CNCTRK * - * The CNCTRK backend can be used with rotators that support the LinuxCNC - * running Axis GUI interface. + * The CNCTRK backend can be used with rotators that support the LinuxCNC + * running Axis GUI interface. */ //! @cond Doxygen_Suppress #define ROT_CNCTRK 16 @@ -424,39 +514,46 @@ /** - * \def ROT_MODEL_PROSISTEL_D_AZ - * \brief A macro that returns the model number of the PROSISTEL D azimuth backend. + * \brief A macro that returns the model number of the PROSISTEL_D_AZ backend. + * + * \def ROT_MODEL_PROSISTEL_D_AZ * + * The PROSISTEL_D_AZ backend can be used with rotators that support the Prosistel + * azimuth protocol. */ -//! @cond Doxygen_Suppress -#define ROT_PROSISTEL 17 -#define ROT_BACKEND_PROSISTEL "prosistel" -//! @endcond -#define ROT_MODEL_PROSISTEL_D_AZ ROT_MAKE_MODEL(ROT_PROSISTEL, 1) - - /** - * \def ROT_MODEL_PROSISTEL_D_EL - * \brief A macro that returns the model number of the PROSISTEL D elevation backend. + * \brief A macro that returns the model number of the PROSISTEL_D_EL backend. + * + * \def ROT_MODEL_PROSISTEL_D_EL * + * The PROSISTEL_D_EL backend can be used with rotators that support the Prosistel + * elevation protocol. */ -#define ROT_MODEL_PROSISTEL_D_EL ROT_MAKE_MODEL(ROT_PROSISTEL, 2) - - /** - * \def ROT_MODEL_PROSISTEL_AZEL_COMBO - * \brief A macro that returns the model number of the PROSISTEL Combi-Track azimuth + elevation combo backend. + * \brief A macro that returns the model number of the + * PROSISTEL_COMBI_TRACK_AZEL backend. * + * \def ROT_MODEL_PROSISTEL_COMBI_TRACK_AZEL + * + * The PROSISTEL_AZEL_COMBI_TRACK_AZEL backend can be used with rotators that + * support the Prosistel combination azimuth and elevation protocol. */ +//! @cond Doxygen_Suppress +#define ROT_PROSISTEL 17 +#define ROT_BACKEND_PROSISTEL "prosistel" +//! @endcond +#define ROT_MODEL_PROSISTEL_D_AZ ROT_MAKE_MODEL(ROT_PROSISTEL, 1) +#define ROT_MODEL_PROSISTEL_D_EL ROT_MAKE_MODEL(ROT_PROSISTEL, 2) #define ROT_MODEL_PROSISTEL_COMBI_TRACK_AZEL ROT_MAKE_MODEL(ROT_PROSISTEL, 3) /** - * \def ROT_MODEL_MEADE - * \brief A macro that returns the model number of the MEADE backend. + * \brief A macro that returns the model number of the MEADE backend. + * + * \def ROT_MODEL_MEADE * - * The MEADE backen can be used with Meade telescope rotators like - * DS-2000 + * The MEADE backend can be used with Meade telescope rotators like the + * DS-2000. */ //! @cond Doxygen_Suppress #define ROT_MEADE 18 @@ -465,10 +562,11 @@ #define ROT_MODEL_MEADE ROT_MAKE_MODEL(ROT_MEADE, 1) /** - * \def ROT_MODEL_IOPTRON - * \brief A macro that returns the model number of the IOPTRON backend. + * \brief A macro that returns the model number of the IOPTRON backend. + * + * \def ROT_MODEL_IOPTRON * - * The IOPTRON backen can be used with IOPTRON telescope mounts + * The IOPTRON backend can be used with IOPTRON telescope mounts. */ //! @cond Doxygen_Suppress #define ROT_IOPTRON 19 @@ -478,12 +576,12 @@ /** -+ * \def ROT_MODEL_INDI -+ * \brief A macro that returns the model number of the INDI backend. -+ * -+ * The INDI backend can be used with rotators that support, among other, the -+ * INDI interface. -+ */ + * \brief A macro that returns the model number of the INDI backend. + * + * \def ROT_MODEL_INDI + * + * The INDI backend can be used with rotators that support the INDI interface. + */ //! @cond Doxygen_Suppress #define ROT_INDI 20 #define ROT_BACKEND_INDI "indi" @@ -492,11 +590,12 @@ /** - * \def ROT_MODEL_SATEL - * \brief A macro that returns the model number of the SatEL backend. + * \brief A macro that returns the model number of the SATEL backend. * - * The SatEL backend can be used with rotators that support the VE5FP - * interface. + * \def ROT_MODEL_SATEL + * + * The SATEL backend can be used with rotators that support the VE5FP + * interface. */ //! @cond Doxygen_Suppress #define ROT_SATEL 21 @@ -508,8 +607,9 @@ /** - * \typedef typedef int rot_model_t - * \brief Convenience type definition for rotator model. + * \brief Convenience type definition for a rotator model. + * + * \typedef typedef int rot_model_t */ typedef int rot_model_t; commit 68108c12192e28efabf89b71ec95970e21cd7050 Author: Nate Bargmann <n0...@n0...> Date: Thu Feb 18 20:44:53 2021 -0600 Further refinements of the Doxygen comments in amplist.h diff --git a/include/hamlib/amplist.h b/include/hamlib/amplist.h index 018997c7..27edf06d 100644 --- a/include/hamlib/amplist.h +++ b/include/hamlib/amplist.h @@ -46,37 +46,42 @@ * distinguish between the different hardware drivers. The exact model * numbers can be acquired using the macros in this file. To obtain a list of * supported amplifier branches, one can use the statically defined - * AMP_BACKEND_LIST macro. To obtain a full list of supported amplifiers - * (including each model in every branch), the foreach_opened_amp() API - * function can be used. + * AMP_BACKEND_LIST macro (defined in configure.ac). To obtain a full list of + * supported amplifiers (including each model in every branch), the + * foreach_opened_amp() API function can be used. * * The model number, or ID, is used to tell Hamlib which amplifier the client - * wishes to use. It is done with the amp_init() API call. + * wishes to use which is done with the amp_init() API call. */ -//! @cond Doxygen_Suppress +/** + * \brief A macro that returns the model number for an unknown model. + * + * \def AMP_MODEL_NONE + * + * The none backend, as the name suggests, does nothing. It is mainly for + * internal use. + */ #define AMP_MODEL_NONE 0 -//! @endcond -/* - * Hamlib - */ /** - * \brief A macro that returns the model number for the dummy backend. + * \brief A macro that returns the model number for the DUMMY backend. * * \def AMP_MODEL_DUMMY * - * The dummy backend, as the name suggests, is a backend which performs no - * hardware operations and always behaves as one would expect. It can be + * The DUMMY backend, as the name suggests, is a backend which performs no + * hardware operations and always behaves as one would expect. It can be * thought of as a hardware simulator and is very useful for testing client * applications. + */ +/** + * \brief A macro that returns the model number for the NETAMPCTL backend. * * \def AMP_MODEL_NETAMPCTL - * \brief A macro that returns the model number for the netampctl backend. * - * This backend allows use of the ampctld daemon through the normal + * The NETAMPCTL backend allows use of the `ampctld` daemon through the normal * Hamlib API. */ //! @cond Doxygen_Suppress @@ -87,16 +92,12 @@ #define AMP_MODEL_NETAMPCTL AMP_MAKE_MODEL(AMP_DUMMY, 2) -/* - * Elecraft - */ - /** - * \brief A macro that returns the model number of the kpa1500 backend. + * \brief A macro that returns the model number of the KPA1500 backend. * * \def AMP_MODEL_ELECRAFT_KPA1500 * - * The kpa1500 backend can be used with amplifiers that support the Elecraft + * The KPA1500 backend can be used with amplifiers that support the Elecraft * KPA-1500 protocol. */ //! @cond Doxygen_Suppress @@ -107,7 +108,7 @@ //#define AMP_MODEL_ELECRAFT_KPA500 AMP_MAKE_MODEL(AMP_ELECRAFT, 2) /** - * \brief Convenience type definition for amplifier model. + * \brief Convenience type definition for an amplifier model. * * \typedef typedef int amp_model_t */ ----------------------------------------------------------------------- Summary of changes: include/hamlib/amplist.h | 43 ++--- include/hamlib/rotlist.h | 470 ++++++++++++++++++++++++++++------------------- 2 files changed, 307 insertions(+), 206 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Nate B. <n0...@us...> - 2021-02-19 02:44:06
|
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 e59a7f09717406eef184279920c5b657008ac2e2 (commit) via 7d31ab8823e4028ee0dd7918e0b1c076c1fcc8b8 (commit) via 8f5185bff8f7036111b3de3f95fe3434f6adb9d0 (commit) via fb3e3d11aa0ce7cfdbbd6026774e5d39c58095b5 (commit) via b8c9871b232e3de07823d877548381d90db2f747 (commit) via 185a938a7659fdca69ef5b5d8e7b5faf909f0b80 (commit) via 636d64d114bd29fe75d8a27ebfbdbdaa4219b7bf (commit) via bd2384e55ea5ef311ca750791a5b51ca3dd45b2c (commit) via aef70172f087e2518529cc48351ae65a731dc0de (commit) via 06723c959bb768d1f62a0c6b5eecc394b86597c7 (commit) via 1e9a991a2555a497a19678ad2dc6807a8bd9000f (commit) via 8f1efb6a70fd4cee5b619d8c4ca71339183b301e (commit) via 6766948dc1ee6082fb599728a23d8376797a7126 (commit) via 64e88e24612ce3f900cd50210b143c9a6fdbc016 (commit) via 5964e1de18f7ac77560e4f391f30cb14b98cfbb7 (commit) via 41f3fb5ce26d17bff663f8e445645a3f1170fa27 (commit) from 5ec2c5b4c64df45734986c29df77e62f3ce14d94 (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 e59a7f09717406eef184279920c5b657008ac2e2 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Feb 18 17:11:55 2021 -0600 Update JTSDK build instructions diff --git a/scripts/README.build-JTSDK.txt b/scripts/README.build-JTSDK.txt index b70dd946..5cd9333d 100644 --- a/scripts/README.build-JTSDK.txt +++ b/scripts/README.build-JTSDK.txt @@ -2,89 +2,94 @@ JTSDK DLL Qt MinGW/MSYS2 Supplementary Notes ============================================================== -This assumes you have an environment set up that conforms with -instructions in the WSJT-X Install notes that will build Hamlib +These instructions should work with JTSDk 3.2.0 Beta 3 and later. -Before you start.... RTFM at <hamlib-base>/scripts/README.build-Windows-JTSDK.txt +The JTSDK 3.2.0 Stream (and later) is available at +https://sourceforge.net/projects/hamlib-sdk/files/Windows/ +Future updates to the JTSDK may implement these steps into the +MSYS2 "menu" command. -1. Update Environ -================= -pacman -Syuu +1. Update Environment +===================== + +$ pacman -Syuu 2. Deploy MinGW =============== -Ensure that the ZIP, DOS2UNIX and GROFF packages are deployed -to and owrking in the MSYS2 Environment +Ensure that the 'zip' , 'dos2unix' and 'groff' packages are deployed +to and working in the MSYS2 Environment + +** Versions of JTSDK 3.2.0 Beta 4 and later will incorporate ** +** deployment of these tools into the Setup scripts. ** -pacman -S zip -pacman -S dos2unix -alias unix2dos='todos' -pacman -S groff +$ pacman -S zip +$ pacman -S dos2unix +$ pacman -S groff -The next step is possibly redudnant as it has been incorporated -into build-w64-jtsdk.sh +** The next step may be redundant as it has been incorporated ** +** into build-w64-jtsdk.sh ** -export PATH=$PATH:$GCCD_F:. +$ export PATH=$PATH:$GCCD_F:. 3. Create a dir $HOME/Builds ============================ -Open a MSYS2 Terminal fro a jtsdk64.ps1 environment +Open a MSYS2 Terminal from a jtsdk64.ps1 environment -In a JTSDK63 ENvironment type: +In a JTSDK PowerShell Environment launch MSYS2 with: msys2 -In the msys2 enviro nment type: +In the MSYS2 environment type: -cd ~ <== ensure you at home -mkdir builds -cd builds +$ cd ~ <== ensure you at home +$ mkdir builds +$ cd builds 4. Locate and unzip LibUSB matching version deployed above into builds ====================================================================== -These steps in the original build-w64.sh script are redundant. +** These steps in the original build-w64.sh script are redundant ** -You may skip this step. +** You should familiarise yourself with these steps - but may skip this ** JTSDK 3.2.0 (and later) points the environment to the libusb deployment in X:\JTSDK64-Tools\tools\libusb through environment variable $libusb_dir_f . -If you need the source for LinUSB use steps similar to those +If you need the source for LibUSB use steps similar to those below to obtain source: -wget https://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.24/libusb-1.0.24.tar.bz2 -tar -xvf libusb-1.0.24.tar.bz2 +$ wget https://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.24/libusb-1.0.24.tar.bz2 +$ tar -xvf libusb-1.0.24.tar.bz2 [ This creates a subdirectory libusb-1.0.24 ] -5. Obtain latest Hamlib sourceforge -=================================== +5. Obtain latest Hamlib Source from Github +========================================== -git clone git://git.code.sf.net/p/hamlib/code hamlib-4.2~git +$ git clone https://github.com/Hamlib/Hamlib.git hamlib-4.2~git 6. Start the Process Rolling ============================ -cd ./hamlib-4.2~git -./bootstrap <== Not included in Nate's notes ! -./scripts/build-w64-jtsdk.sh hamlib-4.2~git +$ cd ./hamlib-4.2~git +$ ./bootstrap +$ ./scripts/build-w64-jtsdk.sh hamlib-4.2~git 7. Tadaa - Drumroll ! ===================== -==> Package in ~/build/hamlib-4.2~git/hamlib-w64-4.2~git as hamlib-w64-4.2~git.zip -==> Headers in ~/build/hamlib-4.2~git/hamlib-w64-4.2~git/include -==> Library in ~/build/hamlib-4.2~git/hamlib-w64-4.2~git/lib/gcc as libhamlib.dll.a (rename to libhamlib.dll for application) +==> Package ......... ~/build/hamlib-4.2~git/hamlib-w64-4.2~git ==> hamlib-w64-4.2~git.zip +==> Headers ......... ~/build/hamlib-4.2~git/hamlib-w64-4.2~git/include +==> Library &tools .. ~/build/hamlib-4.2~git/hamlib-w64-4.2~git/bin commit 7d31ab8823e4028ee0dd7918e0b1c076c1fcc8b8 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Feb 18 14:36:39 2021 -0600 Update JTSDK build script and README diff --git a/scripts/README.build-JTSDK.txt b/scripts/README.build-JTSDK.txt new file mode 100644 index 00000000..b70dd946 --- /dev/null +++ b/scripts/README.build-JTSDK.txt @@ -0,0 +1,90 @@ +============================================================== +JTSDK DLL Qt MinGW/MSYS2 Supplementary Notes +============================================================== + +This assumes you have an environment set up that conforms with +instructions in the WSJT-X Install notes that will build Hamlib + +Before you start.... RTFM at <hamlib-base>/scripts/README.build-Windows-JTSDK.txt + + +1. Update Environ +================= + +pacman -Syuu + + +2. Deploy MinGW +=============== + +Ensure that the ZIP, DOS2UNIX and GROFF packages are deployed +to and owrking in the MSYS2 Environment + +pacman -S zip +pacman -S dos2unix +alias unix2dos='todos' +pacman -S groff + +The next step is possibly redudnant as it has been incorporated +into build-w64-jtsdk.sh + +export PATH=$PATH:$GCCD_F:. + + +3. Create a dir $HOME/Builds +============================ + +Open a MSYS2 Terminal fro a jtsdk64.ps1 environment + +In a JTSDK63 ENvironment type: + +msys2 + +In the msys2 enviro nment type: + +cd ~ <== ensure you at home +mkdir builds +cd builds + + +4. Locate and unzip LibUSB matching version deployed above into builds +====================================================================== + +These steps in the original build-w64.sh script are redundant. + +You may skip this step. + +JTSDK 3.2.0 (and later) points the environment to the libusb +deployment in X:\JTSDK64-Tools\tools\libusb through +environment variable $libusb_dir_f . + +If you need the source for LinUSB use steps similar to those +below to obtain source: + +wget https://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.24/libusb-1.0.24.tar.bz2 +tar -xvf libusb-1.0.24.tar.bz2 + +[ This creates a subdirectory libusb-1.0.24 ] + + +5. Obtain latest Hamlib sourceforge +=================================== + +git clone git://git.code.sf.net/p/hamlib/code hamlib-4.2~git + + +6. Start the Process Rolling +============================ + +cd ./hamlib-4.2~git +./bootstrap <== Not included in Nate's notes ! +./scripts/build-w64-jtsdk.sh hamlib-4.2~git + + +7. Tadaa - Drumroll ! +===================== + +==> Package in ~/build/hamlib-4.2~git/hamlib-w64-4.2~git as hamlib-w64-4.2~git.zip +==> Headers in ~/build/hamlib-4.2~git/hamlib-w64-4.2~git/include +==> Library in ~/build/hamlib-4.2~git/hamlib-w64-4.2~git/lib/gcc as libhamlib.dll.a (rename to libhamlib.dll for application) + diff --git a/scripts/build-w64-jtsdk.sh b/scripts/build-w64-jtsdk.sh index 714b7539..c57a1f74 100755 --- a/scripts/build-w64-jtsdk.sh +++ b/scripts/build-w64-jtsdk.sh @@ -1,14 +1,17 @@ #!/bin/sh -# Builds Hamlib 4.x W64 binary distribution. +# Builds Hamlib 4.x W64 dl binary distribution under Windows Qt MinGW/MSYS2 +# Customised for >= JTSDK 3.2.0 B3 stream(s) -# A script to build a set of W64 binary DLLs and executables from a Hamlib -# source tarball. This script assumes that the Hamlib source tarball has been -# extracted to the directory specified in $BUILD_DIR and that libusb-1.x.y has -# also been extracted to $BUILD_DIR. +# A script to compile a set of W64 binary DLLs, executables and compiler +# packages from a Hamlib source tarball. This script assumes uses the +# JTSDK's previously deployed LibUSB (pointed to by JTSDK environment +# variable $libusb_dir_f) -# See README.build-Windows for complete details. +# See future README.build-JTSDK for complete details. +#Ensure that the Qt-supplied GCC compilers and tools can be found +export PATH=$PATH:$GCCD_F:. # Set this to a desired directory BUILD_DIR=~/builds @@ -22,6 +25,9 @@ HOST_ARCH=x86_64-w64-mingw32 # Set to the strip name for your version of minGW HOST_ARCH_STRIP=strip.exe +# Set to the name of the utility to provide Unix to DOS translation +UNIX_TO_DOS_TOOL=unix2dos.exe + # Error return codes. See /usr/include/sysexits.h EX_USAGE=64 EX_NOINPUT=66 @@ -68,7 +74,7 @@ What is it? =========== This ZIP archive or Windows installer contains a build of Hamlib-$RELEASE -cross-compiled for MS Windows 64 bit using MinGW under Debian GNU/Linux 10 +native compiled for MS Windows 64 bit using MinGW under Windows JTSDK 3.2.0 (nice, heh!). This software is copyrighted. The library license is LGPL, and the *.EXE files @@ -82,8 +88,8 @@ included after being converted to HTML. Installation and Configuration ============================== -Extract the ZIP archive into a convenient location, C:\Program Files is a -reasonable choice. +Extract the ZIP archive into a convenient location, C:\Program Files (being x64) +is a reasonable choice. Make sure *all* the .DLL files are in your PATH (leave them in the bin directory and set the PATH). To set the PATH environment variable in Windows @@ -211,6 +217,7 @@ Please report problems or success to ham...@li... Cheers, Stephane Fillod - F8CFE Nate Bargmann - N0NB +JTSDK Maintenance Team - JT...@GR... http://www.hamlib.org END_OF_README @@ -230,9 +237,9 @@ make -j 4 install mkdir -p ${ZIP_DIR}/bin ${ZIP_DIR}/lib/msvc ${ZIP_DIR}/lib/gcc ${ZIP_DIR}/include ${ZIP_DIR}/doc cp -a src/libhamlib.def ${ZIP_DIR}/lib/msvc/libhamlib-4.def -unix2dos ${ZIP_DIR}/lib/msvc/libhamlib-4.def +${UNIX_TO_DOS_TOOL} ${ZIP_DIR}/lib/msvc/libhamlib-4.def cp -a ${INST_DIR}/include/hamlib ${ZIP_DIR}/include/. -unix2dos ${ZIP_DIR}/include/hamlib/*.h +${UNIX_TO_DOS_TOOL} ${ZIP_DIR}/include/hamlib/*.h # C++ binding is useless on w64 because of ABI for f in *class.h @@ -243,7 +250,7 @@ done for f in AUTHORS ChangeLog COPYING COPYING.LIB LICENSE README README.betatester README.w64-bin THANKS do cp -a ${f} ${ZIP_DIR}/${f}.txt - unix2dos ${ZIP_DIR}/${f}.txt + ${UNIX_TO_DOS_TOOL} ${ZIP_DIR}/${f}.txt done # Generate HTML documents from nroff formatted man files @@ -271,8 +278,8 @@ ${HOST_ARCH_STRIP} ${ZIP_DIR}/bin/*.exe ${ZIP_DIR}/bin/*hamlib-*.dll cp -a ${QTD_F}/libwinpthread-1.dll ${ZIP_DIR}/bin/. cp -a ${libusb_dir_f}/MinGW64/dll/libusb-1.0.dll ${ZIP_DIR}/bin/libusb-1.0.dll -# Set for MinGW build -FILE="${QTD_F}/libgcc_s_sjlj-1.dll" +# Set for MinGW build - To Be safe ! +FILE="${QTD_F}/libgcc_s_seh-1.dll" if test -f "$FILE" then cp -a ${FILE} ${ZIP_DIR}/bin/. commit 8f5185bff8f7036111b3de3f95fe3434f6adb9d0 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Feb 18 14:20:21 2021 -0600 Change FTDX3000 antenna commands to use AN instead of menu commands that don't work https://github.com/Hamlib/Hamlib/issues/510 diff --git a/rigs/yaesu/ft3000.c b/rigs/yaesu/ft3000.c index da25ee41..3fbc3575 100644 --- a/rigs/yaesu/ft3000.c +++ b/rigs/yaesu/ft3000.c @@ -95,16 +95,16 @@ int ft3000_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option) switch (ant) { case 1: - cmd = "EX0321;"; // R3/1 ANT1/ANT3 + cmd = "AN01;"; // R3/1 ANT1/ANT3 break; case 2: - cmd = "EX0322;"; // RE/2 ANT2/ANT3 + cmd = "AN02;"; // RE/2 ANT2/ANT3 break; case 3: - cmd = "EX0320;"; // TRX ANT3 + cmd = "AN03;"; // TRX ANT3 break; default: - rig_debug(RIG_DEBUG_ERR, "%s: expected 3,4,5 got %d\n", __func__, ant); + rig_debug(RIG_DEBUG_ERR, "%s: expected 1,2,3 got %d\n", __func__, ant); RETURNFUNC(-RIG_EINVAL); } snprintf(priv->cmd_str, sizeof(priv->cmd_str), "%s", cmd); @@ -126,7 +126,7 @@ int ft3000_get_ant(RIG *rig, vfo_t vfo, ant_t dummy, value_t *option, option->i = 0; // default to no options // find out what ANT3 setting - snprintf(priv->cmd_str, sizeof(priv->cmd_str), "%s", "EX032;"); + snprintf(priv->cmd_str, sizeof(priv->cmd_str), "%s", "AN0;"); if (RIG_OK != (err = newcat_get_cmd(rig))) { RETURNFUNC(err); @@ -134,12 +134,9 @@ int ft3000_get_ant(RIG *rig, vfo_t vfo, ant_t dummy, value_t *option, if (strlen(priv->ret_data) >= 7) { - char c = priv->ret_data[5]; + char c = priv->ret_data[3]; switch(c) { - case '0': - *ant_rx = *ant_tx = RIG_ANT_3; - break; case '1': *ant_rx = RIG_ANT_3; *ant_tx = RIG_ANT_1; @@ -148,6 +145,9 @@ int ft3000_get_ant(RIG *rig, vfo_t vfo, ant_t dummy, value_t *option, *ant_rx = RIG_ANT_3; *ant_tx = RIG_ANT_2; break; + case '3': + *ant_rx = *ant_tx = RIG_ANT_3; + break; default: rig_debug(RIG_DEBUG_ERR, "%s: unknown antenna=%c\n", __func__, c); RETURNFUNC(-RIG_EPROTO); commit fb3e3d11aa0ce7cfdbbd6026774e5d39c58095b5 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Feb 18 12:52:33 2021 -0600 Fix FT3000 set_ant https://www.dropbox.com/s/2lqh0mp13244d9z/wsjtx-2.4.0-rc1-win64.exe?dl=0 diff --git a/rigs/yaesu/ft3000.c b/rigs/yaesu/ft3000.c index 761645c0..da25ee41 100644 --- a/rigs/yaesu/ft3000.c +++ b/rigs/yaesu/ft3000.c @@ -95,13 +95,13 @@ int ft3000_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option) switch (ant) { case 1: - cmd = "EX0321"; // R3/1 ANT1/ANT3 + cmd = "EX0321;"; // R3/1 ANT1/ANT3 break; case 2: - cmd = "EX0322"; // RE/2 ANT2/ANT3 + cmd = "EX0322;"; // RE/2 ANT2/ANT3 break; case 3: - cmd = "EX0320"; // TRX ANT3 + cmd = "EX0320;"; // TRX ANT3 break; default: rig_debug(RIG_DEBUG_ERR, "%s: expected 3,4,5 got %d\n", __func__, ant); @@ -171,7 +171,7 @@ const struct rig_caps ftdx3000_caps = RIG_MODEL(RIG_MODEL_FTDX3000), .model_name = "FTDX-3000", .mfg_name = "Yaesu", - .version = NEWCAT_VER ".3", + .version = NEWCAT_VER ".4", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, commit b8c9871b232e3de07823d877548381d90db2f747 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Feb 18 11:54:23 2021 -0600 Fix compile error diff --git a/NEWS b/NEWS index 251a56f4..85782a0b 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,13 @@ Copyright (C) 2000-2021 Michael Black W9MDB, and others Please send Hamlib bug reports to ham...@li... +Version 4.3 + Add twiddle_timeout and twiddle_rit --set-conf options + rigctld --set-conf=twiddle_timeout=5,twiddle_rit=1 + This will set the twiddle timeout to 5 seconds and turn on twiddle_rit + For twiddle timeout VFOB will not be poller for 5 seconds after VFO twiddling is detected + rigctld --twiddle is deprecated and will be removed in 5.0 + Version 4.2 2021-??-?? * Major rework for PRM80 commit 185a938a7659fdca69ef5b5d8e7b5faf909f0b80 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Feb 18 11:15:02 2021 -0600 Add twiddle_timeout and twiddle_rit --set-conf options rigctld --set-conf=twiddle_timeout=5,twiddle_rit=1 This will set the twiddle timeout to 5 seconds and turn on twiddle_rit For twiddle timeout VFOB will not be poller for 5 seconds after VFO twiddling is detected. For RIT VFOB get_freq is suppressed and returns the cached value only (set_freq on VFOB still works). rigctld --twiddle is deprecated and will be removed in 5.0 https://github.com/Hamlib/Hamlib/issues/444 diff --git a/src/conf.c b/src/conf.c index 40b096f2..685979bc 100644 --- a/src/conf.c +++ b/src/conf.c @@ -153,6 +153,16 @@ static const struct confparams frontend_cfg_params[] = "True enables flushing serial port with read instead of TCFLUSH -- MicroHam", "0", RIG_CONF_CHECKBUTTON, { } }, + { + TOK_TWIDDLE_TIMEOUT, "twiddle_timeout", "Timeout(secs) to resume VFO polling when twiddling VFO", + "For satellite ops when VFOB is twiddled will pause VFOB commands until timeout", + "Unset", RIG_CONF_COMBO, { .c = {{ "Unset", "ON", "OFF", NULL }} } + }, + { + TOK_TWIDDLE_RIT, "twiddle_rit", "RIT twiddle", + "Suppress get_freq on VFOB for RIT tuning satellites", + "Unset", RIG_CONF_COMBO, { .c = {{ "Unset", "ON", "OFF", NULL }} } + }, { RIG_CONF_END, NULL, } }; @@ -622,6 +632,22 @@ static int frontend_set_conf(RIG *rig, token_t token, const char *val) rs->rigport.flushx = val_i ? 1 : 0; break; + case TOK_TWIDDLE_TIMEOUT: + if (1 != sscanf(val, "%d", &val_i)) + { + return -RIG_EINVAL; //value format error + } + rs->twiddle_timeout = val_i; + break; + + case TOK_TWIDDLE_RIT: + if (1 != sscanf(val, "%d", &val_i)) + { + return -RIG_EINVAL; //value format error + } + rs->twiddle_rit = val_i ? 1: 0; + break; + default: return -RIG_EINVAL; } @@ -954,6 +980,14 @@ static int frontend_get_conf(RIG *rig, token_t token, char *val) sprintf(val, "%d", rs->disable_yaesu_bandselect); break; + case TOK_TWIDDLE_TIMEOUT: + sprintf(val, "%d", rs->twiddle_timeout); + break; + + case TOK_TWIDDLE_RIT: + sprintf(val, "%d", rs->twiddle_rit); + break; + default: return -RIG_EINVAL; diff --git a/src/token.h b/src/token.h index 2ae86f89..e12f1e28 100644 --- a/src/token.h +++ b/src/token.h @@ -114,6 +114,10 @@ #define TOK_AUTO_DISABLE_SCREENSAVER TOKEN_FRONTEND(125) /** \brief rig: Disable Yaesu band select logic */ #define TOK_DISABLE_YAESU_BANDSELECT TOKEN_FRONTEND(126) +/** \brief rig: Supporess get_freq on VFOB for satellite RIT tuning */ +#define TOK_TWIDDLE_TIMEOUT TOKEN_FRONTEND(127) +/** \brief rig: Supporess get_freq on VFOB for satellite RIT tuning */ +#define TOK_TWIDDLE_RIT TOKEN_FRONTEND(128) /* * rotator specific tokens * (strictly, should be documented as rotator_internal) diff --git a/tests/rigctld.c b/tests/rigctld.c index 0eb62900..e65efc97 100644 --- a/tests/rigctld.c +++ b/tests/rigctld.c @@ -107,7 +107,6 @@ static struct option long_options[] = {"help", 0, 0, 'h'}, {"version", 0, 0, 'V'}, {"twiddle_timeout", 1, 0, 'W'}, - {"twiddle_rit" , 0, 0, 'Y'}, {"uplink", 1, 0, 'x'}, {"debug-time-stamps", 0, 0, 'Z'}, {0, 0, 0, 0} @@ -248,8 +247,7 @@ int main(int argc, char *argv[]) struct addrinfo hints, *result, *saved_result; int sock_listen; int reuseaddr = 1; - int twiddle = 0; - int twiddle_rit = 0; + int twiddle_timeout = 0; int uplink = 0; char host[NI_MAXHOST]; char serv[NI_MAXSERV]; @@ -524,11 +522,8 @@ int main(int argc, char *argv[]) exit(1); } - twiddle = atoi(optarg); - break; - - case 'Y': - twiddle_rit=1; + twiddle_timeout = atoi(optarg); + fprintf(stderr,"twiddle_timeout is deprecated...use e.g. --set-conf=twiddle_timeout=5\n"); break; case 'x': @@ -590,8 +585,7 @@ int main(int argc, char *argv[]) strncpy(my_rig->state.rigport.pathname, rig_file, FILPATHLEN - 1); } - my_rig->state.twiddle_timeout = twiddle; - my_rig->state.twiddle_rit = twiddle_rit; + my_rig->state.twiddle_timeout = twiddle_timeout; my_rig->state.uplink = uplink; rig_debug(RIG_DEBUG_TRACE, "%s: twiddle=%d, uplink=%d, twiddle_rit=%d\n", __func__, my_rig->state.twiddle_timeout, my_rig->state.uplink, my_rig->state.twiddle_rit); commit 636d64d114bd29fe75d8a27ebfbdbdaa4219b7bf Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Feb 18 07:11:03 2021 -0600 Fix compile warning try#2 in rigctl_parse.c diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index bb8ce821..1d7440df 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -722,7 +722,7 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc, /* command by name */ if (cmd == '\\') { - unsigned char cmd_name[MAXNAMSIZ], *pcmd = cmd_name; + char cmd_name[MAXNAMSIZ], *pcmd = cmd_name; if (scanfc(fin, "%c", pcmd) < 1) { @@ -730,7 +730,8 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc, return -1; } - (void)fscanf(fin, "%s", ++pcmd); + retcode = fscanf(fin, "%s", ++pcmd); + if (retcode == 0) rig_debug(RIG_DEBUG_WARN, "%s: unable to scan %c\n", __func__, *(pcmd-1)); while(*++pcmd); *pcmd = '\0'; commit bd2384e55ea5ef311ca750791a5b51ca3dd45b2c Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Feb 18 07:04:21 2021 -0600 Fix compile warning in rigctl_parse.c diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index a33e9fcb..bb8ce821 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -730,7 +730,7 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc, return -1; } - fscanf(fin, "%s", ++pcmd); + (void)fscanf(fin, "%s", ++pcmd); while(*++pcmd); *pcmd = '\0'; commit aef70172f087e2518529cc48351ae65a731dc0de Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Feb 18 06:57:40 2021 -0600 Add twiddle_rit rig option https://github.com/Hamlib/Hamlib/issues/444 diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index b943901f..b49b3620 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -2205,6 +2205,7 @@ struct rig_state { int power_min; /*!< Minimum RF power level in rig units */ int power_max; /*!< Maximum RF power level in rig units */ unsigned char disable_yaesu_bandselect; /*!< Disables Yaeus band select logic */ + int twiddle_rit; /*!< Suppresses VFOB reading (cached value used) so RIT control can be used */ }; //! @cond Doxygen_Suppress commit 06723c959bb768d1f62a0c6b5eecc394b86597c7 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Feb 18 06:48:06 2021 -0600 Limit the error retry in rigctld.c to 4 times https://github.com/Hamlib/Hamlib/issues/551 diff --git a/tests/rigctld.c b/tests/rigctld.c index 88cace9a..0eb62900 100644 --- a/tests/rigctld.c +++ b/tests/rigctld.c @@ -83,7 +83,6 @@ /* * Reminder: when adding long options, * keep up to date SHORT_OPTIONS, usage()'s output and man page. thanks. - * NB: do NOT use -W since it's reserved by POSIX. * TODO: add an option to read from a file */ #define SHORT_OPTIONS "m:r:p:d:P:D:s:c:T:t:C:W:x:z:lLuovhVZ" @@ -108,6 +107,7 @@ static struct option long_options[] = {"help", 0, 0, 'h'}, {"version", 0, 0, 'V'}, {"twiddle_timeout", 1, 0, 'W'}, + {"twiddle_rit" , 0, 0, 'Y'}, {"uplink", 1, 0, 'x'}, {"debug-time-stamps", 0, 0, 'Z'}, {0, 0, 0, 0} @@ -249,6 +249,7 @@ int main(int argc, char *argv[]) int sock_listen; int reuseaddr = 1; int twiddle = 0; + int twiddle_rit = 0; int uplink = 0; char host[NI_MAXHOST]; char serv[NI_MAXSERV]; @@ -526,6 +527,10 @@ int main(int argc, char *argv[]) twiddle = atoi(optarg); break; + case 'Y': + twiddle_rit=1; + break; + case 'x': if (!optarg) { @@ -586,9 +591,10 @@ int main(int argc, char *argv[]) } my_rig->state.twiddle_timeout = twiddle; + my_rig->state.twiddle_rit = twiddle_rit; my_rig->state.uplink = uplink; - rig_debug(RIG_DEBUG_TRACE, "%s: twiddle=%d, uplink=%d\n", __func__, - my_rig->state.twiddle_timeout, my_rig->state.uplink); + rig_debug(RIG_DEBUG_TRACE, "%s: twiddle=%d, uplink=%d, twiddle_rit=%d\n", __func__, + my_rig->state.twiddle_timeout, my_rig->state.uplink, my_rig->state.twiddle_rit); /* * ex: RIG_PTT_PARALLEL and /dev/parport0 @@ -1097,16 +1103,20 @@ void *handle_socket(void *arg) if (ferror(fsockout)) fsockout = get_fsockout(handle_data_arg); rig_debug(RIG_DEBUG_ERR, "%s: socket error in=%d, out=%d\n", __func__, ferror(fsockin), ferror(fsockout)); - - do + // if we get an error from the rig we'll try to repoen + // that may fix things when COM ports drop and such + int retry=4; + if (retcode == 2) { - retcode = rig_close(my_rig); - hl_usleep(1000 * 1000); - rig_debug(RIG_DEBUG_ERR, "%s: rig_close retcode=%d\n", __func__, retcode); - retcode = rig_open(my_rig); - rig_debug(RIG_DEBUG_ERR, "%s: rig_open retcode=%d\n", __func__, retcode); + do + { + retcode = rig_close(my_rig); + hl_usleep(1000 * 1000); + rig_debug(RIG_DEBUG_ERR, "%s: rig_close retcode=%d\n", __func__, retcode); + retcode = rig_open(my_rig); + rig_debug(RIG_DEBUG_ERR, "%s: rig_open retcode=%d\n", __func__, retcode); + } while (retry-- > 0 && retcode != RIG_OK); } - while (retcode != RIG_OK); } } while (retcode == 0 || retcode == 2 || retcode == -RIG_ENAVAIL); @@ -1213,6 +1223,7 @@ void usage(void) " -o, --vfo do not default to VFO_CURR, require extra vfo arg\n" " -v, --verbose set verbose mode, cumulative (-v to -vvvvv)\n" " -W, --twiddle_timeout timeout after detecting vfo manual change\n" + " -W, --twiddle_rit suppress VFOB getfreq so RIT can be twiddled" " -x, --uplink set uplink get_freq ignore, 1=Sub, 2=Main\n" " -Z, --debug-time-stamps enable time stamps for debug messages\n" " -h, --help display this help and exit\n" commit 1e9a991a2555a497a19678ad2dc6807a8bd9000f Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Feb 17 22:52:48 2021 -0600 Add set_dsp_flt for IC7000 -- any other Icom rigs can use this? https://github.com/Hamlib/Hamlib/issues/521 diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 26b7426f..fe5aadac 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -1488,8 +1488,6 @@ pbwidth_t icom_get_dsp_flt(RIG *rig, rmode_t mode) return 0; } -#ifdef XXREMOVEDXX -// not referenced anywhere int icom_set_dsp_flt(RIG *rig, rmode_t mode, pbwidth_t width) { int retval, rfstatus; @@ -1573,7 +1571,6 @@ int icom_set_dsp_flt(RIG *rig, rmode_t mode, pbwidth_t width) return RIG_OK; } -#endif /* * icom_set_mode_with_data @@ -1762,20 +1759,15 @@ int icom_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) return -RIG_ERJCTED; } -#if 0 - - /* Tentative DSP filter setting ($1A$03), but not supported by every rig, + /* DSP filter setting ($1A$03), but not supported by every rig, * and some models like IC910/Omni VI Plus have a different meaning for * this subcommand */ - if ((rig->caps->rig_model != RIG_MODEL_IC910) && - (rig->caps->rig_model != RIG_MODEL_OMNIVIP)) + if (rig->caps->rig_model == RIG_MODEL_IC7000) { icom_set_dsp_flt(rig, mode, width); } -#endif - return RIG_OK; } diff --git a/rigs/icom/icom.h b/rigs/icom/icom.h index 17ecbd5b..cf6bb011 100644 --- a/rigs/icom/icom.h +++ b/rigs/icom/icom.h @@ -30,7 +30,7 @@ #include <sys/time.h> #endif -#define BACKEND_VER "20210212" +#define BACKEND_VER "20210217" /* * defines used by comp_cal_str in rig.c commit 8f1efb6a70fd4cee5b619d8c4ca71339183b301e Merge: 5964e1de 6766948d Author: Michael Black <mdb...@ya...> Date: Wed Feb 17 12:12:21 2021 -0600 Merge pull request #550 from fillods/F8CFE/prm80_rework Major prm80 rework commit 6766948dc1ee6082fb599728a23d8376797a7126 Author: Stephane Fillod <fi...@us...> Date: Wed Feb 17 18:57:31 2021 +0100 Major rework for PRM80 Implementation done from tests performed by Claus, DC0CM documentation and rig assembly code at prm80 project. diff --git a/NEWS b/NEWS index 938f29fb..251a56f4 100644 --- a/NEWS +++ b/NEWS @@ -1,11 +1,15 @@ Hamlib -- History of visible changes. Copyright (C) 2000-2003 Frank Singleton -Copyright (C) 2000-2018 Stephane Fillod, and others -Copyright (C) 2000-2020 Michael Black W9MDB, and others +Copyright (C) 2000-2021 Stephane Fillod, and others +Copyright (C) 2000-2021 Michael Black W9MDB, and others Please send Hamlib bug reports to ham...@li... +Version 4.2 + 2021-??-?? + * Major rework for PRM80 + Version 4.1 2021-01-31 * rigctld and rigs should be more robust for disconnect problems diff --git a/rigs/prm80/prm80.c b/rigs/prm80/prm80.c index 36db7fe2..93df5af2 100644 --- a/rigs/prm80/prm80.c +++ b/rigs/prm80/prm80.c @@ -1,6 +1,6 @@ /* * Hamlib PRM80 backend - main file - * Copyright (c) 2010 by Stephane Fillod + * Copyright (c) 2010,2021 by Stephane Fillod * * * This library is free software; you can redistribute it and/or @@ -41,46 +41,23 @@ #define LF "\x0a" -#define PROMPT ">" - #define BUFSZ 64 -/* V3 commands - * retrieved from https://sourceforge.net/projects/prm80/ -MessageVersion: DB "PRM8060 V3.0", 0 +// Channel number min and max +#define CHAN_MIN 0 +#define CHAN_MAX 99 -MessageAide: DB "H",0Dh,0Ah - DB " Commandes disponibles :",0Dh,0Ah - DB " [0] = Reset.",0Dh,0Ah - DB " [1] a [5] = Show 80c552 port state P1 to P5.",0Dh,0Ah - DB " [A] = Set serial communication to 1200 bps.",0Dh,0Ah - DB " [B] = Set serial communication to 4800 bps.",0Dh,0Ah - DB " [C] = Print channels list.",0Dh,0Ah - DB " [D] = Set system byte.",0Dh,0Ah - DB " [E] = Show system state (Mode-Chan-Chanstate-Sql-Vol-Lock-RX freq-TX freq).",0Dh,0Ah - DB " [F] = Set squelch.",0Dh,0Ah - DB " [H] = Print this help page.",0Dh,0Ah - DB " [I] = Erase and init RAM and EEPROM.",0Dh,0Ah - DB " [K] = Set lock byte.",0Dh,0Ah - DB " [L] = Print latch state.",0Dh,0Ah - DB " [M] = Edit external RAM manualy.",0Dh,0Ah - DB " [N] = Set current channel.",0Dh,0Ah - DB " [O] = Set volume.",0Dh,0Ah - DB " [P] = Edit/Add channel.",0Dh,0Ah - DB " [Q] = Set channels number.",0Dh,0Ah - DB " [R] = Set synthetiser frequencies.",0Dh,0Ah - DB " [U] = Print 80c552 internal RAM.",0Dh,0Ah - DB " [S] = Copy EEPROM to external RAM.",0Dh,0Ah - DB " [T] = Set current channel state.",0Dh,0Ah - DB " [V] = Print firmware version.",0Dh,0Ah - DB " [X] = Copy external RAM to EEPROM.",0Dh,0Ah - DB " [Y] = Print first 2 kb from the EEPROM I2C 24c16.",0Dh,0Ah - DB " [Z] = Print external RAM ($0000 to $07FF).",0Dh,0Ah,0 -*/ +#define RX_IF_OFFSET MHz(21.4) + +// The rig's PLL only deals with freq in Hz divided by this value +#define FREQ_DIV 12500. /* V4 commands - * retrieved from https://sourceforge.net/projects/prm80/ - * + * retrieved from https://github.com/f4fez/prm80 + * and https://github.com/f4fez/prm80/blob/master/doc/Computer_commands_V4.md + * It used to be from https://sourceforge.net/projects/prm80/ + * and https://sourceforge.net/p/prm80/wiki/Computer%20commands%20V4/ + MessageVersion: IF TARGET EQ 8060 DB "PRM8060 V4.0" @@ -134,86 +111,173 @@ MessageAide: DB "H",0Dh,0Ah */ /* - * prm80_transaction - * We assume that rig!=NULL, rig->state!= NULL, data!=NULL, data_len!=NULL - * Otherwise, you'll get a nice seg fault. You've been warned! - * TODO: error case handling + * Mode byte, which holds the state of system basic features: + b0: Squelch mode is displayed on LCD if true. Channel mode if false. + b1: Power level (High or Low mode) + b2: Squelch open (Read only) + b3: TX mode (Read only) + b4: PLL locked (Read only) + b5: Long key push (Internal) + b6: Key bounce (Internal) + b7: Force LCD refresh when set. Automaticaly cleared. + + Channel state byte: + b0: Shift enable when true + b1: Reverse mode when true + b2: Positive shift when true. Negative if false + b3: Scanning locked out channel if set + b4-7: na. + + Lock byte, which disables user controls when connected to a computer + b0: Keys disabled when true + b1: TX disabled when true + b2: Volume button disabled when true + b3: RX disabled when true + b4-b7: na. + + * ********************************************************************* + */ + +/* + * TODO make read_colon_prompt_and_send() more generic to read + * a prompt terminated by "$" (without space afterwards) + */ +#define read_dollar_prompt_and_send read_colon_prompt_and_send + +/* + * Read a prompt terminated by ": ", then write an optional string s. + */ +static int read_colon_prompt_and_send(hamlib_port_t *rigport, + char *data, int *data_len, const char *s) +{ + char buf[BUFSZ]; + char spacebuf[4]; + int buflen, retval; + + /* no data wanted? flush it anyway by reading it */ + if (data == NULL) + { + data = buf; + } + + buflen = (data_len == NULL) ? sizeof(buf) : *data_len; + + retval = read_string(rigport, data, buflen, ":", 1); + + if (retval < 0) + { + return retval; + } + + // Place an end of string + data[(retval < buflen) ? retval : (buflen - 1)] = '\0'; + + if (data_len != NULL) + { + *data_len = retval; + } + + // Read one (dummy) space character after the colon + retval = read_block(rigport, spacebuf, 1); + + if (retval < 0 && retval != -RIG_ETIMEOUT) + { + return retval; + } + + // Here is the answer to the prompt + retval = write_block(rigport, s, strlen(s)); + + return retval; +} + +/* + * After each executed command, the rig generally sends "\r\n>" */ -static int prm80_transaction(RIG *rig, const char *cmd, int cmd_len, char *data, - int *data_len) +static int prm80_wait_for_prompt(hamlib_port_t *rigport) { - int retval, i; - struct rig_state *rs; + char buf[BUFSZ * 2]; + int retval; + + // Read up to the '>' prompt and discard content. + retval = read_string(rigport, buf, sizeof(buf), ">", 1); + + if (retval < 0) + { + return retval; + } + + return RIG_OK; +} - rs = &rig->state; +/* + * + * \param cmd is string of generally one letter (or digit) + * \param arg1 is an optional string string sent + * \param wait_prompt boolean when non-nul, will wait for "\r\n>" afterwards + */ +static int prm80_transaction(RIG *rig, const char *cmd, + const char *arg1, int wait_prompt) +{ + int retval; + struct rig_state *rs = &rig->state; + // Get rid of possible prompt sent by the rig rig_flush(&rs->rigport); - retval = write_block(&rs->rigport, cmd, cmd_len); + // Start with the command + retval = write_block(&rs->rigport, cmd, strlen(cmd)); if (retval != RIG_OK) { return retval; } - /* no data wanted, but flush it anyway */ - if (!data || !data_len) + if (arg1 != NULL) { - char retbuf[BUFSZ + 1]; - - retval = read_string(&rs->rigport, retbuf, BUFSZ, LF, strlen(LF)); + retval = read_colon_prompt_and_send(&rs->rigport, NULL, NULL, arg1); if (retval < 0) { return retval; } - -#if 0 - - /* - * Does transceiver sends back ">" ? - */ - if (strstr(retbuf, PROMPT)) - { - return RIG_OK; - } - else - { - return -RIG_ERJCTED; - } - -#else - return RIG_OK; -#endif } - retval = read_string(&rs->rigport, data, BUFSZ, LF, strlen(LF)); - - if (retval == -RIG_ETIMEOUT) + if (wait_prompt) { - retval = 0; + prm80_wait_for_prompt(&rs->rigport); } - if (retval < 0) + return RIG_OK; +} + +int prm80_init(RIG *rig) +{ + if (!rig) { - return retval; + return -RIG_EINVAL; } - /* Clear possible MSB, because of 7S1 */ - for (i = 0; i < retval; i++) + rig->state.priv = (void *)calloc(1, sizeof(struct prm80_priv_data)); + + if (!rig->state.priv) { - data[i] &= 0x7f; + /* whoops! memory shortage! */ + return -RIG_ENOMEM; } - *data_len = retval; + return RIG_OK; +} - /* chomp CR/LF from string */ - if (*data_len >= 2 && data[*data_len - 1] == '\x0a') +int prm80_cleanup(RIG *rig) +{ + if (rig == NULL) { - *data_len -= 2; + return -RIG_EINVAL; } - data[*data_len] = '\0'; + free(rig->state.priv); + rig->state.priv = NULL; return RIG_OK; } @@ -228,9 +292,9 @@ int prm80_reset(RIG *rig, reset_t reset) int retval; /* - * master reset ? + * Reset CPU */ - retval = prm80_transaction(rig, "0", 1, NULL, NULL); + retval = prm80_transaction(rig, "0", NULL, 1); if (retval != RIG_OK) { @@ -242,33 +306,107 @@ int prm80_reset(RIG *rig, reset_t reset) /* - * prm80_set_freq - * Assumes rig!=NULL + * Set RX and TX freq + * + * See https://github.com/f4fez/prm80/blob/master/doc/Computer_control.md + * "Adding a new channel" regarding freq format. + */ +int prm80_set_rx_tx_freq(RIG *rig, freq_t rx_freq, freq_t tx_freq) +{ + struct rig_state *rs = &rig->state; + char rx_freq_buf[BUFSZ]; + char tx_freq_buf[BUFSZ]; + int rc; + + // for RX, compute the PLL word without the IF + sprintf(rx_freq_buf, "%04X", + (unsigned)((rx_freq - RX_IF_OFFSET) / FREQ_DIV)); + sprintf(tx_freq_buf, "%04X", + (unsigned)(tx_freq / FREQ_DIV)); + + // The protocol is like this : + // "RX frequency : " XXXX + // CRLF"TX frequency : " XXXX + + rc = prm80_transaction(rig, "R", rx_freq_buf, 0); + + if (rc != RIG_OK) + { + return rc; + } + + // There's a second line to process after prm80_transaction() + rc = read_colon_prompt_and_send(&rs->rigport, NULL, NULL, tx_freq_buf); + + if (rc != RIG_OK) + { + return rc; + } + + // quid timeout in trx waiting for freq ? + + // NB: the [R] command does not update the checksum of the RAM! + + prm80_wait_for_prompt(&rs->rigport); + + return rc; +} + +/* + * Set (RX) freq */ int prm80_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { - char freqbuf[BUFSZ]; - char data[BUFSZ]; - int freq_len; + struct prm80_priv_data *priv = (struct prm80_priv_data *)rig->state.priv; + freq_t tx_freq; int rc; - struct rig_state *rs = &rig->state; - /* wild guess */ - freq_len = sprintf(freqbuf, "R%04X%04X", - (unsigned)(freq / 12500.), - (unsigned)(freq / 12500.)); + if (priv->split == RIG_SPLIT_OFF) + { + tx_freq = freq; + } + else + { + tx_freq = (priv->tx_freq == 0.) ? freq : priv->tx_freq; + } + + rc = prm80_set_rx_tx_freq(rig, freq, tx_freq); + + if (rc == RIG_OK) + { + priv->rx_freq = freq; + } - rc = prm80_transaction(rig, freqbuf, freq_len, NULL, NULL); - read_string(&rs->rigport, data, BUFSZ, LF, strlen(LF)); return rc; } /* - * prm80_get_freq - * Assumes rig!=NULL + * Set TX freq depending on emulated split state + */ +int prm80_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) +{ + struct prm80_priv_data *priv = (struct prm80_priv_data *)rig->state.priv; + freq_t rx_freq; + int rc; + + rx_freq = (priv->rx_freq == 0.) ? tx_freq : priv->rx_freq; + + rc = prm80_set_rx_tx_freq(rig, rx_freq, tx_freq); + + if (rc == RIG_OK) + { + priv->tx_freq = tx_freq; + } + + return rc; +} + +/* + * Get RX freq depending on emulated split state */ int prm80_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) { + struct prm80_priv_data *priv = (struct prm80_priv_data *)rig->state.priv; int ret; channel_t chan; @@ -283,29 +421,96 @@ int prm80_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) } *freq = chan.freq; + priv->tx_freq = chan.tx_freq; + + return RIG_OK; +} + +/* + * Enable/disable Split + * + * Rem: don't care about vfo + */ +int prm80_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) +{ + struct prm80_priv_data *priv = (struct prm80_priv_data *)rig->state.priv; + + priv->split = split; + + return RIG_OK; +} + +/* + * Get Split + */ +int prm80_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo) +{ + struct prm80_priv_data *priv = (struct prm80_priv_data *)rig->state.priv; + + *split = priv->split; + *tx_vfo = RIG_VFO_CURR; + + return RIG_OK; +} + +/* + * Get TX freq + */ +int prm80_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq) +{ + struct prm80_priv_data *priv = (struct prm80_priv_data *)rig->state.priv; + int ret; + channel_t chan; + + memset(&chan, 0, sizeof(chan)); + chan.vfo = RIG_VFO_CURR; + + ret = prm80_get_channel(rig, vfo, &chan, 0); + + if (ret != RIG_OK) + { + return ret; + } + + *tx_freq = chan.tx_freq; + priv->rx_freq = chan.freq; + + return RIG_OK; +} + +/* + * Basic helper to ease some generic applications + */ +int prm80_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) +{ + // Can only do FM + *mode = RIG_MODE_FM; + *width = rig_passband_normal(rig, *mode); return RIG_OK; } + /* * prm80_set_mem * Assumes rig!=NULL */ int prm80_set_mem(RIG *rig, vfo_t vfo, int ch) { - int cmd_len; - char cmdbuf[BUFSZ]; + char chbuf[BUFSZ]; /* [N] = Set current channel. */ - if (ch < 0 || ch > 99) + if (ch < CHAN_MIN || ch > CHAN_MAX) { return -RIG_EINVAL; } - cmd_len = sprintf(cmdbuf, "N%02d", ch); + sprintf(chbuf, "%02u", (unsigned)ch); + + // Send command, no answer expected from rig except ">" prompt - return prm80_transaction(rig, cmdbuf, cmd_len, NULL, NULL); + return prm80_transaction(rig, "N", chbuf, 1); } /* @@ -352,9 +557,11 @@ static int hhtoi(const char *p) */ int prm80_get_channel(RIG *rig, vfo_t vfo, channel_t *chan, int read_only) { + struct prm80_priv_data *priv = (struct prm80_priv_data *)rig->state.priv; + struct rig_state *rs = &rig->state; char statebuf[BUFSZ]; - int statebuf_len = BUFSZ; - int ret, chanstate; + char *p; + int ret, chanstate, mode_byte, lock_byte; if (chan->vfo == RIG_VFO_MEM) { @@ -366,30 +573,75 @@ int prm80_get_channel(RIG *rig, vfo_t vfo, channel_t *chan, int read_only) } } - /* [E] = Show system state (Mode-Chan-Chanstate-Sql-Vol-Lock-RX freq-TX freq). */ - ret = prm80_transaction(rig, "E", 1, statebuf, &statebuf_len); + // Get rid of possible prompt sent by the rig + rig_flush(&rs->rigport); + + /* [E] = Show system state */ + ret = write_block(&rs->rigport, "E", 1); - if (ret != RIG_OK) + if (ret < 0) { RETURNFUNC(ret); } - if (statebuf_len < 20) + // The response length is fixed + ret = read_block(&rs->rigport, statebuf, 20); + + if (ret < 0) { - rig_debug(RIG_DEBUG_ERR, "%s: statebuf_len < 20, statebuf='%s'\n", __func__, - statebuf); + return ret; + } + + if (ret >= 0) + { + statebuf[ret] = '\0'; + } + + if (ret < 20) + { + rig_debug(RIG_DEBUG_ERR, "%s: len=%d < 20, statebuf='%s'\n", __func__, + ret, statebuf); RETURNFUNC(-RIG_EPROTO); } - /* Example: 1240080AFF0033F02D40 */ - if (hhtoi(statebuf) != 0x12) - rig_debug(RIG_DEBUG_WARN, "%s: Unknown mode 0x%c%c\n", - __func__, statebuf[0], statebuf[1]); + p = strchr(statebuf, '>'); + + if (p) + { + int left_to_read = (p - statebuf) + 1; + memmove(statebuf, p + 1, 20 - left_to_read); + ret = read_block(&rs->rigport, statebuf + 20 - left_to_read, left_to_read); + + if (ret >= 0) + { + statebuf[20] = '\0'; + } + + rig_debug(RIG_DEBUG_WARN, "%s: len=%d, statebuf='%s'\n", __func__, ret, + statebuf); + } + + /* (Mode-Chan-Chanstate-Sql-Vol-Lock-RX freq-TX freq). */ + /* Examples: 1240080AFF0033F02D40 or 14000C00FD0079708020 */ + + /* Current mode: + ; b0: Squelch b1: power + ; b2: Squelch open b3: TX + ; b4: PLL locked b5: Long press memorize + ; b6: Debouncing in effect b7: LCD refresh + */ + mode_byte = hhtoi(statebuf); chan->mode = RIG_MODE_FM; chan->width = rig_passband_normal(rig, chan->mode); chan->channel_num = hhtoi(statebuf + 2); + chan->tx_mode = chan->mode; + chan->tx_width = chan->width; + /* Chan state: + ; b0: shift enabled b1: reverse + ; b2: shift + b3: lock out + */ chanstate = hhtoi(statebuf + 4) & 0x0f; /* is it rptr_shift or split mode ? */ chan->rptr_shift = (chanstate & 0x01) == 0 ? RIG_RPT_SHIFT_NONE : @@ -400,39 +652,160 @@ int prm80_get_channel(RIG *rig, vfo_t vfo, channel_t *chan, int read_only) // cppcheck-suppress * chan->levels[LVL_SQL].f = ((float)(hhtoi(statebuf + 6) >> 4)) / 15.; chan->levels[LVL_AF].f = ((float)(hhtoi(statebuf + 8) >> 4)) / 15.; - /* same as chanstate bit 1 */ - chan->flags = hhtoi(statebuf + 10) == 0 ? 0 : RIG_CHFLAG_SKIP; - chan->freq = ((hhtoi(statebuf + 12) << 8) + hhtoi(statebuf + 14)) * 12500; - chan->tx_freq = ((hhtoi(statebuf + 16) << 8) + hhtoi(statebuf + 18)) * 12500; - chan->rptr_offs = chan->tx_freq - chan->freq; + chan->levels[LVL_RFPOWER].f = (mode_byte & 0x02) ? 1.0 : 0.0; + + chan->funcs |= (chanstate & 0x02) ? RIG_FUNC_REV : 0; + + lock_byte = hhtoi(statebuf + 10) & 0x0f; + chan->funcs = (lock_byte != 0) ? RIG_FUNC_LOCK : 0; + + chan->freq = ((hhtoi(statebuf + 12) << 8) + hhtoi(statebuf + 14)) * FREQ_DIV + + RX_IF_OFFSET; + chan->tx_freq = ((hhtoi(statebuf + 16) << 8) + hhtoi(statebuf + 18)) * FREQ_DIV; + + if (chan->rptr_shift != RIG_RPT_SHIFT_NONE) + { + chan->rptr_offs = chan->tx_freq - chan->freq; + chan->split = RIG_SPLIT_OFF; + } + else + { + chan->rptr_offs = 0; + chan->split = priv->split; // RIG_SPLIT_ON; ? + } if (!read_only) { // Set rig to channel values - rig_debug(RIG_DEBUG_ERR, - "%s: please contact hamlib mailing list to implement this, rxfreq=%.0f, txfreq=%.0f\n", - __func__, chan->freq, chan->tx_freq); - rig_debug(RIG_DEBUG_ERR, + rig_debug(RIG_DEBUG_WARN, + "%s: please contact hamlib mailing list to implement this\n", __func__); + rig_debug(RIG_DEBUG_WARN, "%s: need to know if rig updates when channel read or not\n", __func__); //return -RIG_ENIMPL; } + prm80_wait_for_prompt(&rs->rigport); + return RIG_OK; } /* - * prm80_set_channel - * Assumes rig!=NULL + * prm80_set_channel handles RIG_VFO_MEM and RIG_VFO_CURR */ int prm80_set_channel(RIG *rig, vfo_t vfo, const channel_t *chan) { - char statebuf[BUFSZ]; - int statebuf_len = BUFSZ; - int ret; + struct prm80_priv_data *priv = (struct prm80_priv_data *)rig->state.priv; + struct rig_state *rs = &rig->state; + char buf[BUFSZ]; + int ret, chanstate; + freq_t tx_freq; if (chan->vfo == RIG_VFO_MEM) { - ret = prm80_set_mem(rig, RIG_VFO_CURR, chan->channel_num); + // setting channel without calling set_mem() + + if (chan->channel_num < CHAN_MIN || chan->channel_num > CHAN_MAX) + { + return -RIG_EINVAL; + } + + /* [P] = Edit/Add channel */ + /* Example + Channel to set : 00 + PLL value to load : $8020 + Channel state : $00 + + TODO: handle the possible query from the rig: + "This channel number doesn't exist. Add new channel (Y/N) ? " + TODO implement correctly read_dollar_prompt_and_send (dollar prompt) + */ + + sprintf(buf, "%02u", (unsigned)chan->channel_num); + + ret = prm80_transaction(rig, "P", buf, 0); + + if (ret != RIG_OK) + { + return ret; + } + + // Set the RX frequency as PLL word + sprintf(buf, "%04X", (unsigned)((chan->freq - RX_IF_OFFSET) / FREQ_DIV)); + ret = read_dollar_prompt_and_send(&rs->rigport, NULL, NULL, buf); + + if (ret != RIG_OK) + { + return ret; + } + + // the channel status byte. + switch (chan->rptr_shift) + { + case RIG_RPT_SHIFT_NONE : chanstate = 0x00; break; + + case RIG_RPT_SHIFT_MINUS : chanstate = 0x03; break; + + case RIG_RPT_SHIFT_PLUS : chanstate = 0x05; break; + + default: chanstate = 0x00; break; + } + + chanstate |= (chan->flags & RIG_CHFLAG_SKIP) ? 0x08 : 0; + + sprintf(buf, "%02X", chanstate); + ret = read_dollar_prompt_and_send(&rs->rigport, NULL, NULL, buf); + + if (ret != RIG_OK) + { + return ret; + } + + prm80_wait_for_prompt(&rs->rigport); + } + else + { + // assume here chan->vfo == RIG_VFO_CURR + // that is the "RAM" VFO not backed by memory + + tx_freq = (chan->split == RIG_SPLIT_ON) ? chan->tx_freq : chan->freq; + + ret = prm80_set_rx_tx_freq(rig, chan->freq, tx_freq); + + if (ret != RIG_OK) + { + return ret; + } + + priv->split = chan->split; + priv->rx_freq = chan->freq; + priv->tx_freq = tx_freq; + + ret = prm80_set_level(rig, vfo, RIG_LEVEL_SQL, chan->levels[LVL_SQL]); + + if (ret != RIG_OK) + { + return ret; + } + + ret = prm80_set_level(rig, vfo, RIG_LEVEL_AF, chan->levels[LVL_AF]); + + if (ret != RIG_OK) + { + return ret; + } + +#if 0 + // Not implemented yet.. + ret = prm80_set_level(rig, vfo, RIG_LEVEL_RFPOWER, chan->levels[LVL_RFPOWER]); + + if (ret != RIG_OK) + { + return ret; + } + +#endif + + ret = prm80_set_func(rig, vfo, RIG_FUNC_LOCK, chan->funcs & RIG_FUNC_LOCK); if (ret != RIG_OK) { @@ -440,52 +813,91 @@ int prm80_set_channel(RIG *rig, vfo_t vfo, const channel_t *chan) } } - /* [T] = Set current channel state. (Mode-Chan-Chanstate-Sql-Vol-Lock-RX freq-TX freq) ? */ - /* Example: 1240080AFF0033F02D40 ? */ - statebuf_len = sprintf(statebuf, "T%02X%02X%02X%02X%02X%02X%04X%04X", - 0x12, - chan->channel_num, - (chan->flags & RIG_CHFLAG_SKIP) ? 0x08 : 0, /* TODO: tx shift */ - (unsigned)(chan->levels[LVL_SQL].f * 15), - (unsigned)(chan->levels[LVL_AF].f * 15), - (chan->flags & RIG_CHFLAG_SKIP) ? 0x01 : 0x00, /* Lock */ - (unsigned)(chan->freq / 12500.), - (unsigned)(chan->tx_freq / 12500.) - ); + return RIG_OK; +} - ret = prm80_transaction(rig, statebuf, statebuf_len, NULL, NULL); + +// TODO FUNC_REV ? +int prm80_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) +{ + int ret; + + if (func & RIG_FUNC_LOCK) + { + /* Lock keys/TX/Vol */ + ret = prm80_transaction(rig, "K", (status != 0) ? "03" : "00", 1); + } + else + { + ret = -RIG_EINVAL; + } + + return ret; +} + +int prm80_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status) +{ + int ret; + channel_t chan; + + memset(&chan, 0, sizeof(chan)); + chan.vfo = RIG_VFO_CURR; + + ret = prm80_get_channel(rig, vfo, &chan, 0); if (ret != RIG_OK) { return ret; } + *status = (chan.funcs & func); + return RIG_OK; } - /* * prm80_set_level * Assumes rig!=NULL */ int prm80_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) { - int cmd_len; - char cmdbuf[BUFSZ]; + char buf[BUFSZ]; + + // do some clamping, all levels are float values. + if (val.f < 0.0) + { + val.f = 0.0; + } + else if (val.f > 1.0) + { + val.f = 1.0; + } switch (level) { case RIG_LEVEL_AF: - cmd_len = sprintf(cmdbuf, "O%02u", (unsigned)(val.f * 15)); + sprintf(buf, "%02u", (unsigned)(val.f * 15)); - return prm80_transaction(rig, cmdbuf, cmd_len, NULL, NULL); + return prm80_transaction(rig, "O", buf, 1); case RIG_LEVEL_SQL: - cmd_len = sprintf(cmdbuf, "F%02u", (unsigned)(val.f * 15)); + sprintf(buf, "%02u", (unsigned)(val.f * 15)); - return prm80_transaction(rig, cmdbuf, cmd_len, NULL, NULL); + return prm80_transaction(rig, "F", buf, 1); case RIG_LEVEL_RFPOWER: + // TODO : modify the Mode byte b1 ? +#if 0 + /* Current mode: + ; b0: Squelch b1: power + ; b2: Squelch open b3: TX + ; b4: PLL locked b5: Long press memorize + ; b6: Debouncing in effect b7: LCD refresh + */ + // TODO perform a "Read-Modify-Write" of the mode_byte + mode_byte = 0x10; + mode_byte |= (chan->levels[LVL_RFPOWER].f == 0.) ? 0 : 0x02; +#endif return -RIG_ENIMPL; default: @@ -528,6 +940,11 @@ int prm80_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) break; + case RIG_LEVEL_RFPOWER: + val->f = chan.levels[LVL_RFPOWER].f; + + break; + default: rig_debug(RIG_DEBUG_ERR, "%s: unsupported set_level %s\n", __func__, rig_strlevel(level)); @@ -537,26 +954,47 @@ int prm80_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) return RIG_OK; } +// TODO vfo_op : MCL FROM_VFO .. + /* * prm80_get_info * Assumes rig!=NULL */ const char *prm80_get_info(RIG *rig) { - static char buf[BUFSZ]; - int ret, buf_len = BUFSZ; + static char s_buf[BUFSZ]; + struct rig_state *rs = &rig->state; + char *p; + int ret; + + // Get rid of possible prompt sent by the rig + rig_flush(&rs->rigport); /* [V] = Print firmware version. */ - ret = prm80_transaction(rig, "V", 1, buf, &buf_len); + ret = write_block(&rs->rigport, "V", 1); if (ret < 0) { return NULL; } - return buf; -} + ret = read_string(&rs->rigport, s_buf, BUFSZ, ">", 1); + if (ret < 0) + { + return NULL; + } + + p = strchr(s_buf, '\r'); + + if (p) + { + // chomp + *p = '\0'; + } + + return s_buf; +} /* diff --git a/rigs/prm80/prm80.h b/rigs/prm80/prm80.h index 71e96a13..fbaf50fb 100644 --- a/rigs/prm80/prm80.h +++ b/rigs/prm80/prm80.h @@ -1,6 +1,6 @@ /* * Hamlib PRM80 backend - main header - * Copyright (c) 2010 by Stephane Fillod + * Copyright (c) 2010,2021 by Stephane Fillod * * * This library is free software; you can redistribute it and/or @@ -24,28 +24,41 @@ #include <hamlib/rig.h> -#define BACKEND_VER "20101027" +#define BACKEND_VER "20210217" #define PRM80_MEM_CAP { \ .freq = 1, \ - .mode = 1, \ .rptr_shift = 1, \ - .rptr_offs = 1, \ - .flags = 1, /* lockout*/ \ - .levels = RIG_LEVEL_SQL|RIG_LEVEL_AF, \ + .flags = 1, /* lockout */ \ } +struct prm80_priv_data +{ + freq_t rx_freq; /* last RX freq set */ + freq_t tx_freq; /* last TX freq set */ + split_t split; /* emulated split on/off */ +}; + +int prm80_init(RIG *rig); +int prm80_cleanup(RIG *rig); int prm80_reset(RIG *rig, reset_t reset); int prm80_set_freq(RIG *rig, vfo_t vfo, freq_t freq); int prm80_get_freq(RIG *rig, vfo_t vfo, freq_t *freq); +int prm80_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo); +int prm80_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo); +int prm80_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq); +int prm80_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq); +int prm80_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width); +int prm80_set_func(RIG *rig, vfo_t vfo, setting_t func, int status); +int prm80_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status); int prm80_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val); int prm80_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val); -int prm80_set_mem (RIG *rig, vfo_t vfo, int ch); -int prm80_get_mem (RIG *rig, vfo_t vfo, int *ch); -int prm80_set_channel(RIG * rig, vfo_t vfo, const channel_t * chan); -int prm80_get_channel(RIG * rig, vfo_t vfo, channel_t * chan, int read_only); +int prm80_set_mem(RIG *rig, vfo_t vfo, int ch); +int prm80_get_mem(RIG *rig, vfo_t vfo, int *ch); +int prm80_set_channel(RIG *rig, vfo_t vfo, const channel_t *chan); +int prm80_get_channel(RIG *rig, vfo_t vfo, channel_t *chan, int read_only); -const char* prm80_get_info(RIG *rig); +const char *prm80_get_info(RIG *rig); extern const struct rig_caps prm8060_caps; diff --git a/rigs/prm80/prm8060.c b/rigs/prm80/prm8060.c index 9f60d09d..ff690e88 100644 --- a/rigs/prm80/prm8060.c +++ b/rigs/prm80/prm8060.c @@ -1,6 +1,6 @@ /* * Hamlib PR... [truncated message content] |
From: Michael B. <mdb...@us...> - 2021-02-16 23:16:03
|
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 5ec2c5b4c64df45734986c29df77e62f3ce14d94 (commit) from f4748ebf8a3bc31013204cde343acff8ee971ec5 (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 5ec2c5b4c64df45734986c29df77e62f3ce14d94 Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Feb 16 17:01:11 2021 -0600 https://github.com/Hamlib/Hamlib/issues/546 diff --git a/Android.mk b/Android.mk index 95f82b78..b24f8ce3 100644 --- a/Android.mk +++ b/Android.mk @@ -2,42 +2,42 @@ TOP_PATH := $(call my-dir) include $(TOP_PATH)/src/Android.mk -include $(TOP_PATH)/adat/Android.mk -include $(TOP_PATH)/alinco/Android.mk -include $(TOP_PATH)/amsat/Android.mk -include $(TOP_PATH)/aor/Android.mk -include $(TOP_PATH)/ars/Android.mk -include $(TOP_PATH)/celestron/Android.mk -include $(TOP_PATH)/drake/Android.mk -include $(TOP_PATH)/dummy/Android.mk -include $(TOP_PATH)/easycomm/Android.mk -include $(TOP_PATH)/ether6/Android.mk -include $(TOP_PATH)/flexradio/Android.mk -include $(TOP_PATH)/fodtrack/Android.mk -include $(TOP_PATH)/gs232a/Android.mk -include $(TOP_PATH)/heathkit/Android.mk -include $(TOP_PATH)/icom/Android.mk -include $(TOP_PATH)/jrc/Android.mk -include $(TOP_PATH)/kachina/Android.mk -include $(TOP_PATH)/kenwood/Android.mk -include $(TOP_PATH)/kit/Android.mk -include $(TOP_PATH)/lowe/Android.mk -include $(TOP_PATH)/m2/Android.mk -include $(TOP_PATH)/meade/Android.mk -include $(TOP_PATH)/pcr/Android.mk -include $(TOP_PATH)/prm80/Android.mk -include $(TOP_PATH)/racal/Android.mk -include $(TOP_PATH)/rft/Android.mk -include $(TOP_PATH)/rotorez/Android.mk -include $(TOP_PATH)/rs/Android.mk -include $(TOP_PATH)/sartek/Android.mk -include $(TOP_PATH)/skanti/Android.mk -include $(TOP_PATH)/spid/Android.mk -include $(TOP_PATH)/tapr/Android.mk -include $(TOP_PATH)/tentec/Android.mk -include $(TOP_PATH)/ts7400/Android.mk -include $(TOP_PATH)/tuner/Android.mk -include $(TOP_PATH)/uniden/Android.mk -include $(TOP_PATH)/winradio/Android.mk -include $(TOP_PATH)/wj/Android.mk -include $(TOP_PATH)/yaesu/Android.mk +include $(TOP_PATH)/rigs/adat/Android.mk +include $(TOP_PATH)/rigs/alinco/Android.mk +include $(TOP_PATH)/rigs/amsat/Android.mk +include $(TOP_PATH)/rigs/aor/Android.mk +include $(TOP_PATH)/rigs/ars/Android.mk +include $(TOP_PATH)/rigs/celestron/Android.mk +include $(TOP_PATH)/rigs/drake/Android.mk +include $(TOP_PATH)/rigs/dummy/Android.mk +include $(TOP_PATH)/rigs/easycomm/Android.mk +include $(TOP_PATH)/rigs/ether6/Android.mk +include $(TOP_PATH)/rigs/flexradio/Android.mk +include $(TOP_PATH)/rigs/fodtrack/Android.mk +include $(TOP_PATH)/rigs/gs232a/Android.mk +include $(TOP_PATH)/rigs/heathkit/Android.mk +include $(TOP_PATH)/rigs/icom/Android.mk +include $(TOP_PATH)/rigs/jrc/Android.mk +include $(TOP_PATH)/rigs/kachina/Android.mk +include $(TOP_PATH)/rigs/kenwood/Android.mk +include $(TOP_PATH)/rigs/kit/Android.mk +include $(TOP_PATH)/rigs/lowe/Android.mk +include $(TOP_PATH)/rigs/m2/Android.mk +include $(TOP_PATH)/rigs/meade/Android.mk +include $(TOP_PATH)/rigs/pcr/Android.mk +include $(TOP_PATH)/rigs/prm80/Android.mk +include $(TOP_PATH)/rigs/racal/Android.mk +include $(TOP_PATH)/rigs/rft/Android.mk +include $(TOP_PATH)/rigs/rotorez/Android.mk +include $(TOP_PATH)/rigs/rs/Android.mk +include $(TOP_PATH)/rigs/sartek/Android.mk +include $(TOP_PATH)/rigs/skanti/Android.mk +include $(TOP_PATH)/rigs/spid/Android.mk +include $(TOP_PATH)/rigs/tapr/Android.mk +include $(TOP_PATH)/rigs/tentec/Android.mk +include $(TOP_PATH)/rigs/ts7400/Android.mk +include $(TOP_PATH)/rigs/tuner/Android.mk +include $(TOP_PATH)/rigs/uniden/Android.mk +include $(TOP_PATH)/rigs/winradio/Android.mk +include $(TOP_PATH)/rigs/wj/Android.mk +include $(TOP_PATH)/rigs/yaesu/Android.mk ----------------------------------------------------------------------- Summary of changes: Android.mk | 78 +++++++++++++++++++++++++++++++------------------------------- 1 file changed, 39 insertions(+), 39 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-02-16 21:59:49
|
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 f4748ebf8a3bc31013204cde343acff8ee971ec5 (commit) from 7c26d2afef71d079b1bcde62bf0ae66b4b181eb0 (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 f4748ebf8a3bc31013204cde343acff8ee971ec5 Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Feb 16 15:58:12 2021 -0600 Change rig.c to query freq after set freq to ensure it gets set Up to 4 retries https://github.com/Hamlib/Hamlib/issues/549 diff --git a/src/rig.c b/src/rig.c index 33262942..e0e156b0 100644 --- a/src/rig.c +++ b/src/rig.c @@ -1575,7 +1575,28 @@ int HAMLIB_API rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq) rig_debug(RIG_DEBUG_TRACE, "%s: TARGETABLE_FREQ vfo=%s\n", __func__, rig_strvfo(vfo)); - retcode = caps->set_freq(rig, vfo, freq); + int retry=5; + freq_t tfreq; + do { + retcode = caps->set_freq(rig, vfo, freq); + if (retcode != RIG_OK) RETURNFUNC(retcode); + set_cache_freq(rig, RIG_VFO_ALL, (freq_t)0); + if (caps->set_freq) + { + retcode = rig_get_freq(rig, vfo, &tfreq); + if (retcode != RIG_OK) RETURNFUNC(retcode); + if (tfreq != freq) + { + hl_usleep(50*1000); + rig_debug(RIG_DEBUG_WARN, "%s: freq not set correctly?? got %.0f asked for %.0f\n", __func__, (double)tfreq, (double)freq); + } + } + else { retry = 1; } + } while (tfreq != freq && --retry > 0); + if (retry == 0) + { + rig_debug(RIG_DEBUG_ERR, "%s: unable to set frequency!!\n", __func__); + } } else { @@ -3290,10 +3311,9 @@ int HAMLIB_API rig_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) if (caps->set_freq && (caps->targetable_vfo & RIG_TARGETABLE_FREQ)) { - RETURNFUNC(caps->set_freq(rig, tx_vfo, tx_freq)); + RETURNFUNC(rig_set_freq(rig, tx_vfo, tx_freq)); } - if (caps->set_vfo) { retcode = caps->set_vfo(rig, tx_vfo); @@ -3318,7 +3338,7 @@ int HAMLIB_API rig_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) } else { - retcode = caps->set_freq(rig, RIG_VFO_CURR, tx_freq); + retcode = rig_set_freq(rig, RIG_VFO_CURR, tx_freq); } /* try and revert even if we had an error above */ ----------------------------------------------------------------------- Summary of changes: src/rig.c | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Nate B. <n0...@us...> - 2021-02-15 21:44:04
|
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 7c26d2afef71d079b1bcde62bf0ae66b4b181eb0 (commit) via 2556f4fcd1a8caad33fcd46d5a58b6af47810edc (commit) via 9dce43fc507bc7677849a5180d3ad9f7a3e24402 (commit) from e016025c04f66b75c7773fc747dc8fe57e7565b1 (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 7c26d2afef71d079b1bcde62bf0ae66b4b181eb0 Merge: e016025c 2556f4fc Author: Nate Bargmann <n0...@n0...> Date: Mon Feb 15 15:41:11 2021 -0600 Merge pull request #548 from N0NB/doxygen_work Doxygen work commit 2556f4fcd1a8caad33fcd46d5a58b6af47810edc Author: Nate Bargmann <n0...@n0...> Date: Mon Feb 15 15:38:20 2021 -0600 Udate amplifier documentation for consistency diff --git a/src/amp_conf.c b/src/amp_conf.c index 1e1390e4..bc0b4bd3 100644 --- a/src/amp_conf.c +++ b/src/amp_conf.c @@ -502,8 +502,8 @@ int HAMLIB_API amp_token_foreach(AMP *amp, * to the frontend config params table. * * \return A pointer to the token in the #confparams structure or NULL if - * \a amp is invalid or \a token not found (how can the caller know which - * occurred?). + * \a amp is NULL or inconsistent or if \a token is not found (how can the + * caller know which occurred?). * * \sa amp_token_lookup() * @@ -600,7 +600,7 @@ token_t HAMLIB_API amp_token_lookup(AMP *amp, const char *name) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The parameter was set successfully. - * \retval RIG_EINVAL \a amp or \a token was invalid. + * \retval RIG_EINVAL \a amp is NULL or inconsistent or \a token is invalid. * \retval RIG_ENAVAIL amp_caps#set_conf() capability is not available. * * \sa amp_get_conf() @@ -656,7 +656,7 @@ int HAMLIB_API amp_set_conf(AMP *amp, token_t token, const char *val) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK Querying the parameter was successful. - * \retval RIG_EINVAL \a amp is NULL or invalid. + * \retval RIG_EINVAL \a amp is NULL or inconsistent. * \retval RIG_ENAVAIL amp_caps#get_conf() capability is not available. * * \sa amp_set_conf() diff --git a/src/amplifier.c b/src/amplifier.c index 7d6d711e..9aa5056e 100644 --- a/src/amplifier.c +++ b/src/amplifier.c @@ -671,7 +671,7 @@ int HAMLIB_API amp_set_freq(AMP *amp, freq_t freq) * * \return A pointer to static memory containing an ASCII nul terminated * string (C string) if the operation has been successful, otherwise NULL if - * \a amp is NULL or invalid or the amp_caps#get_info() capability is not + * \a amp is NULL or inconsistent or the amp_caps#get_info() capability is not * available. */ const char *HAMLIB_API amp_get_info(AMP *amp) diff --git a/src/extamp.c b/src/extamp.c index 300e3429..a0dbd797 100644 --- a/src/extamp.c +++ b/src/extamp.c @@ -167,7 +167,7 @@ int HAMLIB_API amp_ext_parm_foreach(AMP *amp, * amp_caps::extparms. * * \return A pointer to the containing #confparams structure member or NULL if - * nothing found or if \a amp is NULL or invalid. + * nothing found or if \a amp is NULL or inconsistent. * * \sa amp_ext_token_lookup() * @@ -214,7 +214,7 @@ const struct confparams *HAMLIB_API amp_ext_lookup(AMP *amp, const char *name) * Searches the amp_caps::extlevels table first and then falls back to amp_caps::extparms. * * \return A pointer to the containing #confparams structure member or NULL if - * nothing found or if \a amp is NULL or invalid. + * nothing found or if \a amp is NULL or inconsistent. */ const struct confparams *HAMLIB_API amp_ext_lookup_tok(AMP *amp, token_t token) { commit 9dce43fc507bc7677849a5180d3ad9f7a3e24402 Author: Nate Bargmann <n0...@n0...> Date: Mon Feb 15 15:36:47 2021 -0600 Update Docygen comments in rotator.c Create new group for rot_internal that Doxygen shows under the Modules tab. diff --git a/doc/index.doxygen b/doc/index.doxygen index 34c9c69c..22670887 100644 --- a/doc/index.doxygen +++ b/doc/index.doxygen @@ -102,8 +102,9 @@ Windows 32 bit on Debian GNU/Linux. /*! Define groups for Doxygen * \defgroup rig Rig (transceiver) API + * \defgroup rig_internal Rig (transceiver) Internal API * \defgroup rotator Rotator API - * \defgroup utilities Utility Routines API - * \defgroup rig_internal Rig Internal API + * \defgroup rot_internal Rotator Internal API * \defgroup amplifier Amplifier API + * \defgroup utilities Utility Routines API */ diff --git a/src/rotator.c b/src/rotator.c index 8cb36a7e..159b85c7 100644 --- a/src/rotator.c +++ b/src/rotator.c @@ -28,18 +28,22 @@ /** * \file src/rotator.c * \brief Rotator interface + * \author Frank Singleton + * \date 2000-2003 * \author Stephane Fillod * \date 2000-2012 * - * Hamlib interface is a frontend implementing rotator wrapper functions. + * This Hamlib interface is a frontend implementing the rotator wrapper + * functions. */ /** * \page rot Rotator interface * - * Rotator can be any kind of azimuth or azimuth and elevation controlled - * antenna system. + * A rotator can be any kind of azimuth, elevation, or azimuth and elevation + * controlled antenna system or other such aiming equipment, e.g. telescopes, + * etc. */ #ifdef HAVE_CONFIG_H @@ -147,22 +151,30 @@ static int remove_opened_rot(ROT *rot) } #endif /* !DOC_HIDDEN */ +/** @} */ /* rotator definitions */ + /** - * \brief execs cfunc() on each opened rot - * \param cfunc The function to be executed on each rot - * \param data Data pointer to be passed to cfunc() + * \addtogroup rot_internal + * @{ + */ + + +/** + * \brief Executes \a cfunc on each opened #ROT. + * + * \param cfunc The function to be executed on each #ROT. + * \param data Data pointer to be passed to \a cfunc. * - * Calls cfunc() function for each opened rot. The contents of the opened - * rot table is processed in random order according to a function pointed to - * by \a cfunc, which is called with two arguments, the first pointing to the - * #ROT handle, the second to a data pointer \a data. + * Calls \a cfunc function for each opened #ROT. The contents of the opened + * #ROT table is processed in random order according to a function pointed to + * by \a cfunc, which is called with two arguments, the first pointing to the + * #ROT handle, the second to a data pointer \a data. * - * If \a data is not needed, then it can be set to NULL. The processing of - * the opened rot table is stopped when cfunc() returns 0. - * \internal + * If \a data is not needed, then it can be set to NULL. The processing of + * the opened #ROT table is stopped when \a cfunc returns 0. * - * \return always RIG_OK. + * \return RIG_OK in all cases. */ int foreach_opened_rot(int (*cfunc)(ROT *, rig_ptr_t), rig_ptr_t data) { @@ -180,17 +192,24 @@ int foreach_opened_rot(int (*cfunc)(ROT *, rig_ptr_t), rig_ptr_t data) return RIG_OK; } +/** @} */ /* rot_internal definitions */ /** - * \brief allocate a new #ROT handle - * \param rot_model The rot model for this new handle + * \addtogroup rotator + * @{ + */ + +/** + * \brief Allocate a new #ROT handle. + * + * \param rot_model The rotator model for this new handle. * * Allocates a new #ROT handle and initializes the associated data - * for \a rot_model. + * for \a rot_model (see rotlist.h or `rigctl -l`). * * \return a pointer to the #ROT handle otherwise NULL if memory allocation - * failed or \a rot_model is unknown (e.g. backend autoload failed). + * failed or \a rot_model is unknown, e.g. backend autoload failed. * * \sa rot_cleanup(), rot_open() */ @@ -313,18 +332,19 @@ ROT *HAMLIB_API rot_init(rot_model_t rot_model) /** - * \brief open the communication to the rot - * \param rot The #ROT handle of the rotator to be opened + * \brief Open the communication channel to the rotator. * - * Opens communication to a rotator which \a ROT handle has been passed - * by argument. + * \param rot The #ROT handle of the rotator to be opened. * - * \return RIG_OK if the operation has been successful, otherwise - * a negative value if an error occurred (in which case, cause is - * set appropriately). + * Opens the communication channel to a rotator for which the #ROT handle has + * been passed. * - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENIMPL port type communication is not implemented yet. + * \return RIG_OK if the operation has been successful, otherwise a **negative + * value** if an error occurred (in which case, cause is set appropriately). + * + * \retval RIG_OK Communication channel succesfully opened. + * \retval RIG_EINVAL \a rot is NULL or inconsistent. + * \retval RIG_ENIMPL Communication port type is not implemented yet. * * \sa rot_init(), rot_close() */ @@ -448,15 +468,17 @@ int HAMLIB_API rot_open(ROT *rot) /** - * \brief close the communication to the rot - * \param rot The #ROT handle of the rotator to be closed + * \brief Close the communication channel to the rotator. + * \param rot The #ROT handle of the rotator to be closed. + * + * Closes the communication channel to a rotator for which #ROT handle has + * been passed by argument that was previously opened with rot_open(). * - * Closes communication to a rotator which \a ROT handle has been passed - * by argument that was previously open with rot_open(). + * \return RIG_OK if the operation has been successful, otherwise a **negative + * value** if an error occurred (in which case, cause is set appropriately). * - * \return RIG_OK if the operation has been successful, otherwise - * a negative value if an error occurred (in which case, cause is - * set appropriately). + * \retval RIG_OK Communication channel successfully closed. + * \retval RIG_EINVAL \a rot is NULL or inconsistent. * * \sa rot_cleanup(), rot_open() */ @@ -527,15 +549,18 @@ int HAMLIB_API rot_close(ROT *rot) /** - * \brief release a rot handle and free associated memory - * \param rot The #ROT handle of the radio to be closed + * \brief Release a #ROT handle and free associated memory. * - * Releases a rot struct which port has eventually been closed already + * \param rot The #ROT handle to be released. + * + * Releases a #ROT handle for which the communication channel has been closed * with rot_close(). * - * \return RIG_OK if the operation has been successful, otherwise - * a negative value if an error occurred (in which case, cause is - * set appropriately). + * \return RIG_OK if the operation has been successful, otherwise a **negative + * value** if an error occurred (in which case, cause is set appropriately). + * + * \retval RIG_OK #ROT handle successfully released. + * \retval RIG_EINVAL \a rot is NULL or inconsistent. * * \sa rot_init(), rot_close() */ @@ -571,16 +596,25 @@ int HAMLIB_API rot_cleanup(ROT *rot) /** - * \brief set the azimuth and elevation of the rotator - * \param rot The rot handle - * \param azimuth The azimuth to set to - * \param elevation The elevation to set to + * \brief Set the azimuth and elevation of the rotator. + * + * \param rot The #ROT handle. + * \param azimuth The azimuth to set in decimal degress. + * \param elevation The elevation to set in decimal degrees. * * Sets the azimuth and elevation of the rotator. * - * \return RIG_OK if the operation has been successful, otherwise - * a negative value if an error occurred (in which case, cause is - * set appropriately). + * \b Note: A given rotator may be capable of setting only the azimuth or + * only the elevation or both. The rotator backend will ignore the unneeded + * parameter. + * + * \return RIG_OK if the operation has been successful, otherwise a **negative + * value** if an error occurred (in which case, cause is set appropriately). + * + * \retval RIG_OK Either or both parameters set successfully. + * \retval RIG_EINVAL \a rot is NULL or inconsistent \b or either \a azimuth + * or \a elevation is out of range for this rotator. + * \retval RIG_ENAVAIL rot_caps#set_position() capability is not available. * * \sa rot_get_position() */ @@ -634,16 +668,25 @@ int HAMLIB_API rot_set_position(ROT *rot, /** - * \brief get the azimuth and elevation of the rotator - * \param rot The rot handle - * \param azimuth The location where to store the current azimuth - * \param elevation The location where to store the current elevation + * \brief Query the azimuth and elevation of the rotator. + * + * \param rot The #ROT handle. + * \param azimuth The variable to store the current azimuth. + * \param elevation The variable to store the current elevation + * + * Retrieves the current azimuth and elevation values of the rotator. The + * stored values are in decimal degrees. * - * Retrieves the current azimuth and elevation of the rotator. + * \b Note: A given rotator may be capable of querying only the azimuth or + * only the elevation or both. The rotator backend should store a value of 0 + * in the unsupported variable. * - * \return RIG_OK if the operation has been successful, otherwise - * a negative value if an error occurred (in which case, cause is - * set appropriately). + * \return RIG_OK if the operation has been successful, otherwise a **negative + * value** if an error occurred (in which case, cause is set appropriately). + * + * \retval RIG_OK Either or both parameters queried and stored successfully. + * \retval RIG_EINVAL \a rot is NULL or inconsistent. + * \retval RIG_ENAVAIL rot_caps#get_position() capability is not available. * * \sa rot_set_position() */ @@ -692,14 +735,19 @@ int HAMLIB_API rot_get_position(ROT *rot, /** - * \brief park the antenna - * \param rot The rot handle + * \brief Park the rotator. + * + * \param rot The #ROT handle. * - * Park the antenna. + * Park the rotator in a predetermined position as implemented by the rotator + * hardware. * - * \return RIG_OK if the operation has been successful, otherwise - * a negative value if an error occurred (in which case, cause is - * set appropriately). + * \return RIG_OK if the operation has been successful, otherwise a **negative + * value** if an error occurred (in which case, cause is set appropriately). + * + * \retval RIG_OK The rotator was parked successfully. + * \retval RIG_EINVAL \a rot is NULL or inconsistent. + * \retval RIG_ENAVAIL rot_caps#park() capability is not available. * */ int HAMLIB_API rot_park(ROT *rot) @@ -725,15 +773,20 @@ int HAMLIB_API rot_park(ROT *rot) /** - * \brief stop the rotator - * \param rot The rot handle + * \brief Stop the rotator. + * + * \param rot The #ROT handle. * - * Stop the rotator. + * Stop the rotator. Command should be immediate. * - * \return RIG_OK if the operation has been successful, otherwise - * a negative value if an error occurred (in which case, cause is - * set appropriately). + * \return RIG_OK if the operation has been successful, otherwise a **negative + * value** if an error occurred (in which case, cause is set appropriately). * + * \retval RIG_OK The rotator was stopped successfully. + * \retval RIG_EINVAL \a rot is NULL or inconsistent. + * \retval RIG_ENAVAIL rot_caps#stop() capability is not available. + * + * \sa rot_move() */ int HAMLIB_API rot_stop(ROT *rot) { @@ -758,16 +811,19 @@ int HAMLIB_API rot_stop(ROT *rot) /** - * \brief reset the rotator - * \param rot The rot handle + * \brief Reset the rotator. + * + * \param rot The #ROT handle. * \param reset The reset operation to perform * - * Resets the rotator. + * Resets the rotator to a state determined by \a reset. * - * \return RIG_OK if the operation has been successful, otherwise - * a negative value if an error occurred (in which case, cause is - * set appropriately). + * \return RIG_OK if the operation has been successful, otherwise a **negative + * value** if an error occurred (in which case, cause is set appropriately). * + * \retval RIG_OK The rotator was reset successfully. + * \retval RIG_EINVAL \a rot is NULL or inconsistent. + * \retval RIG_ENAVAIL rot_caps#reset() capability is not available. */ int HAMLIB_API rot_reset(ROT *rot, rot_reset_t reset) { @@ -792,13 +848,22 @@ int HAMLIB_API rot_reset(ROT *rot, rot_reset_t reset) /** - * \brief move the rotator in the specified direction - * \param rot The rot handle - * \param direction Direction of movement - * \param speed Speed of movement + * \brief Move the rotator in the specified direction and speed. + * + * \param rot The #ROT handle. + * \param direction Direction of movement. + * \param speed Speed of movement. + * + * Move the rotator in the specified direction. The \a direction is one of + * #ROT_MOVE_CCW, #ROT_MOVE_CW, #ROT_MOVE_LEFT, #ROT_MOVE_RIGHT, #ROT_MOVE_UP, + * or #ROT_MOVE_DOWN. The \a speed is a value between 1 and 100 or + * #ROT_SPEED_NOCHANGE. * - * Move the rotator in the specified direction. The speed is a value - * between 1 and 100. + * \retval RIG_OK The rotator move was successful. + * \retval RIG_EINVAL \a rot is NULL or inconsistent. + * \retval RIG_ENAVAIL rot_caps#move() capability is not available. + * + * \sa rot_stop() */ int HAMLIB_API rot_move(ROT *rot, int direction, int speed) { @@ -823,15 +888,17 @@ int HAMLIB_API rot_move(ROT *rot, int direction, int speed) /** - * \brief get general information from the rotator - * \param rot The rot handle + * \brief Get general information from the rotator. + * + * \param rot The #ROT handle. * - * Retrieves some general information from the rotator. - * This can include firmware revision, exact model name, or just nothing. + * Retrieves some general information from the rotator. This can include + * firmware revision, exact model name, or just nothing. * - * \return a pointer to static memory containing the ASCIIZ string - * if the operation has been successful, otherwise NULL if an error occurred - * or get_info not part of capabilities. + * \return A pointer to static memory containing an ASCII nul terminated + * string (C string) if the operation has been successful, otherwise NULL if + * \a rot is NULL or inconsisten or the rot_caps#get_info() capability is not + * available. */ const char *HAMLIB_API rot_get_info(ROT *rot) { @@ -852,15 +919,19 @@ const char *HAMLIB_API rot_get_info(ROT *rot) /** - * \brief get status flags from the rotator - * \param rot The rot handle - * \param status a pointer to a rot_status_t variable that will receive the status flags + * \brief Query status flags of the rotator. + * + * \param rot The #ROT handle. + * \param status The variable where the status flags will be stored. + * + * Query the active status flags from the rotator. * - * Gets the active status flags from the rotator. + * \return RIG_OK if the operation has been successful, otherwise a **negative + * value** if an error occurred (in which case, cause is set appropriately). * - * \return RIG_OK if the operation has been successful, otherwise - * a negative value if an error occurred (in which case, cause is - * set appropriately). + * \retval RIG_OK The query was successful. + * \retval RIG_EINVAL \a rot is NULL or inconsistent. + * \retval RIG_ENAVAIL rot_caps#get_status() capability is not available. */ int HAMLIB_API rot_get_status(ROT *rot, rot_status_t *status) { ----------------------------------------------------------------------- Summary of changes: doc/index.doxygen | 5 +- src/amp_conf.c | 8 +- src/amplifier.c | 2 +- src/extamp.c | 4 +- src/rotator.c | 257 ++++++++++++++++++++++++++++++++++-------------------- 5 files changed, 174 insertions(+), 102 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Nate B. <n0...@us...> - 2021-02-15 21:34:55
|
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 e016025c04f66b75c7773fc747dc8fe57e7565b1 (commit) via fc890004f32fc60c104eefdc5506201f66a67cae (commit) via ab34e83adc202f343994e7b20cb6bbd70de92e83 (commit) via 003bc93dd0ad32c8426b11301f83306e6b0a46ff (commit) via 665a6eabc00035429050c62094e66fd3e00c9f06 (commit) via 9c4f77cc8105271d14ed0220881f2c6612e6d5be (commit) from 779a00591cc879c4040a8d6039862416487b85ff (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 e016025c04f66b75c7773fc747dc8fe57e7565b1 Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Feb 15 08:53:41 2021 -0600 Add power functions to flrig.c diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index 11a5b2a9..7b69d628 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -91,6 +91,10 @@ static int flrig_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val); static int flrig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val); static const char *flrig_get_info(RIG *rig); +static int flrig_power2mW(RIG *rig, unsigned int *mwpower, float power, + freq_t freq, rmode_t mode); +static int flrig_mW2power(RIG *rig, float *power, unsigned int mwpower, + freq_t freq, rmode_t mode); struct flrig_priv_data { @@ -177,7 +181,9 @@ const struct rig_caps flrig_caps = .set_split_freq_mode = flrig_set_split_freq_mode, .get_split_freq_mode = flrig_get_split_freq_mode, .set_level = flrig_set_level, - .get_level = flrig_get_level + .get_level = flrig_get_level, + .power2mW = flrig_power2mW, + .mW2power = flrig_mW2power }; // Structure for mapping flrig dynmamic modes to hamlib modes @@ -2017,3 +2023,34 @@ static const char *flrig_get_info(RIG *rig) return priv->info; } + +static int flrig_power2mW(RIG *rig, unsigned int *mwpower, float power, + freq_t freq, rmode_t mode) +{ + struct flrig_priv_data *priv = (struct flrig_priv_data *) rig->state.priv; + ENTERFUNC; + rig_debug(RIG_DEBUG_TRACE, "%s: passed power = %f\n", __func__, power); + rig_debug(RIG_DEBUG_TRACE, "%s: passed freq = %"PRIfreq" Hz\n", __func__, freq); + rig_debug(RIG_DEBUG_TRACE, "%s: passed mode = %s\n", __func__, + rig_strrmode(mode)); + + power *= priv->powermeter_scale; + *mwpower = (power * 100000); + + RETURNFUNC(RIG_OK); +} + +static int flrig_mW2power(RIG *rig, float *power, unsigned int mwpower, + freq_t freq, rmode_t mode) +{ + ENTERFUNC; + rig_debug(RIG_DEBUG_TRACE, "%s: passed mwpower = %u\n", __func__, mwpower); + rig_debug(RIG_DEBUG_TRACE, "%s: passed freq = %"PRIfreq" Hz\n", __func__, freq); + rig_debug(RIG_DEBUG_TRACE, "%s: passed mode = %s\n", __func__, + rig_strrmode(mode)); + + *power = ((float)mwpower / 100000); + + RETURNFUNC(RIG_OK); +} + diff --git a/rigs/dummy/flrig.h b/rigs/dummy/flrig.h index bcd35b6b..b2cccb69 100644 --- a/rigs/dummy/flrig.h +++ b/rigs/dummy/flrig.h @@ -28,7 +28,7 @@ #include <sys/time.h> #endif -#define BACKEND_VER "20210128" +#define BACKEND_VER "20210215" #define EOM "\r" #define TRUE 1 commit fc890004f32fc60c104eefdc5506201f66a67cae Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Feb 14 23:51:14 2021 -0600 Fix too verbose debug in serial.c diff --git a/src/serial.c b/src/serial.c index 81c59f94..9f58d66c 100644 --- a/src/serial.c +++ b/src/serial.c @@ -120,11 +120,11 @@ int is_uh_radio_fd(int fd) { if (uh_radio_fd >= 0 && uh_radio_fd == fd) { - RETURNFUNC( 1); + return ( 1); } else { - RETURNFUNC( 0); + return ( 0); } } //! @endcond commit ab34e83adc202f343994e7b20cb6bbd70de92e83 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Feb 14 23:46:05 2021 -0600 RETURNFUNC ENTERFUNC for serial.c https://github.com/Hamlib/Hamlib/issues/514 diff --git a/src/serial.c b/src/serial.c index 421e75ca..81c59f94 100644 --- a/src/serial.c +++ b/src/serial.c @@ -120,11 +120,11 @@ int is_uh_radio_fd(int fd) { if (uh_radio_fd >= 0 && uh_radio_fd == fd) { - return 1; + RETURNFUNC( 1); } else { - return 0; + RETURNFUNC( 0); } } //! @endcond @@ -141,13 +141,15 @@ int HAMLIB_API serial_open(hamlib_port_t *rp) int fd; /* File descriptor for the port */ int err; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + ENTERFUNC; if (!rp) { - return -RIG_EINVAL; + RETURNFUNC(-RIG_EINVAL); } + + rig_debug(RIG_DEBUG_VERBOSE, "%s: %s\n", __func__, rp->pathname); if (!strncmp(rp->pathname, "uh-rig", 6)) { /* @@ -158,13 +160,13 @@ int HAMLIB_API serial_open(hamlib_port_t *rp) */ if (rp->parm.serial.parity != RIG_PARITY_NONE) { - return -RIG_EIO; + RETURNFUNC( -RIG_EIO); } if ((rp->parm.serial.handshake != RIG_HANDSHAKE_HARDWARE) && (rp->parm.serial.handshake != RIG_HANDSHAKE_NONE)) { - return -RIG_EIO; + RETURNFUNC( -RIG_EIO); } /* @@ -179,7 +181,7 @@ int HAMLIB_API serial_open(hamlib_port_t *rp) if (fd == -1) { - return -RIG_EIO; + RETURNFUNC( -RIG_EIO); } rp->fd = fd; @@ -215,7 +217,7 @@ int HAMLIB_API serial_open(hamlib_port_t *rp) * from the transceiver will be returned to both applications. */ uh_radio_fd = fd; - return RIG_OK; + RETURNFUNC( RIG_OK); } /* @@ -231,7 +233,7 @@ int HAMLIB_API serial_open(hamlib_port_t *rp) __func__, rp->pathname, strerror(errno)); - return -RIG_EIO; + RETURNFUNC( -RIG_EIO); } rp->fd = fd; @@ -241,13 +243,13 @@ int HAMLIB_API serial_open(hamlib_port_t *rp) if (err != RIG_OK) { CLOSE(fd); - return err; + RETURNFUNC( err); } serial_flush(rp); // ensure nothing is there when we open hl_usleep(50 * 1000); // give a little time for MicroKeyer to finish - return RIG_OK; + RETURNFUNC( RIG_OK); } @@ -272,11 +274,11 @@ int HAMLIB_API serial_setup(hamlib_port_t *rp) #endif term_options_backup_t *term_backup = NULL; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + ENTERFUNC; if (!rp) { - return -RIG_EINVAL; + RETURNFUNC( -RIG_EINVAL); } fd = rp->fd; @@ -367,7 +369,7 @@ int HAMLIB_API serial_setup(hamlib_port_t *rp) rp->parm.serial.rate); CLOSE(fd); - return -RIG_ECONF; + RETURNFUNC( -RIG_ECONF); } /* TODO */ @@ -414,7 +416,7 @@ int HAMLIB_API serial_setup(hamlib_port_t *rp) rp->parm.serial.data_bits); CLOSE(fd); - return -RIG_ECONF; + RETURNFUNC( -RIG_ECONF); break; } @@ -439,7 +441,7 @@ int HAMLIB_API serial_setup(hamlib_port_t *rp) rp->parm.serial.stop_bits); CLOSE(fd); - return -RIG_ECONF; + RETURNFUNC( -RIG_ECONF); break; } @@ -485,7 +487,7 @@ int HAMLIB_API serial_setup(hamlib_port_t *rp) rp->parm.serial.parity); CLOSE(fd); - return -RIG_ECONF; + RETURNFUNC( -RIG_ECONF); break; } @@ -518,7 +520,7 @@ int HAMLIB_API serial_setup(hamlib_port_t *rp) rp->parm.serial.handshake); CLOSE(fd); - return -RIG_ECONF; + RETURNFUNC( -RIG_ECONF); break; } @@ -563,7 +565,7 @@ int HAMLIB_API serial_setup(hamlib_port_t *rp) strerror(errno)); CLOSE(fd); - return -RIG_ECONF; /* arg, so close! */ + RETURNFUNC( -RIG_ECONF); /* arg, so close! */ } #elif defined(HAVE_TERMIO_H) @@ -578,7 +580,7 @@ int HAMLIB_API serial_setup(hamlib_port_t *rp) strerror(errno)); CLOSE(fd); - return -RIG_ECONF; /* arg, so close! */ + RETURNFUNC( -RIG_ECONF); /* arg, so close! */ } #else @@ -594,7 +596,7 @@ int HAMLIB_API serial_setup(hamlib_port_t *rp) strerror(errno)); CLOSE(fd); - return -RIG_ECONF; /* arg, so close! */ + RETURNFUNC( -RIG_ECONF); /* arg, so close! */ } #endif @@ -612,7 +614,7 @@ int HAMLIB_API serial_setup(hamlib_port_t *rp) term_backup->next = term_options_backup_head; term_options_backup_head = term_backup; - return RIG_OK; + RETURNFUNC( RIG_OK); } @@ -623,7 +625,7 @@ int HAMLIB_API serial_setup(hamlib_port_t *rp) */ int HAMLIB_API serial_flush(hamlib_port_t *p) { - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + ENTERFUNC; if (p->fd == uh_ptt_fd || p->fd == uh_radio_fd || p->flushx) { @@ -650,12 +652,12 @@ int HAMLIB_API serial_flush(hamlib_port_t *p) rig_debug(RIG_DEBUG_TRACE, "read flushed %d bytes\n", nbytes); - return RIG_OK; + RETURNFUNC( RIG_OK); } rig_debug(RIG_DEBUG_VERBOSE, "tcflush%s\n", ""); tcflush(p->fd, TCIFLUSH); - return RIG_OK; + RETURNFUNC( RIG_OK); } @@ -703,7 +705,7 @@ int ser_open(hamlib_port_t *p) } p->fd = ret; - return ret; + RETURNFUNC( ret); } @@ -730,7 +732,7 @@ int ser_close(hamlib_port_t *p) uh_close_ptt(); uh_ptt_fd = -1; p->fd = -1; - return 0; + RETURNFUNC( 0); } if (p->fd == uh_radio_fd) @@ -738,7 +740,7 @@ int ser_close(hamlib_port_t *p) uh_close_radio(); uh_radio_fd = -1; p->fd = -1; - return 0; + RETURNFUNC( 0); } // Find backup termios options to restore before closing @@ -812,7 +814,7 @@ int ser_close(hamlib_port_t *p) rc = CLOSE(p->fd); p->fd = -1; - return rc; + RETURNFUNC( rc); } @@ -827,14 +829,14 @@ int HAMLIB_API ser_set_rts(hamlib_port_t *p, int state) unsigned int y = TIOCM_RTS; int rc; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + ENTERFUNC; rig_debug(RIG_DEBUG_VERBOSE, "%s: RTS=%d\n", __func__, state); // ignore this for microHam ports if (p->fd == uh_ptt_fd || p->fd == uh_radio_fd) { - return RIG_OK; + RETURNFUNC( RIG_OK); } #if defined(TIOCMBIS) && defined(TIOCMBIC) @@ -864,10 +866,10 @@ int HAMLIB_API ser_set_rts(hamlib_port_t *p, int state) "%s: Cannot change RTS - %s\n", __func__, strerror(errno)); - return -RIG_EIO; + RETURNFUNC( -RIG_EIO); } - return RIG_OK; + RETURNFUNC( RIG_OK); } @@ -881,18 +883,18 @@ int HAMLIB_API ser_get_rts(hamlib_port_t *p, int *state) int retcode; unsigned int y; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + ENTERFUNC; // cannot do this for microHam ports if (p->fd == uh_ptt_fd || p->fd == uh_radio_fd) { - return -RIG_ENIMPL; + RETURNFUNC( -RIG_ENIMPL); } retcode = IOCTL(p->fd, TIOCMGET, &y); *state = (y & TIOCM_RTS) == TIOCM_RTS; - return retcode < 0 ? -RIG_EIO : RIG_OK; + RETURNFUNC( retcode < 0 ? -RIG_EIO : RIG_OK); } @@ -907,7 +909,7 @@ int HAMLIB_API ser_set_dtr(hamlib_port_t *p, int state) unsigned int y = TIOCM_DTR; int rc; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + ENTERFUNC; rig_debug(RIG_DEBUG_VERBOSE, "%s: DTR=%d\n", __func__, state); @@ -915,13 +917,13 @@ int HAMLIB_API ser_set_dtr(hamlib_port_t *p, int state) // but (un)set ptt on microHam PTT channel. if (p->fd == uh_radio_fd) { - return RIG_OK; + RETURNFUNC( RIG_OK); } if (p->fd == uh_ptt_fd) { uh_set_ptt(state); - return RIG_OK; + RETURNFUNC( RIG_OK); } #if defined(TIOCMBIS) && defined(TIOCMBIC) @@ -951,10 +953,10 @@ int HAMLIB_API ser_set_dtr(hamlib_port_t *p, int state) "%s: Cannot change DTR - %s\n", __func__, strerror(errno)); - return -RIG_EIO; + RETURNFUNC( -RIG_EIO); } - return RIG_OK; + RETURNFUNC( RIG_OK); } @@ -968,24 +970,24 @@ int HAMLIB_API ser_get_dtr(hamlib_port_t *p, int *state) int retcode; unsigned int y; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + ENTERFUNC; // cannot do this for the RADIO port, return PTT state for the PTT port if (p->fd == uh_ptt_fd) { *state = uh_get_ptt(); - return RIG_OK; + RETURNFUNC( RIG_OK); } if (p->fd == uh_radio_fd) { - return -RIG_ENIMPL; + RETURNFUNC( -RIG_ENIMPL); } retcode = IOCTL(p->fd, TIOCMGET, &y); *state = (y & TIOCM_DTR) == TIOCM_DTR; - return retcode < 0 ? -RIG_EIO : RIG_OK; + RETURNFUNC( retcode < 0 ? -RIG_EIO : RIG_OK); } @@ -997,19 +999,19 @@ int HAMLIB_API ser_get_dtr(hamlib_port_t *p, int *state) */ int HAMLIB_API ser_set_brk(hamlib_port_t *p, int state) { - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + ENTERFUNC; // ignore this for microHam ports if (p->fd == uh_ptt_fd || p->fd == uh_radio_fd) { - return RIG_OK; + RETURNFUNC( RIG_OK); } #if defined(TIOCSBRK) && defined(TIOCCBRK) - return IOCTL(p->fd, state ? TIOCSBRK : TIOCCBRK, 0) < 0 ? - -RIG_EIO : RIG_OK; + RETURNFUNC( IOCTL(p->fd, state ? TIOCSBRK : TIOCCBRK, 0) < 0 ? + -RIG_EIO : RIG_OK;) #else - return -RIG_ENIMPL; + RETURNFUNC( -RIG_ENIMPL); #endif } @@ -1024,18 +1026,18 @@ int HAMLIB_API ser_get_car(hamlib_port_t *p, int *state) int retcode; unsigned int y; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + ENTERFUNC; // cannot do this for microHam ports if (p->fd == uh_ptt_fd || p->fd == uh_radio_fd) { - return -RIG_ENIMPL; + RETURNFUNC( -RIG_ENIMPL); } retcode = IOCTL(p->fd, TIOCMGET, &y); *state = (y & TIOCM_CAR) == TIOCM_CAR; - return retcode < 0 ? -RIG_EIO : RIG_OK; + RETURNFUNC( retcode < 0 ? -RIG_EIO : RIG_OK); } @@ -1049,18 +1051,18 @@ int HAMLIB_API ser_get_cts(hamlib_port_t *p, int *state) int retcode; unsigned int y; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + ENTERFUNC; // cannot do this for microHam ports if (p->fd == uh_ptt_fd || p->fd == uh_radio_fd) { - return -RIG_ENIMPL; + RETURNFUNC( -RIG_ENIMPL); } retcode = IOCTL(p->fd, TIOCMGET, &y); *state = (y & TIOCM_CTS) == TIOCM_CTS; - return retcode < 0 ? -RIG_EIO : RIG_OK; + RETURNFUNC( retcode < 0 ? -RIG_EIO : RIG_OK); } @@ -1074,18 +1076,18 @@ int HAMLIB_API ser_get_dsr(hamlib_port_t *p, int *state) int retcode; unsigned int y; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + ENTERFUNC; // cannot do this for microHam ports if (p->fd == uh_ptt_fd || p->fd == uh_radio_fd) { - return -RIG_ENIMPL; + RETURNFUNC( -RIG_ENIMPL); } retcode = IOCTL(p->fd, TIOCMGET, &y); *state = (y & TIOCM_DSR) == TIOCM_DSR; - return retcode < 0 ? -RIG_EIO : RIG_OK; + RETURNFUNC( retcode < 0 ? -RIG_EIO : RIG_OK); } /** @} */ commit 003bc93dd0ad32c8426b11301f83306e6b0a46ff Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Feb 14 16:46:41 2021 -0600 Add RETURNFUNC to kenwood.c https://github.com/Hamlib/Hamlib/issues/514 diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index 6d38b120..48427e84 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -245,7 +245,7 @@ int kenwood_transaction(RIG *rig, const char *cmdstr, char *data, if ((!cmdstr && !datasize) || (datasize && !data)) { - return -RIG_EINVAL; + RETURNFUNC( -RIG_EINVAL); } rs = &rig->state; @@ -268,7 +268,7 @@ int kenwood_transaction(RIG *rig, const char *cmdstr, char *data, if (data) { strncpy(data, priv->last_if_response, datasize); } - return RIG_OK; + RETURNFUNC( RIG_OK); } // else we drop through and do the real IF command @@ -554,7 +554,7 @@ transaction_quit: rs->hold_decode = 0; rig_debug(RIG_DEBUG_TRACE, "%s: returning retval=%d\n", __func__, retval); - return retval; + RETURNFUNC( retval); } @@ -585,7 +585,7 @@ int kenwood_safe_transaction(RIG *rig, const char *cmd, char *buf, if (!cmd) { - return -RIG_EINVAL; + RETURNFUNC( -RIG_EINVAL); } memset(buf, 0, buf_size); @@ -605,7 +605,7 @@ int kenwood_safe_transaction(RIG *rig, const char *cmd, char *buf, if (err != RIG_OK) /* return immediately on error as any retries handled at lower level */ { - return err; + RETURNFUNC( err); } length = strlen(buf); @@ -624,7 +624,7 @@ int kenwood_safe_transaction(RIG *rig, const char *cmd, char *buf, } while (err != RIG_OK && ++retry < rig->state.rigport.retry); - return err; + RETURNFUNC( err); } rmode_t kenwood2rmode(unsigned char mode, const rmode_t mode_table[]) @@ -633,10 +633,10 @@ rmode_t kenwood2rmode(unsigned char mode, const rmode_t mode_table[]) if (mode >= KENWOOD_MODE_TABLE_MAX) { - return RIG_MODE_NONE; + RETURNFUNC( RIG_MODE_NONE); } - return mode_table[mode]; + RETURNFUNC( mode_table[mode]); } char rmode2kenwood(rmode_t mode, const rmode_t mode_table[]) @@ -653,12 +653,12 @@ char rmode2kenwood(rmode_t mode, const rmode_t mode_table[]) if (mode_table[i] == mode) { rig_debug(RIG_DEBUG_VERBOSE, "%s: returning %d\n", __func__, i); - return i; + RETURNFUNC( i); } } } - return -1; + RETURNFUNC( -1); } int kenwood_init(RIG *rig) @@ -673,7 +673,7 @@ int kenwood_init(RIG *rig) if (rig->state.priv == NULL) { - return -RIG_ENOMEM; + RETURNFUNC( -RIG_ENOMEM); } priv = rig->state.priv; @@ -715,7 +715,7 @@ int kenwood_init(RIG *rig) rig_debug(RIG_DEBUG_TRACE, "%s: if_len = %d\n", __func__, caps->if_len); - return RIG_OK; + RETURNFUNC( RIG_OK); } int kenwood_cleanup(RIG *rig) @@ -725,7 +725,7 @@ int kenwood_cleanup(RIG *rig) free(rig->state.priv); rig->state.priv = NULL; - return RIG_OK; + RETURNFUNC( RIG_OK); } int kenwood_open(RIG *rig) @@ -798,7 +798,7 @@ int kenwood_open(RIG *rig) { rig_debug(RIG_DEBUG_ERR, "%s: cannot get f/w version\n", __func__); rig->state.rigport.retry = retry_save; - return err; + RETURNFUNC( err); } /* store the data after the "FV" which should be a f/w version @@ -814,7 +814,7 @@ int kenwood_open(RIG *rig) { rig_debug(RIG_DEBUG_ERR, "%s: cannot get f/w version\n", __func__); rig->state.rigport.retry = retry_save; - return -RIG_EPROTO; + RETURNFUNC( -RIG_EPROTO); } rig_debug(RIG_DEBUG_TRACE, "%s: found f/w version %s\n", __func__, @@ -832,7 +832,7 @@ int kenwood_open(RIG *rig) { rig_debug(RIG_DEBUG_ERR, "%s: no response from rig\n", __func__); rig->state.rigport.retry = retry_save; - return err; + RETURNFUNC( err); } /* here we know there is something that responds to FA but not @@ -849,7 +849,7 @@ int kenwood_open(RIG *rig) { rig_debug(RIG_DEBUG_ERR, "%s: cannot get identification\n", __func__); rig->state.rigport.retry = retry_save; - return err; + RETURNFUNC( err); } } @@ -858,7 +858,7 @@ int kenwood_open(RIG *rig) { rig_debug(RIG_DEBUG_ERR, "%s: unknown id type (%s)\n", __func__, id); rig->state.rigport.retry = retry_save; - return -RIG_EPROTO; + RETURNFUNC( -RIG_EPROTO); } if (!strcmp("IDID900", id) /* DDUtil in TS-2000 mode */ @@ -927,7 +927,7 @@ int kenwood_open(RIG *rig) } rig->state.rigport.retry = retry_save; - return RIG_OK; + RETURNFUNC( RIG_OK); } /* driver mismatch */ @@ -948,7 +948,7 @@ int kenwood_open(RIG *rig) // mismatched IDs can still be tested rig->state.rigport.retry = retry_save; - return RIG_OK; + RETURNFUNC( RIG_OK); } @@ -965,7 +965,7 @@ int kenwood_close(RIG *rig) it's not supported */ } - return RIG_OK; + RETURNFUNC( RIG_OK); } @@ -979,7 +979,7 @@ int kenwood_get_id(RIG *rig, char *buf) { rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); - return kenwood_transaction(rig, "ID", buf, KENWOOD_MAX_BUF_LEN); + RETURNFUNC( kenwood_transaction(rig, "ID", buf, KENWOOD_MAX_BUF_LEN)); } @@ -994,8 +994,8 @@ static int kenwood_get_if(RIG *rig) rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); - return kenwood_safe_transaction(rig, "IF", priv->info, - KENWOOD_MAX_BUF_LEN, caps->if_len); + RETURNFUNC( kenwood_safe_transaction(rig, "IF", priv->info, + KENWOOD_MAX_BUF_LEN, caps->if_len);) } @@ -1019,7 +1019,7 @@ int kenwood_set_vfo(RIG *rig, vfo_t vfo) * This prevents a 1.8 second delay in PowerSDR when switching VFOs * We'll do this once if curr_mode has not been set yet */ - if (priv->is_emulation && priv->curr_mode > 0) { return RIG_OK; } + if (priv->is_emulation && priv->curr_mode > 0) { RETURNFUNC( RIG_OK; )} switch (vfo) { @@ -1036,11 +1036,11 @@ int kenwood_set_vfo(RIG *rig, vfo_t vfo) break; case RIG_VFO_CURR: - return RIG_OK; + RETURNFUNC( RIG_OK); default: rig_debug(RIG_DEBUG_ERR, "%s: unsupported VFO %s\n", __func__, rig_strvfo(vfo)); - return -RIG_EINVAL; + RETURNFUNC( -RIG_EINVAL); } //if rig=ts2000 then check Satellite mode status @@ -1054,7 +1054,7 @@ int kenwood_set_vfo(RIG *rig, vfo_t vfo) if (retval != RIG_OK) { - return retval; + RETURNFUNC( retval); } rig_debug(RIG_DEBUG_VERBOSE, "%s: satellite mode status %s\n", __func__, @@ -1065,7 +1065,7 @@ int kenwood_set_vfo(RIG *rig, vfo_t vfo) { //SAT mode doesn't allow FR command (cannot select VFO) //selecting VFO is useless in SAT MODE - return RIG_OK; + RETURNFUNC( RIG_OK); } } @@ -1081,19 +1081,19 @@ int kenwood_set_vfo(RIG *rig, vfo_t vfo) if (retval != RIG_OK) { - return retval; + RETURNFUNC( retval); } /* if FN command then there's no FT or FR */ /* If split mode on, the don't change TxVFO */ if ('N' == cmdbuf[1] || priv->split != RIG_SPLIT_OFF) { - return RIG_OK; + RETURNFUNC( RIG_OK); } /* set TX VFO */ cmdbuf[1] = 'T'; - return kenwood_transaction(rig, cmdbuf, NULL, 0); + RETURNFUNC( kenwood_transaction(rig, cmdbuf, NULL, 0)); } @@ -1120,15 +1120,15 @@ int kenwood_set_vfo_main_sub(RIG *rig, vfo_t vfo) break; case RIG_VFO_CURR: - return RIG_OK; + RETURNFUNC( RIG_OK); default: rig_debug(RIG_DEBUG_ERR, "%s: unsupported VFO %s\n", __func__, rig_strvfo(vfo)); - return -RIG_EINVAL; + RETURNFUNC( -RIG_EINVAL); } snprintf(cmdbuf, sizeof(cmdbuf), "CB%c", vfo_function); - return kenwood_transaction(rig, cmdbuf, NULL, 0); + RETURNFUNC( kenwood_transaction(rig, cmdbuf, NULL, 0)); } @@ -1145,7 +1145,7 @@ int kenwood_get_vfo_main_sub(RIG *rig, vfo_t *vfo) if (!vfo) { - return -RIG_EINVAL; + RETURNFUNC( -RIG_EINVAL); } if (RIG_OK == (rc = kenwood_safe_transaction(rig, "CB", buf, sizeof(buf), 3))) @@ -1153,7 +1153,7 @@ int kenwood_get_vfo_main_sub(RIG *rig, vfo_t *vfo) *vfo = buf[2] == '1' ? RIG_VFO_SUB : RIG_VFO_MAIN; } - return rc; + RETURNFUNC( rc); } @@ -1177,11 +1177,11 @@ int kenwood_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t txvfo) // Rx MAIN/Tx SUB is the only split method retval = kenwood_set_vfo_main_sub(rig, RIG_VFO_MAIN); - if (retval != RIG_OK) { return retval; } + if (retval != RIG_OK) { RETURNFUNC( retval; )} } snprintf(cmdbuf, sizeof(cmdbuf), "TB%c", RIG_SPLIT_ON == split ? '1' : '0'); - return kenwood_transaction(rig, cmdbuf, NULL, 0); + RETURNFUNC( kenwood_transaction(rig, cmdbuf, NULL, 0)); } if (vfo != RIG_VFO_CURR) @@ -1196,7 +1196,7 @@ int kenwood_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t txvfo) default: rig_debug(RIG_DEBUG_ERR, "%s: unsupported VFO %s\n", __func__, rig_strvfo(vfo)); - return -RIG_EINVAL; + RETURNFUNC( -RIG_EINVAL); } /* set RX VFO */ @@ -1205,7 +1205,7 @@ int kenwood_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t txvfo) if (retval != RIG_OK) { - return retval; + RETURNFUNC( retval); } } @@ -1220,7 +1220,7 @@ int kenwood_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t txvfo) if (retval != RIG_OK) { - return retval; + RETURNFUNC( retval); } } } @@ -1237,7 +1237,7 @@ int kenwood_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t txvfo) default: rig_debug(RIG_DEBUG_ERR, "%s: unsupported VFO %s\n", __func__, rig_strvfo(txvfo)); - return -RIG_EINVAL; + RETURNFUNC( -RIG_EINVAL); } priv->tx_vfo = txvfo; @@ -1249,7 +1249,7 @@ int kenwood_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t txvfo) if (RIG_OK == (retval = kenwood_safe_transaction(rig, "FT", cmdbuf, sizeof(cmdbuf), 3))) { - if (cmdbuf[2] == vfo_function) { return RIG_OK; } + if (cmdbuf[2] == vfo_function) { RETURNFUNC( RIG_OK; )} } } @@ -1259,13 +1259,13 @@ int kenwood_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t txvfo) if (retval != RIG_OK) { - return retval; + RETURNFUNC( retval); } /* Remember whether split is on, for kenwood_set_vfo */ priv->split = split; - return RIG_OK; + RETURNFUNC( RIG_OK); } @@ -1287,7 +1287,7 @@ int kenwood_set_split(RIG *rig, vfo_t vfo, split_t split, vfo_t txvfo) if (retval != RIG_OK) { - return retval; + RETURNFUNC( retval); } /* Remember whether split is on, for kenwood_set_vfo */ @@ -1296,7 +1296,7 @@ int kenwood_set_split(RIG *rig, vfo_t vfo, split_t split, vfo_t txvfo) rig_debug(RIG_DEBUG_VERBOSE, "%s: priv->tx_vfo=%s\n", __func__, rig_strvfo(priv->tx_vfo)); - return RIG_OK; + RETURNFUNC( RIG_OK); } @@ -1316,7 +1316,7 @@ int kenwood_get_split_vfo_if(RIG *rig, vfo_t rxvfo, split_t *split, if (!split || !txvfo) { - return -RIG_EINVAL; + RETURNFUNC( -RIG_EINVAL); } if (RIG_IS_TS990S) @@ -1340,14 +1340,14 @@ int kenwood_get_split_vfo_if(RIG *rig, vfo_t rxvfo, split_t *split, } } - return retval; + RETURNFUNC( retval); } retval = kenwood_get_if(rig); if (retval != RIG_OK) { - return retval; + RETURNFUNC( retval); } switch (priv->info[32]) @@ -1363,7 +1363,7 @@ int kenwood_get_split_vfo_if(RIG *rig, vfo_t rxvfo, split_t *split, default: rig_debug(RIG_DEBUG_ERR, "%s: unsupported split %c\n", __func__, priv->info[32]); - return -RIG_EPROTO; + RETURNFUNC( -RIG_EPROTO); } /* Remember whether split is on, for kenwood_set_vfo */ @@ -1391,13 +1391,13 @@ int kenwood_get_split_vfo_if(RIG *rig, vfo_t rxvfo, split_t *split, default: rig_debug(RIG_DEBUG_ERR, "%s: unsupported VFO %c\n", __func__, priv->info[30]); - return -RIG_EPROTO; + RETURNFUNC( -RIG_EPROTO); } priv->tx_vfo = *txvfo; rig_debug(RIG_DEBUG_VERBOSE, "%s: priv->tx_vfo=%s\n", __func__, rig_strvfo(priv->tx_vfo)); - return RIG_OK; + RETURNFUNC( RIG_OK); } @@ -1418,14 +1418,14 @@ int kenwood_get_vfo_if(RIG *rig, vfo_t *vfo) if (!vfo) { - return -RIG_EINVAL; + RETURNFUNC( -RIG_EINVAL); } retval = kenwood_get_if(rig); if (retval != RIG_OK) { - return retval; + RETURNFUNC( retval); } /* Elecraft info[30] does not track split VFO when transmitting */ @@ -1456,12 +1456,12 @@ int kenwood_get_vfo_if(RIG *rig, vfo_t *vfo) default: rig_debug(RIG_DEBUG_ERR, "%s: unsupported VFO %c\n", __func__, priv->info[30]); - return -RIG_EPROTO; + RETURNFUNC( -RIG_EPROTO); } rig_debug(RIG_DEBUG_VERBOSE, "%s: priv->tx_vfo=%s\n", __func__, rig_strvfo(priv->tx_vfo)); - return RIG_OK; + RETURNFUNC( RIG_OK); } @@ -1489,7 +1489,7 @@ int kenwood_set_freq(RIG *rig, vfo_t vfo, freq_t freq) /* fetch from rig */ err = rig_get_vfo(rig, &tvfo); - if (RIG_OK != err) { return err; } + if (RIG_OK != err) { RETURNFUNC( err; )} } switch (tvfo) @@ -1521,7 +1521,7 @@ int kenwood_set_freq(RIG *rig, vfo_t vfo, freq_t freq) default: rig_debug(RIG_DEBUG_ERR, "%s: unsupported VFO %s\n", __func__, rig_strvfo(vfo)); - return -RIG_EINVAL; + RETURNFUNC( -RIG_EINVAL); } // cppcheck-suppress * @@ -1549,7 +1549,7 @@ int kenwood_set_freq(RIG *rig, vfo_t vfo, freq_t freq) if (RIG_OK != err) { - return err; + RETURNFUNC( err); } if ('1' == priv->info[32] && priv->info[30] != ('A' == vfo_letter ? '0' : '1')) @@ -1562,14 +1562,14 @@ int kenwood_set_freq(RIG *rig, vfo_t vfo, freq_t freq) if (RIG_OK != err) { - return err; + RETURNFUNC( err); } err = kenwood_transaction(rig, freqbuf, NULL, 0); } } - return err; + RETURNFUNC( err); } int kenwood_get_freq_if(RIG *rig, vfo_t vfo, freq_t *freq) @@ -1582,21 +1582,21 @@ int kenwood_get_freq_if(RIG *rig, vfo_t vfo, freq_t *freq) if (!freq) { - return -RIG_EINVAL; + RETURNFUNC( -RIG_EINVAL); } retval = kenwood_get_if(rig); if (retval != RIG_OK) { - return retval; + RETURNFUNC( retval); } memcpy(freqbuf, priv->info, 15); freqbuf[14] = '\0'; sscanf(freqbuf + 2, "%"SCNfreq, freq); - return RIG_OK; + RETURNFUNC( RIG_OK); } /* @@ -1615,7 +1615,7 @@ int kenwood_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) if (!freq) { - return -RIG_EINVAL; + RETURNFUNC( -RIG_EINVAL); } tvfo = (vfo == RIG_VFO_CURR @@ -1626,14 +1626,14 @@ int kenwood_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) /* fetch from rig */ retval = rig_get_vfo(rig, &tvfo); - if (RIG_OK != retval) { return retval; } + if (RIG_OK != retval) { RETURNFUNC( retval; )} } /* memory frequency cannot be read with an Fx command, use IF */ if (tvfo == RIG_VFO_MEM) { - return kenwood_get_freq_if(rig, vfo, freq); + RETURNFUNC( kenwood_get_freq_if(rig, vfo, freq)); } switch (tvfo) @@ -1660,7 +1660,7 @@ int kenwood_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) default: rig_debug(RIG_DEBUG_ERR, "%s: unsupported VFO %s\n", __func__, rig_strvfo(vfo)); - return -RIG_EINVAL; + RETURNFUNC( -RIG_EINVAL); } snprintf(cmdbuf, sizeof(cmdbuf), "F%c", vfo_letter); @@ -1669,12 +1669,12 @@ int kenwood_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) if (retval != RIG_OK) { - return retval; + RETURNFUNC( retval); } sscanf(freqbuf + 2, "%"SCNfreq, freq); - return RIG_OK; + RETURNFUNC( RIG_OK); } int kenwood_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit) @@ -1687,14 +1687,14 @@ int kenwood_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit) if (!rit) { - return -RIG_EINVAL; + RETURNFUNC( -RIG_EINVAL); } retval = kenwood_get_if(rig); if (retval != RIG_OK) { - return retval; + RETURNFUNC( retval); } memcpy(buf, &priv->info[17], 6); @@ -1702,7 +1702,7 @@ int kenwood_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit) buf[6] = '\0'; *rit = atoi(buf); - return RIG_OK; + RETURNFUNC( RIG_OK); } /* @@ -1724,7 +1724,7 @@ int kenwood_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit) if (retval != RIG_OK) { - return retval; + RETURNFUNC( retval); } if (priv->has_rit2) // if backend shows it has the Set 2 command @@ -1739,10 +1739,10 @@ int kenwood_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit) if (retval != RIG_OK) { - return retval; + RETURNFUNC( retval); } - if (rit == 0) { return RIG_OK; } // we're done here + if (rit == 0) { RETURNFUNC( RIG_OK;) } // we're done her))e snprintf(buf, sizeof(buf), "R%c", (rit > 0) ? 'U' : 'D'); @@ -1755,7 +1755,7 @@ int kenwood_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit) } } - return retval; + RETURNFUNC( retval); } /* @@ -1765,14 +1765,14 @@ int kenwood_get_xit(RIG *rig, vfo_t vfo, shortfreq_t *rit) { rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); - return kenwood_get_rit(rig, vfo, rit); + RETURNFUNC( kenwood_get_rit(rig, vfo, rit)); } int kenwood_set_xit(RIG *rig, vfo_t vfo, shortfreq_t rit) { rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); - return kenwood_set_rit(rig, vfo, rit); + RETURNFUNC( kenwood_set_rit(rig, vfo, rit)); } int kenwood_scan(RIG *rig, vfo_t vfo, scan_t scan, int ch) @@ -1781,12 +1781,11 @@ int kenwood_scan(RIG *rig, vfo_t vfo, scan_t scan, int ch) if (RIG_IS_TS990S) { - return kenwood_transaction(rig, scan == RIG_SCAN_STOP ? "SC00" : "SC01", NULL, - 0); + RETURNFUNC( kenwood_transaction(rig, scan == RIG_SCAN_STOP ? "SC00" : "SC01", NULL, 0)); } else { - return kenwood_transaction(rig, scan == RIG_SCAN_STOP ? "SC0" : "SC1", NULL, 0); + RETURNFUNC( kenwood_transaction(rig, scan == RIG_SCAN_STOP ? "SC0" : "SC1", NULL, 0)); } } @@ -1828,7 +1827,7 @@ static int kenwood_set_filter(RIG *rig, pbwidth_t width) cmd = "FL002002"; } - return kenwood_transaction(rig, cmd, NULL, 0); + RETURNFUNC( kenwood_transaction(rig, cmd, NULL, 0)); } /* @@ -1887,7 +1886,7 @@ int kenwood_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) { rig_debug(RIG_DEBUG_WARN, "%s: unsupported mode '%s'\n", __func__, rig_strrmode(mode)); - return -RIG_EINVAL; + RETURNFUNC( -RIG_EINVAL); } if (kmode <= 9) @@ -1912,13 +1911,13 @@ int kenwood_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) vfo_t curr_vfo; err = kenwood_get_vfo_main_sub(rig, &curr_vfo); - if (err != RIG_OK) { return err; } + if (err != RIG_OK) { RETURNFUNC( err; )} if (vfo != RIG_VFO_CURR && vfo != curr_vfo) { err = kenwood_set_vfo_main_sub(rig, vfo); - if (err != RIG_OK) { return err; } + if (err != RIG_OK) { RETURNFUNC( err; )} } snprintf(buf, sizeof(buf), "OM0%c", c); /* target vfo is ignored */ @@ -1928,7 +1927,7 @@ int kenwood_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) { int err2 = kenwood_set_vfo_main_sub(rig, curr_vfo); - if (err2 != RIG_OK) { return err2; } + if (err2 != RIG_OK) { RETURNFUNC( err2; )} } } else @@ -1937,7 +1936,7 @@ int kenwood_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) err = kenwood_transaction(rig, buf, NULL, 0); } - if (err != RIG_OK) { return err; } + if (err != RIG_OK) { RETURNFUNC( err; )} if (RIG_IS_TS590S || RIG_IS_TS590SG || RIG_IS_TS950S || RIG_IS_TS950SDX) { @@ -1958,11 +1957,11 @@ int kenwood_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) snprintf(buf, sizeof(buf), "%s%c", data_cmd, data_mode); err = kenwood_transaction(rig, buf, NULL, 0); - if (err != RIG_OK) { return err; } + if (err != RIG_OK) { RETURNFUNC( err; )} } } - if (RIG_PASSBAND_NOCHANGE == width) { return RIG_OK; } + if (RIG_PASSBAND_NOCHANGE == width) { RETURNFUNC( RIG_OK; )} if (RIG_IS_TS450S || RIG_IS_TS690S || RIG_IS_TS850 || RIG_IS_TS950S || RIG_IS_TS950SDX) @@ -1977,7 +1976,7 @@ int kenwood_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) /* non fatal */ } - return RIG_OK; + RETURNFUNC( RIG_OK); } static int kenwood_get_filter(RIG *rig, pbwidth_t *width) @@ -1989,14 +1988,14 @@ static int kenwood_get_filter(RIG *rig, pbwidth_t *width) if (!width) { - return -RIG_EINVAL; + RETURNFUNC( -RIG_EINVAL); } err = kenwood_safe_transaction(rig, "FL", buf, sizeof(buf), 8); if (err != RIG_OK) { - return err; + RETURNFUNC( err); } f2 = atoi(&buf[5]); @@ -2037,7 +2036,7 @@ static int kenwood_get_filter(RIG *rig, pbwidth_t *width) break; } - return RIG_OK; + RETURNFUNC( RIG_OK); } /* @@ -2058,7 +2057,7 @@ int kenwood_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) if (!mode || !width) { - return -RIG_EINVAL; + RETURNFUNC( -RIG_EINVAL); } /* for emulation do not read mode from VFOB as it is copy of VFOA */ @@ -2066,7 +2065,7 @@ int kenwood_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) /* only need to get it if it has to be initialized */ if (priv->curr_mode > 0 && priv->is_emulation && vfo == RIG_VFO_B) { - return priv->curr_mode; + RETURNFUNC( priv->curr_mode); } if (RIG_IS_TS990S) @@ -2077,7 +2076,7 @@ int kenwood_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) { if (RIG_OK != (retval = kenwood_get_vfo_main_sub(rig, &vfo))) { - return retval; + RETURNFUNC( retval); } } @@ -2089,7 +2088,7 @@ int kenwood_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) default: rig_debug(RIG_DEBUG_ERR, "%s: unsupported VFO %s\n", __func__, rig_strvfo(vfo)); - return -RIG_EINVAL; + RETURNFUNC( -RIG_EINVAL); } snprintf(cmd, sizeof(cmd), "OM%c", c); @@ -2105,7 +2104,7 @@ int kenwood_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) if (retval != RIG_OK) { - return retval; + RETURNFUNC( retval); } if (modebuf[offs] <= '9') @@ -2135,7 +2134,7 @@ int kenwood_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) if (retval != RIG_OK) { - return retval; + RETURNFUNC( retval); } if ('1' == modebuf[2]) @@ -2156,7 +2155,7 @@ int kenwood_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) /* XXX ? */ *width = rig_passband_normal(rig, *mode); - return RIG_OK; + RETURNFUNC( RIG_OK); } /* This is used when the radio does not support MD; for mode reading */ @@ -2170,14 +2169,14 @@ int kenwood_get_mode_if(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) if (!mode || !width) { - return -RIG_EINVAL; + RETURNFUNC( -RIG_EINVAL); } err = kenwood_get_if(rig); if (err != RIG_OK) { - return err; + RETURNFUNC( err); } *mode = kenwood2rmode(priv->info[29] - '0', caps->mode_table); @@ -2192,7 +2191,7 @@ int kenwood_get_mode_if(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) /* non fatal */ } - return RIG_OK; + RETURNFUNC( RIG_OK); } /* kenwood_get_micgain_minmax @@ -2219,7 +2218,7 @@ static int kenwood_get_micgain_minmax(RIG *rig, int *micgain_now, rig_debug(RIG_DEBUG_TRACE, "%s: called\n", __func__); retval = write_block(&rs->rigport, cmd, strlen(cmd)); - if (retval != RIG_OK) { return retval; } + if (retval != RIG_OK) { RETURNFUNC( retval; )} retval = read_string(&rs->rigport, levelbuf, sizeof(levelbuf), NULL, 0); @@ -2229,7 +2228,7 @@ static int kenwood_get_micgain_minmax(RIG *rig, int *micgain_now, { rig_debug(RIG_DEBUG_ERR, "%s: expected 19, got %d in '%s'\n", __func__, retval, levelbuf); - return -RIG_EPROTO; + RETURNFUNC( -RIG_EPROTO); } n = sscanf(levelbuf, "MG%d;MG%d;MG%d", micgain_now, micgain_min, micgain_max); @@ -2238,19 +2237,19 @@ static int kenwood_get_micgain_minmax(RIG *rig, int *micgain_now, { rig_debug(RIG_DEBUG_ERR, "%s: count not parse 3 values from '%s'\n", __func__, levelbuf); - return -RIG_EPROTO; + RETURNFUNC( -RIG_EPROTO); } if (restore) { snprintf(levelbuf, sizeof(levelbuf), "MG%03d;", *micgain_now); retval = kenwood_transaction(rig, levelbuf, NULL, 0); - return retval; + RETURNFUNC( retval); } rig_debug(RIG_DEBUG_TRACE, "%s: returning now=%d, min=%d, max=%d\n", __func__, *micgain_now, *micgain_min, *micgain_max); - return RIG_OK; + RETURNFUNC( RIG_OK); } /* kenwood_get_power_minmax @@ -2309,12 +2308,12 @@ static int kenwood_get_power_minmax(RIG *rig, int *power_now, int *power_min, *power_now = rig->state.power_now; *power_min = rig->state.power_min; *power_max = rig->state.power_max; - return RIG_OK; + RETURNFUNC( RIG_OK); } retval = write_block(&rs->rigport, cmd, strlen(cmd)); - if (retval != RIG_OK) { return retval; } + if (retval != RIG_OK) { RETURNFUNC( retval; )} retval = read_string(&rs->rigport, levelbuf, sizeof(levelbuf), NULL, 0); @@ -2334,7 +2333,7 @@ static int kenwood_get_power_minmax(RIG *rig, int *power_now, int *power_min, rig_debug(RIG_DEBUG_ERR, "%s: expected %d, got %d in '%s'\n", __func__, expval, retval, levelbuf); - return -RIG_EPROTO; + RETURNFUNC( -RIG_EPROTO); } if (RIG_IS_TS890S) @@ -2345,7 +2344,7 @@ static int kenwood_get_power_minmax(RIG *rig, int *power_now, int *power_min, { rig_debug(RIG_DEBUG_ERR, "%s: count not parse 1 value from '%s'\n", __func__, levelbuf); - return -RIG_EPROTO; + RETURNFUNC( -RIG_EPROTO); } } else @@ -2356,14 +2355,14 @@ static int kenwood_get_power_minmax(RIG *rig, int *power_now, int *power_min, { rig_debug(RIG_DEBUG_ERR, "%s: count not parse 3 values from '%s'\n", __func__, levelbuf); - return -RIG_EPROTO; + RETURNFUNC( -RIG_EPROTO); } if (restore) // only need to restore if 3-value cmd is done { snprintf(levelbuf, sizeof(levelbuf), "PC%03d;", *power_now); retval = kenwood_transaction(rig, levelbuf, NULL, 0); - return retval; + RETURNFUNC( retval); } } @@ -2373,7 +2372,7 @@ static int kenwood_get_power_minmax(RIG *rig, int *power_now, int *power_min, rig->state.power_now = *power_now; rig->state.power_min = *power_min; rig->state.power_max = *power_max; - return RIG_OK; + RETURNFUNC( RIG_OK); } int kenwood_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) @@ -2403,7 +2402,7 @@ int kenwood_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) // Power min/max can vary so we query to find them out every time retval = kenwood_get_power_minmax(rig, &power_now, &power_min, &power_max, 0); - if (retval != RIG_OK) { return retval; } + if (retval != RIG_OK) { RETURNFUNC( retval; )} // https://github.com/Hamlib/Hamlib/issues/465 kenwood_val = val.f * power_max; @@ -2456,10 +2455,10 @@ int kenwood_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) retval = kenwood_get_micgain_minmax(rig, &micgain_now, &priv->micgain_min, &priv->micgain_max, 0); - if (retval != RIG_OK) { return retval; } + if (retval != RIG_OK) { RETURNFUNC( retval; )} } - if (val.f > 1.0 || val.f < 0) { return -RIG_EINVAL; } + if (val.f > 1.0 || val.f < 0) { RETURNFUNC( -RIG_EINVAL; )} // is micgain_min ever > 0 ?? kenwood_val = val.f * (priv->micgain_max - priv->micgain_min) + @@ -2472,7 +2471,7 @@ int kenwood_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) /* XXX check level range */ // KX2 and KX3 have range -190 to 250 - if (val.f > 1.0 || val.f < 0) { return -RIG_EINVAL; } + if (val.f > 1.0 || val.f < 0) { RETURNFUNC( -RIG_EINVAL; )} kenwood_val = val.f * 255.0; snprintf(levelbuf, sizeof(levelbuf), "RG%03d", kenwood_val); @@ -2515,7 +2514,7 @@ int kenwood_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) if (!foundit) { - return -RIG_EINVAL; + RETURNFUNC( -RIG_EINVAL); } } @@ -2544,7 +2543,7 @@ int kenwood_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) if (!foundit) { - return -RIG_EINVAL; + RETURNFUNC( -RIG_EINVAL); } } @@ -2553,7 +2552,7 @@ int kenwood_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) case RIG_LEVEL_SLOPE_HIGH: if (val.i > 20 || val.i < 0) { - return -RIG_EINVAL; + RETURNFUNC( -RIG_EINVAL); } snprintf(levelbuf, sizeof(levelbuf), "SH%02d", (val.i)); @@ -2562,7 +2561,7 @@ int kenwood_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) case RIG_LEVEL_SLOPE_LOW: if (val.i > 20 || val.i < 0) { - return -RIG_EINVAL; + RETURNFUNC( -RIG_EINVAL); } snprintf(levelbuf, sizeof(levelbuf), "SL%02d", (val.i)); @@ -2571,7 +2570,7 @@ int kenwood_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) case RIG_LEVEL_CWPITCH: if (val.i > 1000 || val.i < 400) { - return -RIG_EINVAL; + RETURNFUNC( -RIG_EINVAL); } snprintf(levelbuf, sizeof(levelbuf), "PT%02d", (val.i / 50) - 8); @@ -2580,7 +2579,7 @@ int kenwood_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) case RIG_LEVEL_KEYSPD: if (val.i > 50 || val.i < 5) { - return -RIG_EINVAL; + RETURNFUNC( -RIG_EINVAL); } snprintf(levelbuf, sizeof(levelbuf), "KS%03d", val.i); @@ -2589,10 +2588,10 @@ int kenwood_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) default: rig_debug(RIG_DEBUG_ERR, "%s: unsupported set_level %s", __func__, rig_strlevel(level)); - return -RIG_EINVAL; + RETURNFUNC( -RIG_EINVAL); } - return kenwood_transaction(rig, levelbuf, NULL, 0); + RETURNFUNC( kenwood_transaction(rig, levelbuf, NULL, 0)); } int get_kenwood_level(RIG *rig, const char *cmd, float *fval, int *ival) @@ -2606,14 +2605,14 @@ int get_kenwood_level(RIG *rig, const char *cmd, float *fval, int *ival) if (!fval && !ival) { - return -RIG_EINVAL; + RETURNFUNC( -RIG_EINVAL); } retval = kenwood_safe_transaction(rig, cmd, lvlbuf, 10, len + 3); if (retval != RIG_OK) { - return retval; + RETURNFUNC( retval); } /* 000..255 */ @@ -2623,7 +2622,7 @@ int get_kenwood_level(RIG *rig, const char *cmd, float *fval, int *ival) if (fval) { *fval = lvl / 255.0; } // our default scaling of 0-255 - return RIG_OK; + RETURNFUNC( RIG_OK); }; @@ -2643,7 +2642,7 @@ int kenwood_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) if (!val) { - return -RIG_EINVAL; + RETURNFUNC( -RIG_EINVAL); } switch (level) @@ -2666,7 +2665,7 @@ int kenwood_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) if (retval != RIG_OK) { - return retval; + RETURNFUNC( retval); } /* XXX atoi ? */ @@ -2689,7 +2688,7 @@ int kenwood_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) if (retval != RIG_OK) { - return retval; + RETURNFUNC( retval); } sscanf(lvlbuf + len, "%d", &val->i); /* rawstr */ @@ -2710,7 +2709,7 @@ int kenwood_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) if (retval != RIG_OK) { - return retval; + RETURNFUNC( retval); } sscanf(lvlbuf + 2, "%d", &lvl); @@ -2728,13 +2727,13 @@ int kenwood_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) rig_debug(RIG_DEBUG_ERR, "%s: " "unexpected att level %d\n", __func__, lvl); - return -RIG_EPROTO; + RETURNFUNC( -RIG_EPROTO); } } if (i != lvl) { - return -RIG_EINTERNAL; + RETURNFUNC( -RIG_EINTERNAL); } val->i = rig->state.attenuator[i - 1]; @@ -2747,7 +2746,7 @@ int kenwood_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) if (retval != RIG_OK) { - return retval; + RETURNFUNC( retval); } if (lvlbuf[2] == '0') @@ -2765,13 +2764,13 @@ int kenwood_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) rig_debug(RIG_DEBUG_ERR, "%s: " "unexpected preamp level %d\n", __func__, lvl); - return -RIG_EPROTO; + RETURNFUNC( -RIG_EPROTO); } } if (i != lvl) { - return -RIG_EINTERNAL; + RETURNFUNC( -RIG_EINTERNAL); } val->i = rig->state.preamp[i - 1]; @@ -2781,7 +2780,7 @@ int kenwood_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) rig_debug(RIG_DEBUG_ERR, "%s: " "unexpected preamp char '%c'\n", __func__, lvlbuf[2]); - return -RIG_EPROTO; + RETURNFUNC( -RIG_EPROTO); } break; @@ -2790,10 +2789,10 @@ int kenwood_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) // Power min/max can vary so we query to find them out every time retval = kenwood_get_power_minmax(rig, &power_now, &power_min, &power_max, 1); - if (retval != RIG_OK) { return retval; } + if (retval != RIG_OK) { RETURNFUNC( retval; )} val->f = (power_now - power_min) / (float)(power_max - power_min); - return RIG_OK; + RETURNFUNC( RIG_OK); case RIG_LEVEL_AF: @@ -2846,40 +2845,38 @@ int kenwood_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) { priv->ag_format = -1; // we'll keep trying next time rig_debug(RIG_DEBUG_WARN, "%s: Unable to set AG format?\n", __func__); - return RIG_OK; // this is non-fatal for now + RETURNFUNC( RIG_OK;) // this is non-fatal for no))w } switch (priv->ag_format) { case 0: priv->ag_format = -1; // reset to try again - return RIG_OK; + RETURNFUNC( RIG_OK); break; case 1: - return get_kenwood_level(rig, "AG", &val->f, NULL); + RETURNFUNC( get_kenwood_level(rig, "AG", &val->f, NULL)); break; case 2: - return get_kenwood_level(rig, "AG0", &val->f, NULL); + RETURNFUNC( get_kenwood_level(rig, "AG0", &val->f, NULL)); break; case 3: - return get_kenwood_level(rig, vfo == RIG_VFO_MAIN ? "AG0" : "AG1", &val->f, - NULL); + RETURNFUNC( get_kenwood_level(rig, vfo == RIG_VFO_MAIN ? "AG0" : "AG1", &val->f, NULL)); break; default: rig_debug(RIG_DEBUG_WARN, "%s: Invalid ag_format=%d?\n", __func__, priv->ag_format); - return -RIG_EPROTO; + RETURNFUNC( -RIG_EPROTO); } case RIG_LEVEL_RF: - return get_kenwood_level(rig, "RG", &val->f, NULL); + RETURNFUNC( get_kenwood_level(rig, "RG", &val->f, NULL)); + - case RIG_LEVEL_SQL: - return get_kenwood_level(rig, "SQ", &val->f, NULL); case RIG_LEVEL_MICGAIN: { @@ -2890,7 +2887,7 @@ int kenwood_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) retval = kenwood_get_micgain_minmax(rig, &micgain_now, &priv->micgain_min, &priv->micgain_max, 1); - if (retval != RIG_OK) { return retval; } + if (retval != RIG_OK) { RETURNFUNC( retval; )} } rig_debug(RIG_DEBUG_TRACE, "%s: micgain_min=%d, micgain_max=%d\n", __func__, @@ -2901,12 +2898,12 @@ int kenwood_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) if (ret != RIG_OK) { rig_debug(RIG_DEBUG_ERR, "%s: Error getting MICGAIN\n", __func__); - return ret; + RETURNFUNC( ret); } val->f = (val->i - priv->micgain_min) / (float)(priv->micgain_max - priv->micgain_min); - return RIG_OK; + RETURNFUNC( RIG_OK); } case RIG_LEVEL_AGC: @@ -2918,14 +2915,14 @@ int kenwood_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) else if (agclevel < 170) { val->i = 2; } else if (agclevel <= 255) { val->i = 3; } - return ret; + RETURNFUNC( ret); case RIG_LEVEL_SLOPE_LOW: retval = kenwood_transaction(rig, "SL", lvlbuf, sizeof(lvlbuf)); if (retval != RIG_OK) { - return retval; + RETURNFUNC( retval); } val->i = atoi(&lvlbuf[2]); @@ -2936,7 +2933,7 @@ int kenwood_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) if (retval != RIG_OK) { - return retval; + RETURNFUNC( retval); } val->i = atoi(&lvlbuf[2]); @@ -2947,7 +2944,7 @@ int kenwood_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) if (retval != RIG_OK) { - return retval; + RETURNFUNC( retval); } sscanf(lvlbuf + 2, "%d", &val->i); @@ -2959,7 +2956,7 @@ int kenwood_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) if (retval != RIG_OK) { - return retval; + RETURNFUNC( retval); } sscanf(lvlbuf + 2, "%d", &val->i); @@ -2974,15 +2971,15 @@ int kenwood_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) case RIG_LEVEL_COMP: case RIG_LEVEL_BKINDL: case RIG_LEVEL_BALANCE: - return -RIG_ENIMPL; + RETURNFUNC( -RIG_ENIMPL); default: rig_debug(RIG_DEBUG_ERR, "%s: unsupported get_level %s", __func__, rig_strlevel(level)); - return -RIG_EINVAL; + RETURNFUNC( -RIG_EINVAL); } - return RIG_OK; + RETURNFUNC( RIG_OK); } int kenwood_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) @@ -3011,7 +3008,7 @@ int kenwood_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) default: rig_debug(RIG_DEBUG_ERR, "%s: expected 0,1, or 2 and got %d\n", __func__, status); - return -RIG_EINVAL; + RETURNFUNC( -RIG_EINVAL); } } else @@ -3019,11 +3016,11 @@ int kenwood_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) snprintf(buf, sizeof(buf), "NB%c", (status == 0) ? '0' : '1'); } - return kenwood_transaction(rig, buf, NULL, 0); + RETURNFUNC( kenwood_transaction(rig, buf, NULL, 0)); case RIG_FUNC_ABM: snprintf(buf, sizeof(buf), "AM%c", (status == 0) ? '0' : '1'); - return kenwood_transaction(rig, buf, NULL, 0); + RETURNFUNC( kenwood_transaction(rig, buf, NULL, 0)); case RIG_FUNC_COMP: if (RIG_IS_TS890S) @@ -3035,23 +3032,23 @@ int kenwood_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) snprintf(buf, sizeof(buf), "PR%c", (status == 0) ? '0' : '1'); } - return kenwood_transaction(rig, buf, NULL, 0); + RETURNFUNC( kenwood_transaction(rig, buf, NULL, 0)); case RIG_FUNC_TONE: snprintf(buf, sizeof(buf), "TO%c", (status == 0) ? '0' : '1'); - return kenwood_transaction(rig, buf, NULL, 0); + RETURNFUNC( kenwood_transaction(rig, buf, NULL, 0)); case RIG_FUNC_TSQL: snprintf(buf, sizeof(buf), "CT%c", (status == 0) ? '0' : '1'); - return kenwood_transaction(rig, buf, NULL, 0); + RETURNFUNC( kenwood_transaction(rig, buf, NULL, 0)); case RIG_FUNC_VOX: snprintf(buf, sizeof(buf), "VX%c", (status == 0) ? '0' : '1'); - return kenwood_transaction(rig, buf, NULL, 0); + RETURNFUNC( kenwood_transaction(rig, buf, NULL, 0)); case RIG_FUNC_FAGC: snprintf(buf, sizeof(buf), "GT00%c", (status == 0) ? '4' : '2'); - return kenwood_transaction(rig, buf, NULL, 0); + RETURNFUNC( kenwood_transaction(rig, buf, NULL, 0)); case RIG_FUNC_NR: if (RIG_IS_TS890S) @@ -3067,42 +3064,42 @@ int kenwood_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) snprintf(buf, sizeof(buf), "NR%c", (status == 0) ? '0' : '1'); } - return kenwood_transaction(rig, buf, NULL, 0); + RETURNFUNC( kenwood_transaction(rig, buf, NULL, 0)); case RIG_FUNC_BC: snprintf(buf, sizeof(buf), "BC%c", (status == 0) ? '0' : '1'); - return kenwood_transaction(rig, buf, NULL, 0); + RETURNFUNC( kenwood_transaction(rig, buf, NULL, 0)); case RIG_FUNC_BC2: snprintf(buf, sizeof(buf), "BC%c", (status == 0) ? '0' : '2'); - return kenwood_transaction(rig, buf, NULL, 0); + RETURNFUNC( kenwood_transaction(rig, buf, NULL, 0)); case RIG_FUNC_ANF: snprintf(buf, sizeof(buf), "NT%c", (status == 0) ? '0' : '1'); - return kenwood_transaction(rig, buf, NULL, 0); + RETURNFUNC( kenwood_transaction(rig, buf, NULL, 0)); case RIG_FUNC_LOCK: snprintf(buf, sizeof(buf), "LK%c", (status == 0) ? '0' : '1'); - return kenwood_transaction(rig, buf, NULL, 0); + RETURNFUNC( kenwood_transaction(rig, buf, NULL, 0)); case RIG_FUNC_AIP: snprintf(buf, sizeof(buf), "MX%c", (statu... [truncated message content] |
From: Nate B. <n0...@us...> - 2021-02-14 20:36:44
|
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 779a00591cc879c4040a8d6039862416487b85ff (commit) via 3602c326cdaf90a1bc4eeeb1e03d629e74dbd2b4 (commit) via bbb4354f2be8f9559f933516661b9e1bd43d1cef (commit) from f81d0ca96e6302fe063c5d55221db22ec9b45c44 (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 779a00591cc879c4040a8d6039862416487b85ff Merge: f81d0ca9 3602c326 Author: Nate Bargmann <n0...@n0...> Date: Sun Feb 14 14:34:18 2021 -0600 Merge pull request #547 from N0NB/doxygen_work Doxygen work commit 3602c326cdaf90a1bc4eeeb1e03d629e74dbd2b4 Author: Nate Bargmann <n0...@n0...> Date: Sun Feb 14 14:07:11 2021 -0600 Include Windows build info and scripts to Doxygen Add these files as part of the Doxygen generated documentation. diff --git a/doc/hamlib.cfg.in b/doc/hamlib.cfg.in index 746d02ba..9bca92e3 100644 --- a/doc/hamlib.cfg.in +++ b/doc/hamlib.cfg.in @@ -18,8 +18,8 @@ MAN_EXTENSION = .3 CASE_SENSE_NAMES = YES FULL_PATH_NAMES = NO INPUT = @top_srcdir@/doc/index.doxygen \ - @top_srcdir@/include/hamlib/ \ - @top_srcdir@/src/ + @top_srcdir@/include/hamlib/ \ + @top_srcdir@/src/ EXCLUDE = @top_srcdir@/src/amp_conf.h \ @top_srcdir@/include/hamlib/ampclass.h \ @@ -28,7 +28,11 @@ EXCLUDE = @top_srcdir@/src/amp_conf.h \ INCLUDE_PATH = @top_srcdir@/include EXAMPLE_PATH = @top_srcdir@/tests/testrig.c \ - @top_srcdir@ + @top_srcdir@ \ + @top_srcdir@/scripts/README.build-Windows \ + @top_srcdir@/scripts/build-w32.sh \ + @top_srcdir@/scripts/build-w64.sh + QUIET = YES diff --git a/doc/index.doxygen b/doc/index.doxygen index b464c99f..34c9c69c 100644 --- a/doc/index.doxygen +++ b/doc/index.doxygen @@ -10,7 +10,7 @@ Stéphane Fillod, F8CFE, and Frank Singleton, VK3FCS and the Hamlib Group This document describes the Hamlib library Application Programming Interface (API) for this distribution. -We attempt to document the complete API of the core modules of Hamlib, i.e., +We attempt to document the complete API of the core modules of Hamlib, i.e. the API seen by end-user application developers. You may navigate the documentation through the tabs at the top of this page. @@ -21,9 +21,9 @@ Please report any problems to ham...@li.... These text files are distributed with the Hamlib package. Readme files: \subpage Rdme "General"; - \subpage Rdmebeta "Beta tester"; +\subpage Rdmebeta "Beta Tester"; \subpage Rdmedevel "Developer"; -\subpage Rdmewin32 "Win32" +\subpage Rdmewin "MS Windows" Other files: \subpage INSTALL; \subpage AUTHORS; @@ -33,14 +33,13 @@ Other files: \subpage INSTALL; \subpage NEWS; \subpage PLAN; \subpage THANKS; -\subpage TODO \section lnks Internet links -\li http://www.hamlib.org -- project Wiki, including list of supported rigs. -\li http://sourceforge.net/projects/hamlib/ -- SourceForge.net project page. -\li http://hamlib.git.sourceforge.net/git/gitweb-index.cgi -- Git repository via Web -\li http://hamlib.svn.sourceforge.net/viewvc/hamlib/ -- SVN repository via Web +\li http://hamlib.org — Main project with links to releases, Wiki, and documentation including list of supported equipment. +\li https://github.com/Hamlib/Hamlib — GitHub repository via Web interface. +\li https://sourceforge.net/projects/hamlib/ — SourceForge.net project page. +\li https://sourceforge.net/p/hamlib/code/ — SourceForge Git repository via Web interface. \section slic Documentation License @@ -65,8 +64,16 @@ of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. /*! \page Rdmedevel README.developer \verbinclude README.developer */ -/*! \page Rdmewin32 README.win32 -\verbinclude README.win32 +/*! \page Rdmewin Cross-compiling Hamlib on Linux for MS Windows +This page contains the `scripts/README.build-Windows` instructions and the +`scripts/build-w32.sh` file that describe cross-compiling Hamlib for MS +Windows 32 bit on Debian GNU/Linux. +\section Build README.build-Windows +\verbinclude README.build-Windows +\subsection W32 The build-w32.sh script +\verbinclude build-w32.sh +\subsection W64 The build-w64.sh script +\verbinclude build-w64.sh */ /*! \page INSTALL INSTALL \verbinclude INSTALL @@ -92,14 +99,11 @@ of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. /*! \page THANKS THANKS \verbinclude THANKS */ -/*! \page TODO TO DO -\verbinclude TODO -*/ /*! Define groups for Doxygen - * \defgroup rig Rig (transceiver) API - * \defgroup rotator Rotator API - * \defgroup utilities Utility Routines API - * \defgroup rig_internal Rig Internal API - * \defgroup amplifier Amplifier API + * \defgroup rig Rig (transceiver) API + * \defgroup rotator Rotator API + * \defgroup utilities Utility Routines API + * \defgroup rig_internal Rig Internal API + * \defgroup amplifier Amplifier API */ commit bbb4354f2be8f9559f933516661b9e1bd43d1cef Author: Nate Bargmann <n0...@n0...> Date: Sun Feb 14 13:38:15 2021 -0600 Update the Windows build scripts and README Attempt to make these a bit more readable for future inclusion into the Doxygen generated documentation. diff --git a/scripts/README.build-Windows b/scripts/README.build-Windows index 9385a564..4369976e 100644 --- a/scripts/README.build-Windows +++ b/scripts/README.build-Windows @@ -8,30 +8,30 @@ with MS VC++. Prerequisites ============= -In these steps the release or daily snapshot tarball is unpacked in ~/builds -for the Windows build and all operations are done from there unless -otherwise noted. +In these steps the release or daily snapshot tarball is unpacked in +$HOME/builds for the Windows build and all operations are done from there +unless otherwise noted. -Under Linux you need at least the mingw-w64 package to cross-compile it, zip -to create the archive, the tofrodos or dos2unix package installed to convert -to DOS text format, and Wine plus the free MVC++Toolkit available from: +Under Linux you need at least the following packages: -http://uploading.com/files/HNH73WB3/VCToolkitSetup%28v1.01%29%282004.07.06%29.zip.html +mingw-w64 cross-compiler +zip create the archive +tofrodos convert to DOS text format (CR/LF) +groff convert nroff manual pages to HTML -to create the Windows .LIB file (unzip and then install it with Wine in the -usual way). +On Debian 8 (Jessie) and later versions the mingw-w64 package works and is +being used to build the daily Windows 32/64 snapshots and stable releases. +The release and daily snapshots are built in a Debian 10 (Buster) virtual +machine. -On Debian Jesse the mingw-w64 package works and is being used to build -the daily Windows 32/64 snapshots and releases. - -Finally, the Windows version of libusb 1.0 must be available for the USB backends -to be built. Download the latest libusb-1.0 from: +Finally, the Windows version of libusb 1.0 must be available for the USB +backends to be built. Download the latest libusb-1.0 from: https://sourceforge.net/projects/libusb/files/libusb-1.0/ -:nd unzip the archive in ~/builds +and unzip the archive in $HOME/builds. -Libusb 1.0.20 is known to work. Presumably any 1.X.X version should work. +libusb 1.0.20 is known to work. Presumably, any 1.X.X version should work. Several variables may need to be set differently at the top of the script file depending on your system. @@ -40,28 +40,27 @@ The script now relies on a pair of environment variables to locate the needed libusb files. The script generates HTML documents for the included .EXE files using groff -to convert the nroff formatted man pages. On Debian and derivatives, the groff -package is likely already installed. +to convert the nroff formatted man pages. Build for Windows 32/64, cross-compile on Linux: ================================================ -Extract the Hamlib tarball into ~/builds (if you prefer another directory +Extract the Hamlib tarball into $HOME/builds (if you prefer another directory be sure to edit the BUILD_DIR variable in the build-w[32|64].sh script): - $ tar xvfz ~/Downloads/hamlib-3.3~git-???????-20180527.tar.gz + $ tar xvfz $HOME/Downloads/hamlib-4.2~git-???????-20210214.tar.gz -Invoke the build-w[32|64].sh script (it requires a Bash shell) with the -name of the directory/Hamlib version to build (you need not cd into the hamlib -directory, although it won't hurt. The build-w[32|64].sh script uses absolute -paths): +Invoke the build-w[32|64].sh script (either requires a Bourne compatible +shell, e.g. bash, dash, etc.) with the name of the directory/Hamlib version to +build (you need not cd into the hamlib directory, although it won't hurt. The +build-w[32|64].sh script uses absolute paths): - $ build-w32.sh hamlib-3.3~git + $ build-w32.sh hamlib-4.2~git or: - $ build-w64.sh hamlib-3.3~git + $ build-w64.sh hamlib-4.2~git Release Info diff --git a/scripts/build-w32.sh b/scripts/build-w32.sh index 5e98d3fb..0f60eedc 100755 --- a/scripts/build-w32.sh +++ b/scripts/build-w32.sh @@ -2,11 +2,10 @@ # Builds Hamlib 4.x W32 binary distribution. -# A script to build a set of W32 binary DLLs from a Hamlib tarball. This -# script assumes that the Hamlib tarball has been extracted to the directory -# specified in $BUILD_DIR and that libusb-1.x.y has also been extracted to -# $BUILD_DIR. The MS VC++ Toolkit must also be installed and working with -# Wine. +# A script to build a set of W32 binary DLLs and executables from a Hamlib +# source tarball. This script assumes that the Hamlib source tarball has been +# extracted to the directory specified in $BUILD_DIR and that libusb-1.x.y has +# also been extracted to $BUILD_DIR. # See README.build-Windows for complete details. @@ -29,7 +28,8 @@ EX_NOINPUT=66 # Pass name of Hamlib archive extracted in $BUILD_DIR -if [ $# -ne 1 ]; then +if test $# -ne 1 +then echo echo "Usage: $(basename $0) hamlib-version" echo "See README.build-Windows for more information." @@ -39,7 +39,8 @@ if [ $# -ne 1 ]; then fi # Make sure the Hamlib archive is where we expect -if [ -d ${BUILD_DIR}/$1 ]; then +if test -d ${BUILD_DIR}/$1 +then echo echo "Building W32 binaries in ${BUILD_DIR}/$1" echo @@ -196,9 +197,7 @@ NOTE: feedback is requested on the previous two command examples! The published Hamlib API may be found at: -http://hamlib.sourceforge.net/manuals/3.0.1/index.html - -(The 4.0 API/ABI is changed and new documentation will be forthcoming.) +http://hamlib.sourceforge.net/manuals/4.1/index.html Thank You! @@ -229,26 +228,35 @@ END_OF_README make -j 4 install mkdir -p ${ZIP_DIR}/bin ${ZIP_DIR}/lib/msvc ${ZIP_DIR}/lib/gcc ${ZIP_DIR}/include ${ZIP_DIR}/doc -cp -a src/libhamlib.def ${ZIP_DIR}/lib/msvc/libhamlib-4.def; todos ${ZIP_DIR}/lib/msvc/libhamlib-4.def -cp -a ${INST_DIR}/include/hamlib ${ZIP_DIR}/include/.; todos ${ZIP_DIR}/include/hamlib/*.h +cp -a src/libhamlib.def ${ZIP_DIR}/lib/msvc/libhamlib-4.def +todos ${ZIP_DIR}/lib/msvc/libhamlib-4.def +cp -a ${INST_DIR}/include/hamlib ${ZIP_DIR}/include/. +todos ${ZIP_DIR}/include/hamlib/*.h # C++ binding is useless on w32 because of ABI -for f in *class.h ; do \ +for f in *class.h +do rm ${ZIP_DIR}/include/hamlib/${f} done -for f in AUTHORS ChangeLog COPYING COPYING.LIB LICENSE README README.betatester README.w32-bin THANKS ; do \ - cp -a ${f} ${ZIP_DIR}/${f}.txt ; todos ${ZIP_DIR}/${f}.txt ; done +for f in AUTHORS ChangeLog COPYING COPYING.LIB LICENSE README README.betatester README.w32-bin THANKS +do + cp -a ${f} ${ZIP_DIR}/${f}.txt + todos ${ZIP_DIR}/${f}.txt +done # Generate HTML documents from nroff formatted man files -for f in doc/man1/*.1 doc/man7/*.7; do \ +for f in doc/man1/*.1 doc/man7/*.7 +do /usr/bin/groff -mandoc -Thtml >${f}.html ${f} - cp -a ${f}.html ${ZIP_DIR}/doc/. ; done + cp -a ${f}.html ${ZIP_DIR}/doc/. +done cd ${BUILD_DIR}/$1 # Copy build files into specific locations for Zip file -for f in *.exe ; do \ +for f in *.exe +do cp -a ${INST_DIR}/bin/${f} ${ZIP_DIR}/bin/. done @@ -264,13 +272,15 @@ cp -a ${LIBUSB_1_0_BIN_PATH}/MinGW32/dll/libusb-1.0.dll ${ZIP_DIR}/bin/libusb-1. # Required for MinGW with GCC 6.3 (Debian 9) FILE="/usr/lib/gcc/i686-w64-mingw32/6.3-posix/libgcc_s_sjlj-1.dll" -if test -f "$FILE"; then +if test -f "$FILE" +then cp -a ${FILE} ${ZIP_DIR}/bin/. fi # Required for MinGW with GCC 8.3 (Debian 10) FILE="/usr/lib/gcc/i686-w64-mingw32/8.3-posix/libgcc_s_sjlj-1.dll" -if test -f "$FILE"; then +if test -f "$FILE" +then cp -a ${FILE} ${ZIP_DIR}/bin/. fi diff --git a/scripts/build-w64.sh b/scripts/build-w64.sh index 06d02c0a..9567414e 100755 --- a/scripts/build-w64.sh +++ b/scripts/build-w64.sh @@ -2,11 +2,10 @@ # Builds Hamlib 4.x W64 binary distribution. -# A script to build a set of W64 binary DLLs from a Hamlib tarball. This -# script assumes that the Hamlib tarball has been extracted to the directory -# specified in $BUILD_DIR and that libusb-1.x.y has also been extracted to -# $BUILD_DIR. The MS VC++ Toolkit must also be installed and working with -# Wine. +# A script to build a set of W64 binary DLLs and executables from a Hamlib +# source tarball. This script assumes that the Hamlib source tarball has been +# extracted to the directory specified in $BUILD_DIR and that libusb-1.x.y has +# also been extracted to $BUILD_DIR. # See README.build-Windows for complete details. @@ -29,7 +28,8 @@ EX_NOINPUT=66 # Pass name of Hamlib archive extracted in $BUILD_DIR -if [ $# -ne 1 ]; then +if test $# -ne 1 +then echo echo "Usage: $(basename $0) hamlib-version" echo "See README.build-Windows for more information." @@ -39,7 +39,8 @@ if [ $# -ne 1 ]; then fi # Make sure the Hamlib archive is where we expect -if [ -d ${BUILD_DIR}/$1 ]; then +if test -d ${BUILD_DIR}/$1 +then echo echo "Building W64 binaries in ${BUILD_DIR}/$1" echo @@ -70,9 +71,6 @@ This ZIP archive or Windows installer contains a build of Hamlib-$RELEASE cross-compiled for MS Windows 64 bit using MinGW under Debian GNU/Linux 10 (nice, heh!). -NB: This Windows 64 bit release is EXPERIMENTAL! Please report bugs, -failures, and success to the Hamlib mailing list below. - This software is copyrighted. The library license is LGPL, and the *.EXE files licenses are GPL. Hamlib comes WITHOUT ANY WARRANTY. See the LICENSE.txt, COPYING.txt, and COPYING.LIB.txt files. @@ -200,9 +198,7 @@ not appear to be correct to generate a 64 bit libhamlib-4.lib file! The published Hamlib API may be found at: -http://hamlib.sourceforge.net/manuals/3.0.1/index.html - -(The 4.0 API/ABI is changed and new documentation will be forthcoming.) +http://hamlib.sourceforge.net/manuals/4.1/index.html Thank You! @@ -233,27 +229,35 @@ END_OF_README make -j 4 install mkdir -p ${ZIP_DIR}/bin ${ZIP_DIR}/lib/msvc ${ZIP_DIR}/lib/gcc ${ZIP_DIR}/include ${ZIP_DIR}/doc -cp -a src/libhamlib.def ${ZIP_DIR}/lib/msvc/libhamlib-4.def; todos ${ZIP_DIR}/lib/msvc/libhamlib-4.def -cp -a ${INST_DIR}/include/hamlib ${ZIP_DIR}/include/.; todos ${ZIP_DIR}/include/hamlib/*.h +cp -a src/libhamlib.def ${ZIP_DIR}/lib/msvc/libhamlib-4.def +todos ${ZIP_DIR}/lib/msvc/libhamlib-4.def +cp -a ${INST_DIR}/include/hamlib ${ZIP_DIR}/include/. +todos ${ZIP_DIR}/include/hamlib/*.h # C++ binding is useless on w64 because of ABI -for f in *class.h ; do \ +for f in *class.h +do rm ${ZIP_DIR}/include/hamlib/${f} done -for f in AUTHORS ChangeLog COPYING COPYING.LIB LICENSE README README.betatester README.w64-bin THANKS ; do \ - cp -a ${f} ${ZIP_DIR}/${f}.txt ; todos ${ZIP_DIR}/${f}.txt +for f in AUTHORS ChangeLog COPYING COPYING.LIB LICENSE README README.betatester README.w64-bin THANKS +do + cp -a ${f} ${ZIP_DIR}/${f}.txt + todos ${ZIP_DIR}/${f}.txt done # Generate HTML documents from nroff formatted man files -for f in doc/man1/*.1 doc/man7/*.7 ; do \ +for f in doc/man1/*.1 doc/man7/*.7 +do /usr/bin/groff -mandoc -Thtml >${f}.html ${f} - cp -a ${f}.html ${ZIP_DIR}/doc/. ; done + cp -a ${f}.html ${ZIP_DIR}/doc/. +done cd ${BUILD_DIR}/$1 # Copy build files into specific locations for Zip file -for f in *.exe ; do \ +for f in *.exe +do cp -a ${INST_DIR}/bin/${f} ${ZIP_DIR}/bin/. done @@ -269,13 +273,15 @@ cp -a ${LIBUSB_1_0_BIN_PATH}/MinGW64/dll/libusb-1.0.dll ${ZIP_DIR}/bin/libusb-1. # Required for MinGW with GCC 6.3 (Debian 9) FILE="/usr/lib/gcc/i686-w64-mingw32/6.3-posix/libgcc_s_sjlj-1.dll" -if test -f "$FILE"; then +if test -f "$FILE" +then cp -a ${FILE} ${ZIP_DIR}/bin/. fi # Required for MinGW with GCC 8.3 (Debian 10) FILE="/usr/lib/gcc/i686-w64-mingw32/8.3-posix/libgcc_s_sjlj-1.dll" -if test -f "$FILE"; then +if test -f "$FILE" +then cp -a ${FILE} ${ZIP_DIR}/bin/. fi ----------------------------------------------------------------------- Summary of changes: doc/hamlib.cfg.in | 10 ++++++--- doc/index.doxygen | 40 +++++++++++++++++++--------------- scripts/README.build-Windows | 51 +++++++++++++++++++++---------------------- scripts/build-w32.sh | 50 +++++++++++++++++++++++++----------------- scripts/build-w64.sh | 52 ++++++++++++++++++++++++-------------------- 5 files changed, 113 insertions(+), 90 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Nate B. <n0...@us...> - 2021-02-14 19:37:08
|
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 f81d0ca96e6302fe063c5d55221db22ec9b45c44 (commit) via bcc603a70edcf45ad060244dc4ad31a3151febde (commit) via 4b5239c6f9c6aad5e90b60bc1a09fde27ec84b88 (commit) via 660fd9496263abe5a663dae7496a6efee3a002ed (commit) from 0335498edc98dd78d6eb8b5dc79ad8a4fe227781 (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 f81d0ca96e6302fe063c5d55221db22ec9b45c44 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Feb 14 07:37:02 2021 -0600 Add info for set_ant diff --git a/doc/man1/rigctl.1 b/doc/man1/rigctl.1 index fedc9fcd..aff36b53 100644 --- a/doc/man1/rigctl.1 +++ b/doc/man1/rigctl.1 @@ -671,15 +671,15 @@ Number is 1-based antenna# (\(oq1\(cq, \(oq2\(cq, \(oq3\(cq, ...). .IP Option depends on rig..for Icom it probably sets the Tx & Rx antennas as in the IC-7851. See your manual for rig specific option values. Most rigs don't care about the option. .IP -For the IC-7851 (and perhaps others) it means this: +For the IC-7851, FTDX3000 (and perhaps others) it means this: .IP .in +4n .EX 1 = TX/RX = ANT1 2 = TX/RX = ANT2 3 = TX/RX = ANT3 -4 = TX/RX = ANT1/ANT4 -5 = TX/RX = ANT2/ANT4 +4 = TX/RX = ANT1/ANT4 or ANT1/ANT3 +5 = TX/RX = ANT2/ANT4 or ANT2/ANT3 6 = TX/RX = ANT3/ANT4 .EE .in commit bcc603a70edcf45ad060244dc4ad31a3151febde Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Feb 13 23:04:28 2021 -0600 Add set_ant to FT3000 for TRX R3/1 R3/2 modes https://github.com/Hamlib/Hamlib/issues/510 diff --git a/rigs/yaesu/ft3000.c b/rigs/yaesu/ft3000.c index c6575cfa..a3d90b72 100644 --- a/rigs/yaesu/ft3000.c +++ b/rigs/yaesu/ft3000.c @@ -85,6 +85,36 @@ int ftdx3000_ext_tokens[] = TOK_ROOFING_FILTER, TOK_BACKEND_NONE }; +int ft3000_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option) +{ + char *cmd; + int err; + struct newcat_priv_data *priv = (struct newcat_priv_data *)rig->state.priv; + + ENTERFUNC; + switch (ant) + { + case 3: + cmd = "EX0320"; // TRX ANT3 + break; + case 4: + cmd = "EX0321"; // R3/1 ANT1/ANT3 + break; + case 5: + cmd = "EX0322"; // RE/2 ANT2/ANT3 + break; + default: + rig_debug(RIG_DEBUG_ERR, "%s: expected 3,4,5 got %d\n", __func__, ant); + RETURNFUNC(-RIG_EINVAL); + } + snprintf(priv->cmd_str, sizeof(priv->cmd_str), "%s", cmd); + if (RIG_OK != (err = newcat_get_cmd(rig))) + { + RETURNFUNC(err); + } + RETURNFUNC(RIG_OK); +} + int ft3000_get_ant(RIG *rig, vfo_t vfo, ant_t dummy, value_t *option, ant_t *ant_curr, ant_t *ant_tx, ant_t *ant_rx) { @@ -120,13 +150,13 @@ int ft3000_get_ant(RIG *rig, vfo_t vfo, ant_t dummy, value_t *option, break; default: rig_debug(RIG_DEBUG_ERR, "%s: unknown antenna=%c\n", __func__, c); - return -RIG_EPROTO; + RETURNFUNC(-RIG_EPROTO); } } *ant_curr = *ant_tx; // current points to tx antenna - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -275,7 +305,7 @@ const struct rig_caps ftdx3000_caps = .get_rit = newcat_get_rit, .set_xit = newcat_set_xit, .get_xit = newcat_get_xit, - .set_ant = newcat_set_ant, + .set_ant = ft3000_set_ant, .get_ant = ft3000_get_ant, .get_func = newcat_get_func, .set_func = newcat_set_func, commit 4b5239c6f9c6aad5e90b60bc1a09fde27ec84b88 Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Feb 13 17:43:00 2021 -0600 Fix FTDX3000 get_ant function -- returns TX antenna for AntCurr AntCurr: ANT2 Option: 0 AntTx: ANT2 AntRx: ANT3 https://github.com/Hamlib/Hamlib/issues/510 diff --git a/rigs/yaesu/ft3000.c b/rigs/yaesu/ft3000.c index 1b0197e6..c6575cfa 100644 --- a/rigs/yaesu/ft3000.c +++ b/rigs/yaesu/ft3000.c @@ -30,6 +30,8 @@ #endif #include "hamlib/rig.h" +#include "misc.h" +#include "newcat.h" #include "bandplan.h" #include "newcat.h" #include "ft5000.h" @@ -83,6 +85,51 @@ int ftdx3000_ext_tokens[] = TOK_ROOFING_FILTER, TOK_BACKEND_NONE }; +int ft3000_get_ant(RIG *rig, vfo_t vfo, ant_t dummy, value_t *option, + ant_t *ant_curr, ant_t *ant_tx, ant_t *ant_rx) +{ + struct newcat_priv_data *priv = (struct newcat_priv_data *)rig->state.priv; + int err; + + ENTERFUNC; + + option->i = 0; // default to no options + + // find out what ANT3 setting + snprintf(priv->cmd_str, sizeof(priv->cmd_str), "%s", "EX032;"); + if (RIG_OK != (err = newcat_get_cmd(rig))) + { + RETURNFUNC(err); + } + + if (strlen(priv->ret_data) >= 7) + { + char c = priv->ret_data[5]; + switch(c) + { + case '0': + *ant_rx = *ant_tx = RIG_ANT_3; + break; + case '1': + *ant_rx = RIG_ANT_3; + *ant_tx = RIG_ANT_1; + break; + case '2': + *ant_rx = RIG_ANT_3; + *ant_tx = RIG_ANT_2; + break; + default: + rig_debug(RIG_DEBUG_ERR, "%s: unknown antenna=%c\n", __func__, c); + return -RIG_EPROTO; + } + } + + *ant_curr = *ant_tx; // current points to tx antenna + + return RIG_OK; +} + + /* * FTDX 3000 rig capabilities * Seems to be largely compatible with the FTDX 5000, @@ -94,7 +141,7 @@ const struct rig_caps ftdx3000_caps = RIG_MODEL(RIG_MODEL_FTDX3000), .model_name = "FTDX-3000", .mfg_name = "Yaesu", - .version = NEWCAT_VER ".2", + .version = NEWCAT_VER ".3", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -229,7 +276,7 @@ const struct rig_caps ftdx3000_caps = .set_xit = newcat_set_xit, .get_xit = newcat_get_xit, .set_ant = newcat_set_ant, - .get_ant = newcat_get_ant, + .get_ant = ft3000_get_ant, .get_func = newcat_get_func, .set_func = newcat_set_func, .get_level = newcat_get_level, @@ -260,3 +307,4 @@ const struct rig_caps ftdx3000_caps = .get_ext_level = newcat_get_ext_level, }; + commit 660fd9496263abe5a663dae7496a6efee3a002ed Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Feb 12 16:37:17 2021 -0600 Change all icom rigs to watts for RIG_LEVEL_RFPOWER_METER_WATTS Divide by 100 for old power call diff --git a/rigs/icom/ic7000.c b/rigs/icom/ic7000.c index aef25f6a..a14eaf74 100644 --- a/rigs/icom/ic7000.c +++ b/rigs/icom/ic7000.c @@ -95,13 +95,24 @@ { 120, 1.0f } \ } } -#define IC7000_RFPOWER_METER_CAL { 3, \ +#define IC7000_RFPOWER_METER_CAL { 13, \ { \ { 0, 0.0f }, \ - { 143, 0.5f }, \ - { 213, 1.0f } \ + { 21, 5.0f }, \ + { 43, 10.0f }, \ + { 65, 15.0f }, \ + { 83, 20.0f }, \ + { 95, 25.0f }, \ + { 105, 30.0f }, \ + { 114, 35.0f }, \ + { 124, 40.0f }, \ + { 143, 50.0f }, \ + { 183, 75.0f }, \ + { 213, 100.0f }, \ + { 255, 120.0f } \ } } + #define IC7000_COMP_METER_CAL { 3, \ { \ { 0, 0.0f }, \ diff --git a/rigs/icom/ic7100.c b/rigs/icom/ic7100.c index 50032220..a1e1f617 100644 --- a/rigs/icom/ic7100.c +++ b/rigs/icom/ic7100.c @@ -140,13 +140,24 @@ struct cmdparams ic7100_extcmds[] = { 120, 1.0f } \ } } -#define IC7100_RFPOWER_METER_CAL { 3, \ +#define IC7100_RFPOWER_METER_CAL { 13, \ { \ { 0, 0.0f }, \ - { 143, 0.5f }, \ - { 213, 1.0f } \ + { 21, 5.0f }, \ + { 43, 10.0f }, \ + { 65, 15.0f }, \ + { 83, 20.0f }, \ + { 95, 25.0f }, \ + { 105, 30.0f }, \ + { 114, 35.0f }, \ + { 124, 40.0f }, \ + { 143, 50.0f }, \ + { 183, 75.0f }, \ + { 213, 100.0f }, \ + { 255, 120.0f } \ } } + #define IC7100_COMP_METER_CAL { 3, \ { \ { 0, 0.0f }, \ diff --git a/rigs/icom/ic7200.c b/rigs/icom/ic7200.c index 411bd5cf..f54430a6 100644 --- a/rigs/icom/ic7200.c +++ b/rigs/icom/ic7200.c @@ -84,13 +84,24 @@ { 120, 1.0f } \ } } -#define IC7200_RFPOWER_METER_CAL { 3, \ +#define IC7200_RFPOWER_METER_CAL { 13, \ { \ { 0, 0.0f }, \ - { 143, 0.5f }, \ - { 213, 1.0f } \ + { 21, 5.0f }, \ + { 43, 10.0f }, \ + { 65, 15.0f }, \ + { 83, 20.0f }, \ + { 95, 25.0f }, \ + { 105, 30.0f }, \ + { 114, 35.0f }, \ + { 124, 40.0f }, \ + { 143, 50.0f }, \ + { 183, 75.0f }, \ + { 213, 100.0f }, \ + { 255, 120.0f } \ } } + int ic7200_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val); int ic7200_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val); diff --git a/rigs/icom/ic7300.c b/rigs/icom/ic7300.c index 963093d0..c5ed85cf 100644 --- a/rigs/icom/ic7300.c +++ b/rigs/icom/ic7300.c @@ -90,11 +90,21 @@ static int ic7300_get_parm(RIG *rig, setting_t parm, value_t *val); { 120, 1.0f } \ } } -#define IC7300_RFPOWER_METER_CAL { 3, \ +#define IC7300_RFPOWER_METER_CAL { 13, \ { \ { 0, 0.0f }, \ - { 143, 0.5f }, \ - { 213, 1.0f } \ + { 21, 5.0f }, \ + { 43, 10.0f }, \ + { 65, 15.0f }, \ + { 83, 20.0f }, \ + { 95, 25.0f }, \ + { 105, 30.0f }, \ + { 114, 35.0f }, \ + { 124, 40.0f }, \ + { 143, 50.0f }, \ + { 183, 75.0f }, \ + { 213, 100.0f }, \ + { 255, 120.0f } \ } } #define IC7300_COMP_METER_CAL { 3, \ @@ -166,11 +176,21 @@ static int ic7300_get_parm(RIG *rig, setting_t parm, value_t *val); { 120, 1.0f } \ } } -#define IC9700_RFPOWER_METER_CAL { 3, \ +#define IC9700_RFPOWER_METER_CAL { 13, \ { \ { 0, 0.0f }, \ - { 143, 0.5f }, \ - { 213, 1.0f } \ + { 21, 5.0f }, \ + { 43, 10.0f }, \ + { 65, 15.0f }, \ + { 83, 20.0f }, \ + { 95, 25.0f }, \ + { 105, 30.0f }, \ + { 114, 35.0f }, \ + { 124, 40.0f }, \ + { 143, 50.0f }, \ + { 183, 75.0f }, \ + { 213, 100.0f }, \ + { 255, 120.0f } \ } } #define IC9700_COMP_METER_CAL { 3, \ @@ -281,7 +301,7 @@ const struct rig_caps ic7300_caps = RIG_MODEL(RIG_MODEL_IC7300), .model_name = "IC-7300", .mfg_name = "Icom", - .version = BACKEND_VER ".2", + .version = BACKEND_VER ".3", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -454,7 +474,7 @@ const struct rig_caps ic9700_caps = RIG_MODEL(RIG_MODEL_IC9700), .model_name = "IC-9700", .mfg_name = "Icom", - .version = BACKEND_VER ".1", + .version = BACKEND_VER ".2", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, diff --git a/rigs/icom/ic7410.c b/rigs/icom/ic7410.c index 2c42920a..d4ffdfd2 100644 --- a/rigs/icom/ic7410.c +++ b/rigs/icom/ic7410.c @@ -78,13 +78,24 @@ { 120, 1.0f } \ } } -#define IC7410_RFPOWER_METER_CAL { 3, \ +#define IC7410_RFPOWER_METER_CAL { 13, \ { \ { 0, 0.0f }, \ - { 143, 0.5f }, \ - { 213, 1.0f } \ + { 21, 5.0f }, \ + { 43, 10.0f }, \ + { 65, 15.0f }, \ + { 83, 20.0f }, \ + { 95, 25.0f }, \ + { 105, 30.0f }, \ + { 114, 35.0f }, \ + { 124, 40.0f }, \ + { 143, 50.0f }, \ + { 183, 75.0f }, \ + { 213, 100.0f }, \ + { 255, 120.0f } \ } } + struct cmdparams ic7410_extcmds[] = { { {.s = RIG_LEVEL_VOXDELAY}, CMD_PARAM_TYPE_LEVEL, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 1, {0x75 }, CMD_DAT_INT, 1 }, diff --git a/rigs/icom/ic756.c b/rigs/icom/ic756.c index f36bd4f7..a434f144 100644 --- a/rigs/icom/ic756.c +++ b/rigs/icom/ic756.c @@ -943,13 +943,24 @@ static const struct icom_priv_caps ic756pro3_priv_caps = { 120, 1.0f } \ } } -#define IC756PROIII_RFPOWER_METER_CAL { 3, \ +#define IC756PROIII_RFPOWER_METER_CAL { 13, \ { \ { 0, 0.0f }, \ - { 143, 0.5f }, \ - { 213, 1.0f } \ + { 21, 5.0f }, \ + { 43, 10.0f }, \ + { 65, 15.0f }, \ + { 83, 20.0f }, \ + { 95, 25.0f }, \ + { 105, 30.0f }, \ + { 114, 35.0f }, \ + { 124, 40.0f }, \ + { 143, 50.0f }, \ + { 183, 75.0f }, \ + { 213, 100.0f }, \ + { 255, 120.0f } \ } } + #define IC756PROIII_COMP_METER_CAL { 3, \ { \ { 0, 0.0f }, \ diff --git a/rigs/icom/ic7600.c b/rigs/icom/ic7600.c index 2c33c9d8..4f3422dc 100644 --- a/rigs/icom/ic7600.c +++ b/rigs/icom/ic7600.c @@ -91,13 +91,24 @@ { 120, 1.0f } \ } } -#define IC7600_RFPOWER_METER_CAL { 3, \ +#define IC7600_RFPOWER_METER_CAL { 13, \ { \ { 0, 0.0f }, \ - { 143, 0.5f }, \ - { 213, 1.0f } \ + { 21, 5.0f }, \ + { 43, 10.0f }, \ + { 65, 15.0f }, \ + { 83, 20.0f }, \ + { 95, 25.0f }, \ + { 105, 30.0f }, \ + { 114, 35.0f }, \ + { 124, 40.0f }, \ + { 143, 50.0f }, \ + { 183, 75.0f }, \ + { 213, 100.0f }, \ + { 255, 120.0f } \ } } + #define IC7600_COMP_METER_CAL { 3, \ { \ { 0, 0.0f }, \ diff --git a/rigs/icom/ic7610.c b/rigs/icom/ic7610.c index dbb5be53..f26b3b67 100644 --- a/rigs/icom/ic7610.c +++ b/rigs/icom/ic7610.c @@ -92,13 +92,24 @@ { 120, 1.0f } \ } } -#define IC7610_RFPOWER_METER_CAL { 3, \ +#define IC7610_RFPOWER_METER_CAL { 13, \ { \ { 0, 0.0f }, \ - { 143, 0.5f }, \ - { 212, 1.0f } \ + { 21, 5.0f }, \ + { 43, 10.0f }, \ + { 65, 15.0f }, \ + { 83, 20.0f }, \ + { 95, 25.0f }, \ + { 105, 30.0f }, \ + { 114, 35.0f }, \ + { 124, 40.0f }, \ + { 143, 50.0f }, \ + { 183, 75.0f }, \ + { 213, 100.0f }, \ + { 255, 120.0f } \ } } + #define IC7610_COMP_METER_CAL { 3, \ { \ { 0, 0.0f }, \ diff --git a/rigs/icom/ic7700.c b/rigs/icom/ic7700.c index 9e62eb0b..0a148453 100644 --- a/rigs/icom/ic7700.c +++ b/rigs/icom/ic7700.c @@ -76,13 +76,24 @@ { 120, 1.0f } \ } } -#define IC7700_RFPOWER_METER_CAL { 3, \ +#define IC7700_RFPOWER_METER_CAL { 13, \ { \ { 0, 0.0f }, \ - { 143, 0.5f }, \ - { 213, 1.0f } \ + { 21, 5.0f }, \ + { 43, 10.0f }, \ + { 65, 15.0f }, \ + { 83, 20.0f }, \ + { 95, 25.0f }, \ + { 105, 30.0f }, \ + { 114, 35.0f }, \ + { 124, 40.0f }, \ + { 143, 50.0f }, \ + { 183, 75.0f }, \ + { 213, 100.0f }, \ + { 255, 120.0f } \ } } + #define IC7700_COMP_METER_CAL { 3, \ { \ { 0, 0.0f }, \ diff --git a/rigs/icom/ic7800.c b/rigs/icom/ic7800.c index 715e30e1..83091b3c 100644 --- a/rigs/icom/ic7800.c +++ b/rigs/icom/ic7800.c @@ -76,13 +76,24 @@ { 120, 1.0f } \ } } -#define IC7800_RFPOWER_METER_CAL { 3, \ +#define IC7800_RFPOWER_METER_CAL { 13, \ { \ { 0, 0.0f }, \ - { 143, 0.5f }, \ - { 213, 1.0f } \ + { 21, 5.0f }, \ + { 43, 10.0f }, \ + { 65, 15.0f }, \ + { 83, 20.0f }, \ + { 95, 25.0f }, \ + { 105, 30.0f }, \ + { 114, 35.0f }, \ + { 124, 40.0f }, \ + { 143, 50.0f }, \ + { 183, 75.0f }, \ + { 213, 100.0f }, \ + { 255, 120.0f } \ } } + #define IC7800_COMP_METER_CAL { 3, \ { \ { 0, 0.0f }, \ diff --git a/rigs/icom/ic785x.c b/rigs/icom/ic785x.c index 3703d564..99029bb5 100644 --- a/rigs/icom/ic785x.c +++ b/rigs/icom/ic785x.c @@ -77,13 +77,24 @@ { 120, 1.0f } \ } } -#define IC785x_RFPOWER_METER_CAL { 3, \ +#define IC785x_RFPOWER_METER_CAL { 13, \ { \ { 0, 0.0f }, \ - { 143, 0.5f }, \ - { 213, 1.0f } \ + { 21, 5.0f }, \ + { 43, 10.0f }, \ + { 65, 15.0f }, \ + { 83, 20.0f }, \ + { 95, 25.0f }, \ + { 105, 30.0f }, \ + { 114, 35.0f }, \ + { 124, 40.0f }, \ + { 143, 50.0f }, \ + { 183, 75.0f }, \ + { 213, 100.0f }, \ + { 255, 120.0f } \ } } + #define IC785x_COMP_METER_CAL { 3, \ { \ { 0, 0.0f }, \ diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 9c60086a..26b7426f 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -69,11 +69,21 @@ const cal_table_float_t icom_default_alc_cal = const cal_table_float_t icom_default_rfpower_meter_cal = { - 3, - { - {0, 0.0f}, - {143, 0.5f}, - {213, 1.0f} + 13, + { + { 0, 0.0f }, + { 21, 5.0f }, + { 43, 10.0f }, + { 65, 15.0f }, + { 83, 20.0f }, + { 95, 25.0f }, + { 105, 30.0f }, + { 114, 35.0f }, + { 124, 40.0f }, + { 143, 50.0f }, + { 183, 75.0f }, + { 213, 100.0f }, + { 255, 120.0f } } }; @@ -3089,39 +3099,32 @@ int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) break; case RIG_LEVEL_RFPOWER_METER: + // rig table in Watts needs to be divided by 100 if (rig->caps->rfpower_meter_cal.size == 0) { val->f = - rig_raw2val_float(icom_val, &icom_default_rfpower_meter_cal); + rig_raw2val_float(icom_val, &icom_default_rfpower_meter_cal) * 0.01; } else { val->f = - rig_raw2val_float(icom_val, &rig->caps->rfpower_meter_cal); + rig_raw2val_float(icom_val, &rig->caps->rfpower_meter_cal) * 0.01; } break; case RIG_LEVEL_RFPOWER_METER_WATTS: - // eventually we should change all the Icom tables to watts + // All Icom backends should be in Watts now if (rig->caps->rfpower_meter_cal.size == 0) { val->f = - rig_raw2val_float(icom_val, &icom_default_rfpower_meter_cal) * 100; + rig_raw2val_float(icom_val, &icom_default_rfpower_meter_cal); } else { - float scale = 100; - - if (rig->caps->rig_model == RIG_MODEL_IC705 - || rig->caps->rig_model == RIG_MODEL_IC703) - { - scale = 10; - } - val->f = - rig_raw2val_float(icom_val, &rig->caps->rfpower_meter_cal) * scale; + rig_raw2val_float(icom_val, &rig->caps->rfpower_meter_cal); } break; diff --git a/rigs/icom/icom.h b/rigs/icom/icom.h index 8e7923e3..17ecbd5b 100644 --- a/rigs/icom/icom.h +++ b/rigs/icom/icom.h @@ -30,7 +30,7 @@ #include <sys/time.h> #endif -#define BACKEND_VER "20210203" +#define BACKEND_VER "20210212" /* * defines used by comp_cal_str in rig.c ----------------------------------------------------------------------- Summary of changes: doc/man1/rigctl.1 | 6 ++-- rigs/icom/ic7000.c | 17 +++++++++-- rigs/icom/ic7100.c | 17 +++++++++-- rigs/icom/ic7200.c | 17 +++++++++-- rigs/icom/ic7300.c | 36 ++++++++++++++++++----- rigs/icom/ic7410.c | 17 +++++++++-- rigs/icom/ic756.c | 17 +++++++++-- rigs/icom/ic7600.c | 17 +++++++++-- rigs/icom/ic7610.c | 17 +++++++++-- rigs/icom/ic7700.c | 17 +++++++++-- rigs/icom/ic7800.c | 17 +++++++++-- rigs/icom/ic785x.c | 17 +++++++++-- rigs/icom/icom.c | 39 +++++++++++++------------ rigs/icom/icom.h | 2 +- rigs/yaesu/ft3000.c | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 15 files changed, 274 insertions(+), 63 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Nate B. <n0...@us...> - 2021-02-12 18:50:24
|
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 0335498edc98dd78d6eb8b5dc79ad8a4fe227781 (commit) via 2bf4a49f5da1595c71860e65be7af473de4f01b6 (commit) from 64b0b37d49f3f051cebfae059fae82f8c6f56641 (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 0335498edc98dd78d6eb8b5dc79ad8a4fe227781 Merge: 64b0b37d 2bf4a49f Author: Nate Bargmann <n0...@n0...> Date: Fri Feb 12 12:48:57 2021 -0600 Merge pull request #545 from N0NB/doxygen_work Update Doxygen comments for amplifier group commit 2bf4a49f5da1595c71860e65be7af473de4f01b6 Author: Nate Bargmann <n0...@n0...> Date: Fri Feb 12 12:46:01 2021 -0600 Update Doxygen comments for amplifier group Aim for consistency in Doxygen comments structure. diff --git a/include/hamlib/amplifier.h b/include/hamlib/amplifier.h index 067ca026..05ea5eb4 100644 --- a/include/hamlib/amplifier.h +++ b/include/hamlib/amplifier.h @@ -31,9 +31,10 @@ */ /** - * \file amplifier.h * \brief Hamlib amplifier data structures. * + * \file amplifier.h + * * This file contains the data structures and declarations for the Hamlib * amplifier Application Programming Interface (API). * @@ -51,9 +52,10 @@ struct amp_state; /** - * \typedef typedef struct amp AMP * \brief Main amplifier handle type definition. * + * \typedef typedef struct amp AMP + * * The #AMP handle is returned by amp_init() and is passed as a parameter to * every amplifier specific API call. * @@ -63,10 +65,11 @@ typedef struct amp AMP; /** - * \typedef typedef float swr_t * \brief Type definition for * <a href="https://en.wikipedia.org/wiki/Standing_wave_ratio" >SWR (Standing Wave Ratio)</a>. * + * \typedef typedef float swr_t + * * The \a swr_t type is used as a parameter for the amp_get_swr() function. * * The unit of \a swr_t is 1.0 to the maximum value reported by the amplifier's @@ -78,7 +81,6 @@ typedef float swr_t; /** - * \typedef typedef float tune_value_t * \brief Type definition for the * <a href="http://www.arrl.org/transmatch-antenna-tuner" >transmatch</a> * tuning values of @@ -86,6 +88,8 @@ typedef float swr_t; * and * <a href="https://en.wikipedia.org/wiki/Inductance" >inductance</a>. * + * \typedef typedef float tune_value_t + * * The \a tune_value_t type is used as a parameter for amp_get_level(). * * The unit of \a tune_value_t is @@ -163,8 +167,9 @@ enum amp_level_e //! @endcond /** + * \brief Amplifier capabilities. + * * \struct amp_caps - * \brief Amplifier capabilities * * The main idea of this struct is that it will be defined by the backend * amplifier driver and will remain read-only for the application. Fields @@ -248,16 +253,17 @@ struct amp_caps setting_t levels; unsigned ext_levels; //! @endcond - const struct confparams *extlevels; /*!< Extra levels structure. */ - const struct confparams *extparms; /*!< Extra parameters structure. */ + const struct confparams *extlevels; /*!< Extension levels structure. */ + const struct confparams *extparms; /*!< Extension parameters structure. */ const char *macro_name; /*!< Amplifier model macro name. */ }; /** + * \brief Amplifier state structure. + * * \struct amp_state - * \brief Amplifier state structure * * This structure contains live data, as well as a copy of capability fields * that may be updated, i.e. customized while the #AMP handle is instantiated. @@ -288,8 +294,9 @@ struct amp_state /** + * \brief Master amplifier structure. + * * \struct amp - * \brief Master amplifier structure * * Master amplifier data structure acting as the #AMP handle for the * controlled amplifier. A pointer to this structure is returned by the @@ -423,9 +430,10 @@ extern HAMLIB_EXPORT(const char *) amp_strlevel(setting_t); /** - * \def amp_debug * \brief Convenience macro for generating debugging messages. * + * \def amp_debug + * * This is an alias of the rig_debug() function call and is used in the same * manner. */ diff --git a/include/hamlib/amplist.h b/include/hamlib/amplist.h index b8d094d8..018997c7 100644 --- a/include/hamlib/amplist.h +++ b/include/hamlib/amplist.h @@ -36,21 +36,22 @@ */ /** - * \file amplist.h - * \brief Hamlib amplifier model definitions. + * \brief Hamlib amplifier model definitions. * - * This file contains amplifier model definitions for the Hamlib amplifier - * Application Programming Interface (API). Each distinct amplifier type has - * a unique model number (ID) and is used by Hamlib to identify and - * distinguish between the different hardware drivers. The exact model - * numbers can be acquired using the macros in this file. To obtain a list of - * supported amplifier branches, one can use the statically defined - * AMP_BACKEND_LIST macro. To obtain a full list of supported amplifiers - * (including each model in every branch), the foreach_opened_amp() API - * function can be used. + * \file amplist.h * - * The model number, or ID, is used to tell Hamlib which amplifier the client - * wishes to use. It is done with the amp_init() API call. + * This file contains amplifier model definitions for the Hamlib amplifier + * Application Programming Interface (API). Each distinct amplifier type has + * a unique model number (ID) and is used by Hamlib to identify and + * distinguish between the different hardware drivers. The exact model + * numbers can be acquired using the macros in this file. To obtain a list of + * supported amplifier branches, one can use the statically defined + * AMP_BACKEND_LIST macro. To obtain a full list of supported amplifiers + * (including each model in every branch), the foreach_opened_amp() API + * function can be used. + * + * The model number, or ID, is used to tell Hamlib which amplifier the client + * wishes to use. It is done with the amp_init() API call. */ @@ -63,19 +64,20 @@ */ /** - * \def AMP_MODEL_DUMMY - * \brief A macro that returns the model number for the dummy backend. + * \brief A macro that returns the model number for the dummy backend. + * + * \def AMP_MODEL_DUMMY * - * The dummy backend, as the name suggests, is a backend which performs no - * hardware operations and always behaves as one would expect. It can be - * thought of as a hardware simulator and is very useful for testing client - * applications. + * The dummy backend, as the name suggests, is a backend which performs no + * hardware operations and always behaves as one would expect. It can be + * thought of as a hardware simulator and is very useful for testing client + * applications. * - * \def AMP_MODEL_NETAMPCTL - * \brief A macro that returns the model number for the netampctl backend. + * \def AMP_MODEL_NETAMPCTL + * \brief A macro that returns the model number for the netampctl backend. * - * This backend allows use of the ampctld daemon through the normal - * Hamlib API. + * This backend allows use of the ampctld daemon through the normal + * Hamlib API. */ //! @cond Doxygen_Suppress #define AMP_DUMMY 0 @@ -90,11 +92,12 @@ */ /** - * \def AMP_MODEL_ELECRAFT_KPA1500 - * \brief A macro that returns the model number of the kpa1500 backend. + * \brief A macro that returns the model number of the kpa1500 backend. * - * The kpa1500 backend can be used with amplifiers that support the Elecraft - * KPA-1500 protocol. + * \def AMP_MODEL_ELECRAFT_KPA1500 + * + * The kpa1500 backend can be used with amplifiers that support the Elecraft + * KPA-1500 protocol. */ //! @cond Doxygen_Suppress #define AMP_ELECRAFT 2 @@ -104,8 +107,9 @@ //#define AMP_MODEL_ELECRAFT_KPA500 AMP_MAKE_MODEL(AMP_ELECRAFT, 2) /** - * \typedef typedef int amp_model_t - * \brief Convenience type definition for amplifier model. + * \brief Convenience type definition for amplifier model. + * + * \typedef typedef int amp_model_t */ typedef int amp_model_t; diff --git a/src/amp_conf.c b/src/amp_conf.c index 0d435d34..1e1390e4 100644 --- a/src/amp_conf.c +++ b/src/amp_conf.c @@ -493,19 +493,21 @@ int HAMLIB_API amp_token_foreach(AMP *amp, /** * \brief Query an amplifier configuration parameter token by its name. + * * \param amp The #AMP handle. - * \param name Configuration parameter token name (C string). + * \param name Configuration parameter token name string. * * Use this function to get a pointer to the token in the #confparams * structure. Searches the backend config params table first, then falls back * to the frontend config params table. * - * TODO: Should use Lex to speed it up, strcmp() hurts! - * - * \return A pointer to the token in the #confparams structure or NULL if #AMP - * is invalid or token not found (how can the caller know which occurred?). + * \return A pointer to the token in the #confparams structure or NULL if + * \a amp is invalid or \a token not found (how can the caller know which + * occurred?). * * \sa amp_token_lookup() + * + * TODO: Should use Lex to speed it up, strcmp() hurts! */ const struct confparams *HAMLIB_API amp_confparam_lookup(AMP *amp, const char *name) @@ -555,9 +557,11 @@ const struct confparams *HAMLIB_API amp_confparam_lookup(AMP *amp, /** - * \brief Search for the token ID associated with an amplifier configuration parameter token name. + * \brief Search for the token ID associated with an amplifier configuration + * parameter token name. + * * \param amp The #AMP handle. - * \param name Configuration parameter token name (C string). + * \param name Configuration parameter token name string. * * Searches the backend and frontend configuration parameters tables for the * token ID. @@ -585,6 +589,7 @@ token_t HAMLIB_API amp_token_lookup(AMP *amp, const char *name) /** * \brief Set an amplifier configuration parameter. + * * \param amp The #AMP handle. * \param token The token of the parameter to set. * \param val The value to set the parameter to. @@ -595,7 +600,7 @@ token_t HAMLIB_API amp_token_lookup(AMP *amp, const char *name) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The parameter was set successfully. - * \retval RIG_EINVAL The #AMP handle or token was invalid. + * \retval RIG_EINVAL \a amp or \a token was invalid. * \retval RIG_ENAVAIL amp_caps#set_conf() capability is not available. * * \sa amp_get_conf() @@ -640,17 +645,18 @@ int HAMLIB_API amp_set_conf(AMP *amp, token_t token, const char *val) /** * \brief Query the value of an amplifier configuration parameter. - * \param amp The #AMP handle. + * + * \param amp The #AMP handle. * \param token The token of the parameter to query. - * \param val The location where to store the value of configuration \a token. + * \param val The location where to store the value of the configuration \a token. * - * Retrieves the value of a configuration parameter associated with \a token. + * Retrieves the value of a configuration parameter associated with \a token. * * \return RIG_OK if the operation has been successful, otherwise a **negative * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK Querying the parameter was successful. - * \retval RIG_EINVAL The #AMP handle was invalid. + * \retval RIG_EINVAL \a amp is NULL or invalid. * \retval RIG_ENAVAIL amp_caps#get_conf() capability is not available. * * \sa amp_set_conf() diff --git a/src/amp_settings.c b/src/amp_settings.c index 97cbb954..81aeda23 100644 --- a/src/amp_settings.c +++ b/src/amp_settings.c @@ -27,14 +27,16 @@ */ /** + * \brief Amplifier function/level/parameter interface. + * * \file amp_settings.c - * \brief amplifiter func/level/parm interface + * * \author Stephane Fillod * \date 2000-2010 * \author Mikael Nousiainen * \date 2020 * - * Hamlib interface is a frontend implementing wrapper functions. + * This Hamlib interface is a frontend implementing wrapper functions. */ #ifdef HAVE_CONFIG_H @@ -49,6 +51,7 @@ /** * \brief Check retrieval ability of level settings. + * * \param amp The #AMP handle. * \param level The level settings to check. * diff --git a/src/amplifier.c b/src/amplifier.c index bf2eecf1..7d6d711e 100644 --- a/src/amplifier.c +++ b/src/amplifier.c @@ -134,17 +134,18 @@ static int remove_opened_amp(AMP *amp) #ifdef XXREMOVEDXX /** - * \brief execs cfunc() on each opened amp - * \param cfunc The function to be executed on each amp - * \param data Data pointer to be passed to cfunc() + * \brief Executess cfunc() on each #AMP handle. * - * Calls cfunc() function for each opened amp. The contents of the opened - * amp table is processed in random order according to a function pointed to - * by \a cfunc, which is called with two arguments, the first pointing to the - * #AMP handle, the second to a data pointer \a data. + * \param cfunc The function to be executed on each #AMP handle. + * \param data Data pointer to be passed to cfunc() * - * If \a data is not needed, then it can be set to NULL. The processing of - * the opened amp table is stopped when cfunc() returns 0. + * Calls cfunc() function for each #AMP handle. The contents of the opened + * #AMP table is processed in random order according to a function pointed to + * by \a cfunc, which is called with two arguments, the first pointing to the + * #AMP handle, the second to a data pointer \a data. + * + * If \a data is not needed, then it can be set to NULL. The processing of + * the opened amp table is stopped when cfunc() returns 0. * \internal * * \return always RIG_OK. @@ -169,8 +170,9 @@ int foreach_opened_amp(int (*cfunc)(AMP *, rig_ptr_t), rig_ptr_t data) /** - * \brief Allocate a new #AMP handle - * \param amp_model The amplifier model for this new handle + * \brief Allocate a new #AMP handle. + * + * \param amp_model The amplifier model for this new handle. * * Allocates a new #AMP handle and initializes the associated data * for \a amp_model (see amplist.h or `ampctl -l`). @@ -280,7 +282,8 @@ AMP *HAMLIB_API amp_init(amp_model_t amp_model) /** * \brief Open the communication channel to the amplifier. - * \param amp The #AMP handle of the amplifier to be opened + * + * \param amp The #AMP handle of the amplifier to be opened. * * Opens the communication channel to an amplifier for which the #AMP handle * has been passed. @@ -414,6 +417,7 @@ int HAMLIB_API amp_open(AMP *amp) /** * \brief Close the communication channel to the amplifier. + * * \param amp The #AMP handle of the amplifier to be closed. * * Closes the communication channel to an amplifier for which the #AMP @@ -496,6 +500,7 @@ int HAMLIB_API amp_close(AMP *amp) /** * \brief Release an #AMP handle and free associated memory. + * * \param amp The #AMP handle to be released. * * Releases an #AMP handle for which the communications channel has been @@ -541,11 +546,12 @@ int HAMLIB_API amp_cleanup(AMP *amp) /** - * \brief Reset the amplifier - * \param amp The #AMP handle + * \brief Reset the amplifier. + * + * \param amp The #AMP handle. * \param reset The reset operation to perform. * - * Perform a reset of the amplifier. + * Perform a reset of the amplifier. * * \return RIG_OK if the operation has been successful, otherwise a **negative * value** if an error occurred (in which case, cause is set appropriately). @@ -578,6 +584,7 @@ int HAMLIB_API amp_reset(AMP *amp, amp_reset_t reset) /** * \brief Query the operating frequency of the amplifier. + * * \param amp The #AMP handle. * \param freq The variable to store the operating frequency. * @@ -616,6 +623,7 @@ int HAMLIB_API amp_get_freq(AMP *amp, freq_t *freq) /** * \brief Set the operating frequency of the amplifier. + * * \param amp The #AMP handle. * \param freq The operating frequency. * @@ -655,6 +663,7 @@ int HAMLIB_API amp_set_freq(AMP *amp, freq_t freq) /** * \brief Query general information from the amplifier. + * * \param amp The #AMP handle. * * Retrieves some general information from the amplifier. This can include @@ -662,7 +671,8 @@ int HAMLIB_API amp_set_freq(AMP *amp, freq_t freq) * * \return A pointer to static memory containing an ASCII nul terminated * string (C string) if the operation has been successful, otherwise NULL if - * an error occurred or the amp_caps#get_info() capability is not available. + * \a amp is NULL or invalid or the amp_caps#get_info() capability is not + * available. */ const char *HAMLIB_API amp_get_info(AMP *amp) { @@ -684,6 +694,7 @@ const char *HAMLIB_API amp_get_info(AMP *amp) /** * \brief Query the value of a requested level. + * * \param amp The #AMP handle. * \param level The requested level. * \param val The variable to store the \a level value. @@ -718,12 +729,13 @@ int HAMLIB_API amp_get_level(AMP *amp, setting_t level, value_t *val) /** - * \brief Query the value of a requested extra level token. + * \brief Query the value of a requested extension levels token. + * * \param amp The #AMP handle. - * \param level The requested extra level token. - * \param val The variable to store the extra \a level token value. + * \param level The requested extension levels token. + * \param val The variable to store the extension \a level token value. * - * Query the \a val corresponding to the extra \a level token. + * Query the \a val corresponding to the extension \a level token. * * \return RIG_OK if the operation was successful, otherwise a **negative * value** if an error occurred (in which case, cause is set appropriately). @@ -753,7 +765,9 @@ int HAMLIB_API amp_get_ext_level(AMP *amp, token_t level, value_t *val) /** - * \brief Turn the amplifier On or Off or toggle the Standby or Operate status. + * \brief Turn the amplifier On or Off or toggle the Standby or Operate + * status. + * * \param amp The #AMP handle * \param status The #powerstat_t setting. * @@ -790,6 +804,7 @@ int HAMLIB_API amp_set_powerstat(AMP *amp, powerstat_t status) /** * \brief Query the power or standby status of the amplifier. + * * \param amp The #AMP handle. * \param status The variable to store the amplifier \a status. * diff --git a/src/extamp.c b/src/extamp.c index 078b76ea..300e3429 100644 --- a/src/extamp.c +++ b/src/extamp.c @@ -27,13 +27,16 @@ */ /** - * \file ext.c - * \brief Extension request parameter interface + * \file extamp.c + * \brief Amplifier extension parameters and levels interface. + * \author Michael Black + * \date 2019 * * An open-ended set of extension parameters and levels are available for each - * amp, as provided in the ampcaps extparms and extlevels lists. These - * provide a way to work with amp-specific functions that don't fit into the - * basic "virtual amp" of Hamlib. See amplifiers/kpa.c for an example. + * amplifier, as provided in the amp_caps::extparms and amp_caps::extlevels + * lists. These provide a way to work with amplifier-specific functions that + * don't fit into the basic "virtual amplifier" of Hamlib. See + * `amplifiers/elecraft/kpa.c` for an example. */ #ifdef HAVE_CONFIG_H @@ -52,15 +55,21 @@ /** - * \param amp The amp handle - * \param cfunc callback function of each extlevel - * \param data cookie to be passed to \a cfunc callback - * \brief Executes cfunc on all the elements stored in the extlevels table - * - * The callback \a cfunc is called until it returns a value which is not - * strictly positive. A zero value means a normal end of iteration, and a - * negative value an abnormal end, which will be the return value of - * amp_ext_level_foreach. + * \brief Executes \a cfunc on all the elements stored in the + * amp_caps::extlevels extension levels table. + * + * \param amp The #AMP handle. + * \param cfunc Callback function of each amp_caps::extlevels. + * \param data Cookie to be passed to the callback function \a cfunc. + * + * The callback function \a cfunc is called until it returns a value which is + * not strictly positive. + * + * \returns A zero value which means a normal end of iteration, or a negative + * value which means an abnormal end, + * + * \retval RIG_OK All extension levels elements successfully processed. + * \retval RIG_EINVAL \a amp or \a cfunc is NULL or inconsistent. */ int HAMLIB_API amp_ext_level_foreach(AMP *amp, int (*cfunc)(AMP *, @@ -97,15 +106,21 @@ int HAMLIB_API amp_ext_level_foreach(AMP *amp, /** - * \param amp The amp handle - * \param cfunc callback function of each extparm - * \param data cookie to be passed to \a cfunc callback - * \brief Executes cfunc on all the elements stored in the extparms table - * - * The callback \a cfunc is called until it returns a value which is not - * strictly positive. A zero value means a normal end of iteration, and a - * negative value an abnormal end, which will be the return value of - * amp_ext_parm_foreach. + * \brief Executes \a cfunc on all the elements stored in the + * amp_caps::extparms extension parameters table. + * + * \param amp The #AMP handle. + * \param cfunc Callback function of each amp_caps::extparms. + * \param data Cookie to be passed to the callback function \a cfunc. + * + * The callback function \a cfunc is called until it returns a value which is not + * strictly positive. + * + * \returns A zero value which means a normal end of iteration, or a + * negative value which means an abnormal end. + * + * \retval RIG_OK All extension parameters elements successfully processed. + * \retval RIG_EINVAL \a amp or \a cfunc is NULL or inconsistent. */ int HAMLIB_API amp_ext_parm_foreach(AMP *amp, int (*cfunc)(AMP *, @@ -142,15 +157,21 @@ int HAMLIB_API amp_ext_parm_foreach(AMP *amp, /** - * \param amp - * \param name - * \brief lookup ext token by its name, return pointer to confparams struct. + * \brief Lookup an extension levels or parameters token by its name and return + * a pointer to the containing #confparams structure member. + * + * \param amp The #AMP handle. + * \param name The extension levels or parameters token name. * - * Lookup extlevels table first, then fall back to extparms. + * Searches the amp_caps::extlevels table first and then falls back to + * amp_caps::extparms. * - * Returns NULL if nothing found + * \return A pointer to the containing #confparams structure member or NULL if + * nothing found or if \a amp is NULL or invalid. * - * TODO: should use Lex to speed it up, strcmp hurts! + * \sa amp_ext_token_lookup() + * + * TODO: should use Lex to speed it up, strcmp() hurts! */ const struct confparams *HAMLIB_API amp_ext_lookup(AMP *amp, const char *name) { @@ -184,13 +205,16 @@ const struct confparams *HAMLIB_API amp_ext_lookup(AMP *amp, const char *name) /** - * \param amp - * \param token - * \brief lookup ext token, return pointer to confparams struct. + * \brief Lookup an extension levels or parameters token by its constant value + * and return a pointer to the #confparams structure member. + * + * \param amp The #AMP handle. + * \param token The token value (constant). * - * lookup extlevels table first, then fall back to extparms. + * Searches the amp_caps::extlevels table first and then falls back to amp_caps::extparms. * - * Returns NULL if nothing found + * \return A pointer to the containing #confparams structure member or NULL if + * nothing found or if \a amp is NULL or invalid. */ const struct confparams *HAMLIB_API amp_ext_lookup_tok(AMP *amp, token_t token) { @@ -224,9 +248,15 @@ const struct confparams *HAMLIB_API amp_ext_lookup_tok(AMP *amp, token_t token) /** - * \param amp - * \param name - * \brief Simple lookup returning token id assicated with name + * \brief Simple lookup returning the extension token ID associated with \a + * name. + * + * \param amp The #AMP handle. + * \param name The name string to search. + * + * \return The token ID or RIG_CONF_END if there is a lookup failure. + * + * \sa amp_ext_lookup() */ token_t HAMLIB_API amp_ext_token_lookup(AMP *amp, const char *name) { ----------------------------------------------------------------------- Summary of changes: include/hamlib/amplifier.h | 28 +++++++----- include/hamlib/amplist.h | 62 ++++++++++++++------------- src/amp_conf.c | 30 +++++++------ src/amp_settings.c | 7 ++- src/amplifier.c | 57 ++++++++++++++++--------- src/extamp.c | 104 +++++++++++++++++++++++++++++---------------- 6 files changed, 177 insertions(+), 111 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-02-11 21:55:31
|
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 64b0b37d49f3f051cebfae059fae82f8c6f56641 (commit) via 4f73d246667bb8d53af08aa9fb7373abf1cd5cdb (commit) via 6141e5098fa66282641df4c855d584f7d4fc4af5 (commit) via b35191d6ad8f632cf6829f6527653ff38ae0f43a (commit) from 8e447e0ff26255075a1c2f2c2a60c91992eef224 (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 64b0b37d49f3f051cebfae059fae82f8c6f56641 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Feb 11 15:52:29 2021 -0600 Move comma correct to outer level to apply in both usage cases diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 561a1382..a33e9fcb 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -2873,6 +2873,10 @@ declare_proto_rig(set_level) level = rig_parse_level(arg1); + // some Java apps send comma in international setups so substitute period + char *p = strchr(arg2,','); + if (p) *p = '.'; + if (!rig_has_set_level(rig, level)) { const struct confparams *cfp; @@ -2884,10 +2888,6 @@ declare_proto_rig(set_level) return -RIG_ENAVAIL; /* no such parameter */ } - // some Java apps send comma in international setups so substitute period - char *p = strchr(arg2,','); - if (p) *p = '.'; - switch (cfp->type) { case RIG_CONF_BUTTON: commit 4f73d246667bb8d53af08aa9fb7373abf1cd5cdb Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Feb 11 15:25:44 2021 -0600 Correct for commas in set_level values done by Java in international mode diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 2a1a83fa..561a1382 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -2884,6 +2884,10 @@ declare_proto_rig(set_level) return -RIG_ENAVAIL; /* no such parameter */ } + // some Java apps send comma in international setups so substitute period + char *p = strchr(arg2,','); + if (p) *p = '.'; + switch (cfp->type) { case RIG_CONF_BUTTON: commit 6141e5098fa66282641df4c855d584f7d4fc4af5 Merge: b35191d6 8e447e0f Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Feb 11 07:53:46 2021 -0600 Merge branch 'master' of http://github.com/Hamlib/Hamlib commit b35191d6ad8f632cf6829f6527653ff38ae0f43a Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Feb 10 22:58:45 2021 -0600 Fix extra LF in rigerror output ENTERFUNC/RETURNFUNC in dummy.c https://github.com/Hamlib/Hamlib/issues/514 diff --git a/rigs/dummy/dummy.c b/rigs/dummy/dummy.c index 4165884d..ed6a46ac 100644 --- a/rigs/dummy/dummy.c +++ b/rigs/dummy/dummy.c @@ -143,6 +143,7 @@ static const struct confparams dummy_cfg_params[] = static void init_chan(RIG *rig, vfo_t vfo, channel_t *chan) { + ENTERFUNC; chan->channel_num = 0; chan->vfo = vfo; strcpy(chan->channel_desc, rig_strvfo(vfo)); @@ -176,6 +177,7 @@ static void copy_chan(channel_t *dest, const channel_t *src) struct ext_list *saved_ext_levels; int i; + ENTERFUNC; /* TODO: ext_levels[] of different sizes */ for (i = 0; !RIG_IS_EXT_END(src->ext_levels[i]) && @@ -194,11 +196,12 @@ static int dummy_init(RIG *rig) struct dummy_priv_data *priv; int i; + ENTERFUNC; priv = (struct dummy_priv_data *)malloc(sizeof(struct dummy_priv_data)); if (!priv) { - return -RIG_ENOMEM; + RETURNFUNC(-RIG_ENOMEM); } rig->state.priv = (void *)priv; @@ -222,7 +225,7 @@ static int dummy_init(RIG *rig) if (!priv->mem[i].ext_levels) { - return -RIG_ENOMEM; + RETURNFUNC(-RIG_ENOMEM); } } @@ -230,28 +233,28 @@ static int dummy_init(RIG *rig) if (!priv->vfo_a.ext_levels) { - return -RIG_ENOMEM; + RETURNFUNC(-RIG_ENOMEM); } priv->vfo_b.ext_levels = alloc_init_ext(dummy_ext_levels); if (!priv->vfo_b.ext_levels) { - return -RIG_ENOMEM; + RETURNFUNC(-RIG_ENOMEM); } priv->ext_funcs = alloc_init_ext(dummy_ext_funcs); if (!priv->ext_funcs) { - return -RIG_ENOMEM; + RETURNFUNC(-RIG_ENOMEM); } priv->ext_parms = alloc_init_ext(dummy_ext_parms); if (!priv->ext_parms) { - return -RIG_ENOMEM; + RETURNFUNC(-RIG_ENOMEM); } init_chan(rig, RIG_VFO_A, &priv->vfo_a); @@ -269,7 +272,7 @@ static int dummy_init(RIG *rig) priv->magic_conf = strdup("DX"); - return RIG_OK; + RETURNFUNC(RIG_OK); } static int dummy_cleanup(RIG *rig) @@ -277,7 +280,7 @@ static int dummy_cleanup(RIG *rig) struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; int i; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + ENTERFUNC; for (i = 0; i < NB_CHAN; i++) { @@ -297,12 +300,12 @@ static int dummy_cleanup(RIG *rig) rig->state.priv = NULL; - return RIG_OK; + RETURNFUNC(RIG_OK); } static int dummy_open(RIG *rig) { - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + ENTERFUNC; if (rig->caps->rig_model == RIG_MODEL_DUMMY_NOVFO) { @@ -315,22 +318,23 @@ static int dummy_open(RIG *rig) usleep(CMDSLEEP); - return RIG_OK; + RETURNFUNC(RIG_OK); } static int dummy_close(RIG *rig) { - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + ENTERFUNC; usleep(CMDSLEEP); - return RIG_OK; + RETURNFUNC(RIG_OK); } static int dummy_set_conf(RIG *rig, token_t token, const char *val) { struct dummy_priv_data *priv; + ENTERFUNC; priv = (struct dummy_priv_data *)rig->state.priv; switch (token) @@ -349,16 +353,17 @@ static int dummy_set_conf(RIG *rig, token_t token, const char *val) break; default: - return -RIG_EINVAL; + RETURNFUNC(-RIG_EINVAL); } - return RIG_OK; + RETURNFUNC(RIG_OK); } static int dummy_get_conf(RIG *rig, token_t token, char *val) { struct dummy_priv_data *priv; + ENTERFUNC; priv = (struct dummy_priv_data *)rig->state.priv; switch (token) @@ -368,10 +373,10 @@ static int dummy_get_conf(RIG *rig, token_t token, char *val) break; default: - return -RIG_EINVAL; + RETURNFUNC(-RIG_EINVAL); } - return RIG_OK; + RETURNFUNC(RIG_OK); } static int dummy_set_freq(RIG *rig, vfo_t vfo, freq_t freq) @@ -379,6 +384,8 @@ static int dummy_set_freq(RIG *rig, vfo_t vfo, freq_t freq) struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; char fstr[20]; + ENTERFUNC; + if (vfo == RIG_VFO_CURR) { vfo = priv->curr_vfo; } usleep(CMDSLEEP); @@ -397,7 +404,7 @@ static int dummy_set_freq(RIG *rig, vfo_t vfo, freq_t freq) rig_debug(RIG_DEBUG_TRACE, "%s: curr->freq=%.0f, curr->tx_freq=%.0f\n", __func__, priv->curr->freq, priv->curr->tx_freq); - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -405,6 +412,8 @@ static int dummy_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) { struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; + ENTERFUNC; + if (vfo == RIG_VFO_CURR && rig->caps->rig_model != RIG_MODEL_DUMMY_NOVFO) { vfo = priv->curr_vfo; } if ((vfo == RIG_VFO_SUB && rig->state.uplink == 1) @@ -412,7 +421,7 @@ static int dummy_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) { rig_debug(RIG_DEBUG_TRACE, "%s: uplink=%d, ignoring get_freq\n", __func__, rig->state.uplink); - return RIG_OK; + RETURNFUNC(RIG_OK); } usleep(CMDSLEEP); @@ -426,11 +435,11 @@ static int dummy_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) case RIG_VFO_SUB: case RIG_VFO_B: *freq = priv->curr->tx_freq; break; - default: return -RIG_EINVAL; + default: RETURNFUNC(-RIG_EINVAL); } rig_debug(RIG_DEBUG_TRACE, "%s: freq=%.0f\n", __func__, *freq); - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -440,6 +449,7 @@ static int dummy_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) channel_t *curr = priv->curr; char buf[16]; + ENTERFUNC; usleep(CMDSLEEP); sprintf_freq(buf, width); rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s %s %s\n", __func__, @@ -447,7 +457,7 @@ static int dummy_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) curr->mode = mode; - if (RIG_PASSBAND_NOCHANGE == width) { return RIG_OK; } + if (RIG_PASSBAND_NOCHANGE == width) { RETURNFUNC(RIG_OK); } if (width == RIG_PASSBAND_NORMAL) { @@ -458,7 +468,7 @@ static int dummy_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) curr->width = width; } - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -467,13 +477,14 @@ static int dummy_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; channel_t *curr = priv->curr; + ENTERFUNC; usleep(CMDSLEEP); rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __func__, rig_strvfo(vfo)); *mode = curr->mode; *width = curr->width; - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -482,6 +493,7 @@ static int dummy_set_vfo(RIG *rig, vfo_t vfo) struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; channel_t *curr = priv->curr; + ENTERFUNC; usleep(CMDSLEEP); rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __func__, rig_strvfo(vfo)); @@ -515,9 +527,10 @@ static int dummy_set_vfo(RIG *rig, vfo_t vfo) default: rig_debug(RIG_DEBUG_VERBOSE, "%s unknown vfo: %s\n", __func__, rig_strvfo(vfo)); + RETURNFUNC(-RIG_EINVAL); } - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -525,11 +538,11 @@ static int dummy_get_vfo(RIG *rig, vfo_t *vfo) { struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; + ENTERFUNC; usleep(CMDSLEEP); *vfo = priv->curr_vfo; - rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __func__, rig_strvfo(*vfo)); - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -537,10 +550,10 @@ static int dummy_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) { struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + ENTERFUNC; priv->ptt = ptt; - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -550,8 +563,8 @@ static int dummy_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) int rc; int status = 0; + ENTERFUNC; usleep(CMDSLEEP); - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); // sneak a look at the hardware PTT and OR that in with our result // as if it had keyed us @@ -560,7 +573,7 @@ static int dummy_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) case RIG_PTT_SERIAL_DTR: if (rig->state.pttport.fd >= 0) { - if (RIG_OK != (rc = ser_get_dtr(&rig->state.pttport, &status))) { return rc; } + if (RIG_OK != (rc = ser_get_dtr(&rig->state.pttport, &status))) { RETURNFUNC(rc); } *ptt = status ? RIG_PTT_ON : RIG_PTT_OFF; } @@ -574,7 +587,7 @@ static int dummy_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) case RIG_PTT_SERIAL_RTS: if (rig->state.pttport.fd >= 0) { - if (RIG_OK != (rc = ser_get_rts(&rig->state.pttport, &status))) { return rc; } + if (RIG_OK != (rc = ser_get_rts(&rig->state.pttport, &status))) { RETURNFUNC(rc); } *ptt = status ? RIG_PTT_ON : RIG_PTT_OFF; } @@ -588,7 +601,7 @@ static int dummy_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) case RIG_PTT_PARALLEL: if (rig->state.pttport.fd >= 0) { - if (RIG_OK != (rc = par_ptt_get(&rig->state.pttport, ptt))) { return rc; } + if (RIG_OK != (rc = par_ptt_get(&rig->state.pttport, ptt))) { RETURNFUNC(rc); } } break; @@ -596,7 +609,7 @@ static int dummy_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) case RIG_PTT_CM108: if (rig->state.pttport.fd >= 0) { - if (RIG_OK != (rc = cm108_ptt_get(&rig->state.pttport, ptt))) { return rc; } + if (RIG_OK != (rc = cm108_ptt_get(&rig->state.pttport, ptt))) { RETURNFUNC(rc); } } break; @@ -605,7 +618,7 @@ static int dummy_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) case RIG_PTT_GPION: if (rig->state.pttport.fd >= 0) { - if (RIG_OK != (rc = gpio_ptt_get(&rig->state.pttport, ptt))) { return rc; } + if (RIG_OK != (rc = gpio_ptt_get(&rig->state.pttport, ptt))) { RETURNFUNC(rc); } } break; @@ -615,7 +628,7 @@ static int dummy_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) break; } - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -623,11 +636,11 @@ static int dummy_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd) { static int twiddle = 0; + ENTERFUNC; usleep(CMDSLEEP); - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); *dcd = (twiddle++ & 1) ? RIG_DCD_ON : RIG_DCD_OFF; - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -636,11 +649,11 @@ static int dummy_set_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift) struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; channel_t *curr = priv->curr; + ENTERFUNC; usleep(CMDSLEEP); - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); curr->rptr_shift = rptr_shift; - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -649,11 +662,11 @@ static int dummy_get_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift) struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; channel_t *curr = priv->curr; + ENTERFUNC; usleep(CMDSLEEP); *rptr_shift = curr->rptr_shift; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -662,11 +675,11 @@ static int dummy_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t rptr_offs) struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; channel_t *curr = priv->curr; + ENTERFUNC; usleep(CMDSLEEP); - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); curr->rptr_offs = rptr_offs; - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -675,10 +688,10 @@ static int dummy_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *rptr_offs) struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; channel_t *curr = priv->curr; + ENTERFUNC; *rptr_offs = curr->rptr_offs; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -687,11 +700,11 @@ static int dummy_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone) struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; channel_t *curr = priv->curr; + ENTERFUNC; usleep(CMDSLEEP); - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); curr->ctcss_tone = tone; - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -700,11 +713,11 @@ static int dummy_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone) struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; channel_t *curr = priv->curr; + ENTERFUNC; usleep(CMDSLEEP); *tone = curr->ctcss_tone; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -713,11 +726,11 @@ static int dummy_set_dcs_code(RIG *rig, vfo_t vfo, tone_t code) struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; channel_t *curr = priv->curr; + ENTERFUNC; usleep(CMDSLEEP); - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); curr->dcs_code = code; - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -726,11 +739,11 @@ static int dummy_get_dcs_code(RIG *rig, vfo_t vfo, tone_t *code) struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; channel_t *curr = priv->curr; + ENTERFUNC; usleep(CMDSLEEP); *code = curr->dcs_code; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -739,11 +752,11 @@ static int dummy_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone) struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; channel_t *curr = priv->curr; + ENTERFUNC; usleep(CMDSLEEP); - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); curr->ctcss_sql = tone; - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -752,10 +765,10 @@ static int dummy_get_ctcss_sql(RIG *rig, vfo_t vfo, tone_t *tone) struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; channel_t *curr = priv->curr; + ENTERFUNC; *tone = curr->ctcss_sql; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -764,10 +777,10 @@ static int dummy_set_dcs_sql(RIG *rig, vfo_t vfo, unsigned int code) struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; channel_t *curr = priv->curr; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + ENTERFUNC; curr->dcs_sql = code; - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -776,24 +789,21 @@ static int dummy_get_dcs_sql(RIG *rig, vfo_t vfo, unsigned int *code) struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; channel_t *curr = priv->curr; + ENTERFUNC; *code = curr->dcs_sql; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); - return RIG_OK; + RETURNFUNC(RIG_OK); } static int dummy_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) { struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; - char fstr[20]; - sprintf_freq(fstr, tx_freq); - rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s %s\n", __func__, - rig_strvfo(vfo), fstr); + ENTERFUNC; priv->curr->tx_freq = tx_freq; - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -801,11 +811,11 @@ static int dummy_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq) { struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; - rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __func__, rig_strvfo(vfo)); + ENTERFUNC; *tx_freq = priv->curr->tx_freq; - return RIG_OK; + RETURNFUNC(RIG_OK); } static int dummy_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, @@ -813,19 +823,16 @@ static int dummy_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, { struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; channel_t *curr = priv->curr; - char buf[16]; - sprintf_freq(buf, tx_width); - rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s %s %s\n", __func__, - rig_strvfo(vfo), rig_strrmode(tx_mode), buf); + ENTERFUNC; curr->tx_mode = tx_mode; - if (RIG_PASSBAND_NOCHANGE == tx_width) { return RIG_OK; } + if (RIG_PASSBAND_NOCHANGE == tx_width) { RETURNFUNC(RIG_OK); } curr->tx_width = tx_width; - return RIG_OK; + RETURNFUNC(RIG_OK); } static int dummy_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode, @@ -834,12 +841,12 @@ static int dummy_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode, struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; channel_t *curr = priv->curr; - rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __func__, rig_strvfo(vfo)); + ENTERFUNC; *tx_mode = curr->tx_mode; *tx_width = curr->tx_width; - return RIG_OK; + RETURNFUNC(RIG_OK); } static int dummy_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) @@ -847,12 +854,13 @@ static int dummy_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; channel_t *curr = priv->curr; - rig_debug(RIG_DEBUG_VERBOSE, "%s called split=%d, vfo=%s, tx_vfo=%s\n", + ENTERFUNC; + rig_debug(RIG_DEBUG_VERBOSE, "%s: split=%d, vfo=%s, tx_vfo=%s\n", __func__, split, rig_strvfo(vfo), rig_strvfo(tx_vfo)); curr->split = split; priv->tx_vfo = tx_vfo; - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -862,10 +870,10 @@ static int dummy_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; channel_t *curr = priv->curr; + ENTERFUNC; *split = curr->split; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); - return RIG_OK; + RETURNFUNC(RIG_OK); } static int dummy_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit) @@ -873,10 +881,10 @@ static int dummy_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit) struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; channel_t *curr = priv->curr; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + ENTERFUNC; curr->rit = rit; - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -885,10 +893,10 @@ static int dummy_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit) struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; channel_t *curr = priv->curr; + ENTERFUNC; *rit = curr->rit; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -897,10 +905,10 @@ static int dummy_set_xit(RIG *rig, vfo_t vfo, shortfreq_t xit) struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; channel_t *curr = priv->curr; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + ENTERFUNC; curr->xit = xit; - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -909,10 +917,10 @@ static int dummy_get_xit(RIG *rig, vfo_t vfo, shortfreq_t *xit) struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; channel_t *curr = priv->curr; + ENTERFUNC; *xit = curr->xit; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -921,10 +929,10 @@ static int dummy_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts) struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; channel_t *curr = priv->curr; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + ENTERFUNC; curr->tuning_step = ts; - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -933,10 +941,10 @@ static int dummy_get_ts(RIG *rig, vfo_t vfo, shortfreq_t *ts) struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; channel_t *curr = priv->curr; + ENTERFUNC; *ts = curr->tuning_step; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -945,6 +953,7 @@ static int dummy_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; channel_t *curr = priv->curr; + ENTERFUNC; rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s %d\n", __func__, rig_strfunc(func), status); @@ -957,7 +966,7 @@ static int dummy_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) curr->funcs &= ~func; } - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -966,12 +975,13 @@ static int dummy_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status) struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; channel_t *curr = priv->curr; + ENTERFUNC; *status = (curr->funcs & func) ? 1 : 0; rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __func__, rig_strfunc(func)); - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -982,11 +992,12 @@ static int dummy_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) int idx; char lstr[32]; + ENTERFUNC; idx = rig_setting2idx(level); if (idx >= RIG_SETTING_MAX) { - return -RIG_EINVAL; + RETURNFUNC(-RIG_EINVAL); } curr->levels[idx] = val; @@ -1003,7 +1014,7 @@ static int dummy_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s %s\n", __func__, rig_strlevel(level), lstr); - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -1013,11 +1024,12 @@ static int dummy_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) channel_t *curr = priv->curr; int idx; + ENTERFUNC; idx = rig_setting2idx(level); if (idx >= RIG_SETTING_MAX) { - return -RIG_EINVAL; + RETURNFUNC(-RIG_EINVAL); } switch (level) @@ -1127,7 +1139,7 @@ static int dummy_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __func__, rig_strlevel(level)); - return RIG_OK; + RETURNFUNC(RIG_OK); } static int dummy_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val) @@ -1138,11 +1150,12 @@ static int dummy_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val) const struct confparams *cfp; struct ext_list *elp; + ENTERFUNC; cfp = rig_ext_lookup_tok(rig, token); if (!cfp) { - return -RIG_EINVAL; + RETURNFUNC(-RIG_EINVAL); } switch (token) @@ -1154,7 +1167,7 @@ static int dummy_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val) break; default: - return -RIG_EINVAL; + RETURNFUNC(-RIG_EINVAL); } switch (cfp->type) @@ -1180,14 +1193,14 @@ static int dummy_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val) break; default: - return -RIG_EINTERNAL; + RETURNFUNC(-RIG_EINTERNAL); } elp = find_ext(curr->ext_levels, token); if (!elp) { - return -RIG_EINTERNAL; + RETURNFUNC(-RIG_EINTERNAL); } /* store value */ @@ -1196,7 +1209,7 @@ static int dummy_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val) rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s %s\n", __func__, cfp->name, lstr); - return RIG_OK; + RETURNFUNC(RIG_OK); } static int dummy_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val) @@ -1206,11 +1219,12 @@ static int dummy_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val) const struct confparams *cfp; struct ext_list *elp; + ENTERFUNC; cfp = rig_ext_lookup_tok(rig, token); if (!cfp) { - return -RIG_EINVAL; + RETURNFUNC(-RIG_EINVAL); } switch (token) @@ -1222,14 +1236,14 @@ static int dummy_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val) break; default: - return -RIG_EINVAL; + RETURNFUNC(-RIG_EINVAL); } elp = find_ext(curr->ext_levels, token); if (!elp) { - return -RIG_EINTERNAL; + RETURNFUNC(-RIG_EINTERNAL); } /* load value */ @@ -1238,7 +1252,7 @@ static int dummy_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val) rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __func__, cfp->name); - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -1248,11 +1262,12 @@ static int dummy_set_ext_func(RIG *rig, vfo_t vfo, token_t token, int status) const struct confparams *cfp; struct ext_list *elp; + ENTERFUNC; cfp = rig_ext_lookup_tok(rig, token); if (!cfp) { - return -RIG_EINVAL; + RETURNFUNC(-RIG_EINVAL); } switch (token) @@ -1261,7 +1276,7 @@ static int dummy_set_ext_func(RIG *rig, vfo_t vfo, token_t token, int status) break; default: - return -RIG_EINVAL; + RETURNFUNC(-RIG_EINVAL); } switch (cfp->type) @@ -1273,14 +1288,14 @@ static int dummy_set_ext_func(RIG *rig, vfo_t vfo, token_t token, int status) break; default: - return -RIG_EINTERNAL; + RETURNFUNC(-RIG_EINTERNAL); } elp = find_ext(priv->ext_funcs, token); if (!elp) { - return -RIG_EINTERNAL; + RETURNFUNC(-RIG_EINTERNAL); } /* store value */ @@ -1289,7 +1304,7 @@ static int dummy_set_ext_func(RIG *rig, vfo_t vfo, token_t token, int status) rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s %d\n", __func__, cfp->name, status); - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -1299,11 +1314,12 @@ static int dummy_get_ext_func(RIG *rig, vfo_t vfo, token_t token, int *status) const struct confparams *cfp; struct ext_list *elp; + ENTERFUNC; cfp = rig_ext_lookup_tok(rig, token); if (!cfp) { - return -RIG_EINVAL; + RETURNFUNC(-RIG_EINVAL); } switch (token) @@ -1312,14 +1328,14 @@ static int dummy_get_ext_func(RIG *rig, vfo_t vfo, token_t token, int *status) break; default: - return -RIG_EINVAL; + RETURNFUNC(-RIG_EINVAL); } elp = find_ext(priv->ext_funcs, token); if (!elp) { - return -RIG_EINTERNAL; + RETURNFUNC(-RIG_EINTERNAL); } /* load value */ @@ -1328,7 +1344,7 @@ static int dummy_get_ext_func(RIG *rig, vfo_t vfo, token_t token, int *status) rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __func__, cfp->name); - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -1336,10 +1352,10 @@ static int dummy_set_powerstat(RIG *rig, powerstat_t status) { struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + ENTERFUNC; priv->powerstat = status; - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -1347,10 +1363,10 @@ static int dummy_get_powerstat(RIG *rig, powerstat_t *status) { struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; + ENTERFUNC; *status = priv->powerstat; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -1360,11 +1376,12 @@ static int dummy_set_parm(RIG *rig, setting_t parm, value_t val) int idx; char pstr[32]; + ENTERFUNC; idx = rig_setting2idx(parm); if (idx >= RIG_SETTING_MAX) { - return -RIG_EINVAL; + RETURNFUNC(-RIG_EINVAL); } if (RIG_PARM_IS_FLOAT(parm)) @@ -1380,7 +1397,7 @@ static int dummy_set_parm(RIG *rig, setting_t parm, value_t val) rig_strparm(parm), pstr); priv->parms[idx] = val; - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -1389,18 +1406,19 @@ static int dummy_get_parm(RIG *rig, setting_t parm, value_t *val) struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; int idx; + ENTERFUNC; idx = rig_setting2idx(parm); if (idx >= RIG_SETTING_MAX) { - return -RIG_EINVAL; + RETURNFUNC(-RIG_EINVAL); } *val = priv->parms[idx]; rig_debug(RIG_DEBUG_VERBOSE, "%s called %s\n", __func__, rig_strparm(parm)); - return RIG_OK; + RETURNFUNC(RIG_OK); } static int dummy_set_ext_parm(RIG *rig, token_t token, value_t val) @@ -1410,11 +1428,12 @@ static int dummy_set_ext_parm(RIG *rig, token_t token, value_t val) const struct confparams *cfp; struct ext_list *epp; + ENTERFUNC; cfp = rig_ext_lookup_tok(rig, token); if (!cfp) { - return -RIG_EINVAL; + RETURNFUNC(-RIG_EINVAL); } switch (token) @@ -1423,7 +1442,7 @@ static int dummy_set_ext_parm(RIG *rig, token_t token, value_t val) break; default: - return -RIG_EINVAL; + RETURNFUNC(-RIG_EINVAL); } switch (cfp->type) @@ -1449,14 +1468,14 @@ static int dummy_set_ext_parm(RIG *rig, token_t token, value_t val) break; default: - return -RIG_EINTERNAL; + RETURNFUNC(-RIG_EINTERNAL); } epp = find_ext(priv->ext_parms, token); if (!epp) { - return -RIG_EINTERNAL; + RETURNFUNC(-RIG_EINTERNAL); } /* store value */ @@ -1466,7 +1485,7 @@ static int dummy_set_ext_parm(RIG *rig, token_t token, value_t val) rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s %s\n", __func__, cfp->name, lstr); - return RIG_OK; + RETURNFUNC(RIG_OK); } static int dummy_get_ext_parm(RIG *rig, token_t token, value_t *val) @@ -1475,13 +1494,14 @@ static int dummy_get_ext_parm(RIG *rig, token_t token, value_t *val) const struct confparams *cfp; struct ext_list *epp; + ENTERFUNC; /* TODO: load value from priv->ext_parms */ cfp = rig_ext_lookup_tok(rig, token); if (!cfp) { - return -RIG_EINVAL; + RETURNFUNC(-RIG_EINVAL); } switch (token) @@ -1490,14 +1510,14 @@ static int dummy_get_ext_parm(RIG *rig, token_t token, value_t *val) break; default: - return -RIG_EINVAL; + RETURNFUNC(-RIG_EINVAL); } epp = find_ext(priv->ext_parms, token); if (!epp) { - return -RIG_EINTERNAL; + RETURNFUNC(-RIG_EINTERNAL); } /* load value */ @@ -1506,7 +1526,7 @@ static int dummy_get_ext_parm(RIG *rig, token_t token, value_t *val) rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __func__, cfp->name); - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -1515,6 +1535,7 @@ static int dummy_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option) { struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; channel_t *curr = priv->curr; + ENTERFUNC; switch (ant) { @@ -1531,7 +1552,7 @@ static int dummy_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option) default: rig_debug(RIG_DEBUG_ERR, "%s: unknown antenna requested=0x%02x\n", __func__, ant); - return -RIG_EINVAL; + RETURNFUNC(-RIG_EINVAL); } priv->ant_option[rig_setting2idx(curr->ant)] = option.i; @@ -1539,7 +1560,7 @@ static int dummy_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option) "%s called ant=0x%02x, option=%d, curr->ant=0x%02x\n", __func__, ant, option.i, curr->ant); - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -1548,6 +1569,7 @@ static int dummy_get_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t *option, { struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; channel_t *curr = priv->curr; + ENTERFUNC; rig_debug(RIG_DEBUG_VERBOSE, "%s called, ant=0x%02x\n", __func__, ant); @@ -1569,14 +1591,14 @@ static int dummy_get_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t *option, default: rig_debug(RIG_DEBUG_ERR, "%s: unknown antenna requested=0x%02x\n", __func__, ant); - return -RIG_EINVAL; + RETURNFUNC(-RIG_EINVAL); } rig_debug(RIG_DEBUG_TRACE, "%s: ant_curr=0x%02x, idx=%d\n", __func__, *ant_curr, rig_setting2idx(*ant_curr)); option->i = priv->ant_option[rig_setting2idx(*ant_curr)]; - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -1584,10 +1606,10 @@ static int dummy_set_bank(RIG *rig, vfo_t vfo, int bank) { struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; + ENTERFUNC; priv->bank = bank; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -1595,11 +1617,11 @@ static int dummy_set_mem(RIG *rig, vfo_t vfo, int ch) { struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + ENTERFUNC; if (ch < 0 || ch >= NB_CHAN) { - return -RIG_EINVAL; + RETURNFUNC(-RIG_EINVAL); } if (priv->curr_vfo == RIG_VFO_MEM) @@ -1611,7 +1633,7 @@ static int dummy_set_mem(RIG *rig, vfo_t vfo, int ch) priv->curr->channel_num = ch; } - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -1620,22 +1642,24 @@ static int dummy_get_mem(RIG *rig, vfo_t vfo, int *ch) struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; channel_t *curr = priv->curr; + ENTERFUNC; *ch = curr->channel_num; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); - return RIG_OK; + RETURNFUNC(RIG_OK); } static int dummy_scan(RIG *rig, vfo_t vfo, scan_t scan, int ch) { + ENTERFUNC; rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s %d\n", __func__, rig_strscan(scan), ch); /* TODO: change freq, etc. */ - return RIG_OK; + RETURNFUNC(RIG_OK); } static void chan_vfo(channel_t *chan, vfo_t vfo) { + ENTERFUNC; chan->vfo = vfo; strcpy(chan->channel_desc, rig_strvfo(vfo)); } @@ -1648,6 +1672,7 @@ static int dummy_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op) freq_t freq; shortfreq_t ts; + ENTERFUNC; rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __func__, rig_strvfop(op)); @@ -1714,7 +1739,7 @@ static int dummy_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op) if (!chan.ext_levels) { - return -RIG_ENOMEM; + RETURNFUNC(-RIG_ENOMEM); } copy_chan(&chan, &priv->vfo_b); @@ -1765,15 +1790,15 @@ static int dummy_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op) case RIG_OP_TOGGLE: if (priv->curr_vfo == RIG_VFO_A) { - return dummy_set_vfo(rig, RIG_VFO_B); + RETURNFUNC(dummy_set_vfo(rig, RIG_VFO_B)); } else if (priv->curr_vfo == RIG_VFO_B) { - return dummy_set_vfo(rig, RIG_VFO_A); + RETURNFUNC(dummy_set_vfo(rig, RIG_VFO_A)); } else { - return -RIG_EVFO; + RETURNFUNC(-RIG_EVFO); } case RIG_OP_RIGHT: @@ -1784,7 +1809,7 @@ static int dummy_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op) case RIG_OP_BAND_UP: case RIG_OP_BAND_DOWN: - return -RIG_ENIMPL; + RETURNFUNC(-RIG_ENIMPL); case RIG_OP_UP: ret = dummy_get_freq(rig, vfo, &freq); @@ -1814,23 +1839,23 @@ static int dummy_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op) break; } - return RIG_OK; + RETURNFUNC(RIG_OK); } static int dummy_set_channel(RIG *rig, vfo_t vfo, const channel_t *chan) { struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + ENTERFUNC; if (!chan->ext_levels) { - return -RIG_EINVAL; + RETURNFUNC(-RIG_EINVAL); } if (chan->channel_num < 0 || chan->channel_num >= NB_CHAN) { - return -RIG_EINVAL; + RETURNFUNC(-RIG_EINVAL); } /* TODO: @@ -1855,10 +1880,10 @@ static int dummy_set_channel(RIG *rig, vfo_t vfo, const channel_t *chan) break; default: - return -RIG_EINVAL; + RETURNFUNC(-RIG_EINVAL); } - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -1867,11 +1892,11 @@ static int dummy_get_channel(RIG *rig, vfo_t vfo, channel_t *chan, { struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + ENTERFUNC; if (chan->channel_num < 0 || chan->channel_num >= NB_CHAN) { - return -RIG_EINVAL; + RETURNFUNC(-RIG_EINVAL); } if (!chan->ext_levels) @@ -1880,7 +1905,7 @@ static int dummy_get_channel(RIG *rig, vfo_t vfo, channel_t *chan, if (!chan->ext_levels) { - return -RIG_ENOMEM; + RETURNFUNC(-RIG_ENOMEM); } } @@ -1906,63 +1931,65 @@ static int dummy_get_channel(RIG *rig, vfo_t vfo, channel_t *chan, break; default: - return -RIG_EINVAL; + RETURNFUNC(-RIG_EINVAL); } - return RIG_OK; + RETURNFUNC(RIG_OK); } static int dummy_set_trn(RIG *rig, int trn) { - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + ENTERFUNC; - return RIG_OK; + RETURNFUNC(RIG_OK); } static int dummy_get_trn(RIG *rig, int *trn) { + ENTERFUNC; *trn = RIG_TRN_OFF; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); - return RIG_OK; + RETURNFUNC(RIG_OK); } static const char *dummy_get_info(RIG *rig) { - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + ENTERFUNC; - return "Nothing much (dummy)"; + RETURNFUNC("Nothing much (dummy)"); } static int dummy_send_dtmf(RIG *rig, vfo_t vfo, const char *digits) { + ENTERFUNC; rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __func__, digits); - return RIG_OK; + RETURNFUNC(RIG_OK); } static int dummy_recv_dtmf(RIG *rig, vfo_t vfo, char *digits, int *length) { - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + ENTERFUNC; strcpy(digits, "0123456789ABCDEF"); *length = 16; - return RIG_OK; + RETURNFUNC(RIG_OK); } static int dummy_send_morse(RIG *rig, vfo_t vfo, const char *msg) { - rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __func__, msg); + ENTERFUNC; - return RIG_OK; + RETURNFUNC(RIG_OK); } static int dummy_power2mW(RIG *rig, unsigned int *mwpower, float power, freq_t freq, rmode_t mode) { + ENTERFUNC; rig_debug(RIG_DEBUG_TRACE, "%s: passed power = %f\n", __func__, power); rig_debug(RIG_DEBUG_TRACE, "%s: passed freq = %"PRIfreq" Hz\n", __func__, freq); rig_debug(RIG_DEBUG_TRACE, "%s: passed mode = %s\n", __func__, @@ -1971,13 +1998,14 @@ static int dummy_power2mW(RIG *rig, unsigned int *mwpower, float power, /* Pretend this is a 100W radio */ *mwpower = (power * 100000); - return RIG_OK; + RETURNFUNC(RIG_OK); } static int dummy_mW2power(RIG *rig, float *power, unsigned int mwpower, freq_t freq, rmode_t mode) { + ENTERFUNC; rig_debug(RIG_DEBUG_TRACE, "%s: passed mwpower = %u\n", __func__, mwpower); rig_debug(RIG_DEBUG_TRACE, "%s: passed freq = %"PRIfreq" Hz\n", __func__, freq); rig_debug(RIG_DEBUG_TRACE, "%s: passed mode = %s\n", __func__, @@ -1986,12 +2014,12 @@ static int dummy_mW2power(RIG *rig, float *power, unsigned int mwpower, /* Pretend this is a 100W radio */ if (mwpower > 100000) { - return -RIG_EINVAL; + RETURNFUNC(-RIG_EINVAL); } *power = ((float)mwpower / 100000); - return RIG_OK; + RETURNFUNC(RIG_OK); } @@ -2049,7 +2077,7 @@ struct rig_caps dummy_caps = RIG_MODEL(RIG_MODEL_DUMMY), .model_name = "Dummy", .mfg_name = "Hamlib", - .version = "20200606.0", + .version = "20210210.0", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_OTHER, @@ -2376,6 +2404,7 @@ struct rig_caps dummy_no_vfo_caps = DECLARE_INITRIG_BACKEND(dummy) { + ENTERFUNC; rig_debug(RIG_DEBUG_VERBOSE, "%s: _init called\n", __func__); rig_register(&dummy_caps); @@ -2384,5 +2413,5 @@ DECLARE_INITRIG_BACKEND(dummy) rig_register(&trxmanager_caps); rig_register(&dummy_no_vfo_caps); - return RIG_OK; + RETURNFUNC(RIG_OK); } diff --git a/src/rig.c b/src/rig.c index 620a75d0..33262942 100644 --- a/src/rig.c +++ b/src/rig.c @@ -307,7 +307,7 @@ const char *HAMLIB_API rigerror(int errnum) // we have to remove LF from debugmsgsave since calling function controls LF char *p = &debugmsgsave[strlen(debugmsgsave)-1]; if (*p=='\n') *p=0; - snprintf(msg, sizeof(msg), "%.80s\n%.15000s\n%.15000s", rigerror_table[errnum], debugmsgsave2, debugmsgsave); + snprintf(msg, sizeof(msg), "%.80s\n%.15000s%.15000s", rigerror_table[errnum], debugmsgsave2, debugmsgsave); return msg; } ----------------------------------------------------------------------- Summary of changes: rigs/dummy/dummy.c | 385 +++++++++++++++++++++++++++------------------------ src/rig.c | 2 +- tests/rigctl_parse.c | 4 + 3 files changed, 212 insertions(+), 179 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Nate B. <n0...@us...> - 2021-02-11 09:13:17
|
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 8e447e0ff26255075a1c2f2c2a60c91992eef224 (commit) via d31f6ef44148e8c41d7d8449ec1aebfe1ca4ed5f (commit) from 870aa12b51fe1d8257b5b1e00dc73142a0e92af7 (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 8e447e0ff26255075a1c2f2c2a60c91992eef224 Merge: 870aa12b d31f6ef4 Author: Nate Bargmann <n0...@n0...> Date: Thu Feb 11 03:12:05 2021 -0600 Merge pull request #544 from N0NB/doxygen_work Unify the amplifier API into a single group commit d31f6ef44148e8c41d7d8449ec1aebfe1ca4ed5f Author: Nate Bargmann <n0...@n0...> Date: Thu Feb 11 03:09:17 2021 -0600 Unify the amplifier API into a single group diff --git a/doc/index.doxygen b/doc/index.doxygen index 5f08971d..b464c99f 100644 --- a/doc/index.doxygen +++ b/doc/index.doxygen @@ -7,11 +7,11 @@ Stéphane Fillod, F8CFE, and Frank Singleton, VK3FCS and the Hamlib Group \section s1 Preface -This document describes the Hamlib library Application Programming Interface -(API) for this distribution. +This document describes the Hamlib library Application Programming Interface +(API) for this distribution. -We attempt to document the complete API of the core modules of Hamlib, i.e., -the API seen by end-user application developers. You may navigate the +We attempt to document the complete API of the core modules of Hamlib, i.e., +the API seen by end-user application developers. You may navigate the documentation through the tabs at the top of this page. Please report any problems to ham...@li.... @@ -44,10 +44,10 @@ Other files: \subpage INSTALL; \section slic Documentation License -\li \subpage doclicense +\li \subpage doclicense */ /*! \page doclicense License for Documentation -This documentation is free; you can redistribute it without +This documentation is free; you can redistribute it without any restrictions. The modification or derived work must retain copyright and list all authors. @@ -101,4 +101,5 @@ of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * \defgroup rotator Rotator API * \defgroup utilities Utility Routines API * \defgroup rig_internal Rig Internal API + * \defgroup amplifier Amplifier API */ diff --git a/include/hamlib/amplifier.h b/include/hamlib/amplifier.h index 8972e55d..067ca026 100644 --- a/include/hamlib/amplifier.h +++ b/include/hamlib/amplifier.h @@ -26,7 +26,7 @@ #include <hamlib/amplist.h> /** - * \addtogroup amp + * \addtogroup amplifier * @{ */ diff --git a/src/extamp.c b/src/extamp.c index b93785a7..078b76ea 100644 --- a/src/extamp.c +++ b/src/extamp.c @@ -22,7 +22,7 @@ */ /** - * \addtogroup amp + * \addtogroup amplifier * @{ */ ----------------------------------------------------------------------- Summary of changes: doc/index.doxygen | 13 +++++++------ include/hamlib/amplifier.h | 2 +- src/extamp.c | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Nate B. <n0...@us...> - 2021-02-11 08:44: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 870aa12b51fe1d8257b5b1e00dc73142a0e92af7 (commit) via a2aacdf881f8c627b8048dfa178c1c88ccf8b8a1 (commit) via 1642dbd6bb76f3a2a76c2cb2f89684b6eba7b48f (commit) via 5503dddcdde2005f2582cbd5f796a881ec0c0857 (commit) via bcfc54075c1df7c0f58c46bfcd7a803aa20a8945 (commit) via 6ffbf168d0cfaea5a4a3291d227028336fe11073 (commit) via 635ee95f3f55e3c807a53cbd29421933ac657a5f (commit) from 02fffca989756b1bd2c205666f78deb2867be459 (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 870aa12b51fe1d8257b5b1e00dc73142a0e92af7 Merge: bcfc5407 a2aacdf8 Author: Nate Bargmann <n0...@n0...> Date: Thu Feb 11 02:42:11 2021 -0600 Merge pull request #543 from N0NB/doxygen_work Doxygen work commit a2aacdf881f8c627b8048dfa178c1c88ccf8b8a1 Author: Nate Bargmann <n0...@n0...> Date: Thu Feb 11 02:34:48 2021 -0600 Update Doxygen comments in rotator.h Aim for more consistency between comments and ensure that function names are properly linked to the definitions in the src directory. diff --git a/include/hamlib/rotator.h b/include/hamlib/rotator.h index 52f22f13..e23c3410 100644 --- a/include/hamlib/rotator.h +++ b/include/hamlib/rotator.h @@ -31,11 +31,13 @@ */ /** - * \file rotator.h - * \brief Hamlib rotator data structures. + * \file rotator.h + * \brief Hamlib rotator data structures. * - * This file contains the data structures and declarations for the Hamlib - * rotator API. see the rotator.c file for more details on the rotator API. + * This file contains the data structures and declarations for the Hamlib + * rotator Application Programming Interface (API). + * + * See the rotator.c file for more details on the rotator API functions. */ @@ -49,149 +51,166 @@ struct rot_state; /** - * \typedef typedef struct s_rot ROT - * \brief Rotator structure definition (see rot for details). + * \typedef typedef struct s_rot ROT + * \brief Main rotator handle type definition. + * + * The #ROT handle is returned by rot_init() and is passed as a parameter to + * every rotator specific API call. + * + * rot_cleanup() must be called when this handle is no longer needed. */ typedef struct s_rot ROT; /** - * \typedef typedef float elevation_t - * \brief Type definition for elevation. + * \typedef typedef float elevation_t + * \brief Type definition for elevation. * - * The elevation_t type is used as parameter for the rot_set_position() and - * rot_get_position() functions. + * The \a elevation_t type is used as parameter for the rot_set_position() and + * rot_get_position() functions. * - * Unless specified otherwise, the unit of elevation_t is decimal degrees. + * Unless specified otherwise, the unit of \a elevation_t is decimal degrees. */ typedef float elevation_t; /** - * \typedef typedef float azimuth_t - * \brief Type definition for azimuth. + * \typedef typedef float azimuth_t + * \brief Type definition for azimuth. * - * The azimuth_t type is used as parameter for the rot_set_position() and - * rot_get_position() functions. + * The \a azimuth_t type is used as parameter for the rot_set_position() and + * rot_get_position() functions. * - * Unless specified otherwise, the unit of azimuth_t is decimal degrees. + * Unless specified otherwise, the unit of \a azimuth_t is decimal degrees. */ typedef float azimuth_t; /** - * \brief Token in the netrotctl protocol for returning error code + * \brief The token in the netrotctl protocol for returning an error condition code. */ #define NETROTCTL_RET "RPRT " /** - * \def ROT_RESET_ALL - * \brief A macro that returns the flag for the \b reset operation. - * \sa rot_reset(), rot_reset_t() + * \def ROT_RESET_ALL + * \brief A macro that returns the flag for the \b reset operation. + * + * \sa rot_reset(), rot_reset_t */ #define ROT_RESET_ALL 1 /** - * \typedef typedef int rot_reset_t - * \brief Type definition for rotator reset. + * \typedef typedef int rot_reset_t + * \brief Type definition for rotator reset. * - * The rot_reset_t type is used as parameter for the rot_reset() API - * function. + * The \a rot_reset_t type is used as parameter for the rot_reset() API + * function. */ typedef int rot_reset_t; -//! @cond Doxygen_Suppress /** - * \brief Rotator type flags + * \brief Rotator type flags for bitmasks. */ typedef enum { ROT_FLAG_AZIMUTH = (1 << 1), /*!< Azimuth */ ROT_FLAG_ELEVATION = (1 << 2) /*!< Elevation */ } rot_type_t; +//! @cond Doxygen_Suppress +/* So far only used in ests/dumpcaps_rot.c. */ #define ROT_TYPE_MASK (ROT_FLAG_AZIMUTH|ROT_FLAG_ELEVATION) +//! @endcond +/** + * \def ROT_TYPE_OTHER + * \brief Other type of rotator. + * \def ROT_TYPE_AZIMUTH + * \brief Azimuth only rotator. + * \def ROT_TYPE_ELEVATION + * \brief Elevation only rotator. + * \def ROT_TYPE_AZEL + * \brief Combination azimuth/elevation rotator. + */ #define ROT_TYPE_OTHER 0 #define ROT_TYPE_AZIMUTH ROT_FLAG_AZIMUTH #define ROT_TYPE_ELEVATION ROT_FLAG_ELEVATION #define ROT_TYPE_AZEL (ROT_FLAG_AZIMUTH|ROT_FLAG_ELEVATION) -//! @endcond /** - * \def ROT_MOVE_UP - * \brief A macro that returns the flag for the \b UP direction. + * \def ROT_MOVE_UP + * \brief A macro that returns the flag for the \b UP direction. * - * This macro defines the value of the \b UP direction which can be - * used with the rot_move() function. + * This macro defines the value of the \b UP direction which can be + * used with the rot_move() function. * - * \sa rot_move(), ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW, - * ROT_MOVE_RIGHT, ROT_MOVE_CW + * \sa rot_move(), ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW, + * ROT_MOVE_RIGHT, ROT_MOVE_CW */ #define ROT_MOVE_UP (1<<1) /** - * \def ROT_MOVE_DOWN - * \brief A macro that returns the flag for the \b DOWN direction. + * \def ROT_MOVE_DOWN + * \brief A macro that returns the flag for the \b DOWN direction. * - * This macro defines the value of the \b DOWN direction which can be - * used with the rot_move() function. + * This macro defines the value of the \b DOWN direction which can be + * used with the rot_move() function. * - * \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_LEFT, ROT_MOVE_CCW, ROT_MOVE_RIGHT, - * ROT_MOVE_CW + * \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_LEFT, ROT_MOVE_CCW, ROT_MOVE_RIGHT, + * ROT_MOVE_CW */ #define ROT_MOVE_DOWN (1<<2) /** - * \def ROT_MOVE_LEFT - * \brief A macro that returns the flag for the \b LEFT direction. + * \def ROT_MOVE_LEFT + * \brief A macro that returns the flag for the \b LEFT direction. * - * This macro defines the value of the \b LEFT direction which can be - * used with the rot_move function. + * This macro defines the value of the \b LEFT direction which can be + * used with the rot_move function. * - * \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_CCW, ROT_MOVE_RIGHT, - * ROT_MOVE_CW + * \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_CCW, ROT_MOVE_RIGHT, + * ROT_MOVE_CW */ #define ROT_MOVE_LEFT (1<<3) /** - * \def ROT_MOVE_CCW - * \brief A macro that returns the flag for the \b counterclockwise direction. + * \def ROT_MOVE_CCW + * \brief A macro that returns the flag for the \b counterclockwise direction. * - * This macro defines the value of the \b counterclockwise direction which - * can be used with the rot_move() function. This value is equivalent to - * ROT_MOVE_LEFT . + * This macro defines the value of the \b counterclockwise direction which + * can be used with the rot_move() function. This value is equivalent to + * ROT_MOVE_LEFT. * - * \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_RIGHT, - * ROT_MOVE_CW + * \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_RIGHT, + * ROT_MOVE_CW */ #define ROT_MOVE_CCW ROT_MOVE_LEFT /** - * \def ROT_MOVE_RIGHT - * \brief A macro that returns the flag for the \b RIGHT direction. + * \def ROT_MOVE_RIGHT + * \brief A macro that returns the flag for the \b RIGHT direction. * - * This macro defines the value of the \b RIGHT direction which can be used - * with the rot_move() function. + * This macro defines the value of the \b RIGHT direction which can be used + * with the rot_move() function. * - * \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW, - * ROT_MOVE_CW + * \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW, + * ROT_MOVE_CW */ #define ROT_MOVE_RIGHT (1<<4) /** - * \def ROT_MOVE_CW - * \brief A macro that returns the flag for the \b clockwise direction. + * \def ROT_MOVE_CW + * \brief A macro that returns the flag for the \b clockwise direction. * - * This macro defines the value of the \b clockwise direction which can be - * used with the rot_move() function. This value is equivalent to - * ROT_MOVE_RIGHT . + * This macro defines the value of the \b clockwise direction which can be + * used with the rot_move() function. This value is equivalent to + * ROT_MOVE_RIGHT. * - * \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW, - * ROT_MOVE_RIGHT + * \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW, + * ROT_MOVE_RIGHT */ #define ROT_MOVE_CW ROT_MOVE_RIGHT @@ -200,46 +219,49 @@ typedef enum { * \brief Rotator status flags */ typedef enum { - ROT_STATUS_NONE = 0, - ROT_STATUS_BUSY = (1 << 0), /*!< Rotator is busy, not accepting commands */ - ROT_STATUS_MOVING = (1 << 1), /*!< Rotator is currently moving (direction type not specified) */ - ROT_STATUS_MOVING_AZ = (1 << 2), /*!< Azimuth rotator is currently moving (direction not specified) */ - ROT_STATUS_MOVING_LEFT = (1 << 3), /*!< Azimuth rotator is currently moving left */ - ROT_STATUS_MOVING_RIGHT = (1 << 4), /*!< Azimuth rotator is currently moving right */ - ROT_STATUS_MOVING_EL = (1 << 5), /*!< Elevation rotator is currently moving (direction not specified) */ - ROT_STATUS_MOVING_UP = (1 << 6), /*!< Elevation rotator is currently moving up */ - ROT_STATUS_MOVING_DOWN = (1 << 7), /*!< Elevation rotator is currently moving down */ - ROT_STATUS_LIMIT_UP = (1 << 8), /*!< The elevation rotator has reached its limit to move up */ - ROT_STATUS_LIMIT_DOWN = (1 << 9), /*!< The elevation rotator has reached its limit to move down */ - ROT_STATUS_LIMIT_LEFT = (1 << 10), /*!< The azimuth rotator has reached its limit to move left (CCW) */ - ROT_STATUS_LIMIT_RIGHT = (1 << 11), /*!< The azimuth rotator has reached its limit to move right (CW) */ - ROT_STATUS_OVERLAP_UP = (1 << 12), /*!< The elevation rotator has rotated up past 360 degrees */ - ROT_STATUS_OVERLAP_DOWN = (1 << 13), /*!< The elevation rotator has rotated down past 0 degrees */ - ROT_STATUS_OVERLAP_LEFT = (1 << 14), /*!< The azimuth rotator has rotated left (CCW) past 0 degrees */ - ROT_STATUS_OVERLAP_RIGHT = (1 << 16), /*!< The azimuth rotator has rotated right (CW) past 360 degrees */ + ROT_STATUS_NONE = 0, /*!< '' -- No status. */ + ROT_STATUS_BUSY = (1 << 0), /*!< Rotator is busy, not accepting commands. */ + ROT_STATUS_MOVING = (1 << 1), /*!< Rotator is currently moving (direction type not specified). */ + ROT_STATUS_MOVING_AZ = (1 << 2), /*!< Azimuth rotator is currently moving (direction not specified). */ + ROT_STATUS_MOVING_LEFT = (1 << 3), /*!< Azimuth rotator is currently moving left. */ + ROT_STATUS_MOVING_RIGHT = (1 << 4), /*!< Azimuth rotator is currently moving right. */ + ROT_STATUS_MOVING_EL = (1 << 5), /*!< Elevation rotator is currently moving (direction not specified). */ + ROT_STATUS_MOVING_UP = (1 << 6), /*!< Elevation rotator is currently moving up. */ + ROT_STATUS_MOVING_DOWN = (1 << 7), /*!< Elevation rotator is currently moving down. */ + ROT_STATUS_LIMIT_UP = (1 << 8), /*!< The elevation rotator has reached its limit to move up. */ + ROT_STATUS_LIMIT_DOWN = (1 << 9), /*!< The elevation rotator has reached its limit to move down.*/ + ROT_STATUS_LIMIT_LEFT = (1 << 10), /*!< The azimuth rotator has reached its limit to move left (CCW). */ + ROT_STATUS_LIMIT_RIGHT = (1 << 11), /*!< The azimuth rotator has reached its limit to move right (CW). */ + ROT_STATUS_OVERLAP_UP = (1 << 12), /*!< The elevation rotator has rotated up past 360 degrees. */ + ROT_STATUS_OVERLAP_DOWN = (1 << 13), /*!< The elevation rotator has rotated down past 0 degrees. */ + ROT_STATUS_OVERLAP_LEFT = (1 << 14), /*!< The azimuth rotator has rotated left (CCW) past 0 degrees. */ + ROT_STATUS_OVERLAP_RIGHT = (1 << 16), /*!< The azimuth rotator has rotated right (CW) past 360 degrees. */ } rot_status_t; +//! @cond Doxygen_Suppress +/* So far only used in tests/sprintflst.c. */ #define ROT_STATUS_N(n) (1u<<(n)) - +//! @endcond /** - * \brief Macro for not changing the rotator speed with move() function + * \brief Macro for not changing the rotator speed with move() function. */ #define ROT_SPEED_NOCHANGE (-1) /** - * \brief Rotator Level Settings + * \brief Rotator Level Settings. + * + * Various operating levels supported by a rotator. * - * Various operating levels supported by a rotator.\n - * \c STRING used in rotctl + * \c STRING used in the \c rotctl and \c rotctld utilities. * * \sa rot_parse_level(), rot_strlevel() */ enum rot_level_e { - ROT_LEVEL_NONE = 0, /*!< '' -- No Level */ - ROT_LEVEL_SPEED = (1 << 0), /*!< \c SPEED -- Rotation speed, arg int (default range 1-100 if not specified) */ - ROT_LEVEL_63 = CONSTANT_64BIT_FLAG(63), /*!< \c Future use, last level */ + ROT_LEVEL_NONE = 0, /*!< '' -- No Level. */ + ROT_LEVEL_SPEED = (1 << 0), /*!< \c SPEED -- Rotation speed, arg int (default range 1-100 if not specified). */ + ROT_LEVEL_63 = CONSTANT_64BIT_FLAG(63), /*!< **Future use**, last level. */ }; @@ -253,11 +275,18 @@ enum rot_level_e { //! @endcond +/** @cond Doxygen_Suppress + * FIXME: The following needs more explanation about how STRING relates + * to this macro. + * @endcond + */ /** * \brief Rotator Parameters * - * Parameters are settings that are not related to core rotator functionality (= antenna rotation).\n - * \c STRING used in rotctl + * Parameters are settings that are not related to core rotator functionality, + * i.e. antenna rotation. + * + * \c STRING used in the \c rotctl and \c rotctld utilities. * * \sa rot_parse_parm(), rot_strparm() */ @@ -275,18 +304,24 @@ enum rot_parm_e { //! @endcond +/** @cond Doxygen_Suppress + * FIXME: The following needs more explanation about how STRING relates + * to these macros. + * @endcond + */ /** - * \brief Rotator Function Settings + * \brief Rotator Function Settings. + * + * Various operating functions supported by a rotator. * - * Various operating functions supported by a rotator.\n - * \c STRING used in rotctl/rotctld + * \c STRING used in the \c rotctl and \c rotctld utilities. * * \sa rot_parse_func(), rot_strfunc() */ #define ROT_FUNC_NONE 0 /*!< '' -- No Function */ #ifndef SWIGLUAHIDE /* Hide the top 32 bits from the old Lua binding as they can't be represented */ -#define ROT_FUNC_BIT63 CONSTANT_64BIT_FLAG (63) /*!< \c available for future ROT_FUNC items */ +#define ROT_FUNC_BIT63 CONSTANT_64BIT_FLAG (63) /*!< **Future use**, ROT_FUNC items. */ /* 63 is this highest bit number that can be used */ #endif @@ -297,35 +332,32 @@ enum rot_parm_e { */ /** - * Rotator Caps * \struct rot_caps - * \brief Rotator data structure. + * \brief Rotator capability data structure. * - * The main idea of this struct is that it will be defined by the backend - * rotator driver, and will remain readonly for the application. Fields that - * need to be modifiable by the application are copied into the struct - * rot_state, which is a kind of private of the ROT instance. + * The main idea of this structure is that it will be defined by the backend + * rotator driver, and will remain read-only for the application. Fields that + * need to be modifiable by the application are copied into the rot_state + * structure, which is the private memory area of the #ROT instance. * - * This way, you can have several rigs running within the same application, - * sharing the struct rot_caps of the backend, while keeping their own - * customized data. + * This way, you can have several rotators running within the same + * application, sharing the rot_caps structure of the backend, while keeping + * their own customized data. * - * mdblack: Careful moving fields around, as the backends depend on it when - * initializing their caps in shared libraries and dlls. + * \b Note: Don't move fields around and only add new fields at the end of the + * rot_caps structure. Shared libraries and DLLs depend on a constant + * structure to maintain compatibility. */ - -//! @cond Doxygen_Suppress -#define ROT_MODEL(arg) .rot_model=arg,.macro_name=#arg struct rot_caps { - rot_model_t rot_model; /*!< Rotator model. */ - const char *model_name; /*!< Model name. */ - const char *mfg_name; /*!< Manufacturer. */ - const char *version; /*!< Driver version. */ - const char *copyright; /*!< Copyright info. */ + rot_model_t rot_model; /*!< Rotator model as defined in rotlist.h. */ + const char *model_name; /*!< Model name, e.g. TT-360. */ + const char *mfg_name; /*!< Manufacturer, e.g. Tower Torquer. */ + const char *version; /*!< Driver version, typically in YYYYMMDD.x format. */ + const char *copyright; /*!< Copyright info (should be LGPL). */ enum rig_status_e status; /*!< Driver status. */ int rot_type; /*!< Rotator type. */ - enum rig_port_e port_type; /*!< Type of communication port. */ + enum rig_port_e port_type; /*!< Type of communication port (serial, ethernet, etc.). */ int serial_rate_min; /*!< Minimal serial speed. */ int serial_rate_max; /*!< Maximal serial speed. */ @@ -337,24 +369,24 @@ struct rot_caps { int write_delay; /*!< Write delay. */ int post_write_delay; /*!< Post-write delay. */ int timeout; /*!< Timeout. */ - int retry; /*!< Number of retry if command fails. */ + int retry; /*!< Number of retries if command fails. */ - setting_t has_get_func; /*!< List of get functions */ - setting_t has_set_func; /*!< List of set functions */ - setting_t has_get_level; /*!< List of get level */ - setting_t has_set_level; /*!< List of set level */ - setting_t has_get_parm; /*!< List of get parm */ - setting_t has_set_parm; /*!< List of set parm */ + setting_t has_get_func; /*!< List of get functions. */ + setting_t has_set_func; /*!< List of set functions. */ + setting_t has_get_level; /*!< List of get levels. */ + setting_t has_set_level; /*!< List of set levels. */ + setting_t has_get_parm; /*!< List of get parameters. */ + setting_t has_set_parm; /*!< List of set parameters. */ - rot_status_t has_status; /*!< Supported status flags */ + rot_status_t has_status; /*!< Supported status flags. */ - gran_t level_gran[RIG_SETTING_MAX]; /*!< level granularity (i.e. steps) */ - gran_t parm_gran[RIG_SETTING_MAX]; /*!< parm granularity (i.e. steps) */ + gran_t level_gran[RIG_SETTING_MAX]; /*!< level granularity (i.e. steps). */ + gran_t parm_gran[RIG_SETTING_MAX]; /*!< parm granularity (i.e. steps). */ - const struct confparams *extparms; /*!< Extension parm list, \sa ext.c */ - const struct confparams *extlevels; /*!< Extension level list, \sa ext.c */ - const struct confparams *extfuncs; /*!< Extension func list, \sa ext.c */ - int *ext_tokens; /*!< Extension token list */ + const struct confparams *extparms; /*!< Extension parameter list, \sa ext.c. */ + const struct confparams *extlevels; /*!< Extension level list, \sa ext.c. */ + const struct confparams *extfuncs; /*!< Extension func list, \sa ext.c. */ + int *ext_tokens; /*!< Extension token list. */ /* * Movement range, az is relative to North @@ -376,65 +408,66 @@ struct rot_caps { * */ - int (*rot_init)(ROT *rot); - int (*rot_cleanup)(ROT *rot); - int (*rot_open)(ROT *rot); - int (*rot_close)(ROT *rot); + int (*rot_init)(ROT *rot); /*!< Pointer to backend implementation of ::rot_init(). */ + int (*rot_cleanup)(ROT *rot); /*!< Pointer to backend implementation of ::rot_cleanup(). */ + int (*rot_open)(ROT *rot); /*!< Pointer to backend implementation of ::rot_open(). */ + int (*rot_close)(ROT *rot); /*!< Pointer to backend implementation of ::rot_close(). */ - int (*set_conf)(ROT *rot, token_t token, const char *val); - int (*get_conf)(ROT *rot, token_t token, char *val); + int (*set_conf)(ROT *rot, token_t token, const char *val); /*!< Pointer to backend implementation of ::rot_set_conf(). */ + int (*get_conf)(ROT *rot, token_t token, char *val); /*!< Pointer to backend implementation of ::rot_get_conf(). */ /* * General API commands, from most primitive to least.. :() * List Set/Get functions pairs */ - int (*set_position)(ROT *rot, azimuth_t azimuth, elevation_t elevation); - int (*get_position)(ROT *rot, azimuth_t *azimuth, elevation_t *elevation); + int (*set_position)(ROT *rot, azimuth_t azimuth, elevation_t elevation); /*!< Pointer to backend implementation of ::rot_set_position(). */ + int (*get_position)(ROT *rot, azimuth_t *azimuth, elevation_t *elevation); /*!< Pointer to backend implementation of ::rot_get_position(). */ - int (*stop)(ROT *rot); - int (*park)(ROT *rot); - int (*reset)(ROT *rot, rot_reset_t reset); - int (*move)(ROT *rot, int direction, int speed); + int (*stop)(ROT *rot); /*!< Pointer to backend implementation of ::rot_stop(). */ + int (*park)(ROT *rot); /*!< Pointer to backend implementation of ::rot_park(). */ + int (*reset)(ROT *rot, rot_reset_t reset); /*!< Pointer to backend implementation of ::rot_reset(). */ + int (*move)(ROT *rot, int direction, int speed); /*!< Pointer to backend implementation of ::rot_move(). */ /* get firmware info, etc. */ - const char * (*get_info)(ROT *rot); + const char * (*get_info)(ROT *rot); /*!< Pointer to backend implementation of ::rot_get_info(). */ - int (*set_level)(ROT *rot, setting_t level, value_t val); - int (*get_level)(ROT *rot, setting_t level, value_t *val); + int (*set_level)(ROT *rot, setting_t level, value_t val); /*!< Pointer to backend implementation of ::rot_set_level(). */ + int (*get_level)(ROT *rot, setting_t level, value_t *val); /*!< Pointer to backend implementation of ::rot_get_level(). */ - int (*set_func)(ROT *rot, setting_t func, int status); - int (*get_func)(ROT *rot, setting_t func, int *status); + int (*set_func)(ROT *rot, setting_t func, int status); /*!< Pointer to backend implementation of ::rot_set_func(). */ + int (*get_func)(ROT *rot, setting_t func, int *status); /*!< Pointer to backend implementation of ::rot_get_func(). */ - int (*set_parm)(ROT *rot, setting_t parm, value_t val); - int (*get_parm)(ROT *rot, setting_t parm, value_t *val); + int (*set_parm)(ROT *rot, setting_t parm, value_t val); /*!< Pointer to backend implementation of ::rot_set_parm(). */ + int (*get_parm)(ROT *rot, setting_t parm, value_t *val); /*!< Pointer to backend implementation of ::rot_get_parm(). */ - int (*set_ext_level)(ROT *rot, token_t token, value_t val); - int (*get_ext_level)(ROT *rot, token_t token, value_t *val); + int (*set_ext_level)(ROT *rot, token_t token, value_t val); /*!< Pointer to backend implementation of ::rot_set_ext_level(). */ + int (*get_ext_level)(ROT *rot, token_t token, value_t *val); /*!< Pointer to backend implementation of ::rot_get_ext_level(). */ - int (*set_ext_func)(ROT *rot, token_t token, int status); - int (*get_ext_func)(ROT *rot, token_t token, int *status); + int (*set_ext_func)(ROT *rot, token_t token, int status); /*!< Pointer to backend implementation of ::rot_set_ext_func(). */ + int (*get_ext_func)(ROT *rot, token_t token, int *status); /*!< Pointer to backend implementation of ::rot_get_ext_func(). */ - int (*set_ext_parm)(ROT *rot, token_t token, value_t val); - int (*get_ext_parm)(ROT *rot, token_t token, value_t *val); + int (*set_ext_parm)(ROT *rot, token_t token, value_t val); /*!< Pointer to backend implementation of ::rot_set_ext_parm(). */ + int (*get_ext_parm)(ROT *rot, token_t token, value_t *val); /*!< Pointer to backend implementation of ::rot_get_ext_parm(). */ - int (*get_status)(ROT *rot, rot_status_t *status); + int (*get_status)(ROT *rot, rot_status_t *status); /*!< Pointer to backend implementation of ::rot_get_status(). */ - const char *macro_name; /*!< Macro name. */ + const char *macro_name; /*!< Rotator model macro name. */ }; +//! @cond Doxygen_Suppress +#define ROT_MODEL(arg) .rot_model=arg,.macro_name=#arg //! @endcond /** - * Rotator state * \struct rot_state - * \brief Live data and customized fields. + * \brief Rotator state structure * - * This struct contains live data, as well as a copy of capability fields - * that may be updated (ie. customized) + * This structure contains live data, as well as a copy of capability fields + * that may be updated, i.e. customized while the #ROT handle is instantiated. * - * It is fine to move fields around, as this kind of struct should - * not be initialized like caps are. + * It is fine to move fields around, as this kind of structure should not be + * initialized like rot_caps are. */ struct rot_state { /* @@ -444,47 +477,46 @@ struct rot_state { azimuth_t max_az; /*!< Upper limit for azimuth (overridable). */ elevation_t min_el; /*!< Lower limit for elevation (overridable). */ elevation_t max_el; /*!< Upper limit for elevation (overridable). */ - int south_zero; /*!< South is zero degrees */ - azimuth_t az_offset; /*!< Offset to be applied to azimuth */ - elevation_t el_offset; /*!< Offset to be applied to elevation */ + int south_zero; /*!< South is zero degrees. */ + azimuth_t az_offset; /*!< Offset to be applied to azimuth. */ + elevation_t el_offset; /*!< Offset to be applied to elevation. */ - setting_t has_get_func; /*!< List of get functions */ - setting_t has_set_func; /*!< List of set functions */ - setting_t has_get_level; /*!< List of get level */ - setting_t has_set_level; /*!< List of set level */ - setting_t has_get_parm; /*!< List of get parm */ - setting_t has_set_parm; /*!< List of set parm */ + setting_t has_get_func; /*!< List of get functions. */ + setting_t has_set_func; /*!< List of set functions. */ + setting_t has_get_level; /*!< List of get levels. */ + setting_t has_set_level; /*!< List of set levels. */ + setting_t has_get_parm; /*!< List of get parameters. */ + setting_t has_set_parm; /*!< List of set parameters. */ - rot_status_t has_status; /*!< Supported status flags */ + rot_status_t has_status; /*!< Supported status flags. */ - gran_t level_gran[RIG_SETTING_MAX]; /*!< level granularity */ - gran_t parm_gran[RIG_SETTING_MAX]; /*!< parm granularity */ + gran_t level_gran[RIG_SETTING_MAX]; /*!< Level granularity. */ + gran_t parm_gran[RIG_SETTING_MAX]; /*!< Parameter granularity. */ /* * non overridable fields, internal use */ hamlib_port_t rotport; /*!< Rotator port (internal use). */ - int comm_state; /*!< Comm port state, opened/closed. */ + int comm_state; /*!< Comm port state, i.e. opened or closed. */ rig_ptr_t priv; /*!< Pointer to private rotator state data. */ rig_ptr_t obj; /*!< Internal use by hamlib++ for event handling. */ - int current_speed; /*!< Current speed 1-100, to be used when no change to speed is requested */ + int current_speed; /*!< Current speed 1-100, to be used when no change to speed is requested. */ /* etc... */ }; /** - * Rotator structure * \struct s_rot - * \brief This is the master data structure, - * acting as a handle for the controlled rotator. + * \brief Master rotator structure. * - * This is the master data structure, acting as a handle for the controlled - * rotator. A pointer to this structure is returned by the rot_init() API - * function and is passed as a parameter to every rotator specific API call. + * This is the master data structure acting as the #ROT handle for the + * controlled rotator. A pointer to this structure is returned by the + * rot_init() API function and is passed as a parameter to every rotator + * specific API call. * - * \sa rot_init(), rot_caps(), rot_state() + * \sa rot_init(), rot_caps, rot_state */ struct s_rot { struct rot_caps *caps; /*!< Rotator caps. */ @@ -757,13 +789,11 @@ extern HAMLIB_EXPORT(const char *) rot_strstatus(rot_status_t); //! @endcond /** - * \def rot_debug - * \brief Convenience definition for debug level. - * - * This is just as convenience definition of the rotator debug level, - * and is the same as for the rig debug level. + * \def rot_debug + * \brief Convenience macro for generating debugging messages. * - * \sa rig_debug() + * This is an alias of the rig_debug() function call and is used in the same + * manner. */ #define rot_debug rig_debug commit 1642dbd6bb76f3a2a76c2cb2f89684b6eba7b48f Author: Nate Bargmann <n0...@n0...> Date: Thu Feb 11 02:32:15 2021 -0600 Update Doxygen comments in amplifier.h Aim for more consistency between comments and ensure that function names are properly linked to the definitions in the src directory. diff --git a/include/hamlib/amplifier.h b/include/hamlib/amplifier.h index 2222ea16..8972e55d 100644 --- a/include/hamlib/amplifier.h +++ b/include/hamlib/amplifier.h @@ -31,13 +31,13 @@ */ /** - * \file amplifier.h - * \brief Hamlib amplifier data structures. + * \file amplifier.h + * \brief Hamlib amplifier data structures. * - * This file contains the data structures and declarations for the Hamlib - * amplifier Application Programming Interface (API). + * This file contains the data structures and declarations for the Hamlib + * amplifier Application Programming Interface (API). * - * See the `amplifier.c` file for details on the amplifier API functions. + * See the amplifier.c file for details on the amplifier API functions. */ @@ -51,47 +51,47 @@ struct amp_state; /** - * \typedef typedef struct amp AMP - * \brief Main amplifier handle type definition. + * \typedef typedef struct amp AMP + * \brief Main amplifier handle type definition. * - * The AMP handle is returned by amp_init() and is passed as a parameter to - * every amplifier specific API call. + * The #AMP handle is returned by amp_init() and is passed as a parameter to + * every amplifier specific API call. * - * amp_cleanup() must be called when this handle is no longer needed. + * amp_cleanup() must be called when this handle is no longer needed. */ typedef struct amp AMP; /** - * \typedef typedef float swr_t - * \brief Type definition for - * <a href="https://en.wikipedia.org/wiki/Standing_wave_ratio" >SWR (Standing Wave Ratio)</a>. + * \typedef typedef float swr_t + * \brief Type definition for + * <a href="https://en.wikipedia.org/wiki/Standing_wave_ratio" >SWR (Standing Wave Ratio)</a>. * - * The \c swr_t type is used as a parameter for the amp_get_swr() function. + * The \a swr_t type is used as a parameter for the amp_get_swr() function. * - * The unit of \c swr_t is 1.0 to the maximum value reported by the amplifier's - * internal antenna system tuner, i.e. - * <a href="http://www.arrl.org/transmatch-antenna-tuner" >transmatch</a>, - * representing the ratio of 1.0:1 to Maximum:1. + * The unit of \a swr_t is 1.0 to the maximum value reported by the amplifier's + * internal antenna system tuner, i.e. + * <a href="http://www.arrl.org/transmatch-antenna-tuner" >transmatch</a>, + * representing the ratio of 1.0:1 to Maximum:1. */ typedef float swr_t; /** - * \typedef typedef float tune_value_t - * \brief Type definition for the - * <a href="http://www.arrl.org/transmatch-antenna-tuner" >transmatch</a> - * tuning values of - * <a href="https://en.wikipedia.org/wiki/Capacitance" >capacitance</a> - * and - * <a href="https://en.wikipedia.org/wiki/Inductance" >inductance</a>. + * \typedef typedef float tune_value_t + * \brief Type definition for the + * <a href="http://www.arrl.org/transmatch-antenna-tuner" >transmatch</a> + * tuning values of + * <a href="https://en.wikipedia.org/wiki/Capacitance" >capacitance</a> + * and + * <a href="https://en.wikipedia.org/wiki/Inductance" >inductance</a>. * - * The \c tune_value_t type is used as a parameter for amp_get_level(). + * The \a tune_value_t type is used as a parameter for amp_get_level(). * - * The unit of \c tune_value_t is - * <a href="https://en.wikipedia.org/wiki/Farad" >picoFarads (pF)</a> - * or - * <a href="https://en.wikipedia.org/wiki/Henry_(unit)" >nanoHenrys (nH)</a>. + * The unit of \a tune_value_t is + * <a href="https://en.wikipedia.org/wiki/Farad" >picoFarads (pF)</a> + * or + * <a href="https://en.wikipedia.org/wiki/Henry_(unit)" >nanoHenrys (nH)</a>. */ typedef int tune_value_t; @@ -168,23 +168,23 @@ enum amp_level_e * * The main idea of this struct is that it will be defined by the backend * amplifier driver and will remain read-only for the application. Fields - * that need to be modifiable by the application are copied into the struct - * \c amp_state, which is the private memory area of the AMP instance. + * that need to be modifiable by the application are copied into the + * amp_state structure, which is the private memory area of the #AMP instance. * * This way you can have several amplifiers running within the same - * application, sharing the struct \c amp_caps of the backend, while keeping + * application, sharing the amp_caps structure of the backend, while keeping * their own customized data. * * \b Note: Don't move fields around and only add new fields at the end of the - * caps structure. Shared libraries depend on a constant structure to maintain - * compatibility. + * amp_caps structure. Shared libraries and DLLs depend on a constant + * structure to maintain compatibility. */ struct amp_caps { - amp_model_t amp_model; /*!< Amplifier model as defined in `amplist.h`. */ + amp_model_t amp_model; /*!< Amplifier model as defined in amplist.h. */ const char *model_name; /*!< Model name, e.g. MM-5k. */ const char *mfg_name; /*!< Manufacturer, e.g. Moonbeam. */ - const char *version; /*!< Driver version. */ + const char *version; /*!< Driver version, typically in YYYYMMDD.x format. */ const char *copyright; /*!< Copyright info (should be LGPL). */ enum rig_status_e status; /*!< Driver status. */ @@ -207,42 +207,42 @@ struct amp_caps const rig_ptr_t priv; /*!< Private data. */ const char *amp_model_macro_name; /*!< Model macro name. */ - setting_t has_get_level; /*!< Has get_level capability. */ - setting_t has_set_level; /*!< Has set_level capability. */ + setting_t has_get_level; /*!< List of get levels. */ + setting_t has_set_level; /*!< List of set levels. */ - gran_t level_gran[RIG_SETTING_MAX]; /*!< level granularity */ - gran_t parm_gran[RIG_SETTING_MAX]; /*!< level granularity */ + gran_t level_gran[RIG_SETTING_MAX]; /*!< Level granularity. */ + gran_t parm_gran[RIG_SETTING_MAX]; /*!< Parameter granularity. */ /* * Amp Admin API * */ - int (*amp_init)(AMP *amp); /*!< Initializes data structures and returns an #AMP handle--call before amp_open(). */ - int (*amp_cleanup)(AMP *amp); /*!< Frees the data structures associated with the #AMP handle--call after amp_close(). */ - int (*amp_open)(AMP *amp); /*!< Opens the communication channel to the amplifier. */ - int (*amp_close)(AMP *amp); /*!< Closes the communication channel to the amplifier. */ + int (*amp_init)(AMP *amp); /*!< Pointer to backend implementation of ::amp_init(). */ + int (*amp_cleanup)(AMP *amp); /*!< Pointer to backend implementation of ::amp_cleanup(). */ + int (*amp_open)(AMP *amp); /*!< Pointer to backend implementation of ::amp_open(). */ + int (*amp_close)(AMP *amp); /*!< Pointer to backend implementation of ::amp_close(). */ - int (*set_freq)(AMP *amp, freq_t val); /*!< Set the frequency of the amplifier. */ - int (*get_freq)(AMP *amp, freq_t *val); /*!< Query the frequency of the amplifier. */ + int (*set_freq)(AMP *amp, freq_t val); /*!< Pointer to backend implementation of ::amp_set_freq(). */ + int (*get_freq)(AMP *amp, freq_t *val); /*!< Pointer to backend implementation of ::amp_get_freq(). */ - int (*set_conf)(AMP *amp, token_t token, const char *val); /*!< Set the configuration parameter \a val corresponding to the \a token. */ - int (*get_conf)(AMP *amp, token_t token, char *val); /*!< Query the configuration parameter \a val corresponding to the \a token. */ + int (*set_conf)(AMP *amp, token_t token, const char *val); /*!< Pointer to backend implementation of ::amp_set_conf(). */ + int (*get_conf)(AMP *amp, token_t token, char *val); /*!< Pointer to backend implementation of ::amp_get_conf(). */ /* * General API commands, from most primitive to least.. :() * List Set/Get functions pairs */ - int (*reset)(AMP *amp, amp_reset_t reset); /*!< Reset the amplifier (careful!). */ - int (*get_level)(AMP *amp, setting_t level, value_t *val); /*!< Query the \a val corresponding to the \a level. */ - int (*get_ext_level)(AMP *amp, token_t level, value_t *val); /*!< Query the \a val corresponding to the extra \a level. */ - int (*set_powerstat)(AMP *amp, powerstat_t status); /*!< Turn the amplifier On or Off or toggle the Standby or Operate status. */ - int (*get_powerstat)(AMP *amp, powerstat_t *status); /*!< Query the power or standby status of the amplifier. */ + int (*reset)(AMP *amp, amp_reset_t reset); /*!< Pointer to backend implementation of ::amp_reset(). */ + int (*get_level)(AMP *amp, setting_t level, value_t *val); /*!< Pointer to backend implementation of ::amp_get_level(). */ + int (*get_ext_level)(AMP *amp, token_t level, value_t *val); /*!< Pointer to backend implementation of ::amp_get_ext_level(). */ + int (*set_powerstat)(AMP *amp, powerstat_t status); /*!< Pointer to backend implementation of ::amp_set_powerstat(). */ + int (*get_powerstat)(AMP *amp, powerstat_t *status); /*!< Pointer to backend implementation of ::amp_get_powerstat(). */ /* get firmware info, etc. */ - const char *(*get_info)(AMP *amp); /*!< Query available internal information of the amplifier (firmware version, etc.). */ + const char *(*get_info)(AMP *amp); /*!< Pointer to backend implementation of ::amp_get_info(). */ //! @cond Doxygen_Suppress setting_t levels; @@ -251,19 +251,19 @@ struct amp_caps const struct confparams *extlevels; /*!< Extra levels structure. */ const struct confparams *extparms; /*!< Extra parameters structure. */ - const char *macro_name; /*!< Macro name. */ + const char *macro_name; /*!< Amplifier model macro name. */ }; /** * \struct amp_state - * \brief Amplifier state + * \brief Amplifier state structure * * This structure contains live data, as well as a copy of capability fields - * that may be updated (ie. customized) + * that may be updated, i.e. customized while the #AMP handle is instantiated. * - * It is fine to move fields around, as this kind of struct should - * not be initialized like caps are. + * It is fine to move fields around, as this kind of struct should not be + * initialized like amp_caps are. */ struct amp_state { @@ -280,26 +280,23 @@ struct amp_state rig_ptr_t priv; /*!< Pointer to private amplifier state data. */ rig_ptr_t obj; /*!< Internal use by hamlib++ for event handling. */ -//! @cond Doxygen_Suppress - setting_t has_get_level; -//! @endcond + setting_t has_get_level; /*!< List of get levels. */ - gran_t level_gran[RIG_SETTING_MAX]; /*!< level granularity */ - gran_t parm_gran[RIG_SETTING_MAX]; /*!< level granularity */ + gran_t level_gran[RIG_SETTING_MAX]; /*!< Level granularity. */ + gran_t parm_gran[RIG_SETTING_MAX]; /*!< Parameter granularity. */ }; /** * \struct amp - * \brief Amplifier structure - * - * Master amplifier data structure acting as a handle for the - * controlled amplifier. + * \brief Master amplifier structure * - * A pointer to this structure is returned by the amp_init() API function and - * is passed as a parameter to every amplifier specific API call. + * Master amplifier data structure acting as the #AMP handle for the + * controlled amplifier. A pointer to this structure is returned by the + * amp_init() API function and is passed as a parameter to every amplifier + * specific API call. * - * \sa amp_caps(), amp_state() + * \sa amp_init(), amp_caps, amp_state */ struct amp { @@ -426,11 +423,11 @@ extern HAMLIB_EXPORT(const char *) amp_strlevel(setting_t); /** - * \def amp_debug - * \brief Convenience macro for generating debugging messages. + * \def amp_debug + * \brief Convenience macro for generating debugging messages. * - * This is an alias of the rig_debug() function call and is used in the same - * manner. + * This is an alias of the rig_debug() function call and is used in the same + * manner. */ #define amp_debug rig_debug commit 5503dddcdde2005f2582cbd5f796a881ec0c0857 Author: Nate Bargmann <n0...@n0...> Date: Thu Feb 11 02:30:24 2021 -0600 Exclude rotclass.h from Doxygen processing Exclude rotclass.h from Doxygen processing for now. diff --git a/doc/hamlib.cfg.in b/doc/hamlib.cfg.in index 5e9b54d2..746d02ba 100644 --- a/doc/hamlib.cfg.in +++ b/doc/hamlib.cfg.in @@ -22,7 +22,8 @@ INPUT = @top_srcdir@/doc/index.doxygen \ @top_srcdir@/src/ EXCLUDE = @top_srcdir@/src/amp_conf.h \ - @top_srcdir@/include/hamlib/ampclass.h + @top_srcdir@/include/hamlib/ampclass.h \ + @top_srcdir@/include/hamlib/rotclass.h INCLUDE_PATH = @top_srcdir@/include commit bcfc54075c1df7c0f58c46bfcd7a803aa20a8945 Merge: 6ffbf168 635ee95f Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Feb 10 17:33:47 2021 -0600 Merge branch 'master' of http://github.com/Hamlib/Hamlib commit 6ffbf168d0cfaea5a4a3291d227028336fe11073 Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Feb 10 17:30:46 2021 -0600 Add get_vfo_list command so rigctl can see available vfos Should allow Log4OM to query VFOB/Sub freq now Another fix to argumenet prompting with rigctl/rigctld Add 2nd line of return for rigerror -- we well gradually be improving error info https://github.com/Hamlib/Hamlib/issues/530 diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index d3fcfd84..b943901f 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -28,6 +28,7 @@ #include <stdio.h> #include <stdarg.h> +#include <string.h> #include <inttypes.h> #include <time.h> @@ -2322,6 +2323,9 @@ extern HAMLIB_EXPORT(int) rig_get_vfo_info HAMLIB_PARAMS((RIG *rig, vfo_t vfo, freq_t *freq, rmode_t *mode, pbwidth_t *width)); +extern HAMLIB_EXPORT(const char *) +rig_get_vfo_list HAMLIB_PARAMS((RIG *rig)); + extern HAMLIB_EXPORT(int) netrigctl_get_vfo_mode HAMLIB_PARAMS((RIG *rig)); @@ -2829,7 +2833,6 @@ extern HAMLIB_EXPORT(int) rig_set_uplink HAMLIB_PARAMS((RIG *rig, int val)); - extern HAMLIB_EXPORT(const char *) rig_get_info HAMLIB_PARAMS((RIG *rig)); @@ -2878,11 +2881,12 @@ rig_need_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level)); // this need to be fairly big to avoid compiler warnings #define DEBUGMSGSAVE_SIZE 24000 extern HAMLIB_EXPORT_VAR(char) debugmsgsave[DEBUGMSGSAVE_SIZE]; // last debug msg +extern HAMLIB_EXPORT_VAR(char) debugmsgsave2[DEBUGMSGSAVE_SIZE]; // last-1 debug msg #ifndef __cplusplus #ifdef __GNUC__ // doing the debug macro with a dummy sprintf allows gcc to check the format string //#define rig_debug(debug_level,fmt,...) { char xxxbuf[16384]="";snprintf(xxxbuf,sizeof(xxxbuf),fmt,__VA_ARGS__);rig_debug(debug_level,fmt,##__VA_ARGS__); } -#define rig_debug(debug_level,fmt,...) { snprintf(debugmsgsave,sizeof(debugmsgsave),fmt,__VA_ARGS__);rig_debug(debug_level,fmt,##__VA_ARGS__); } +#define rig_debug(debug_level,fmt,...) { strcpy(debugmsgsave2, debugmsgsave);snprintf(debugmsgsave,sizeof(debugmsgsave),fmt,__VA_ARGS__);rig_debug(debug_level,fmt,##__VA_ARGS__); } #endif #endif extern HAMLIB_EXPORT(void) diff --git a/src/rig.c b/src/rig.c index 17473c84..620a75d0 100644 --- a/src/rig.c +++ b/src/rig.c @@ -291,6 +291,7 @@ 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"; const char *HAMLIB_API rigerror(int errnum) { @@ -302,11 +303,11 @@ const char *HAMLIB_API rigerror(int errnum) return "ERR_OUT_OF_RANGE"; } - static char msg[25000]; + static char msg[DEBUGMSGSAVE_SIZE*2]; // we have to remove LF from debugmsgsave since calling function controls LF char *p = &debugmsgsave[strlen(debugmsgsave)-1]; if (*p=='\n') *p=0; - snprintf(msg, sizeof(msg), "%.80s\n%.15000s", rigerror_table[errnum], debugmsgsave); + snprintf(msg, sizeof(msg), "%.80s\n%.15000s\n%.15000s", rigerror_table[errnum], debugmsgsave2, debugmsgsave); return msg; } @@ -1604,7 +1605,7 @@ int HAMLIB_API rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq) if (retcode != RIG_OK) { - rig_debug(RIG_DEBUG_ERR, "%s: set_vfo err %.10000s\n", __func__, rigerror(retcode)); + rig_debug(RIG_DEBUG_ERR, "%s: set_vfo(%s) err %.10000s\n", __func__, rig_strvfo(vfo), rigerror(retcode)); RETURNFUNC(retcode); } @@ -5638,6 +5639,27 @@ int HAMLIB_API rig_get_vfo_info(RIG *rig, vfo_t vfo, freq_t *freq, rmode_t *mode RETURNFUNC(retcode); } +/** + * \brief get list of available vfos + * \param rig The rig handle + * + * Retrieves all usable vfo entries for the rig + * + * \return a pointer to a string, e.g. "VFOA VFOB Mem" + * if the operation has been successful, otherwise NULL if an error occurred + */ +const char *HAMLIB_API rig_get_vfo_list(RIG *rig) +{ + ENTERFUNC; + + if (CHECK_RIG_ARG(rig)) + { + RETURNFUNC(NULL); + } + + RETURNFUNC(RIG_OK); +} + /** * \brief get the Hamlib license * diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index edf2db35..2a1a83fa 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -167,6 +167,7 @@ declare_proto_rig(get_mode); declare_proto_rig(set_vfo); declare_proto_rig(get_vfo); declare_proto_rig(get_vfo_info); +declare_proto_rig(get_vfo_list); declare_proto_rig(set_ptt); declare_proto_rig(get_ptt); declare_proto_rig(get_ptt); @@ -332,6 +333,7 @@ static struct test_table test_list[] = { 0xf0, "chk_vfo", ACTION(chk_vfo), ARG_NOVFO, "ChkVFO" }, /* rigctld only--check for VFO mode */ { 0xf2, "set_vfo_opt", ACTION(set_vfo_opt), ARG_NOVFO | ARG_IN, "Status" }, /* turn vfo option on/off */ { 0xf3, "get_vfo_info", ACTION(get_vfo_info), ARG_NOVFO | ARG_IN1 | ARG_OUT3, "VFO", "Freq", "Mode", "Width" }, /* turn vfo option on/off */ + { 0xf4, "get_vfo_list", ACTION(get_vfo_list), ARG_OUT | ARG_NOVFO, "VFOs" }, { 0xf1, "halt", ACTION(halt), ARG_NOVFO }, /* rigctld only--halt the daemon */ { 0x8c, "pause", ACTION(pause), ARG_IN, "Seconds" }, { 0x00, "", NULL }, @@ -721,7 +723,6 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc, if (cmd == '\\') { unsigned char cmd_name[MAXNAMSIZ], *pcmd = cmd_name; - int c_len = MAXNAMSIZ; if (scanfc(fin, "%c", pcmd) < 1) { @@ -729,19 +730,8 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc, return -1; } -#if 1 fscanf(fin, "%s", ++pcmd); while(*++pcmd); -#else - while (c_len-- && (isalnum(*pcmd) || *pcmd == '_')) - { - if (scanfc(fin, "%c", ++pcmd) < 1) - { - rig_debug(RIG_DEBUG_WARN, "%s: nothing to scan#5?\n", __func__); - return -1; - } - } -#endif *pcmd = '\0'; cmd = parse_arg((char *)cmd_name); @@ -2161,6 +2151,10 @@ declare_proto_rig(set_vfo) #endif + if (retval != RIG_OK) + { + rig_debug(RIG_DEBUG_ERR, "%s: set_vfo(%s) failed, requested %s\n", __func__, rig_strvfo(vfo), arg1); + } return retval; } @@ -2221,6 +2215,23 @@ declare_proto_rig(get_vfo_info) RETURNFUNC(retval); } +/* '\get_vfo_list' */ +declare_proto_rig(get_vfo_list) +{ + static char prntbuf[256]; + + rig_sprintf_vfo(prntbuf, rig->state.vfo_list); + + if ((interactive && prompt) || (interactive && !prompt && ext_resp)) + { + fprintf(fout, "%s: ", cmd->arg1); + } + + fprintf(fout, "%s%c", prntbuf[0] ? prntbuf : "None", ext_resp); + + return RIG_OK; +} + /* 'T' */ declare_proto_rig(set_ptt) commit 635ee95f3f55e3c807a53cbd29421933ac657a5f Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Feb 10 17:30:46 2021 -0600 Add get_vfo_list command so rigctl can see available vfos Should allow Log4OM to query VFOB/Sub freq now Another fix to argumenet prompting with rigctl/rigctld https://github.com/Hamlib/Hamlib/issues/530 diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index d3fcfd84..b943901f 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -28,6 +28,7 @@ #include <stdio.h> #include <stdarg.h> +#include <string.h> #include <inttypes.h> #include <time.h> @@ -2322,6 +2323,9 @@ extern HAMLIB_EXPORT(int) rig_get_vfo_info HAMLIB_PARAMS((RIG *rig, vfo_t vfo, freq_t *freq, rmode_t *mode, pbwidth_t *width)); +extern HAMLIB_EXPORT(const char *) +rig_get_vfo_list HAMLIB_PARAMS((RIG *rig)); + extern HAMLIB_EXPORT(int) netrigctl_get_vfo_mode HAMLIB_PARAMS((RIG *rig)); @@ -2829,7 +2833,6 @@ extern HAMLIB_EXPORT(int) rig_set_uplink HAMLIB_PARAMS((RIG *rig, int val)); - extern HAMLIB_EXPORT(const char *) rig_get_info HAMLIB_PARAMS((RIG *rig)); @@ -2878,11 +2881,12 @@ rig_need_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level)); // this need to be fairly big to avoid compiler warnings #define DEBUGMSGSAVE_SIZE 24000 extern HAMLIB_EXPORT_VAR(char) debugmsgsave[DEBUGMSGSAVE_SIZE]; // last debug msg +extern HAMLIB_EXPORT_VAR(char) debugmsgsave2[DEBUGMSGSAVE_SIZE]; // last-1 debug msg #ifndef __cplusplus #ifdef __GNUC__ // doing the debug macro with a dummy sprintf allows gcc to check the format string //#define rig_debug(debug_level,fmt,...) { char xxxbuf[16384]="";snprintf(xxxbuf,sizeof(xxxbuf),fmt,__VA_ARGS__);rig_debug(debug_level,fmt,##__VA_ARGS__); } -#define rig_debug(debug_level,fmt,...) { snprintf(debugmsgsave,sizeof(debugmsgsave),fmt,__VA_ARGS__);rig_debug(debug_level,fmt,##__VA_ARGS__); } +#define rig_debug(debug_level,fmt,...) { strcpy(debugmsgsave2, debugmsgsave);snprintf(debugmsgsave,sizeof(debugmsgsave),fmt,__VA_ARGS__);rig_debug(debug_level,fmt,##__VA_ARGS__); } #endif #endif extern HAMLIB_EXPORT(void) diff --git a/src/rig.c b/src/rig.c index 17473c84..620a75d0 100644 --- a/src/rig.c +++ b/src/rig.c @@ -291,6 +291,7 @@ 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"; const char *HAMLIB_API rigerror(int errnum) { @@ -302,11 +303,11 @@ const char *HAMLIB_API rigerror(int errnum) return "ERR_OUT_OF_RANGE"; } - static char msg[25000]; + static char msg[DEBUGMSGSAVE_SIZE*2]; // we have to remove LF from debugmsgsave since calling function controls LF char *p = &debugmsgsave[strlen(debugmsgsave)-1]; if (*p=='\n') *p=0; - snprintf(msg, sizeof(msg), "%.80s\n%.15000s", rigerror_table[errnum], debugmsgsave); + snprintf(msg, sizeof(msg), "%.80s\n%.15000s\n%.15000s", rigerror_table[errnum], debugmsgsave2, debugmsgsave); return msg; } @@ -1604,7 +1605,7 @@ int HAMLIB_API rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq) if (retcode != RIG_OK) { - rig_debug(RIG_DEBUG_ERR, "%s: set_vfo err %.10000s\n", __func__, rigerror(retcode)); + rig_debug(RIG_DEBUG_ERR, "%s: set_vfo(%s) err %.10000s\n", __func__, rig_strvfo(vfo), rigerror(retcode)); RETURNFUNC(retcode); } @@ -5638,6 +5639,27 @@ int HAMLIB_API rig_get_vfo_info(RIG *rig, vfo_t vfo, freq_t *freq, rmode_t *mode RETURNFUNC(retcode); } +/** + * \brief get list of available vfos + * \param rig The rig handle + * + * Retrieves all usable vfo entries for the rig + * + * \return a pointer to a string, e.g. "VFOA VFOB Mem" + * if the operation has been successful, otherwise NULL if an error occurred + */ +const char *HAMLIB_API rig_get_vfo_list(RIG *rig) +{ + ENTERFUNC; + + if (CHECK_RIG_ARG(rig)) + { + RETURNFUNC(NULL); + } + + RETURNFUNC(RIG_OK); +} + /** * \brief get the Hamlib license * diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index edf2db35..2a1a83fa 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -167,6 +167,7 @@ declare_proto_rig(get_mode); declare_proto_rig(set_vfo); declare_proto_rig(get_vfo); declare_proto_rig(get_vfo_info); +declare_proto_rig(get_vfo_list); declare_proto_rig(set_ptt); declare_proto_rig(get_ptt); declare_proto_rig(get_ptt); @@ -332,6 +333,7 @@ static struct test_table test_list[] = { 0xf0, "chk_vfo", ACTION(chk_vfo), ARG_NOVFO, "ChkVFO" }, /* rigctld only--check for VFO mode */ { 0xf2, "set_vfo_opt", ACTION(set_vfo_opt), ARG_NOVFO | ARG_IN, "Status" }, /* turn vfo option on/off */ { 0xf3, "get_vfo_info", ACTION(get_vfo_info), ARG_NOVFO | ARG_IN1 | ARG_OUT3, "VFO", "Freq", "Mode", "Width" }, /* turn vfo option on/off */ + { 0xf4, "get_vfo_list", ACTION(get_vfo_list), ARG_OUT | ARG_NOVFO, "VFOs" }, { 0xf1, "halt", ACTION(halt), ARG_NOVFO }, /* rigctld only--halt the daemon */ { 0x8c, "pause", ACTION(pause), ARG_IN, "Seconds" }, { 0x00, "", NULL }, @@ -721,7 +723,6 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc, if (cmd == '\\') { unsigned char cmd_name[MAXNAMSIZ], *pcmd = cmd_name; - int c_len = MAXNAMSIZ; if (scanfc(fin, "%c", pcmd) < 1) { @@ -729,19 +730,8 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc, return -1; } -#if 1 fscanf(fin, "%s", ++pcmd); while(*++pcmd); -#else - while (c_len-- && (isalnum(*pcmd) || *pcmd == '_')) - { - if (scanfc(fin, "%c", ++pcmd) < 1) - { - rig_debug(RIG_DEBUG_WARN, "%s: nothing to scan#5?\n", __func__); - return -1; - } - } -#endif *pcmd = '\0'; cmd = parse_arg((char *)cmd_name); @@ -2161,6 +2151,10 @@ declare_proto_rig(set_vfo) #endif + if (retval != RIG_OK) + { + rig_debug(RIG_DEBUG_ERR, "%s: set_vfo(%s) failed, requested %s\n", __func__, rig_strvfo(vfo), arg1); + } return retval; } @@ -2221,6 +2215,23 @@ declare_proto_rig(get_vfo_info) RETURNFUNC(retval); } +/* '\get_vfo_list' */ +declare_proto_rig(get_vfo_list) +{ + static char prntbuf[256]; + + rig_sprintf_vfo(prntbuf, rig->state.vfo_list); + + if ((interactive && prompt) || (interactive && !prompt && ext_resp)) + { + fprintf(fout, "%s: ", cmd->arg1); + } + + fprintf(fout, "%s%c", prntbuf[0] ? prntbuf : "None", ext_resp); + + return RIG_OK; +} + /* 'T' */ declare_proto_rig(set_ptt) ----------------------------------------------------------------------- Summary of changes: doc/hamlib.cfg.in | 3 +- include/hamlib/amplifier.h | 149 ++++++++-------- include/hamlib/rig.h | 8 +- include/hamlib/rotator.h | 410 ++++++++++++++++++++++++--------------------- src/rig.c | 28 +++- tests/rigctl_parse.c | 35 ++-- 6 files changed, 349 insertions(+), 284 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-02-10 18:46:53
|
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 02fffca989756b1bd2c205666f78deb2867be459 (commit) via 9251dfa909f5a8e9fec7828bd5549ef47dc739a7 (commit) via 5b59868191740ba9f4b0057d2d5597a3d2442f9c (commit) from cfaa761c83ef6d785a139b50dcf899a8a3e54eca (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 02fffca989756b1bd2c205666f78deb2867be459 Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Feb 10 12:44:00 2021 -0600 Update currVFO cache freq before figuring out the real vfo in rig.c diff --git a/src/rig.c b/src/rig.c index adba32ac..17473c84 100644 --- a/src/rig.c +++ b/src/rig.c @@ -1371,7 +1371,13 @@ static int set_cache_freq(RIG *rig, vfo_t vfo, freq_t freq) rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s, current_vfo=%s\n", __func__, rig_strvfo(vfo), rig_strvfo(rig->state.current_vfo)); - if (vfo == RIG_VFO_CURR) { vfo = rig->state.current_vfo; } + if (vfo == RIG_VFO_CURR) + { + // if CURR then update this before we figure out the real VFO + rig->state.cache.freqCurr = freq; + elapsed_ms(&rig->state.cache.time_freqCurr, HAMLIB_ELAPSED_SET); + vfo = rig->state.current_vfo; + } rig_debug(RIG_DEBUG_TRACE, "%s: set vfo=%s to freq=%.0f\n", __func__, rig_strvfo(vfo), freq); commit 9251dfa909f5a8e9fec7828bd5549ef47dc739a7 Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Feb 10 12:35:50 2021 -0600 FIx rigctl/rigctl parsing of extended commands and arg prompting https://github.com/Hamlib/Hamlib/issues/530 diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index aa31f355..edf2db35 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -729,6 +729,10 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc, return -1; } +#if 1 + fscanf(fin, "%s", ++pcmd); + while(*++pcmd); +#else while (c_len-- && (isalnum(*pcmd) || *pcmd == '_')) { if (scanfc(fin, "%c", ++pcmd) < 1) @@ -737,6 +741,7 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc, return -1; } } +#endif *pcmd = '\0'; cmd = parse_arg((char *)cmd_name); commit 5b59868191740ba9f4b0057d2d5597a3d2442f9c Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Feb 9 15:41:33 2021 -0600 Add resetting of all VFO caches via set_cache_freq using RIG_VFO_ALL https://github.com/Hamlib/Hamlib/issues/539 diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 96ded4ba..d3fcfd84 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -442,6 +442,10 @@ typedef unsigned int vfo_t; /** \brief \c Flag to set if VFO can transmit */ #define RIG_VFO_TX_FLAG RIG_VFO_N(30) + +/** \brief \c Flag to set all VFOS */ +#define RIG_VFO_ALL RIG_VFO_N(31) + // we and also use RIG_VFO_N(31) if needed // Misc VFO Macros diff --git a/src/rig.c b/src/rig.c index 8f8aff38..adba32ac 100644 --- a/src/rig.c +++ b/src/rig.c @@ -1377,6 +1377,14 @@ static int set_cache_freq(RIG *rig, vfo_t vfo, freq_t freq) switch (vfo) { + case RIG_VFO_ALL: // we'll use NONE to reset all VFO caches + elapsed_ms(&rig->state.cache.time_freqCurr, HAMLIB_ELAPSED_INVALIDATE); + elapsed_ms(&rig->state.cache.time_freqMainA, HAMLIB_ELAPSED_INVALIDATE); + elapsed_ms(&rig->state.cache.time_freqMainB, HAMLIB_ELAPSED_INVALIDATE); + elapsed_ms(&rig->state.cache.time_freqSubA, HAMLIB_ELAPSED_INVALIDATE); + elapsed_ms(&rig->state.cache.time_freqSubB, HAMLIB_ELAPSED_INVALIDATE); + elapsed_ms(&rig->state.cache.time_freqMem, HAMLIB_ELAPSED_INVALIDATE); + break; case RIG_VFO_CURR: rig->state.cache.freqCurr = freq; elapsed_ms(&rig->state.cache.time_freqCurr, HAMLIB_ELAPSED_SET); @@ -1622,6 +1630,7 @@ int HAMLIB_API rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq) ) { elapsed_ms(&rig->state.cache.time_freq, HAMLIB_ELAPSED_INVALIDATE); + set_cache_freq(rig, RIG_VFO_ALL, (freq_t)0); retcode = rig_get_freq(rig, vfo, &freq_new); if (retcode != RIG_OK) { RETURNFUNC(retcode); } ----------------------------------------------------------------------- Summary of changes: include/hamlib/rig.h | 4 ++++ src/rig.c | 17 ++++++++++++++++- tests/rigctl_parse.c | 5 +++++ 3 files changed, 25 insertions(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-02-09 18:28:33
|
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 cfaa761c83ef6d785a139b50dcf899a8a3e54eca (commit) via a23a3b48821da4edc3b0fbd133be4fe63d2b80ee (commit) from 2bb74f77d2be23c9d2f31a9cd4fe36d604155827 (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 cfaa761c83ef6d785a139b50dcf899a8a3e54eca Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Feb 9 12:25:12 2021 -0600 Fix caching of bad IF response for Kenwood rigs Update cache calls to use the enum values in kenwood.c diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index 2f3609b4..6d38b120 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -260,7 +260,7 @@ int kenwood_transaction(RIG *rig, const char *cmdstr, char *data, { int cache_age_ms; - cache_age_ms = elapsed_ms(&priv->cache_start, 0); + cache_age_ms = elapsed_ms(&priv->cache_start, HAMLIB_ELAPSED_GET); if (cache_age_ms < 500) // 500ms cache time { @@ -548,7 +548,7 @@ transaction_quit: // update the cache if (retval == RIG_OK && strcmp(cmdstr, "IF") == 0) { - elapsed_ms(&priv->cache_start, 1); + elapsed_ms(&priv->cache_start, HAMLIB_ELAPSED_SET); strncpy(priv->last_if_response, buffer, caps->if_len); } @@ -613,10 +613,12 @@ int kenwood_safe_transaction(RIG *rig, const char *cmd, char *buf, if (checklen && length != expected) /* worth retrying as some rigs occasionally send short results */ { + struct kenwood_priv_data *priv = rig->state.priv; rig_debug(RIG_DEBUG_ERR, "%s: wrong answer; len for cmd %s: expected = %d, got %d\n", __func__, cmd, (int)expected, (int)length); err = -RIG_EPROTO; + elapsed_ms(&priv->cache_start, HAMLIB_ELAPSED_INVALIDATE); hl_usleep(50 * 1000); // let's do a short wait } } diff --git a/rigs/kenwood/kenwood.h b/rigs/kenwood/kenwood.h index 7382156d..83553879 100644 --- a/rigs/kenwood/kenwood.h +++ b/rigs/kenwood/kenwood.h @@ -27,7 +27,7 @@ #include <string.h> #include "token.h" -#define BACKEND_VER "20201231" +#define BACKEND_VER "20210209" #define EOM_KEN ';' #define EOM_TH '\r' commit a23a3b48821da4edc3b0fbd133be4fe63d2b80ee Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Feb 8 17:36:48 2021 -0600 Add a little debug to rig.c https://github.com/Hamlib/Hamlib/issues/539 diff --git a/src/rig.c b/src/rig.c index 0dcda745..8f8aff38 100644 --- a/src/rig.c +++ b/src/rig.c @@ -1373,6 +1373,8 @@ static int set_cache_freq(RIG *rig, vfo_t vfo, freq_t freq) if (vfo == RIG_VFO_CURR) { vfo = rig->state.current_vfo; } + rig_debug(RIG_DEBUG_TRACE, "%s: set vfo=%s to freq=%.0f\n", __func__, rig_strvfo(vfo), freq); + switch (vfo) { case RIG_VFO_CURR: @@ -1433,6 +1435,8 @@ static int get_cache_freq(RIG *rig, vfo_t vfo, freq_t *freq, int *cache_ms) if (vfo == RIG_VFO_CURR) { vfo = rig->state.current_vfo; } + rig_debug(RIG_DEBUG_TRACE, "%s: get vfo=%s\n", __func__, rig_strvfo(vfo)); + // VFO_C to be implemented switch (vfo) { ----------------------------------------------------------------------- Summary of changes: rigs/kenwood/kenwood.c | 6 ++++-- rigs/kenwood/kenwood.h | 2 +- src/rig.c | 4 ++++ 3 files changed, 9 insertions(+), 3 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-02-08 23:32:07
|
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 2bb74f77d2be23c9d2f31a9cd4fe36d604155827 (commit) from 306345442cc5a16ee04e3ac277ced75454892385 (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 2bb74f77d2be23c9d2f31a9cd4fe36d604155827 Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Feb 8 17:31:43 2021 -0600 Fix debug msg formatting in rig.c diff --git a/src/rig.c b/src/rig.c index c69f0259..0dcda745 100644 --- a/src/rig.c +++ b/src/rig.c @@ -1625,7 +1625,7 @@ int HAMLIB_API rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq) if (freq_new != freq) { - rig_debug(RIG_DEBUG_TRACE, "%s: Asked freq=%.0fg, got freq=%.0fg\n", __func__, + rig_debug(RIG_DEBUG_TRACE, "%s: Asked freq=%.0f, got freq=%.0f\n", __func__, freq, freq_new); } ----------------------------------------------------------------------- Summary of changes: src/rig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-02-08 23:02:40
|
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 306345442cc5a16ee04e3ac277ced75454892385 (commit) via 54aca796718be1c289c9ca1d6c04e6e4fc7a0c9f (commit) via 360704908b212718de23fd258e0fa0166dec59f5 (commit) from 31b28202ee13dd2a83d9ff2597cf814982afb2d8 (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 306345442cc5a16ee04e3ac277ced75454892385 Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Feb 8 16:59:07 2021 -0600 Fix 2nd argument parsing in rigctl_parse.c diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 9ccbd83e..aa31f355 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -948,7 +948,6 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc, if (interactive) { - int index = 1; arg1[0] = fgetc(fin); arg1[1] = 0; rig_debug(RIG_DEBUG_TRACE, "%s: debug4 arg1=%c\n", __func__, arg1[0]); @@ -956,10 +955,9 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc, if (prompt && arg1[0] == 0x0a) { fprintf_flush(fout, "%s: ", cmd_entry->arg1); - index = 0; } - if (scanfc(fin, "%s", &arg1[index]) < 1) + if (scanfc(fin, "%s", arg1) < 1) { rig_debug(RIG_DEBUG_WARN, "%s: nothing to scan#8?\n", __func__); return -1; commit 54aca796718be1c289c9ca1d6c04e6e4fc7a0c9f Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Feb 8 16:29:04 2021 -0600 Change ptt check in newcat.c set_freq to check ptt only for affected rigs https://github.com/Hamlib/Hamlib/issues/540 diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index b5c9174f..fd013bd4 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -787,20 +787,17 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) if (vfo != rig->state.tx_vfo) return -RIG_ENTARGET; } - ptt_t ptt; - if (RIG_OK != (err = newcat_get_ptt(rig, vfo, &ptt))) + if (is_ftdx3000 || is_ftdx5000) { - ERRMSG(err, "newcat_set_cmd failed"); - RETURNFUNC(err); - } - - if (ptt == RIG_PTT_ON) // we have a few rigs that can't set TX VFO while PTT_ON - { - // should be true whether we're on VFOA or VFOB but only restricting VFOB right now - // we return RIG_OK as we dont' want - if (is_ftdx3000) { return RIG_ENTARGET; } + // we have a few rigs that can't set freq while PTT_ON + ptt_t ptt; + if (RIG_OK != (err = newcat_get_ptt(rig, vfo, &ptt))) + { + ERRMSG(err, "newcat_set_cmd failed"); + RETURNFUNC(err); + } - if (is_ftdx5000) { return RIG_ENTARGET; } + if (ptt) { return RIG_ENTARGET; } } if (RIG_MODEL_FT450 == caps->rig_model) diff --git a/src/rig.c b/src/rig.c index 3fe55bc7..c69f0259 100644 --- a/src/rig.c +++ b/src/rig.c @@ -1839,6 +1839,30 @@ int HAMLIB_API rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) RETURNFUNC(retcode); } +/** + * \brief get the frequency of VFOA and VFOB + * \param rig The rig handle + * \param freqA The location where to store the VFOA/Main frequency + * \param freqB The location where to store the VFOB/Sub frequency + * + * Retrieves the frequency of VFOA/Main and VFOB/Sub + * 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 + * a negative value if an error occurred (in which case, cause is + * set appropriately). + * + * \sa rig_set_freq() + */ +int HAMLIB_API rig_get_freqs(RIG *rig, freq_t *freqA, freq_t freqB) +{ + // we will attempt to avoid vfo swapping in this routine + + return -RIG_ENIMPL; + +} + /** * \brief set the mode of the target VFO commit 360704908b212718de23fd258e0fa0166dec59f5 Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Feb 8 16:01:51 2021 -0600 Change newcat.c ptt check to get_ptt instead of cache Signalink was hanging on to PTT just a bit longer than the CAT ptt https://github.com/Hamlib/Hamlib/issues/540 diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 16e60894..b5c9174f 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -787,8 +787,14 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) if (vfo != rig->state.tx_vfo) return -RIG_ENTARGET; } - if (rig->state.cache.ptt == - RIG_PTT_ON) // we have a few rigs that can't set TX VFO while PTT_ON + ptt_t ptt; + if (RIG_OK != (err = newcat_get_ptt(rig, vfo, &ptt))) + { + ERRMSG(err, "newcat_set_cmd failed"); + RETURNFUNC(err); + } + + if (ptt == RIG_PTT_ON) // we have a few rigs that can't set TX VFO while PTT_ON { // should be true whether we're on VFOA or VFOB but only restricting VFOB right now // we return RIG_OK as we dont' want diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h index 1cef76dc..b74821ea 100644 --- a/rigs/yaesu/newcat.h +++ b/rigs/yaesu/newcat.h @@ -50,7 +50,7 @@ typedef char ncboolean; /* shared function version */ -#define NEWCAT_VER "20210130" +#define NEWCAT_VER "20210208" /* Hopefully large enough for future use, 128 chars plus '\0' */ #define NEWCAT_DATA_LEN 129 ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/newcat.c | 15 +++++++++------ rigs/yaesu/newcat.h | 2 +- src/rig.c | 24 ++++++++++++++++++++++++ tests/rigctl_parse.c | 4 +--- 4 files changed, 35 insertions(+), 10 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-02-08 18:56:54
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 31b28202ee13dd2a83d9ff2597cf814982afb2d8 (commit) via ad9d464822dbc1b7937edd56d5e15ebe2f1f4edf (commit) via 65a9895361109a3a2eb77d3b5b4f407a27ac755e (commit) from cd77d8f22d3fbc1e9fd2170abef0c2f2a7b017ae (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 31b28202ee13dd2a83d9ff2597cf814982afb2d8 Merge: ad9d4648 cd77d8f2 Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Feb 8 12:55:24 2021 -0600 Merge branch 'master' of https://github.com/Hamlib/Hamlib commit ad9d464822dbc1b7937edd56d5e15ebe2f1f4edf Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Feb 8 12:54:33 2021 -0600 Remove MainC from caching due to effect on rig_caps structure offsets https://github.com/Hamlib/Hamlib/issues/537 diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 508fd2c3..96ded4ba 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -2077,7 +2077,9 @@ struct rig_cache { freq_t freqCurr; // VFO_CURR freq_t freqMainA; // VFO_A, VFO_MAIN, and VFO_MAINA freq_t freqMainB; // VFO_B, VFO_SUB, and VFO_MAINB +#if 0 freq_t freqMainC; // VFO_C, VFO_MAINC +#endif freq_t freqSubA; // VFO_SUBA -- only for rigs with dual Sub VFOs freq_t freqSubB; // VFO_SUBB -- only for rigs with dual Sub VFOs freq_t freqMem; // VFO_MEM -- last MEM channel @@ -2093,7 +2095,9 @@ struct rig_cache { struct timespec time_freqCurr; struct timespec time_freqMainA; struct timespec time_freqMainB; +#if 0 struct timespec time_freqMainC; +#endif struct timespec time_freqSubA; struct timespec time_freqSubB; struct timespec time_freqMem; diff --git a/src/misc.h b/src/misc.h index 085ceb62..e561a9e1 100644 --- a/src/misc.h +++ b/src/misc.h @@ -144,12 +144,14 @@ void errmsg(int err, char *s, const char *func, const char *file, int line); #define ENTERFUNC rig_debug(RIG_DEBUG_VERBOSE, "%s(%d):%s entered\n", __FILENAME__, __LINE__, __func__) #define RETURNFUNC(rc) {rig_debug(RIG_DEBUG_VERBOSE, "%s(%d):%s return\n", __FILENAME__, __LINE__, __func__);return rc;} +#if 0 // 5.0 + elapsed_ms(&rig->state.cache.time_freqMainC, HAMLIB_ELAPSED_INVALIDATE); +#endif #define CACHE_RESET {\ elapsed_ms(&rig->state.cache.time_freq, HAMLIB_ELAPSED_INVALIDATE);\ elapsed_ms(&rig->state.cache.time_freqCurr, HAMLIB_ELAPSED_INVALIDATE);\ elapsed_ms(&rig->state.cache.time_freqMainA, HAMLIB_ELAPSED_INVALIDATE);\ elapsed_ms(&rig->state.cache.time_freqMainB, HAMLIB_ELAPSED_INVALIDATE);\ - elapsed_ms(&rig->state.cache.time_freqMainC, HAMLIB_ELAPSED_INVALIDATE);\ elapsed_ms(&rig->state.cache.time_freqSubA, HAMLIB_ELAPSED_INVALIDATE);\ elapsed_ms(&rig->state.cache.time_freqSubB, HAMLIB_ELAPSED_INVALIDATE);\ elapsed_ms(&rig->state.cache.time_vfo, HAMLIB_ELAPSED_INVALIDATE);\ diff --git a/src/rig.c b/src/rig.c index 4629f781..3fe55bc7 100644 --- a/src/rig.c +++ b/src/rig.c @@ -1394,10 +1394,12 @@ static int set_cache_freq(RIG *rig, vfo_t vfo, freq_t freq) elapsed_ms(&rig->state.cache.time_freqMainB, HAMLIB_ELAPSED_SET); break; +#if 0 // 5.0 case RIG_VFO_C: // is there a MainC/SubC we need to cover? rig->state.cache.freqMainC = freq; elapsed_ms(&rig->state.cache.time_freqMainC, HAMLIB_ELAPSED_SET); break; +#endif case RIG_VFO_SUB_A: rig->state.cache.freqSubA = freq; @@ -1462,11 +1464,13 @@ static int get_cache_freq(RIG *rig, vfo_t vfo, freq_t *freq, int *cache_ms) *cache_ms = elapsed_ms(&rig->state.cache.time_freqSubB, HAMLIB_ELAPSED_GET); break; +#if 0 // 5.0 case RIG_VFO_C: //case RIG_VFO_MAINC: // not used by any rig yet *freq = rig->state.cache.freqMainC; *cache_ms = elapsed_ms(&rig->state.cache.time_freqMainC, HAMLIB_ELAPSED_GET); break; +#endif #if 0 // no known rigs use this yet case RIG_VFO_SUBC: commit 65a9895361109a3a2eb77d3b5b4f407a27ac755e Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Feb 8 12:54:10 2021 -0600 Fix c++ make check when -static flag is used diff --git a/c++/Makefile.am b/c++/Makefile.am index 2f313af1..f295fb4a 100644 --- a/c++/Makefile.am +++ b/c++/Makefile.am @@ -1,13 +1,14 @@ lib_LTLIBRARIES = libhamlib++.la libhamlib___la_SOURCES = rigclass.cc rotclass.cc -libhamlib___la_LDFLAGS = -no-undefined -version-info $(ABI_VERSION):$(ABI_REVISION):$(ABI_AGE) +libhamlib___la_LDFLAGS = -no-undefined -version-info $(ABI_VERSION):$(ABI_REVISION):$(ABI_AGE) $(LDFLAGS) libhamlib___la_LIBADD = $(top_builddir)/src/libhamlib.la +AM_CXXFLAGS=$(CXXFLAGS) check_PROGRAMS = testcpp testcpp_SOURCES = testcpp.cc -testcpp_LDADD = libhamlib++.la +testcpp_LDADD = libhamlib++.la $(top_builddir)/src/libhamlib.la $(top_builddir)/lib/libmisc.la $(DL_LIBS) testcpp_DEPENDENCIES = libhamlib++.la check_SCRIPTS = testcpp.sh ----------------------------------------------------------------------- Summary of changes: c++/Makefile.am | 5 +++-- include/hamlib/rig.h | 4 ++++ src/misc.h | 4 +++- src/rig.c | 4 ++++ 4 files changed, 14 insertions(+), 3 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Nate B. <n0...@us...> - 2021-02-08 18:54:50
|
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 cd77d8f22d3fbc1e9fd2170abef0c2f2a7b017ae (commit) via 7b32e58a7634fbb445d7f59bfcdcaecb3c83c8ac (commit) via f4899caf179cfa5e15e3a4974541b82ed8bb5a1c (commit) via b97b4218cb5729f03e6ce069e252b4c9e145d243 (commit) via 30c04fabd40334c6f44778e6f19f335f13ea96e6 (commit) from b3c23f82ef21de29aa275e22e7bbf33335946412 (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 cd77d8f22d3fbc1e9fd2170abef0c2f2a7b017ae Merge: b3c23f82 7b32e58a Author: Nate Bargmann <n0...@n0...> Date: Mon Feb 8 12:53:56 2021 -0600 Merge pull request #538 from N0NB/doxygen_work Doxygen work commit 7b32e58a7634fbb445d7f59bfcdcaecb3c83c8ac Author: Nate Bargmann <n0...@n0...> Date: Mon Feb 8 12:48:47 2021 -0600 Exclude ampclass.h from Doxygen processing Exclude ampclass.h from Doxygen processing for now. diff --git a/doc/hamlib.cfg.in b/doc/hamlib.cfg.in index f25cb678..5e9b54d2 100644 --- a/doc/hamlib.cfg.in +++ b/doc/hamlib.cfg.in @@ -21,7 +21,8 @@ INPUT = @top_srcdir@/doc/index.doxygen \ @top_srcdir@/include/hamlib/ \ @top_srcdir@/src/ -EXCLUDE = @top_srcdir@/src/amp_conf.h +EXCLUDE = @top_srcdir@/src/amp_conf.h \ + @top_srcdir@/include/hamlib/ampclass.h INCLUDE_PATH = @top_srcdir@/include commit f4899caf179cfa5e15e3a4974541b82ed8bb5a1c Author: Nate Bargmann <n0...@n0...> Date: Mon Feb 8 12:41:40 2021 -0600 Update public API Doxygen comments in amp_settings.c diff --git a/src/amp_settings.c b/src/amp_settings.c index 7f29064e..97cbb954 100644 --- a/src/amp_settings.c +++ b/src/amp_settings.c @@ -1,20 +1,7 @@ -/** - * \addtogroup amplifier - * @{ - */ - -/** - * \file amp_settings.c - * \brief amplifiter func/level/parm interface - * \author Stephane Fillod - * \date 2000-2010 - * - * Hamlib interface is a frontend implementing wrapper functions. - */ - /* * Hamlib Interface - amplifier func/level/parm * Copyright (c) 2000-2010 by Stephane Fillod + * Copyright (c) 2020 by Mikael Nousiainen * * * This library is free software; you can redistribute it and/or @@ -33,6 +20,23 @@ * */ + +/** + * \addtogroup amplifier + * @{ + */ + +/** + * \file amp_settings.c + * \brief amplifiter func/level/parm interface + * \author Stephane Fillod + * \date 2000-2010 + * \author Mikael Nousiainen + * \date 2020 + * + * Hamlib interface is a frontend implementing wrapper functions. + */ + #ifdef HAVE_CONFIG_H # include "config.h" #endif @@ -44,17 +48,17 @@ /** - * \brief check retrieval ability of level settings - * \param amp The amp handle - * \param level The level settings + * \brief Check retrieval ability of level settings. + * \param amp The #AMP handle. + * \param level The level settings to check. * - * Checks if an amp is capable of *getting* a level setting. - * Since the \a level is an OR'ed bitwise argument, more than - * one level can be checked at the same time. + * Checks if an amplifier is capable of *getting* a level setting. Since the + * \a level is an OR'ed bitwise argument, more than one level can be checked + * at the same time. * - * EXAMPLE: if (amp_has_get_level(my_amp, AMP_LVL_SWR)) disp_SWR(); + * EXAMPLE: \code if (amp_has_get_level(my_amp, AMP_LVL_SWR)) disp_SWR();\endcode * - * \return a bit map of supported level settings that can be retrieved, + * \return A bit map of supported level settings that can be retrieved, * otherwise 0 if none supported. * * \sa amp_has_set_level(), amp_get_level() commit b97b4218cb5729f03e6ce069e252b4c9e145d243 Author: Nate Bargmann <n0...@n0...> Date: Mon Feb 8 12:40:01 2021 -0600 Update public API Doxygen comments in amp_conf.c diff --git a/src/amp_conf.c b/src/amp_conf.c index 21c89847..0d435d34 100644 --- a/src/amp_conf.c +++ b/src/amp_conf.c @@ -109,7 +109,7 @@ static const struct confparams ampfrontend_serial_cfg_params[] = { RIG_CONF_END, NULL, } }; - +//! @cond Doxygen_Suppress /** * \brief Set amplifier state info from alpha input * \param amp @@ -295,8 +295,10 @@ int frontamp_set_conf(AMP *amp, token_t token, const char *val) return RIG_OK; } +//! @endcond +//! @cond Doxygen_Suppress /** * \brief Get data from amplifier state in alpha form * \param amp non-null @@ -430,6 +432,7 @@ int frontamp_get_conf(AMP *amp, token_t token, char *val) return RIG_OK; } +//! @endcond #ifdef XXREMOVEDXXC @@ -489,13 +492,20 @@ int HAMLIB_API amp_token_foreach(AMP *amp, /** - * \brief lookup conf token by its name, return pointer to confparams struct. - * \param amp - * \param name - * \return confparams or NULL + * \brief Query an amplifier configuration parameter token by its name. + * \param amp The #AMP handle. + * \param name Configuration parameter token name (C string). + * + * Use this function to get a pointer to the token in the #confparams + * structure. Searches the backend config params table first, then falls back + * to the frontend config params table. * - * lookup backend config table first, then fall back to frontend. - * TODO: should use Lex to speed it up, strcmp hurts! + * TODO: Should use Lex to speed it up, strcmp() hurts! + * + * \return A pointer to the token in the #confparams structure or NULL if #AMP + * is invalid or token not found (how can the caller know which occurred?). + * + * \sa amp_token_lookup() */ const struct confparams *HAMLIB_API amp_confparam_lookup(AMP *amp, const char *name) @@ -545,10 +555,16 @@ const struct confparams *HAMLIB_API amp_confparam_lookup(AMP *amp, /** - * \brief Simple lookup returning token id associated with name - * \param amp - * \param name - * \return token enum + * \brief Search for the token ID associated with an amplifier configuration parameter token name. + * \param amp The #AMP handle. + * \param name Configuration parameter token name (C string). + * + * Searches the backend and frontend configuration parameters tables for the + * token ID. + * + * \return The token ID value or RIG_CONF_END if the lookup failed. + * + * \sa amp_confparam_lookup() */ token_t HAMLIB_API amp_token_lookup(AMP *amp, const char *name) { @@ -568,16 +584,19 @@ token_t HAMLIB_API amp_token_lookup(AMP *amp, const char *name) /** - * \brief set a amplifier configuration parameter - * \param amp The amp handle - * \param token The parameter - * \param val The value to set the parameter to + * \brief Set an amplifier configuration parameter. + * \param amp The #AMP handle. + * \param token The token of the parameter to set. + * \param val The value to set the parameter to. * - * Sets a configuration parameter. + * Sets an amplifier configuration parameter to \a val. * - * \return RIG_OK if the operation has been successful, otherwise - * a negative value if an error occurred (in which case, cause is - * set appropriately). + * \return RIG_OK if the operation has been successful, otherwise a **negative + * value** if an error occurred (in which case, cause is set appropriately). + * + * \retval RIG_OK The parameter was set successfully. + * \retval RIG_EINVAL The #AMP handle or token was invalid. + * \retval RIG_ENAVAIL amp_caps#set_conf() capability is not available. * * \sa amp_get_conf() */ @@ -620,16 +639,19 @@ int HAMLIB_API amp_set_conf(AMP *amp, token_t token, const char *val) /** - * \brief get the value of a configuration parameter - * \param amp The amp handle - * \param token The parameter - * \param val The location where to store the value of config \a token + * \brief Query the value of an amplifier configuration parameter. + * \param amp The #AMP handle. + * \param token The token of the parameter to query. + * \param val The location where to store the value of configuration \a token. * * Retrieves the value of a configuration parameter associated with \a token. * - * \return RIG_OK if the operation has been successful, otherwise - * a negative value if an error occurred (in which case, cause is - * set appropriately). + * \return RIG_OK if the operation has been successful, otherwise a **negative + * value** if an error occurred (in which case, cause is set appropriately). + * + * \retval RIG_OK Querying the parameter was successful. + * \retval RIG_EINVAL The #AMP handle was invalid. + * \retval RIG_ENAVAIL amp_caps#get_conf() capability is not available. * * \sa amp_set_conf() */ commit 30c04fabd40334c6f44778e6f19f335f13ea96e6 Author: Nate Bargmann <n0...@n0...> Date: Mon Feb 8 12:38:23 2021 -0600 Exclude amp_conf.h from Doxygen processing As amp_conf.h only contains private function declarations exclude it from Doxygen processing for now. diff --git a/doc/hamlib.cfg.in b/doc/hamlib.cfg.in index e2225d8c..f25cb678 100644 --- a/doc/hamlib.cfg.in +++ b/doc/hamlib.cfg.in @@ -21,6 +21,8 @@ INPUT = @top_srcdir@/doc/index.doxygen \ @top_srcdir@/include/hamlib/ \ @top_srcdir@/src/ +EXCLUDE = @top_srcdir@/src/amp_conf.h + INCLUDE_PATH = @top_srcdir@/include EXAMPLE_PATH = @top_srcdir@/tests/testrig.c \ ----------------------------------------------------------------------- Summary of changes: doc/hamlib.cfg.in | 3 +++ src/amp_conf.c | 74 +++++++++++++++++++++++++++++++++++------------------- src/amp_settings.c | 48 +++++++++++++++++++---------------- 3 files changed, 77 insertions(+), 48 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-02-08 16:43:35
|
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 b3c23f82ef21de29aa275e22e7bbf33335946412 (commit) from 02a0f1303c41b1efb319f527f5b3dbb4d75df6ea (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 b3c23f82ef21de29aa275e22e7bbf33335946412 Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Feb 8 10:42:24 2021 -0600 Fix extra VFO: print out when rigctl --vfo is used and VFO argument is given https://github.com/Hamlib/Hamlib/issues/535 diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 363500e4..9ccbd83e 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -840,7 +840,10 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc, { if (interactive) { - if (prompt) + arg1[0] = fgetc(fin); + arg1[1] = 0; + + if (prompt && arg1[0] == 0x0a) { fprintf_flush(fout, "VFO: "); } @@ -945,19 +948,18 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc, if (interactive) { - int c = fgetc(fin); - rig_debug(RIG_DEBUG_TRACE, "%s: debug4 c=%02x\n", __func__, c); + int index = 1; + arg1[0] = fgetc(fin); + arg1[1] = 0; + rig_debug(RIG_DEBUG_TRACE, "%s: debug4 arg1=%c\n", __func__, arg1[0]); - if (prompt && c == 0x0a) + if (prompt && arg1[0] == 0x0a) { fprintf_flush(fout, "%s: ", cmd_entry->arg1); - } - else - { - ungetc(c, fin); + index = 0; } - if (scanfc(fin, "%s", arg1) < 1) + if (scanfc(fin, "%s", &arg1[index]) < 1) { rig_debug(RIG_DEBUG_WARN, "%s: nothing to scan#8?\n", __func__); return -1; ----------------------------------------------------------------------- Summary of changes: tests/rigctl_parse.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: Michael B. <mdb...@us...> - 2021-02-08 05:29:08
|
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 02a0f1303c41b1efb319f527f5b3dbb4d75df6ea (commit) via 0e4bbf85d7bf1e07be2fb5162598cb5d2815d08f (commit) from bc17a749d0bc133fe80f94c0e4fe4ab7a4835072 (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 02a0f1303c41b1efb319f527f5b3dbb4d75df6ea Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Feb 7 23:28:16 2021 -0600 Remove VFO from netrigctl.c get_vfo command diff --git a/rigs/dummy/netrigctl.c b/rigs/dummy/netrigctl.c index cd03aedd..9681eb4a 100644 --- a/rigs/dummy/netrigctl.c +++ b/rigs/dummy/netrigctl.c @@ -830,18 +830,13 @@ static int netrigctl_get_vfo(RIG *rig, vfo_t *vfo) int ret, len; char cmd[CMD_MAX]; char buf[BUF_MAX]; - char vfostr[16] = ""; struct netrigctl_priv_data *priv; rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); priv = (struct netrigctl_priv_data *)rig->state.priv; - ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), RIG_VFO_A); - - if (ret != RIG_OK) { return ret; } - - len = sprintf(cmd, "v%s\n", vfostr); + len = sprintf(cmd, "v\n"); ret = netrigctl_transaction(rig, cmd, len, buf); @@ -2288,7 +2283,7 @@ struct rig_caps netrigctl_caps = RIG_MODEL(RIG_MODEL_NETRIGCTL), .model_name = "NET rigctl", .mfg_name = "Hamlib", - .version = "20210204.0", + .version = "20210207.0", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_OTHER, commit 0e4bbf85d7bf1e07be2fb5162598cb5d2815d08f Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Feb 7 22:44:50 2021 -0600 Add RIG_LEVEL_RFPOWERMETER_WATTS to ic7610.c https://github.com/Hamlib/Hamlib/issues/533 diff --git a/rigs/icom/ic7610.c b/rigs/icom/ic7610.c index 49ac3799..dbb5be53 100644 --- a/rigs/icom/ic7610.c +++ b/rigs/icom/ic7610.c @@ -44,7 +44,7 @@ #define IC7610_FUNCS (RIG_FUNC_NB|RIG_FUNC_COMP|RIG_FUNC_VOX|RIG_FUNC_TONE|RIG_FUNC_TSQL|RIG_FUNC_SBKIN|RIG_FUNC_FBKIN|RIG_FUNC_NR|RIG_FUNC_MON|RIG_FUNC_MN|RIG_FUNC_ANF|RIG_FUNC_LOCK|RIG_FUNC_RIT|RIG_FUNC_XIT|RIG_FUNC_TUNER|RIG_FUNC_APF|RIG_FUNC_DUAL_WATCH) -#define IC7610_LEVELS (RIG_LEVEL_PREAMP|RIG_LEVEL_ATT|RIG_LEVEL_AGC|RIG_LEVEL_COMP|RIG_LEVEL_BKINDL|RIG_LEVEL_BALANCE|RIG_LEVEL_NR|RIG_LEVEL_PBT_IN|RIG_LEVEL_PBT_OUT|RIG_LEVEL_CWPITCH|RIG_LEVEL_RFPOWER|RIG_LEVEL_MICGAIN|RIG_LEVEL_KEYSPD|RIG_LEVEL_NOTCHF_RAW|RIG_LEVEL_SQL|RIG_LEVEL_RAWSTR|RIG_LEVEL_STRENGTH|RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_VOXGAIN|RIG_LEVEL_ANTIVOX|RIG_LEVEL_VOXDELAY|RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_COMP_METER|RIG_LEVEL_VD_METER|RIG_LEVEL_ID_METER|RIG_LEVEL_MONITOR_GAIN|RIG_LEVEL_NB) +#define IC7610_LEVELS (RIG_LEVEL_PREAMP|RIG_LEVEL_ATT|RIG_LEVEL_AGC|RIG_LEVEL_COMP|RIG_LEVEL_BKINDL|RIG_LEVEL_BALANCE|RIG_LEVEL_NR|RIG_LEVEL_PBT_IN|RIG_LEVEL_PBT_OUT|RIG_LEVEL_CWPITCH|RIG_LEVEL_RFPOWER|RIG_LEVEL_MICGAIN|RIG_LEVEL_KEYSPD|RIG_LEVEL_NOTCHF_RAW|RIG_LEVEL_SQL|RIG_LEVEL_RAWSTR|RIG_LEVEL_STRENGTH|RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_VOXGAIN|RIG_LEVEL_ANTIVOX|RIG_LEVEL_VOXDELAY|RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_RFPOWER_METER_WATTS|RIG_LEVEL_COMP_METER|RIG_LEVEL_VD_METER|RIG_LEVEL_ID_METER|RIG_LEVEL_MONITOR_GAIN|RIG_LEVEL_NB) #define IC7610_VFOS (RIG_VFO_MAIN|RIG_VFO_SUB|RIG_VFO_MEM) #define IC7610_PARMS (RIG_PARM_ANN|RIG_PARM_BACKLIGHT) @@ -158,7 +158,7 @@ const struct rig_caps ic7610_caps = RIG_MODEL(RIG_MODEL_IC7610), .model_name = "IC-7610", .mfg_name = "Icom", - .version = BACKEND_VER ".0", + .version = BACKEND_VER ".1", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, ----------------------------------------------------------------------- Summary of changes: rigs/dummy/netrigctl.c | 9 ++------- rigs/icom/ic7610.c | 4 ++-- 2 files changed, 4 insertions(+), 9 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |