hamlib-cvs-digest Mailing List for Ham Radio Control Libraries (Page 20)
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
(47) |
Sep
(38) |
Oct
(5) |
Nov
|
Dec
|
|
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
|
|
From: Nate B. <n0...@us...> - 2021-02-08 02: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 bc17a749d0bc133fe80f94c0e4fe4ab7a4835072 (commit)
via da5662dce350ab1e2331e7286041aef9c865bdba (commit)
from e7f5aa60664d8f39fdb20ba6c2e4f2431e583ca2 (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 bc17a749d0bc133fe80f94c0e4fe4ab7a4835072
Merge: e7f5aa60 da5662dc
Author: Nate Bargmann <n0...@n0...>
Date: Sun Feb 7 20:12:25 2021 -0600
Merge pull request #534 from N0NB/doxygen_work
Enable and update Doxygen comments in amplist.h
commit da5662dce350ab1e2331e7286041aef9c865bdba
Author: Nate Bargmann <n0...@n0...>
Date: Sun Feb 7 20:10:50 2021 -0600
Enable and update Doxygen comments in amplist.h
diff --git a/include/hamlib/amplist.h b/include/hamlib/amplist.h
index 42808d83..b8d094d8 100644
--- a/include/hamlib/amplist.h
+++ b/include/hamlib/amplist.h
@@ -27,6 +27,7 @@
//! @cond Doxygen_Suppress
#define AMP_MAKE_MODEL(a,b) ((a)*100+(b))
#define AMP_BACKEND_NUM(a) ((a)/100)
+//! @endcond
/**
@@ -38,41 +39,48 @@
* \file amplist.h
* \brief Hamlib amplifier model definitions.
*
- * This file contains amplifier model definitions for the Hamlib amplifier 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.
+ * 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
- * whishes to use. It is done with the amp_init() API call.
+ * wishes to use. It is done with the amp_init() API call.
*/
+//! @cond Doxygen_Suppress
#define AMP_MODEL_NONE 0
+//! @endcond
+/*
+ * Hamlib
+ */
/**
* \def AMP_MODEL_DUMMY
* \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.
- */
-/**
+ * 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 Network backend.
+ * \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.
*/
+//! @cond Doxygen_Suppress
#define AMP_DUMMY 0
#define AMP_BACKEND_DUMMY "dummy"
+//! @endcond
#define AMP_MODEL_DUMMY AMP_MAKE_MODEL(AMP_DUMMY, 1)
#define AMP_MODEL_NETAMPCTL AMP_MAKE_MODEL(AMP_DUMMY, 2)
@@ -82,24 +90,25 @@
*/
/**
- * \def AMP_MODEL_ELECRAFT
- * \brief A macro that returns the model number of the EasyComm 1 backend.
+ * \def AMP_MODEL_ELECRAFT_KPA1500
+ * \brief A macro that returns the model number of the kpa1500 backend.
*
- * The Elecraft #1 backend can be used with amplifiers that support the
- * KPA1500 protocol.
+ * The kpa1500 backend can be used with amplifiers that support the Elecraft
+ * KPA-1500 protocol.
*/
+//! @cond Doxygen_Suppress
#define AMP_ELECRAFT 2
#define AMP_BACKEND_ELECRAFT "elecraft"
+//! @endcond
#define AMP_MODEL_ELECRAFT_KPA1500 AMP_MAKE_MODEL(AMP_ELECRAFT, 1)
//#define AMP_MODEL_ELECRAFT_KPA500 AMP_MAKE_MODEL(AMP_ELECRAFT, 2)
/**
* \typedef typedef int amp_model_t
* \brief Convenience type definition for amplifier model.
-*/
+ */
typedef int amp_model_t;
-//! @endcond
#endif /* _AMPLIST_H */
-----------------------------------------------------------------------
Summary of changes:
include/hamlib/amplist.h | 53 ++++++++++++++++++++++++++++--------------------
1 file changed, 31 insertions(+), 22 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Nate B. <n0...@us...> - 2021-02-08 01:00: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 e7f5aa60664d8f39fdb20ba6c2e4f2431e583ca2 (commit)
via 07fa93bf43dcedd7c0566bec9db205844007bba5 (commit)
from b05a1638a858ea94228f8017750537573845ee7f (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 e7f5aa60664d8f39fdb20ba6c2e4f2431e583ca2
Merge: b05a1638 07fa93bf
Author: Nate Bargmann <n0...@n0...>
Date: Sun Feb 7 18:59:42 2021 -0600
Merge pull request #532 from N0NB/doxygen_work
Update Doxygen comment sections in amplifier.c
commit 07fa93bf43dcedd7c0566bec9db205844007bba5
Author: Nate Bargmann <n0...@n0...>
Date: Sun Feb 7 18:56:24 2021 -0600
Update Doxygen comment sections in amplifier.c
diff --git a/src/amplifier.c b/src/amplifier.c
index abb796d3..bf2eecf1 100644
--- a/src/amplifier.c
+++ b/src/amplifier.c
@@ -2,6 +2,7 @@
* Hamlib Interface - main file
* Copyright (c) 2000-2012 by Stephane Fillod
* Copyright (c) 2000-2003 by Frank Singleton
+ * Copyright (C) 2019-2020 by Michael Black
*
*
* This library is free software; you can redistribute it and/or
@@ -30,16 +31,21 @@
* \brief Amplifier interface
* \author Stephane Fillod
* \date 2000-2012
+ * \author Frank Singleton
+ * \date 2000-2003
+ * \author Michael Black
+ * \date 2019-2020
*
- * Hamlib interface is a frontend implementing amplifier wrapper functions.
+ * This Hamlib interface is a frontend implementing the amplifier wrapper
+ * functions.
*/
/**
* \page amp Amplifier interface
*
- * Amplifier can be any kind of azimuth or azimuth and elevation controlled
- * antenna system.
+ * An amplifier can be any kind of external power amplifier that is capable of
+ * CAT type control.
*/
#ifdef HAVE_CONFIG_H
@@ -163,14 +169,14 @@ int foreach_opened_amp(int (*cfunc)(AMP *, rig_ptr_t), rig_ptr_t data)
/**
- * \brief allocate a new #AMP handle
- * \param amp_model The amp 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.
+ * for \a amp_model (see amplist.h or `ampctl -l`).
*
- * \return a pointer to the #AMP handle otherwise NULL if memory allocation
- * failed or \a amp_model is unknown (e.g. backend autoload failed).
+ * \return Pointer to the #AMP handle otherwise NULL if memory allocation
+ * failed or \a amp_model is unknown, e.g. backend autoload failed.
*
* \sa amp_cleanup(), amp_open()
*/
@@ -273,17 +279,17 @@ AMP *HAMLIB_API amp_init(amp_model_t amp_model)
/**
- * \brief open the communication to the amp
- * \param amp The #AMP handle of the amplifier to be opened
+ * \brief Open the communication channel to the amplifier.
+ * \param amp The #AMP handle of the amplifier to be opened
*
- * Opens communication to a amplifier which \a AMP handle has been passed
- * by argument.
+ * Opens the communication channel to an amplifier for which the #AMP handle
+ * has been passed.
*
- * \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_EINVAL \a amp is NULL or inconsistent.
+ * \retval RIG_OK Communication channel succesfully opened.
+ * \retval RIG_EINVAL \a amp is NULL or inconsistent.
*
* \sa amp_init(), amp_close()
*/
@@ -407,15 +413,18 @@ int HAMLIB_API amp_open(AMP *amp)
/**
- * \brief close the communication to the amp
- * \param amp The #AMP handle of the amplifier to be closed
+ * \brief Close the communication channel to the amplifier.
+ * \param amp The #AMP handle of the amplifier to be closed.
*
- * Closes communication to a amplifier which \a AMP handle has been passed
- * by argument that was previously open with amp_open().
+ * Closes the communication channel to an amplifier for which the #AMP
+ * handle has been passed by argument that was previously opened with
+ * amp_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 amp is NULL or inconsistent.
*
* \sa amp_cleanup(), amp_open()
*/
@@ -486,15 +495,17 @@ int HAMLIB_API amp_close(AMP *amp)
/**
- * \brief release a amp handle and free associated memory
- * \param amp The #AMP handle of the radio to be closed
+ * \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
+ * closed with amp_close().
*
- * Releases a amp struct which port has eventually been closed already
- * with amp_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 #AMP handle successfully released.
+ * \retval RIG_EINVAL \a amp is NULL or inconsistent.
*
* \sa amp_init(), amp_close()
*/
@@ -528,17 +539,20 @@ int HAMLIB_API amp_cleanup(AMP *amp)
return RIG_OK;
}
+
/**
- * \brief reset the amplifier
- * \param amp The amp handle
- * \param reset The reset operation to perform
+ * \brief Reset the amplifier
+ * \param amp The #AMP handle
+ * \param reset The reset operation to perform.
*
- * Resets 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).
+ * \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 reset command was successful.
+ * \retval RIG_EINVAL \a amp is NULL or inconsistent.
+ * \retval RIG_ENAVAIL amp_caps#reset() capability is not available.
*/
int HAMLIB_API amp_reset(AMP *amp, amp_reset_t reset)
{
@@ -560,9 +574,24 @@ int HAMLIB_API amp_reset(AMP *amp, amp_reset_t reset)
return caps->reset(amp, reset);
}
-//! @endcond
-//! @cond Doxygen_Suppress
+
+/**
+ * \brief Query the operating frequency of the amplifier.
+ * \param amp The #AMP handle.
+ * \param freq The variable to store the operating frequency.
+ *
+ * Retrieves the operating frequency from the amplifier.
+ *
+ * \return RIG_OK if the operation was 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 amp is NULL or inconsistent.
+ * \retval RIG_ENAVAIL amp_caps#get_freq() capability is not available.
+ *
+ * \sa amp_set_freq()
+ */
int HAMLIB_API amp_get_freq(AMP *amp, freq_t *freq)
{
const struct amp_caps *caps;
@@ -583,9 +612,25 @@ int HAMLIB_API amp_get_freq(AMP *amp, freq_t *freq)
return caps->get_freq(amp, freq);
}
-//! @endcond
-//! @cond Doxygen_Suppress
+
+/**
+ * \brief Set the operating frequency of the amplifier.
+ * \param amp The #AMP handle.
+ * \param freq The operating frequency.
+ *
+ * Set the operating frequency of the amplifier. Depending on the amplifier
+ * this may simply set the bandpass filters, etc.
+ *
+ * \return RIG_OK if the operation was successful, otherwise a **negative
+ * value** if an error occurred (in which case, cause is set appropriately).
+ *
+ * \retval RIG_OK Setting the frequency was successful.
+ * \retval RIG_EINVAL \a amp is NULL or inconsistent.
+ * \retval RIG_ENAVAIL amp_caps#set_freq() capability is not available.
+ *
+ * \sa amp_get_freq()
+ */
int HAMLIB_API amp_set_freq(AMP *amp, freq_t freq)
{
const struct amp_caps *caps;
@@ -606,18 +651,18 @@ int HAMLIB_API amp_set_freq(AMP *amp, freq_t freq)
return caps->set_freq(amp, freq);
}
-//! @endcond
+
/**
- * \brief get general information from the amplifier
- * \param amp The amp handle
+ * \brief Query general information from the amplifier.
+ * \param amp The #AMP handle.
*
- * Retrieves some general information from the amplifier.
- * This can include firmware revision, exact model name, or just nothing.
+ * Retrieves some general information from the amplifier. 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
+ * an error occurred or the amp_caps#get_info() capability is not available.
*/
const char *HAMLIB_API amp_get_info(AMP *amp)
{
@@ -636,7 +681,24 @@ const char *HAMLIB_API amp_get_info(AMP *amp)
return amp->caps->get_info(amp);
}
-//! @cond Doxygen_Suppress
+
+/**
+ * \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.
+ *
+ * Query the \a val corresponding to the \a level.
+ *
+ * \return RIG_OK if the operation was 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 amp is NULL or inconsistent.
+ * \retval RIG_ENAVAIL amp_caps#get_level() capability is not available.
+ *
+ * \sa amp_get_ext_level()
+ */
int HAMLIB_API amp_get_level(AMP *amp, setting_t level, value_t *val)
{
amp_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
@@ -653,9 +715,25 @@ int HAMLIB_API amp_get_level(AMP *amp, setting_t level, value_t *val)
return amp->caps->get_level(amp, level, val);
}
-//! @endcond
-//! @cond Doxygen_Suppress
+
+/**
+ * \brief Query the value of a requested extra level 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.
+ *
+ * Query the \a val corresponding to the extra \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).
+ *
+ * \retval RIG_OK The query was successful.
+ * \retval RIG_EINVAL \a amp is NULL or inconsistent.
+ * \retval RIG_ENAVAIL amp_caps#get_ext_level() capability is not available.
+ *
+ * \sa amp_get_level()
+ */
int HAMLIB_API amp_get_ext_level(AMP *amp, token_t level, value_t *val)
{
amp_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
@@ -672,24 +750,26 @@ int HAMLIB_API amp_get_ext_level(AMP *amp, token_t level, value_t *val)
return amp->caps->get_ext_level(amp, level, val);
}
-//! @endcond
+
/**
- * \brief turn on/off the amplifier or standby/operate toggle
- * \param amp The amp handle
- * \param status The status to set to
+ * \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.
*
- * turns on/off the amplifier.
- * See #RIG_POWER_ON, #RIG_POWER_OFF and #RIG_POWER_STANDBY #RIG_POWER_OPERATE defines
- * for the \a status.
+ * Turns the amplifier On or Off or toggles the Standby or Operate status.
+ * See #RIG_POWER_ON, #RIG_POWER_OFF and #RIG_POWER_OPERATE,
+ * #RIG_POWER_STANDBY for the value of \a status.
*
- * \return RIG_OK if the operation has been successful, ortherwise
- * a negative value if an error occurred (in which case, cause is
- * set appropriately).
+ * \return RIG_OK if the operation was successful, otherwise a **negative
+ * value** if an error occurred (in which case, cause is set appropriately).
+ *
+ * \retval RIG_OK The requested power/standby state was successful.
+ * \retval RIG_EINVAL \a amp is NULL or inconsistent.
+ * \retval RIG_ENAVAIL amp_caps#set_powerstat() capability is not available.
*
* \sa amp_get_powerstat()
*/
-
int HAMLIB_API amp_set_powerstat(AMP *amp, powerstat_t status)
{
amp_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
@@ -707,7 +787,25 @@ int HAMLIB_API amp_set_powerstat(AMP *amp, powerstat_t status)
return amp->caps->set_powerstat(amp, status);
}
-//! @cond Doxygen_Suppress
+
+/**
+ * \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.
+ *
+ * Query the amplifier's power or standby condition. The value stored in
+ * \a status will be one of #RIG_POWER_ON, #RIG_POWER_OFF and
+ * #RIG_POWER_OPERATE, #RIG_POWER_STANDBY, or #RIG_POWER_UNKNOWN.
+ *
+ *\return RIG_OK if the query was successful, otherwise a **negative value**
+ * if an error occurred (in which case, cause is set appropriately).
+ *
+ * \retval RIG_OK Querying the power/standby state was successful.
+ * \retval RIG_EINVAL \a amp is NULL or inconsistent.
+ * \retval RIG_ENAVAIL amp_caps#get_powerstat() capability is not available.
+ *
+ * \sa amp_set_powerstat()
+ */
int HAMLIB_API amp_get_powerstat(AMP *amp, powerstat_t *status)
{
amp_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
@@ -724,7 +822,6 @@ int HAMLIB_API amp_get_powerstat(AMP *amp, powerstat_t *status)
return amp->caps->get_powerstat(amp, status);
}
-//! @endcond
/*! @} */
-----------------------------------------------------------------------
Summary of changes:
src/amplifier.c | 227 ++++++++++++++++++++++++++++++++++++++++----------------
1 file changed, 162 insertions(+), 65 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-02-07 21:04: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 b05a1638a858ea94228f8017750537573845ee7f (commit)
via e0e743ee9043ba8f11a6a953e15aa84d7204118e (commit)
via 418e963c863cc009d0459ab345005f41a4327d02 (commit)
via 3a25f54f744341c58cdf8a85f9f9e63cacad84ec (commit)
via ed25ac943dab61e4a83e74354cbf8d79233e92f4 (commit)
from 1caa4ca328d98ff3071a508ff25ae9084d291869 (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 b05a1638a858ea94228f8017750537573845ee7f
Author: Michael Black W9MDB <mdb...@ya...>
Date: Sun Feb 7 15:03:43 2021 -0600
Add caching of MEM and MAINC vfos
diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h
index af26c134..508fd2c3 100644
--- a/include/hamlib/rig.h
+++ b/include/hamlib/rig.h
@@ -2080,6 +2080,7 @@ struct rig_cache {
freq_t freqMainC; // VFO_C, VFO_MAINC
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
#if 0 // future
freq_t freqSubC; // VFO_SUBC -- only for rigs with 3 Sub VFOs
#endif
@@ -2095,6 +2096,7 @@ struct rig_cache {
struct timespec time_freqMainC;
struct timespec time_freqSubA;
struct timespec time_freqSubB;
+ struct timespec time_freqMem;
struct timespec time_vfo;
struct timespec time_mode;
struct timespec time_ptt;
diff --git a/src/rig.c b/src/rig.c
index c11f6437..4629f781 100644
--- a/src/rig.c
+++ b/src/rig.c
@@ -1394,13 +1394,10 @@ 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
-
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;
@@ -1412,6 +1409,11 @@ static int set_cache_freq(RIG *rig, vfo_t vfo, freq_t freq)
elapsed_ms(&rig->state.cache.time_freqSubB, HAMLIB_ELAPSED_SET);
break;
+ case RIG_VFO_MEM:
+ rig->state.cache.freqMem = freq;
+ elapsed_ms(&rig->state.cache.time_freqMem, HAMLIB_ELAPSED_SET);
+ break;
+
default:
rig_debug(RIG_DEBUG_ERR, "%s: unknown vfo?, vfo=%s\n", __func__,
rig_strvfo(vfo));
@@ -1460,20 +1462,24 @@ 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 // future
-
case RIG_VFO_C:
- case RIG_VFO_MAINC:
+ //case RIG_VFO_MAINC: // not used by any rig yet
*freq = rig->state.cache.freqMainC;
- *cache_ms = rig->state.cache.time_freqMainC;
+ *cache_ms = elapsed_ms(&rig->state.cache.time_freqMainC, HAMLIB_ELAPSED_GET);
break;
+#if 0 // no known rigs use this yet
case RIG_VFO_SUBC:
*freq = rig->state.cache.freqSubC;
*cache_ms = rig->state.cache.time_freqSubC;
break;
#endif
+ case RIG_VFO_MEM:
+ *freq = rig->state.cache.freqMem;
+ *cache_ms = elapsed_ms(&rig->state.cache.time_freqMem, HAMLIB_ELAPSED_GET);
+ break;
+
default:
rig_debug(RIG_DEBUG_ERR, "%s: unknown vfo?, vfo=%s\n", __func__,
rig_strvfo(vfo));
commit e0e743ee9043ba8f11a6a953e15aa84d7204118e
Author: Michael Black W9MDB <mdb...@ya...>
Date: Sun Feb 7 14:58:33 2021 -0600
Update rig.c docs
diff --git a/src/rig.c b/src/rig.c
index c85ac212..c11f6437 100644
--- a/src/rig.c
+++ b/src/rig.c
@@ -5554,6 +5554,9 @@ const char *HAMLIB_API rig_get_info(RIG *rig)
* \brief get freq/mode/width for requested VFO
* \param rig The rig handle
* \param vfo The VFO to get
+ * \param *freq frequency answer
+ * \param *mode mode answer
+ * \param *width bandwidth answer
*
* Gets the current VFO information. The VFO can be RIG_VFO_A, RIG_VFO_B, RIG_VFO_C
* for VFOA, VFOB, VFOC respectively or RIG_VFO_MEM for Memory mode.
commit 418e963c863cc009d0459ab345005f41a4327d02
Author: Michael Black W9MDB <mdb...@ya...>
Date: Sun Feb 7 12:45:59 2021 -0600
Add \get_vfo_info to rigctl and rigctld to allow geting freq/mode/width by vfo in one call
Overcomes limitation of f command where vfo swapping is needed if not in --vfo mode
rig_get_vfo_info function added
Log4OM should be able to get VFOB frequency on most rigs
https://github.com/Hamlib/Hamlib/issues/530
diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h
index 276a872e..af26c134 100644
--- a/include/hamlib/rig.h
+++ b/include/hamlib/rig.h
@@ -1966,7 +1966,7 @@ enum rig_caps_cptr_e {
*
*/
//! @cond Doxygen_Suppress
-extern int rig_get_caps_int(rig_model_t rig_model, enum rig_caps_int_e rig_caps);
+extern long rig_get_caps_int(rig_model_t rig_model, enum rig_caps_int_e rig_caps);
/**
* \brief Function to return char pointer value from rig->caps
@@ -2308,6 +2308,10 @@ extern HAMLIB_EXPORT(int)
rig_get_vfo HAMLIB_PARAMS((RIG *rig,
vfo_t *vfo));
+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(int)
netrigctl_get_vfo_mode HAMLIB_PARAMS((RIG *rig));
@@ -2783,6 +2787,11 @@ rig_set_vfo_callback HAMLIB_PARAMS((RIG *,
vfo_cb_t,
rig_ptr_t));
+extern HAMLIB_EXPORT(int)
+rig_get_vfo_info_callback HAMLIB_PARAMS((RIG *,
+ vfo_cb_t,
+ rig_ptr_t));
+
extern HAMLIB_EXPORT(int)
rig_set_ptt_callback HAMLIB_PARAMS((RIG *,
ptt_cb_t,
@@ -2944,6 +2953,7 @@ extern HAMLIB_EXPORT(int) rig_get_cache_timeout_ms(RIG *rig, hamlib_cache_t sele
extern HAMLIB_EXPORT(int) rig_set_cache_timeout_ms(RIG *rig, hamlib_cache_t selection, int ms);
extern HAMLIB_EXPORT(int) rig_set_vfo_opt(RIG *rig, int status);
+extern HAMLIB_EXPORT(int) rig_get_vfo_info(RIG *rig, vfo_t vfo, freq_t *freq, rmode_t *mode, pbwidth_t *width);
typedef unsigned long rig_useconds_t;
diff --git a/src/misc.c b/src/misc.c
index b8c2a66e..45619c6f 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -2140,8 +2140,13 @@ void *rig_get_function_ptr(rig_model_t rig_model,
}
// negative return indicates error
-// watch out for integer values that may be negative
-int rig_get_caps_int(rig_model_t rig_model, enum rig_caps_int_e rig_caps)
+/**
+ * \brief Get integer/long instead of using rig->caps
+ * watch out for integer values that may be negative -- if needed must change hamlib
+ * \param RIG* and rig_caps_int_e
+ * \return the corresponding long value -- -RIG_EINVAL is the only error possible
+ */
+long rig_get_caps_int(rig_model_t rig_model, enum rig_caps_int_e rig_caps)
{
const struct rig_caps *caps = rig_get_caps(rig_model);
diff --git a/src/rig.c b/src/rig.c
index 65b594b4..c85ac212 100644
--- a/src/rig.c
+++ b/src/rig.c
@@ -5550,6 +5550,37 @@ const char *HAMLIB_API rig_get_info(RIG *rig)
RETURNFUNC(rig->caps->get_info(rig));
}
+/**
+ * \brief get freq/mode/width for requested VFO
+ * \param rig The rig handle
+ * \param vfo The VFO to get
+ *
+ * Gets the current VFO information. The VFO can be RIG_VFO_A, RIG_VFO_B, RIG_VFO_C
+ * for VFOA, VFOB, VFOC respectively or RIG_VFO_MEM for Memory mode.
+ * Supported VFOs depends on rig capabilities.
+ *
+ * \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise
+ * a negative value if an error occurred (in which case use rigerror(return)
+ * for error message).
+ *
+ */
+int HAMLIB_API rig_get_vfo_info(RIG *rig, vfo_t vfo, freq_t *freq, rmode_t *mode, pbwidth_t *width)
+{
+ int retcode;
+
+ ENTERFUNC;
+ rig_debug(RIG_DEBUG_VERBOSE, "%s called vfo=%s\n", __func__, rig_strvfo(vfo));
+
+ if (CHECK_RIG_ARG(rig))
+ {
+ RETURNFUNC(-RIG_EINVAL);
+ }
+
+ retcode = rig_get_freq(rig,vfo,freq);
+ if (retcode != RIG_OK) RETURNFUNC(retcode);
+ retcode = rig_get_mode(rig,vfo,mode,width);
+ RETURNFUNC(retcode);
+}
/**
* \brief get the Hamlib license
diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c
index 2b39527b..363500e4 100644
--- a/tests/rigctl_parse.c
+++ b/tests/rigctl_parse.c
@@ -166,6 +166,7 @@ declare_proto_rig(set_mode);
declare_proto_rig(get_mode);
declare_proto_rig(set_vfo);
declare_proto_rig(get_vfo);
+declare_proto_rig(get_vfo_info);
declare_proto_rig(set_ptt);
declare_proto_rig(get_ptt);
declare_proto_rig(get_ptt);
@@ -330,6 +331,7 @@ static struct test_table test_list[] =
{ 0x8f, "dump_state", ACTION(dump_state), ARG_OUT | ARG_NOVFO },
{ 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 */
{ 0xf1, "halt", ACTION(halt), ARG_NOVFO }, /* rigctld only--halt the daemon */
{ 0x8c, "pause", ACTION(pause), ARG_IN, "Seconds" },
{ 0x00, "", NULL },
@@ -2180,6 +2182,40 @@ declare_proto_rig(get_vfo)
return status;
}
+/* '\get_vfo_info' */
+declare_proto_rig(get_vfo_info)
+{
+ int retval;
+
+ ENTERFUNC;
+ if (!strcmp(arg1, "?"))
+ {
+ char s[SPRINTF_MAX_SIZE];
+ rig_sprintf_vfo(s, rig->state.vfo_list);
+ fprintf(fout, "%s\n", s);
+ return RIG_OK;
+ }
+
+ vfo = rig_parse_vfo(arg1);
+ freq_t freq=0;
+ rmode_t mode=RIG_MODE_NONE;
+ pbwidth_t width = 0;
+ retval = rig_get_vfo_info(rig, vfo, &freq, &mode, &width);
+
+ rig_debug(RIG_DEBUG_ERR,"%s: vfo=%s\n", __func__, rig_strvfo(vfo));
+ if ((interactive && prompt) || (interactive && !prompt && ext_resp))
+ {
+ fprintf(fout,"%s: %.0f\n", cmd->arg1, freq);
+ fprintf(fout,"%s: %s\n", cmd->arg2, rig_strrmode(mode));
+ fprintf(fout,"%s: %d\n", cmd->arg3, (int)width);
+ }
+ else
+ {
+ fprintf(fout,"%.0f\n%s\n%d\n", freq, rig_strrmode(mode), (int)width);
+ }
+ RETURNFUNC(retval);
+}
+
/* 'T' */
declare_proto_rig(set_ptt)
commit 3a25f54f744341c58cdf8a85f9f9e63cacad84ec
Author: Michael Black W9MDB <mdb...@ya...>
Date: Sun Feb 7 12:19:52 2021 -0600
Fix rot_dummy.c -- now behaves with gpredict tracking
https://github.com/Hamlib/Hamlib/issues/531
diff --git a/rigs/dummy/rot_dummy.c b/rigs/dummy/rot_dummy.c
index f4bea07a..c9af6ff8 100644
--- a/rigs/dummy/rot_dummy.c
+++ b/rigs/dummy/rot_dummy.c
@@ -260,8 +260,8 @@ static int dummy_rot_set_position(ROT *rot, azimuth_t az, elevation_t el)
gettimeofday(&priv->tv, NULL);
}
else {
- priv->az = az;
- priv->el = el;
+ priv->az = priv->target_az = az;
+ priv->el = priv->target_az = el;
}
@@ -898,7 +898,10 @@ static int dummy_rot_get_status(ROT *rot, rot_status_t *status)
struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *)
rot->state.priv;
- //dummy_rot_simulate_rotation(rot);
+ if (simulating)
+ {
+ dummy_rot_simulate_rotation(rot);
+ }
*status = priv->status;
commit ed25ac943dab61e4a83e74354cbf8d79233e92f4
Author: Michael Black W9MDB <mdb...@ya...>
Date: Sun Feb 7 12:05:52 2021 -0600
Disable rotctl emulation -- override by setting simulating=1 in rot_dummy.c
https://github.com/Hamlib/Hamlib/issues/531
diff --git a/rigs/dummy/rot_dummy.c b/rigs/dummy/rot_dummy.c
index 974f9caf..f4bea07a 100644
--- a/rigs/dummy/rot_dummy.c
+++ b/rigs/dummy/rot_dummy.c
@@ -43,6 +43,8 @@
ROT_STATUS_MOVING_EL | ROT_STATUS_MOVING_UP | ROT_STATUS_MOVING_DOWN | \
ROT_STATUS_LIMIT_UP | ROT_STATUS_LIMIT_DOWN | ROT_STATUS_LIMIT_LEFT | ROT_STATUS_LIMIT_RIGHT)
+static int simulating = 0; // do we need rotator emulation for debug?
+
struct dummy_rot_priv_data
{
azimuth_t az;
@@ -251,10 +253,17 @@ static int dummy_rot_set_position(ROT *rot, azimuth_t az, elevation_t el)
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %.2f %.2f\n", __func__,
az, el);
- priv->target_az = az;
- priv->target_el = el;
+ if (simulating)
+ {
+ priv->target_az = az;
+ priv->target_el = el;
+ gettimeofday(&priv->tv, NULL);
+ }
+ else {
+ priv->az = az;
+ priv->el = el;
+ }
- gettimeofday(&priv->tv, NULL);
return RIG_OK;
}
@@ -341,7 +350,7 @@ static int dummy_rot_get_position(ROT *rot, azimuth_t *az, elevation_t *el)
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
- if (priv->az == priv->target_az &&
+ if (simulating && priv->az == priv->target_az &&
priv->el == priv->target_el)
{
*az = priv->az;
@@ -349,7 +358,10 @@ static int dummy_rot_get_position(ROT *rot, azimuth_t *az, elevation_t *el)
return RIG_OK;
}
- dummy_rot_simulate_rotation(rot);
+ if (simulating)
+ {
+ dummy_rot_simulate_rotation(rot);
+ }
*az = priv->az;
*el = priv->el;
@@ -886,7 +898,7 @@ static int dummy_rot_get_status(ROT *rot, rot_status_t *status)
struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *)
rot->state.priv;
- dummy_rot_simulate_rotation(rot);
+ //dummy_rot_simulate_rotation(rot);
*status = priv->status;
@@ -902,7 +914,7 @@ const struct rot_caps dummy_rot_caps =
ROT_MODEL(ROT_MODEL_DUMMY),
.model_name = "Dummy",
.mfg_name = "Hamlib",
- .version = "20201203.0",
+ .version = "20210207.0",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rot_type = ROT_TYPE_AZEL,
-----------------------------------------------------------------------
Summary of changes:
include/hamlib/rig.h | 14 ++++++++++++-
rigs/dummy/rot_dummy.c | 29 ++++++++++++++++++++-------
src/misc.c | 9 +++++++--
src/rig.c | 54 +++++++++++++++++++++++++++++++++++++++++++-------
tests/rigctl_parse.c | 36 +++++++++++++++++++++++++++++++++
5 files changed, 125 insertions(+), 17 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Nate B. <n0...@us...> - 2021-02-07 12:59:22
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via 1caa4ca328d98ff3071a508ff25ae9084d291869 (commit)
via 6052bb798e2e770df7b75742416f730e6de3119b (commit)
from 8e313ecc3d4421a7c7eddca1ff2443702700ff55 (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 1caa4ca328d98ff3071a508ff25ae9084d291869
Merge: 6052bb79 8e313ecc
Author: Nate Bargmann <n0...@n0...>
Date: Sun Feb 7 06:57:38 2021 -0600
Merge branch 'master' of github.com:Hamlib/Hamlib
commit 6052bb798e2e770df7b75742416f730e6de3119b
Author: Nate Bargmann <n0...@n0...>
Date: Sun Feb 7 06:54:19 2021 -0600
Add ft980.h to Makefile.am
The use of 'make distcheck' would have caught this error.
diff --git a/rigs/yaesu/Makefile.am b/rigs/yaesu/Makefile.am
index d6857ab4..e175f82c 100644
--- a/rigs/yaesu/Makefile.am
+++ b/rigs/yaesu/Makefile.am
@@ -4,8 +4,9 @@
YAESUSRC = ft100.c ft100.h ft747.c ft747.h ft817.c ft817.h ft847.c ft847.h \
ft890.c ft890.h ft900.c ft900.h ft920.c ft920.h ft1000mp.c ft1000mp.h \
ft857.c ft857.h ft897.c ft897.h ft990.c ft990.h frg8800.c ft757gx.c \
- ft757gx.h ft600.h ft600.c ft736.c frg100.c frg100.h frg9600.c ft1000d.c ft1000d.h \
- vr5000.c ft767gx.c ft767gx.h ft840.c ft840.h ft980.c vx1700.c vx1700.h ftdx10.h
+ ft757gx.h ft600.h ft600.c ft736.c frg100.c frg100.h frg9600.c ft1000d.c \
+ ft1000d.h vr5000.c ft767gx.c ft767gx.h ft840.c ft840.h ft980.c ft980.h \
+ vx1700.c vx1700.h ftdx10.h
## Yaesu radios that use the new Kenwood style CAT commands
NEWCATSRC = newcat.c newcat.h ft450.c ft450.h ft950.c ft950.h ft991.c ft991.h \
-----------------------------------------------------------------------
Summary of changes:
rigs/yaesu/Makefile.am | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: Michael B. <mdb...@us...> - 2021-02-07 12:57:10
|
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 8e313ecc3d4421a7c7eddca1ff2443702700ff55 (commit)
from 66b3e368d621488dc3081d16a29f5d06ea5a8121 (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 8e313ecc3d4421a7c7eddca1ff2443702700ff55
Author: Michael Black W9MDB <mdb...@ya...>
Date: Sun Feb 7 06:56:48 2021 -0600
Add RIG_CAPS_HAS_GET_LEVEL
diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h
index 489d4683..276a872e 100644
--- a/include/hamlib/rig.h
+++ b/include/hamlib/rig.h
@@ -1950,7 +1950,8 @@ enum rig_caps_int_e {
RIG_CAPS_TARGETABLE_VFO,
RIG_CAPS_RIG_MODEL,
RIG_CAPS_PORT_TYPE,
- RIG_CAPS_PTT_TYPE
+ RIG_CAPS_PTT_TYPE,
+ RIG_CAPS_HAS_GET_LEVEL
};
enum rig_caps_cptr_e {
diff --git a/src/misc.c b/src/misc.c
index eccb7ba1..b8c2a66e 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -2159,6 +2159,9 @@ int rig_get_caps_int(rig_model_t rig_model, enum rig_caps_int_e rig_caps)
case RIG_CAPS_PORT_TYPE:
return caps->port_type;
+ case RIG_CAPS_HAS_GET_LEVEL:
+ return caps->has_get_level;
+
default:
rig_debug(RIG_DEBUG_ERR, "%s: Unknown rig_caps value=%d\n", __func__, rig_caps);
return -RIG_EINVAL;
-----------------------------------------------------------------------
Summary of changes:
include/hamlib/rig.h | 3 ++-
src/misc.c | 3 +++
2 files changed, 5 insertions(+), 1 deletion(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|