hamlib-cvs-digest Mailing List for Ham Radio Control Libraries (Page 5)
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
(3) |
Dec
(1) |
|
From: n0nb <n0...@us...> - 2025-07-27 03:36:39
|
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 7cceee9abad13888f5705feef5330904eb06bf31 (commit)
via 4d6a3ed582b89c3968a9892c607f54da41b97604 (commit)
via f67a3cfe4722728335fb11a5939b6233a8cbec44 (commit)
via d2025477be1e5181980fddf9a05bf5ca86d5d4bd (commit)
via d6d50245c697cb806f1a46fabc41f329aa25a321 (commit)
via 15c5b4d7719ae9dcc6887a8aa788213c8ac97846 (commit)
from 04c00330a6265680c2a78dbf88e9274eae1f02da (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 7cceee9abad13888f5705feef5330904eb06bf31
Author: Nate Bargmann <n0...@n0...>
Date: Sat Jul 26 18:32:34 2025 -0500
Complete Doxygen comments for rotlist.h
Add new topic for rotator model list.
diff --git a/doc/index.doxygen b/doc/index.doxygen
index 46f7f73ba..7fb7a9ebb 100644
--- a/doc/index.doxygen
+++ b/doc/index.doxygen
@@ -193,9 +193,10 @@ GNU/Linux.
* \defgroup riglist Rig (radio) Model List
* \defgroup rig_internal Rig (transceiver) Internal API
* \defgroup rotator Rotator API
+ * \defgroup rotlist Rotator Model List
* \defgroup rot_internal Rotator Internal API
* \defgroup amplifier Amplifier API
- * \defgroup amplist Amplifier model list
+ * \defgroup amplist Amplifier Model list
* \defgroup amp_internal Amplifier Internal API
* \defgroup port Port data structure for accessing devices
* \defgroup utilities Utility Routines API
diff --git a/include/hamlib/rotlist.h b/include/hamlib/rotlist.h
index 567aa59e6..e50fdc46d 100644
--- a/include/hamlib/rotlist.h
+++ b/include/hamlib/rotlist.h
@@ -24,17 +24,12 @@
#ifndef _ROTLIST_H
#define _ROTLIST_H 1
-//! @cond Doxygen_Suppress
-#define ROT_MAKE_MODEL(a,b) (100*(a)+(b))
-#define ROT_BACKEND_NUM(a) ((a)/100)
-//! @endcond
-
-
/**
- * \addtogroup rotator
+ * \addtogroup rotlist
* @{
*/
+
/**
* \brief Hamlib rotator model definitions.
*
@@ -54,6 +49,27 @@
* wishes to use which is passed to the rot_init() API call.
*/
+/**
+ * \brief The rotator model number is held in a signed integer.
+ *
+ * Model numbers are a simple decimal value that increments by a value of
+ * 100 for each backend, e.g. the `DUMMY` backend has model numbers 1
+ * to 100, the `EASYCOMM` backend has model numbers 201 to 300 and so on
+ * (101 to 200 is currently unassigned).
+ *
+ * \note A limitation is that with ::rot_model_t being a signed integer that on
+ * some systems such a value may be 16 bits. This limits the number of backends
+ * to 326 of 100 models each (32768 / 100 thus leaving only 68 models for
+ * backend number 327 so round down to 326). So far this doesn't seem like an
+ * extreme limitation.
+ *
+ * \sa rot_model_t
+ */
+#define ROT_MAKE_MODEL(a,b) (100*(a)+(b))
+
+/** Convenience macro to derive the backend family number from the model number. */
+#define ROT_BACKEND_NUM(a) ((a)/100)
+
/**
* \brief A macro that returns the model number for an unknown model.
*
@@ -65,56 +81,62 @@
#define ROT_MODEL_NONE 0
+/** The `DUMMY` family. Also contains network models. */
+#define ROT_DUMMY 0
+/** Used in register.c for the `be_name`. */
+#define ROT_BACKEND_DUMMY "dummy"
+
/**
- * \brief A macro that returns the model number for the DUMMY backend.
+ * \brief A macro that returns the model number for `DUMMY`.
*
* \def ROT_MODEL_DUMMY
*
- * The DUMMY backend, as the name suggests, is a backend which performs
+ * The `DUMMY` model, 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 NETROTCTL backend.
+ * \brief A macro that returns the model number for `NETROTCTL`.
*
* \def ROT_MODEL_NETROTCTL
*
- * The NETROTCTL backend allows use of the `rotctld` daemon through the normal
+ * The `NETROTCTL` model allows use of the `rotctld` daemon through the normal
* Hamlib API.
*/
/**
- * \brief A macro that returns the model number for the PSTROTATOR backend.
+ * \brief A macro that returns the model number for `PSTROTATOR`.
*
* \def ROT_MODEL_PSTROTATOR
*
- * The PSTROTATOR backend allows Hamlib clients to access the rotators controlled
+ * The `PSTROTATOR` model allows Hamlib clients to access the rotators controlled
* by the PstRotator software by YO3DMU: https://www.qsl.net/yo3dmu/index_Page346.htm
*/
/**
- * \brief A macro that returns the model number for the SATROTCTL backend.
+ * \brief A macro that returns the model number for `SATROTCTL`.
*
* \def ROT_MODEL_SATROTCTL
*
- * The SATROTCTL allows Hamlib clients to access the rotators controlled by
+ * The `SATROTCTL` model allows Hamlib clients to access the rotators controlled by
* the S.A.T hardware by CSN Tecnologies: http://csntechnologies.net/
*/
-//! @cond Doxygen_Suppress
-#define ROT_DUMMY 0
-#define ROT_BACKEND_DUMMY "dummy"
-//! @endcond
#define ROT_MODEL_DUMMY ROT_MAKE_MODEL(ROT_DUMMY, 1)
#define ROT_MODEL_NETROTCTL ROT_MAKE_MODEL(ROT_DUMMY, 2)
#define ROT_MODEL_PSTROTATOR ROT_MAKE_MODEL(ROT_DUMMY, 3)
#define ROT_MODEL_SATROTCTL ROT_MAKE_MODEL(ROT_DUMMY, 4)
+/** The `EASYCOMM` family. */
+#define ROT_EASYCOMM 2
+/** Used in register.c for the `be_name`. */
+#define ROT_BACKEND_EASYCOMM "easycomm"
+
/**
- * \brief A macro that returns the model number of the EASYCOMM 1 backend.
+ * \brief A macro that returns the model number of `EASYCOMM1`.
*
* \def ROT_MODEL_EASYCOMM1
*
- * The EASYCOMM1 backend can be used with rotators that support the EASYCOMM
+ * The `EASYCOMM1` model can be used with rotators that support the EASYCOMM
* I Standard.
*/
/**
@@ -122,7 +144,7 @@
*
* \def ROT_MODEL_EASYCOMM2
*
- * The EASYCOMM2 backend can be used with rotators that support the EASYCOMM
+ * The EASYCOMM2 model can be used with rotators that support the EASYCOMM
* II Standard.
*/
/**
@@ -130,84 +152,82 @@
*
* \def ROT_MODEL_EASYCOMM3
*
- * The EASYCOMM3 backend can be used with rotators that support the EASYCOMM
+ * The EASYCOMM3 model can be used with rotators that support the EASYCOMM
* III Standard.
*/
-//! @cond Doxygen_Suppress
-#define ROT_EASYCOMM 2
-#define ROT_BACKEND_EASYCOMM "easycomm"
-//! @endcond
#define ROT_MODEL_EASYCOMM1 ROT_MAKE_MODEL(ROT_EASYCOMM, 1)
#define ROT_MODEL_EASYCOMM2 ROT_MAKE_MODEL(ROT_EASYCOMM, 2)
#define ROT_MODEL_EASYCOMM3 ROT_MAKE_MODEL(ROT_EASYCOMM, 4)
+/** The `FODTRACK` family. */
+#define ROT_FODTRACK 3
+/** Used in register.c for the `be_name`. */
+#define ROT_BACKEND_FODTRACK "fodtrack"
+
/**
- * \brief A macro that returns the model number of the FODTRACK backend.
+ * \brief A macro that returns the model number of `FODTRACK`.
*
* \def ROT_MODEL_FODTRACK
*
- * The FODTRACK backend can be used with rotators that support the FODTRACK
+ * The `FODTRACK model` can be used with rotators that support the FODTRACK
* Standard.
*/
-//! @cond Doxygen_Suppress
-#define ROT_FODTRACK 3
-#define ROT_BACKEND_FODTRACK "fodtrack"
-//! @endcond
#define ROT_MODEL_FODTRACK ROT_MAKE_MODEL(ROT_FODTRACK, 1)
+/** The `ROTOREZ` family. */
+#define ROT_ROTOREZ 4
+/** Used in register.c for the `be_name`. */
+#define ROT_BACKEND_ROTOREZ "rotorez"
+
/**
- * \brief A macro that returns the model number of the ROTOREZ backend.
+ * \brief A macro that returns the model number of `ROTOREZ`.
*
* \def ROT_MODEL_ROTOREZ
*
- * The ROTOREZ backend can be used with Hy-Gain rotators that support the
+ * The `ROTOREZ` model can be used with Hy-Gain rotators that support the
* extended DCU command set by the Idiom Press Rotor-EZ board.
*/
/**
- * \brief A macro that returns the model number of the ROTORCARD backend.
+ * \brief A macro that returns the model number of `ROTORCARD`.
*
* \def ROT_MODEL_ROTORCARD
*
- * The ROTORCARD backend can be used with Yaesu rotators that support the
+ * The `ROTORCARD` model can be used with Yaesu rotators that support the
* extended DCU command set by the Idiom Press Rotor Card board.
*/
/**
- * \brief A macro that returns the model number of the DCU backend.
+ * \brief A macro that returns the model number of `DCU`.
*
* \def ROT_MODEL_DCU
*
- * The DCU backend can be used with rotators that support the DCU command set
+ * The `DCU` model can be used with rotators that support the DCU command set
* by Hy-Gain (currently the DCU-1).
*/
/**
- * \brief A macro that returns the model number of the ERC backend.
+ * \brief A macro that returns the model number of `ERC`.
*
* \def ROT_MODEL_ERC
*
- * The ERC backend can be used with rotators that support the DCU command set
+ * The `ERC` model can be used with rotators that support the DCU command set
* by DF9GR (currently the ERC).
*/
/**
- * \brief A macro that returns the model number of the RT21 backend.
+ * \brief A macro that returns the model number of `RT21`.
*
* \def ROT_MODEL_RT21
*
- * The RT21 backend can be used with rotators that support the DCU command set
+ * The `RT21` model can be used with rotators that support the DCU command set
* by Green Heron (currently the RT-21).
*/
/**
- * \brief A macro that returns the model number of the YRC-1 backend.
+ * \brief A macro that returns the model number of `YRC-1`.
*
* \def ROT_MODEL_YRC1
*
- * The YRC1 backend can be used with rotators that support the DCU 2/3 command set
+ * The `YRC1` model can be used with rotators that support the DCU 2/3 command set
*/
-//! @cond Doxygen_Suppress
-#define ROT_ROTOREZ 4
-#define ROT_BACKEND_ROTOREZ "rotorez"
-//! @endcond
#define ROT_MODEL_ROTOREZ ROT_MAKE_MODEL(ROT_ROTOREZ, 1)
#define ROT_MODEL_ROTORCARD ROT_MAKE_MODEL(ROT_ROTOREZ, 2)
#define ROT_MODEL_DCU ROT_MAKE_MODEL(ROT_ROTOREZ, 3)
@@ -217,135 +237,139 @@
#define ROT_MODEL_RT21 ROT_MAKE_MODEL(ROT_ROTOREZ, 5)
+/** The `SARTEK` family. */
+#define ROT_SARTEK 5
+/** Used in register.c for the `be_name`. */
+#define ROT_BACKEND_SARTEK "sartek"
+
/**
- * \brief A macro that returns the model number of the SARTEK1 backend.
+ * \brief A macro that returns the model number of `SARTEK1`.
*
* \def ROT_MODEL_SARTEK1
*
- * The SARTEK1 backend can be used with rotators that support the SARtek
+ * The `SARTEK1` model can be used with rotators that support the SARtek
* protocol.
*/
-//! @cond Doxygen_Suppress
-#define ROT_SARTEK 5
-#define ROT_BACKEND_SARTEK "sartek"
-//! @endcond
#define ROT_MODEL_SARTEK1 ROT_MAKE_MODEL(ROT_SARTEK, 1)
+/** The `GS232A` family. */
+#define ROT_GS232A 6
+/** Used in register.c for the `be_name`. */
+#define ROT_BACKEND_GS232A "gs232a"
+
/**
- * \brief A macro that returns the model number of the GS232A backend.
+ * \brief A macro that returns the model number of `GS232A`.
*
* \def ROT_MODEL_GS232A
*
- * The GS232A backend can be used with rotators that support the GS-232A
+ * The `GS232A` model can be used with rotators that support the GS-232A
* protocol.
*/
/**
- * \brief A macro that returns the model number of the GS232 backend.
+ * \brief A macro that returns the model number of `GS232_GENERIC`.
*
* \def ROT_MODEL_GS232_GENERIC
*
- * The GS232_GENERIC backend can be used with rotators that support the
+ * The` GS232_GENERIC` model can be used with rotators that support the
* generic (even if not coded correctly) GS-232 protocol.
*/
/**
- * \brief A macro that returns the model number of the GS232 backend.
- *
- * \def ROT_MODEL_AF6SA_WRC
- *
- * The GS232_GENERIC backend can be used with rotators that support the
- * generic (even if not coded correctly) GS-232 protocol.
- */
-/**
- * \brief A macro that returns the model number of the GS232B backend.
+ * \brief A macro that returns the model number of `GS232B`.
*
* \def ROT_MODEL_GS232B
*
- * The GS232B backend can be used with rotators that support the GS232B
+ * The `GS232B` model can be used with rotators that support the GS232B
* protocol.
*/
/**
- * \brief A macro that returns the model number of the F1TETRACKER backend.
+ * \brief A macro that returns the model number of `F1TETRACKER`.
*
* \def ROT_MODEL_F1TETRACKER
*
- * The F1TETRACKER backend can be used with rotators that support the F1TE
+ * The `F1TETRACKER` model can be used with rotators that support the F1TE
* Tracker protocol.
*/
/**
- * \brief A macro that returns the model number of the GS23 backend.
+ * \brief A macro that returns the model number of `GS23`.
*
* \def ROT_MODEL_GS23
*
- * The GS23 backend can be used with rotators that support the GS-23 protocol.
+ * The `GS23` model can be used with rotators that support the GS-23 protocol.
*/
/**
- * \brief A macro that returns the model number of the GS232 backend.
+ * \brief A macro that returns the model number of `GS232`.
*
* \def ROT_MODEL_GS232
*
- * The GS232 backend can be used with rotators that support the GS-232
+ * The `GS232` model can be used with rotators that support the GS-232
* protocol.
*/
/**
- * \brief A macro that returns the model number of the LVB backend.
+ * \brief A macro that returns the model number of `LVB`.
*
* \def ROT_MODEL_LVB
*
- * The LVB backend can be used with rotators that support the G6LVB AMSAT LVB
+ * The `LVB` model 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.
+ * \brief A macro that returns the model number of `ST2`.
*
* \def ROT_MODEL_ST2
*
- * The ST2 backend can be used with rotators that support the Fox Delta ST2
+ * The `ST2` model 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.
+ * \brief A macro that returns the model number of `GS232A_AZ` Azimuth.
*
* \def ROT_MODEL_GS232A_AZ
*
- * The GS232A_AZ backend can be used with azimuth rotators that support the
+ * The `GS232A_AZ` model can be used with azimuth rotators that support the
* GS-232A protocol.
*/
/**
- * \brief A macro that returns the model number of the GS232A_EL Elevation backend.
+ * \brief A macro that returns the model number of `GS232A_EL` Elevation.
*
* \def ROT_MODEL_GS232A_EL
*
- * The GS232A_EL backend can be used with elevation rotators that support the
+ * The `GS232A_EL` model 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.
+ * \brief A macro that returns the model number of ` GS232B_AZ` Azimuth.
*
* \def ROT_MODEL_GS232B_AZ
*
- * The GS232B_AZ backend can be used with azimuth rotators that support the
+ * The `GS232B_AZ` model 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.
+ * \brief A macro that returns the model number of `GS232B_EL` Elevation.
*
* \def ROT_MODEL_GS232B_EL
*
- * The GS232B_EL backend can be used with elevation rotators that support the
+ * The `GS232B_EL` model can be used with elevation rotators that support the
* GS-232B protocol.
*/
/**
- * \brief A macro that returns the model number of the GS23_AZ azimuth backend.
+ * \brief A macro that returns the model number of `GS23_AZ` azimuth.
*
* \def ROT_MODEL_GS23_AZ
*
- * The GS23_AZ backend can be used with azimuth rotators that support a
+ * The `GS23_AZ` model can be used with azimuth rotators that support a
* generic version of the GS-232A protocol.
*/
+/**
+ * \brief A macro that returns the model number of `AF6SA_WRC`.
+ *
+ * \def ROT_MODEL_AF6SA_WRC
+ *
+ * The `AF6SA_WRC` model can be used with the AF6SA controller.
+ * http://af6sa.com/projects/wrc.html
+ */
//! @cond Doxygen_Suppress
-#define ROT_GS232A 6
-#define ROT_BACKEND_GS232A "gs232a"
//! @endcond
#define ROT_MODEL_GS232A ROT_MAKE_MODEL(ROT_GS232A, 1)
#define ROT_MODEL_GS232_GENERIC ROT_MAKE_MODEL(ROT_GS232A, 2) /* GENERIC */
@@ -362,327 +386,348 @@
#define ROT_MODEL_GS23_AZ ROT_MAKE_MODEL(ROT_GS232A, 13)
#define ROT_MODEL_AF6SA_WRC ROT_MAKE_MODEL(ROT_GS232A, 14)
-// Add documentation when this model is implemented.
//! @cond Doxygen_Suppress
-#define ROT_ARRAYSOLUTIONS 7
+/** The `ARRAYSOLUTIONS` family. */
+#define ROT_ARRAYSOLUTIONS 327 // Adjust value when implemented.
+/** Used in register.c for the `be_name`. */
#define ROT_BACKEND ARRAYSOLUTIONS "arraysolutions"
+// Add documentation when this model is implemented.
#define ROT_MODEL_ARRAYSOLUTIONS_SAL_12_20_30 ROT_MAKE_MODEL(ROT_ARRAYSOLUTIONS, 1)
//! @endcond
+/** The `KIT` family. */
+#define ROT_KIT 7
+/** Used in register.c for the `be_name`. */
+#define ROT_BACKEND_KIT "kit"
+
/**
- * \brief A macro that returns the model number of the PCROTOR backend.
+ * \brief A macro that returns the model number of `PCROTOR`.
*
* \def ROT_MODEL_PCROTOR
*
- * The PCROTOR backend is a member of the kit backend group that can be used
+ * The `PCROTOR` model is a member of the kit backend group that can be used
* with home brewed rotators.
*/
-//! @cond Doxygen_Suppress
-#define ROT_KIT 7
-#define ROT_BACKEND_KIT "kit"
-//! @endcond
#define ROT_MODEL_PCROTOR ROT_MAKE_MODEL(ROT_KIT, 1)
+/** The `HEATHKIT` family. */
+#define ROT_HEATHKIT 8
+/** Used in register.c for the `be_name`. */
+#define ROT_BACKEND_HEATHKIT "heathkit"
+
/**
- * \brief A macro that returns the model number of the HD1780 backend.
+ * \brief A macro that returns the model number of `HD1780`.
*
* \def ROT_MODEL_HD1780
*
- * The HD1780 backend can be used with rotators that support the Heathkit
+ * The `HD1780` model can be used with rotators that support the Heathkit
* HD-1780 protocol.
*/
-//! @cond Doxygen_Suppress
-#define ROT_HEATHKIT 8
-#define ROT_BACKEND_HEATHKIT "heathkit"
-//! @endcond
#define ROT_MODEL_HD1780 ROT_MAKE_MODEL(ROT_HEATHKIT, 1)
+/** The `SPID` family. */
+#define ROT_SPID 9
+/** Used in register.c for the `be_name`. */
+#define ROT_BACKEND_SPID "spid"
+
/**
- * \brief A macro that returns the model number of the ROT2PROG backend.
+ * \brief A macro that returns the model number of `ROT2PROG`.
*
* \def ROT_MODEL_SPID_ROT2PROG
*
- * The SPID_ROT2PROG backend can be used with rotators that support the SPID
+ * The `SPID_ROT2PROG` model can be used with rotators that support the SPID
* azimuth and elevation protocol.
*/
/**
- * \brief A macro that returns the model number of the ROT1PROG backend.
+ * \brief A macro that returns the model number of `ROT1PROG`.
*
* \def ROT_MODEL_SPID_ROT1PROG
*
- * The SPID_ROT1PROG backend can be used with rotators that support the SPID
+ * The `SPID_ROT1PROG` model can be used with rotators that support the SPID
* azimuth protocol.
*/
/**
- * \brief A macro that returns the model number of the SPID_MD01_ROT2PROG backend.
+ * \brief A macro that returns the model number of `SPID_MD01_ROT2PROG`.
*
* \def ROT_MODEL_SPID_MD01_ROT2PROG
*
- * The SPID_MD01_ROT2PROG backend can be used with rotators that support the
+ * The `SPID_MD01_ROT2PROG` model can be used with rotators that support the
* extended SPID ROT2PROG azimuth and elevation protocol.
*/
-//! @cond Doxygen_Suppress
-#define ROT_SPID 9
-#define ROT_BACKEND_SPID "spid"
-//! @endcond
#define ROT_MODEL_SPID_ROT2PROG ROT_MAKE_MODEL(ROT_SPID, 1)
#define ROT_MODEL_SPID_ROT1PROG ROT_MAKE_MODEL(ROT_SPID, 2)
#define ROT_MODEL_SPID_MD01_ROT2PROG ROT_MAKE_MODEL(ROT_SPID, 3)
+/** The `M2` family. */
+#define ROT_M2 10
+/** Used in register.c for the `be_name`. */
+#define ROT_BACKEND_M2 "m2"
+
/**
- * \brief A macro that returns the model number of the RC2800 backend.
+ * \brief A macro that returns the model number of `RC2800`.
*
* \def ROT_MODEL_RC2800
*
- * The RC2800 backend can be used with rotators that support the M2 (M
+ * The `RC2800` model 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.
+ * \brief A macro that returns the model number of `RC2800_EARLY_AZ`.
*
* \def ROT_MODEL_RC2800_EARLY_AZ
*
- * The RC2800_EARLY_AZ backend can be used with rotators that support the M2
+ * The `RC2800_EARLY_AZ` model 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.
+ * \brief A macro that returns the model number of `RC2800_EARLY_AZEL`.
*
* \def ROT_MODEL_RC2800_EARLY_AZEL
*
- * The RC2800_EARLY_AZEL backend can be used with rotators that support the M2
+ * The `RC2800_EARLY_AZEL` model can be used with rotators that support the M2
* (M Squared) RC2800 early azimuth and elevation protocol.
*/
-//! @cond Doxygen_Suppress
-#define ROT_M2 10
-#define ROT_BACKEND_M2 "m2"
-//! @endcond
#define ROT_MODEL_RC2800 ROT_MAKE_MODEL(ROT_M2, 1)
#define ROT_MODEL_RC2800_EARLY_AZ ROT_MAKE_MODEL(ROT_M2, 2)
#define ROT_MODEL_RC2800_EARLY_AZEL ROT_MAKE_MODEL(ROT_M2, 3)
+/** The `ARS` family. */
+#define ROT_ARS 11
+/** Used in register.c for the `be_name`. */
+#define ROT_BACKEND_ARS "ars"
+
/**
- * \brief A macro that returns the model number of the RCI_AZEL backend.
+ * \brief A macro that returns the model number of `RCI_AZEL`.
*
* \def ROT_MODEL_RCI_AZEL
*
- * The RCI_AZEL backend can be used with rotators that support the ARS azimuth
+ * The `RCI_AZEL` model can be used with rotators that support the ARS azimuth
* and elevation protocol.
*/
/**
- * \brief A macro that returns the model number of the RCI_AZ backend.
+ * \brief A macro that returns the model number of `RCI_AZ`.
*
* \def ROT_MODEL_RCI_AZ
*
- * The RCI_AZ backend can be used with rotators that support the ARS azimuth
+ * The `RCI_AZ` model can be used with rotators that support the ARS azimuth
* protocol.
*/
-//! @cond Doxygen_Suppress
-#define ROT_ARS 11
-#define ROT_BACKEND_ARS "ars"
-//! @endcond
#define ROT_MODEL_RCI_AZEL ROT_MAKE_MODEL(ROT_ARS, 1)
#define ROT_MODEL_RCI_AZ ROT_MAKE_MODEL(ROT_ARS, 2)
+/** The `AMSAT` family. */
+#define ROT_AMSAT 12
+/** Used in register.c for the `be_name`. */
+#define ROT_BACKEND_AMSAT "amsat"
+
/**
- * \brief A macro that returns the model number of the IF100 backend.
+ * \brief A macro that returns the model number of `IF100`.
*
* \def ROT_MODEL_IF100
*
- * The IF100 backend can be used with rotators that support the AMSAT IF-100
+ * The `IF100` model can be used with rotators that support the AMSAT IF-100
* interface.
*/
-//! @cond Doxygen_Suppress
-#define ROT_AMSAT 12
-#define ROT_BACKEND_AMSAT "amsat"
-//! @endcond
#define ROT_MODEL_IF100 ROT_MAKE_MODEL(ROT_AMSAT, 1)
+/** The `TS7400` family. */
+#define ROT_TS7400 13
+/** Used in register.c for the `be_name`. */
+#define ROT_BACKEND_TS7400 "ts7400"
+
/**
- * \brief A macro that returns the model number of the TS7400 backend.
+ * \brief A macro that returns the model number of `TS7400`.
*
* \def ROT_MODEL_TS7400
*
- * The TS7400 backend supports an embedded ARM board using the TS-7400 Linux
+ * The `TS7400` model 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
-#define ROT_BACKEND_TS7400 "ts7400"
-//! @endcond
#define ROT_MODEL_TS7400 ROT_MAKE_MODEL(ROT_TS7400, 1)
+/** The `CELESTRON` family. */
+#define ROT_CELESTRON 14
+/** Used in register.c for the `be_name`. */
+#define ROT_BACKEND_CELESTRON "celestron"
+
/**
- * \brief A macro that returns the model number of the NEXSTAR backend.
+ * \brief A macro that returns the model number of `NEXSTAR`.
*
* \def ROT_MODEL_NEXSTAR
*
- * The NEXSTAR backend can be used with rotators that support the Celestron
+ * The `NEXSTAR` model can be used with rotators that support the Celestron
* NexStar protocol and alike.
*/
-//! @cond Doxygen_Suppress
-#define ROT_CELESTRON 14
-#define ROT_BACKEND_CELESTRON "celestron"
-//! @endcond
#define ROT_MODEL_NEXSTAR ROT_MAKE_MODEL(ROT_CELESTRON, 1)
+/** The `ETHER6` family. */
+#define ROT_ETHER6 15
+/** Used in register.c for the `be_name`. */
+#define ROT_BACKEND_ETHER6 "ether6"
+
/**
- * \brief A macro that returns the model number of the ETHER6 backend.
+ * \brief A macro that returns the model number of `ETHER6`.
*
* \def ROT_MODEL_ETHER6
*
- * The ETHER6 backend can be used with rotators that support the Ether6
+ * The `ETHER6` model can be used with rotators that support the Ether6
* protocol.
*/
-//! @cond Doxygen_Suppress
-#define ROT_ETHER6 15
-#define ROT_BACKEND_ETHER6 "ether6"
-//! @endcond
#define ROT_MODEL_ETHER6 ROT_MAKE_MODEL(ROT_ETHER6, 1)
+/** The `CNCTRK` family. */
+#define ROT_CNCTRK 16
+/** Used in register.c for the `be_name`. */
+#define ROT_BACKEND_CNCTRK "cnctrk"
+
/**
- * \brief A macro that returns the model number of the CNCTRK backend.
+ * \brief A macro that returns the model number of `CNCTRK`.
*
* \def ROT_MODEL_CNCTRK
*
- * The CNCTRK backend can be used with rotators that support the LinuxCNC
+ * The `CNCTRK` model can be used with rotators that support the LinuxCNC
* running Axis GUI interface.
*/
-//! @cond Doxygen_Suppress
-#define ROT_CNCTRK 16
-#define ROT_BACKEND_CNCTRK "cnctrk"
-//! @endcond
#define ROT_MODEL_CNCTRK ROT_MAKE_MODEL(ROT_CNCTRK, 1)
+/** The `PROSISTEL` family. */
+#define ROT_PROSISTEL 17
+/** Used in register.c for the `be_name`. */
+#define ROT_BACKEND_PROSISTEL "prosistel"
+
/**
- * \brief A macro that returns the model number of the PROSISTEL_D_AZ backend.
+ * \brief A macro that returns the model number of `PROSISTEL_D_AZ`.
*
* \def ROT_MODEL_PROSISTEL_D_AZ
*
- * The PROSISTEL_D_AZ backend can be used with rotators that support the Prosistel
+ * The `PROSISTEL_D_AZ` model can be used with rotators that support the Prosistel
* azimuth protocol.
*/
/**
- * \brief A macro that returns the model number of the PROSISTEL_D_EL backend.
+ * \brief A macro that returns the model number of `PROSISTEL_D_EL`.
*
* \def ROT_MODEL_PROSISTEL_D_EL
*
- * The PROSISTEL_D_EL backend can be used with rotators that support the Prosistel
+ * The `PROSISTEL_D_EL` model can be used with rotators that support the Prosistel
* elevation protocol.
*/
/**
- * \brief A macro that returns the model number of the
- * PROSISTEL_COMBI_TRACK_AZEL backend.
+ * \brief A macro that returns the model number of `PROSISTEL_COMBI_TRACK_AZEL`.
*
* \def ROT_MODEL_PROSISTEL_COMBI_TRACK_AZEL
*
- * The PROSISTEL_AZEL_COMBI_TRACK_AZEL backend can be used with rotators that
+ * The `PROSISTEL_AZEL_COMBI_TRACK_AZEL` model can be used with rotators that
* support the Prosistel combination azimuth and elevation protocol.
*/
/**
- * \brief A macro that returns the model number of the PROSISTEL_D_EL_CBOXAZ
- * backend.
+ * \brief A macro that returns the model number of `PROSISTEL_D_EL_CBOXAZ`.
*
* \def ROT_MODEL_PROSISTEL_D_EL_CBOXAZ
*
- * The PROSISTEL_D_EL_CBOXAZ backend can be used with the elevation rotator
+ * The `PROSISTEL_D_EL_CBOXAZ` model can be used with the elevation rotator
* with Control Box D using azimuth logic.
*/
-//! @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)
#define ROT_MODEL_PROSISTEL_D_EL_CBOXAZ ROT_MAKE_MODEL(ROT_PROSISTEL, 4)
+/** The `MEADE` family. */
+#define ROT_MEADE 18
+/** Used in register.c for the `be_name`. */
+#define ROT_BACKEND_MEADE "meade"
+
/**
- * \brief A macro that returns the model number of the MEADE backend.
+ * \brief A macro that returns the model number of `MEADE`.
*
* \def ROT_MODEL_MEADE
*
- * The MEADE backend can be used with Meade telescope rotators like the
+ * The `MEADE` model can be used with Meade telescope rotators like the
* DS-2000.
*/
-//! @cond Doxygen_Suppress
-#define ROT_MEADE 18
-#define ROT_BACKEND_MEADE "meade"
-//! @endcond
#define ROT_MODEL_MEADE ROT_MAKE_MODEL(ROT_MEADE, 1)
+
+/** The `IOPTRON` family. */
+#define ROT_IOPTRON 19
+/** Used in register.c for the `be_name`. */
+#define ROT_BACKEND_IOPTRON "ioptron"
+
/**
- * \brief A macro that returns the model number of the IOPTRON backend.
+ * \brief A macro that returns the model number of `IOPTRON`.
*
* \def ROT_MODEL_IOPTRON
*
- * The IOPTRON backend can be used with IOPTRON telescope mounts.
+ * The `IOPTRON` model can be used with IOPTRON telescope mounts.
*/
-//! @cond Doxygen_Suppress
-#define ROT_IOPTRON 19
-#define ROT_BACKEND_IOPTRON "ioptron"
-//! @endcond
#define ROT_MODEL_IOPTRON ROT_MAKE_MODEL(ROT_IOPTRON, 1)
+/** The `INDI` family. */
+#define ROT_INDI 20
+/** Used in register.c for the `be_name`. */
+#define ROT_BACKEND_INDI "indi"
+
/**
- * \brief A macro that returns the model number of the INDI backend.
+ * \brief A macro that returns the model number of `INDI`.
*
* \def ROT_MODEL_INDI
*
- * The INDI backend can be used with rotators that support the INDI interface.
+ * The `INDI` model can be used with rotators that support the INDI interface.
*/
-//! @cond Doxygen_Suppress
-#define ROT_INDI 20
-#define ROT_BACKEND_INDI "indi"
-//! @endcond
#define ROT_MODEL_INDI ROT_MAKE_MODEL(ROT_INDI, 1)
+/** The `SATEL` family. */
+#define ROT_SATEL 21
+/** Used in register.c for the `be_name`. */
+#define ROT_BACKEND_SATEL "satel"
+
/**
- * \brief A macro that returns the model number of the SATEL backend.
+ * \brief A macro that returns the model number of `SATEL`.
*
* \def ROT_MODEL_SATEL
*
- * The SATEL backend can be used with rotators that support the VE5FP
+ * The `SATEL` model can be used with rotators that support the VE5FP
* interface.
*/
-//! @cond Doxygen_Suppress
-#define ROT_SATEL 21
-#define ROT_BACKEND_SATEL "satel"
-//! @endcond
#define ROT_MODEL_SATEL ROT_MAKE_MODEL(ROT_SATEL, 1)
+/** The `RADANT` family. */
+#define ROT_RADANT 22
+/** Used in register.c for the `be_name`. */
+#define ROT_BACKEND_RADANT "radant"
+
/**
- * \brief A macro that returns the model number of the RADANT backend.
+ * \brief A macro that returns the model number of `RADANT`.
*
* \def ROT_MODEL_RADANT
*
- * The RADANT backend can be used with rotators that support the MS232
+ * The `RADANT` model can be used with rotators that support the MS232
* interface.
*/
-//! @cond Doxygen_Suppress
-#define ROT_RADANT 22
-#define ROT_BACKEND_RADANT "radant"
-//! @endcond
#define ROT_MODEL_RADANT ROT_MAKE_MODEL(ROT_RADANT, 1)
+
+/** The `ANDROIDSENSOR` family. */
+#define ROT_ANDROIDSENSOR 23
+/** Used in register.c for the `be_name`. */
+#define ROT_BACKEND_ANDROIDSENSOR "androidsensor"
+
/**
- * \brief A macro that returns the model number of the ANDROIDSENSOR backend.
+ * \brief A macro that returns the model number of `ANDROIDSENSOR`.
*
* \def ROT_MODEL_ANDROIDSENSOR
*
@@ -691,89 +736,96 @@
* attitude determination for your antenna and the phone tied to it. Now you
* can wave your antenna to find radio signals.
*/
-//! @cond Doxygen_Suppress
-#define ROT_ANDROIDSENSOR 23
-#define ROT_BACKEND_ANDROIDSENSOR "androidsensor"
-//! @endcond
#define ROT_MODEL_ANDROIDSENSOR ROT_MAKE_MODEL(ROT_ANDROIDSENSOR, 1)
+
+/** The `GRBLTRK` family. */
+#define ROT_GRBLTRK 24
+/** Used in register.c for the `be_name`. */
+#define ROT_BACKEND_GRBLTRK "grbltrk"
+
/**
- * \brief A macro that returns the model number of the ROT_MODEL_GRBLTRK_SER backend.
+ * \brief A macro that returns the model number of `ROT_MODEL_GRBLTRK_SER`.
*
* \def ROT_MODEL_GRBLTRK_SER
*
- * The GRBLTRK backend can be used with rotators that support the GRBL
- * protocol.
+ * The `GRBLTRK_SER` model can be used with rotators that support the GRBL
+ * serial protocol.
*/
/**
- * \brief A macro that returns the model number of the ROT_MODEL_GRBLTRK_NET backend.
+ * \brief A macro that returns the model number of `ROT_MODEL_GRBLTRK_NET`.
*
* \def ROT_MODEL_GRBLTRK_NET
*
- * The GRBLTRK backend can be used with rotators that support the GRBL
- * protocol.
+ * The `GRBLTRK_NET` model can be used with rotators that support the GRBL
+ * network protocol.
*/
-//! @cond Doxygen_Suppress
-#define ROT_GRBLTRK 24
-#define ROT_BACKEND_GRBLTRK "grbltrk"
-//! @endcond
#define ROT_MODEL_GRBLTRK_SER ROT_MAKE_MODEL(ROT_GRBLTRK, 1)
#define ROT_MODEL_GRBLTRK_NET ROT_MAKE_MODEL(ROT_GRBLTRK, 2)
+
+/** The `FLIR` family. */
+#define ROT_FLIR 25
+/** Used in register.c for the `be_name`. */
+#define ROT_BACKEND_FLIR "flir"
+
/**
- * \brief A macro that returns the model number of the FLIR backend.
+ * \brief A macro that returns the model number of `FLIR`.
*
* \def ROT_MODEL_FLIR
*
- * The FLIR backend can be used with FLIR and DirectedPercepition
+ * The `FLIR` model can be used with FLIR and DirectedPercepition
* rotators using the PTU protocol (e.g. PTU-D48). Currently only
* the serial interface is supported and no ethernet.
*/
-//! @cond Doxygen_Suppress
-#define ROT_FLIR 25
-#define ROT_BACKEND_FLIR "flir"
-//! @endcond
#define ROT_MODEL_FLIR ROT_MAKE_MODEL(ROT_FLIR, 1)
+
+/** The `APEX` family. */
+#define ROT_APEX 26
+/** Used in register.c for the `be_name`. */
+#define ROT_BACKEND_APEX "apex"
+
/**
- * \brief A macro that returns the model number of the APEX backend.
+ * \brief A macro that returns the model number of `APEX`.
*
* \def ROT_MODEL_APEX_SHARED_LOOP
*
- * The APEX backend can be used with APEX * rotators.
+ * The `APEX` model can be used with APEX * rotators.
*/
-//! @cond Doxygen_Suppress
-#define ROT_APEX 26
-#define ROT_BACKEND_APEX "apex"
-//! @endcond
#define ROT_MODEL_APEX_SHARED_LOOP ROT_MAKE_MODEL(ROT_APEX, 1)
+
+/** The `SAEBRTRACK` family. */
+#define ROT_SAEBRTRACK 27
+/** Used in register.c for the `be_name`. */
+#define ROT_BACKEND_SAEBRTRACK "SAEBRTrack"
+
/**
- * \brief A macro that returns the model number of the SAEBRTRACK backend.
+ * \brief A macro that returns the model number of `SAEBRTRACK`.
*
* \def ROT_MODEL_SAEBRTRACK
*
- * The SAEBRTRACK backend can be used with SAEBRTRACK * rotators.
+ * The `SAEBRTRACK` model can be used with SAEBRTRACK * rotators.
*/
-//! @cond Doxygen_Suppress
-#define ROT_SAEBRTRACK 27
-#define ROT_BACKEND_SAEBRTRACK "SAEBRTrack"
-//! @endcond
#define ROT_MODEL_SAEBRTRACK ROT_MAKE_MODEL(ROT_SAEBRTRACK, 1)
+
+/** The `SKYWATCHER` family. */
+#define ROT_SKYWATCHER 28
+/** Used in register.c for the `be_name`. */
+#define ROT_BACKEND_SKYWATCHER "SkyWatcher"
+
/**
- * \brief A macro that returns the model number of the SKYWATCHER backend.
+ * \brief A macro that returns the model number of `SKYWATCHER`.
*
* \def ROT_MODEL_SKYWATCHER
*
- * The SKYWATCHER backend can be used with SKYWATCHER * rotators.
+ * The `SKYWATCHER` model can be used with SKYWATCHER * rotators.
*/
-//! @cond Doxygen_Suppress
-#define ROT_SKYWATCHER 28
-#define ROT_BACKEND_SKYWATCHER "SkyWatcher"
-//! @endcond
#define ROT_MODEL_SKYWATCHER ROT_MAKE_MODEL(ROT_SKYWATCHER, 1)
+
/**
* \brief Convenience type definition for a rotator model.
*
commit 4d6a3ed582b89c3968a9892c607f54da41b97604
Author: Nate Bargmann <n0...@n0...>
Date: Sat Jul 26 10:08:19 2025 -0500
Fully document amplist.h
Create a new topic group of 'amplist' to separate the list of amplifier
models from the main Amplifier API group.
diff --git a/doc/index.doxygen b/doc/index.doxygen
index 73ba6e361..46f7f73ba 100644
--- a/doc/index.doxygen
+++ b/doc/index.doxygen
@@ -195,6 +195,7 @@ GNU/Linux.
* \defgroup rotator Rotator API
* \defgroup rot_internal Rotator Internal API
* \defgroup amplifier Amplifier API
+ * \defgroup amplist Amplifier model list
* \defgroup amp_internal Amplifier Internal API
* \defgroup port Port data structure for accessing devices
* \defgroup utilities Utility Routines API
diff --git a/include/hamlib/amplist.h b/include/hamlib/amplist.h
index 4539b6d2b..a123f8841 100644
--- a/include/hamlib/amplist.h
+++ b/include/hamlib/amplist.h
@@ -25,17 +25,12 @@
#ifndef _AMPLIST_H
#define _AMPLIST_H 1
-//! @cond Doxygen_Suppress
-#define AMP_MAKE_MODEL(a,b) ((a)*100+(b))
-#define AMP_BACKEND_NUM(a) ((a)/100)
-//! @endcond
-
-
/**
- * \addtogroup amplifier
+ * \addtogroup amplist
* @{
*/
+
/**
* \brief Hamlib amplifier model definitions.
*
@@ -55,6 +50,27 @@
* wishes to use which is passed to the amp_init() API call.
*/
+/**
+ * \brief The amp model number is held in a signed integer.
+ *
+ * Model numbers are a simple decimal value that increments by a value of
+ * 100 for each backend, e.g. the `DUMMY` backend has model numbers 1
+ * to 100, the `ELECRAFT` backend has model numbers 201 to 300 and so on
+ * (101 to 200 is currently unassigned).
+ *
+ * \note A limitation is that with ::amp_model_t being a signed integer that on
+ * some systems such a value may be 16 bits. This limits the number of backends
+ * to 326 of 100 models each (32768 / 100 thus leaving only 68 models for
+ * backend number 327 so round down to 326). So far this doesn't seem like an
+ * extreme limitation.
+ *
+ * \sa amp_model_t
+ */
+#define AMP_MAKE_MODEL(a,b) ((a)*100+(b))
+
+/** Convenience macro to derive the backend family number from the model number. */
+#define AMP_BACKEND_NUM(a) ((a)/100)
+
/**
* \brief A macro that returns the model number for an unknown model.
@@ -67,71 +83,63 @@
#define AMP_MODEL_NONE 0
+/** The `DUMMY` family. Also contains network models. */
+#define AMP_DUMMY 0
+/** Used in amp_reg.c for the `be_name`. */
+#define AMP_BACKEND_DUMMY "dummy"
/**
- * \brief A macro that returns the model number for the DUMMY backend.
- *
- * \def AMP_MODEL_DUMMY
+ * \brief A macro that returns the model number for `DUMMY`.
*
- * The DUMMY backend, as the name suggests, is a backend which performs no
+ * The `DUMMY` model, as the name suggests, is a model 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.
*/
+#define AMP_MODEL_DUMMY AMP_MAKE_MODEL(AMP_DUMMY, 1)
/**
- * \brief A macro that returns the model number for the NETAMPCTL backend.
+ * \brief A macro that returns the model number for `NETAMPCTL`.
*
- * \def AMP_MODEL_NETAMPCTL
- *
- * The NETAMPCTL backend allows use of the `ampctld` daemon through the normal
- * Hamlib API.
+ * The `NETAMPCTL` model allows use of the `ampctld` daemon through the normal
+ * Hamlib C 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)
+/** The `ELECRAFT` family. */
+#define AMP_ELECRAFT 2
+/** Used in amp_reg.c for the `be_name`. */
+#define AMP_BACKEND_ELECRAFT "elecraft"
/**
- * \brief A macro that returns the model number of the KPA1500 backend.
- *
- * \def AMP_MODEL_ELECRAFT_KPA1500
+ * \brief A macro that returns the model number of `KPA1500`.
*
- * The KPA1500 backend can be used with amplifiers that support the Elecraft
+ * The `KPA1500` model 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)
+
+/** The `GEMINI` family. */
+#define AMP_GEMINI 3
+/** Used in amp_reg.c for the `be_name`. */
+#define AMP_BACKEND_GEMINI "gemini"
/**
- * \brief A macro that returns the model number of the DX1200 backend.
- *
- * \def AMP_MODEL_GEMINI_DX1200
+ * \brief A macro that returns the model number of `DX1200`.
*
* The Gemini DX1200 covers 160 trhough 4 meters.
*/
-//! @cond Doxygen_Suppress
-#define AMP_GEMINI 3
-#define AMP_BACKEND_GEMINI "gemini"
-//! @endcond
#define AMP_MODEL_GEMINI_DX1200 AMP_MAKE_MODEL(AMP_GEMINI, 1)
+
+/** The `EXPERT` family. */
+#define AMP_EXPERT 4
+/** Used in amp_reg.c for the `be_name`. */
+#define AMP_BACKEND_EXPERT "expert"
/**
- * \brief A macro that returns the model number of the FA backend.
- *
- * \def AMP_MODEL_EXPERT_FA
+ * \brief A macro that returns the model number of `FA`.
*
* The Expert FA series of amplifiers is supported by this backend.
*/
-//! @cond Doxygen_Suppress
-#define AMP_EXPERT 4
-#define AMP_BACKEND_EXPERT "expert"
-//! @endcond
#define AMP_MODEL_EXPERT_FA AMP_MAKE_MODEL(AMP_EXPERT, 1)
commit f67a3cfe4722728335fb11a5939b6233a8cbec44
Author: Nate Bargmann <n0...@n0...>
Date: Sat Jul 26 08:53:15 2025 -0500
Update Doxygen comments in riglist.h
Create a new topic group of 'riglist' to separate the long list of radio
models from the main Rig API group.
diff --git a/doc/index.doxygen b/doc/index.doxygen
index dfa428b1f..73ba6e361 100644
--- a/doc/index.doxygen
+++ b/doc/index.doxygen
@@ -190,6 +190,7 @@ GNU/Linux.
/*! Define groups for Doxygen
* \defgroup rig Rig (transceiver) API
+ * \defgroup riglist Rig (radio) Model List
* \defgroup rig_internal Rig (transceiver) Internal API
* \defgroup rotator Rotator API
* \defgroup rot_internal Rotator Internal API
diff --git a/include/hamlib/riglist.h b/include/hamlib/riglist.h
index 1bbc6a1e3..3c59390e4 100644
--- a/include/hamlib/riglist.h
+++ b/include/hamlib/riglist.h
@@ -19,42 +19,52 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
#ifndef _RIGLIST_H
#define _RIGLIST_H 1
-//! @cond Doxygen_Suppress
+/**
+ * \addtogroup riglist
+ * @{
+ */
-// The rig model number is designed to fit in a 32-bit int
-// As of 2024-07-14 we have 39 backends defined -- need to be careful about generating new ones
-// Perhaps combine them under a MISC entry should work
-// As of 2020-02-18 we have 33 backends defined
-// With a max of 1000 models per backend we get total a model number range of 1001-33001
-// This MAX was 100 prior to 2020-02-18 and Icom was close to running out of the 100 range
-#define MAX_MODELS_PER_BACKEND 1000
-#define RIG_MAKE_MODEL(a,b) (MAX_MODELS_PER_BACKEND*(a)+(b))
-#define RIG_BACKEND_NUM(a) ((a)/MAX_MODELS_PER_BACKEND)
+/**
+ * \brief Hamlib rig (radio) model definitions.
+ *
+ * \file riglist.h
+ *
+ * This file contains rig (radio) model definitions for the Hamlib rig API.
+ * Each distinct rig 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 rig branches, one can use the statically defined
+ * RIG_BACKEND_LIST macro. To obtain a full list of supported rig (including
+ * each model in every branch), the foreach_opened_rig() API function can be
+ * used.
+ *
+ * The model number, or ID, is used to tell Hamlib, which rig the client
+ * wishes to use. It is done with the rig_init() API call.
+ */
-//! @endcond
+/** Number of models per backend family. */
+#define MAX_MODELS_PER_BACKEND 1000
-/*! \file riglist.h
- * \brief Hamlib rig(radio) model definitions.
+/**
+ * \brief The rig model number is held in an unsigned 32-bit integer.
*
- * This file contains rig model definitions for the Hamlib rig API. Each
- * distinct rig 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 rig branches, one can use the statically
- * defined RIG_BACKEND_LIST macro. To obtain a full list of supported rig
- * (including each model in every branch), the foreach_opened_rig() API
- * function can be used.
+ * Model numbers are a simple decimal value that increments by a value of
+ * 1000 for each backend, e.g. the `DUMMY` backend has model numbers 1
+ * to 1000, the `YAESU` backend has model numbers 1001 to 1100 and so on.
*
- * The model number, or ID, is used to tell hamlib, which rig the client
- * whishes to use. It is done with the rig_init() API call.
+ * \sa rig_model_t
*/
+#define RIG_MAKE_MODEL(a,b) (MAX_MODELS_PER_BACKEND*(a)+(b))
+
+/** Convenience macro to derive the backend family number from the model number. */
+#define RIG_BACKEND_NUM(a) ((a)/MAX_MODELS_PER_BACKEND)
/**
- * \def RIG_MODEL_NONE
* \brief A macro that returns the model number for an unknown model.
*
* The none backend, as the name suggests, does nothing. It is mainly for
@@ -62,23 +72,32 @@
*/
#define RIG_MODEL_NONE 0
-/*! \def RIG_MODEL_DUMMY
- * \brief A macro that returns the model number for the dummy backend.
+/**
+ * \brief The `DUMMY` family.
+ *
+ * It has also been expanded to provide support to "virtual" type of rigs such
+ * as the network rig control backend and W1HKJ's Flrig application and many
+ * more, especially SDR (Software Defined Radio) applications.
+ */
+#define RIG_DUMMY 0
+/** Used in register.c for the `be_name`. */
+#define RIG_BACKEND_DUMMY "dummy"
+/**
+ * \brief A macro that returns the model number for `DUMMY`.
*
- * The dummy backend, as the name suggests, is a backend which performs no
+ * The `DUMMY model, as the name suggests, is a model 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.
- *
- * It has also been expanded to provide support to "virtual" type of rigs
- * such as the network rig control backend and W1HKJ's Flrig application.
*/
-//! @cond Doxygen_Suppress
-#define RIG_DUMMY 0
-#define RIG_BACKEND_DUMMY "dummy"
-//! @endcond
#define RIG_MODEL_DUMMY RIG_MAKE_MODEL(RIG_DUMMY, 1)
-//! @cond Doxygen_Suppress
+
+/**
+ * \name NETWORK
+ * Network models.
+ */
+///@{
+/// Model of the `RIG_DUMMY` backend family.
#define RIG_MODEL_NETRIGCTL RIG_MAKE_MODEL(RIG_DUMMY, 2)
#define RIG_MODEL_ARMSTRONG RIG_MAKE_MODEL(RIG_DUMMY, 3)
#define RIG_MODEL_FLRIG RIG_MAKE_MODEL(RIG_DUMMY, 4)
@@ -89,12 +108,22 @@
#define RIG_MODEL_SDRSHARP RIG_MAKE_MODEL(RIG_DUMMY, 9)
#define RIG_MODEL_QUISK RIG_MAKE_MODEL(RIG_DUMMY, 10)
#define RIG_MODEL_GQRX RIG_MAKE_MODEL(RIG_DUMMY, 11)
+///@}
/*
* Yaesu
*/
+/** The `YAESU` family. */
#define RIG_YAESU 1
+/** Used in register.c for the `be_name`. */
#define RIG_BACKEND_YAESU "yaesu"
+
+/**
+ * \name YAESU
+ * Yaesu models.
+ */
+///@{
+/// Model of the `RIG_YAESU` backend family.
#define RIG_MODEL_FT847 RIG_MAKE_MODEL(RIG_YAESU, 1)
#define RIG_MODEL_FT1000 RIG_MAKE_MODEL(RIG_YAESU, 2)
#define RIG_MODEL_FT1000D RIG_MAKE_MODEL(RIG_YAESU, 3)
@@ -146,12 +175,22 @@
#define RIG_MODEL_FT710 RIG_MAKE_MODEL(RIG_YAESU, 49)
#define RIG_MODEL_FT9000OLD RIG_MAKE_MODEL(RIG_YAESU, 50)
#define RIG_MODEL_FTX1 RIG_MAKE_MODEL(RIG_YAESU, 51)
+///@}
/*
* Kenwood
*/
+/** The `KENWOOD` family. */
#define RIG_KENWOOD 2
+/** Used in register.c for the `be_name`. */
#define RIG_BACKEND_KENWOOD "kenwood"
+
+/**
+ * \name KENWOOD
+ * Kenwood models.
+ */
+///@{
+/// Model of the `RIG_KENWOOD` backend family.
#define RIG_MODEL_TS50 RIG_MAKE_MODEL(RIG_KENWOOD, 1)
#define RIG_MODEL_TS440 RIG_MAKE_MODEL(RIG_KENWOOD, 2)
#define RIG_MODEL_TS450S RIG_MAKE_MODEL(RIG_KENWOOD, 3)
@@ -209,12 +248,22 @@
#define RIG_MODEL_TRUSDX RIG_MAKE_MODEL(RIG_KENWOOD, 55)
#define RIG_MODEL_SDRCONSOLE RIG_MAKE_MODEL(RIG_KENWOOD, 56)
#define RIG_MODEL_QRPLABS_QMX RIG_MAKE_MODEL(RIG_KENWOOD,57)
+///@}
/*
* Icom
*/
+/** The `ICOM` family. */
#define RIG_ICOM 3
+/** Used in register.c for the `be_name`. */
#define RIG_BACKEND_ICOM "icom"
+
+/**
+ * \name ICOM
+ * Icom models.
+ */
+///@{
+/// Model of the `RIG_ICOM` backend family.
#define RIG_MODEL_IC1271 RIG_MAKE_MODEL(RIG_ICOM, 1)
#define RIG_MODEL_IC1275 RIG_MAKE_MODEL(RIG_ICOM, 2)
#define RIG_MODEL_IC271 RIG_MAKE_MODEL(RIG_ICOM, 3)
@@ -315,22 +364,42 @@
#define RIG_MODEL_OMNIVIP RIG_MAKE_MODEL(RIG_ICOM, 51) /* OMNI-VI+ */
#define RIG_MODEL_PARAGON2 RIG_MAKE_MODEL(RIG_ICOM, 59)
#define RIG_MODEL_DELTAII RIG_MAKE_MODEL(RIG_ICOM, 64)
+///@}
/*
* Icom PCR
*/
+/** The `PCR` family. */
#define RIG_PCR 4
+/** Used in register.c for the `be_name`. */
#define RIG_BACKEND_PCR "pcr"
+
+/**
+ * \name PCR
+ * PCR models.
+ */
+///@{
+/// Model of the `RIG_PCR` backend family.
#define RIG_MODEL_PCR1000 RIG_MAKE_MODEL(RIG_PCR, 1)
#define RIG_MODEL_PCR100 RIG_MAKE_MODEL(RIG_PCR, 2)
#define RIG_MODEL_PCR1500 RIG_MAKE_MODEL(RIG_PCR, 3)
#define RIG_MODEL_PCR2500 RIG_MAKE_MODEL(RIG_PCR, 4)
+///@}
/*
* AOR
*/
+/** The `AOR` family. */
#define RIG_AOR 5
+/** Used in register.c for the `be_name`. */
#define RIG_BACKEND_AOR "aor"
+
+/**
+ * \name AOR
+ * AOR models.
+ */
+///@{
+/// Model of the `RIG_AOR` backend family.
#define RIG_MODEL_AR8200 RIG_MAKE_MODEL(RIG_AOR, 1)
#define RIG_MODEL_AR8000 RIG_MAKE_MODEL(RIG_AOR, 2)
#define RIG_MODEL_AR7030 RIG_MAKE_MODEL(RIG_AOR, 3)
@@ -347,12 +416,22 @@
#define RIG_MODEL_AR5000A RIG_MAKE_MODEL(RIG_AOR, 14)
#define RIG_MODEL_AR7030P RIG_MAKE_MODEL(RIG_AOR, 15)
#define RIG_MODEL_SR2200 RIG_MAKE_MODEL(RIG_AOR, 16)
+///@}
/*
* JRC
*/
+/** The `JRC` family. */
#define RIG_JRC 6
+/** Used in register.c for the `be_name`. */
#define RIG_BACKEND_JRC "jrc"
+
+/**
+ * \name JRC
+ * JRC models.
+ */
+///@{
+/// Model of the `RIG_JRC` backend family.
#define RIG_MODEL_JST145 RIG_MAKE_MODEL(RIG_JRC, 1)
#define RIG_MODEL_JST245 RIG_MAKE_MODEL(RIG_JRC, 2)
#define RIG_MODEL_CMH530 RIG_MAKE_MODEL(RIG_JRC, 3)
@@ -360,25 +439,45 @@
#define RIG_MODEL_NRD525 RIG_MAKE_MODEL(RIG_JRC, 5)
#define RIG_MODEL_NRD535 RIG_MAKE_MODEL(RIG_JRC, 6)
#define RIG_MODEL_NRD545 RIG_MAKE_MODEL(RIG_JRC, 7)
+///@}
/*
* Radio Shack
* Actually, they might be either Icom or Uniden. TBC --SF
*/
+/** The `RADIOSHACK` family. */
#define RIG_RADIOSHACK 7
+/** Used in register.c for the `be_name`. */
#define RIG_BACKEND_RADIOSHACK "radioshack"
+
+/**
+ * \name RADIOSHACK
+ * RadioShack models.
+ */
+///@{
+/// Model of the `RIG_RADIOSHACK` backend family.
#define RIG_MODEL_RS64 RIG_MAKE_MODEL(RIG_RADIOSHACK, 1) /* PRO-64 */
#define RIG_MODEL_RS2005 RIG_MAKE_MODEL(RIG_RADIOSHACK, 2) /* w/ OptoElectronics OS456 Board */
#define RIG_MODEL_RS2006 RIG_MAKE_MODEL(RIG_RADIOSHACK, 3) /* w/ OptoElectronics OS456 Board */
#define RIG_MODEL_RS2035 RIG_MAKE_MODEL(RIG_RADIOSHACK, 4) /* w/ OptoElectronics OS435 Board */
#define RIG_MODEL_RS2042 RIG_MAKE_MODEL(RIG_RADIOSHACK, 5) /* w/ OptoElectronics OS435 Board */
#define RIG_MODEL_RS2041 RIG_MAKE_MODEL(RIG_RADIOSHACK, 6) /* PRO-2041 */
+///@}
/*
* Uniden
*/
+/** The `UNIDEN` family. */
#define RIG_UNIDEN 8
+/** Used in register.c for the `be_name`. */
#define RIG_BACKEND_UNIDEN "uniden"
+
+/**
+ * \name UNIDEN
+ * Uniden models.
+ */
+///@{
+/// Model of the `RIG_UNIDEN` backend family.
#define RIG_MODEL_BC780 RIG_MAKE_MODEL(RIG_UNIDEN, 1) /* Uniden BC780 - Trunk Tracker "Desktop Radio" */
#define RIG_MODEL_BC245 RIG_MAKE_MODEL(RIG_UNIDEN, 2)
#define RIG_MODEL_BC895 RIG_MAKE_MODEL(RIG_UNIDEN, 3)
@@ -391,73 +490,143 @@
#define RIG_MODEL_BCD396T RIG_MAKE_MODEL(RIG_UNIDEN, 10)
#define RIG_MODEL_BCD996T RIG_MAKE_MODEL(RIG_UNIDEN, 11)
#define RIG_MODEL_BC898 RIG_MAKE_MODEL(RIG_UNIDEN, 12)
+///@}
/*
* Drake
*/
+/** The `DRAKE` family. */
#define RIG_DRAKE 9
+/** Used in register.c for the `be_name`. */
#define RIG_BACKEND_DRAKE "drake"
+
+/**
+ * \name DRAKE
+ * Drake models.
+ */
+///@{
+/// Model of the `RIG_DRAKE` backend family.
#define RIG_MODEL_DKR8 RIG_MAKE_MODEL(RIG_DRAKE, 1)
#define RIG_MODEL_DKR8A RIG_MAKE_MODEL(RIG_DRAKE, 2)
#define RIG_MODEL_DKR8B RIG_MAKE_MODEL(RIG_DRAKE, 3)
+///@}
/*
* Lowe
*/
+/** The `LOWE` family. */
#define RIG_LOWE 10
+/** Used in register.c for the `be_name`. */
#define RIG_BACKEND_LOWE "lowe"
+
+/**
+ * \name LOWE
+ * Lowe models.
+ */
+///@{
+/// Model of the `RIG_LOWE` backend family.
#define RIG_MODEL_HF150 RIG_MAKE_MODEL(RIG_LOWE, 1)
#define RIG_MODEL_HF225 RIG_MAKE_MODEL(RIG_LOWE, 2)
#define RIG_MODEL_HF250 RIG_MAKE_MODEL(RIG_LOWE, 3)
#define RIG_MODEL_HF235 RIG_MAKE_MODEL(RIG_LOWE, 4)
+///@}
/*
* Racal
*/
+/** The `RACAL` family. */
#define RIG_RACAL 11
+/** Used in register.c for the `be_name`. */
#define RIG_BACKEND_RACAL "racal"
+
+/**
+ * \name RACAL
+ * Racal models.
+ */
+///@{
+/// Model of the `RIG_RACAL` backend family.
#define RIG_MODEL_RA3790 RIG_MAKE_MODEL(RIG_RACAL, 1)
#define RIG_MODEL_RA3720 RIG_MAKE_MODEL(RIG_RACAL, 2)
#define RIG_MODEL_RA6790 RIG_MAKE_MODEL(RIG_RACAL, 3)
#define RIG_MODEL_RA3710 RIG_MAKE_MODEL(RIG_RACAL, 4)
#define RIG_MODEL_RA3702 RIG_MAKE_MODEL(RIG_RACAL, 5)
+///@}
/*
* Watkins-Johnson
*/
+/** The `WJ` family. */
#define RIG_WJ 12
+/** Used in register.c for the `be_name`. */
#define RIG_BACKEND_WJ "wj"
+
+/**
+ * \name WJ
+ * Watkins-Johnson models.
+ */
+///@{
+/// Model of the `RIG_WJ` backend family.
#define RIG_MODEL_HF1000 RIG_MAKE_MODEL(RIG_WJ, 1)
#define RIG_MODEL_HF1000A RIG_MAKE_MODEL(RIG_WJ, 2)
#define RIG_MODEL_WJ8711 RIG_MAKE_MODEL(RIG_WJ, 3)
#define RIG_MODEL_WJ8888 RIG_MAKE_MODEL(RIG_WJ, 4)
+///@}
/*
* Rohde & Schwarz--ek
*/
+/** The `EK` family. */
#define RIG_EK 13
+/** Used in register.c for the `be_name`. */
#define RIG_BACKEND_EK "ek"
+
+/**
+ * \name EK
+ * Rohde & Schwarz EK models.
+ */
+///@{
+/// Model of the `RIG_EK` backend family.
#define RIG_MODEL_ESM500 RIG_MAKE_MODEL(RIG_EK, 1)
#define RIG_MODEL_EK890 RIG_MAKE_MODEL(RIG_EK, 2)
#define RIG_MODEL_EK891 RIG_MAKE_MODEL(RIG_EK, 3)
#define RIG_MODEL_EK895 RIG_MAKE_MODEL(RIG_EK, 4)
#define RIG_MODEL_EK070 RIG_MAKE_MODEL(RIG_EK, 5)
+///@}
/*
* Skanti
*/
+/** The `SKANTI` family. */
#define RIG_SKANTI 14
+/** Used in register.c for the `be_name`. */
#define RIG_BACKEND_SKANTI "skanti"
+
+/**
+ * \name SKANTI
+ * Skanti models.
+ */
+///@{
+/// Model of the `RIG_SKANTI` backend family.
#define RIG_MODEL_TRP7000 RIG_MAKE_MODEL(RIG_SKANTI, 1)
#define RIG_MODEL_TRP8000 RIG_MAKE_MODEL(RIG_SKANTI, 2)
#define RIG_MODEL_TRP9000 RIG_MAKE_MODEL(RIG_SKANTI, 3)
#define RIG_MODEL_TRP8255 RIG_MAKE_MODEL(RIG_SKANTI, 4)
+///@}
/*
* WiNRADiO/LinRADiO
*/
+/** The `WINRADIO` family. */
#define RIG_WINRADIO 15
+/** Used in register.c for the `be_name`. */
#define RIG_BACKEND_WINRADIO "winradio"
+
+/**
+ * \name WINRADIO
+ * WiNRADiO/LinRADiO models.
+ */
+///@{
+/// Model of the `RIG_WINRADIO` backend family.
#define RIG_MODEL_WR1000 RIG_MAKE_MODEL(RIG_WINRADIO, 1)
#define RIG_MODEL_WR1500 RIG_MAKE_MODEL(RIG_WINRADIO, 2)
#define RIG_MODEL_WR1550 RIG_MAKE_MODEL(RIG_WINRADIO, 3)
@@ -469,12 +638,22 @@
#define RIG_MODEL_G313 RIG_MAKE_MODEL(RIG_WINRADIO, 9)
#define RIG_MODEL_G305 RIG_MAKE_MODEL(RIG_WINRADIO, 10)
#define RIG_MODEL_G315 RIG_MAKE_MODEL(RIG_WINRADIO, 11)
+///@}
/*
* Ten Tec
*/
+/** The `TENTEC` family. */
#define RIG_TENTEC 16
+/** Used in register.c for the `be_name`. */
#define RIG_BACKEND_TENTEC "tentec"
+
+/**
+ * \name TENTEC
+ * Ten Tec models.
+ */
+///@{
+/// Model of the `RIG_TENTEC` backend family.
#define RIG_MODEL_TT550 RIG_MAKE_MODEL(RIG_TENTEC, 1) /* Pegasus */
#define RIG_MODEL_TT538 RIG_MAKE_MODEL(RIG_TENTEC, 2) /* Jupiter */
#define RIG_MODEL_RX320 RIG_MAKE_MODEL(RIG_TENTEC, 3)
@@ -487,54 +666,114 @@
#define RIG_MODEL_TT588 RIG_MAKE_MODEL(RIG_TENTEC, 11) /* Omni-VII */
#define RIG_MODEL_RX331 RIG_MAKE_MODEL(RIG_TENTEC, 12)
#define RIG_MODEL_TT599 RIG_MAKE_MODEL(RIG_TENTEC, 13) /* Eagle */
+///@}
/*
* Alinco
*/
+/** The `ALINCO` family. */
#define RIG_ALINCO 17
+/** Used in register.c for the `be_name`. */
#define RIG_BACKEND_ALINCO "alinco"
+
+/**
+ * \name ALINCO
+ * Alinco models.
+ */
+///@{
+/// Model of the `RIG_ALINCO` backend family.
#define RIG_MODEL_DX77 RIG_MAKE_MODEL(RIG_ALINCO, 1)
#define RIG_MODEL_DXSR8 RIG_MAKE_MODEL(RIG_ALINCO, 2)
+///@}
/*
* Kachina
*/
+/** The `KACHINA` family. */
#define RIG_KACHINA 18
+/** Used in register.c for the `be_name`. */
#define RIG_BACKEND_KACHINA "kachina"
+
+/**
+ * \name KACHINA
+ * Kachina model.
+ */
+///@{
+/// Model of the `RIG_KACHINA` backend family.
#define RIG_MODEL_505DSP RIG_MAKE_MODEL(RIG_KACHINA, 1)
+///@}
/*
* Gnuradio backend
*/
+/** The `GNURADIO` family. */
#define RIG_GNURADIO 20
+/** Used in register.c for the `be_name`. */
#define RIG_BACKEND_GNURADIO "gnuradio"
+
+/**
+ * \name GNURADIO
+ * GNU Radio models.
+ */
+///@{
+/// Model of the `RIG_GNURADIO` backend family.
#define RIG_MODEL_GNURADIO RIG_MAKE_MODEL(RIG_GNURADIO, 1) /* dev model, Chirp source */
#define RIG_MODEL_MC4020 RIG_MAKE_MODEL(RIG_GNURADIO, 2) /* MC4020 */
#define RIG_MODEL_GRAUDIO RIG_MAKE_MODEL(RIG_GNURADIO, 3) /* Sound card source */
#define RIG_MODEL_GRAUDIOIQ RIG_MAKE_MODEL(RIG_GNURADIO, 4) /* I&Q stereo sound card source */
#define RIG_MODEL_USRP_G RIG_MAKE_MODEL(RIG_GNURADIO, 5) /* Universal Software Radio Peripheral */
+///@}
/*
* Microtune tuners
*/
+/** The `MICROTUNE` family. */
#define RIG_MICROTUNE 21
+/** Used in register.c for the `be_name`. */
#define RIG_BACKEND_MICROTUNE "microtune"
+
+/**
+ * \name MICROTUNE
+ * Microtune models.
+ */
+///@{
+/// Model of the `RIG_MICROTUNE` backend family.
#define RIG_MODEL_MICROTUNE_4937 RIG_MAKE_MODEL(RIG_MICROTUNE, 1) /* eval board */
#define RIG_MODEL_MICROTUNE_4702 RIG_MAKE_MODEL(RIG_MICROTUNE, 2) /* Alan's */
#define RIG_MODEL_MICROTUNE_4707 RIG_MAKE_MODEL(RIG_MICROTUNE, 3)
+///@}
/*
* TAPR
*/
+/** The `TAPR` family. */
#define RIG_TAPR 22
+/** Used in register.c for the `be_name`. */
#define RIG_BACKEND_TAPR "tapr"
+
+/**
+ * \name TAPR
+ * TAPR model.
+ */
+///@{
+/// Model of the `RIG_TAPR` backend family.
#define RIG_MODEL_DSP10 RIG_MAKE_MODEL(RIG_TAPR, 1)
+///@}
/*
* Flex-radio
*/
+/** The `FLEXRADIO` family. */
#define RIG_FLEXRADIO 23
+/** Used in register.c for the `be_name`. */
#define RIG_BACKEND_FLEXRADIO "flexradio"
+
+/**
+ * \name FLEXRADIO
+ * FlexRadio models.
+ */
+///@{
+/// Model of the `RIG_FLEXRADIO` backend family.
#define RIG_MODEL_SDR1000 RIG_MAKE_MODEL(RIG_FLEXRADIO, 1)
#define RIG_MODEL_SDR1000RFE RIG_MAKE_MODEL(RIG_FLEXRADIO, 2)
#define RIG_MODEL_DTTSP RIG_MAKE_MODEL(RIG_FLEXRADIO, 3)
@@ -547,19 +786,39 @@
#define RIG_MODEL_SMARTSDR_F RIG_MAKE_MODEL(RIG_FLEXRADIO, 10)
#define RIG_MODEL_SMARTSDR_G RIG_MAKE_MODEL(RIG_FLEXRADIO, 11)
#define RIG_MODEL_SMARTSDR_H RIG_MAKE_MODEL(RIG_FLEXRADIO, 12)
+///@}
/*
* VEB Funkwerk Köpenick RFT
*/
+/** The `RFT` family. */
#define RIG_RFT 24
+/** Used in register.c for the `be_name`. */
#define RIG_BACKEND_RFT "rft"
+
+/**
+ * \name RFT
+ * VEB Funkwerk Köpenick RFT model.
+ */
+///@{
+/// Model of the `RIG_RFT` backend family.
#define RIG_MODEL_EKD500 RIG_MAKE_MODEL(RIG_RFT, 1)
+///@}
/*
* Various kits
*/
+/** The `KIT` family. */
#define RIG_KIT 25
+/** Used in register.c for the `be_name`. */
#define RIG_BACKEND_KIT "kit"
+
+/**
+ * \name KIT
+ * Various kit models.
+ */
+///@{
+/// Model of the `RIG_KIT` backend family.
#define RIG_MODEL_ELEKTOR304 RIG_MAKE_MODEL(RIG_KIT, 1)
#define RIG_MODEL_DRT1 RIG_MAKE_MODEL(RIG_KIT, 2)
#define RIG_MODEL_DWT RIG_MAKE_MODEL(RIG_KIT, 3)
@@ -579,100 +838,213 @@
#define RIG_MODEL_SI570PEABERRY2 RIG_MAKE_MODEL(RIG_KIT, 17) /* Peaberry V2 */
#define RIG_MODEL_FUNCUBEDONGLEPLUS RIG_MAKE_MODEL(RIG_KIT, 18) /* FunCUBE Dongle Pro+ */
#define RIG_MODEL_RSHFIQ RIG_MAKE_MODEL(RIG_KIT, 19) /* RS-HFIQ */
+///@}
/*
* SW/FM/TV tuner cards supported by Video4Linux,*BSD, ..
*/
+/** The `TUNER` family. */
#define RIG_TUNER 26
+/** Used in register.c for the `be_name`. */
#define RIG...
[truncated message content] |
|
From: n0nb <n0...@us...> - 2025-07-24 03:28:12
|
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 04c00330a6265680c2a78dbf88e9274eae1f02da (commit)
via 82feea990e584d1648dd5567a6e3f0e2a693f6a3 (commit)
via 98cc0b688e4f8cd0838d728d97a43e7a13d6c29c (commit)
via 1eb645004a45bf84e1fb71dcad294081a551f83d (commit)
via 605e961dbf46498284799cda6a991f47d810e66f (commit)
via 30494a4a1f03db4b9cdab6e901e6461d160d22e7 (commit)
via 947b2da28f1b9ca0e64a59acabdc49da2eb1d9fe (commit)
via c49cd2312cbdd0f859642160fb3874eab9db107d (commit)
via 133817bf146eca08ce8267793f31b14c47f90b08 (commit)
via 9ede33de4f690fd70c830aae1465d8bc9070839f (commit)
via 6cfaf03edd7c514c39b2620ae97763313169f14a (commit)
from 79f8b1cde83cf35b1cd30e67ab8f26fd1137b650 (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 04c00330a6265680c2a78dbf88e9274eae1f02da
Author: Nate Bargmann <n0...@n0...>
Date: Wed Jul 23 14:41:50 2025 -0500
Clean upp Doxygen comments in rotator.h
When a comment block immediately preceeds the item, repeating the item
type such as \def or \typedef is not required. They're only required
when the comment is not immediately preceeding or Doxygen doesn't get
the item correct.
diff --git a/include/hamlib/rotator.h b/include/hamlib/rotator.h
index ab79f5260..629e79022 100644
--- a/include/hamlib/rotator.h
+++ b/include/hamlib/rotator.h
@@ -32,9 +32,10 @@
*/
/**
- * \file rotator.h
* \brief Hamlib rotator data structures.
*
+ * \file rotator.h
+ *
* This file contains the data structures and declarations for the Hamlib
* rotator Application Programming Interface (API).
*
@@ -52,7 +53,6 @@ struct rot_state;
/**
- * \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
@@ -64,7 +64,6 @@ typedef struct s_rot ROT;
/**
- * \typedef typedef float elevation_t
* \brief Type definition for elevation.
*
* The \a elevation_t type is used as parameter for the rot_set_position() and
@@ -76,7 +75,6 @@ typedef float elevation_t;
/**
- * \typedef typedef float azimuth_t
* \brief Type definition for azimuth.
*
* The \a azimuth_t type is used as parameter for the rot_set_position() and
@@ -94,7 +92,6 @@ typedef float azimuth_t;
/**
- * \def ROT_RESET_ALL
* \brief A macro that returns the flag for the \b reset operation.
*
* \sa rot_reset(), rot_reset_t
@@ -103,7 +100,6 @@ typedef float azimuth_t;
/**
- * \typedef typedef int rot_reset_t
* \brief Type definition for rotator reset.
*
* The \a rot_reset_t type is used as parameter for the rot_reset() API
@@ -121,7 +117,7 @@ typedef enum {
} rot_type_t;
//! @cond Doxygen_Suppress
-/* So far only used in ests/dumpcaps_rot.c. */
+/* So far only used in tests/dumpcaps_rot.c. */
#define ROT_TYPE_MASK (ROT_FLAG_AZIMUTH|ROT_FLAG_ELEVATION)
//! @endcond
@@ -142,7 +138,6 @@ typedef enum {
/**
- * \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
@@ -154,7 +149,6 @@ typedef enum {
#define ROT_MOVE_UP (1<<1)
/**
- * \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
@@ -166,7 +160,6 @@ typedef enum {
#define ROT_MOVE_DOWN (1<<2)
/**
- * \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
@@ -178,7 +171,6 @@ typedef enum {
#define ROT_MOVE_LEFT (1<<3)
/**
- * \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
@@ -191,7 +183,6 @@ typedef enum {
#define ROT_MOVE_CCW ROT_MOVE_LEFT
/**
- * \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
@@ -203,7 +194,6 @@ typedef enum {
#define ROT_MOVE_RIGHT (1<<4)
/**
- * \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
@@ -216,7 +206,6 @@ typedef enum {
#define ROT_MOVE_CW ROT_MOVE_RIGHT
/**
- * \def ROT_MOVE_UP_LEFT
* \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
@@ -231,7 +220,6 @@ typedef enum {
#define ROT_MOVE_UP_LEFT (1<<5)
/**
- * \def ROT_MOVE_UP_CCW
* \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
@@ -246,7 +234,6 @@ typedef enum {
#define ROT_MOVE_UP_CCW ROT_MOVE_UP_LEFT
/**
- * \def ROT_MOVE_UP_RIGHT
* \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
@@ -261,7 +248,6 @@ typedef enum {
#define ROT_MOVE_UP_RIGHT (1<<6)
/**
- * \def ROT_MOVE_UP_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
@@ -276,7 +262,6 @@ typedef enum {
#define ROT_MOVE_UP_CW ROT_MOVE_UP_RIGHT
/**
- * \def ROT_MOVE_DOWN_LEFT
* \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
@@ -292,7 +277,6 @@ typedef enum {
/**
- * \def ROT_MOVE_DOWN_CCW
* \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
@@ -307,7 +291,6 @@ typedef enum {
#define ROT_MOVE_DOWN_CCW ROT_MOVE_DOWN_LEFT
/**
- * \def ROT_MOVE_DOWN_RIGHT
* \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
@@ -322,7 +305,6 @@ typedef enum {
#define ROT_MOVE_DOWN_RIGHT (1 << 8)
/**
- * \def ROT_MOVE_DOWN_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
@@ -453,7 +435,6 @@ enum rot_parm_e {
*/
/**
- * \struct rot_caps
* \brief Rotator capability data structure.
*
* The main idea of this structure is that it will be defined by the backend
@@ -581,7 +562,7 @@ struct rot_caps {
//! @endcond
//---Start cut here---
-// Rotatot state definition moved to include/hamlib/rot_state.h
+// Rotator state definition moved to include/hamlib/rot_state.h
// Temporary include until 5.0
#ifndef NO_OLD_INCLUDES
@@ -594,7 +575,6 @@ __BEGIN_DECLS
#endif
//---End cut here---
/**
- * \struct s_rot
* \brief Master rotator structure.
*
* This is the master data structure acting as the #ROT handle for the
@@ -884,7 +864,6 @@ extern HAMLIB_EXPORT(void *) rot_data_pointer(ROT *rot, rig_ptrx_t idx);
//! @endcond
/**
- * \def rot_debug
* \brief Convenience macro for generating debugging messages.
*
* This is an alias of the rig_debug() function call and is used in the same
commit 82feea990e584d1648dd5567a6e3f0e2a693f6a3
Author: Nate Bargmann <n0...@n0...>
Date: Wed Jul 23 14:34:14 2025 -0500
Add Doxygen config statements for newer versions
Newer versions of Doxygen (1.14 in Arch Linux) default HAVE_DOT and
CALL_GRAPH to NO, although older versions also default the latter to NO
as well.
Document why DISTRIBUTE_GROUP_DOC was added. Removes a bit of
redundancy.
diff --git a/doc/hamlib.cfg.in b/doc/hamlib.cfg.in
index 3105243de..67817ca4b 100644
--- a/doc/hamlib.cfg.in
+++ b/doc/hamlib.cfg.in
@@ -61,7 +61,11 @@ ENABLED_SECTIONS = ""
PREDEFINED = DOXYGEN "DOC_HIDDEN"
JAVADOC_AUTOBRIEF = NO
OPTIMIZE_OUTPUT_FOR_C = YES
+# Allow anonymous group for related macro definitions
DISTRIBUTE_GROUP_DOC = YES
+# Later versions default to NO
+HAVE_DOT = YES
+CALL_GRAPH = YES
MAN_LINKS = NO
MACRO_EXPANSION = YES
commit 98cc0b688e4f8cd0838d728d97a43e7a13d6c29c
Author: Nate Bargmann <n0...@n0...>
Date: Tue Jul 22 21:01:23 2025 -0500
Update Doxygen comments for rot_state.h
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 2047f1751..26e791e5a 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -6,11 +6,12 @@ dist_man_MANS = man1/ampctl.1 man1/ampctld.1 \
man7/hamlib.7 man7/hamlib-primer.7 man7/hamlib-utilities.7
SRCDOCLST = \
+ ../include/hamlib/amp_state.h \
../include/hamlib/amplifier.h \
../include/hamlib/amplist.h \
- ../include/hamlib/amp_state.h \
../include/hamlib/port.h \
../include/hamlib/rig.h \
+ ../include/hamlib/rot_state.h \
../include/hamlib/rotator.h \
../include/hamlib/rotlist.h \
../src/amp_conf.c \
diff --git a/include/hamlib/rot_state.h b/include/hamlib/rot_state.h
index 04d3a37db..84fd60b84 100644
--- a/include/hamlib/rot_state.h
+++ b/include/hamlib/rot_state.h
@@ -25,10 +25,26 @@
#define _ROT_STATE_H 1
__BEGIN_DECLS
+
+/**
+ * \addtogroup rotator
+ * @{
+ */
+
+
+/**
+ * \brief Hamlib rotator data structures.
+ *
+ * \file rot_state.h
+ *
+ * This file contains the live data state structure of the rotator.
+ */
+
/**
- * \struct rot_state
* \brief Rotator state structure
*
+ * \struct rot_state
+ *
* 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.
*
@@ -72,8 +88,8 @@ struct rot_state {
int current_speed; /*!< Current speed 1-100, to be used when no change to speed is requested. */
hamlib_port_t rotport; /*!< Rotator port (internal use). */
hamlib_port_t rotport2; /*!< 2nd Rotator port (internal use). */
- rig_ptr_t *pstrotator_handler_priv_data;
- deferred_config_header_t config_queue;
+ rig_ptr_t *pstrotator_handler_priv_data; /*!< PstRotator private data. */
+ deferred_config_header_t config_queue; /*!< Que for deferred processing. */
};
__END_DECLS
@@ -81,6 +97,9 @@ __END_DECLS
#if defined(IN_HAMLIB)
#define ROTSTATE(r) (&(r)->state)
#endif
+/** Macro for application access to rot_state data structure. */
#define HAMLIB_ROTSTATE(r) ((struct rot_state *)rot_data_pointer(r, RIG_PTRX_ROTSTATE))
#endif /* _ROT_STATE_H */
+
+/** @} */
commit 1eb645004a45bf84e1fb71dcad294081a551f83d
Author: Nate Bargmann <n0...@n0...>
Date: Tue Jul 22 18:17:19 2025 -0500
Ignore additional files from Doxygen processing
diff --git a/doc/hamlib.cfg.in b/doc/hamlib.cfg.in
index 23c8f3986..3105243de 100644
--- a/doc/hamlib.cfg.in
+++ b/doc/hamlib.cfg.in
@@ -32,7 +32,10 @@ INPUT = @top_srcdir@/doc/index.doxygen \
EXCLUDE = @top_srcdir@/include/hamlib/ampclass.h \
@top_srcdir@/include/hamlib/multicast.h \
+ @top_srcdir@/include/hamlib/rigclass.h \
+ @top_srcdir@/include/hamlib/rig_dll.h \
@top_srcdir@/include/hamlib/rotclass.h \
+ @top_srcdir@/include/hamlib/winpthreads.h \
@top_srcdir@/src/amp_conf.h \
@top_srcdir@/src/multicast.c
commit 605e961dbf46498284799cda6a991f47d810e66f
Author: Nate Bargmann <n0...@n0...>
Date: Tue Jul 22 17:54:20 2025 -0500
Update Doxygen comments for rotlist.h
diff --git a/include/hamlib/rotlist.h b/include/hamlib/rotlist.h
index e62b4b89b..567aa59e6 100644
--- a/include/hamlib/rotlist.h
+++ b/include/hamlib/rotlist.h
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
#ifndef _ROTLIST_H
#define _ROTLIST_H 1
@@ -35,9 +36,10 @@
*/
/**
- * \file rotlist.h
* \brief Hamlib rotator model definitions.
*
+ * \file rotlist.h
+ *
* 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
@@ -49,13 +51,14 @@
* function can be used.
*
* 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.
+ * wishes to use which is passed to 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
+ *
* The none backend, as the name suggests, does nothing. It is mainly for
* internal use.
*/
@@ -80,6 +83,22 @@
* The NETROTCTL backend allows use of the `rotctld` daemon through the normal
* Hamlib API.
*/
+/**
+ * \brief A macro that returns the model number for the PSTROTATOR backend.
+ *
+ * \def ROT_MODEL_PSTROTATOR
+ *
+ * The PSTROTATOR backend allows Hamlib clients to access the rotators controlled
+ * by the PstRotator software by YO3DMU: https://www.qsl.net/yo3dmu/index_Page346.htm
+ */
+/**
+ * \brief A macro that returns the model number for the SATROTCTL backend.
+ *
+ * \def ROT_MODEL_SATROTCTL
+ *
+ * The SATROTCTL allows Hamlib clients to access the rotators controlled by
+ * the S.A.T hardware by CSN Tecnologies: http://csntechnologies.net/
+ */
//! @cond Doxygen_Suppress
#define ROT_DUMMY 0
#define ROT_BACKEND_DUMMY "dummy"
@@ -316,7 +335,14 @@
* The GS232B_EL backend can be used with elevation rotators that support the
* GS-232B protocol.
*/
-
+/**
+ * \brief A macro that returns the model number of the GS23_AZ azimuth backend.
+ *
+ * \def ROT_MODEL_GS23_AZ
+ *
+ * The GS23_AZ backend can be used with azimuth rotators that support a
+ * generic version of the GS-232A protocol.
+ */
//! @cond Doxygen_Suppress
#define ROT_GS232A 6
#define ROT_BACKEND_GS232A "gs232a"
@@ -336,9 +362,13 @@
#define ROT_MODEL_GS23_AZ ROT_MAKE_MODEL(ROT_GS232A, 13)
#define ROT_MODEL_AF6SA_WRC ROT_MAKE_MODEL(ROT_GS232A, 14)
+// Add documentation when this model is implemented.
+//! @cond Doxygen_Suppress
#define ROT_ARRAYSOLUTIONS 7
#define ROT_BACKEND ARRAYSOLUTIONS "arraysolutions"
#define ROT_MODEL_ARRAYSOLUTIONS_SAL_12_20_30 ROT_MAKE_MODEL(ROT_ARRAYSOLUTIONS, 1)
+//! @endcond
+
/**
* \brief A macro that returns the model number of the PCROTOR backend.
*
@@ -561,6 +591,15 @@
* The PROSISTEL_AZEL_COMBI_TRACK_AZEL backend can be used with rotators that
* support the Prosistel combination azimuth and elevation protocol.
*/
+/**
+ * \brief A macro that returns the model number of the PROSISTEL_D_EL_CBOXAZ
+ * backend.
+ *
+ * \def ROT_MODEL_PROSISTEL_D_EL_CBOXAZ
+ *
+ * The PROSISTEL_D_EL_CBOXAZ backend can be used with the elevation rotator
+ * with Control Box D using azimuth logic.
+ */
//! @cond Doxygen_Suppress
#define ROT_PROSISTEL 17
#define ROT_BACKEND_PROSISTEL "prosistel"
@@ -642,9 +681,20 @@
//! @endcond
#define ROT_MODEL_RADANT ROT_MAKE_MODEL(ROT_RADANT, 1)
-
+/**
+ * \brief A macro that returns the model number of the ANDROIDSENSOR backend.
+ *
+ * \def ROT_MODEL_ANDROIDSENSOR
+ *
+ * The androidsensor rotator is not a real rotator, it uses the accelerometer
+ * sensor and magnetic field sensor of the cell phone or tablet to perform
+ * attitude determination for your antenna and the phone tied to it. Now you
+ * can wave your antenna to find radio signals.
+ */
+//! @cond Doxygen_Suppress
#define ROT_ANDROIDSENSOR 23
#define ROT_BACKEND_ANDROIDSENSOR "androidsensor"
+//! @endcond
#define ROT_MODEL_ANDROIDSENSOR ROT_MAKE_MODEL(ROT_ANDROIDSENSOR, 1)
/**
commit 30494a4a1f03db4b9cdab6e901e6461d160d22e7
Author: Nate Bargmann <n0...@n0...>
Date: Tue Jul 22 16:13:38 2025 -0500
Update Dozygen comments for amplist.h
diff --git a/include/hamlib/amplist.h b/include/hamlib/amplist.h
index 4122062c8..4539b6d2b 100644
--- a/include/hamlib/amplist.h
+++ b/include/hamlib/amplist.h
@@ -20,6 +20,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
#ifndef _AMPLIST_H
#define _AMPLIST_H 1
@@ -51,7 +52,7 @@
* 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 which is done with the amp_init() API call.
+ * wishes to use which is passed to the amp_init() API call.
*/
@@ -107,20 +108,34 @@
#define AMP_MODEL_ELECRAFT_KPA1500 AMP_MAKE_MODEL(AMP_ELECRAFT, 1)
//#define AMP_MODEL_ELECRAFT_KPA500 AMP_MAKE_MODEL(AMP_ELECRAFT, 2)
+/**
+ * \brief A macro that returns the model number of the DX1200 backend.
+ *
+ * \def AMP_MODEL_GEMINI_DX1200
+ *
+ * The Gemini DX1200 covers 160 trhough 4 meters.
+ */
+//! @cond Doxygen_Suppress
#define AMP_GEMINI 3
#define AMP_BACKEND_GEMINI "gemini"
+//! @endcond
#define AMP_MODEL_GEMINI_DX1200 AMP_MAKE_MODEL(AMP_GEMINI, 1)
+/**
+ * \brief A macro that returns the model number of the FA backend.
+ *
+ * \def AMP_MODEL_EXPERT_FA
+ *
+ * The Expert FA series of amplifiers is supported by this backend.
+ */
+//! @cond Doxygen_Suppress
#define AMP_EXPERT 4
#define AMP_BACKEND_EXPERT "expert"
+//! @endcond
#define AMP_MODEL_EXPERT_FA AMP_MAKE_MODEL(AMP_EXPERT, 1)
-/**
- * \brief Convenience type definition for an amplifier model.
- *
- * \typedef typedef int amp_model_t
- */
+/** Convenience type definition for an amplifier model. */
typedef int amp_model_t;
commit 947b2da28f1b9ca0e64a59acabdc49da2eb1d9fe
Author: Nate Bargmann <n0...@n0...>
Date: Tue Jul 22 15:25:38 2025 -0500
Update Doxygen comments in amp_state.h
diff --git a/include/hamlib/amp_state.h b/include/hamlib/amp_state.h
index 03ff8902c..d138ad141 100644
--- a/include/hamlib/amp_state.h
+++ b/include/hamlib/amp_state.h
@@ -61,7 +61,7 @@ struct amp_state
* non overridable fields, internal use
*/
//---Start cut here---
- hamlib_port_t_deprecated ampport_deprecated; /*!< Amplifier port (internal use). Deprecated */
+ hamlib_port_t_deprecated ampport_deprecated; /*!< \deprecated Amplifier port (internal use). */
//---End cut here---
int comm_state; /*!< Comm port state, opened/closed. */
@@ -79,6 +79,8 @@ struct amp_state
#if defined(IN_HAMLIB)
#define AMPSTATE(a) (&(a)->state)
#endif
+
+/** Macro for application access to amp_state data structure. */
#define HAMLIB_AMPSTATE(a) ((struct amp_state *)amp_data_pointer(a, RIG_PTRX_AMPSTATE))
__END_DECLS
commit c49cd2312cbdd0f859642160fb3874eab9db107d
Author: Nate Bargmann <n0...@n0...>
Date: Tue Jul 22 13:38:14 2025 -0500
Add Doxygen support to port.h
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 257b1112b..2047f1751 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -9,6 +9,7 @@ SRCDOCLST = \
../include/hamlib/amplifier.h \
../include/hamlib/amplist.h \
../include/hamlib/amp_state.h \
+ ../include/hamlib/port.h \
../include/hamlib/rig.h \
../include/hamlib/rotator.h \
../include/hamlib/rotlist.h \
diff --git a/doc/hamlib.cfg.in b/doc/hamlib.cfg.in
index 1799b946e..23c8f3986 100644
--- a/doc/hamlib.cfg.in
+++ b/doc/hamlib.cfg.in
@@ -58,6 +58,7 @@ ENABLED_SECTIONS = ""
PREDEFINED = DOXYGEN "DOC_HIDDEN"
JAVADOC_AUTOBRIEF = NO
OPTIMIZE_OUTPUT_FOR_C = YES
+DISTRIBUTE_GROUP_DOC = YES
MAN_LINKS = NO
MACRO_EXPANSION = YES
diff --git a/doc/index.doxygen b/doc/index.doxygen
index ee8eb8a66..dfa428b1f 100644
--- a/doc/index.doxygen
+++ b/doc/index.doxygen
@@ -195,5 +195,6 @@ GNU/Linux.
* \defgroup rot_internal Rotator Internal API
* \defgroup amplifier Amplifier API
* \defgroup amp_internal Amplifier Internal API
+ * \defgroup port Port data structure for accessing devices
* \defgroup utilities Utility Routines API
*/
diff --git a/include/hamlib/port.h b/include/hamlib/port.h
index 59af611cd..f072cb893 100644
--- a/include/hamlib/port.h
+++ b/include/hamlib/port.h
@@ -24,23 +24,40 @@
#ifndef _HL_PORT_H
#define _HL_PORT_H 1
+
__BEGIN_DECLS
+
+/**
+ * \addtogroup port
+ * @{
+ */
+
+/**
+ * \brief Hamlib port data structures.
+ *
+ * \file port.h
+ *
+ * This file contains the data structures and declarations for the Hamlib
+ * port Application Programming Interface (API).
+ */
+
/**
* \brief Port definition
*
* Of course, looks like OO painstakingly programmed in C, sigh.
+ *
+ * \warning
+ * DO NOT CHANGE THIS STRUCTURE AT ALL UNTIL 5.0.
+ * Right now it is static inside the rig structure.
+ * 5.0 will change it to a pointer which can then be added to.
+ * At that point only add to the end of the structure.
*/
-//! @cond Doxygen_Suppress
-// DO NOT CHANGE THIS STRUCTURE ALL UNTIL 5.0
-// Right now it is static inside rig structure
-// 5.0 will change it to a pointer which can then be added to
-// At that point only add to the end of the structure
typedef struct hamlib_port {
union {
- rig_port_t rig; /*!< Communication port type */
- ptt_type_t ptt; /*!< PTT port type */
- dcd_type_t dcd; /*!< DCD port type */
- } type;
+ rig_port_t rig; /*!< Communication port of #rig_port_e type. */
+ ptt_type_t ptt; /*!< PTT port of #ptt_type_e type. */
+ dcd_type_t dcd; /*!< DCD port of #dcd_type_e type. */
+ } type; /*!< Type of port in use.*/
int fd; /*!< File descriptor */
void *handle; /*!< handle for USB */
@@ -109,14 +126,20 @@ typedef struct hamlib_port {
} hamlib_port_t;
-// DO NOT CHANGE THIS STRUCTURE AT ALL
-// Will be removed in 5.0
+/**
+ * \deprecated
+ * This structure will be removed in 5.0 and should not be used in new code.
+ *
+ * \warning
+ * DO NOT CHANGE THIS STRUCTURE AT ALL!
+ * Will be removed in 5.0.
+ */
typedef struct hamlib_port_deprecated {
union {
rig_port_t rig; /*!< Communication port type */
ptt_type_t ptt; /*!< PTT port type */
dcd_type_t dcd; /*!< DCD port type */
- } type;
+ } type; /*!< Type of port in use.*/
int fd; /*!< File descriptor */
void *handle; /*!< handle for USB */
@@ -171,21 +194,27 @@ typedef struct hamlib_port_deprecated {
int client_port; /*!< client socket port for tcp connection */
RIG *rig; /*!< our parent RIG device */
} hamlib_port_t_deprecated;
-//! @endcond
#if !defined(__APPLE__) || !defined(__cplusplus)
+//! @deprecated Obsolete port type
typedef hamlib_port_t_deprecated port_t_deprecated;
+
+//! Short type name of the hamlib_port structure.
typedef hamlib_port_t port_t;
#endif
-// Macros for app access to hamlib_port_t data
+///@{
+/// Macro for application access to #hamlib_port_t data for this port type.
#define HAMLIB_RIGPORT(r) ((hamlib_port_t *)rig_data_pointer((r), RIG_PTRX_RIGPORT))
#define HAMLIB_PTTPORT(r) ((hamlib_port_t *)rig_data_pointer((r), RIG_PTRX_PTTPORT))
#define HAMLIB_DCDPORT(r) ((hamlib_port_t *)rig_data_pointer((r), RIG_PTRX_DCDPORT))
#define HAMLIB_AMPPORT(a) ((hamlib_port_t *)amp_data_pointer((a), RIG_PTRX_AMPPORT))
#define HAMLIB_ROTPORT(r) ((hamlib_port_t *)rot_data_pointer((r), RIG_PTRX_ROTPORT))
#define HAMLIB_ROTPORT2(r) ((hamlib_port_t *)rot_data_pointer((r), RIG_PTRX_ROTPORT2))
+///@}
__END_DECLS
#endif /* _HL_PORT_H */
+
+/** @} */
diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h
index 03ecb2656..416cb6210 100644
--- a/include/hamlib/rig.h
+++ b/include/hamlib/rig.h
@@ -668,11 +668,11 @@ typedef enum dcd_e {
/**
- * \brief DCD type
+ * \brief DCD (Data Carrier Detect) type
*
* \sa rig_get_dcd()
*/
-typedef enum {
+typedef enum dcd_type_e {
RIG_DCD_NONE = 0, /*!< No DCD available */
RIG_DCD_RIG, /*!< Rig has DCD status support, i.e. rig has get_dcd cap */
RIG_DCD_SERIAL_DSR, /*!< DCD status from serial DSR signal */
@@ -697,11 +697,13 @@ typedef enum {
/**
- * \brief PTT type
+ * \brief PTT (Push To Talk) type
+ *
+ * The method used to activate the transmitter of a radio.
*
* \sa rig_get_ptt()
*/
-typedef enum {
+typedef enum ptt_type_e {
RIG_PTT_NONE = 0, /*!< No PTT available */
RIG_PTT_RIG, /*!< Legacy PTT (CAT PTT) */
RIG_PTT_SERIAL_DTR, /*!< PTT control through serial DTR signal */
commit 133817bf146eca08ce8267793f31b14c47f90b08
Author: Nate Bargmann <n0...@n0...>
Date: Thu Jul 17 14:09:34 2025 -0500
Add license header to multicast.[ch]
diff --git a/include/hamlib/multicast.h b/include/hamlib/multicast.h
index 1bc18475f..674521617 100644
--- a/include/hamlib/multicast.h
+++ b/include/hamlib/multicast.h
@@ -1,3 +1,29 @@
+/*
+ * Hamlib Interface - Multicast API header
+ * Copyright (c) 2023 by Mike Black, W9MDB
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+
+#ifndef MULTICAST_H
+#define MULTICAST_H
+
//include <stdio.h>
//#include <stdlib.h>
//#include <string.h>
@@ -17,9 +43,6 @@
#include <arpa/inet.h>
#endif
-#ifndef MULTICAST_H
-#define MULTICAST_H
-
struct multicast_vfo
{
char *name;
@@ -42,4 +65,5 @@ struct multicast_broadcast
extern HAMLIB_EXPORT (int) multicast_init(RIG *rig, char *addr, int port);
extern HAMLIB_EXPORT (int) multicast_send(RIG *rig, const char *msg, int msglen);
extern HAMLIB_EXPORT (int) multicast_stop(RIG *rig);
-#endif //MULTICAST_H
+
+#endif // MULTICAST_H
diff --git a/src/multicast.c b/src/multicast.c
index f222f072b..01fad1703 100644
--- a/src/multicast.c
+++ b/src/multicast.c
@@ -1,3 +1,27 @@
+/*
+ * Hamlib Interface - Multicast API header
+ * Copyright (c) 2023,2024 by Mike Black, W9MDB
+ * Copyright (c) 2024,2025 by George Baltz, N3GB
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
commit 9ede33de4f690fd70c830aae1465d8bc9070839f
Author: Nate Bargmann <n0...@n0...>
Date: Thu Jul 17 14:08:44 2025 -0500
Exclude multicast.[ch] from Doxygen docs
diff --git a/doc/hamlib.cfg.in b/doc/hamlib.cfg.in
index df1157178..1799b946e 100644
--- a/doc/hamlib.cfg.in
+++ b/doc/hamlib.cfg.in
@@ -30,9 +30,11 @@ INPUT = @top_srcdir@/doc/index.doxygen \
@top_srcdir@/include/hamlib/ \
@top_srcdir@/src/
-EXCLUDE = @top_srcdir@/src/amp_conf.h \
- @top_srcdir@/include/hamlib/ampclass.h \
- @top_srcdir@/include/hamlib/rotclass.h
+EXCLUDE = @top_srcdir@/include/hamlib/ampclass.h \
+ @top_srcdir@/include/hamlib/multicast.h \
+ @top_srcdir@/include/hamlib/rotclass.h \
+ @top_srcdir@/src/amp_conf.h \
+ @top_srcdir@/src/multicast.c
INCLUDE_PATH = @top_srcdir@/include
commit 6cfaf03edd7c514c39b2620ae97763313169f14a
Author: Nate Bargmann <n0...@n0...>
Date: Thu Jul 17 13:21:39 2025 -0500
Add amp_state.h to Doxygen docs
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 85a956fa7..257b1112b 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -8,6 +8,7 @@ dist_man_MANS = man1/ampctl.1 man1/ampctld.1 \
SRCDOCLST = \
../include/hamlib/amplifier.h \
../include/hamlib/amplist.h \
+ ../include/hamlib/amp_state.h \
../include/hamlib/rig.h \
../include/hamlib/rotator.h \
../include/hamlib/rotlist.h \
diff --git a/include/hamlib/amp_state.h b/include/hamlib/amp_state.h
index c9b5253d1..03ff8902c 100644
--- a/include/hamlib/amp_state.h
+++ b/include/hamlib/amp_state.h
@@ -24,6 +24,21 @@
#ifndef _AMP_STATE_H
#define _AMP_STATE_H 1
+/**
+ * \addtogroup amplifier
+ * @{
+ */
+
+
+/**
+ * \brief Hamlib amplifier state structure.
+ *
+ * \file amp_state.h
+ *
+ * This file contains the live data state structure of the amplifier.
+ */
+
+
__BEGIN_DECLS
/**
* \brief Amplifier state structure.
@@ -69,3 +84,5 @@ struct amp_state
__END_DECLS
#endif /* _AMP_STATE_H */
+
+/** @} */
-----------------------------------------------------------------------
Summary of changes:
doc/Makefile.am | 3 +++
doc/hamlib.cfg.in | 16 ++++++++++---
doc/index.doxygen | 1 +
include/hamlib/amp_state.h | 21 +++++++++++++++-
include/hamlib/amplist.h | 27 ++++++++++++++++-----
include/hamlib/multicast.h | 32 +++++++++++++++++++++----
include/hamlib/port.h | 57 ++++++++++++++++++++++++++++++++-----------
include/hamlib/rig.h | 10 ++++----
include/hamlib/rot_state.h | 25 ++++++++++++++++---
include/hamlib/rotator.h | 29 ++++------------------
include/hamlib/rotlist.h | 60 ++++++++++++++++++++++++++++++++++++++++++----
src/multicast.c | 24 +++++++++++++++++++
12 files changed, 240 insertions(+), 65 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: n0nb <n0...@us...> - 2025-07-23 03:24:00
|
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 79f8b1cde83cf35b1cd30e67ab8f26fd1137b650 (commit)
via 8bcfeda94ad7e8d0160e80b0ac67423f5b583567 (commit)
via 47dae3879d95b1b68dccfba4c0e5757bdcdf38eb (commit)
via 8469ee1737ba8ab1191a12b5b0788bf6c666c527 (commit)
via 062f260c073707d18878f5be755800a894c04058 (commit)
via debcc2f565349a4ced8527dc9184a6d70d6a006c (commit)
from 83ba4eb27fcde29a5e47fb102f805a6c24693388 (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 79f8b1cde83cf35b1cd30e67ab8f26fd1137b650
Merge: 83ba4eb27 8bcfeda94
Author: Nate Bargmann <n0...@n0...>
Date: Tue Jul 22 22:11:06 2025 -0500
Merge HitHub PR #1811
diff --cc src/sleep.c
index 1155065af,98c190b10..02507bb09
--- a/src/sleep.c
+++ b/src/sleep.c
@@@ -35,9 -35,10 +35,9 @@@
* \note parameters are same as man page for each
*
*/
+ #include "hamlib/config.h"
#include <unistd.h>
-#include <errno.h>
#include <pthread.h>
- #include "hamlib/config.h"
#include "sleep.h"
#ifdef __cplusplus
commit 8bcfeda94ad7e8d0160e80b0ac67423f5b583567
Author: George Baltz N3GB <Geo...@gm...>
Date: Tue Jul 22 11:28:37 2025 -0400
Don't forget the noise
diff --git a/bindings/python/test_Hamlib_class.py b/bindings/python/test_Hamlib_class.py
index 2f09aac97..98f767f7e 100755
--- a/bindings/python/test_Hamlib_class.py
+++ b/bindings/python/test_Hamlib_class.py
@@ -674,6 +674,7 @@ class TestClass:
'RIG_MODEL_G315',
'RIG_MODEL_G90',
'RIG_MODEL_GNURADIO',
+'RIG_MODEL_GQRX',
'RIG_MODEL_GRAUDIO',
'RIG_MODEL_GRAUDIOIQ',
'RIG_MODEL_GS100',
@@ -930,7 +931,6 @@ class TestClass:
'RIG_MODE_AM',
'RIG_MODE_AMN',
'RIG_MODE_AMS',
-'RIG_MODE_BIT46',
'RIG_MODE_BIT47',
'RIG_MODE_BIT48',
'RIG_MODE_BIT49',
@@ -994,6 +994,7 @@ class TestClass:
'RIG_MODE_USBD2',
'RIG_MODE_USBD3',
'RIG_MODE_WFM',
+'RIG_MODE_WFMS',
'RIG_MTYPE_BAND',
'RIG_MTYPE_CALL',
'RIG_MTYPE_EDGE',
commit 47dae3879d95b1b68dccfba4c0e5757bdcdf38eb
Author: George Baltz N3GB <Geo...@gm...>
Date: Tue Jul 22 11:07:33 2025 -0400
Fix compiler errors with strict C23 standards
Fix missing/misplaced '#include "config.h"' statements. Fixes missing
function prototypes, unknown type definitions, etc. Allows configuration
of GCC with CFLAGS="-std=c23" instead of using default -std=gnu23.
Don't know about CLANG, MSVC, MinGW, etc, but using
gwb@stitch:~> gcc --version
gcc (SUSE Linux) 15.1.1 20250714
Copyright (C) 2025 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Hamlib can compile in strict C23 mode, or previous standard levels.
diff --git a/lib/precise_time.c b/lib/precise_time.c
index 763caadb3..7639a7a26 100644
--- a/lib/precise_time.c
+++ b/lib/precise_time.c
@@ -20,6 +20,7 @@
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ---------------------------------------------------------------------
+#include "config.h"
#include <errno.h>
#include <time.h>
#include <sys/time.h>
diff --git a/rigs/barrett/barrett.c b/rigs/barrett/barrett.c
index 17756ebcb..1aaf7a92d 100644
--- a/rigs/barrett/barrett.c
+++ b/rigs/barrett/barrett.c
@@ -19,6 +19,7 @@
*
*/
+#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/rigs/dummy/dummy.c b/rigs/dummy/dummy.c
index 948bb89aa..a7006792f 100644
--- a/rigs/dummy/dummy.c
+++ b/rigs/dummy/dummy.c
@@ -20,6 +20,7 @@
*
*/
+#include "config.h"
// cppcheck-suppress *
#include <stdint.h>
// cppcheck-suppress *
diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c
index 4ee7b3de6..dd17395e8 100644
--- a/rigs/dummy/flrig.c
+++ b/rigs/dummy/flrig.c
@@ -20,6 +20,7 @@
*
*/
+#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h> /* String function definitions */
diff --git a/rigs/dummy/netrigctl.c b/rigs/dummy/netrigctl.c
index 382f5f039..d4b833d96 100644
--- a/rigs/dummy/netrigctl.c
+++ b/rigs/dummy/netrigctl.c
@@ -19,6 +19,7 @@
*
*/
+#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h> /* String function definitions */
diff --git a/rigs/dummy/quisk.c b/rigs/dummy/quisk.c
index c3fb30b0e..f240177b5 100644
--- a/rigs/dummy/quisk.c
+++ b/rigs/dummy/quisk.c
@@ -19,6 +19,7 @@
*
*/
+#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h> /* String function definitions */
diff --git a/rigs/dummy/tci1x.c b/rigs/dummy/tci1x.c
index cf9123c7b..984114b75 100644
--- a/rigs/dummy/tci1x.c
+++ b/rigs/dummy/tci1x.c
@@ -19,6 +19,7 @@
*
*/
+#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h> /* String function definitions */
diff --git a/rigs/dummy/trxmanager.c b/rigs/dummy/trxmanager.c
index e9790e4d2..1c320b221 100644
--- a/rigs/dummy/trxmanager.c
+++ b/rigs/dummy/trxmanager.c
@@ -20,6 +20,7 @@
*
*/
+#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h> /* String function definitions */
diff --git a/security/AESStringCrypt.c b/security/AESStringCrypt.c
index eacc750bd..908b1ab41 100644
--- a/security/AESStringCrypt.c
+++ b/security/AESStringCrypt.c
@@ -28,6 +28,7 @@
* BUT NOT LIMITED TO, LOSS OF DATA OR DATA BEING RENDERED INACCURATE.
*/
+#include "config.h"
#include <stdio.h>
#include <string.h>
diff --git a/src/sleep.c b/src/sleep.c
index 00a29e2d0..98c190b10 100644
--- a/src/sleep.c
+++ b/src/sleep.c
@@ -35,10 +35,10 @@
* \note parameters are same as man page for each
*
*/
+#include "hamlib/config.h"
#include <unistd.h>
#include <errno.h>
#include <pthread.h>
-#include "hamlib/config.h"
#include "sleep.h"
#ifdef __cplusplus
diff --git a/tests/rigtestmcastrx.c b/tests/rigtestmcastrx.c
index fdc2b6596..e6a5d723f 100644
--- a/tests/rigtestmcastrx.c
+++ b/tests/rigtestmcastrx.c
@@ -1,3 +1,4 @@
+#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
commit 8469ee1737ba8ab1191a12b5b0788bf6c666c527
Author: George Baltz N3GB <Geo...@gm...>
Date: Sun Jul 20 16:28:56 2025 -0400
Fix incorrect fallthroughs
Found with -Wimplicit-fallthrough, but also many false positives
diff --git a/rigs/dummy/dummy.c b/rigs/dummy/dummy.c
index 0d59308d9..948bb89aa 100644
--- a/rigs/dummy/dummy.c
+++ b/rigs/dummy/dummy.c
@@ -712,6 +712,9 @@ static int dummy_set_vfo(RIG *rig, vfo_t vfo)
priv->curr = &priv->mem[curr->channel_num];
break;
}
+ rig_debug(RIG_DEBUG_ERR, "%s: invalid memory channel %d\n", __func__,
+ curr->channel_num);
+ RETURNFUNC(-RIG_EINVAL);
case RIG_VFO_TX:
if (priv->tx_vfo == RIG_VFO_A) { priv->curr = &priv->vfo_maina; }
diff --git a/rigs/rs/xk852.c b/rigs/rs/xk852.c
index 1b1b1a637..f4aee5555 100644
--- a/rigs/rs/xk852.c
+++ b/rigs/rs/xk852.c
@@ -334,47 +334,46 @@ xk852_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
{
case XK852_NOISE_BLANK_OFF:
val->f = 1;
- return RIG_OK;
break;
case XK852_NOISE_BLANK_ON:
val->f = 0;
- return RIG_OK;
- break;
+
}
+ return RIG_OK;
+
case RIG_LEVEL_RFPOWER:
switch (state.op_mode)
{
case XK852_OP_MODE_OFF:
val->f = 0;
- return RIG_OK;
break;
case XK852_OP_MODE_RX:
val->f = 0;
- return RIG_OK;
break;
case XK852_OP_MODE_TX_LOW:
val->f = 0.099;
- return RIG_OK;
break;
case XK852_OP_MODE_TX_MID:
val->f = 0.499;
- return RIG_OK;
break;
case XK852_OP_MODE_TX_FULL:
val->f = 1;
- return RIG_OK;
break;
+
+ default:
+ return -RIG_EINVAL;
+
}
+ return RIG_OK;
default:
return -RIG_ENIMPL;
- break;
}
return -RIG_EINVAL;
commit 062f260c073707d18878f5be755800a894c04058
Author: George Baltz N3GB <Geo...@gm...>
Date: Sat Jul 19 15:31:02 2025 -0400
Clean up some cppcheck gripes in simulators/
diff --git a/simulators/simpstrotator.c b/simulators/simpstrotator.c
index 1b1454116..74e7cd01a 100644
--- a/simulators/simpstrotator.c
+++ b/simulators/simpstrotator.c
@@ -8,7 +8,7 @@
#define REPLY_PORT 12002
#define BUFFER_SIZE 1024
-void handle_receive(int recv_sockfd, struct sockaddr_in *client_addr,
+static void handle_receive(int recv_sockfd, struct sockaddr_in *client_addr,
socklen_t addr_len, char *buffer)
{
ssize_t recv_len;
@@ -28,7 +28,7 @@ void handle_receive(int recv_sockfd, struct sockaddr_in *client_addr,
printf("Data: %s\n", buffer);
}
-void handle_send(int send_sockfd, struct sockaddr_in *client_addr,
+static void handle_send(int send_sockfd, struct sockaddr_in *client_addr,
socklen_t addr_len, const char *message)
{
ssize_t sent_len;
diff --git a/simulators/simts890.c b/simulators/simts890.c
index 7d9120669..b39a40db7 100644
--- a/simulators/simts890.c
+++ b/simulators/simts890.c
@@ -123,7 +123,7 @@ int tfset = 0;
typedef struct kvfo
{
int freq;
- int mode;
+ unsigned int mode;
short band, vfo; // Redundant, but useful for relative movement
} *kvfop_t;
@@ -267,8 +267,8 @@ getmyline(int fd, char *buf)
if (retval != 0)
{
perror("read failed:");
- close(fd);
- fd = openPort("");
+ //close(fd);
+ //fd = openPort("");
}
if (strlen(buf) == 0) { hl_usleep(10 * 1000); }
@@ -588,7 +588,8 @@ int main(int argc, char *argv[])
else if (strncmp(buf, "SF", 2) == 0)
{
// Sets and Reads the VFO (Frequency and Mode)
- int tmpvfo, tmpfreq, tmpmode, newband;
+ int tmpvfo, tmpfreq, newband;
+ unsigned int tmpmode;
kvfop_t ovfo, nvfo;
if (sscanf(buf, SFformat, &tmpvfo, &tmpfreq, &tmpmode) != 3 || tmpvfo < 0
@@ -599,7 +600,7 @@ int main(int argc, char *argv[])
continue;
}
- //printf("tmpvfo=%d, tmpfreq=%d, tmpmode=%d\n", tmpvfo, tmpfreq, tmpmode);
+ //printf("tmpvfo=%d, tmpfreq=%d, tmpmode=%u\n", tmpvfo, tmpfreq, tmpmode);
ovfo = *vfoAB[tmpvfo];
newband = freq2band(tmpfreq);
@@ -1251,10 +1252,10 @@ int main(int argc, char *argv[])
case '0': // Get/Set Local clock
{
time_t t;
- struct tm *localtm;
if (buf[3] == ';')
{
+ const struct tm *localtm;
t = time(NULL);
localtm = localtime(&t);
strftime(&buf[3], BUFSIZ - 3, "%y%m%d%H%M%S;", localtm);
diff --git a/simulators/simts990.c b/simulators/simts990.c
index 84b4d7c82..c39ba49ac 100644
--- a/simulators/simts990.c
+++ b/simulators/simts990.c
@@ -116,8 +116,8 @@ getmyline(int fd, char *buf)
if (retval != 0)
{
perror("read failed:");
- close(fd);
- fd = openPort("");
+ //close(fd);
+ //fd = openPort("");
}
if (strlen(buf) == 0) { hl_usleep(10 * 1000); }
commit debcc2f565349a4ced8527dc9184a6d70d6a006c
Author: George Baltz N3GB <Geo...@gm...>
Date: Sun Jul 13 20:45:49 2025 -0400
Clean up simft847.c
At least make get/set freq and mode work.
diff --git a/simulators/simft847.c b/simulators/simft847.c
index d73bea1a5..91d031c12 100644
--- a/simulators/simft847.c
+++ b/simulators/simft847.c
@@ -13,18 +13,19 @@ struct ip_mreq
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
-#include "../include/hamlib/rig.h"
+//#include "../include/hamlib/rig.h"
#define BUFSIZE 256
-float freqA = 14074000;
-float freqB = 14074500;
-char tx_vfo = '0';
-char rx_vfo = '0';
-char modeA = '1';
-char modeB = '1';
+/* In hono(u)r of the 10Hz resolution of the FT-847, vfo frequencies
+ * are stored in decaHertz(daHz)
+ */
+int freqs[4] = {1407400, 43510000, 43720000, 0};
+int modes[4] = {0x01, 0x02, 0x02, 0};
+char *vfoNames[4] = {"Main", "SAT Rx", "SAT Tx", "Bogus"};
int width_main = 500;
int width_sub = 700;
+int vfo;
int
@@ -89,7 +90,7 @@ int openPort(char *comport) // doesn't matter for using pts devices
int main(int argc, char *argv[])
{
unsigned char buf[256];
- int n;
+ int freq, i, n;
again:
@@ -109,6 +110,7 @@ again:
{
printf("Not 5 bytes? bytes=%d\n", bytes);
}
+ n = 0;
switch (buf[4])
{
@@ -120,7 +122,11 @@ again:
case 0x88: printf("PTT OFF\n"); break;
- case 0x07: printf("MODE\n"); break;
+ case 0x07:
+ case 0x17:
+ case 0x27:
+ modes[(buf[4] & 0x30) >> 4] = buf[0];
+ printf("MODE\n"); break;
case 0x05: printf("CLAR ON\n"); break;
@@ -148,13 +154,33 @@ again:
case 0xF7: printf("READ TX STATUS\n"); break;
+ case 0x01:
+ case 0x11:
+ case 0x21:
+ freq = 0;
+ for (i = 0; i < 4; i++)
+ {
+ freq = freq * 100 + (((buf[i] & 0xf0) * 5) / 8) + (buf[i] & 0x0f);
+ }
+ freqs[(buf[4] & 0x30) >> 4] = freq;
+ printf("FREQ SET = %d\n", freq * 10);
+ break;
+
case 0x03:
+ case 0x13:
+ case 0x23:
printf("READ RX STATUS\n");
- buf[0] = 0x01;
- buf[1] = 0x40;
- buf[2] = 0x74;
- buf[3] = 0x00;
- buf[4] = 0x03; n = write(fd, buf, 5);
+ vfo = (buf[4] & 0x30) >> 4;
+ freq = freqs[vfo];
+ for (i = 3; i >= 0; i--)
+ {
+ buf[i] = freq % 10;
+ freq /= 10;
+ buf[i] += (freq % 10) << 4;
+ freq /= 10;
+ }
+ buf[4] = modes[vfo];
+ n = write(fd, buf, 5);
break;
case 0xbb: buf[0] = buf[1] = 0; printf("READ EPROM\n"); n = write(fd, buf, 2);
@@ -162,6 +188,7 @@ again:
default: printf("Unknown cmd=%02x\n", buf[4]);
}
+ if (n < 0) {printf("Write failed - n = %d\n", n); }
}
return 0;
-----------------------------------------------------------------------
Summary of changes:
lib/precise_time.c | 1 +
rigs/barrett/barrett.c | 1 +
rigs/dummy/dummy.c | 4 ++++
rigs/dummy/flrig.c | 1 +
rigs/dummy/netrigctl.c | 1 +
rigs/dummy/quisk.c | 1 +
rigs/dummy/tci1x.c | 1 +
rigs/dummy/trxmanager.c | 1 +
rigs/rs/xk852.c | 17 +++++++-------
security/AESStringCrypt.c | 1 +
simulators/simft847.c | 55 ++++++++++++++++++++++++++++++++++------------
simulators/simpstrotator.c | 4 ++--
simulators/simts890.c | 13 ++++++-----
simulators/simts990.c | 4 ++--
src/sleep.c | 2 +-
tests/rigtestmcastrx.c | 1 +
16 files changed, 74 insertions(+), 34 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: n0nb <n0...@us...> - 2025-07-23 03:06:51
|
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 83ba4eb27fcde29a5e47fb102f805a6c24693388 (commit)
via 276de64d9ca0e797070926c65c98a71c98d1deee (commit)
via 0267068220ad26a09497b0cd8ab5258aae0fcc09 (commit)
via 2fab137fc50cdb2bc78716d63daad866bf9b05c5 (commit)
via 7fe36ebdd6629e0ad852a95fc4d3404b4b5ddc8f (commit)
via b57ad227a080cd58cb2ce3ca4c4d8797876602e9 (commit)
via 974e619dd26db17ffb98461203e8ed67f2381d01 (commit)
via 195ed0154378d6a0d6413036e73a5a056d9e3243 (commit)
via f621a961f47efc145bafa77fb184fcf58b2a42af (commit)
via 2a3f603680f48054e43ad0f4afa20ae70eac0157 (commit)
via b5c8e7faba8e00b2843508a35668d90ea808e655 (commit)
via 827138d23e8ea7cff97a2895f5560bfbef7cac13 (commit)
via f4ece0d207b73352512e81499416f02504dfd780 (commit)
via d536f0ec9395ccfc6c7a0ceb7d88fd74a00f5529 (commit)
via 9afdfc5de365ba6fa01b9f2816136d4c9fafbf0c (commit)
via b66d1ac7c13b21ec5469be83bcc0df0b42ab35b8 (commit)
from 4da91f1a288e81132482be23c298c41ff062cfe9 (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 83ba4eb27fcde29a5e47fb102f805a6c24693388
Author: Daniele Forsi IU5HKX <iu...@gm...>
Date: Tue Jul 22 23:42:30 2025 +0200
Update the tests
diff --git a/bindings/python/test_Hamlib_class.py b/bindings/python/test_Hamlib_class.py
index 2f09aac97..98f767f7e 100755
--- a/bindings/python/test_Hamlib_class.py
+++ b/bindings/python/test_Hamlib_class.py
@@ -674,6 +674,7 @@ class TestClass:
'RIG_MODEL_G315',
'RIG_MODEL_G90',
'RIG_MODEL_GNURADIO',
+'RIG_MODEL_GQRX',
'RIG_MODEL_GRAUDIO',
'RIG_MODEL_GRAUDIOIQ',
'RIG_MODEL_GS100',
@@ -930,7 +931,6 @@ class TestClass:
'RIG_MODE_AM',
'RIG_MODE_AMN',
'RIG_MODE_AMS',
-'RIG_MODE_BIT46',
'RIG_MODE_BIT47',
'RIG_MODE_BIT48',
'RIG_MODE_BIT49',
@@ -994,6 +994,7 @@ class TestClass:
'RIG_MODE_USBD2',
'RIG_MODE_USBD3',
'RIG_MODE_WFM',
+'RIG_MODE_WFMS',
'RIG_MTYPE_BAND',
'RIG_MTYPE_CALL',
'RIG_MTYPE_EDGE',
commit 276de64d9ca0e797070926c65c98a71c98d1deee
Author: Daniele Forsi IU5HKX <iu...@gm...>
Date: Tue Jul 22 22:42:02 2025 +0200
Revert changes to quotes in the include/hamlib directory
Partially reverts commit #052cbb27 ("Fix ambiguity between system
includes and Hamlib includes") since the files in include/hamlib
are part of the public API, they must use the installed includes
when building third party applications.
diff --git a/include/hamlib/ampclass.h b/include/hamlib/ampclass.h
index b605cbaef..1bb5876b7 100644
--- a/include/hamlib/ampclass.h
+++ b/include/hamlib/ampclass.h
@@ -22,7 +22,7 @@
#ifndef _AMPCLASS_H
#define _AMPCLASS_H 1
-#include "hamlib/amplifier.h"
+#include <hamlib/amplifier.h>
diff --git a/include/hamlib/amplifier.h b/include/hamlib/amplifier.h
index b17c7ff47..847b2a53b 100644
--- a/include/hamlib/amplifier.h
+++ b/include/hamlib/amplifier.h
@@ -23,8 +23,8 @@
#ifndef _AMPLIFIER_H
#define _AMPLIFIER_H 1
-#include "hamlib/rig.h"
-#include "hamlib/amplist.h"
+#include <hamlib/rig.h>
+#include <hamlib/amplist.h>
/**
* \addtogroup amplifier
@@ -271,7 +271,7 @@ struct amp_caps
__END_DECLS
-#include "hamlib/amp_state.h"
+#include <hamlib/amp_state.h>
__BEGIN_DECLS
diff --git a/include/hamlib/multicast.h b/include/hamlib/multicast.h
index 01dbdc248..1bc18475f 100644
--- a/include/hamlib/multicast.h
+++ b/include/hamlib/multicast.h
@@ -3,7 +3,7 @@
//#include <string.h>
//#include <errno.h>
//#include <unistd.h>
-#include "hamlib/rig.h"
+#include <hamlib/rig.h>
//#include <sys/socket.h>
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h
index c7a5234ba..03ecb2656 100644
--- a/include/hamlib/rig.h
+++ b/include/hamlib/rig.h
@@ -70,8 +70,8 @@
#include <pthread.h>
/* Rig list is in a separate file so as not to mess up w/ this one */
-#include "hamlib/riglist.h"
-//#include "hamlib/config.h"
+#include <hamlib/riglist.h>
+//#include <hamlib/config.h>
/**
* \addtogroup rig
@@ -122,7 +122,7 @@
#endif
//! @endcond
-#include "hamlib/rig_dll.h"
+#include <hamlib/rig_dll.h>
#ifndef SWIGLUA
//! @cond Doxygen_Suppress
@@ -2367,7 +2367,7 @@ typedef struct hamlib_async_pipe hamlib_async_pipe_t;
#ifndef NO_OLD_INCLUDES
__END_DECLS
-#include "hamlib/port.h"
+#include <hamlib/port.h>
__BEGIN_DECLS
#endif
@@ -2536,7 +2536,7 @@ struct rig_cache_deprecated {
* \brief Multicast data items the are unique per rig instantiation
* This is meant for internal Hamlib use only
*/
-#include "hamlib/multicast.h"
+#include <hamlib/multicast.h>
struct multicast_s
{
int multicast_running;
@@ -2571,7 +2571,7 @@ typedef unsigned int rig_comm_status_t;
__END_DECLS
-#include "hamlib/rig_state.h"
+#include <hamlib/rig_state.h>
__BEGIN_DECLS
diff --git a/include/hamlib/rigclass.h b/include/hamlib/rigclass.h
index d4bea0d89..23b4738fd 100644
--- a/include/hamlib/rigclass.h
+++ b/include/hamlib/rigclass.h
@@ -22,7 +22,7 @@
#ifndef _RIGCLASS_H
#define _RIGCLASS_H 1
-#include "hamlib/rig.h"
+#include <hamlib/rig.h>
#include <iostream>
diff --git a/include/hamlib/rotator.h b/include/hamlib/rotator.h
index 5a3a618cb..ab79f5260 100644
--- a/include/hamlib/rotator.h
+++ b/include/hamlib/rotator.h
@@ -23,8 +23,8 @@
#ifndef _ROTATOR_H
#define _ROTATOR_H 1
-#include "hamlib/rig.h"
-#include "hamlib/rotlist.h"
+#include <hamlib/rig.h>
+#include <hamlib/rotlist.h>
/**
* \addtogroup rotator
@@ -587,7 +587,7 @@ struct rot_caps {
__END_DECLS
-#include "hamlib/rot_state.h"
+#include <hamlib/rot_state.h>
__BEGIN_DECLS
diff --git a/include/hamlib/rotclass.h b/include/hamlib/rotclass.h
index 06ccf3ea4..219e3a92f 100644
--- a/include/hamlib/rotclass.h
+++ b/include/hamlib/rotclass.h
@@ -22,7 +22,7 @@
#ifndef _ROTCLASS_H
#define _ROTCLASS_H 1
-#include "hamlib/rotator.h"
+#include <hamlib/rotator.h>
commit 0267068220ad26a09497b0cd8ab5258aae0fcc09
Author: Daniele Forsi IU5HKX <iu...@gm...>
Date: Sun Jul 20 17:37:24 2025 +0200
Fix ambiguity between system includes and Hamlib includes
diff --git a/amplifiers/elecraft/kpa.h b/amplifiers/elecraft/kpa.h
index 651c5050c..b0edd10ee 100644
--- a/amplifiers/elecraft/kpa.h
+++ b/amplifiers/elecraft/kpa.h
@@ -26,7 +26,7 @@
#ifndef _AMP_ELECRAFT_H
#define _AMP_ELECRAFT_H 1
-#include <hamlib/amplifier.h>
+#include "hamlib/amplifier.h"
// Is this big enough?
#define KPABUFSZ 100
diff --git a/amplifiers/expert/expert.h b/amplifiers/expert/expert.h
index 28ed215ab..ab212e77e 100644
--- a/amplifiers/expert/expert.h
+++ b/amplifiers/expert/expert.h
@@ -26,8 +26,8 @@
#ifndef _AMP_EXPERT_H
#define _AMP_EXPERT_H 1
-#include <hamlib/amplifier.h>
-#include <iofunc.h>
+#include "hamlib/amplifier.h"
+#include "iofunc.h"
// Is this big enough?
#define KPABUFSZ 100
diff --git a/amplifiers/gemini/gemini.h b/amplifiers/gemini/gemini.h
index a52dc2d02..b4003ded7 100644
--- a/amplifiers/gemini/gemini.h
+++ b/amplifiers/gemini/gemini.h
@@ -26,8 +26,8 @@
#ifndef _AMP_GEMINI_H
#define _AMP_GEMINI_H 1
-#include <hamlib/amplifier.h>
-#include <iofunc.h>
+#include "hamlib/amplifier.h"
+#include "iofunc.h"
// Is this big enough?
#define GEMINIBUFSZ 1024
diff --git a/android/ltdl.c b/android/ltdl.c
index be24c0aab..21261889a 100644
--- a/android/ltdl.c
+++ b/android/ltdl.c
@@ -17,7 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <hamlib/config.h>
+#include "hamlib/config.h"
#include <ltdl.h>
#include <dlfcn.h>
#include <stdio.h>
diff --git a/extra/gnuradio/gnuradio.h b/extra/gnuradio/gnuradio.h
index 3a61d3197..57262ed75 100644
--- a/extra/gnuradio/gnuradio.h
+++ b/extra/gnuradio/gnuradio.h
@@ -22,7 +22,7 @@
#ifndef _GNURADIO_H
#define _GNURADIO_H 1
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
__BEGIN_DECLS
diff --git a/extra/gnuradio/gr.c b/extra/gnuradio/gr.c
index 3e73c87ae..f90e0acc6 100644
--- a/extra/gnuradio/gr.c
+++ b/extra/gnuradio/gr.c
@@ -22,7 +22,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "gnuradio.h"
diff --git a/extra/gnuradio/graudio.c b/extra/gnuradio/graudio.c
index 5cbf75d43..dea9778be 100644
--- a/extra/gnuradio/graudio.c
+++ b/extra/gnuradio/graudio.c
@@ -22,7 +22,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "gnuradio.h"
diff --git a/extra/gnuradio/mc4020.c b/extra/gnuradio/mc4020.c
index eee1e3d61..bb938fc5b 100644
--- a/extra/gnuradio/mc4020.c
+++ b/extra/gnuradio/mc4020.c
@@ -22,7 +22,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "gnuradio.h"
diff --git a/include/bandplan.h b/include/bandplan.h
index aa28b6263..08255559e 100644
--- a/include/bandplan.h
+++ b/include/bandplan.h
@@ -22,7 +22,7 @@
#ifndef _BANDPLAN_H
#define _BANDPLAN_H 1
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
/*
* This header file is internal to Hamlib and its backends,
diff --git a/include/hamlib/ampclass.h b/include/hamlib/ampclass.h
index 1bb5876b7..b605cbaef 100644
--- a/include/hamlib/ampclass.h
+++ b/include/hamlib/ampclass.h
@@ -22,7 +22,7 @@
#ifndef _AMPCLASS_H
#define _AMPCLASS_H 1
-#include <hamlib/amplifier.h>
+#include "hamlib/amplifier.h"
diff --git a/include/hamlib/amplifier.h b/include/hamlib/amplifier.h
index 847b2a53b..b17c7ff47 100644
--- a/include/hamlib/amplifier.h
+++ b/include/hamlib/amplifier.h
@@ -23,8 +23,8 @@
#ifndef _AMPLIFIER_H
#define _AMPLIFIER_H 1
-#include <hamlib/rig.h>
-#include <hamlib/amplist.h>
+#include "hamlib/rig.h"
+#include "hamlib/amplist.h"
/**
* \addtogroup amplifier
@@ -271,7 +271,7 @@ struct amp_caps
__END_DECLS
-#include <hamlib/amp_state.h>
+#include "hamlib/amp_state.h"
__BEGIN_DECLS
diff --git a/include/hamlib/multicast.h b/include/hamlib/multicast.h
index 1bc18475f..01dbdc248 100644
--- a/include/hamlib/multicast.h
+++ b/include/hamlib/multicast.h
@@ -3,7 +3,7 @@
//#include <string.h>
//#include <errno.h>
//#include <unistd.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
//#include <sys/socket.h>
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h
index 03ecb2656..c7a5234ba 100644
--- a/include/hamlib/rig.h
+++ b/include/hamlib/rig.h
@@ -70,8 +70,8 @@
#include <pthread.h>
/* Rig list is in a separate file so as not to mess up w/ this one */
-#include <hamlib/riglist.h>
-//#include <hamlib/config.h>
+#include "hamlib/riglist.h"
+//#include "hamlib/config.h"
/**
* \addtogroup rig
@@ -122,7 +122,7 @@
#endif
//! @endcond
-#include <hamlib/rig_dll.h>
+#include "hamlib/rig_dll.h"
#ifndef SWIGLUA
//! @cond Doxygen_Suppress
@@ -2367,7 +2367,7 @@ typedef struct hamlib_async_pipe hamlib_async_pipe_t;
#ifndef NO_OLD_INCLUDES
__END_DECLS
-#include <hamlib/port.h>
+#include "hamlib/port.h"
__BEGIN_DECLS
#endif
@@ -2536,7 +2536,7 @@ struct rig_cache_deprecated {
* \brief Multicast data items the are unique per rig instantiation
* This is meant for internal Hamlib use only
*/
-#include <hamlib/multicast.h>
+#include "hamlib/multicast.h"
struct multicast_s
{
int multicast_running;
@@ -2571,7 +2571,7 @@ typedef unsigned int rig_comm_status_t;
__END_DECLS
-#include <hamlib/rig_state.h>
+#include "hamlib/rig_state.h"
__BEGIN_DECLS
diff --git a/include/hamlib/rigclass.h b/include/hamlib/rigclass.h
index 23b4738fd..d4bea0d89 100644
--- a/include/hamlib/rigclass.h
+++ b/include/hamlib/rigclass.h
@@ -22,7 +22,7 @@
#ifndef _RIGCLASS_H
#define _RIGCLASS_H 1
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include <iostream>
diff --git a/include/hamlib/rotator.h b/include/hamlib/rotator.h
index ab79f5260..5a3a618cb 100644
--- a/include/hamlib/rotator.h
+++ b/include/hamlib/rotator.h
@@ -23,8 +23,8 @@
#ifndef _ROTATOR_H
#define _ROTATOR_H 1
-#include <hamlib/rig.h>
-#include <hamlib/rotlist.h>
+#include "hamlib/rig.h"
+#include "hamlib/rotlist.h"
/**
* \addtogroup rotator
@@ -587,7 +587,7 @@ struct rot_caps {
__END_DECLS
-#include <hamlib/rot_state.h>
+#include "hamlib/rot_state.h"
__BEGIN_DECLS
diff --git a/include/hamlib/rotclass.h b/include/hamlib/rotclass.h
index 219e3a92f..06ccf3ea4 100644
--- a/include/hamlib/rotclass.h
+++ b/include/hamlib/rotclass.h
@@ -22,7 +22,7 @@
#ifndef _ROTCLASS_H
#define _ROTCLASS_H 1
-#include <hamlib/rotator.h>
+#include "hamlib/rotator.h"
diff --git a/lib/asyncpipe.c b/lib/asyncpipe.c
index bca2e936e..8bdc315f4 100644
--- a/lib/asyncpipe.c
+++ b/lib/asyncpipe.c
@@ -1,4 +1,4 @@
-#include <hamlib/config.h>
+#include "hamlib/config.h"
#include "asyncpipe.h"
diff --git a/lib/asyncpipe.h b/lib/asyncpipe.h
index 5919ef750..c589a7214 100644
--- a/lib/asyncpipe.h
+++ b/lib/asyncpipe.h
@@ -5,7 +5,7 @@
#if defined(WIN32) && defined(HAVE_WINDOWS_H)
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include <windows.h>
#define PIPE_BUFFER_SIZE_DEFAULT 65536
diff --git a/lib/getaddrinfo.c b/lib/getaddrinfo.c
index 723ced002..e2d031089 100644
--- a/lib/getaddrinfo.c
+++ b/lib/getaddrinfo.c
@@ -22,7 +22,7 @@
/* Forcing WINVER in MinGW yanks in getaddrinfo(), but locks out Win95/Win98 */
/* #define WINVER 0x0501 */
-#include <hamlib/config.h>
+#include "hamlib/config.h"
#include <stdlib.h>
#include <stdio.h> /* Standard input/output definitions */
diff --git a/lib/getopt.c b/lib/getopt.c
index 28adf28bd..b5e2da414 100644
--- a/lib/getopt.c
+++ b/lib/getopt.c
@@ -22,7 +22,7 @@
*/
/* NOTE!!! AIX requires this to be the first thing in the file.
Do not put ANYTHING before it! */
-#include <hamlib/config.h>
+#include "hamlib/config.h"
#if !__STDC__ && !defined(const) && IN_GCC
#define const
diff --git a/lib/getopt_long.c b/lib/getopt_long.c
index 064e189cf..b07fe520c 100644
--- a/lib/getopt_long.c
+++ b/lib/getopt_long.c
@@ -17,7 +17,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#include <hamlib/config.h>
+#include "hamlib/config.h"
#include "getopt.h"
diff --git a/lib/gettimeofday.c b/lib/gettimeofday.c
index 0d2fad152..098d450f1 100644
--- a/lib/gettimeofday.c
+++ b/lib/gettimeofday.c
@@ -1,5 +1,5 @@
-#include <hamlib/config.h>
+#include "hamlib/config.h"
#ifdef HAVE_WINDOWS_H
#include <windows.h>
diff --git a/lib/termios.c b/lib/termios.c
index 2a4e64374..2937bff79 100644
--- a/lib/termios.c
+++ b/lib/termios.c
@@ -1,5 +1,5 @@
-#include <hamlib/rig.h>
-#include <hamlib/config.h>
+#include "hamlib/rig.h"
+#include "hamlib/config.h"
#include "misc.h"
#if defined(WIN32) && !defined(HAVE_TERMIOS_H)
diff --git a/lib/usleep.c b/lib/usleep.c
index 70ad2d3f8..6feba7be4 100644
--- a/lib/usleep.c
+++ b/lib/usleep.c
@@ -16,7 +16,7 @@ This file is part of the GNU C Library.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <hamlib/config.h>
+#include "hamlib/config.h"
#ifndef HAVE_USLEEP
diff --git a/rigs/adat/adat.c b/rigs/adat/adat.c
index fccda1946..ee081f145 100644
--- a/rigs/adat/adat.c
+++ b/rigs/adat/adat.c
@@ -34,7 +34,7 @@
// HAMLIB INCLUDES
// ---------------------------------------------------------------------------
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "serial.h"
#include "misc.h"
#include "register.h"
diff --git a/rigs/adat/adat.h b/rigs/adat/adat.h
index 35c8b73e1..61c5a52a8 100644
--- a/rigs/adat/adat.h
+++ b/rigs/adat/adat.h
@@ -35,7 +35,7 @@
// HAMLIB INCLUDES
// ---------------------------------------------------------------------------
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "token.h"
// ---------------------------------------------------------------------------
diff --git a/rigs/alinco/alinco.c b/rigs/alinco/alinco.c
index 6cedc1603..2125d45a3 100644
--- a/rigs/alinco/alinco.c
+++ b/rigs/alinco/alinco.c
@@ -19,8 +19,8 @@
*
*/
-#include <hamlib/rig.h>
-#include <register.h>
+#include "hamlib/rig.h"
+#include "register.h"
#include "alinco.h"
diff --git a/rigs/alinco/alinco.h b/rigs/alinco/alinco.h
index 42294e51e..b78fac1d4 100644
--- a/rigs/alinco/alinco.h
+++ b/rigs/alinco/alinco.h
@@ -22,7 +22,7 @@
#ifndef _ALINCO_H
#define _ALINCO_H 1
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#define BACKEND_VER "20200323"
diff --git a/rigs/alinco/dx77.c b/rigs/alinco/dx77.c
index 80373915e..8cb24db9b 100644
--- a/rigs/alinco/dx77.c
+++ b/rigs/alinco/dx77.c
@@ -24,12 +24,12 @@
#include <stdlib.h>
#include <string.h> /* String function definitions */
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "idx_builtin.h"
#include "alinco.h"
#include "iofunc.h"
#include "tones.h"
-#include <misc.h>
+#include "misc.h"
/*
* modes in use by the "2G" command
diff --git a/rigs/alinco/dxsr8.c b/rigs/alinco/dxsr8.c
index c639d9720..cadb23dfb 100644
--- a/rigs/alinco/dxsr8.c
+++ b/rigs/alinco/dxsr8.c
@@ -23,10 +23,10 @@
#include <stdlib.h>
#include <string.h> /* String function definitions */
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "tones.h"
-#include <misc.h>
-#include <iofunc.h>
+#include "misc.h"
+#include "iofunc.h"
#include <num_stdio.h>
#include "idx_builtin.h"
#include "alinco.h"
diff --git a/rigs/anytone/anytone.c b/rigs/anytone/anytone.c
index 500d8f3da..24b94282b 100644
--- a/rigs/anytone/anytone.c
+++ b/rigs/anytone/anytone.c
@@ -35,7 +35,7 @@
// ---------------------------------------------------------------------------
#include "config.h"
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "serial.h"
#include "misc.h"
#include "register.h"
diff --git a/rigs/aor/aor.h b/rigs/aor/aor.h
index 9b0da4c31..59970cb85 100644
--- a/rigs/aor/aor.h
+++ b/rigs/aor/aor.h
@@ -22,7 +22,7 @@
#ifndef _AOR_H
#define _AOR_H 1
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#define BACKEND_VER "20220630"
diff --git a/rigs/aor/ar2700.c b/rigs/aor/ar2700.c
index 0245dd07b..7e0a2b158 100644
--- a/rigs/aor/ar2700.c
+++ b/rigs/aor/ar2700.c
@@ -22,7 +22,7 @@
#include <stdlib.h>
#include <string.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "aor.h"
diff --git a/rigs/aor/ar3000.c b/rigs/aor/ar3000.c
index 1ffdcc9b0..cd067642b 100644
--- a/rigs/aor/ar3000.c
+++ b/rigs/aor/ar3000.c
@@ -22,7 +22,7 @@
#include <stdio.h>
#include <string.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "iofunc.h"
static int ar3k_set_freq(RIG *rig, vfo_t vfo, freq_t freq);
diff --git a/rigs/aor/ar5000.c b/rigs/aor/ar5000.c
index 95c9b313e..ccee0e476 100644
--- a/rigs/aor/ar5000.c
+++ b/rigs/aor/ar5000.c
@@ -22,7 +22,7 @@
#include <stdio.h>
#include <string.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "aor.h"
diff --git a/rigs/aor/ar7030.c b/rigs/aor/ar7030.c
index a131ce2f2..e5a4fafed 100644
--- a/rigs/aor/ar7030.c
+++ b/rigs/aor/ar7030.c
@@ -26,7 +26,7 @@
#include <stdio.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "iofunc.h"
#include "idx_builtin.h"
diff --git a/rigs/aor/ar7030p_utils.c b/rigs/aor/ar7030p_utils.c
index deac9ef13..d63504ede 100644
--- a/rigs/aor/ar7030p_utils.c
+++ b/rigs/aor/ar7030p_utils.c
@@ -28,7 +28,7 @@
#include <math.h>
#include <assert.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "ar7030p.h"
#include "iofunc.h"
diff --git a/rigs/aor/ar8000.c b/rigs/aor/ar8000.c
index 4cc825231..e1e483022 100644
--- a/rigs/aor/ar8000.c
+++ b/rigs/aor/ar8000.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "aor.h"
diff --git a/rigs/aor/ar8200.c b/rigs/aor/ar8200.c
index 17832f15e..18e4cda19 100644
--- a/rigs/aor/ar8200.c
+++ b/rigs/aor/ar8200.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "aor.h"
diff --git a/rigs/aor/ar8600.c b/rigs/aor/ar8600.c
index 20b2a018f..1c05bbc05 100644
--- a/rigs/aor/ar8600.c
+++ b/rigs/aor/ar8600.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "aor.h"
diff --git a/rigs/aor/sr2200.c b/rigs/aor/sr2200.c
index 67efe1f0f..79cc47bf0 100644
--- a/rigs/aor/sr2200.c
+++ b/rigs/aor/sr2200.c
@@ -23,7 +23,7 @@
#include <stdio.h>
#include <string.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "iofunc.h"
#include "aor.h"
diff --git a/rigs/barrett/4050.c b/rigs/barrett/4050.c
index a6664a16e..d46b0819f 100644
--- a/rigs/barrett/4050.c
+++ b/rigs/barrett/4050.c
@@ -21,7 +21,7 @@
#include <stdio.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "misc.h"
#include "barrett.h"
diff --git a/rigs/barrett/4100.c b/rigs/barrett/4100.c
index 02842e819..b401bbe64 100644
--- a/rigs/barrett/4100.c
+++ b/rigs/barrett/4100.c
@@ -22,7 +22,7 @@
#include <stdio.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "misc.h"
#include "barrett.h"
diff --git a/rigs/barrett/950.c b/rigs/barrett/950.c
index 8ac8fc769..73525fe78 100644
--- a/rigs/barrett/950.c
+++ b/rigs/barrett/950.c
@@ -22,7 +22,7 @@
#include <stdio.h>
#include <string.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "barrett.h"
diff --git a/rigs/barrett/barrett.c b/rigs/barrett/barrett.c
index 6d8bc2048..a8ac96c64 100644
--- a/rigs/barrett/barrett.c
+++ b/rigs/barrett/barrett.c
@@ -23,7 +23,7 @@
#include <stdlib.h>
#include <string.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "iofunc.h"
#include "misc.h"
#include "register.h"
diff --git a/rigs/codan/codan.c b/rigs/codan/codan.c
index 3c68202b3..4151a9d41 100644
--- a/rigs/codan/codan.c
+++ b/rigs/codan/codan.c
@@ -23,7 +23,7 @@
#include <stdlib.h>
#include <string.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "iofunc.h"
#include "misc.h"
#include "register.h"
diff --git a/rigs/commradio/commradio.c b/rigs/commradio/commradio.c
index d0296b4f2..c14c20fb8 100644
--- a/rigs/commradio/commradio.c
+++ b/rigs/commradio/commradio.c
@@ -6,8 +6,8 @@
#include <stdint.h>
#include <stdlib.h>
-#include <hamlib/rig.h>
-#include <register.h>
+#include "hamlib/rig.h"
+#include "register.h"
#include "iofunc.h"
#include "misc.h"
diff --git a/rigs/commradio/frame.c b/rigs/commradio/frame.c
index 2ed8e2730..c7c9b9bd5 100644
--- a/rigs/commradio/frame.c
+++ b/rigs/commradio/frame.c
@@ -5,7 +5,7 @@
#include <stdint.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "frame.h"
diff --git a/rigs/drake/drake.h b/rigs/drake/drake.h
index 2645c182b..fbd41aa5f 100644
--- a/rigs/drake/drake.h
+++ b/rigs/drake/drake.h
@@ -22,7 +22,7 @@
#ifndef _DRAKE_H
#define _DRAKE_H 1
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#define BACKEND_VER "20200319"
diff --git a/rigs/drake/r8.c b/rigs/drake/r8.c
index 80cd81acd..ebd53d95c 100644
--- a/rigs/drake/r8.c
+++ b/rigs/drake/r8.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "idx_builtin.h"
#include "drake.h"
diff --git a/rigs/drake/r8a.c b/rigs/drake/r8a.c
index 87475a968..7896628ad 100644
--- a/rigs/drake/r8a.c
+++ b/rigs/drake/r8a.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "drake.h"
diff --git a/rigs/drake/r8b.c b/rigs/drake/r8b.c
index a11a72bc3..4a51acd0a 100644
--- a/rigs/drake/r8b.c
+++ b/rigs/drake/r8b.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "drake.h"
diff --git a/rigs/dummy/aclog.c b/rigs/dummy/aclog.c
index e1483f4c7..ea0f09837 100644
--- a/rigs/dummy/aclog.c
+++ b/rigs/dummy/aclog.c
@@ -24,9 +24,9 @@
#include <stdlib.h>
#include <string.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "iofunc.h"
-#include <misc.h>
+#include "misc.h"
#define DEBUG 1
#define DEBUG_TRACE DEBUG_VERBOSE
diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c
index 4595c1307..4f91f322a 100644
--- a/rigs/dummy/flrig.c
+++ b/rigs/dummy/flrig.c
@@ -25,10 +25,10 @@
#include <string.h> /* String function definitions */
#include <math.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "iofunc.h"
-#include <misc.h>
-#include <token.h>
+#include "misc.h"
+#include "token.h"
#include "dummy_common.h"
#include "flrig.h"
diff --git a/rigs/dummy/sdrsharp.c b/rigs/dummy/sdrsharp.c
index 3e3641d83..19c6057de 100644
--- a/rigs/dummy/sdrsharp.c
+++ b/rigs/dummy/sdrsharp.c
@@ -23,9 +23,9 @@
#include <stdlib.h>
#include <string.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "iofunc.h"
-#include <misc.h>
+#include "misc.h"
#define DEBUG 1
#define DEBUG_TRACE DEBUG_VERBOSE
diff --git a/rigs/dummy/tci1x.c b/rigs/dummy/tci1x.c
index 7eace7ebb..692893965 100644
--- a/rigs/dummy/tci1x.c
+++ b/rigs/dummy/tci1x.c
@@ -23,10 +23,10 @@
#include <stdlib.h>
#include <string.h> /* String function definitions */
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "iofunc.h"
-#include <misc.h>
-#include <token.h>
+#include "misc.h"
+#include "token.h"
#include "dummy_common.h"
diff --git a/rigs/dummy/trxmanager.c b/rigs/dummy/trxmanager.c
index 78cc9eb11..c43d8f949 100644
--- a/rigs/dummy/trxmanager.c
+++ b/rigs/dummy/trxmanager.c
@@ -24,7 +24,7 @@
#include <stdlib.h>
#include <string.h> /* String function definitions */
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "iofunc.h"
#include "trxmanager.h"
diff --git a/rigs/elad/fdm_duo.c b/rigs/elad/fdm_duo.c
index bb077b994..8bf87bc85 100644
--- a/rigs/elad/fdm_duo.c
+++ b/rigs/elad/fdm_duo.c
@@ -23,7 +23,7 @@
#include <stdio.h>
#include <string.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "elad.h"
#define FDM_DUO_ALL_MODES (RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_CWR|RIG_MODE_SSB|RIG_MODE_FM|RIG_MODE_RTTY|RIG_MODE_RTTYR)
diff --git a/rigs/guohetec/guohetec.c b/rigs/guohetec/guohetec.c
index 7df6cc346..e0dee48ff 100644
--- a/rigs/guohetec/guohetec.c
+++ b/rigs/guohetec/guohetec.c
@@ -20,7 +20,7 @@
*/
#include <string.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "iofunc.h"
#include "register.h"
#include "riglist.h"
diff --git a/rigs/guohetec/guohetec.h b/rigs/guohetec/guohetec.h
index ca6c4b777..e19f67cbd 100644
--- a/rigs/guohetec/guohetec.h
+++ b/rigs/guohetec/guohetec.h
@@ -23,7 +23,7 @@
#ifndef _guohetec_H_
#define _guohetec_H_
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#define PMR171_CMD_LENGTH 8
#define PMR171_REPLY_LENGTH 24
diff --git a/rigs/icmarine/icm710.c b/rigs/icmarine/icm710.c
index 80a5d868d..72be82967 100644
--- a/rigs/icmarine/icm710.c
+++ b/rigs/icmarine/icm710.c
@@ -23,9 +23,9 @@
#include <stdlib.h>
#include <string.h>
-#include <hamlib/rig.h>
-#include <token.h>
-#include <register.h>
+#include "hamlib/rig.h"
+#include "token.h"
+#include "register.h"
#include "idx_builtin.h"
diff --git a/rigs/icmarine/icmarine.c b/rigs/icmarine/icmarine.c
index 4511a8e59..82348342f 100644
--- a/rigs/icmarine/icmarine.c
+++ b/rigs/icmarine/icmarine.c
@@ -23,10 +23,10 @@
#include <stdlib.h>
#include <string.h> /* String function definitions */
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "iofunc.h"
-#include <token.h>
-#include <register.h>
+#include "token.h"
+#include "register.h"
#include "icmarine.h"
diff --git a/rigs/icom/delta2.c b/rigs/icom/delta2.c
index e39f5017f..744b7515d 100644
--- a/rigs/icom/delta2.c
+++ b/rigs/icom/delta2.c
@@ -31,7 +31,7 @@
* To Do: get the datasheet, and testing on real hardware!!
*/
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "icom.h"
#define DELTAII_VFO_ALL (RIG_VFO_A|RIG_VFO_B|RIG_VFO_MEM)
diff --git a/rigs/icom/frame.c b/rigs/icom/frame.c
index 56df8e136..a3f9cf506 100644
--- a/rigs/icom/frame.c
+++ b/rigs/icom/frame.c
@@ -19,7 +19,7 @@
*
*/
-#include <hamlib/config.h>
+#include "hamlib/config.h"
#include <string.h> /* String function definitions */
diff --git a/rigs/icom/ic7000.c b/rigs/icom/ic7000.c
index 3548290ae..f052881b3 100644
--- a/rigs/icom/ic7000.c
+++ b/rigs/icom/ic7000.c
@@ -22,7 +22,7 @@
#include <string.h> /* String function definitions */
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "idx_builtin.h"
#include "icom.h"
diff --git a/rigs/icom/ic7100.c b/rigs/icom/ic7100.c
index 9f500ddcc..a9c45016c 100644
--- a/rigs/icom/ic7100.c
+++ b/rigs/icom/ic7100.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "icom.h"
#include "icom_defs.h"
#include "frame.h"
diff --git a/rigs/icom/ic7200.c b/rigs/icom/ic7200.c
index 0d413de58..9124f35ed 100644
--- a/rigs/icom/ic7200.c
+++ b/rigs/icom/ic7200.c
@@ -26,7 +26,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "idx_builtin.h"
#include "icom.h"
diff --git a/rigs/icom/ic7300.c b/rigs/icom/ic7300.c
index c80297654..559f70170 100644
--- a/rigs/icom/ic7300.c
+++ b/rigs/icom/ic7300.c
@@ -22,7 +22,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "idx_builtin.h"
#include "token.h"
diff --git a/rigs/icom/ic735.c b/rigs/icom/ic735.c
index 9b6cf3952..4b27c1e2c 100644
--- a/rigs/icom/ic735.c
+++ b/rigs/icom/ic735.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "icom.h"
#include "bandplan.h"
diff --git a/rigs/icom/ic736.c b/rigs/icom/ic736.c
index 48e4817f4..6d41adac1 100644
--- a/rigs/icom/ic736.c
+++ b/rigs/icom/ic736.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include <bandplan.h>
#include "icom.h"
diff --git a/rigs/icom/ic737.c b/rigs/icom/ic737.c
index c7f3b3f23..e74be76e5 100644
--- a/rigs/icom/ic737.c
+++ b/rigs/icom/ic737.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include <bandplan.h>
#include "icom.h"
diff --git a/rigs/icom/ic738.c b/rigs/icom/ic738.c
index c71fab5d1..0d3480c10 100644
--- a/rigs/icom/ic738.c
+++ b/rigs/icom/ic738.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include <bandplan.h>
#include "icom.h"
diff --git a/rigs/icom/ic7410.c b/rigs/icom/ic7410.c
index 94723ed69..a20715b71 100644
--- a/rigs/icom/ic7410.c
+++ b/rigs/icom/ic7410.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "idx_builtin.h"
#include "icom.h"
diff --git a/rigs/icom/ic746.c b/rigs/icom/ic746.c
index 6781f9cf4..53adfc32f 100644
--- a/rigs/icom/ic746.c
+++ b/rigs/icom/ic746.c
@@ -22,7 +22,7 @@
#include <stdlib.h>
#include <string.h> /* String function definitions */
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "idx_builtin.h"
#include "icom.h"
diff --git a/rigs/icom/ic756.c b/rigs/icom/ic756.c
index 45aca0a2e..bbf870866 100644
--- a/rigs/icom/ic756.c
+++ b/rigs/icom/ic756.c
@@ -21,7 +21,7 @@
#include <string.h> /* String function definitions */
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "idx_builtin.h"
#include "icom.h"
diff --git a/rigs/icom/ic7600.c b/rigs/icom/ic7600.c
index 2397d769d..b01c8c53e 100644
--- a/rigs/icom/ic7600.c
+++ b/rigs/icom/ic7600.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "token.h"
#include "idx_builtin.h"
diff --git a/rigs/icom/ic7610.c b/rigs/icom/ic7610.c
index a5de29ed8..9f6e322fb 100644
--- a/rigs/icom/ic7610.c
+++ b/rigs/icom/ic7610.c
@@ -22,7 +22,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "token.h"
#include "tones.h"
#include "idx_builtin.h"
diff --git a/rigs/icom/ic7700.c b/rigs/icom/ic7700.c
index e9290b7cc..095634f76 100644
--- a/rigs/icom/ic7700.c
+++ b/rigs/icom/ic7700.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "token.h"
#include "tones.h"
#include "idx_builtin.h"
diff --git a/rigs/icom/ic775.c b/rigs/icom/ic775.c
index 7e7d19d79..07861ae7c 100644
--- a/rigs/icom/ic775.c
+++ b/rigs/icom/ic775.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "icom.h"
#include "bandplan.h"
diff --git a/rigs/icom/ic7760.c b/rigs/icom/ic7760.c
index 304bc3ece..c57385517 100644
--- a/rigs/icom/ic7760.c
+++ b/rigs/icom/ic7760.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "token.h"
#include "tones.h"
#include "idx_builtin.h"
diff --git a/rigs/icom/ic7800.c b/rigs/icom/ic7800.c
index 0d6c95e6a..de2481836 100644
--- a/rigs/icom/ic7800.c
+++ b/rigs/icom/ic7800.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "frame.h"
#include "misc.h"
diff --git a/rigs/icom/ic785x.c b/rigs/icom/ic785x.c
index f0094809d..b9512b1d5 100644
--- a/rigs/icom/ic785x.c
+++ b/rigs/icom/ic785x.c
@@ -22,7 +22,7 @@
#include <string.h> /* String function definitions */
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "token.h"
#include "tones.h"
#include "idx_builtin.h"
diff --git a/rigs/icom/ic820h.c b/rigs/icom/ic820h.c
index 9d4eb8d65..24bc2bec7 100644
--- a/rigs/icom/ic820h.c
+++ b/rigs/icom/ic820h.c
@@ -22,7 +22,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "icom.h"
diff --git a/rigs/icom/ic821h.c b/rigs/icom/ic821h.c
index b8692d2d7..62cdfee2e 100644
--- a/rigs/icom/ic821h.c
+++ b/rigs/icom/ic821h.c
@@ -22,7 +22,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "icom.h"
#include "misc.h"
#include "cache.h"
diff --git a/rigs/icom/ic910.c b/rigs/icom/ic910.c
index de2d031f0..a1738bdad 100644
--- a/rigs/icom/ic910.c
+++ b/rigs/icom/ic910.c
@@ -23,7 +23,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "icom.h"
#include "icom_defs.h"
#include "frame.h"
diff --git a/rigs/icom/ic9100.c b/rigs/icom/ic9100.c
index 65c2a3dcd..970512d2f 100644
--- a/rigs/icom/ic9100.c
+++ b/rigs/icom/ic9100.c
@@ -19,7 +19,7 @@
*
*/
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "icom.h"
#include "icom_defs.h"
#include "idx_builtin.h"
diff --git a/rigs/icom/ic970.c b/rigs/icom/ic970.c
index cb96e0e5b..57ed988b4 100644
--- a/rigs/icom/ic970.c
+++ b/rigs/icom/ic970.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "icom.h"
diff --git a/rigs/icom/icf8101.c b/rigs/icom/icf8101.c
index 127b30df2..ade718c67 100644
--- a/rigs/icom/icf8101.c
+++ b/rigs/icom/icf8101.c
@@ -22,7 +22,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "misc.h"
#include "icom.h"
#include "icom_defs.h"
diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c
index f80d65657..346dca79e 100644
--- a/rigs/icom/icom.c
+++ b/rigs/icom/icom.c
@@ -28,11 +28,11 @@
// cppcheck-suppress *
#include <math.h>
-#include <hamlib/rig.h>
-#include <serial.h>
+#include "hamlib/rig.h"
+#include "serial.h"
#include <cal.h>
-#include <token.h>
-#include <register.h>
+#include "token.h"
+#include "register.h"
#include "icom.h"
#include "icom_defs.h"
diff --git a/rigs/icom/icom.h b/rigs/icom/icom.h
index 1ceedec12..d6c9227aa 100644
--- a/rigs/icom/icom.h
+++ b/rigs/icom/icom.h
@@ -24,7 +24,7 @@
#include <stddef.h>
-#include <hamlib/config.h>
+#include "hamlib/config.h"
#include "hamlib/rig.h"
#include "cal.h"
diff --git a/rigs/icom/icr7000.c b/rigs/icom/icr7000.c
index 768054cca..e8144d77d 100644
--- a/rigs/icom/icr7000.c
+++ b/rigs/icom/icr7000.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "idx_builtin.h"
#include "icom.h"
diff --git a/rigs/icom/icr9000.c b/rigs/icom/icr9000.c
index 9767cebd9..b49fef5aa 100644
--- a/rigs/icom/icr9000.c
+++ b/rigs/icom/icr9000.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "idx_builtin.h"
#include "icom.h"
diff --git a/rigs/icom/icr9500.c b/rigs/icom/icr9500.c
index e8bb4977b..c5eef8a33 100644
--- a/rigs/icom/icr9500.c
+++ b/rigs/icom/icr9500.c
@@ -19,7 +19,7 @@
*
*/
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "idx_builtin.h"
#include "icom.h"
diff --git a/rigs/icom/omni.c b/rigs/icom/omni.c
index 60029e0b7..8324f03aa 100644
--- a/rigs/icom/omni.c
+++ b/rigs/icom/omni.c
@@ -32,11 +32,11 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "icom.h"
#include "icom_defs.h"
#include "frame.h"
-#include <misc.h>
+#include "misc.h"
#define OMNIVIP_VFO_ALL (RIG_VFO_A|RIG_VFO_B|RIG_VFO_MEM)
diff --git a/rigs/icom/optoscan.c b/rigs/icom/optoscan.c
index 117632e88..4c24947c9 100644
--- a/rigs/icom/optoscan.c
+++ b/rigs/icom/optoscan.c
@@ -19,7 +19,7 @@
*
*/
-#include <hamlib/config.h>
+#include "hamlib/config.h"
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
diff --git a/rigs/icom/optoscan.h b/rigs/icom/optoscan.h
index c993e7ef8..512cc789f 100644
--- a/rigs/icom/optoscan.h
+++ b/rigs/icom/optoscan.h
@@ -22,7 +22,7 @@
#ifndef _OPTOSCAN_H
#define _OPTOSCAN_H 1
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "icom_defs.h"
diff --git a/rigs/icom/os456.c b/rigs/icom/os456.c
index cc9dc4aaf..6fb24b49f 100644
--- a/rigs/icom/os456.c
+++ b/rigs/icom/os456.c
@@ -26,7 +26,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "idx_builtin.h"
#include "icom.h"
#include "tones.h"
diff --git a/rigs/icom/os535.c b/rigs/icom/os535.c
index 26575c4d8..2c453d047 100644
--- a/rigs/icom/os535.c
+++ b/rigs/icom/os535.c
@@ -26,7 +26,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "idx_builtin.h"
#include "icom.h"
#include "tones.h"
diff --git a/rigs/icom/perseus.c b/rigs/icom/perseus.c
index 06aa1adaf..63ff0664d 100644
--- a/rigs/icom/perseus.c
+++ b/rigs/icom/perseus.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "icom.h"
#include "frame.h"
diff --git a/rigs/icom/xiegu.c b/rigs/icom/xiegu.c
index 7773cc6b7..b31920bbd 100644
--- a/rigs/icom/xiegu.c
+++ b/rigs/icom/xiegu.c
@@ -31,7 +31,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "idx_builtin.h"
#include "icom.h"
diff --git a/rigs/jrc/jrc.h b/rigs/jrc/jrc.h
index e494a3499..e91b355d5 100644
--- a/rigs/jrc/jrc.h
+++ b/rigs/jrc/jrc.h
@@ -22,7 +22,7 @@
#ifndef _JRC_H
#define _JRC_H 1
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#define BACKEND_VER "20200320"
diff --git a/rigs/jrc/nrd535.c b/rigs/jrc/nrd535.c
index b56bc8f4f..6f75b1716 100644
--- a/rigs/jrc/nrd535.c
+++ b/rigs/jrc/nrd535.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "idx_builtin.h"
#include "jrc.h"
diff --git a/rigs/jrc/nrd545.c b/rigs/jrc/nrd545.c
index d463bfc5a..ec50a6748 100644
--- a/rigs/jrc/nrd545.c
+++ b/rigs/jrc/nrd545.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "idx_builtin.h"
#include "jrc.h"
diff --git a/rigs/kachina/505dsp.c b/rigs/kachina/505dsp.c
index 73a209189..1f103f170 100644
--- a/rigs/kachina/505dsp.c
+++ b/rigs/kachina/505dsp.c
@@ -21,9 +21,9 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "kachina.h"
-#include <tones.h>
+#include "tones.h"
#define K505DSP_ALL_MODES (RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_SSB|RIG_MODE_FM)
#define K505DSP_OTHER_TX_MODES (RIG_MODE_CW|RIG_MODE_SSB|RIG_MODE_FM)
diff --git a/rigs/kachina/kachina.h b/rigs/kachina/kachina.h
index cce933baf..8553d2341 100644
--- a/rigs/kachina/kachina.h
+++ b/rigs/kachina/kachina.h
@@ -22,7 +22,7 @@
#ifndef _KACHINA_H
#define _KACHINA_H 1
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#define BACKEND_VER "20240420"
diff --git a/rigs/kenwood/elecraft.h b/rigs/kenwood/elecraft.h
index 4d20b64e4..e6f64fa4a 100644
--- a/rigs/kenwood/elecraft.h
+++ b/rigs/kenwood/elecraft.h
@@ -22,7 +22,7 @@
#ifndef _ELECRAFT_H
#define _ELECRAFT_H 1
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "token.h"
/* The Elecraft Programmer's Reference details the extension level that
diff --git a/rigs/kenwood/flex.h b/rigs/kenwood/flex.h
index 872ca29f7..a74751c33 100644
--- a/rigs/kenwood/flex.h
+++ b/rigs/kenwood/flex.h
@@ -23,7 +23,7 @@
#ifndef _FLEXRADIO_H
#define _FLEXRADIO_H 1
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#define EXT_LEVEL_NONE -1
#define FLEXRADIO_MAX_BUF_LEN 50
diff --git a/rigs/kenwood/flex6xxx.c b/rigs/kenwood/flex6xxx.c
index ae13e96d7..f6d2f3f65 100644
--- a/rigs/kenwood/flex6xxx.c
+++ b/rigs/kenwood/flex6xxx.c
@@ -28,7 +28,7 @@
#include <stdio.h>
#include <math.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "kenwood.h"
#include "bandplan.h"
#include "misc.h"
diff --git a/rigs/kenwood/k2.c b/rigs/kenwood/k2.c
index 904012efb..9eb6c9161 100644
--- a/rigs/kenwood/k2.c
+++ b/rigs/kenwood/k2.c
@@ -26,7 +26,7 @@
#include <stdlib.h>
#include <string.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "kenwood.h"
#include "elecraft.h"
diff --git a/rigs/kenwood/k3.c b/rigs/kenwood/k3.c
index f7bc05644..9ef8f03b4 100644
--- a/rigs/kenwood/k3.c
+++ b/rigs/kenwood/k3.c
@@ -28,7 +28,7 @@
#include <string.h>
#include <math.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "idx_builtin.h"
#include "kenwood.h"
diff --git a/rigs/kenwood/pihpsdr.c b/rigs/kenwood/pihpsdr.c
index 79dcb970a..1a52c9069 100644
--- a/rigs/kenwood/pihpsdr.c
+++ b/rigs/kenwood/pihpsdr.c
@@ -23,7 +23,7 @@
#include <stdlib.h>
#include <string.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "kenwood.h"
#include "tones.h"
diff --git a/rigs/kenwood/r5000.c b/rigs/kenwood/r5000.c
index 670ccd579..bdb416d2c 100644
--- a/rigs/kenwood/r5000.c
+++ b/rigs/kenwood/r5000.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "kenwood.h"
#include "ic10.h"
diff --git a/rigs/kenwood/thd7.c b/rigs/kenwood/thd7.c
index d8a60aeef..a221186ba 100644
--- a/rigs/kenwood/thd7.c
+++ b/rigs/kenwood/thd7.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "kenwood.h"
#include "th.h"
diff --git a/rigs/kenwood/thf6a.c b/rigs/kenwood/thf6a.c
index 0f2b80a6e..c9aa67d45 100644
--- a/rigs/kenwood/thf6a.c
+++ b/rigs/kenwood/thf6a.c
@@ -27,7 +27,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "tones.h"
#include "kenwood.h"
#include "th.h"
diff --git a/rigs/kenwood/thf7.c b/rigs/kenwood/thf7.c
index 68520cb39..2440e50a5 100644
--- a/rigs/kenwood/thf7.c
+++ b/rigs/kenwood/thf7.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "tones.h"
#include "kenwood.h"
#include "th.h"
diff --git a/rigs/kenwood/thg71.c b/rigs/kenwood/thg71.c
index f25af0aab..73b7ba799 100644
--- a/rigs/kenwood/thg71.c
+++ b/rigs/kenwood/thg71.c
@@ -23,7 +23,7 @@
#include <stdio.h>
#include <string.h> /* String function definitions */
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "kenwood.h"
#include "th.h"
diff --git a/rigs/kenwood/tmv7.c b/rigs/kenwood/tmv7.c
index 03309c181..76c456c71 100644
--- a/rigs/kenwood/tmv7.c
+++ b/rigs/kenwood/tmv7.c
@@ -23,7 +23,7 @@
#include <stdio.h>
#include <string.h> /* String function definitions */
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "kenwood.h"
#include "th.h"
#include "misc.h"
diff --git a/rigs/kenwood/transfox.c b/rigs/kenwood/transfox.c
index e7da235e7..f13a43149 100644
--- a/rigs/kenwood/transfox.c
+++ b/rigs/kenwood/transfox.c
@@ -23,7 +23,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "kenwood.h"
diff --git a/rigs/kenwood/ts2000.c b/rigs/kenwood/ts2000.c
index 5c25d3461..d18b9216b 100644
--- a/rigs/kenwood/ts2000.c
+++ b/rigs/kenwood/ts2000.c
@@ -24,7 +24,7 @@
#include <stdlib.h>
#include <string.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "kenwood.h"
#include "token.h"
#include "misc.h"
diff --git a/rigs/kenwood/ts440.c b/rigs/kenwood/ts440.c
index 2bb78ba6d..f4fec1dc5 100644
--- a/rigs/kenwood/ts440.c
+++ b/rigs/kenwood/ts440.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "kenwood.h"
#include "ic10.h"
diff --git a/rigs/kenwood/ts450s.c b/rigs/kenwood/ts450s.c
index 51aba0836..009f79090 100644
--- a/rigs/kenwood/ts450s.c
+++ b/rigs/kenwood/ts450s.c
@@ -21,7 +21,7 @@
#include <stdio.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "kenwood.h"
#include "bandplan.h"
diff --git a/rigs/kenwood/ts480.c b/rigs/kenwood/ts480.c
index 0361a6f51..e8e37ad1e 100644
--- a/rigs/kenwood/ts480.c
+++ b/rigs/kenwood/ts480.c
@@ -24,7 +24,7 @@
#include <stdlib.h>
#include <string.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "cal.h"
#include "idx_builtin.h"
#include "iofunc.h"
diff --git a/rigs/kenwood/ts50s.c b/rigs/kenwood/ts50s.c
index 0107f0ce6..b6f215aba 100644
--- a/rigs/kenwood/ts50s.c
+++ b/rigs/kenwood/ts50s.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "kenwood.h"
diff --git a/rigs/kenwood/ts570.c b/rigs/kenwood/ts570.c
index 0d6cf9c1e..a676c6cc1 100644
--- a/rigs/kenwood/ts570.c
+++ b/rigs/kenwood/ts570.c
@@ -25,7 +25,7 @@
#include <string.h>
#include <math.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "kenwood.h"
#define TS570_ALL_MODES (RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_SSB|RIG_MODE_FM|RIG_MODE_RTTY)
diff --git a/rigs/kenwood/ts690.c b/rigs/kenwood/ts690.c
index 26a130926..850eeca58 100644
--- a/rigs/kenwood/ts690.c
+++ b/rigs/kenwood/ts690.c
@@ -19,7 +19,7 @@
*
*/
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "bandplan.h"
#include "kenwood.h"
diff --git a/rigs/kenwood/ts711.c b/rigs/kenwood/ts711.c
index 422e5ff71..66d111c9d 100644
--- a/rigs/kenwood/ts711.c
+++ b/rigs/kenwood/ts711.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "kenwood.h"
diff --git a/rigs/kenwood/ts790.c b/rigs/kenwood/ts790.c
index d70b8973e..d02e89216 100644
--- a/rigs/kenwood/ts790.c
+++ b/rigs/kenwood/ts790.c
@@ -19,7 +19,7 @@
*
*/
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "kenwood.h"
#define TS790_ALL_MODES (RIG_MODE_CW|RIG_MODE_CWR|RIG_MODE_SSB|RIG_MODE_FM)
diff --git a/rigs/kenwood/ts811.c b/rigs/kenwood/ts811.c
index bfcdb1b2f..a73853890 100644
--- a/rigs/kenwood/ts811.c
+++ b/rigs/kenwood/ts811.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "kenwood.h"
diff --git a/rigs/kenwood/ts850.c b/rigs/kenwood/ts850.c
index 1afcdebd2..b09740fd6 100644
--- a/rigs/kenwood/ts850.c
+++ b/rigs/kenwood/ts850.c
@@ -23,7 +23,7 @@
#include <stdio.h>
#include <math.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include <cal.h>
#include "kenwood.h"
diff --git a/rigs/kenwood/ts870s.c b/rigs/kenwood/ts870s.c
index a2299e781..3c8b9b0b8 100644
--- a/rigs/kenwood/ts870s.c
+++ b/rigs/kenwood/ts870s.c
@@ -24,7 +24,7 @@
#include <stdio.h>
#include <string.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "kenwood.h"
#include "bandplan.h"
diff --git a/rigs/kenwood/ts890s.c b/rigs/kenwood/ts890s.c
index dfd40a2c0..b6316523e 100644
--- a/rigs/kenwood/ts890s.c
+++ b/rigs/kenwood/ts890s.c
@@ -23,7 +23,7 @@
#include <string.h>
#include <math.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "kenwood.h"
#include "cal.h"
#include "misc.h"
diff --git a/rigs/kenwood/ts930.c b/rigs/kenwood/ts930.c
index 921093f64..6da6a1b8d 100644
--- a/rigs/kenwood/ts930.c
+++ b/rigs/kenwood/ts930.c
@@ -19,7 +19,7 @@
*
*/
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include <bandplan.h>
#include "kenwood.h"
diff --git a/rigs/kenwood/ts940.c b/rigs/kenwood/ts940.c
index c88a455f1..eada0406d 100644
--- a/rigs/kenwood/ts940.c
+++ b/rigs/kenwood/ts940.c
@@ -19,7 +19,7 @@
*
*/
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "bandplan.h"
#include "kenwood.h"
diff --git a/rigs/kenwood/ts950.c b/rigs/kenwood/ts950.c
index 8486c6f9f..cd7d68439 100644
--- a/rigs/kenwood/ts950.c
+++ b/rigs/kenwood/ts950.c
@@ -27,7 +27,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "kenwood.h"
diff --git a/rigs/kenwood/ts990s.c b/rigs/kenwood/ts990s.c
index e5794a2bb..e9da3e54a 100644
--- a/rigs/kenwood/ts990s.c
+++ b/rigs/kenwood/ts990s.c
@@ -24,7 +24,7 @@
#include <stdlib.h>
#include <math.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "kenwood.h"
#include "ts990s.h"
#include "cal.h"
diff --git a/rigs/kenwood/tx500.c b/rigs/kenwood/tx500.c
index 958b2e288..cb3dc7450 100644
--- a/rigs/kenwood/tx500.c
+++ b/rigs/kenwood/tx500.c
@@ -24,7 +24,7 @@
#include <stdio.h>
#include <string.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "kenwood.h"
#define TX500_ALL_MODES (RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_SSB|RIG_MODE_FM|RIG_MODE_RTTY)
diff --git a/rigs/kenwood/xg3.c b/rigs/kenwood/xg3.c
index e1a952533..3dda6e91f 100644
--- a/rigs/kenwood/xg3.c
+++ b/rigs/kenwood/xg3.c
@@ -27,7 +27,7 @@
#include <stdlib.h>
#include <string.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "iofunc.h"
#include "kenwood.h"
#include "elecraft.h"
diff --git a/rigs/kit/dwt.c b/rigs/kit/dwt.c
index 628f3b4ed..afbdb4274 100644
--- a/rigs/kit/dwt.c
+++ b/rigs/kit/dwt.c
@@ -19,7 +19,7 @@
*
*/
-#include <hamlib/config.h>
+#include "hamlib/config.h"
#include <stdio.h>
#include "hamlib/rig.h"
diff --git a/rigs/kit/elektor507.c b/rigs/kit/elektor507.c
index 720e746ee..650326644 100644
--- a/rigs/kit/elektor507.c
+++ b/rigs/kit/elektor507.c
@@ -19,7 +19,7 @@
*
*/
-#include <hamlib/config.h>
+#include "hamlib/config.h"
#include <stdlib.h>
#include <stdio.h>
diff --git a/rigs/kit/fifisdr.c b/rigs/kit/fifisdr.c
index dbf4d564d..14eb4da98 100644
--- a/rigs/kit/fifisdr.c
+++ b/rigs/kit/fifisdr.c
@@ -22,7 +22,7 @@
*
*/
-#include <hamlib/config.h>
+#include "hamlib/config.h"
#ifdef HAVE_STDINT_H
#include <stdint.h>
diff --git a/rigs/kit/funcube.c b/rigs/kit/funcube.c
index 00f1a2866..6989d2b84 100644
--- a/rigs/kit/funcube.c
+++ b/rigs/kit/funcube.c
@@ -23,7 +23,7 @@
*
*/
-#include <hamlib/config.h>
+#include "hamlib/config.h"
#include <stdlib.h>
#include <stdio.h>
diff --git a/rigs/kit/kit.c b/rigs/kit/kit.c
index 8d90127c7..2124c4962 100644
--- a/rigs/kit/kit.c
+++ b/rigs/kit/kit.c
@@ -19,7 +19,7 @@
*
*/
-#include <hamlib/config.h>
+#include "hamlib/config.h"
#include "hamlib/rig.h"
#include "register.h"
diff --git a/rigs/kit/si570avrusb.c b/rigs/kit/si570avrusb.c
index 048a70147..926af28d2 100644
--- a/rigs/kit/si570avrusb.c
+++ b/rigs/kit/si570avrusb.c
@@ -22,7 +22,7 @@
*
*/
-#include <hamlib/config.h>
+#include "hamlib/config.h"
#define BACKEND_VER "20200112"
diff --git a/rigs/kit/usrp.c b/rigs/kit/usrp.c
index 7b05ad1f5..635357ee5 100644
--- a/rigs/kit/usrp.c
+++ b/rigs/kit/usrp.c
@@ -19,7 +19,7 @@
*
*/
-#include <hamlib/config.h>
+#include "hamlib/config.h"
/*
* Compile only this model if usrp is available
diff --git a/rigs/kit/usrp_impl.h b/rigs/kit/usrp_impl.h
index ef427b13f..4e6d32fc9 100644
--- a/rigs/kit/usrp_impl.h
+++ b/rigs/kit/usrp_impl.h
@@ -22,8 +22,8 @@
#ifndef _USRP_IMPL_H
#define _USRP_IMPL_H 1
-#include <hamlib/rig.h>
-#include <token.h>
+#include "hamlib/rig.h"
+#include "token.h"
__BEGIN_DECLS
diff --git a/rigs/lowe/hf235.c b/rigs/lowe/hf235.c
index 8b0a58b7f..f9f69a91e 100644
--- a/rigs/lowe/hf235.c
+++ b/rigs/lowe/hf235.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "lowe.h"
diff --git a/rigs/lowe/lowe.h b/rigs/lowe/lowe.h
index e1e2f4973..f28c440e7 100644
--- a/rigs/lowe/lowe.h
+++ b/rigs/lowe/lowe.h
@@ -22,7 +22,7 @@
#ifndef _LOWE_H
#define _LOWE_H 1
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#define BACKEND_VER "20200112"
diff --git a/rigs/mds/mds.c b/rigs/mds/mds.c
index d50cf2e5c..f7a72fda7 100644
--- a/rigs/mds/mds.c
+++ b/rigs/mds/mds.c
@@ -23,7 +23,7 @@
#include <stdlib.h>
#include <string.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "iofunc.h"
#include "misc.h"
#include "register.h"
diff --git a/rigs/mds/mds.h b/rigs/mds/mds.h
index 2274b97f8..16f36e262 100644
--- a/rigs/mds/mds.h
+++ b/rigs/mds/mds.h
@@ -1,4 +1,4 @@
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#define MDS_DATA_LEN 256
#define MDS_RET_LEN 256
diff --git a/rigs/motorola/micom.c b/rigs/motorola/micom.c
index 97e2f0660..1bfb0d68f 100644
--- a/rigs/motorola/micom.c
+++ b/rigs/motorola/micom.c
@@ -19,9 +19,9 @@
*
*/
-#include <hamlib/rig.h>
-#include <misc.h>
-#include <iofunc.h>
+#include "hamlib/rig.h"
+#include "misc.h"
+#include "iofunc.h"
// char* to start of checksum for len bytes
static unsigned int checksum(const unsigned char *buf, int len)
diff --git a/rigs/motorola/motorola.c b/rigs/motorola/motorola.c
index 192b2b977..1a77e9f2f 100644
--- a/rigs/motorola/motorola.c
+++ b/rigs/motorola/motorola.c
@@ -20,7 +20,7 @@
*/
#include "motorola.h"
-#include <register.h>
+#include "register.h"
DECLARE_INITRIG_BACKEND(motorola)
{
diff --git a/rigs/pcr/pcr100.c b/rigs/pcr/pcr100.c
index bb6a568e0..cb73d3885 100644
--- a/rigs/pcr/pcr100.c
+++ b/rigs/pcr/pcr100.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "pcr.h"
#include "idx_builtin.h"
diff --git a/rigs/pcr/pcr1000.c b/rigs/pcr/pcr1000.c
index 398568204..f610ddcd9 100644
--- a/rigs/pcr/pcr1000.c
+++ b/rigs/pcr/pcr1000.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "pcr.h"
#include "idx_builtin.h"
diff --git a/rigs/pcr/pcr1500.c b/rigs/pcr/pcr1500.c
index 1012353f7..759aa5bf4 100644
--- a/rigs/pcr/pcr1500.c
+++ b/rigs/pcr/pcr1500.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "pcr.h"
#include "idx_builtin.h"
diff --git a/rigs/pcr/pcr2500.c b/rigs/pcr/pcr2500.c
index c946991da..8b88cf4d1 100644
--- a/rigs/pcr/pcr2500.c
+++ b/rigs/pcr/pcr2500.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "pcr.h"
#include "idx_builtin.h"
diff --git a/rigs/prm80/prm80.h b/rigs/prm80/prm80.h
index 43efda3b5..0ff2a2352 100644
--- a/rigs/prm80/prm80.h
+++ b/rigs/prm80/prm80.h
@@ -23,7 +23,7 @@
#define _PRM80_H 1
#include <sys/time.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#define BACKEND_VER "20231002.0"
diff --git a/rigs/racal/ra3702.c b/rigs/racal/ra3702.c
index d5d3e5c51..7b7e49962 100644
--- a/rigs/racal/ra3702.c
+++ b/rigs/racal/ra3702.c
@@ -18,7 +18,7 @@
*
*/
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "idx_builtin.h"
#include "ra37xx.h"
diff --git a/rigs/racal/ra6790.c b/rigs/racal/ra6790.c
index 2232b5303..74a67cd10 100644
--- a/rigs/racal/ra6790.c
+++ b/rigs/racal/ra6790.c
@@ -19,7 +19,7 @@
*
*/
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "racal.h"
diff --git a/rigs/rft/ekd500.c b/rigs/rft/ekd500.c
index b821e6635..34f1c7450 100644
--- a/rigs/rft/ekd500.c
+++ b/rigs/rft/ekd500.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "rft.h"
diff --git a/rigs/rft/rft.h b/rigs/rft/rft.h
index 01b8834b3..57f0b3a42 100644
--- a/rigs/rft/rft.h
+++ b/rigs/rft/rft.h
@@ -22,7 +22,7 @@
#ifndef _RFT_H
#define _RFT_H 1
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#define BACKEND_VER "20031007"
diff --git a/rigs/rs/eb200.c b/rigs/rs/eb200.c
index 2c5cb2235..97e8690c8 100644
--- a/rigs/rs/eb200.c
+++ b/rigs/rs/eb200.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "rs.h"
diff --git a/rigs/rs/ek89x.h b/rigs/rs/ek89x.h
index 24591be65..4994bccff 100644
--- a/rigs/rs/ek89x.h
+++ b/rigs/rs/ek89x.h
@@ -25,7 +25,7 @@
#ifndef _EK89X_H
#define _EK89X_H 1
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
int ek89x_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt);
diff --git a/rigs/rs/esmc.c b/rigs/rs/esmc.c
index dba62b07c..bb6f141fc 100644
--- a/rigs/rs/esmc.c
+++ b/rigs/rs/esmc.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "rs.h"
diff --git a/rigs/rs/gp2000.h b/rigs/rs/gp2000.h
index 0e7e20ee9..92bea85c1 100644
--- a/rigs/rs/gp2000.h
+++ b/rigs/rs/gp2000.h
@@ -27,7 +27,7 @@
#undef BACKEND_VER
#define BACKEND_VER "20210901"
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
int gp2000_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt);
diff --git a/rigs/rs/rs.h b/rigs/rs/rs.h
index 729f1ddf5..dea04d398 100644
--- a/rigs/rs/rs.h
+++ b/rigs/rs/rs.h
@@ -22,7 +22,7 @@
#ifndef _RS_H
#define _RS_H 1
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#define BACKEND_VER "20090803"
diff --git a/rigs/rs/xk2100.c b/rigs/rs/xk2100.c
index c97dd04a4..7c52e4306 100644
--- a/rigs/rs/xk2100.c
+++ b/rigs/rs/xk2100.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "gp2000.h"
#define XK2100_MODES (RIG_MODE_USB|RIG_MODE_LSB|RIG_MODE_PKTUSB|RIG_MODE_PKTLSB|RIG_MODE_CW|RIG_MODE_AM|RIG_MODE_FM)
diff --git a/rigs/rs/xk852.h b/rigs/rs/xk852.h
index 956cfa48e..1771694c6 100644
--- a/rigs/rs/xk852.h
+++ b/rigs/rs/xk852.h
@@ -26,7 +26,7 @@
#undef BACKEND_VER
#define BACKEND_VER "20240921"
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
typedef enum {
XK852_CMD_ADDRESS = 'A',
diff --git a/rigs/skanti/skanti.c b/rigs/skanti/skanti.c
index 1cd9e504e..91775ae1a 100644
--- a/rigs/skanti/skanti.c
+++ b/rigs/skanti/skanti.c
@@ -23,9 +23,9 @@
#include <stdio.h>
#include <string.h> /* String function definitions */
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "iofunc.h"
-#include <register.h>
+#include "register.h"
#include "skanti.h"
diff --git a/rigs/skanti/skanti.h b/rigs/skanti/skanti.h
index 4993900ef..df2a66668 100644
--- a/rigs/skanti/skanti.h
+++ b/rigs/skanti/skanti.h
@@ -22,7 +22,7 @@
#ifndef _SKANTI_H
#define _SKANTI_H 1
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#define BACKEND_VER "20191208"
diff --git a/rigs/skanti/trp8000.c b/rigs/skanti/trp8000.c
index b6c876b71..79536540d 100644
--- a/rigs/skanti/trp8000.c
+++ b/rigs/skanti/trp8000.c
@@ -20,7 +20,7 @@
*/
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "idx_builtin.h"
#include "skanti.h"
diff --git a/rigs/skanti/trp8255.c b/rigs/skanti/trp8255.c
index 27d38f570..ef9705915 100644
--- a/rigs/skanti/trp8255.c
+++ b/rigs/skanti/trp8255.c
@@ -22,7 +22,7 @@
#include <stdlib.h>
#include <string.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "idx_builtin.h"
#include "iofunc.h"
diff --git a/rigs/tapr/tapr.h b/rigs/tapr/tapr.h
index 7921766d2..4c5dfd99a 100644
--- a/rigs/tapr/tapr.h
+++ b/rigs/tapr/tapr.h
@@ -22,7 +22,7 @@
#ifndef _TAPR_H
#define _TAPR_H 1
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
int tapr_set_freq(RIG *rig, vfo_t vfo, freq_t freq);
diff --git a/rigs/tentec/argonaut.c b/rigs/tentec/argonaut.c
index 2a9c0ee8b..fe9e9f66d 100644
--- a/rigs/tentec/argonaut.c
+++ b/rigs/tentec/argonaut.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "tentec2.h"
#include "bandplan.h"
#include "idx_builtin.h"
diff --git a/rigs/tentec/jupiter.c b/rigs/tentec/jupiter.c
index ed9bcf8f6..d913d226e 100644
--- a/rigs/tentec/jupiter.c
+++ b/rigs/tentec/jupiter.c
@@ -36,7 +36,7 @@
#include <string.h>
#include <stdlib.h>
-#include <hamlib/rig.h>
+#include "hamlib/rig.h"
#include "tentec2.h"
#include "tentec.h"
#include "bandplan.h"
diff --gi...
[truncated message content] |
|
From: n0nb <n0...@us...> - 2025-07-22 21:20:20
|
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 4da91f1a288e81132482be23c298c41ff062cfe9 (commit)
from df95e939400897bb4dcb5ac50abb5abacb7ecb99 (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 4da91f1a288e81132482be23c298c41ff062cfe9
Author: Michael Morgan <844...@us...>
Date: Mon Jul 7 12:32:56 2025 -0500
Use alternate quoting for older Python versions
Since Python 3.12, strings such as:
f"test_{object_name.replace(".", "_")}_class.py"
are allowed but older versions require single quotes around the dot and
underscore within the double quoted string.
Should quell CI error on Ubuntu Noble.
diff --git a/bindings/python/generate_tests.py b/bindings/python/generate_tests.py
index 068a8346c..e629e9716 100755
--- a/bindings/python/generate_tests.py
+++ b/bindings/python/generate_tests.py
@@ -59,7 +59,7 @@ DO NOT EDIT this autogenerated file, run "make generate-pytests" instead
"""
import Hamlib
'''
- filename = f"test_{object_name.replace(".", "_")}_class.py"
+ filename = f"test_{object_name.replace('.', '_')}_class.py"
class_source = inspect.getsource(TestClass)
expected_callables = repr(callables).replace(" ", "\n")
expected_properties = repr(properties).replace(" ", "\n")
-----------------------------------------------------------------------
Summary of changes:
bindings/python/generate_tests.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: n0nb <n0...@us...> - 2025-07-22 03:01: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 df95e939400897bb4dcb5ac50abb5abacb7ecb99 (commit)
from cd67bf15ce8336f819c2aa589ec0a37ee58f99eb (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 df95e939400897bb4dcb5ac50abb5abacb7ecb99
Author: Nate Bargmann <n0...@n0...>
Date: Mon Jul 21 21:59:30 2025 -0500
Update issue templates
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 000000000..a3d6f0c1d
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,32 @@
+---
+name: Bug report
+about: Create a report to help us improve
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+**Describe the bug**
+A clear and concise description of what the bug is.
+
+**To Reproduce**
+Steps to reproduce the behavior (please use `rigctl` with the `-vvvvv` option if at all possible and post the output under number 4 below):
+1. `rigctl` model:
+2. The function that fails, i.e. `rig_open`, `rig_set_freq`, `rig_get_freq`, etc.:
+3. Hamlib version:
+4. Post `rigctl` output:
+
+**Expected behavior**
+A clear and concise description of what you expected to happen.
+
+**Screenshots**
+If applicable, add screenshots to help explain your problem.
+
+**Desktop (please complete the following information):**
+ - OS: [e.g. Linux, Windows, MacOS]
+ - Client application: [e.g. WSJT-X, CQRlog]
+ - Client application version:
+
+**Additional context**
+Add any other context about the problem here.
-----------------------------------------------------------------------
Summary of changes:
.github/ISSUE_TEMPLATE/bug_report.md | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: n0nb <n0...@us...> - 2025-07-22 02:28: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 cd67bf15ce8336f819c2aa589ec0a37ee58f99eb (commit)
via fb2834afe8c01c163f5bd157170cc6e061899738 (commit)
via 41baedf9696668cae8a99b77f93606f6d89f6645 (commit)
from 94d7f0b7debd0ef80d5b010c3dc73bff65045a5b (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 cd67bf15ce8336f819c2aa589ec0a37ee58f99eb
Author: Phillip Rose, GM3ZZA <gm...@bt...>
Date: Sat Jul 19 08:42:09 2025 +0000
Windows build README updates and MSVS .lib recipe
Include Phil's recipe for generating a local .lib file for MS Visual
Studio and credit him for this commit. Phil's original message is:
https://sourceforge.net/p/hamlib/mailman/message/59208589/
diff --git a/scripts/build-w32.sh b/scripts/build-w32.sh
index aac75633e..76c766a4a 100755
--- a/scripts/build-w32.sh
+++ b/scripts/build-w32.sh
@@ -185,41 +185,44 @@ Information for w32 Programmers
The DLL has a cdecl interface.
There is a libhamlib-4.def definition file for MS Visual C++/Visual Studio in
-lib/msvc. Refer to the sample commands below to generate a local
-libhamlib-4.lib file for use with the VC++/VS linker.
+lib\msvc. Refer to the recipe below to generate a local libhamlib-4.lib file
+for use with the VC++/VS linker.
-Simply #include <hamlib/rig.h> (add directory to include path), include
-libhamlib-4.lib in your project and you are done. Note: VC++/VS cannot
-compile all the Hamlib code, but the API defined by rig.h has been made MSVC
-friendly :-)
+Simply '#include <hamlib/rig.h>' (or any other header) (add directory to
+include path), include libhamlib-4.lib in your project and you are done. Note:
+VC++/VS cannot compile all the Hamlib code, but the API defined by rig.h has
+been made MSVC friendly :-)
As the source code for the library DLLs is licensed under the LGPL, your
program is not considered a "derivative work" when using the published Hamlib
API and normal linking to the front-end library, and may be of a license of
your choosing.
-As of 08 Sep 2022 a .lib file is generated using the MinGW dlltool utility.
-If this file does not work for your project, follow the steps in the following
-section:
+As of 21 Jul 2025 a .lib file is generated using the MinGW dlltool utility.
+This file is now installed to the lib\gcc-mingw directory. As it is generated
+by the MinGW dlltool utility, it is only suitable for use with MinGW/GCC.
-For linking the library with MS Visual C++ 2003, from the directory you
-installed Hamlib run the following commands to generate the libhamlib-4.lib
-file needed for linking with your MSVC project:
+For developers using Microsoft Visual Studio, the following recipe is
+provided by Phil Rose, GM3ZZA:
-cd lib\msvc
-c:\Program Files\Microsoft Visual C++ Toolkit 2003\bin\link.exe /lib /machine:i386 /def:libhamlib-4.def
+My secret sauce is:
-To do the same for Visual Studio 2017:
+Open "Developer PowerShell for VS2022" in administrator mode. This adds the
+correct directory to the path and allows update of "C:\Program Files" with the
+.dll.
-cd lib\msvc
-c:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Tools\MSVC\14.16.27023\bin\Hostx64\x86\bin\link.exe /lib /machine:i386 /def:libhamlib-4.def
+Then (in my case).
-For VS 2019:
+cd "C:\Program Files\hamlib-w32-${RELEASE}\lib\msvc"
+lib \def:libhamlib-4.def \machine:x86
-cd lib\msvc
-c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x86\bin\link.exe /lib /machine:i386 /def:libhamlib-4.def
+If you use any other terminal then the full path to lib.exe is needed
+(today it is
+"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\bin\Hostx64\x64\lib.exe",
+but is dependent on the version of MSVC which gets updated every few weeks).
-NOTE: feedback is requested on the previous two command examples!
+NOTE: feedback is requested on Phil's example! Please let know if this works
+for you.
The published Hamlib API may be found at:
diff --git a/scripts/build-w64.sh b/scripts/build-w64.sh
index 139581379..12a116cc6 100755
--- a/scripts/build-w64.sh
+++ b/scripts/build-w64.sh
@@ -185,47 +185,44 @@ Information for w64 Programmers
The DLL has a cdecl interface.
There is a libhamlib-4.def definition file for MS Visual C++/Visual Studio in
-lib/msvc. Refer to the sample commands below to generate a local
-libhamlib-4.lib file for use with the VC++/VS linker.
+lib\msvc. Refer to the recipe below to generate a local libhamlib-4.lib file
+for use with the VC++/VS linker.
-Simply #include <hamlib/rig.h> (add directory to include path), include
-libhamlib-4.lib in your project and you are done. Note: VC++/VS cannot
-compile all the Hamlib code, but the API defined by rig.h has been made MSVC
-friendly :-)
+Simply '#include <hamlib/rig.h>' (pr any other header) (add directory to
+include path), include libhamlib-4.lib in your project and you are done. Note:
+VC++/VS cannot compile all the Hamlib code, but the API defined by rig.h has
+been made MSVC friendly :-)
As the source code for the library DLLs is licensed under the LGPL, your
program is not considered a "derivative work" when using the published Hamlib
API and normal linking to the front-end library, and may be of a license of
your choosing.
-As of 08 Sep 2022 a .lib file is generated using the MinGW dlltool utility.
-If this file does not work for your project, follow the steps in the following
-section:
+As of 21 Jul 2025 a .lib file is generated using the MinGW dlltool utility.
+This file is now installed to the lib\gcc-mingw directory. As it is generated
+by the MinGW dlltool utility, it is only suitable for use with MinGW/GCC.
-For linking the library with MS Visual C++ 2003, from the directory you
-installed Hamlib run the following commands to generate the libhamlib-4.lib
-file needed for linking with your MSVC project:
+For developers using Microsoft Visual Studio, the following recipe is
+provided by Phil Rose, GM3ZZA:
-cd lib\msvc
-c:\Program Files\Microsoft Visual C++ Toolkit 2003\bin\link.exe /lib /machine:amd64 /def:libhamlib-4.def
+My secret sauce is:
-To do the same for Visual Studio 2017:
+Open "Developer PowerShell for VS2022" in administrator mode. This adds the
+correct directory to the path and allows update of "C:\Program Files" with the
+.dll.
-cd lib\msvc
-c:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x86\bin\link.exe /lib /machine:i386 /def:libhamlib-4.def
+Then (in my case).
-and for VS 2019:
+cd "C:\Program Files\hamlib-w64-${RELEASE}\lib\msvc"
+lib \def:libhamlib-4.def \machine:x64
-cd lib\msvc
-c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x86\bin\link.exe /lib /machine:i386 /def:libhamlib-4.def
+If you use any other terminal then the full path to lib.exe is needed
+(today it is
+"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\bin\Hostx64\x64\lib.exe",
+but is dependent on the version of MSVC which gets updated every few weeks).
-NOTE: feedback is requested on the previous two command examples as these do
-not appear to be correct to generate a 64 bit libhamlib-4.lib file!
-
-For VS 2022:
-
-cd lib/msvc
-c:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\bin\Hostx64\x86\lib.exe /lib /machine:i386 /def:libhamlib-4.def
+NOTE: feedback is requested on Phil's example! Please let know if this works
+for you.
The published Hamlib API may be found at:
commit fb2834afe8c01c163f5bd157170cc6e061899738
Author: Nate Bargmann <n0...@n0...>
Date: Mon Jul 21 16:10:50 2025 -0500
Add info about the ZIP archive directory structure
Rename the lib/gcc directory to lib/gcc-mingw.
Output the dlltool generated .lib file to lib/gcc-mingw. This on advice
from Jonathan Yong on the MinGW-W64 forum:
https://sourceforge.net/p/mingw-w64/discussion/723798/thread/e23dceba20/?limit=25#51dd/3df2/3708/e62b
diff --git a/scripts/build-w32.sh b/scripts/build-w32.sh
index 4c4d3b08f..aac75633e 100755
--- a/scripts/build-w32.sh
+++ b/scripts/build-w32.sh
@@ -74,8 +74,8 @@ cat > README.w32-bin <<END_OF_README
What is it?
===========
-This ZIP archive or Windows installer contains a build of Hamlib-$RELEASE
-cross-compiled for MS Windows 32 bit using MinGW under Debian GNU/Linux 10
+This ZIP archive or Windows installer contains a build of Hamlib-${RELEASE}
+cross-compiled for MS Windows 32 bit using MinGW under Debian GNU/Linux 13
(nice, heh!).
This software is copyrighted. The library license is LGPL, and the *.EXE files
@@ -92,7 +92,21 @@ Installation and Configuration
Extract the ZIP archive into a convenient location, C:\Program Files is a
reasonable choice.
-Make sure *all* the .DLL files are in your PATH (leave them in the bin
+The archive directory structure is:
+
+hamlib-w32-4.7~git
+├── bin
+├── doc
+├── include
+│ └── hamlib
+└── lib
+ ├── gcc-mingw
+ └── msvc
+
+The 'bin' and 'doc' directories will be of interest to users while developers
+will be interested in the 'include' and 'lib' directories as well.
+
+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
2000, Windows XP, and Windows 7 (need info on Vista and Windows 8/10) do the
following:
@@ -118,7 +132,7 @@ following:
a semi-colon ';' after the last path before adding the Hamlib path (NB. The
entire path is highlighted and will be erased upon typing a character so
click in the box to unselect the text first. The PATH is important!!)
- Append the Hamlib path, e.g. C:\Program Files\hamlib-w32-$RELEASE\bin
+ Append the Hamlib path, e.g. C:\Program Files\hamlib-w32-${RELEASE}\bin
* Click OK for all three dialog boxes to save your changes.
@@ -149,9 +163,9 @@ In short, the command syntax is of the form:
To run rigctl or rotctl open a cmd window (Start|Run|enter 'cmd' in the
dialog). If text scrolls off the screen, you can scroll back with the mouse.
-To copy output text into a mailer or editor (I recommend Notepad++, a free
-editor also licensed under the GPL), highlight the text as a rectangle in the
-cmd window, press <Enter> (or right-click the window icon in the upper left
+To copy output text into a mailer or editor (Notepad++, a free editor also
+licensed under the GPL is recommended), highlight the text as a rectangle in
+the cmd window, press <Enter> (or right-click the window icon in the upper left
corner and select Edit, then Copy), and paste it into your editor with Ctl-V
(or Edit|Paste from the typical GUI menu).
@@ -221,7 +235,7 @@ Please report problems or success to ham...@li...
Cheers,
Stephane Fillod - F8CFE
-Mike Black - W9MDB
+Mike Black - W9MDB (SK)
Nate Bargmann - N0NB
http://www.hamlib.org
@@ -240,7 +254,7 @@ 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
+mkdir -p ${ZIP_DIR}/bin ${ZIP_DIR}/lib/msvc ${ZIP_DIR}/lib/gcc-mingw ${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/.
@@ -274,7 +288,7 @@ do
done
cp -a ${INST_DIR}/bin/libhamlib-?.dll ${ZIP_DIR}/bin/.
-cp -a ${INST_DIR}/lib/libhamlib.dll.a ${ZIP_DIR}/lib/gcc/.
+cp -a ${INST_DIR}/lib/libhamlib.dll.a ${ZIP_DIR}/lib/gcc-mingw/.
# NB: Strip Hamlib DLLs and EXEs
${HOST_ARCH_STRIP} ${ZIP_DIR}/bin/*.exe ${ZIP_DIR}/bin/*hamlib-*.dll
@@ -318,7 +332,8 @@ then
cp -a ${FILE} ${ZIP_DIR}/bin/.
fi
-# Generate .lib file for MSVC
-${HOST_ARCH_DLLTOOL} --input-def ${ZIP_DIR}/lib/msvc/libhamlib-4.def --output-lib ${ZIP_DIR}/lib/msvc/libhamlib-4.lib
+# Generate .lib file for GCC on MinGW per Jonathan Yong from mingw-w64
+# https://sourceforge.net/p/mingw-w64/discussion/723798/thread/e23dceba20/?limit=25#51dd/3df2/3708/e62b
+${HOST_ARCH_DLLTOOL} --input-def ${ZIP_DIR}/lib/msvc/libhamlib-4.def --output-lib ${ZIP_DIR}/lib/gcc-mingw/libhamlib-4.lib
/usr/bin/zip -r ${HL_FILENAME}.zip $(basename ${ZIP_DIR})
diff --git a/scripts/build-w64.sh b/scripts/build-w64.sh
index 6841870e8..139581379 100755
--- a/scripts/build-w64.sh
+++ b/scripts/build-w64.sh
@@ -74,8 +74,8 @@ cat > README.w64-bin <<END_OF_README
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
+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 13
(nice, heh!).
This software is copyrighted. The library license is LGPL, and the *.EXE files
@@ -92,7 +92,21 @@ Installation and Configuration
Extract the ZIP archive into a convenient location, C:\Program Files is a
reasonable choice.
-Make sure *all* the .DLL files are in your PATH (leave them in the bin
+The archive directory structure is:
+
+hamlib-w64-4.7~git
+├── bin
+├── doc
+├── include
+│ └── hamlib
+└── lib
+ ├── gcc-mingw
+ └── msvc
+
+The 'bin' and 'doc' directories will be of interest to users while developers
+will be interested in the 'include' and 'lib' directories as well.
+
+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
2000, Windows XP, and Windows 7 (need info on Vista and Windows 8/10) do the
following:
@@ -118,7 +132,7 @@ following:
a semi-colon ';' after the last path before adding the Hamlib path (NB. The
entire path is highlighted and will be erased upon typing a character so
click in the box to unselect the text first. The PATH is important!!)
- Append the Hamlib path, e.g. C:\Program Files\hamlib-w64-$RELEASE\bin
+ Append the Hamlib path, e.g. C:\Program Files\hamlib-w64-${RELEASE}\bin
* Click OK for all three dialog boxes to save your changes.
@@ -149,9 +163,9 @@ In short, the command syntax is of the form:
To run rigctl or rotctl open a cmd window (Start|Run|enter 'cmd' in the
dialog). If text scrolls off the screen, you can scroll back with the mouse.
-To copy output text into a mailer or editor (I recommend Notepad++, a free
-editor also licensed under the GPL), highlight the text as a rectangle in the
-cmd window, press <Enter> (or right-click the window icon in the upper left
+To copy output text into a mailer or editor (Notepad++, a free editor also
+licensed under the GPL is recommended), highlight the text as a rectangle in
+the cmd window, press <Enter> (or right-click the window icon in the upper left
corner and select Edit, then Copy), and paste it into your editor with Ctl-V
(or Edit|Paste from the typical GUI menu).
@@ -227,7 +241,7 @@ Please report problems or success to ham...@li...
Cheers,
Stephane Fillod - F8CFE
-Mike Black - W9MDB
+Mike Black - W9MDB (SK)
Nate Bargmann - N0NB
http://www.hamlib.org
@@ -246,7 +260,7 @@ 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
+mkdir -p ${ZIP_DIR}/bin ${ZIP_DIR}/lib/msvc ${ZIP_DIR}/lib/gcc-mingw ${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/.
@@ -280,7 +294,7 @@ do
done
cp -a ${INST_DIR}/bin/libhamlib-?.dll ${ZIP_DIR}/bin/.
-cp -a ${INST_DIR}/lib/libhamlib.dll.a ${ZIP_DIR}/lib/gcc/.
+cp -a ${INST_DIR}/lib/libhamlib.dll.a ${ZIP_DIR}/lib/gcc-mingw/.
# NB: Strip Hamlib DLLs and EXEs
${HOST_ARCH_STRIP} ${ZIP_DIR}/bin/*.exe ${ZIP_DIR}/bin/*hamlib-*.dll
@@ -324,7 +338,8 @@ then
cp -a ${FILE} ${ZIP_DIR}/bin/.
fi
-# Generate .lib file for MSVC
-${HOST_ARCH_DLLTOOL} --input-def ${ZIP_DIR}/lib/msvc/libhamlib-4.def --output-lib ${ZIP_DIR}/lib/msvc/libhamlib-4.lib
+# Generate .lib file for GCC on MinGW per Jonathan Yong from mingw-w64
+# https://sourceforge.net/p/mingw-w64/discussion/723798/thread/e23dceba20/?limit=25#51dd/3df2/3708/e62b
+${HOST_ARCH_DLLTOOL} --input-def ${ZIP_DIR}/lib/msvc/libhamlib-4.def --output-lib ${ZIP_DIR}/lib/gcc-mingw/libhamlib-4.lib
/usr/bin/zip -r ${HL_FILENAME}.zip $(basename ${ZIP_DIR})
commit 41baedf9696668cae8a99b77f93606f6d89f6645
Author: Nate Bargmann <n0...@n0...>
Date: Mon Jul 21 15:24:27 2025 -0500
Update Windows build scripts for Debian 13
diff --git a/scripts/build-w32.sh b/scripts/build-w32.sh
index 9bf25dd93..4c4d3b08f 100755
--- a/scripts/build-w32.sh
+++ b/scripts/build-w32.sh
@@ -9,6 +9,10 @@
# See README.build-Windows for complete details.
+# running 'file' against the resulting .DLL should return the following or similar:
+# file libhamlib-4.dll
+# libhamlib-4.dll: PE32 executable for MS Windows 4.00 (DLL), Intel i386 (stripped to external PDB), 10 sections
+
# Set this to a desired directory
BUILD_DIR=~/builds
@@ -307,6 +311,13 @@ then
cp -a ${FILE} ${ZIP_DIR}/bin/.
fi
+# Required for MinGW with GCC 14 (Debian 13)
+FILE="/usr/lib/gcc/i686-w64-mingw32/14-posix/libgcc_s_dw2-1.dll"
+if test -f "$FILE"
+then
+ cp -a ${FILE} ${ZIP_DIR}/bin/.
+fi
+
# Generate .lib file for MSVC
${HOST_ARCH_DLLTOOL} --input-def ${ZIP_DIR}/lib/msvc/libhamlib-4.def --output-lib ${ZIP_DIR}/lib/msvc/libhamlib-4.lib
diff --git a/scripts/build-w64.sh b/scripts/build-w64.sh
index 2215bc86b..6841870e8 100755
--- a/scripts/build-w64.sh
+++ b/scripts/build-w64.sh
@@ -9,6 +9,10 @@
# See README.build-Windows for complete details.
+# running 'file' against the resulting .DLL should return the following or similar:
+# file libhamlib-4.dll
+# libhamlib-4.dll: PE32+ executable for MS Windows 5.02 (DLL), x86-64 (stripped to external PDB), 11 sections
+
# Set this to a desired directory
BUILD_DIR=~/builds
@@ -313,6 +317,13 @@ then
cp -a ${FILE} ${ZIP_DIR}/bin/.
fi
+# Required for MinGW with GCC 14 (Debian 13)
+FILE="/usr/lib/gcc/x86_64-w64-mingw32/14-posix/libgcc_s_seh-1.dll"
+if test -f "$FILE"
+then
+ cp -a ${FILE} ${ZIP_DIR}/bin/.
+fi
+
# Generate .lib file for MSVC
${HOST_ARCH_DLLTOOL} --input-def ${ZIP_DIR}/lib/msvc/libhamlib-4.def --output-lib ${ZIP_DIR}/lib/msvc/libhamlib-4.lib
-----------------------------------------------------------------------
Summary of changes:
scripts/build-w32.sh | 95 +++++++++++++++++++++++++++++++-----------------
scripts/build-w64.sh | 101 +++++++++++++++++++++++++++++++--------------------
2 files changed, 124 insertions(+), 72 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: n0nb <n0...@us...> - 2025-07-20 21:02: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 f25f21264f7de6f5b85f82bd3c0514c786306c05 (commit)
via c14949a86d34996764d0aa67e92bc8cfde361603 (commit)
from 5c06f66aa831c586bf4504007289675cb5e148ff (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 f25f21264f7de6f5b85f82bd3c0514c786306c05
Author: Diane Bruce <db...@db...>
Date: Sun Jul 20 14:59:10 2025 -0400
Provide for updated FreeBSD USB device naming
FreeBSD will eventually have the less verbose bNumDeviceCaps instead of
bNumDeviceCapabilities The other changes are (hopefully) to be
upstreamed renaming bU2devExitLat to wU2devExitLat
FreeBSD in the head of the tree has
/usr/include/libusb20_desc.h:#define bNumDeviceCapabilities bNumDeviceCaps
So we have backward compatibility for this.
diff --git a/tests/rigtestlibusb.c b/tests/rigtestlibusb.c
index 7065d09b3..45d82906e 100644
--- a/tests/rigtestlibusb.c
+++ b/tests/rigtestlibusb.c
@@ -32,6 +32,15 @@
#include <libusb-1.0/libusb.h>
#endif
+#ifdef __FreeBSD__
+# ifndef bU2DevExitLat
+# define bU2DevExitLat wU2DevExitLat
+# endif
+# ifndef bNumDeviceCaps
+# define bNumDeviceCaps bNumDeviceCapabilities
+# endif
+#endif
+
#if HAVE_LIBUSB
int verbose = 0;
commit c14949a86d34996764d0aa67e92bc8cfde361603
Author: Michael Morgan <844...@us...>
Date: Fri Jul 18 14:28:49 2025 -0500
Rewrite
Rewrote it some to see if MinGW ok.
diff --git a/rigs/flexradio/smartsdr.c b/rigs/flexradio/smartsdr.c
index 8cb105e0f..dac05d1db 100644
--- a/rigs/flexradio/smartsdr.c
+++ b/rigs/flexradio/smartsdr.c
@@ -628,26 +628,38 @@ int smartsdr_send_morse(RIG *rig, vfo_t vfo, const char *msg)
int retval;
size_t msg_len = strlen(msg);
- size_t buf_len = msg_len + 20;
+ size_t buf_len = msg_len + 20;
- char newmsg[msg_len + 1];
- strncpy(newmsg, msg, msg_len + 1);
+ char *newmsg = malloc(msg_len + 1);
+ if (!newmsg)
+ return -RIG_ENOMEM;
+
+ memcpy(newmsg, msg, msg_len + 1); // Copy including null terminator
- // Replace spaces with 0x7f
for (size_t i = 0; newmsg[i] != '\0'; i++) {
if (newmsg[i] == ' ') {
newmsg[i] = 0x7f;
}
}
- char cmd[buf_len];
- snprintf(cmd, sizeof(cmd), "cwx send \"%s\"", newmsg);
+ char *cmd = malloc(buf_len);
+ if (!cmd) {
+ free(newmsg);
+ return -RIG_ENOMEM;
+ }
+
+ snprintf(cmd, buf_len, "cwx send \"%s\"", newmsg);
+
+ free(newmsg);
retval = smartsdr_transaction(rig, cmd);
+ free(cmd);
+
RETURNFUNC(retval);
}
+
int smartsdr_stop_morse(RIG *rig, vfo_t vfo)
{
int retval;
-----------------------------------------------------------------------
Summary of changes:
rigs/flexradio/smartsdr.c | 24 ++++++++++++++++++------
tests/rigtestlibusb.c | 9 +++++++++
2 files changed, 27 insertions(+), 6 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: n0nb <n0...@us...> - 2025-07-18 18:27:25
|
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 annotated tag, 4.6.4 has been created
at 62955e15271ddf49f7f2457d11a6f3737ec6a51c (tag)
tagging 59e3d1b307504440837c3a5c24a15d7038e59f69 (commit)
replaces 4.6.3
tagged by Nate Bargmann
on Fri Jul 18 13:24:02 2025 -0500
- Log -----------------------------------------------------------------
4.6.4
Hamlib 4.6.4 release
-----BEGIN PGP SIGNATURE-----
iF0EABECAB0WIQSC1k9rDmfNQfaJu6b7LFEw1VqIGQUCaHqRgwAKCRD7LFEw1VqI
GdlCAKCp2WU4lWrT0Hg+Wm8vZNBdJGRjSQCeJ5iDliE6sDBOTZH9Q2OdPqRXgwU=
=RRQB
-----END PGP SIGNATURE-----
George Baltz N3GB (5):
Fix memory leak in rigctl_parse.c
Add -S to rigctld man page
Make separator character local to rigctld connection
Restore TS-590S/SG RIG_LEVEL_RFPOWER_METER
Fix rotctl \dump_caps output
Lars Kellogg-Stedman (1):
Un-break hamlib on TM-D710/TM-V71/etc
Michael Morgan (1):
FlexCW
Nate Bargmann (8):
Update NEWS on Kenwood command terminator fix
Update NEWS for jrc_set_chan
Update NEWS for rigctld seperator character fix.
Update NEWS for R75 powerstat fix
Update NEWS for TS-590 and rotctl fixes
Update NEWS for Flex CW
Update NEWS for SmartSDR space CW handling
Advance to Hamlib 4.6.4
aa5sh (2):
Added RetVal
smartsdr--CWX Updates
markjfine (2):
Fixed jrc_set_chan
Correct powerstat check
-----------------------------------------------------------------------
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: n0nb <n0...@us...> - 2025-07-18 18:26:18
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, Hamlib-4.6.3 has been updated
via 59e3d1b307504440837c3a5c24a15d7038e59f69 (commit)
from 4801ebd081b563ae0eb77c2d8a14d89c923f619d (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 59e3d1b307504440837c3a5c24a15d7038e59f69
Author: Nate Bargmann <n0...@n0...>
Date: Fri Jul 18 13:23:23 2025 -0500
Advance to Hamlib 4.6.4
diff --git a/NEWS b/NEWS
index 11d96551b..c52a25d13 100644
--- a/NEWS
+++ b/NEWS
@@ -16,7 +16,7 @@ Version 4.7.0
* 2025-12-01 (target)
Version 4.6.4
- * 2025-07-08
+ * 2025-07-18--Hamlib's 25th birthday!!!
* Fix handling of unprintable characters in kenwood.c that broke radios
such as the TM-D710/TM-V71 that use EOM_TH (\r) as the command terminator.
(TNX, Lars Kellogg-Stedman and George Baltz).
diff --git a/configure.ac b/configure.ac
index 06542cdad..3b17e222c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,7 +14,7 @@ dnl Please do not use '-' in the version number, as package managers will fail,
dnl however, the use of '~' should be fine as apt (others?) will treat
dnl it as an earlier version than the actual release. TNX KA6MAL
dnl PACKAGE_NAME + " " + PACKAGE_VERSION must not exceed 20 chars!
-AC_INIT([Hamlib],[4.6.3],[ham...@li...],[hamlib],[http://www.hamlib.org])
+AC_INIT([Hamlib],[4.6.4],[ham...@li...],[hamlib],[http://www.hamlib.org])
#AC_INIT([PRODUCT_NAME], [Hamlib])
#AC_DEFINE([Hamlib], [PRODUCT_VERSION_RESOURCE])
@@ -76,7 +76,7 @@ dnl See README.release on setting these values
# Set them here to keep c++/Makefile and src/Makefile in sync.
ABI_VERSION=4
ABI_REVISION=6
-ABI_PATCH=3
+ABI_PATCH=4
ABI_AGE=0
AC_DEFINE_UNQUOTED([ABI_VERSION], [$ABI_VERSION], [Frontend ABI version])
-----------------------------------------------------------------------
Summary of changes:
NEWS | 2 +-
configure.ac | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: n0nb <n0...@us...> - 2025-07-15 19:29:09
|
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 5c06f66aa831c586bf4504007289675cb5e148ff (commit)
from 3f7c18eb52bb2cdcbf4a1ef5abbdf73ddeae96bd (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 5c06f66aa831c586bf4504007289675cb5e148ff
Author: Michael Morgan <844...@us...>
Date: Mon Jul 14 09:05:55 2025 -0500
Update gs232.c
I don't use that so I added a line to void it to suppress the warning. Hope that is ok.
diff --git a/rotators/gs232a/gs232.c b/rotators/gs232a/gs232.c
index bbddc9a27..915d53a37 100644
--- a/rotators/gs232a/gs232.c
+++ b/rotators/gs232a/gs232.c
@@ -158,7 +158,8 @@ wrc_rot_set_position(ROT *rot, azimuth_t az, elevation_t el)
u_az = (unsigned)rint(az);
u_el = (unsigned)rint(el);
-
+ (void)u_el;
+
SNPRINTF(cmdstr, sizeof(cmdstr), "W%03u" EOM, u_az);
retval = gs232_wo_transaction(rot, cmdstr, NULL, 0);
-----------------------------------------------------------------------
Summary of changes:
rotators/gs232a/gs232.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: n0nb <n0...@us...> - 2025-07-14 11:53: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 79c812ff4db84d44eca7414aa4f2f5f81f7ce3e1 (commit)
via 7ce9d60aa68af334bc680a42a28ca5194d71ecde (commit)
via 69d203fd1c2e209cda74a000977cc0b7464dc43a (commit)
from 0db57035d50880893305d45ef5adbd538f0c401e (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 79c812ff4db84d44eca7414aa4f2f5f81f7ce3e1
Author: Nate Bargmann <n0...@n0...>
Date: Mon Jul 14 06:51:44 2025 -0500
Update NEWS for FTX-1 new model support
diff --git a/NEWS b/NEWS
index fb2b8b565..9e32531fa 100644
--- a/NEWS
+++ b/NEWS
@@ -29,6 +29,7 @@ Version 4.7.0
additional support add clean up code. (TNX FVsonar).
* New Drake R8 backend. (TNX Mark Fine)
* New AF6SA WRC rotator backend. (TNX Michael Morgan)
+ * New Yaesu FTX-1 model support (alpha). (TNX Jeremy Miller).
Version 4.6.3
* 2025-06-10
commit 7ce9d60aa68af334bc680a42a28ca5194d71ecde
Merge: 0db57035d 69d203fd1
Author: Nate Bargmann <n0...@n0...>
Date: Mon Jul 14 06:17:48 2025 -0500
Merge GitHub PR #1801
commit 69d203fd1c2e209cda74a000977cc0b7464dc43a
Author: jeremybox <gi...@je...>
Date: Fri Jul 11 01:42:24 2025 -0400
Add FTX-1 radio support to Hamlib
- Add FTX-1 rig model (ID 840) to riglist.h
- Create ftx1.c and ftx1.h with FTX-1 implementation
- Add FTX-1 to Yaesu Makefile.am
- Integrate FTX-1 into newcat.c command validation system
- Update yaesu.c and yaesu.h for FTX-1 support
- Based on FT-991A CAT protocol compatibility
diff --git a/include/hamlib/riglist.h b/include/hamlib/riglist.h
index 2dcd1f3a6..7bcb2b952 100644
--- a/include/hamlib/riglist.h
+++ b/include/hamlib/riglist.h
@@ -144,6 +144,7 @@
#define RIG_MODEL_FT990UNI RIG_MAKE_MODEL(RIG_YAESU, 48)
#define RIG_MODEL_FT710 RIG_MAKE_MODEL(RIG_YAESU, 49)
#define RIG_MODEL_FT9000OLD RIG_MAKE_MODEL(RIG_YAESU, 50)
+#define RIG_MODEL_FTX1 RIG_MAKE_MODEL(RIG_YAESU, 51)
/*
* Kenwood
diff --git a/rigs/yaesu/Makefile.am b/rigs/yaesu/Makefile.am
index 39130a8eb..c1bdb576d 100644
--- a/rigs/yaesu/Makefile.am
+++ b/rigs/yaesu/Makefile.am
@@ -11,7 +11,8 @@ YAESUSRC = ft100.c ft100.h ft747.c ft747.h ft817.c ft817.h ft847.c ft847.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 \
ft2000.c ft2000.h ft9000.c ft9000.h ft5000.c ft5000.h ft1200.c ft1200.h \
- ft891.c ft891.h ftdx101.c ftdx101.h ftdx101mp.c ft3000.c ftdx10.c ft710.h
+ ft891.c ft891.h ftdx101.c ftdx101.h ftdx101mp.c ft3000.c ftdx10.c ft710.h\
+ ftx1.c ftx1.h
noinst_LTLIBRARIES = libhamlib-yaesu.la
libhamlib_yaesu_la_SOURCES = yaesu.c yaesu.h level_gran_yaesu.h $(YAESUSRC) $(NEWCATSRC)
diff --git a/rigs/yaesu/ftx1.c b/rigs/yaesu/ftx1.c
new file mode 100644
index 000000000..db87a3989
--- /dev/null
+++ b/rigs/yaesu/ftx1.c
@@ -0,0 +1,1210 @@
+/*
+ * hamlib - (C) Frank Singleton 2000 (javabear at users.sourceforge.net)
+ *
+ * ftx1.c - (C) Jeremy Miller KO4SSD 2025 (ko4ssd at ko4ssd.com)
+ *
+ * The FTX-1 is very much like the FT991 except it has some different frequency ranges and features
+ * So the code was built using the FT991 code as a template.
+ *
+ * This shared library provides an API for communicating
+ * via serial interface to an FTX-1 using the "CAT" interface
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include "hamlib/rig.h"
+#include "misc.h"
+#include "cache.h"
+#include "newcat.h"
+#include "yaesu.h"
+#include "ftx1.h"
+
+/* Prototypes */
+static int ftx1_init(RIG *rig);
+static int ftx1_set_vfo(RIG *rig, vfo_t vfo);
+static int ftx1_get_vfo(RIG *rig, vfo_t *vfo);
+static int ftx1_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode,
+ pbwidth_t *tx_width);
+static int ftx1_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode,
+ pbwidth_t tx_width);
+static int ftx1_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq);
+static int ftx1_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq);
+static void debug_ftx1info_data(const ftx1info *rdata);
+static int ftx1_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone);
+static int ftx1_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone);
+static int ftx1_set_dcs_code(RIG *rig, vfo_t vfo, tone_t code);
+static int ftx1_get_dcs_code(RIG *rig, vfo_t vfo, tone_t *code);
+static int ftx1_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone);
+static int ftx1_get_ctcss_sql(RIG *rig, vfo_t vfo, tone_t *tone);
+static int ftx1_get_dcs_sql(RIG *rig, vfo_t vfo, tone_t *code);
+static int ftx1_set_dcs_sql(RIG *rig, vfo_t vfo, tone_t code);
+
+const struct confparams ftx1_ext_levels[] =
+{
+ {
+ TOK_KEYER,
+ "KEYER",
+ "Keyer",
+ "Keyer on/off",
+ NULL,
+ RIG_CONF_CHECKBUTTON,
+ },
+ {
+ TOK_APF_FREQ,
+ "APF_FREQ",
+ "APF frequency",
+ "Audio peak filter frequency",
+ NULL,
+ RIG_CONF_NUMERIC,
+ { .n = { .min = -250, .max = 250, .step = 10 } },
+ },
+ {
+ TOK_APF_WIDTH,
+ "APF_WIDTH",
+ "APF width",
+ "Audio peak filter width",
+ NULL,
+ RIG_CONF_COMBO,
+ { .c = { .combostr = { "Narrow", "Medium", "Wide", NULL } } },
+ },
+ {
+ TOK_CONTOUR,
+ "CONTOUR",
+ "Contour",
+ "Contour on/off",
+ NULL,
+ RIG_CONF_CHECKBUTTON,
+ },
+ {
+ TOK_CONTOUR_FREQ,
+ "CONTOUR_FREQ",
+ "Contour frequency",
+ "Contour frequency",
+ NULL,
+ RIG_CONF_NUMERIC,
+ { .n = { .min = 10, .max = 3200, .step = 1 } },
+ },
+ {
+ TOK_CONTOUR_LEVEL,
+ "CONTOUR_LEVEL",
+ "Contour level",
+ "Contour level (dB)",
+ NULL,
+ RIG_CONF_NUMERIC,
+ { .n = { .min = -40, .max = 20, .step = 1 } },
+ },
+ {
+ TOK_CONTOUR_WIDTH,
+ "CONTOUR_WIDTH",
+ "Contour width",
+ "Contour width",
+ NULL,
+ RIG_CONF_NUMERIC,
+ { .n = { .min = 1, .max = 11, .step = 1 } },
+ },
+ {
+ TOK_MAXPOWER_HF,
+ "MAXPOWER_HF",
+ "Maxpower HF",
+ "Maxpower HF",
+ NULL,
+ RIG_CONF_INT,
+ { .n = { .min = 5, .max = 100, .step = 1 } },
+ },
+ {
+ TOK_MAXPOWER_6M,
+ "MAXPOWER_6M",
+ "Maxpower 6m",
+ "Maxpower 6m",
+ NULL,
+ RIG_CONF_INT,
+ { .n = { .min = 5, .max = 100, .step = 1 } },
+ },
+ {
+ TOK_MAXPOWER_VHF,
+ "MAXPOWER_VHF",
+ "Maxpower VHF",
+ "Maxpower VHF",
+ NULL,
+ RIG_CONF_INT,
+ { .n = { .min = 5, .max = 50, .step = 1 } },
+ },
+ {
+ TOK_MAXPOWER_UHF,
+ "MAXPOWER_UHF",
+ "Maxpower UHF",
+ "Maxpower UHF",
+ NULL,
+ RIG_CONF_NUMERIC,
+ { .n = { .min = 5, .max = 50, .step = 1 } },
+ },
+ { RIG_CONF_END, NULL, }
+};
+
+int ftx1_ext_tokens[] =
+{
+ TOK_KEYER, TOK_APF_FREQ, TOK_APF_WIDTH,
+ TOK_CONTOUR, TOK_CONTOUR_FREQ, TOK_CONTOUR_LEVEL, TOK_CONTOUR_WIDTH,
+ TOK_MAXPOWER_HF, TOK_MAXPOWER_6M, TOK_MAXPOWER_UHF, TOK_MAXPOWER_VHF,
+ TOK_BACKEND_NONE
+};
+
+/*
+ * FTX-1 rig capabilities
+ */
+struct rig_caps ftx1_caps =
+{
+ RIG_MODEL(RIG_MODEL_FTX1),
+ .model_name = "FTX-1",
+ .mfg_name = "Yaesu",
+ .version = NEWCAT_VER ".1",
+ .copyright = "LGPL",
+ .status = RIG_STATUS_ALPHA,
+ .rig_type = RIG_TYPE_TRANSCEIVER,
+ .ptt_type = RIG_PTT_RIG,
+ .dcd_type = RIG_DCD_NONE,
+ .port_type = RIG_PORT_SERIAL,
+ .serial_rate_min = 4800, /* Default rate per manual */
+ .serial_rate_max = 38400,
+ .serial_data_bits = 8,
+ .serial_stop_bits = 2, /* Assumed since manual makes no mention */
+ .serial_parity = RIG_PARITY_NONE,
+ .serial_handshake = RIG_HANDSHAKE_HARDWARE,
+ .write_delay = FTX1_WRITE_DELAY,
+ .post_write_delay = FTX1_POST_WRITE_DELAY,
+ .timeout = 2000,
+ .retry = 3,
+ .has_get_func = FTX1_FUNCS,
+ .has_set_func = FTX1_FUNCS,
+ .has_get_level = FTX1_LEVELS,
+ .has_set_level = RIG_LEVEL_SET(FTX1_LEVELS),
+ .has_get_parm = RIG_PARM_BANDSELECT,
+ .has_set_parm = RIG_PARM_BANDSELECT,
+ .level_gran = {
+#define NO_LVL_MICGAIN
+#define NO_LVL_SQL
+#define NO_LVL_MONITOR_GAIN
+#define NO_LVL_RFPOWER
+#include "level_gran_yaesu.h"
+#undef NO_LVL_MICGAIN
+#undef NO_LVL_SQL
+#undef NO_LVL_MONITOR_GAIN
+#undef NO_LVL_RFPOWER
+ [LVL_MICGAIN] = { .min = { .f = 0 }, .max = { .f = 1.0 }, .step = { .f = 1.0f / 100.0f } },
+ [LVL_SQL] = { .min = { .f = 0 }, .max = { .f = 1.0 }, .step = { .f = 1.0f / 100.0f } },
+ [LVL_MONITOR_GAIN] = { .min = { .f = 0 }, .max = { .f = 1.0 }, .step = { .f = 1.0f / 100.0f } },
+ [LVL_RFPOWER] = { .min = { .f = .05 }, .max = { .f = 1.0 }, .step = { .f = 1.0f / 100.0f } },
+ },
+ .parm_gran = {
+ [PARM_BANDSELECT] = {.step = {.s = "BAND160M,BAND80M,BANDUNUSED,BAND40M,BAND30M,BAND20M,BAND17M,BAND15M,BAND12M,BAND10M,BAND6M,BANDGEN,BANDMW,BANDUNUSED,BANDAIR,BAND70CM,BAND33CM"}}
+ },
+
+ .ctcss_list = common_ctcss_list,
+ .dcs_list = common_dcs_list,
+ .preamp = { 10, 20, RIG_DBLST_END, },
+ .attenuator = { 12, RIG_DBLST_END, },
+ .max_rit = Hz(9999),
+ .max_xit = Hz(9999),
+ .max_ifshift = Hz(1200),
+ .agc_level_count = 5,
+ .agc_levels = { RIG_AGC_OFF, RIG_AGC_FAST, RIG_AGC_MEDIUM, RIG_AGC_SLOW, RIG_AGC_AUTO },
+ .vfo_ops = FTX1_VFO_OPS,
+ .scan_ops = RIG_SCAN_VFO,
+ .targetable_vfo = RIG_TARGETABLE_FREQ,
+ .transceive = RIG_TRN_OFF, /* May enable later as the 950 has an Auto Info command */
+ .bank_qty = 0,
+ .chan_desc_sz = 0,
+ .rfpower_meter_cal = FTX1_RFPOWER_METER_CAL,
+ .str_cal = FTX1_STR_CAL,
+ .id_meter_cal = FTX1_ID_CAL,
+ .vd_meter_cal = FTX1_VD_CAL,
+ .comp_meter_cal = FTX1_COMP_CAL,
+ .chan_list = {
+ { 1, 99, RIG_MTYPE_MEM, NEWCAT_MEM_CAP },
+ { 100, 117, RIG_MTYPE_MEM, NEWCAT_MEM_CAP }, // P1L-P9U PMS channels
+ { 118, 127, RIG_MTYPE_MEM, NEWCAT_MEM_CAP }, // 5xx 5MHz band
+ { 1, 5, RIG_MTYPE_VOICE },
+ { 1, 5, RIG_MTYPE_MORSE },
+ RIG_CHAN_END,
+ },
+
+ // Rig only has 1 model
+ .rx_range_list1 = {
+ {kHz(30), MHz(56), FTX1_ALL_RX_MODES, -1, -1, FTX1_VFO_ALL, FTX1_ANTS, "Operating"},
+ {MHz(118), MHz(164), FTX1_ALL_RX_MODES, -1, -1, FTX1_VFO_ALL, FTX1_ANTS, "Operating"},
+ {MHz(420), MHz(470), FTX1_ALL_RX_MODES, -1, -1, FTX1_VFO_ALL, FTX1_ANTS, "Operating"},
+ RIG_FRNG_END,
+ },
+
+ .tx_range_list1 = {
+ {MHz(1.8), MHz(54), FTX1_OTHER_TX_MODES, W(5), W(100), FTX1_VFO_ALL, FTX1_ANTS, "Operating"},
+ {MHz(1.8), MHz(54), FTX1_AM_TX_MODES, W(2), W(25), FTX1_VFO_ALL, FTX1_ANTS, "Operating"}, /* AM class */
+ {MHz(144), MHz(148), FTX1_OTHER_TX_MODES, W(5), W(50), FTX1_VFO_ALL, FTX1_ANTS, "Operating"},
+ {MHz(144), MHz(148), FTX1_AM_TX_MODES, W(2), W(25), FTX1_VFO_ALL, FTX1_ANTS, "Operating"}, /* AM class */
+ {MHz(430), MHz(450), FTX1_OTHER_TX_MODES, W(5), W(50), FTX1_VFO_ALL, FTX1_ANTS, "Operating"},
+ {MHz(430), MHz(450), FTX1_AM_TX_MODES, W(2), W(25), FTX1_VFO_ALL, FTX1_ANTS, "Operating"}, /* AM class */
+ RIG_FRNG_END,
+ },
+
+ .tuning_steps = {
+ {FTX1_SSB_CW_RX_MODES, Hz(10)}, /* Normal */
+ {FTX1_SSB_CW_RX_MODES, Hz(100)}, /* Fast */
+
+ {FTX1_AM_RX_MODES, Hz(100)}, /* Normal */
+ {FTX1_AM_RX_MODES, kHz(1)}, /* Fast */
+
+ {FTX1_FM_RX_MODES, Hz(100)}, /* Normal */
+ {FTX1_FM_RX_MODES, kHz(1)}, /* Fast */
+
+ RIG_TS_END,
+
+ },
+
+ /* mode/filter list, .remember = order matters! */
+ .filters = {
+ {FTX1_RTTY_DATA_RX_MODES, Hz(500)}, /* Normal RTTY, DATA */
+ {FTX1_RTTY_DATA_RX_MODES, Hz(300)}, /* Narrow RTTY, DATA */
+ {FTX1_RTTY_DATA_RX_MODES, Hz(3000)}, /* Wide RTTY, DATA */
+ {FTX1_RTTY_DATA_RX_MODES, Hz(2400)}, /* RTTY, DATA */
+ {FTX1_RTTY_DATA_RX_MODES, Hz(2000)}, /* RTTY, DATA */
+ {FTX1_RTTY_DATA_RX_MODES, Hz(1700)}, /* RTTY, DATA */
+ {FTX1_RTTY_DATA_RX_MODES, Hz(1400)}, /* RTTY, DATA */
+ {FTX1_RTTY_DATA_RX_MODES, Hz(1200)}, /* RTTY, DATA */
+ {FTX1_RTTY_DATA_RX_MODES, Hz(800)}, /* RTTY, DATA */
+ {FTX1_RTTY_DATA_RX_MODES, Hz(450)}, /* RTTY, DATA */
+ {FTX1_RTTY_DATA_RX_MODES, Hz(400)}, /* RTTY, DATA */
+ {FTX1_RTTY_DATA_RX_MODES, Hz(350)}, /* RTTY, DATA */
+ {FTX1_RTTY_DATA_RX_MODES, Hz(250)}, /* RTTY, DATA */
+ {FTX1_RTTY_DATA_RX_MODES, Hz(200)}, /* RTTY, DATA */
+ {FTX1_RTTY_DATA_RX_MODES, Hz(150)}, /* RTTY, DATA */
+ {FTX1_RTTY_DATA_RX_MODES, Hz(100)}, /* RTTY, DATA */
+ {FTX1_RTTY_DATA_RX_MODES, Hz(50)}, /* RTTY, DATA */
+ {FTX1_CW_RX_MODES, Hz(2400)}, /* Normal CW */
+ {FTX1_CW_RX_MODES, Hz(500)}, /* Narrow CW */
+ {FTX1_CW_RX_MODES, Hz(3000)}, /* Wide CW */
+ {FTX1_CW_RX_MODES, Hz(2000)}, /* CW */
+ {FTX1_CW_RX_MODES, Hz(1700)}, /* CW */
+ {FTX1_CW_RX_MODES, Hz(1400)}, /* CW */
+ {FTX1_CW_RX_MODES, Hz(1200)}, /* CW */
+ {FTX1_CW_RX_MODES, Hz(800)}, /* CW */
+ {FTX1_CW_RX_MODES, Hz(450)}, /* CW */
+ {FTX1_CW_RX_MODES, Hz(400)}, /* CW */
+ {FTX1_CW_RX_MODES, Hz(350)}, /* CW */
+ {FTX1_CW_RX_MODES, Hz(300)}, /* CW */
+ {FTX1_CW_RX_MODES, Hz(250)}, /* CW */
+ {FTX1_CW_RX_MODES, Hz(200)}, /* CW */
+ {FTX1_CW_RX_MODES, Hz(150)}, /* CW */
+ {FTX1_CW_RX_MODES, Hz(100)}, /* CW */
+ {FTX1_CW_RX_MODES, Hz(50)}, /* CW */
+ {RIG_MODE_SSB, Hz(2400)}, /* Normal SSB */
+ {RIG_MODE_SSB, Hz(1500)}, /* Narrow SSB */
+ {RIG_MODE_SSB, Hz(3200)}, /* Wide SSB */
+ {RIG_MODE_SSB, Hz(3000)}, /* SSB */
+ {RIG_MODE_SSB, Hz(2900)}, /* SSB */
+ {RIG_MODE_SSB, Hz(2800)}, /* SSB */
+ {RIG_MODE_SSB, Hz(2700)}, /* SSB */
+ {RIG_MODE_SSB, Hz(2600)}, /* SSB */
+ {RIG_MODE_SSB, Hz(2500)}, /* SSB */
+ {RIG_MODE_SSB, Hz(2300)}, /* SSB */
+ {RIG_MODE_SSB, Hz(2200)}, /* SSB */
+ {RIG_MODE_SSB, Hz(2100)}, /* SSB */
+ {RIG_MODE_SSB, Hz(1950)}, /* SSB */
+ {RIG_MODE_SSB, Hz(1650)}, /* SSB */
+ {RIG_MODE_SSB, Hz(1350)}, /* SSB */
+ {RIG_MODE_SSB, Hz(1100)}, /* SSB */
+ {RIG_MODE_SSB, Hz(850)}, /* SSB */
+ {RIG_MODE_SSB, Hz(600)}, /* SSB */
+ {RIG_MODE_SSB, Hz(400)}, /* SSB */
+ {RIG_MODE_SSB, Hz(200)}, /* SSB */
+ {RIG_MODE_AM, Hz(9000)}, /* Normal AM */
+ {RIG_MODE_AMN, Hz(6000)}, /* Narrow AM */
+ {FTX1_FM_WIDE_RX_MODES, Hz(16000)}, /* Normal FM, PKTFM, C4FM */
+ {RIG_MODE_FMN, Hz(9000)}, /* Narrow FM */
+
+ RIG_FLT_END,
+ },
+
+ .ext_tokens = ftx1_ext_tokens,
+ .extlevels = ftx1_ext_levels,
+
+ .priv = NULL, /* private data FIXME: */
+
+ .rig_init = ftx1_init,
+ .rig_cleanup = newcat_cleanup,
+ .rig_open = newcat_open, /* port opened */
+ .rig_close = newcat_close, /* port closed */
+
+ .set_freq = newcat_set_freq,
+ .get_freq = newcat_get_freq,
+ .set_mode = newcat_set_mode,
+ .get_mode = newcat_get_mode,
+ .set_vfo = ftx1_set_vfo,
+ .get_vfo = ftx1_get_vfo,
+ .set_ptt = newcat_set_ptt,
+ .get_ptt = newcat_get_ptt,
+ .set_split_vfo = newcat_set_split_vfo,
+ .get_split_vfo = newcat_get_split_vfo,
+ .set_split_freq = ftx1_set_split_freq,
+ .get_split_freq = ftx1_get_split_freq,
+ .get_split_mode = ftx1_get_split_mode,
+ .set_split_mode = ftx1_set_split_mode,
+ .set_rit = newcat_set_rit,
+ .get_rit = newcat_get_rit,
+ .set_xit = newcat_set_xit,
+ .get_xit = newcat_get_xit,
+ .get_func = newcat_get_func,
+ .set_func = newcat_set_func,
+ .get_parm = newcat_get_parm,
+ .set_parm = newcat_set_parm,
+ .get_level = newcat_get_level,
+ .set_level = newcat_set_level,
+ .get_mem = newcat_get_mem,
+ .set_mem = newcat_set_mem,
+ .vfo_op = newcat_vfo_op,
+ .get_info = newcat_get_info,
+ .power2mW = newcat_power2mW,
+ .mW2power = newcat_mW2power,
+ .set_rptr_shift = newcat_set_rptr_shift,
+ .get_rptr_shift = newcat_get_rptr_shift,
+ .set_rptr_offs = newcat_set_rptr_offs,
+ .get_rptr_offs = newcat_get_rptr_offs,
+ .set_ctcss_tone = ftx1_set_ctcss_tone,
+ .get_ctcss_tone = ftx1_get_ctcss_tone,
+ .set_dcs_code = ftx1_set_dcs_code,
+ .get_dcs_code = ftx1_get_dcs_code,
+ .set_ctcss_sql = ftx1_set_ctcss_sql,
+ .get_ctcss_sql = ftx1_get_ctcss_sql,
+ .set_dcs_sql = ftx1_set_dcs_sql,
+ .get_dcs_sql = ftx1_get_dcs_sql,
+ .set_powerstat = newcat_set_powerstat,
+ .get_powerstat = newcat_get_powerstat,
+ .set_ts = newcat_set_ts,
+ .get_ts = newcat_get_ts,
+ .set_trn = newcat_set_trn,
+ .get_trn = newcat_get_trn,
+ .set_channel = newcat_set_channel,
+ .get_channel = newcat_get_channel,
+ .set_ext_level = newcat_set_ext_level,
+ .get_ext_level = newcat_get_ext_level,
+ .send_morse = newcat_send_morse,
+ .wait_morse = rig_wait_morse,
+ .scan = newcat_scan,
+ .send_voice_mem = newcat_send_voice_mem,
+ .set_clock = newcat_set_clock,
+ .get_clock = newcat_get_clock,
+ .morse_qsize = 50,
+ .hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS
+};
+
+
+static int
+ftx1_get_tx_split(RIG *rig, split_t *in_split)
+{
+ vfo_t cur_tx_vfo;
+ int rval;
+
+ rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+
+ if (!rig || !in_split)
+ {
+ return (-RIG_EINVAL);
+ }
+
+ rval = newcat_get_tx_vfo(rig, &cur_tx_vfo);
+
+ if (rval != RIG_OK)
+ {
+ return (rval);
+ }
+
+ if (cur_tx_vfo == RIG_VFO_B || cur_tx_vfo == RIG_VFO_MEM)
+ {
+ *in_split = RIG_SPLIT_ON;
+ }
+ else if (cur_tx_vfo == RIG_VFO_A)
+ {
+ *in_split = RIG_SPLIT_OFF;
+ }
+ else
+ {
+ return (-RIG_EINVAL);
+ }
+
+ return (rval);
+}
+
+int
+ftx1_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
+{
+ int rval;
+ split_t is_split;
+
+ rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+
+ rval = ftx1_get_tx_split(rig, &is_split);
+
+ if (rval != RIG_OK)
+ {
+ return (rval);
+ }
+
+ if (CACHE(rig)->freqMainB == tx_freq)
+ {
+ rig_debug(RIG_DEBUG_TRACE, "%s: freq %.0f already set on VFOB\n", __func__,
+ tx_freq);
+ return RIG_OK;
+ }
+
+ if (is_split == RIG_SPLIT_OFF)
+ {
+ rval = newcat_set_tx_vfo(rig, RIG_VFO_B);
+
+ if (rval != RIG_OK)
+ {
+ return (rval);
+ }
+ }
+
+ rval = newcat_set_freq(rig, RIG_VFO_B, tx_freq);
+ rig_debug(RIG_DEBUG_VERBOSE,
+ "%s newcat_set_freq() rval = %d freq = %f\n",
+ __func__, rval, tx_freq);
+ return (rval);
+}
+
+int
+ftx1_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
+{
+ int rval;
+ split_t is_split;
+
+ rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+
+ rval = ftx1_get_tx_split(rig, &is_split);
+
+ if (rval != RIG_OK)
+ {
+ return (rval);
+ }
+
+ if (is_split == RIG_SPLIT_OFF)
+ {
+ *tx_freq = 0.0;
+ return (rval);
+ }
+
+ rval = newcat_get_freq(rig, RIG_VFO_B, tx_freq);
+ rig_debug(RIG_DEBUG_VERBOSE,
+ "%s newcat_get_freq() rval = %d freq = %f\n",
+ __func__, rval, *tx_freq);
+
+ return (rval);
+}
+
+/*
+ * rig_get_split_mode*
+ *
+ * Get the 'X1 split TX mode
+ *
+ * Parameter | Type | Accepted/expected values
+ * ------------------------------------------------------------------
+ * *rig | input | pointer to private data
+ * vfo | input | currVFO, VFOA, VFOB, MEM
+ * *tx_mode | output | supported modes
+ * *tx_width | output | supported widths
+ * ------------------------------------------------------------------
+ * Returns RIG_OK on success or an error code on failure
+ *
+ * Comments: Checks to see if the X1 is in split mode, if so it
+ * checks which VFO is set for TX and then gets the
+ * mode and passband of that VFO and stores it into *tx_mode
+ * and tx_width respectively. If not in split mode returns
+ * RIG_MODE_NONE and 0 Hz.
+ *
+ */
+
+static int ftx1_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode,
+ pbwidth_t *tx_width)
+{
+ struct newcat_priv_data *priv;
+ int err;
+ ftx1info *rdata;
+
+ rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+
+ if (!rig || !tx_mode || !tx_width)
+ {
+ return -RIG_EINVAL;
+ }
+
+ priv = (struct newcat_priv_data *)STATE(rig)->priv;
+ rdata = (ftx1info *)priv->ret_data;
+
+ SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "OI;");
+
+ if (RIG_OK != (err = newcat_get_cmd(rig)))
+ {
+ return err;
+ }
+
+ debug_ftx1info_data(rdata);
+
+ *tx_mode = newcat_rmode(rdata->mode);
+ rig_debug(RIG_DEBUG_VERBOSE, "%s opposite mode %s\n", __func__,
+ rig_strrmode(*tx_mode));
+ *tx_width = RIG_PASSBAND_NORMAL;
+
+ return RIG_OK;
+}
+
+static void debug_ftx1info_data(const ftx1info *rdata)
+{
+
+ rig_debug(RIG_DEBUG_VERBOSE, "%s command %2.2s\n",
+ __func__, rdata->command);
+ rig_debug(RIG_DEBUG_VERBOSE, "%s memory_ch %3.3s\n",
+ __func__, rdata->memory_ch);
+ rig_debug(RIG_DEBUG_VERBOSE, "%s vfo_freq %9.9s\n",
+ __func__, rdata->vfo_freq);
+ rig_debug(RIG_DEBUG_VERBOSE, "%s clarifier %5.5s\n",
+ __func__, rdata->clarifier);
+ rig_debug(RIG_DEBUG_VERBOSE, "%s rx_clarifier %c\n",
+ __func__, rdata->rx_clarifier);
+ rig_debug(RIG_DEBUG_VERBOSE, "%s tx_clarifier %c\n",
+ __func__, rdata->tx_clarifier);
+ rig_debug(RIG_DEBUG_VERBOSE, "%s mode %c\n",
+ __func__, rdata->mode);
+ rig_debug(RIG_DEBUG_VERBOSE, "%s vfo_memory %c\n",
+ __func__, rdata->vfo_memory);
+ rig_debug(RIG_DEBUG_VERBOSE, "%s tone_mode %c\n",
+ __func__, rdata->tone_mode);
+ rig_debug(RIG_DEBUG_VERBOSE, "%s fixed %2.2s\n",
+ __func__, rdata->fixed);
+ rig_debug(RIG_DEBUG_VERBOSE, "%s repeater_offset %c\n",
+ __func__, rdata->repeater_offset);
+ rig_debug(RIG_DEBUG_VERBOSE, "%s terminator %c\n",
+ __func__, rdata->terminator);
+
+}
+
+/*
+ * rig_set_split_mode
+ *
+ * Set the 'X1 split TX mode
+ *
+ * Parameter | Type | Accepted/expected values
+ * ------------------------------------------------------------------
+ * *rig | input | pointer to private data
+ * vfo | input | currVFO, VFOA, VFOB, MEM
+ * tx_mode | input | supported modes
+ * tx_width | input | supported widths
+ * ------------------------------------------------------------------
+ * Returns RIG_OK on success or an error code on failure
+ *
+ * Comments: Pass band is not set here nor does it make sense as the
+ * FTX-1 cannot receive on VFO B. The FTX-1 cannot set
+ * VFO B mode directly so we'll just set A and swap A
+ * into B but we must preserve the VFO A mode and VFO B
+ * frequency.
+ *
+ */
+
+static int ftx1_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode,
+ pbwidth_t tx_width)
+{
+ struct newcat_priv_data *priv;
+ struct rig_state *state;
+ int err;
+ char restore_commands[NEWCAT_DATA_LEN];
+ split_t is_split;
+
+ rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+
+ if (!rig)
+ {
+ return -RIG_EINVAL;
+ }
+
+ if (CACHE(rig)->modeMainB == tx_mode)
+ {
+ rig_debug(RIG_DEBUG_TRACE, "%s: mode %s already set on VFOB\n", __func__,
+ rig_strrmode(tx_mode));
+ return RIG_OK;
+ }
+
+ err = ftx1_get_tx_split(rig, &is_split);
+
+ if (err != RIG_OK)
+ {
+ return (err);
+ }
+
+ if (is_split == RIG_SPLIT_ON)
+ {
+ err = newcat_set_tx_vfo(rig, RIG_VFO_B);
+
+ if (err != RIG_OK)
+ {
+ return (err);
+ }
+ }
+
+
+ state = STATE(rig);
+
+ rig_debug(RIG_DEBUG_TRACE, "%s: passed vfo = %s\n", __func__,
+ rig_strvfo(vfo));
+ rig_debug(RIG_DEBUG_TRACE, "%s: passed mode = %s\n", __func__,
+ rig_strrmode(tx_mode));
+ rig_debug(RIG_DEBUG_TRACE, "%s: passed width = %d Hz\n", __func__,
+ (int)tx_width);
+
+ priv = (struct newcat_priv_data *)state->priv;
+
+ /* append VFO A mode restore command first as we want to minimize
+ any Rx glitches */
+ SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "MD0;");
+ rig_debug(RIG_DEBUG_TRACE, "cmd_str = %s\n", priv->cmd_str);
+
+ if (RIG_OK != (err = newcat_get_cmd(rig)))
+ {
+ return err;
+ }
+
+ SNPRINTF(restore_commands, sizeof(restore_commands), "AB;%.*s",
+ (int)sizeof(restore_commands) - 4, priv->ret_data);
+
+ /* append VFO B frequency restore command */
+ SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "FB;");
+ rig_debug(RIG_DEBUG_TRACE, "cmd_str = %s\n", priv->cmd_str);
+
+ if (RIG_OK != (err = newcat_get_cmd(rig)))
+ {
+ return err;
+ }
+
+ size_t len = strlen(restore_commands);
+ SNPRINTF(restore_commands + len, sizeof(restore_commands) - len, "%.*s",
+ (int)(sizeof(restore_commands) - len - 1), priv->ret_data);
+
+ /* Change mode on VFOA */
+ if (RIG_OK != (err = newcat_set_mode(rig, RIG_VFO_A, tx_mode,
+ RIG_PASSBAND_NOCHANGE)))
+ {
+ return err;
+ }
+
+ /* Send the copy VFO A to VFO B and restore commands */
+ SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "%s", restore_commands);
+ return newcat_set_cmd(rig);
+}
+
+static int ftx1_init(RIG *rig)
+{
+ int ret;
+
+ rig_debug(RIG_DEBUG_VERBOSE, "%s called, version %s\n", __func__,
+ rig->caps->version);
+
+ ret = newcat_init(rig);
+
+ if (ret != RIG_OK) { return ret; }
+
+ STATE(rig)->current_vfo = RIG_VFO_A;
+ return RIG_OK;
+}
+
+static int ftx1_find_current_vfo(RIG *rig, vfo_t *vfo, tone_t *enc_dec_mode,
+ rmode_t *mode)
+{
+ struct newcat_priv_data *priv = (struct newcat_priv_data *)STATE(rig)->priv;
+ ftx1info *info = (ftx1info *)priv->ret_data;
+ int err;
+
+ rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__);
+
+ SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "IF;");
+
+ /* Get info */
+ if (RIG_OK != (err = newcat_get_cmd(rig)))
+ {
+ return err;
+ }
+
+ debug_ftx1info_data(info);
+
+ if (enc_dec_mode != NULL)
+ {
+ *enc_dec_mode = info->tone_mode;
+ }
+
+ if (mode != NULL)
+ {
+ *mode = newcat_rmode(info->mode);
+ }
+
+ switch (info->vfo_memory)
+ {
+ case '1': // Memory
+ case '2': // Memory Tune
+ case '3': // Quick Memory
+ case '4': // Quick Memory Tune
+ *vfo = RIG_VFO_MEM;
+ break;
+
+ case '0': // VFO
+ *vfo = RIG_VFO_A;
+ break;
+
+ default:
+ rig_debug(RIG_DEBUG_BUG, "%s: unexpected vfo returned 0x%X\n",
+ __func__, info->vfo_memory);
+ return -RIG_EINTERNAL;
+ }
+
+ return RIG_OK;
+}
+
+static int ftx1_get_enabled_ctcss_dcs_mode(RIG *rig)
+{
+ struct newcat_priv_data *priv = (struct newcat_priv_data *)STATE(rig)->priv;
+ int err;
+
+ rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__);
+
+ SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "CT0;");
+
+ /* Get enabled mode */
+ if (RIG_OK != (err = newcat_get_cmd(rig)))
+ {
+ return err;
+ }
+
+ return priv->ret_data[3];
+}
+
+static int ftx1_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone)
+{
+ struct newcat_priv_data *priv = (struct newcat_priv_data *)STATE(rig)->priv;
+ int i;
+ ncboolean tone_match;
+
+ rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__);
+
+ for (i = 0, tone_match = FALSE; rig->caps->ctcss_list[i] != 0; i++)
+ {
+ if (tone == rig->caps->ctcss_list[i])
+ {
+ tone_match = TRUE;
+ break;
+ }
+ }
+
+ rig_debug(RIG_DEBUG_TRACE, "%s: tone = %u, tone_match = %d, i = %d\n",
+ __func__, tone, tone_match, i);
+
+ if (tone_match == FALSE && tone != 0)
+ {
+ return -RIG_EINVAL;
+ }
+
+ if (tone == 0) /* turn off ctcss */
+ {
+ SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "CT00;");
+ }
+ else
+ {
+ SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "CN00%3.3d;CT02;", i);
+ }
+
+ return newcat_set_cmd(rig);
+}
+
+static int ftx1_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone)
+{
+ struct newcat_priv_data *priv = (struct newcat_priv_data *)STATE(rig)->priv;
+ int ret;
+ int t;
+ int ret_data_len;
+ tone_t enc_dec_mode;
+ rmode_t rmode;
+ char *retlvl;
+
+ rig_debug(RIG_DEBUG_TRACE, "%s called with vfo %s\n",
+ __func__, rig_strvfo(vfo));
+
+ *tone = 0;
+
+ ret = ftx1_find_current_vfo(rig, &vfo, &enc_dec_mode, &rmode);
+
+ if (ret < 0)
+ {
+ return ret;
+ }
+
+ rig_debug(RIG_DEBUG_TRACE, "%s current vfo is %s\n",
+ __func__, rig_strvfo(vfo));
+
+ if (rmode != RIG_MODE_FM && rmode != RIG_MODE_FMN && rmode != RIG_MODE_C4FM)
+ {
+ return RIG_OK;
+ }
+
+ if ((enc_dec_mode == '0') || // CTCSS and DCS Disabled
+ (enc_dec_mode == '3') || // DCS Encode and Decode Enabled
+ (enc_dec_mode == '4')) // DCS Encode only
+ {
+ return RIG_OK; // Any of the above not CTCSS return 0
+ }
+
+ /* Get CTCSS TONE */
+ SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "CN00;");
+
+ if (RIG_OK != (ret = newcat_get_cmd(rig)))
+ {
+ return ret;
+ }
+
+ ret_data_len = strlen(priv->ret_data);
+
+ /* skip command */
+ retlvl = priv->ret_data + strlen(priv->cmd_str) - 1;
+ /* chop term */
+ priv->ret_data[ret_data_len - 1] = '\0';
+
+ t = atoi(retlvl); /* tone index */
+
+ rig_debug(RIG_DEBUG_TRACE, "%s ctcss code %d\n", __func__, t);
+
+ if (t < 0 || t > 49)
+ {
+ return -RIG_EINVAL;
+ }
+
+ *tone = rig->caps->ctcss_list[t];
+
+ return RIG_OK;
+}
+
+static int ftx1_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone)
+{
+ struct newcat_priv_data *priv = (struct newcat_priv_data *)STATE(rig)->priv;
+ int err;
+ rmode_t rmode;
+
+ rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__);
+
+ err = ftx1_find_current_vfo(rig, &vfo, NULL, &rmode);
+
+ if (err != RIG_OK)
+ {
+ return err;
+ }
+
+ if (rmode != RIG_MODE_FM && rmode != RIG_MODE_FMN && rmode != RIG_MODE_C4FM)
+ {
+ return -RIG_EINVAL; // Invalid mode for setting ctcss
+ }
+
+ if (tone == 0)
+ {
+ SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "CT00;");
+ }
+ else
+ {
+ int i;
+ ncboolean tone_match;
+
+ for (i = 0, tone_match = FALSE; rig->caps->ctcss_list[i] != 0; i++)
+ {
+ if (tone == rig->caps->ctcss_list[i])
+ {
+ tone_match = TRUE;
+ break;
+ }
+ }
+
+ if (tone_match == FALSE)
+ {
+ return -RIG_EINVAL; // Tone not on the list
+ }
+
+ SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "CN0%3.3d;CT01;", i);
+ }
+
+ return newcat_set_cmd(rig);
+}
+
+static int ftx1_get_ctcss_sql(RIG *rig, vfo_t vfo, tone_t *tone)
+{
+ struct newcat_priv_data *priv = (struct newcat_priv_data *)STATE(rig)->priv;
+ int ret;
+ int t;
+ int ret_data_len;
+ char *retlvl;
+
+ rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__);
+
+ *tone = 0;
+
+ ret = ftx1_get_enabled_ctcss_dcs_mode(rig);
+
+ if (ret < 0)
+ {
+ return ret;
+ }
+
+ if (ret != '1') // If not CTCSS Encode and Decode return tone of zero.
+ {
+ return RIG_OK;
+ }
+
+ /* Get CTCSS TONE */
+ SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "CN00;");
+
+ if (RIG_OK != (ret = newcat_get_cmd(rig)))
+ {
+ return ret;
+ }
+
+ ret_data_len = strlen(priv->ret_data);
+
+ /* skip command */
+ retlvl = priv->ret_data + strlen(priv->cmd_str) - 1;
+ /* chop term */
+ priv->ret_data[ret_data_len - 1] = '\0';
+
+ t = atoi(retlvl); /* tone index */
+
+ rig_debug(RIG_DEBUG_TRACE, "%s ctcss code %d\n", __func__, t);
+
+ if (t < 0 || t > 49)
+ {
+ return -RIG_EINVAL;
+ }
+
+ *tone = rig->caps->ctcss_list[t];
+
+ return RIG_OK;
+}
+
+static int ftx1_get_dcs_code(RIG *rig, vfo_t vfo, tone_t *code)
+{
+ struct newcat_priv_data *priv = (struct newcat_priv_data *)STATE(rig)->priv;
+ int err;
+ int t;
+ tone_t enc_dec_mode;
+ rmode_t rmode;
+ int ret_data_len;
+ char *retlvl;
+
+ rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__);
+
+ *code = 0;
+
+ err = ftx1_find_current_vfo(rig, &vfo, &enc_dec_mode, &rmode);
+
+ if (err < 0)
+ {
+ return err;
+ }
+
+ rig_debug(RIG_DEBUG_TRACE, "%s current vfo is %s\n",
+ __func__, rig_strvfo(vfo));
+
+ if (rmode != RIG_MODE_FM && rmode != RIG_MODE_FMN && rmode != RIG_MODE_C4FM)
+ {
+ return RIG_OK;
+ }
+
+ if ((enc_dec_mode == '0') || // Encode off
+ (enc_dec_mode == '1') || // CTCSS Encode and Decode
+ (enc_dec_mode == '2')) // CTCSS Encode Only
+ {
+ return RIG_OK; // Any of the above not DCS return 0
+ }
+
+ SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "CN01;");
+
+ /* Get DCS code */
+ if (RIG_OK != (err = newcat_get_cmd(rig)))
+ {
+ return err;
+ }
+
+ ret_data_len = strlen(priv->ret_data);
+
+ /* skip command */
+ retlvl = priv->ret_data + strlen(priv->cmd_str) - 1;
+ /* chop term */
+ priv->ret_data[ret_data_len - 1] = '\0';
+
+ t = atoi(retlvl); /* code index */
+
+ if (t < 0 || t > 103)
+ {
+ return -RIG_EINVAL;
+ }
+
+ *code = rig->caps->dcs_list[t];
+
+ rig_debug(RIG_DEBUG_TRACE, "%s dcs code %u\n", __func__, *code);
+
+ return RIG_OK;
+}
+
+static int ftx1_set_dcs_code(RIG *rig, vfo_t vfo, tone_t code)
+{
+ struct newcat_priv_data *priv = (struct newcat_priv_data *)STATE(rig)->priv;
+ int i;
+ ncboolean code_match;
+
+ rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__);
+
+ for (i = 0, code_match = FALSE; rig->caps->dcs_list[i] != 0; i++)
+ {
+ if (code == rig->caps->dcs_list[i])
+ {
+ code_match = TRUE;
+ break;
+ }
+ }
+
+ rig_debug(RIG_DEBUG_TRACE, "%s: code = %u, code_match = %d, i = %d\n",
+ __func__, code, code_match, i);
+
+ if (code_match == FALSE && code != 0)
+ {
+ return -RIG_EINVAL;
+ }
+
+ if (code == 0) /* turn off dcs */
+ {
+ SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "CT00;");
+ }
+ else
+ {
+ SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "CN01%3.3d;CT04;", i);
+ }
+
+ return newcat_set_cmd(rig);
+}
+
+static int ftx1_set_dcs_sql(RIG *rig, vfo_t vfo, tone_t code)
+{
+ struct newcat_priv_data *priv = (struct newcat_priv_data *)STATE(rig)->priv;
+ int i;
+ ncboolean code_match;
+
+ rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__);
+
+ for (i = 0, code_match = FALSE; rig->caps->dcs_list[i] != 0; i++)
+ {
+ if (code == rig->caps->dcs_list[i])
+ {
+ code_match = TRUE;
+ break;
+ }
+ }
+
+ rig_debug(RIG_DEBUG_TRACE, "%s: code = %u, code_match = %d, i = %d\n",
+ __func__, code, code_match, i);
+
+ if (code_match == FALSE && code != 0)
+ {
+ return -RIG_EINVAL;
+ }
+
+ if (code == 0) /* turn off dcs */
+ {
+ SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "CT00;");
+ }
+ else
+ {
+ SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "CN01%3.3d;CT03;", i);
+ }
+
+ return newcat_set_cmd(rig);
+}
+
+static int ftx1_get_dcs_sql(RIG *rig, vfo_t vfo, tone_t *code)
+{
+ struct newcat_priv_data *priv = (struct newcat_priv_data *)STATE(rig)->priv;
+ int codeindex;
+ int ret;
+ int ret_data_len;
+ char *retlvl;
+
+ rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__);
+
+ *code = 0;
+
+ ret = ftx1_get_enabled_ctcss_dcs_mode(rig);
+
+ if (ret < 0)
+ {
+ return ret;
+ }
+
+ if (ret != '3')
+ {
+ return RIG_OK; // If not DCS Encode and Decode return zero.
+ }
+
+ /* Get DCS CODE */
+ SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "CN01;");
+
+ if (RIG_OK != (ret = newcat_get_cmd(rig)))
+ {
+ return ret;
+ }
+
+ ret_data_len = strlen(priv->ret_data);
+
+ /* skip command */
+ retlvl = priv->ret_data + strlen(priv->cmd_str) - 1;
+ /* chop term */
+ priv->ret_data[ret_data_len - 1] = '\0';
+
+ codeindex = atoi(retlvl); /* code index */
+
+ rig_debug(RIG_DEBUG_TRACE, "%s dcs code %d\n", __func__, codeindex);
+
+ if (codeindex < 0 || codeindex > 103)
+ {
+ return -RIG_EINVAL;
+ }
+
+ *code = rig->caps->dcs_list[codeindex];
+
+ return RIG_OK;
+}
+
+// VFO functions so rigctld can be used without --vfo argument
+static int ftx1_set_vfo(RIG *rig, vfo_t vfo)
+{
+ STATE(rig)->current_vfo = vfo;
+ RETURNFUNC2(RIG_OK);
+}
+
+static int ftx1_get_vfo(RIG *rig, vfo_t *vfo)
+{
+ *vfo = STATE(rig)->current_vfo;
+ RETURNFUNC2(RIG_OK);
+}
\ No newline at end of file
diff --git a/rigs/yaesu/ftx1.h b/rigs/yaesu/ftx1.h
new file mode 100644
index 000000000..142d93b46
--- /dev/null
+++ b/rigs/yaesu/ftx1.h
@@ -0,0 +1,195 @@
+/*
+ * hamlib - (C) Frank Singleton 2000 (javabear at users.sourceforge.net)
+ *
+ * ftx1.h - (C) Jeremy Miller KO4SSD 2025 (ko4ssd at ko4ssd.com)
+ *
+ * This shared library provides an API for communicating
+ * via USB interface to an FTX-1 using the "CAT" interface
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+
+#ifndef _FTX1_H
+#define _FTX1_H 1
+
+#define FTX1_VFO_ALL (RIG_VFO_A|RIG_VFO_B|RIG_VFO_MEM)
+
+/* Receiver caps */
+
+#define FTX1_ALL_RX_MODES (RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_CWR|RIG_MODE_SSB|\
+ RIG_MODE_RTTY|RIG_MODE_RTTYR|RIG_MODE_PKTLSB|RIG_MODE_PKTUSB|RIG_MODE_PKTFM|\
+ RIG_MODE_C4FM|RIG_MODE_FM|RIG_MODE_AMN|RIG_MODE_FMN)
+#define FTX1_SSB_CW_RX_MODES (RIG_MODE_CW|RIG_MODE_CWR|RIG_MODE_SSB|\
+ RIG_MODE_RTTY|RIG_MODE_RTTYR|RIG_MODE_PKTLSB|RIG_MODE_PKTUSB)
+#define FTX1_AM_RX_MODES (RIG_MODE_AM|RIG_MODE_AMN)
+#define FTX1_FM_WIDE_RX_MODES (RIG_MODE_FM|RIG_MODE_PKTFM|RIG_MODE_C4FM)
+#define FTX1_FM_RX_MODES (FTX1_FM_WIDE_RX_MODES|RIG_MODE_FMN)
+#define FTX1_CW_RX_MODES (RIG_MODE_CW|RIG_MODE_CWR)
+#define FTX1_RTTY_DATA_RX_MODES (RIG_MODE_RTTY|RIG_MODE_RTTYR|RIG_MODE_PKTUSB|RIG_MODE_PKTLSB)
+
+/* TRX caps */
+
+#define FTX1_OTHER_TX_MODES (RIG_MODE_CW|RIG_MODE_USB|RIG_MODE_LSB|RIG_MODE_PKTUSB|RIG_MODE_PKTLSB|\
+ RIG_MODE_FM|RIG_MODE_PKTFM|RIG_MODE_FMN) /* 100 W class */
+#define FTX1_AM_TX_MODES (RIG_MODE_AM|RIG_MODE_AMN) /* set 25W max */
+
+#define FTX1_LEVELS (RIG_LEVEL_ATT|RIG_LEVEL_PREAMP|RIG_LEVEL_STRENGTH|\
+ RIG_LEVEL_ALC|RIG_LEVEL_RAWSTR|RIG_LEVEL_STRENGTH|RIG_LEVEL_SWR|\
+ RIG_LEVEL_RFPOWER|RIG_LEVEL_RF|RIG_LEVEL_SQL|\
+ RIG_LEVEL_MICGAIN|RIG_LEVEL_IF|RIG_LEVEL_CWPITCH|\
+ RIG_LEVEL_KEYSPD|RIG_LEVEL_AF|RIG_LEVEL_AGC|\
+ RIG_LEVEL_METER|RIG_LEVEL_BKINDL|RIG_LEVEL_BKIN_DLYMS|RIG_LEVEL_SQL|\
+ RIG_LEVEL_VOXGAIN|RIG_LEVEL_VOXDELAY|RIG_LEVEL_COMP|\
+ RIG_LEVEL_ANTIVOX|RIG_LEVEL_NR|RIG_LEVEL_NB|RIG_LEVEL_NOTCHF|\
+ RIG_LEVEL_MONITOR_GAIN|RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_RFPOWER_METER_WATTS|\
+ RIG_LEVEL_COMP_METER|RIG_LEVEL_VD_METER|RIG_LEVEL_ID_METER|\
+ RIG_LEVEL_BAND_SELECT)
+
+#define FTX1_FUNCS (RIG_FUNC_TONE|RIG_FUNC_TSQL|RIG_FUNC_CSQL|RIG_FUNC_LOCK|\
+ RIG_FUNC_MON|RIG_FUNC_NB|RIG_FUNC_NR|RIG_FUNC_VOX|\
+ RIG_FUNC_FBKIN|RIG_FUNC_COMP|RIG_FUNC_ANF|RIG_FUNC_MN|\
+ RIG_FUNC_RIT|RIG_FUNC_XIT|\
+ RIG_FUNC_TUNER|RIG_FUNC_APF)
+
+#define FTX1_VFO_OPS (RIG_OP_TUNE|RIG_OP_CPY|RIG_OP_XCHG|\
+ RIG_OP_UP|RIG_OP_DOWN|RIG_OP_BAND_UP|RIG_OP_BAND_DOWN|\
+ RIG_OP_TO_VFO|RIG_OP_FROM_VFO)
+
+// Borrowed from FLRig -- Thanks to Dave W1HKJ
+#define FTX1_RFPOWER_METER_CAL \
+ { \
+ 7, \
+ { \
+ {0, 0.0f}, \
+ {10, 0.8f}, \
+ {50, 8.0f}, \
+ {100, 26.0f}, \
+ {150, 54.0f}, \
+ {200, 92.0f}, \
+ {250, 140.0f}, \
+ } \
+ }
+
+/* TBC */
+#define FTX1_STR_CAL { 16, \
+ { \
+ { 0, -54 }, /* S0 */ \
+ { 12, -48 }, /* S1 */ \
+ { 27, -42 }, /* S2 */ \
+ { 40, -36 }, /* S3 */ \
+ { 55, -30 }, /* S4 */ \
+ { 65, -24 }, /* S5 */ \
+ { 80, -18 }, /* S6 */ \
+ { 95, -12 }, /* S7 */ \
+ { 112, -6 }, /* S8 */ \
+ { 130, 0 }, /* S9 */ \
+ { 150, 10 }, /* +10 */ \
+ { 172, 20 }, /* +20 */ \
+ { 190, 30 }, /* +30 */ \
+ { 220, 40 }, /* +40 */ \
+ { 240, 50 }, /* +50 */ \
+ { 255, 60 }, /* +60 */ \
+ } }
+
+
+#define FTX1_ID_CAL { 7, \
+ { \
+ { 0, 0.0f }, \
+ { 53, 5.0f }, \
+ { 65, 6.0f }, \
+ { 78, 7.0f }, \
+ { 86, 8.0f }, \
+ { 98, 9.0f }, \
+ { 107, 10.0f } \
+ } \
+}
+
+/* TBC */
+#define FTX1_VD_CAL { 2, \
+ { \
+ { 0, 0.0f }, \
+ { 192, 13.8f }, \
+ } \
+}
+
+#define FTX1_COMP_CAL { 9, \
+ { \
+ { 0, 0.0f }, \
+ { 40, 2.5f }, \
+ { 60, 5.0f }, \
+ { 85, 7.5f }, \
+ { 135, 10.0f }, \
+ { 150, 12.5f }, \
+ { 175, 15.0f }, \
+ { 195, 17.5f }, \
+ { 220, 20.0f } \
+ } \
+}
+
+/*
+ * Other features (used by rig_caps)
+ *
+ */
+
+// The FTX1 does not have antenna selection
+#define FTX1_ANTS (RIG_ANT_CURR)
+
+#define FTX1_MEM_CHNL_LENGTH 1 /* 0x10 P1 = 01 return size */
+#define FTX1_OP_DATA_LENGTH 19 /* 0x10 P1 = 03 return size */
+#define FTX1_VFO_DATA_LENGTH 18 /* 0x10 P1 = 03 return size -- A & B returned */
+#define FTX1_MEM_CHNL_DATA_LENGTH 19 /* 0x10 P1 = 04, P4 = 0x01-0x20 return size */
+#define FTX1_STATUS_FLAGS_LENGTH 5 /* 0xf7, 0xfa return size */
+#define FTX1_ALL_DATA_LENGTH 649 /* 0x10 P1 = 00 return size */
+
+/* Timing values in mS */
+
+// #define FTX1_PACING_INTERVAL 5
+// #define FTX1_PACING_DEFAULT_VALUE 0
+
+/* Delay between bytes sent to FTX-1
+ * Should not exceed value set in CAT TOT menu (rig default is 10 mSec)
+ */
+#define FTX1_WRITE_DELAY 0
+
+
+/* Delay sequential fast writes */
+
+#define FTX1_POST_WRITE_DELAY 2
+
+typedef struct
+{
+ char command[2]; /* depends on command "IF", "MR", "MW" "OI" */
+ char memory_ch[3]; /* 001 -> 117 */
+ char vfo_freq[9]; /* 9 digit value in Hz */
+ char clarifier[5]; /* '+' | '-', 0000 -> 9999 Hz */
+ char rx_clarifier; /* '0' = off, '1' = on */
+ char tx_clarifier; /* '0' = off, '1' = on */
+ char mode; /* '1'=LSB, '2'=USB, '3'=CW, '4'=FM, '5'=AM, */
+ /* '6'=RTTY-LSB, '7'=CW-R, '8'=DATA-LSB, */
+ /* '9'=RTTY-USB,'A'=DATA-FM, 'B'=FM-N, */
+ /* 'C'=DATA-USB, 'D'=AM-N, 'E'=C4FM */
+ char vfo_memory; /* '0'=VFO, '1'=Memory, '2'=Memory Tune, */
+ /* '3'=Quick Memory Bank, '4'=QMB-MT, '5'=PMS, '6'=HOME */
+ char tone_mode; /* '0' = off, CTCSS '1' ENC, '2' ENC/DEC, */
+ /* '3' = DCS ENC/DEC, '4' = ENC */
+ char fixed[2]; /* Always '0', '0' */
+ char repeater_offset; /* '0' = Simplex, '1' Plus, '2' minus */
+ char terminator; /* ';' */
+} ftx1info;
+
+#endif /* _FTX1_H */
\ No newline at end of file
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index 82ed2caf7..30613bec1 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -71,6 +71,7 @@ typedef enum nc_rigid_e
NC_RIGID_FTDX101D = 681,
NC_RIGID_FTDX101MP = 682,
NC_RIGID_FT710 = 800,
+ NC_RIGID_FTX1 = 840,
} nc_rigid_t;
@@ -95,6 +96,7 @@ typedef struct _yaesu_newcat_commands
ncboolean ftdx10;
ncboolean ft101mp;
ncboolean ft710;
+ ncboolean ftx1;
ncboolean ft9000Old;
} yaesu_newcat_commands_t;
@@ -225,6 +227,7 @@ static ncboolean is_ftdx3000dm;
static ncboolean is_ftdx101d;
static ncboolean is_ftdx101mp;
static ncboolean is_ftdx10;
+static ncboolean is_ftx1;
static ncboolean is_ftdx9000Old;
/*
@@ -245,10 +248,10 @@ static ncboolean is_ftdx9000Old;
*/
static const yaesu_newcat_commands_t valid_commands[] =
{
- /* Command FT-450 FT-950 FT-891 FT-991 FT-2000 FT-9000 FT-5000 FT-1200 FT-3000 FTDX101D FTDX10 FTDX101MP FT710 FT9000Old*/
- {"AB", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
- {"AC", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
- {"AG", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
+ /* Command FT-450 FT-950 FT-891 FT-991 FT-2000 FT-9000 FT-5000 FT-1200 FT-3000 FTDX101D FTDX10 FTDX101MP FT710 FTX1 FT9000Old*/
+ {"AB", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
+ {"AC", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
+ {"AG", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
{"AI", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
{"AM", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE },
{"AN", FALSE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, FALSE, TRUE },
@@ -519,6 +522,7 @@ int newcat_init(RIG *rig)
is_ftdx101mp = newcat_is_rig(rig, RIG_MODEL_FTDX101MP);
is_ftdx10 = newcat_is_rig(rig, RIG_MODEL_FTDX10);
is_ft710 = newcat_is_rig(rig, RIG_MODEL_FT710);
+ is_ftx1 = newcat_is_rig(rig, RIG_MODEL_FTX1);
RETURNFUNC(RIG_OK);
}
@@ -8167,7 +8171,7 @@ ncboolean newcat_valid_command(RIG *rig, char const *const command)
if (!is_ft450 && !is_ft950 && !is_ft891 && !is_ft991 && !is_ft2000
&& !is_ftdx5000 && !is_ftdx9000 && !is_ftdx1200 && !is_ftdx3000 && !is_ftdx101d
- && !is_ftdx101mp && !is_ftdx10 && !is_ft710)
+ && !is_ftdx101mp && !is_ftdx10 && !is_ft710 && !is_ftx1)
{
rig_debug(RIG_DEBUG_ERR, "%s: '%s' is unknown\n", __func__, caps->model_name);
RETURNFUNC2(FALSE);
@@ -8258,6 +8262,10 @@ ncboolean newcat_valid_command(RIG *rig, char const *const command)
{
RETURNFUNC2(TRUE);
}
+ else if (is_ftx1 && valid_commands[search_index].ftx1)
+ {
+ RETURNFUNC2(TRUE);
+ }
else
{
rig_debug(RIG_DEBUG_TRACE, "%s: '%s' command '%s' not supported\n",
diff --git a/rigs/yaesu/yaesu.c b/rigs/yaesu/yaesu.c
index eb27487e0..ac9923ab6 100644
--- a/rigs/yaesu/yaesu.c
+++ b/rigs/yaesu/yaesu.c
@@ -112,6 +112,7 @@ DECLARE_INITRIG_BACKEND(yaesu)
rig_register(&vx1700_caps);
rig_register(&ftdx1200_caps);
rig_register(&ft991_caps);
+ rig_register(&ftx1_caps);
rig_register(&ft891_caps);
rig_register(&ft847uni_caps);
rig_register(&ftdx101d_caps);
diff --git a/rigs/yaesu/yaesu.h b/rigs/yaesu/yaesu.h
index 088943620..049e2f678 100644
--- a/rigs/yaesu/yaesu.h
+++ b/rigs/yaesu/yaesu.h
@@ -69,6 +69,7 @@ extern struct rig_caps ft980_caps;
extern struct rig_caps ft990_caps;
extern struct rig_caps ft990uni_caps;
extern struct rig_caps ft991_caps;
+extern struct rig_caps ftx1_caps;
extern struct rig_caps ft1000mp_caps;
extern struct rig_caps ft1000mpmkv_caps;
extern struct rig_caps ft1000mpmkvfld_caps;
-----------------------------------------------------------------------
Summary of changes:
NEWS | 1 +
include/hamlib/riglist.h | 1 +
rigs/yaesu/Makefile.am | 3 +-
rigs/yaesu/{ft991.c => ftx1.c} | 299 ++++++++++++++++++++---------------------
rigs/yaesu/{ft991.h => ftx1.h} | 75 +++++------
rigs/yaesu/newcat.c | 18 ++-
rigs/yaesu/yaesu.c | 1 +
rigs/yaesu/yaesu.h | 1 +
8 files changed, 204 insertions(+), 195 deletions(-)
copy rigs/yaesu/{ft991.c => ftx1.c} (76%)
copy rigs/yaesu/{ft991.h => ftx1.h} (69%)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: n0nb <n0...@us...> - 2025-07-10 02:22:29
|
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 0db57035d50880893305d45ef5adbd538f0c401e (commit)
from 48e7bd734a6aaedd5fd74e214426dc3347835f48 (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 0db57035d50880893305d45ef5adbd538f0c401e
Author: Nate Bargmann <n0...@n0...>
Date: Wed Jul 9 21:21:24 2025 -0500
Update NEWS for AF6SA WRC rotator backend
diff --git a/NEWS b/NEWS
index c98fe66bb..fb2b8b565 100644
--- a/NEWS
+++ b/NEWS
@@ -28,6 +28,7 @@ Version 4.7.0
* Separate PMR-171 and Q900 into new the GUOHETEC backend, add
additional support add clean up code. (TNX FVsonar).
* New Drake R8 backend. (TNX Mark Fine)
+ * New AF6SA WRC rotator backend. (TNX Michael Morgan)
Version 4.6.3
* 2025-06-10
-----------------------------------------------------------------------
Summary of changes:
NEWS | 1 +
1 file changed, 1 insertion(+)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: n0nb <n0...@us...> - 2025-07-09 12:41: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 64babdb3615f71c92dcd341161fc0b2fcdde45e3 (commit)
via 61ad3cda1098411fa8636b4347a791fd975ffa55 (commit)
via 407d3f669b636f57990a095bb63f448f5b77dfdf (commit)
from b5ba3f45b8de53866d160a86911672812627ee1e (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 64babdb3615f71c92dcd341161fc0b2fcdde45e3
Merge: b5ba3f45b 61ad3cda1
Author: Nate Bargmann <n0...@n0...>
Date: Wed Jul 9 07:36:00 2025 -0500
Merge GitHub PR #1797
commit 61ad3cda1098411fa8636b4347a791fd975ffa55
Author: Daniele Forsi IU5HKX <iu...@gm...>
Date: Sun Jul 6 15:24:18 2025 +0200
Use Hamlib.rigerror2() to get the error message for the given error number
diff --git a/bindings/python/test_startup.py b/bindings/python/test_startup.py
index e4cfaf8c0..e38cc355d 100755
--- a/bindings/python/test_startup.py
+++ b/bindings/python/test_startup.py
@@ -31,7 +31,7 @@ class TestClass:
assert my_rig.get_conf("retry") == '5'
assert my_rig.error_status == Hamlib.RIG_OK
- assert Hamlib.rigerror(my_rig.error_status) == "Command completed successfully\n"
+ assert Hamlib.rigerror2(my_rig.error_status) == "Command completed successfully\n"
assert my_rig.set_freq(Hamlib.RIG_VFO_B, 5700000000) is None
assert my_rig.set_vfo(Hamlib.RIG_VFO_B) is None
commit 407d3f669b636f57990a095bb63f448f5b77dfdf
Author: Daniele Forsi IU5HKX <iu...@gm...>
Date: Sun Jul 6 14:58:41 2025 +0200
Revert "Fix debug messages shown even from disabled levels"
This reverts commit ae9556462a2989b8b97af0d6e320558ffa0e1f3e.
diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h
index a72e47474..c6421d324 100644
--- a/include/hamlib/rig.h
+++ b/include/hamlib/rig.h
@@ -3770,10 +3770,11 @@ extern HAMLIB_EXPORT_VAR(char) debugmsgsave2[DEBUGMSGSAVE_SIZE]; // last-1 debu
// debugmsgsave3 is deprecated
extern HAMLIB_EXPORT_VAR(char) debugmsgsave3[DEBUGMSGSAVE_SIZE]; // last-2 debug msg
#define rig_debug_clear() { debugmsgsave[0] = debugmsgsave2[0] = debugmsgsave3[0] = 0; };
-#if !defined(__cplusplus) && defined(__GNUC__)
-#define ATTRIBUTE_FORMAT_PRINTF __attribute__((__format__ (__printf__, 2, 3)))
-#else
-#define ATTRIBUTE_FORMAT_PRINTF
+#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,...) do { snprintf(debugmsgsave2,sizeof(debugmsgsave2),fmt,__VA_ARGS__);rig_debug(debug_level,fmt,##__VA_ARGS__); add2debugmsgsave(debugmsgsave2); } while(0)
+#endif
#endif
// Measuring elapsed time -- local variable inside function when macro is used
@@ -3785,7 +3786,7 @@ extern HAMLIB_EXPORT_VAR(char) debugmsgsave3[DEBUGMSGSAVE_SIZE]; // last-2 debu
extern HAMLIB_EXPORT(void)
rig_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level,
- const char *fmt, ...)) ATTRIBUTE_FORMAT_PRINTF;
+ const char *fmt, ...));
extern HAMLIB_EXPORT(vprintf_cb_t)
rig_set_debug_callback HAMLIB_PARAMS((vprintf_cb_t cb,
diff --git a/src/debug.c b/src/debug.c
index a57685535..de66c0879 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -202,6 +202,7 @@ void HAMLIB_API rig_set_debug_time_stamp(int flag)
* The formatted character string is passed to the `vfprintf`(3) C library
* call and follows its format specification.
*/
+#undef rig_debug
void HAMLIB_API rig_debug(enum rig_debug_level_e debug_level,
const char *fmt, ...)
{
-----------------------------------------------------------------------
Summary of changes:
bindings/python/test_startup.py | 2 +-
include/hamlib/rig.h | 11 ++++++-----
src/debug.c | 1 +
3 files changed, 8 insertions(+), 6 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: n0nb <n0...@us...> - 2025-07-09 12:32:20
|
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 b5ba3f45b8de53866d160a86911672812627ee1e (commit)
via f0b1c5bde2148c70f35eecec0e671e76e1fa8cd3 (commit)
via 6fade7fa33f306150d707d577b06e151b09d3e2d (commit)
via 256037296f3d6785a74e8f6877d78afa9b6da7f9 (commit)
via 84799e2f6c3da704a0877465b77cd3d9bc1dfe15 (commit)
via 976bfb42767019de50c8d29aebdbfdb933a88b01 (commit)
via 22636be85e7a33e42077860112b858ecdac79449 (commit)
via 54c2eb89a2fe75103c942596a6f81dbb71b4a0fc (commit)
via 8c94897208b2197c3fd2ec3eef138f66306065d4 (commit)
via 633cee04d2b78053c470c5d78ca92d2722ea4fbe (commit)
via 2fc0b8eef5e85cccf00c449c95a5405a78617038 (commit)
via 98489501fe80c32cf456c4bf962f628a4dc175ca (commit)
via 3706f365a545aa67ec4147cf9aa146ec40ace871 (commit)
via b96afa9372433735235895b4a2dddbedc2f54a74 (commit)
via e5e4ef84fe0b6811ac8bd6bc5307aa36c8a0c512 (commit)
via ec0a04669c3dd658d5b7fbe57ffc1af642a48552 (commit)
via f68c48aac54210e2bd1ee7ee2fd15401e8a201d2 (commit)
via b73d4a5cefda6f35331d39295e5c0263f7aa3576 (commit)
via 585d23ae5b25844c49e492eda21338d56ed5141b (commit)
via 419cb02dd5998c937fb6df3bd180b3d6c3dce00c (commit)
via 6433447e913eb865e655ab30a144363fcd04bbf7 (commit)
via 6a9f93a89e166fc3b293f18ba440986be40e6f43 (commit)
via bdde43f175692144e436e3d3bf1b23fd4c648925 (commit)
via 55805c90c91dbcab9270bf73616c9d9cd19afd23 (commit)
via e7daf11d5cdd05d6299fedbc8d18b40b6bfacf48 (commit)
via 49b01e196874961d64a60136cfe44c29c5c7ebd8 (commit)
via cb0646c7275eebe254b3da857b1f5791a59995d6 (commit)
via f4cebd5339ce813ab2eba541bc5eca835db240c1 (commit)
via d065bcb8ef0311ab21f85c8a7d1aec83db2c6cb1 (commit)
via 7a975784769b2b45605f7ecde22f4d49d15d40ba (commit)
via 6ac3dd596be40f5b2ea20d6316394fcf25a5f948 (commit)
via 48405744b534fbef90db88f63cf08fd09bd47a2f (commit)
via db863a69212291ea6acbb93eaff54d349a9b0cc1 (commit)
via 3ff4bc99cc843a014ff8bc55aba5be9653ca87a5 (commit)
via d32d605be67f46d75fd1185224ebb9606324ad6c (commit)
via 3b8a24179ee06a6dabc262284ad40fda805ef930 (commit)
via e1562e675feb19b302c445363af0fe791dd6b748 (commit)
via 03bf68c45925999af7aaf31af8f7cb01d1397f89 (commit)
via f94ec6a47b3b06f166a19d74cf34148342a9bea2 (commit)
via 83168860635dfba5bbb227a2a7dbe57b91b46d6a (commit)
from 0c94ba468ac1cd5e03de2e948784ad5e83bf5f11 (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 b5ba3f45b8de53866d160a86911672812627ee1e
Author: Nate Bargmann <n0...@n0...>
Date: Wed Jul 9 07:30:29 2025 -0500
Update NEWS for R8 backend
diff --git a/NEWS b/NEWS
index 8e7e076a8..c98fe66bb 100644
--- a/NEWS
+++ b/NEWS
@@ -27,6 +27,7 @@ Version 4.7.0
* Fix AGC for IC-R75, fix AGC for all Icom rigs. (TNX Mark Fine).
* Separate PMR-171 and Q900 into new the GUOHETEC backend, add
additional support add clean up code. (TNX FVsonar).
+ * New Drake R8 backend. (TNX Mark Fine)
Version 4.6.3
* 2025-06-10
commit f0b1c5bde2148c70f35eecec0e671e76e1fa8cd3
Merge: 6fade7fa3 256037296
Author: Nate Bargmann <n0...@n0...>
Date: Wed Jul 9 07:15:34 2025 -0500
Merge GitHub PR #1796
commit 6fade7fa33f306150d707d577b06e151b09d3e2d
Merge: 0c94ba468 84799e2f6
Author: Nate Bargmann <n0...@n0...>
Date: Mon Jul 7 18:37:54 2025 -0500
Merge GitHub PR #1795
commit 256037296f3d6785a74e8f6877d78afa9b6da7f9
Author: Mark J. Fine <mar...@fi...>
Date: Mon Jul 7 16:49:25 2025 -0400
Fixed typos and copyright attribution on drake.c and r8.c
diff --git a/rigs/drake/drake.c b/rigs/drake/drake.c
index 251cfccd1..3d00eb8cf 100644
--- a/rigs/drake/drake.c
+++ b/rigs/drake/drake.c
@@ -1,6 +1,6 @@
/*
* Hamlib Drake backend - main file
- * Copyright (c) 2001-2008 by Stephane Fillod
+ * Copyright (c) 2001-2008 by Stephane Fillod, 2025 Mark J. Fine
*
*
* This library is free software; you can redistribute it and/or
@@ -254,7 +254,7 @@ int drake_report_signal(RIG *rig, char* owner)
*
* inputs: rig - pointer to RIG structure
* freqbuf - buffer containung radio's response string
- * offset - offset to beginning of string due to differnces in R8 vs. R8A/B
+ * offset - offset to beginning of string due to differences in R8 vs. R8A/B
* Note: strings are virtually identical. offset is provided as a failsafe.
*
* Assumes rig!=NULL
@@ -332,7 +332,7 @@ int drake_report_frequency(RIG *rig, char* owner)
*
* inputs: rig - pointer to RIG structure
* mdbuf - buffer containung radio's response string
- * offset - offset to beginning of string due to differnces in R8 vs. R8A/B
+ * offset - offset to beginning of string due to differences in R8 vs. R8A/B
*
* Assumes rig!=NULL
*/
@@ -511,7 +511,7 @@ int drake_report_mode(RIG *rig, char* owner)
*
* inputs: rig - pointer to RIG structure
* mdbuf - buffer containung radio's response string
- * offset - offset to beginning of string due to differnces in R8 vs. R8A/B
+ * offset - offset to beginning of string due to differences in R8 vs. R8A/B
* Note: except for channel number size, strings are virtually identical. offset is provided as a failsafe.
*
* Assumes rig!=NULL
@@ -657,7 +657,7 @@ int drake_report_all(RIG *rig, char* owner)
drake_decode_frequency(rig, mdbuf, freq_offset);
// TODO handle channel name on R8A/B
- // TODO These models also have an additonal RN (Report Name) command for polling channel names that is not handled here
+ // TODO These models also have an additional RN (Report Name) command for polling channel names that is not handled here
return RIG_OK;
}
diff --git a/rigs/drake/r8.c b/rigs/drake/r8.c
index 09858b965..80cd81acd 100644
--- a/rigs/drake/r8.c
+++ b/rigs/drake/r8.c
@@ -1,6 +1,6 @@
/*
* Hamlib Drake backend - R-8 description
- * Copyright (c) 2001-2010, 2025 by Stephane Fillod
+ * Copyright (c) 2025 by Mark J. Fine
*
*
* This library is free software; you can redistribute it and/or
commit 84799e2f6c3da704a0877465b77cd3d9bc1dfe15
Author: Daniele Forsi IU5HKX <iu...@gm...>
Date: Sun Jul 6 19:44:43 2025 +0200
Revert "Install Lua for macOS in the CI"
This reverts commit 419cb02dd5998c937fb6df3bd180b3d6c3dce00c.
Conflicts:
.github/workflows/c-cpp.yml
diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml
index 169863e35..db7bdb037 100644
--- a/.github/workflows/c-cpp.yml
+++ b/.github/workflows/c-cpp.yml
@@ -67,7 +67,6 @@ jobs:
brew install automake
brew install libtool
brew install grep
- brew install lua
brew install swig
brew install tcl-tk
- name: bootstrap
commit 976bfb42767019de50c8d29aebdbfdb933a88b01
Author: Daniele Forsi IU5HKX <iu...@gm...>
Date: Sun Jul 6 19:42:10 2025 +0200
Remove the executable bit from data files
diff --git a/doc/manuals/OTRSP_Protocol.pdf b/doc/manuals/OTRSP_Protocol.pdf
old mode 100755
new mode 100644
diff --git a/rigs/yaesu/FT-817CAT.pdf b/rigs/yaesu/FT-817CAT.pdf
old mode 100755
new mode 100644
diff --git a/rigs/yaesu/FT-817MemoryMap.pdf b/rigs/yaesu/FT-817MemoryMap.pdf
old mode 100755
new mode 100644
diff --git a/rotators/grbltrk/Makefile.am b/rotators/grbltrk/Makefile.am
old mode 100755
new mode 100644
diff --git a/security/AESStringCrypt.h b/security/AESStringCrypt.h
old mode 100755
new mode 100644
diff --git a/security/Makefile.nt b/security/Makefile.nt
old mode 100755
new mode 100644
diff --git a/security/aes.h b/security/aes.h
old mode 100755
new mode 100644
diff --git a/security/password.h b/security/password.h
old mode 100755
new mode 100644
diff --git a/security/sha256.h b/security/sha256.h
old mode 100755
new mode 100644
diff --git a/src/Makefile.am b/src/Makefile.am
old mode 100755
new mode 100644
diff --git a/src/version_dll.rc b/src/version_dll.rc
old mode 100755
new mode 100644
commit 22636be85e7a33e42077860112b858ecdac79449
Author: Mark J. Fine <mar...@fi...>
Date: Sat Jul 5 17:11:33 2025 -0400
Commented out the embedded debugging (WARN level) that echoes all transaction data.
diff --git a/rigs/drake/drake.c b/rigs/drake/drake.c
index a247a9734..251cfccd1 100644
--- a/rigs/drake/drake.c
+++ b/rigs/drake/drake.c
@@ -227,7 +227,7 @@ int drake_report_signal(RIG *rig, char* owner)
//char testbuf[5] = {'2', '5', '5', 0x0d, 0x0a };
- drake_trans_rept(owner, "RSS" EOM, 4, lvlbuf, lvl_len, retval);
+ //drake_trans_rept(owner, "RSS" EOM, 4, lvlbuf, lvl_len, retval);
if (retval != RIG_OK)
{
@@ -306,7 +306,7 @@ int drake_report_frequency(RIG *rig, char* owner)
//char testbuf[15] = {' ', '1', '5', '.', '0', '0', '0', '0', '0', '#', 'm', 'H', 'z', 0x0d, 0x0a };
- drake_trans_rept(owner, "RF" EOM, 3, freqbuf, freq_len, retval);
+ //drake_trans_rept(owner, "RF" EOM, 3, freqbuf, freq_len, retval);
if (retval != RIG_OK)
{
@@ -472,7 +472,7 @@ int drake_report_mode(RIG *rig, char* owner)
//r8a/b - TODO Seems to be undocumented extra character at beginning of string, pushing everything to the right
//char testbuf[8] = {'?','2','0','2','<','8', 0x0d, 0x0a}; //NB off, AGC fast, RF off, MN off, ant 1, AM mode, 6.0 bw, VFOA, sync off, not scanning
- drake_trans_rept(owner, "RM" EOM, 3, mdbuf, mdbuf_len, retval);
+ //drake_trans_rept(owner, "RM" EOM, 3, mdbuf, mdbuf_len, retval);
if (rig->caps->rig_model == RIG_MODEL_DKR8)
{
@@ -561,7 +561,7 @@ int drake_report_mem_channel(RIG *rig, char* owner)
// r8a/b 000 - 439
//char testbuf[6] = {' ','0','0','0', 0x0d, 0x0a };
- drake_trans_rept(owner, "RC" EOM, 3, mdbuf, mdbuf_len, retval);
+ //drake_trans_rept(owner, "RC" EOM, 3, mdbuf, mdbuf_len, retval);
if (rig->caps->rig_model == RIG_MODEL_DKR8)
{
@@ -621,7 +621,7 @@ int drake_report_all(RIG *rig, char* owner)
// r8a/b - TODO Note 7-char channel name that eitehr starts at [25] or [26]
//char testbuf[35] = {' ','0','0','0',' ','2','0','2','<','8',' ',' ','1','5','.','0','0','0','0','0','#','m','H','z',' ','M','E','M','N','A','M','E',' ', 0x0d, 0x0a };
- drake_trans_rept(owner, "RA" EOM, 3, mdbuf, mdbuf_len, retval);
+ //drake_trans_rept(owner, "RA" EOM, 3, mdbuf, mdbuf_len, retval);
if (rig->caps->rig_model == RIG_MODEL_DKR8)
{
@@ -787,7 +787,7 @@ int drake_set_vfo(RIG *rig, vfo_t vfo)
retval = drake_transaction(rig, cmdbuf, strlen(cmdbuf), ackbuf, &ack_len);
- drake_trans_rept("drake_set_vfo", cmdbuf, strlen(cmdbuf), ackbuf, ack_len, retval);
+ //drake_trans_rept("drake_set_vfo", cmdbuf, strlen(cmdbuf), ackbuf, ack_len, retval);
return retval;
}
@@ -852,7 +852,7 @@ int drake_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
retval = drake_transaction(rig, mdbuf, strlen(mdbuf), ackbuf, &ack_len);
- drake_trans_rept("drake_set_mode", mdbuf, strlen(mdbuf), ackbuf, ack_len, retval);
+ //drake_trans_rept("drake_set_mode", mdbuf, strlen(mdbuf), ackbuf, ack_len, retval);
if (retval != RIG_OK)
{
@@ -894,7 +894,7 @@ int drake_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
SNPRINTF((char *) mdbuf, sizeof(mdbuf), "W%c" EOM, width_sel);
retval = drake_transaction(rig, mdbuf, strlen(mdbuf), ackbuf, &ack_len);
- drake_trans_rept("drake_set_bw", mdbuf, strlen(mdbuf), ackbuf, ack_len, retval);
+ //drake_trans_rept("drake_set_bw", mdbuf, strlen(mdbuf), ackbuf, ack_len, retval);
}
}
@@ -907,7 +907,7 @@ int drake_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
(mode == RIG_MODE_ECSSLSB)) ? 'O' : 'F');
retval = drake_transaction(rig, mdbuf, strlen(mdbuf), ackbuf, &ack_len);
- drake_trans_rept("drake_set_synch", mdbuf, strlen(mdbuf), ackbuf, ack_len, retval);
+ //drake_trans_rept("drake_set_synch", mdbuf, strlen(mdbuf), ackbuf, ack_len, retval);
}
return retval;
@@ -951,7 +951,7 @@ int drake_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option)
retval = drake_transaction(rig, buf, strlen(buf), ackbuf, &ack_len);
- drake_trans_rept("drake_set_ant", buf, strlen(buf), ackbuf, ack_len, retval);
+ //drake_trans_rept("drake_set_ant", buf, strlen(buf), ackbuf, ack_len, retval);
return retval;
}
@@ -1004,7 +1004,7 @@ int drake_set_mem(RIG *rig, vfo_t vfo, int ch)
ack_len = 0; // fix compile-time warning "possibly uninitialized"
retval = drake_transaction(rig, buf, strlen(buf), ackbuf, &ack_len);
- drake_trans_rept("drake_set_mem", buf, strlen(buf), ackbuf, ack_len, retval);
+ //drake_trans_rept("drake_set_mem", buf, strlen(buf), ackbuf, ack_len, retval);
if (ack_len != 2)
{
@@ -1105,7 +1105,7 @@ int drake_set_chan(RIG *rig, vfo_t vfo, const channel_t *chan)
retval = 0;
}*/
- drake_trans_rept("drake_set_chan", mdbuf, strlen(mdbuf), ackbuf, ack_len, retval);
+ //drake_trans_rept("drake_set_chan", mdbuf, strlen(mdbuf), ackbuf, ack_len, retval);
if (old_vfo == RIG_VFO_MEM)
{
@@ -1280,8 +1280,8 @@ int drake_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op)
retval = drake_transaction(rig, buf, len, buf[len - 1] == 0x0d ? ackbuf : NULL,
buf[len - 1] == 0x0d ? &ack_len : NULL);
- drake_trans_rept("drake_vfo_op", buf, len, buf[len - 1] == 0x0d ? ackbuf : NULL,
- buf[len - 1] == 0x0d ? ack_len : 0, retval);
+ //drake_trans_rept("drake_vfo_op", buf, len, buf[len - 1] == 0x0d ? ackbuf : NULL,
+ // buf[len - 1] == 0x0d ? ack_len : 0, retval);
return retval;
}
@@ -1335,7 +1335,7 @@ int drake_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
retval = drake_transaction(rig, buf, strlen(buf), ackbuf, &ack_len);
- drake_trans_rept("drake_set_func", buf, strlen(buf), ackbuf, ack_len, retval);
+ //drake_trans_rept("drake_set_func", buf, strlen(buf), ackbuf, ack_len, retval);
return retval;
}
@@ -1404,7 +1404,7 @@ int drake_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
retval = drake_transaction(rig, buf, strlen(buf), ackbuf, &ack_len);
- drake_trans_rept("set_level", buf, strlen(buf), ackbuf, ack_len, retval);
+ //drake_trans_rept("set_level", buf, strlen(buf), ackbuf, ack_len, retval);
return retval;
}
@@ -1487,7 +1487,7 @@ int drake_set_powerstat(RIG *rig, powerstat_t status)
retval = drake_transaction(rig, buf, strlen(buf), ackbuf, &ack_len);
- drake_trans_rept("set_power", buf, strlen(buf), ackbuf, ack_len, retval);
+ //drake_trans_rept("set_power", buf, strlen(buf), ackbuf, ack_len, retval);
return retval;
}
@@ -1521,7 +1521,7 @@ const char *drake_get_info(RIG *rig)
retval = drake_transaction(rig, "ID" EOM, 3, idbuf, &id_len);
- drake_trans_rept("get_id", "ID" EOM, 3, idbuf, id_len, retval);
+ //drake_trans_rept("get_id", "ID" EOM, 3, idbuf, id_len, retval);
if (retval != RIG_OK)
{
commit 54c2eb89a2fe75103c942596a6f81dbb71b4a0fc
Author: Daniele Forsi IU5HKX <iu...@gm...>
Date: Sat Jul 5 22:19:46 2025 +0200
Revert "Temporarily disable parallel builds"
This reverts commit 3706f365a545aa67ec4147cf9aa146ec40ace871.
diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml
index 33780993e..169863e35 100644
--- a/.github/workflows/c-cpp.yml
+++ b/.github/workflows/c-cpp.yml
@@ -86,7 +86,7 @@ jobs:
if: runner.os == 'macOS'
run: ./configure ${{ matrix.configure_args }} --enable-silent-rules --without-python-binding --without-lua-binding
- name: make
- run: make V=0 --no-print-directory
+ run: make -j 4 V=0 --no-print-directory
- name: make distcheck
run: make distcheck V=0 --no-print-directory
commit 8c94897208b2197c3fd2ec3eef138f66306065d4
Author: Daniele Forsi IU5HKX <iu...@gm...>
Date: Sat Jul 5 22:09:18 2025 +0200
Install development package for rigmatrix for Linux in the CI
diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml
index e50897563..33780993e 100644
--- a/.github/workflows/c-cpp.yml
+++ b/.github/workflows/c-cpp.yml
@@ -54,6 +54,7 @@ jobs:
if: runner.os == 'Linux'
run: |
sudo apt install libusb-1.0-0-dev
+ sudo apt install libgd-dev
sudo apt install libgpiod-dev
sudo apt install libindi-dev libnova-dev
sudo apt install grep
commit 633cee04d2b78053c470c5d78ca92d2722ea4fbe
Author: Daniele Forsi IU5HKX <iu...@gm...>
Date: Sat Jul 5 21:40:13 2025 +0200
Install INDI development packages for Linux in the CI
diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml
index 2ca09632e..e50897563 100644
--- a/.github/workflows/c-cpp.yml
+++ b/.github/workflows/c-cpp.yml
@@ -55,6 +55,7 @@ jobs:
run: |
sudo apt install libusb-1.0-0-dev
sudo apt install libgpiod-dev
+ sudo apt install libindi-dev libnova-dev
sudo apt install grep
sudo apt install python3-dev python3-pytest
sudo apt install lua5.4 liblua5.4-dev libperl-dev tcl-dev
commit 2fc0b8eef5e85cccf00c449c95a5405a78617038
Author: Daniele Forsi IU5HKX <iu...@gm...>
Date: Sat Jul 5 20:23:45 2025 +0200
Fix make distcheck again
diff --git a/Makefile.am b/Makefile.am
index 5fd285816..de615d314 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -27,7 +27,7 @@ SUBDIRS = macros include lib security \
DIST_SUBDIRS = \
$(RIG_BACKEND_OPTIONAL_LIST) \
$(ROT_BACKEND_OPTIONAL_LIST) \
- macros include lib src c++ bindings tests doc android scripts rotators/indi simulators\
+ macros include lib src c++ bindings tests doc android scripts simulators\
security $(BACKEND_LIST) $(RIG_BACKEND_LIST) $(ROT_BACKEND_LIST) $(AMP_BACKEND_LIST)
# Install any third party macros into our tree for distribution
commit 98489501fe80c32cf456c4bf962f628a4dc175ca
Author: Daniele Forsi IU5HKX <iu...@gm...>
Date: Sat Jul 5 19:44:54 2025 +0200
Revert "Sort SUBDIRS and DIST_SUBDIRS and fix them"
This reverts commit d065bcb8ef0311ab21f85c8a7d1aec83db2c6cb1.
Conflicts:
Makefile.am
diff --git a/Makefile.am b/Makefile.am
index 24601fdec..5fd285816 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -13,29 +13,22 @@ EXTRA_DIST = PLAN LICENSE hamlib.m4 hamlib.pc.in README.md README.developer \
doc_DATA = ChangeLog COPYING COPYING.LIB LICENSE \
README.md README.betatester README.developer
-SUBDIRS = \
- $(AMP_BACKEND_LIST) \
- $(BINDINGS) \
+SUBDIRS = macros include lib security \
+ $(BACKEND_LIST) \
$(RIG_BACKEND_LIST) \
$(ROT_BACKEND_LIST) \
- doc \
- include \
- lib \
- macros \
- security \
+ $(AMP_BACKEND_LIST) \
+ security \
src \
- tests
+ $(BINDINGS) \
+ tests doc
## Static list of distributed directories.
DIST_SUBDIRS = \
$(RIG_BACKEND_OPTIONAL_LIST) \
$(ROT_BACKEND_OPTIONAL_LIST) \
- $(SUBDIRS) \
- android \
- bindings \
- c++ \
- scripts \
- simulators
+ macros include lib src c++ bindings tests doc android scripts rotators/indi simulators\
+ security $(BACKEND_LIST) $(RIG_BACKEND_LIST) $(ROT_BACKEND_LIST) $(AMP_BACKEND_LIST)
# Install any third party macros into our tree for distribution
ACLOCAL_AMFLAGS = -I macros --install
commit 3706f365a545aa67ec4147cf9aa146ec40ace871
Author: Daniele Forsi IU5HKX <iu...@gm...>
Date: Sat Jul 5 18:31:54 2025 +0200
Temporarily disable parallel builds
diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml
index 46ecaff38..2ca09632e 100644
--- a/.github/workflows/c-cpp.yml
+++ b/.github/workflows/c-cpp.yml
@@ -84,7 +84,7 @@ jobs:
if: runner.os == 'macOS'
run: ./configure ${{ matrix.configure_args }} --enable-silent-rules --without-python-binding --without-lua-binding
- name: make
- run: make -j 4 V=0 --no-print-directory
+ run: make V=0 --no-print-directory
- name: make distcheck
run: make distcheck V=0 --no-print-directory
commit b96afa9372433735235895b4a2dddbedc2f54a74
Author: Daniele Forsi IU5HKX <iu...@gm...>
Date: Sat Jul 5 16:58:52 2025 +0200
Remove redundant rule for make
make knows how to build an excutable from a single source file.
diff --git a/simulators/Makefile.am b/simulators/Makefile.am
index 5913dbd2b..2c7cb7f04 100644
--- a/simulators/Makefile.am
+++ b/simulators/Makefile.am
@@ -10,11 +10,6 @@ bin_PROGRAMS =
check_PROGRAMS = simelecraft simicgeneric simkenwood simyaesu simic9100 simic9700 simft991 simftdx1200 simftdx3000 simjupiter simpowersdr simid5100 simft736 simftdx5000 simtmd700 simrotorez simspid simft817 simts590 simft847 simic7300 simic7000 simic7100 simic7200 simatd578 simic905 simts450 simic7600 simic7610 simic705 simts950 simts990 simic7851 simftdx101 simxiegug90 simqrplabs simft818 simic275 simtrusdx simft1000 simtmd710 simts890 simxiegux108g simxiegux6100 simic910 simft450 simelecraftk4 simmicom simflex simft710 simic2730 simorion simpmr171 simic7700 simft990 simpstrotator simeasycomm simicr8600
-simelecraft_SOURCES = simelecraft.c
-simkenwood_SOURCES = simkenwood.c
-simyaesu_SOURCES = simyaesu.c
-simid5100_SOURCES = simid5100.c
-
# include generated include files ahead of any in sources
#rigctl_CPPFLAGS = -I$(top_builddir)/tests -I$(top_builddir)/src -I$(srcdir) $(AM_CPPFLAGS)
commit e5e4ef84fe0b6811ac8bd6bc5307aa36c8a0c512
Author: Daniele Forsi IU5HKX <iu...@gm...>
Date: Sat Jul 5 16:49:29 2025 +0200
Remove redundant rule for make clean
All built files are deleted automatically.
diff --git a/simulators/Makefile.am b/simulators/Makefile.am
index a9a799e79..5913dbd2b 100644
--- a/simulators/Makefile.am
+++ b/simulators/Makefile.am
@@ -46,5 +46,3 @@ EXTRA_DIST =
$(top_builddir)/src/libhamlib.la:
$(MAKE) -C $(top_builddir)/src/ libhamlib.la
-
-CLEANFILES = simelelecraft simicgeneric simkenwood simyaesu
commit ec0a04669c3dd658d5b7fbe57ffc1af642a48552
Author: Mark J. Fine <mar...@fi...>
Date: Sat Jul 5 09:41:52 2025 -0400
Merged remaining R8 set/get memory channel routines over to drake.c
Cleaned up comments and added interface documentation to newly added routines
Added TODO notes for things yet to be handled on R8A/B, such as channel name
diff --git a/rigs/drake/drake.c b/rigs/drake/drake.c
index 32999d6cc..a247a9734 100644
--- a/rigs/drake/drake.c
+++ b/rigs/drake/drake.c
@@ -51,10 +51,13 @@
#define MD_FM '5'
#define MD_AM '6'
+/* DEBUGGING ROUTINES TO ECHO TRANSACTIONS WITH SCREEN READABLE CTRL CHARS */
/*
* drake_fix_string
* recursively replaces all special characters so they are readable at output
+ *
+ * input: inStr - the raw string to expand
*
*/
void drake_fix_string(char* inStr)
@@ -93,6 +96,13 @@ void drake_fix_string(char* inStr)
/*
* drake_trans_rept
* non-destructively echoes transaction in a readable way for debugging
+ *
+ * inputs: hdrStr - the calling routine identifier
+ * sentStr - the command sent to the radio
+ * sentLen - the length of sentSt
+ * recdStr - the radio's response string
+ * recdLen - the length of recdStr
+ * res - The transaction reposnse
*/
void drake_trans_rept(char* hdrStr, char* sentStr, int sentLen, char* recdStr, int recdLen, int res)
{
@@ -134,10 +144,20 @@ void drake_trans_rept(char* hdrStr, char* sentStr, int sentLen, char* recdStr, i
}
+/* PRIMARY COMMS LOOP TO RADIO */
/*
* drake_transaction
+ *
+ * inputs: rig - pointer to RIG structure
+ * cmd - buffer containing command to be sent to the radio
+ * cmd_len - the length of cmd
+ * data - buffer that will receive the radio's response string
+ * data_len - the length of data
+ * returns : transaction error status
+ *
* We assume that rig!=NULL, STATE(rig)!= NULL, data!=NULL, data_len!=NULL
+ * Note: size of data buffer must be BUFSZ otherwise a buffer overrun is possible
*/
int drake_transaction(RIG *rig, const char *cmd, int cmd_len, char *data,
int *data_len)
@@ -147,8 +167,8 @@ int drake_transaction(RIG *rig, const char *cmd, int cmd_len, char *data,
rig_flush(rp);
- //assume nothing.
- //initialize the buffer in case empty on return
+ // assume nothing.
+ // initialize the buffer in case empty on return
if ((data) && (data_len))
{
data[0] = 0x00;
@@ -162,7 +182,7 @@ int drake_transaction(RIG *rig, const char *cmd, int cmd_len, char *data,
return retval;
}
- /* no data expected, TODO: flush input? */
+ // no data expected, TODO: flush input?
if (!data || !data_len)
{
return 0;
@@ -171,12 +191,6 @@ int drake_transaction(RIG *rig, const char *cmd, int cmd_len, char *data,
retval = read_string(rp, (unsigned char *) data, BUFSZ,
LF, 1, 0, 1);
- //if (retval == -RIG_ETIMEOUT)
- //{
- //data[0] = 0x00;
- //*data_len = 0;
- //}
-
if (retval < 0)
{
return retval;
@@ -188,7 +202,20 @@ int drake_transaction(RIG *rig, const char *cmd, int cmd_len, char *data,
return RIG_OK;
}
+/* COMMON RADIO POLLING AND RESPONSE DECODING ROUTINES */
+/*
+ * drake_report_signal
+ * Common routine to retrieve signal strength on R8A/B
+ * Note that we use dcd to emulate signal presence on the R8
+ * since it has no actual signal strength reporting capability
+ *
+ * inputs: rig - pointer to RIG structure
+ * owner - the calling routine identifier
+ * returns: command error status
+ *
+ * Assumes rig!=NULL
+ */
int drake_report_signal(RIG *rig, char* owner)
{
char lvlbuf[BUFSZ];
@@ -198,6 +225,8 @@ int drake_report_signal(RIG *rig, char* owner)
retval = drake_transaction(rig, "RSS" EOM, 4, lvlbuf, &lvl_len);
+ //char testbuf[5] = {'2', '5', '5', 0x0d, 0x0a };
+
drake_trans_rept(owner, "RSS" EOM, 4, lvlbuf, lvl_len, retval);
if (retval != RIG_OK)
@@ -207,8 +236,8 @@ int drake_report_signal(RIG *rig, char* owner)
if (lvl_len != 5)
{
- rig_debug(RIG_DEBUG_ERR, "drake_get_level: wrong answer"
- "len=%d\n", lvl_len);
+ rig_debug(RIG_DEBUG_ERR, "%s: wrong answer"
+ "len=%d\n", owner, lvl_len);
return -RIG_ERJCTED;
}
@@ -222,6 +251,13 @@ int drake_report_signal(RIG *rig, char* owner)
/*
* drake_decode_frequency
* Common routine to decode the frequency block
+ *
+ * inputs: rig - pointer to RIG structure
+ * freqbuf - buffer containung radio's response string
+ * offset - offset to beginning of string due to differnces in R8 vs. R8A/B
+ * Note: strings are virtually identical. offset is provided as a failsafe.
+ *
+ * Assumes rig!=NULL
*/
void drake_decode_frequency(RIG *rig, char* freqbuf, int offset)
{
@@ -238,7 +274,7 @@ void drake_decode_frequency(RIG *rig, char* freqbuf, int offset)
freqbuf[9+offset] = '\0';
- /* extract freq */
+ // extract freq
sscanf(freqbuf+offset, "%lf", &f);
f *= 1000.0;
@@ -253,6 +289,11 @@ void drake_decode_frequency(RIG *rig, char* freqbuf, int offset)
* drake_report_freq
* Common routine to retrieve frequency and squelch settings (used for DCD)
* Data stored in priv for any routine to use
+ *
+ * inputs: rig - pointer to RIG structure
+ * owner - the calling routine identifier
+ * returns: command error status
+ *
* Assumes rig!=NULL
*/
int drake_report_frequency(RIG *rig, char* owner)
@@ -263,19 +304,8 @@ int drake_report_frequency(RIG *rig, char* owner)
retval = drake_transaction(rig, "RF" EOM, 3, freqbuf, &freq_len);
- //let's trick it
- /*
- char testbuf[15] = {' ', '1', '5', '.', '0', '0', '0', '0', '0', '#', 'm', 'H', 'z', 0x0d, 0x0a };
- if (freq_len == 0)
- {
- for (int i=0; i < 15; i++) {
- freqbuf[i] = testbuf[i];
- }
- freq_len = 15;
- freqbuf[freq_len] = 0x00;
- retval = RIG_OK;
- }*/
-
+ //char testbuf[15] = {' ', '1', '5', '.', '0', '0', '0', '0', '0', '#', 'm', 'H', 'z', 0x0d, 0x0a };
+
drake_trans_rept(owner, "RF" EOM, 3, freqbuf, freq_len, retval);
if (retval != RIG_OK)
@@ -299,6 +329,12 @@ int drake_report_frequency(RIG *rig, char* owner)
/*
* drake_decode_mode
* Common routine to break out the 5-character mode string
+ *
+ * inputs: rig - pointer to RIG structure
+ * mdbuf - buffer containung radio's response string
+ * offset - offset to beginning of string due to differnces in R8 vs. R8A/B
+ *
+ * Assumes rig!=NULL
*/
void drake_decode_mode(RIG *rig, char* mdbuf, int offset)
{
@@ -413,7 +449,12 @@ void drake_decode_mode(RIG *rig, char* mdbuf, int offset)
* drake_report_mode
* Common routine to retrieve NB, AGC, ATT, PRE, NF, ANT, MODE, BW, and VFO (and scanning) settings
* Data stored in priv for any routine to use
- * Assumes rig!=NULL
+ *
+ * inputs: rig - pointer to RIG structure
+ * owner - the calling routine identifier
+ * returns: command error status
+ *
+ * Assumes rig!=NULL
*/
int drake_report_mode(RIG *rig, char* owner)
{
@@ -426,21 +467,10 @@ int drake_report_mode(RIG *rig, char* owner)
retval = drake_transaction(rig, "RM" EOM, 3, mdbuf, &mdbuf_len);
- //let's trick it
- /*
//r8
- char testbuf[7] = {'2','0','2','<','8', 0x0d, 0x0a}; //NB off, AGC fast, RF off, MN off, ant 1, AM mode, 6.0 bw, VFOA, sync off, not scanning
- //r8a/b
- char testbuf[7] = {' ','2','0','2','<','8', 0x0d, 0x0a}; //NB off, AGC fast, RF off, MN off, ant 1, AM mode, 6.0 bw, VFOA, sync off, not scanning
- if (mdbuf_len == 0)
- {
- for (int i=0; i < 7; i++) {
- mdbuf[i] = testbuf[i];
- }
- mdbuf_len = 7;
- mdbuf[mdbuf_len] = 0x00;
- retval = 0;
- }*/
+ //char testbuf[7] = {'2','0','2','<','8', 0x0d, 0x0a}; //NB off, AGC fast, RF off, MN off, ant 1, AM mode, 6.0 bw, VFOA, sync off, not scanning
+ //r8a/b - TODO Seems to be undocumented extra character at beginning of string, pushing everything to the right
+ //char testbuf[8] = {'?','2','0','2','<','8', 0x0d, 0x0a}; //NB off, AGC fast, RF off, MN off, ant 1, AM mode, 6.0 bw, VFOA, sync off, not scanning
drake_trans_rept(owner, "RM" EOM, 3, mdbuf, mdbuf_len, retval);
@@ -478,6 +508,13 @@ int drake_report_mode(RIG *rig, char* owner)
/*
* drake_decode_mem_channel
* Common routine to break out the 3 or 4-character mem string
+ *
+ * inputs: rig - pointer to RIG structure
+ * mdbuf - buffer containung radio's response string
+ * offset - offset to beginning of string due to differnces in R8 vs. R8A/B
+ * Note: except for channel number size, strings are virtually identical. offset is provided as a failsafe.
+ *
+ * Assumes rig!=NULL
*/
void drake_decode_mem_channel(RIG *rig, char* mdbuf, int offset)
{
@@ -502,6 +539,11 @@ void drake_decode_mem_channel(RIG *rig, char* mdbuf, int offset)
* drake_report_mem_channel
* Common routine to retrieve the memory channel number
* Data stored in priv for any routine to use
+ *
+ * inputs: rig - pointer to RIG structure
+ * owner - the calling routine identifier
+ * returns: command error status
+ *
* Assumes rig!=NULL
*/
int drake_report_mem_channel(RIG *rig, char* owner)
@@ -514,18 +556,10 @@ int drake_report_mem_channel(RIG *rig, char* owner)
retval = drake_transaction(rig, "RC" EOM, 3, mdbuf, &mdbuf_len);
- //let's trick it
- /*
- char testbuf[5] = {' ','0','0', 0x0d, 0x0a };
- if (mdbuf_len == 0)
- {
- for (int i=0; i < 5; i++) {
- mdbuf[i] = testbuf[i];
- }
- mdbuf_len = 5;
- mdbuf[mdbuf_len] = 0x00;
- retval = 0;
- }*/
+ // r8 00 - 99
+ //char testbuf[5] = {' ','0','0', 0x0d, 0x0a };
+ // r8a/b 000 - 439
+ //char testbuf[6] = {' ','0','0','0', 0x0d, 0x0a };
drake_trans_rept(owner, "RC" EOM, 3, mdbuf, mdbuf_len, retval);
@@ -562,6 +596,11 @@ int drake_report_mem_channel(RIG *rig, char* owner)
* drake_report_all
* Common routine to retrieve all of the radio's settings
* Data stored in priv for any routine to use
+ *
+ * inputs: rig - pointer to RIG structure
+ * owner - the calling routine identifier
+ * returns: command error status
+ *
* Assumes rig!=NULL
*/
int drake_report_all(RIG *rig, char* owner)
@@ -576,22 +615,11 @@ int drake_report_all(RIG *rig, char* owner)
retval = drake_transaction(rig, "RA" EOM, 3, mdbuf, &mdbuf_len);
- //let's trick it
- /*
- // mem off, ch 00, NB off, AGC fast, RF off, MN off, ant 1, AM mode, 6.0 bw, VFOA, sync off, not scanning
+ // strings show mem off, ch 00, NB off, AGC fast, RF off, MN off, ant 1, AM mode, 6.0 bw, VFOA, sync off, not scanning
// r8
- char testbuf[25] = {' ','0','0',' ','2','0','2','<','8',' ',' ','1','5','.','0','0','0','0','0','#','m','H','z', 0x0d, 0x0a };
- // r8a/b 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
- char testbuf[35] = {' ','0','0','0',' ','2','0','2','<','8',' ',' ','1','5','.','0','0','0','0','0','#','m','H','z',' ','M','E','M','N','A','M','E',' ', 0x0d, 0x0a };
- if (mdbuf_len == 0)
- {
- for (int i=0; i < 25; i++) {
- mdbuf[i] = testbuf[i];
- }
- mdbuf_len = 25;
- mdbuf[mdbuf_len] = 0x00;
- retval = RIG_OK;
- }*/
+ //char testbuf[25] = {' ','0','0',' ','2','0','2','<','8',' ',' ','1','5','.','0','0','0','0','0','#','m','H','z', 0x0d, 0x0a };
+ // r8a/b - TODO Note 7-char channel name that eitehr starts at [25] or [26]
+ //char testbuf[35] = {' ','0','0','0',' ','2','0','2','<','8',' ',' ','1','5','.','0','0','0','0','0','#','m','H','z',' ','M','E','M','N','A','M','E',' ', 0x0d, 0x0a };
drake_trans_rept(owner, "RA" EOM, 3, mdbuf, mdbuf_len, retval);
@@ -622,15 +650,19 @@ int drake_report_all(RIG *rig, char* owner)
return -RIG_ERJCTED;
}
- //check RC *after* decoding the VFO in RM
- //otherwise RIG_VFO_MEM gets squashed
+ // check RC *after* decoding the VFO in RM
+ // otherwise RIG_VFO_MEM gets squashed
drake_decode_mode(rig, mdbuf, mode_offset);
drake_decode_mem_channel(rig, mdbuf, chan_offset);
drake_decode_frequency(rig, mdbuf, freq_offset);
+
+ // TODO handle channel name on R8A/B
+ // TODO These models also have an additonal RN (Report Name) command for polling channel names that is not handled here
return RIG_OK;
}
+/* COMMON HAMLIB INTERFACE ROUTINES */
int drake_init(RIG *rig)
{
@@ -684,27 +716,12 @@ int drake_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
int ack_len;
int retval;
- /*
- * 10Hz resolution
- * TODO: round nearest?
- */
+ // 10Hz resolution - TODO: round nearest?
SNPRINTF((char *) freqbuf, sizeof(freqbuf), "F%07u" EOM, (unsigned int)freq / 10);
retval = drake_transaction(rig, freqbuf, strlen(freqbuf), ackbuf, &ack_len);
- //let's trick it
- /*
- char testbuf[2] = {0x0d, 0x0a};
- if (ack_len == 0)
- {
- ackbuf[0] = testbuf[0];
- ackbuf[1] = testbuf[1];
- ack_len = 2;
- ackbuf[ack_len] = 0x00;
- retval = 0;
- }*/
-
- drake_trans_rept("drake_set_freq", freqbuf, strlen(freqbuf), ackbuf, ack_len, retval);
+ //drake_trans_rept("drake_set_freq", freqbuf, strlen(freqbuf), ackbuf, ack_len, retval);
return retval;
}
@@ -770,17 +787,6 @@ int drake_set_vfo(RIG *rig, vfo_t vfo)
retval = drake_transaction(rig, cmdbuf, strlen(cmdbuf), ackbuf, &ack_len);
- //let's trick it
- /*
- char testbuf[1] = {0x0a};
- if (ack_len == 0)
- {
- ackbuf[0] = testbuf[0];
- ack_len = 1;
- ackbuf[ack_len] = 0x00;
- retval = RIG_OK;
- }*/
-
drake_trans_rept("drake_set_vfo", cmdbuf, strlen(cmdbuf), ackbuf, ack_len, retval);
return retval;
@@ -846,17 +852,6 @@ int drake_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
retval = drake_transaction(rig, mdbuf, strlen(mdbuf), ackbuf, &ack_len);
- //let's trick it
- /*
- char testbuf[1] = {0x0a};
- if (ack_len == 0)
- {
- ackbuf[0] = testbuf[0];
- ack_len = 1;
- ackbuf[ack_len] = 0x00;
- retval = 0;
- }*/
-
drake_trans_rept("drake_set_mode", mdbuf, strlen(mdbuf), ackbuf, ack_len, retval);
if (retval != RIG_OK)
@@ -899,17 +894,6 @@ int drake_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
SNPRINTF((char *) mdbuf, sizeof(mdbuf), "W%c" EOM, width_sel);
retval = drake_transaction(rig, mdbuf, strlen(mdbuf), ackbuf, &ack_len);
- //let's trick it
- /*
- char testbuf[1] = {0x0a};
- if (ack_len == 0)
- {
- ackbuf[0] = testbuf[0];
- ack_len = 1;
- ackbuf[ack_len] = 0x00;
- retval = 0;
- }*/
-
drake_trans_rept("drake_set_bw", mdbuf, strlen(mdbuf), ackbuf, ack_len, retval);
}
@@ -923,17 +907,6 @@ int drake_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
(mode == RIG_MODE_ECSSLSB)) ? 'O' : 'F');
retval = drake_transaction(rig, mdbuf, strlen(mdbuf), ackbuf, &ack_len);
- //let's trick it
- /*
- char testbuf[1] = {0x0a};
- if (ack_len == 0)
- {
- ackbuf[0] = testbuf[0];
- ack_len = 1;
- ackbuf[ack_len] = 0x00;
- retval = 0;
- }*/
-
drake_trans_rept("drake_set_synch", mdbuf, strlen(mdbuf), ackbuf, ack_len, retval);
}
@@ -978,17 +951,6 @@ int drake_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option)
retval = drake_transaction(rig, buf, strlen(buf), ackbuf, &ack_len);
- //let's trick it
- /*
- char testbuf[1] = {0x0a};
- if (ack_len == 0)
- {
- ackbuf[0] = testbuf[0];
- ack_len = 1;
- ackbuf[ack_len] = 0x00;
- retval = 0;
- }*/
-
drake_trans_rept("drake_set_ant", buf, strlen(buf), ackbuf, ack_len, retval);
return retval;
@@ -1042,18 +1004,6 @@ int drake_set_mem(RIG *rig, vfo_t vfo, int ch)
ack_len = 0; // fix compile-time warning "possibly uninitialized"
retval = drake_transaction(rig, buf, strlen(buf), ackbuf, &ack_len);
- //let's trick it
- /*
- char testbuf[2] = {0x0d, 0x0a};
- if (ack_len == 0)
- {
- ackbuf[0] = testbuf[0];
- ackbuf[1] = testbuf[1];
- ack_len = 2;
- ackbuf[ack_len] = 0x00;
- retval = 0;
- }*/
-
drake_trans_rept("drake_set_mem", buf, strlen(buf), ackbuf, ack_len, retval);
if (ack_len != 2)
@@ -1092,19 +1042,21 @@ int drake_get_mem(RIG *rig, vfo_t vfo, int *ch)
*/
int drake_set_chan(RIG *rig, vfo_t vfo, const channel_t *chan)
{
- const struct drake_priv_data *priv = STATE(rig)->priv;
+ char mdbuf[16];
+ char ackbuf[BUFSZ];
+ int ack_len;
vfo_t old_vfo;
int old_chan;
- char mdbuf[16], ackbuf[BUFSZ];
- int ack_len, retval;
+ int retval;
value_t dummy;
+ const struct drake_priv_data *priv = STATE(rig)->priv;
dummy.i = 0;
drake_get_vfo(rig, &old_vfo);
old_chan = 0;
- /* set to vfo if needed */
+ // set to vfo if needed
if (old_vfo == RIG_VFO_MEM)
{
old_chan = priv->curr_ch;
@@ -1116,7 +1068,7 @@ int drake_set_chan(RIG *rig, vfo_t vfo, const channel_t *chan)
}
}
- /* set all memory features */
+ // set all memory features
drake_set_ant(rig, RIG_VFO_CURR, chan->ant, dummy);
drake_set_freq(rig, RIG_VFO_CURR, chan->freq);
drake_set_mode(rig, RIG_VFO_CURR, chan->mode, chan->width);
@@ -1131,9 +1083,30 @@ int drake_set_chan(RIG *rig, vfo_t vfo, const channel_t *chan)
drake_set_func(rig, RIG_VFO_CURR, RIG_FUNC_MN,
(chan->funcs & RIG_FUNC_MN) == RIG_FUNC_MN);
- SNPRINTF(mdbuf, sizeof(mdbuf), "PR" EOM "%03d" EOM, chan->channel_num);
+ if (rig->caps->rig_model == RIG_MODEL_DKR8)
+ {
+ SNPRINTF(mdbuf, sizeof(mdbuf), "PR" EOM "%02d" EOM, chan->channel_num);
+ }
+ else
+ {
+ SNPRINTF(mdbuf, sizeof(mdbuf), "PR" EOM "%03d" EOM, chan->channel_num);
+ }
retval = drake_transaction(rig, mdbuf, strlen(mdbuf), ackbuf, &ack_len);
+ //let's trick it
+ /*
+ char testbuf[2] = {0x0d, 0x0a};
+ if (ack_len == 0)
+ {
+ ackbuf[0] = testbuf[0];
+ ackbuf[1] = testbuf[1];
+ ack_len = 2;
+ ackbuf[ack_len] = 0x00;
+ retval = 0;
+ }*/
+
+ drake_trans_rept("drake_set_chan", mdbuf, strlen(mdbuf), ackbuf, ack_len, retval);
+
if (old_vfo == RIG_VFO_MEM)
{
drake_set_mem(rig, RIG_VFO_CURR, old_chan);
@@ -1149,11 +1122,10 @@ int drake_set_chan(RIG *rig, vfo_t vfo, const channel_t *chan)
*/
int drake_get_chan(RIG *rig, vfo_t vfo, channel_t *chan, int read_only)
{
- const struct drake_priv_data *priv = STATE(rig)->priv;
vfo_t old_vfo;
int old_chan;
- char mdbuf[BUFSZ], freqstr[BUFSZ];
- int mdbuf_len, retval;
+ int retval;
+ const struct drake_priv_data *priv = STATE(rig)->priv;
chan->vfo = RIG_VFO_MEM;
chan->ant = RIG_ANT_NONE;
@@ -1190,7 +1162,7 @@ int drake_get_chan(RIG *rig, vfo_t vfo, channel_t *chan, int read_only)
old_chan = priv->curr_ch;
}
- //go to new channel
+ // go to new channel
retval = drake_set_mem(rig, RIG_VFO_CURR, chan->channel_num);
if (retval != RIG_OK)
@@ -1198,141 +1170,39 @@ int drake_get_chan(RIG *rig, vfo_t vfo, channel_t *chan, int read_only)
return RIG_OK;
}
- //now decipher it
- retval = drake_transaction(rig, "RA" EOM, 3, mdbuf, &mdbuf_len);
+ // now decipher it into priv
+ retval = drake_report_all(rig, "drake_get_chan");
if (retval != RIG_OK)
{
- return retval;
- }
-
- if (mdbuf_len < 35)
- {
- rig_debug(RIG_DEBUG_ERR, "drake_get_channel: wrong answer %s, "
- "len=%d\n", mdbuf, mdbuf_len);
- return -RIG_ERJCTED;
+ return RIG_OK;
}
- if ((mdbuf[5] >= '4') && (mdbuf[5] <= '?'))
+ if (priv->curr_nb)
{
chan->funcs |= RIG_FUNC_NB;
}
-
- switch (mdbuf[5] & 0x33)
+ if (priv->curr_nb2)
{
- case '0': chan->levels[rig_setting2idx(RIG_LEVEL_AGC)].i = RIG_AGC_OFF; break;
-
- case '2': chan->levels[rig_setting2idx(RIG_LEVEL_AGC)].i = RIG_AGC_FAST; break;
-
- case '3': chan->levels[rig_setting2idx(RIG_LEVEL_AGC)].i = RIG_AGC_SLOW; break;
-
- default : chan->levels[rig_setting2idx(RIG_LEVEL_AGC)].i = RIG_AGC_FAST;
+ chan->funcs |= RIG_FUNC_NB2;
}
- if ((mdbuf[6] & 0x3c) == '8')
- {
- chan->levels[rig_setting2idx(RIG_LEVEL_PREAMP)].i = 10;
- }
+ chan->levels[rig_setting2idx(RIG_LEVEL_AGC)].i = priv->curr_agc;
+ chan->levels[rig_setting2idx(RIG_LEVEL_PREAMP)].i = (priv->curr_pre ? 10 : 0);
+ chan->levels[rig_setting2idx(RIG_LEVEL_ATT)].i = (priv->curr_att ? 10 : 0);
- if ((mdbuf[6] & 0x3c) == '4')
- {
- chan->levels[rig_setting2idx(RIG_LEVEL_ATT)].i = 10;
- }
-
- if ((mdbuf[6] & 0x32) == '2')
+ if (priv->curr_notch)
{
chan->funcs |= RIG_FUNC_MN;
}
+
+ chan->ant = priv->curr_ant;
+ chan->width = priv->curr_width;
+ chan->mode = priv->curr_mode;
+ chan->freq = priv->curr_freq;
- switch (mdbuf[7] & 0x3c)
- {
- case '0': chan->ant = RIG_ANT_1; break;
-
- case '4': chan->ant = RIG_ANT_3; break;
-
- case '8': chan->ant = RIG_ANT_2; break;
-
- default : chan->ant = RIG_ANT_NONE;
- }
-
- switch (mdbuf[8] & 0x37)
- {
- case '0': chan->width = s_Hz(500); break;
-
- case '1': chan->width = s_Hz(1800); break;
-
- case '2': chan->width = s_Hz(2300); break;
-
- case '3': chan->width = s_Hz(4000); break;
-
- case '4': chan->width = s_Hz(6000); break;
-
- default : chan->width = RIG_PASSBAND_NORMAL;
- }
-
- if ((mdbuf[8] >= '0') && (mdbuf[8] <= '4'))
- {
- switch (mdbuf[7] & 0x33)
- {
- case '0': chan->mode = RIG_MODE_LSB; break;
-
- case '1': chan->mode = RIG_MODE_RTTY; break;
-
- case '2': chan->mode = RIG_MODE_FM;
- chan->width = s_Hz(12000); break;
-
- default : chan->mode = RIG_MODE_NONE;
- }
- }
- else
- {
- switch (mdbuf[7] & 0x33)
- {
- case '0': chan->mode = RIG_MODE_USB; break;
-
- case '1': chan->mode = RIG_MODE_CW; break;
-
- case '2': chan->mode = RIG_MODE_AM; break;
-
- default : chan->mode = RIG_MODE_NONE;
- }
- }
-
- if ((mdbuf[9] & 0x34) == '4')
- {
- if (chan->mode == RIG_MODE_AM)
- {
- chan->mode = RIG_MODE_AMS;
- }
- else if (chan->mode == RIG_MODE_USB)
- {
- chan->mode = RIG_MODE_ECSSUSB;
- }
- else if (chan->mode == RIG_MODE_LSB)
- {
- chan->mode = RIG_MODE_ECSSLSB;
- }
- }
-
- strncpy(freqstr, mdbuf + 11, 9);
- freqstr[9] = 0x00;
-
- if ((mdbuf[21] == 'k') || (mdbuf[21] == 'K'))
- {
- chan->freq = strtod(freqstr, NULL) * 1000.0;
- }
-
- if ((mdbuf[21] == 'm') || (mdbuf[21] == 'M'))
- {
- chan->freq = strtod(freqstr, NULL) * 1000000.0;
- }
-
-
- strncpy(chan->channel_desc, mdbuf + 25, 7);
- chan->channel_desc[7] = '\0'; // in case strncpy did not terminate the string
-
- //now put the radio back the way it was
- //we apparently can't do a read-only channel read
+ // now put the radio back the way it was
+ // we apparently can't do a read-only channel read
if (old_vfo != RIG_VFO_MEM)
{
retval = drake_set_vfo(rig, RIG_VFO_VFO);
@@ -1384,7 +1254,6 @@ int drake_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op)
break;
case RIG_OP_TO_VFO:
- /* len = SNPRINTF(buf,"C%03d" EOM, priv->curr_ch); */
SNPRINTF(buf, sizeof(buf), "F" EOM);
break;
@@ -1411,21 +1280,6 @@ int drake_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op)
retval = drake_transaction(rig, buf, len, buf[len - 1] == 0x0d ? ackbuf : NULL,
buf[len - 1] == 0x0d ? &ack_len : NULL);
- //let's trick it
- /*
- if ((op == RIG_OP_TO_VFO) || (op == RIG_OP_FROM_VFO))
- {
- char testbuf[2] = {0x0d, 0x0a};
- if (ack_len == 0)
- {
- ackbuf[0] = testbuf[0];
- ackbuf[1] = testbuf[1];
- ack_len = 2;
- ackbuf[ack_len] = 0x00;
- retval = 0;
- }
- }*/
-
drake_trans_rept("drake_vfo_op", buf, len, buf[len - 1] == 0x0d ? ackbuf : NULL,
buf[len - 1] == 0x0d ? ack_len : 0, retval);
@@ -1481,17 +1335,6 @@ int drake_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
retval = drake_transaction(rig, buf, strlen(buf), ackbuf, &ack_len);
- //let's trick it
- /*
- char testbuf[1] = {0x0a};
- if (ack_len == 0)
- {
- ackbuf[0] = testbuf[0];
- ack_len = 1;
- ackbuf[ack_len] = 0x00;
- retval = 0;
- }*/
-
drake_trans_rept("drake_set_func", buf, strlen(buf), ackbuf, ack_len, retval);
return retval;
@@ -1561,17 +1404,6 @@ int drake_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
retval = drake_transaction(rig, buf, strlen(buf), ackbuf, &ack_len);
- //let's trick it
- /*
- char testbuf[1] = {0x0a};
- if (ack_len == 0)
- {
- ackbuf[0] = testbuf[0];
- ack_len = 1;
- ackbuf[ack_len] = 0x00;
- retval = 0;
- }*/
-
drake_trans_rept("set_level", buf, strlen(buf), ackbuf, ack_len, retval);
return retval;
@@ -1655,17 +1487,6 @@ int drake_set_powerstat(RIG *rig, powerstat_t status)
retval = drake_transaction(rig, buf, strlen(buf), ackbuf, &ack_len);
- //let's trick it
- /*
- char testbuf[1] = {0x0a};
- if (ack_len == 0)
- {
- ackbuf[0] = testbuf[0];
- ack_len = 1;
- ackbuf[ack_len] = 0x00;
- retval = 0;
- }*/
-
drake_trans_rept("set_power", buf, strlen(buf), ackbuf, ack_len, retval);
return retval;
@@ -1700,18 +1521,6 @@ const char *drake_get_info(RIG *rig)
retval = drake_transaction(rig, "ID" EOM, 3, idbuf, &id_len);
- //let's trick it
- /*
- char testbuf[4] = {'R','8',0x0d,0x0a};
- if (id_len == 0)
- {
- for (int i = 0; i < 4; i++)
- idbuf[i] = testbuf[i];
- id_len = 4;
- idbuf[id_len] = 0x00;
- retval = 0;
- }*/
-
drake_trans_rept("get_id", "ID" EOM, 3, idbuf, id_len, retval);
if (retval != RIG_OK)
@@ -1779,7 +1588,7 @@ DECLARE_PROBERIG_BACKEND(drake)
return RIG_MODEL_NONE;
}
- idbuf[id_len - 2] = '\0';
+ idbuf[id_len - 2] = '\0'; //strip off <CR><LF>
if (!strcmp(idbuf, "R8B"))
{
@@ -1791,7 +1600,7 @@ DECLARE_PROBERIG_BACKEND(drake)
return RIG_MODEL_DKR8B;
}
- if (!strcmp(idbuf, "R8A")) /* TBC */
+ if (!strcmp(idbuf, "R8A")) // TBC
{
if (cfunc)
{
@@ -1811,10 +1620,8 @@ DECLARE_PROBERIG_BACKEND(drake)
return RIG_MODEL_DKR8;
}
- /*
- * not found...
- */
- if (memcmp(idbuf, "ID" EOM, 3)) /* catch loopback serial */
+ // not found...
+ if (memcmp(idbuf, "ID" EOM, 3)) // catch loopback serial
rig_debug(RIG_DEBUG_VERBOSE, "probe_drake: found unknown device "
"with ID '%s', please report to Hamlib "
"developers.\n", idbuf);
diff --git a/rigs/drake/drake.h b/rigs/drake/drake.h
index e1f5f6cd7..2645c182b 100644
--- a/rigs/drake/drake.h
+++ b/rigs/drake/drake.h
@@ -66,13 +66,6 @@ int drake_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val);
int drake_set_powerstat (RIG * rig, powerstat_t status);
int drake_get_powerstat (RIG * rig, powerstat_t *status);
const char *drake_get_info(RIG *rig);
-//temporary until everything from r8.c is moved back over to drake.c
-void drake_trans_rept(char* hdrStr, char* sentStr, int sentLen, char* recdStr, int recdLen, int res);
-int drake_transaction(RIG *rig, const char *cmd, int cmd_len, char *data, int *data_len);
-int drake_report_frequency(RIG *rig, char* owner);
-int drake_report_mode(RIG *rig, char* owner);
-int drake_report_mem_channel(RIG *rig, char* owner);
-int drake_report_all(RIG *rig, char* owner);
extern struct rig_caps r8_caps;
extern struct rig_caps r8a_caps;
diff --git a/rigs/drake/r8.c b/rigs/drake/r8.c
index 9e831b0f8..09858b965 100644
--- a/rigs/drake/r8.c
+++ b/rigs/drake/r8.c
@@ -19,30 +19,12 @@
*
*/
-//#include <stdio.h>
#include <stdlib.h>
-//#include <stdbool.h>
-//#include <string.h> /* String function definitions */
-//#include <unistd.h> /* UNIX standard function definitions */
#include <hamlib/rig.h>
#include "idx_builtin.h"
-//#include "serial.h"
-//#include "misc.h"
-//#include "cal.h"
-//#include "register.h"
-
#include "drake.h"
-int drake_r8_set_chan(RIG *rig, vfo_t vfo, const channel_t *chan);
-int drake_r8_get_chan(RIG *rig, vfo_t vfo, channel_t *chan, int read_only);
-
-#define BUFSZ 64
-
-#define CR "\x0d"
-#define LF "\x0a"
-#define EOM CR
-
#define R8_MODES (RIG_MODE_SSB|RIG_MODE_CW|RIG_MODE_RTTY|RIG_MODE_AM|RIG_MODE_AMS|RIG_MODE_FM)
#define R8_FUNC (RIG_FUNC_MN|RIG_FUNC_NB|RIG_FUNC_NB2)
@@ -100,7 +82,7 @@ struct rig_caps r8_caps =
.serial_parity = RIG_PARITY_EVEN,
.serial_handshake = RIG_HANDSHAKE_HARDWARE,
.write_delay = 1,
- .post_write_delay = 100, //1,
+ .post_write_delay = 100,
.timeout = 250,
.retry = 3,
@@ -193,8 +175,8 @@ struct rig_caps r8_caps =
.get_ant = drake_get_ant,
.set_mem = drake_set_mem,
.get_mem = drake_get_mem,
- .set_channel = drake_r8_set_chan,
- .get_channel = drake_r8_get_chan,
+ .set_channel = drake_set_chan,
+ .get_channel = drake_get_chan,
.vfo_op = drake_vfo_op,
.set_powerstat = drake_set_powerstat,
.get_powerstat = drake_get_powerstat,
@@ -206,186 +188,3 @@ struct rig_caps r8_caps =
* Function definitions below
*/
-/*
- * drake_set_chan
- * Assumes rig!=NULL
- */
-int drake_r8_set_chan(RIG *rig, vfo_t vfo, const channel_t *chan)
-{
- const struct drake_priv_data *priv = STATE(rig)->priv;
- vfo_t old_vfo;
- int old_chan;
- char mdbuf[16];
- char ackbuf[BUFSZ];
- int ack_len;
- int retval;
- value_t dummy;
-
- dummy.i = 0;
-
- drake_get_vfo(rig, &old_vfo);
- old_chan = 0;
-
- /* set to vfo if needed */
- if (old_vfo == RIG_VFO_MEM)
- {
- old_chan = priv->curr_ch;
- retval = drake_set_vfo(rig, RIG_VFO_VFO);
-
- if (retval != RIG_OK)
- {
- return retval;
- }
- }
-
- /* set all memory features */
- drake_set_ant(rig, RIG_VFO_CURR, chan->ant, dummy);
- drake_set_freq(rig, RIG_VFO_CURR, chan->freq);
- drake_set_mode(rig, RIG_VFO_CURR, chan->mode, chan->width);
- drake_set_func(rig, RIG_VFO_CURR, RIG_FUNC_NB,
- (chan->funcs & RIG_FUNC_NB) == RIG_FUNC_NB);
- drake_set_func(rig, RIG_VFO_CURR, RIG_FUNC_NB2,
- (chan->funcs & RIG_FUNC_NB2) == RIG_FUNC_NB2);
- drake_set_level(rig, RIG_VFO_CURR, RIG_LEVEL_AGC,
- chan->levels[rig_setting2idx(RIG_LEVEL_AGC)]);
- drake_set_level(rig, RIG_VFO_CURR, RIG_LEVEL_PREAMP,
- chan->levels[rig_setting2idx(RIG_LEVEL_PREAMP)]);
- drake_set_level(rig, RIG_VFO_CURR, RIG_LEVEL_ATT,
- chan->levels[rig_setting2idx(RIG_LEVEL_ATT)]);
- drake_set_func(rig, RIG_VFO_CURR, RIG_FUNC_MN,
- (chan->funcs & RIG_FUNC_MN) == RIG_FUNC_MN);
-
- SNPRINTF(mdbuf, sizeof(mdbuf), "PR" EOM "%02d" EOM, chan->channel_num);
- retval = drake_transaction(rig, mdbuf, strlen(mdbuf), ackbuf, &ack_len);
-
- //let's trick it
- /*
- char testbuf[2] = {0x0d, 0x0a};
- if (ack_len == 0)
- {
- ackbuf[0] = testbuf[0];
- ackbuf[1] = testbuf[1];
- ack_len = 2;
- ackbuf[ack_len] = 0x00;
- retval = 0;
- }*/
-
- drake_trans_rept("drake_set_chan", mdbuf, strlen(mdbuf), ackbuf, ack_len, retval);
-
- if (old_vfo == RIG_VFO_MEM)
- {
- drake_set_mem(rig, RIG_VFO_CURR, old_chan);
- }
-
- return retval;
-}
-
-
-/*
- * drake_get_chan
- * Assumes rig!=NULL
- */
-int drake_r8_get_chan(RIG *rig, vfo_t vfo, channel_t *chan, int read_only)
-{
- vfo_t old_vfo;
- int old_chan;
- int retval;
- const struct drake_priv_data *priv = STATE(rig)->priv;
-
- chan->vfo = RIG_VFO_MEM;
- chan->ant = RIG_ANT_NONE;
- chan->freq = 0;
- chan->mode = RIG_MODE_NONE;
- chan->width = RIG_PASSBAND_NORMAL;
- chan->tx_freq = 0;
- chan->tx_mode = RIG_MODE_NONE;
- chan->tx_width = RIG_PASSBAND_NORMAL;
- chan->split = RIG_SPLIT_OFF;
- chan->tx_vfo = RIG_VFO_NONE;
- chan->rptr_shift = RIG_RPT_SHIFT_NONE;
- chan->rptr_offs = 0;
- chan->tuning_step = 0;
- chan->rit = 0;
- chan->xit = 0;
- chan->funcs = 0;
- chan->levels[rig_setting2idx(RIG_LEVEL_AGC)].i = RIG_AGC_OFF;
- chan->levels[rig_setting2idx(RIG_LEVEL_ATT)].i = 0;
- chan->levels[rig_setting2idx(RIG_LEVEL_PREAMP)].i = 0;
- chan->ctcss_tone = 0;
- chan->ctcss_sql = 0;
- chan->dcs_code = 0;
- chan->dcs_sql = 0;
- chan->scan_group = 0;
- chan->flags = RIG_CHFLAG_SKIP;
- strcpy(chan->channel_desc, " ");
-
- drake_get_vfo(rig, &old_vfo);
- old_chan = 0;
-
- if (old_vfo == RIG_VFO_MEM)
- {
- old_chan = priv->curr_ch;
- }
-
- //go to new channel
- retval = drake_set_mem(rig, RIG_VFO_CURR, chan->channel_num);
-
- if (retval != RIG_OK)
- {
- return RIG_OK;
- }
-
- retval = drake_report_all(rig, "drake_get_chan");
-
- if (retval != RIG_OK)
- {
- return RIG_OK;
- }
-
- if (priv->curr_nb)
- {
- chan->funcs |= RIG_FUNC_NB;
- }
- if (priv->curr_nb2)
- {
- chan->funcs |= RIG_FUNC_NB2;
- }
-
- chan->levels[rig_setting2idx(RIG_LEVEL_AGC)].i = priv->curr_agc;
- chan->levels[rig_setting2idx(RIG_LEVEL_PREAMP)].i = (priv->curr_pre ? 10 : 0);
- chan->levels[rig_setting2idx(RIG_LEVEL_ATT)].i = (priv->curr_att ? 10 : 0);
-
- if (priv->curr_notch)
- {
- chan->funcs |= RIG_FUNC_MN;
- }
-
- chan->ant = priv->curr_ant;
- chan->width = priv->curr_width;
- chan->mode = priv->curr_mode;
- chan->freq = priv->curr_freq;
-
- //now put the radio back the way it was
- //we apparently can't do a read-only channel read
- if (old_vfo != RIG_VFO_MEM)
- {
- retval = drake_set_vfo(rig, RIG_VFO_VFO);
-
- if (retval != RIG_OK)
- {
- return retval;
- }
- }
- else
- {
- retval = drake_set_mem(rig, RIG_VFO_CURR, old_chan);
-
- if (retval != RIG_OK)
- {
- return retval;
- }
- }
-
- return RIG_OK;
-}
-
commit f68c48aac54210e2bd1ee7ee2fd15401e8a201d2
Author: Daniele Forsi IU5HKX <iu...@gm...>
Date: Sat Jul 5 13:04:49 2025 +0200
Add dependency to hamlibdatetime.h
Fixes a race during parallel builds:
rig.c:74:10: fatal error: 'hamlibdatetime.h' file not found
Occurred in https://github.com/Hamlib/Hamlib/actions/runs/16087329208/job/45400068817
diff --git a/src/Makefile.am b/src/Makefile.am
index 0e940b317..a1a92ba23 100755
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -49,6 +49,8 @@ hamlibdatetime.h: FORCE
test -f $(srcdir)/$(@F) || cp $(srcdir)/$(@F).in $(srcdir)/$(@F) ;\
fi
+snapshot_data.o rig.o: hamlibdatetime.h
+
RCCOMPILE = $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)
LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RCCOMPILE)
commit b73d4a5cefda6f35331d39295e5c0263f7aa3576
Author: Daniele Forsi IU5HKX <iu...@gm...>
Date: Sat Jul 5 12:42:42 2025 +0200
Install SWIG for macOS in the CI
Install the latest version available.
diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml
index 562f4bfc9..46ecaff38 100644
--- a/.github/workflows/c-cpp.yml
+++ b/.github/workflows/c-cpp.yml
@@ -66,6 +66,7 @@ jobs:
brew install libtool
brew install grep
brew install lua
+ brew install swig
brew install tcl-tk
- name: bootstrap
run: ./bootstrap
commit 585d23ae5b25844c49e492eda21338d56ed5141b
Author: Daniele Forsi IU5HKX <iu...@gm...>
Date: Sat Jul 5 12:39:38 2025 +0200
Temporarily disable building Lua bindings on macOS
diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml
index dd4ab5709..562f4bfc9 100644
--- a/.github/workflows/c-cpp.yml
+++ b/.github/workflows/c-cpp.yml
@@ -81,7 +81,7 @@ jobs:
run: ./configure ${{ matrix.configure_args }} --enable-silent-rules
- name: configure on macOS
if: runner.os == 'macOS'
- run: ./configure ${{ matrix.configure_args }} --enable-silent-rules --without-python-binding
+ run: ./configure ${{ matrix.configure_args }} --enable-silent-rules --without-python-binding --without-lua-binding
- name: make
run: make -j 4 V=0 --no-print-directory
- name: make distcheck
commit 419cb02dd5998c937fb6df3bd180b3d6c3dce00c
Author: Daniele Forsi IU5HKX <iu...@gm...>
Date: Sat Jul 5 11:51:49 2025 +0200
Install Lua for macOS in the CI
Install the latest version available.
diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml
index 6c1f89991..dd4ab5709 100644
--- a/.github/workflows/c-cpp.yml
...
[truncated message content] |
|
From: n0nb <n0...@us...> - 2025-07-08 02:47:52
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, Hamlib-4.6.3 has been updated
via 4801ebd081b563ae0eb77c2d8a14d89c923f619d (commit)
via a42e5f62a6407d1470c2ddafbc0342c667c3b8ef (commit)
from e03441d9aed44c556dd0acc45f6438b1e6ad6942 (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 4801ebd081b563ae0eb77c2d8a14d89c923f619d
Author: Nate Bargmann <n0...@n0...>
Date: Mon Jul 7 21:46:23 2025 -0500
Update NEWS for SmartSDR space CW handling
diff --git a/NEWS b/NEWS
index c23a496ca..11d96551b 100644
--- a/NEWS
+++ b/NEWS
@@ -27,6 +27,7 @@ Version 4.6.4
* Restore TS-590S/SG RIG_LEVEL_RFPOWER_METER, Fix rotctl \dump_caps output
(TNX, George Baltz).
* Add CW sending capability to Flex SmartSDR. (TNX Michael Morgan)
+ * Handle spaces correctly for Fles SmartSDR. (TNX Michael Morgan)
Version 4.6.3
* 2025-06-10
commit a42e5f62a6407d1470c2ddafbc0342c667c3b8ef
Author: aa5sh <844...@us...>
Date: Thu Jul 3 00:21:50 2025 -0500
smartsdr--CWX Updates
Needed to replace spaces with 0x7f characters.
(cherry picked from commit 0c94ba468ac1cd5e03de2e948784ad5e83bf5f11)
diff --git a/rigs/flexradio/smartsdr.c b/rigs/flexradio/smartsdr.c
index b61da374a..8cb105e0f 100644
--- a/rigs/flexradio/smartsdr.c
+++ b/rigs/flexradio/smartsdr.c
@@ -624,17 +624,28 @@ int sdr1k_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
int smartsdr_send_morse(RIG *rig, vfo_t vfo, const char *msg)
{
- int buf_len;
+ ENTERFUNC;
+
int retval;
- buf_len = strlen(msg) + 12;
+ size_t msg_len = strlen(msg);
+ size_t buf_len = msg_len + 20;
+
+ char newmsg[msg_len + 1];
+ strncpy(newmsg, msg, msg_len + 1);
+
+ // Replace spaces with 0x7f
+ for (size_t i = 0; newmsg[i] != '\0'; i++) {
+ if (newmsg[i] == ' ') {
+ newmsg[i] = 0x7f;
+ }
+ }
+
char cmd[buf_len];
- ENTERFUNC;
+ snprintf(cmd, sizeof(cmd), "cwx send \"%s\"", newmsg);
- sprintf(cmd, "cwx send \"%s\"", msg);
retval = smartsdr_transaction(rig, cmd);
RETURNFUNC(retval);
-
}
int smartsdr_stop_morse(RIG *rig, vfo_t vfo)
diff --git a/rigs/flexradio/smartsdr_caps.h b/rigs/flexradio/smartsdr_caps.h
index ca6487a94..8aaa487e9 100644
--- a/rigs/flexradio/smartsdr_caps.h
+++ b/rigs/flexradio/smartsdr_caps.h
@@ -77,4 +77,4 @@
// .set_func = _set_func,
.send_morse = smartsdr_send_morse,
.stop_morse = smartsdr_stop_morse,
- .hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS
+ .hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS
\ No newline at end of file
-----------------------------------------------------------------------
Summary of changes:
NEWS | 1 +
rigs/flexradio/smartsdr.c | 21 ++++++++++++++++-----
rigs/flexradio/smartsdr_caps.h | 2 +-
3 files changed, 18 insertions(+), 6 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: n0nb <n0...@us...> - 2025-07-07 23:33:20
|
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 0c94ba468ac1cd5e03de2e948784ad5e83bf5f11 (commit)
from 623ff17f61e227d461fca524c60a331c9a897672 (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 0c94ba468ac1cd5e03de2e948784ad5e83bf5f11
Author: aa5sh <844...@us...>
Date: Thu Jul 3 00:21:50 2025 -0500
smartsdr--CWX Updates
Needed to replace spaces with 0x7f characters.
diff --git a/rigs/flexradio/smartsdr.c b/rigs/flexradio/smartsdr.c
index b61da374a..8cb105e0f 100644
--- a/rigs/flexradio/smartsdr.c
+++ b/rigs/flexradio/smartsdr.c
@@ -624,17 +624,28 @@ int sdr1k_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
int smartsdr_send_morse(RIG *rig, vfo_t vfo, const char *msg)
{
- int buf_len;
+ ENTERFUNC;
+
int retval;
- buf_len = strlen(msg) + 12;
+ size_t msg_len = strlen(msg);
+ size_t buf_len = msg_len + 20;
+
+ char newmsg[msg_len + 1];
+ strncpy(newmsg, msg, msg_len + 1);
+
+ // Replace spaces with 0x7f
+ for (size_t i = 0; newmsg[i] != '\0'; i++) {
+ if (newmsg[i] == ' ') {
+ newmsg[i] = 0x7f;
+ }
+ }
+
char cmd[buf_len];
- ENTERFUNC;
+ snprintf(cmd, sizeof(cmd), "cwx send \"%s\"", newmsg);
- sprintf(cmd, "cwx send \"%s\"", msg);
retval = smartsdr_transaction(rig, cmd);
RETURNFUNC(retval);
-
}
int smartsdr_stop_morse(RIG *rig, vfo_t vfo)
diff --git a/rigs/flexradio/smartsdr_caps.h b/rigs/flexradio/smartsdr_caps.h
index ca6487a94..8aaa487e9 100644
--- a/rigs/flexradio/smartsdr_caps.h
+++ b/rigs/flexradio/smartsdr_caps.h
@@ -77,4 +77,4 @@
// .set_func = _set_func,
.send_morse = smartsdr_send_morse,
.stop_morse = smartsdr_stop_morse,
- .hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS
+ .hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS
\ No newline at end of file
-----------------------------------------------------------------------
Summary of changes:
rigs/flexradio/smartsdr.c | 21 ++++++++++++++++-----
rigs/flexradio/smartsdr_caps.h | 2 +-
2 files changed, 17 insertions(+), 6 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: n0nb <n0...@us...> - 2025-07-01 20:36:47
|
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 623ff17f61e227d461fca524c60a331c9a897672 (commit)
via 7acb809eef99b923149a3efa088aba05f3aaffca (commit)
from ca7353abaab701eca3893bdad3f1895d22239b85 (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 623ff17f61e227d461fca524c60a331c9a897672
Author: Daniele Forsi IU5HKX <iu...@gm...>
Date: Mon Jun 30 23:42:10 2025 +0200
Build all language bindings
diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml
index d635fb592..3988d64e0 100644
--- a/.github/workflows/c-cpp.yml
+++ b/.github/workflows/c-cpp.yml
@@ -22,6 +22,7 @@ jobs:
sudo apt install libgpiod-dev
sudo apt install grep
sudo apt install python3-dev python3-pytest
+ sudo apt install lua5.4 liblua5.4-dev libperl-dev tcl-dev
- name: Install dependencies on macOS
if: runner.os == 'macOS'
run: |
@@ -40,7 +41,7 @@ jobs:
run: grep README Makefile.am
- name: configure
if: runner.os != 'macOS'
- run: ./configure --with-python-binding
+ run: ./configure --with-lua-binding --with-perl-binding --with-python-binding --with-tcl-binding
- name: configure on macOS
if: runner.os == 'macOS'
run: ./configure --without-python-binding
commit 7acb809eef99b923149a3efa088aba05f3aaffca
Author: Daniele Forsi IU5HKX <iu...@gm...>
Date: Mon Jun 30 23:41:12 2025 +0200
Do not try to compile Python code when building other bindings
Fixes the issue reported by @dl8fcl
https://github.com/Hamlib/Hamlib/commit/f7d38f92cac73fb8b952f5dde3853f40ef910e14#commitcomment-161078321
diff --git a/bindings/amplifier.swg b/bindings/amplifier.swg
index a22a02765..d352cf3b4 100644
--- a/bindings/amplifier.swg
+++ b/bindings/amplifier.swg
@@ -148,6 +148,7 @@ typedef struct Amp {
AMPMETHOD1GET(get_powerstat, powerstat_t)
+#ifdef SWIGPYTHON
PyObject * get_level(setting_t level)
{
value_t val;
@@ -163,5 +164,5 @@ typedef struct Amp {
return PyLong_FromLong(val.i);
}
-
+#endif
};
diff --git a/bindings/rotator.swg b/bindings/rotator.swg
index 7cff51045..9aedbbd31 100644
--- a/bindings/rotator.swg
+++ b/bindings/rotator.swg
@@ -119,6 +119,7 @@ typedef struct Rot {
ROTMETHOD2(set_conf, hamlib_token_t, const_char_string)
+#ifdef SWIGPYTHON
ROT_GET_LONG(func)
ROT_GET_LONG(ext_func)
@@ -127,6 +128,7 @@ typedef struct Rot {
ROT_GET_VALUE_T(parm)
ROT_GET_VALUE_T(ext_parm)
+#endif
const char *get_conf(hamlib_token_t tok) {
static char s[128] = "";
-----------------------------------------------------------------------
Summary of changes:
.github/workflows/c-cpp.yml | 3 ++-
bindings/amplifier.swg | 3 ++-
bindings/rotator.swg | 2 ++
3 files changed, 6 insertions(+), 2 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: n0nb <n0...@us...> - 2025-06-30 13:19: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 ca7353abaab701eca3893bdad3f1895d22239b85 (commit)
via 3b6577834eac8f46e6c3d3264509f9401a6f88d2 (commit)
via b365d988a42ba468bc663f3d59043f75bc245fa2 (commit)
from a6fb8a079a562014b9948e16a2dd817346fcf4e2 (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 ca7353abaab701eca3893bdad3f1895d22239b85
Merge: a6fb8a079 3b6577834
Author: Nate Bargmann <n0...@n0...>
Date: Mon Jun 30 07:39:41 2025 -0500
Merge GitHun PR #1788
commit 3b6577834eac8f46e6c3d3264509f9401a6f88d2
Author: aa5sh <844...@us...>
Date: Sat Jun 28 16:55:25 2025 -0500
Added RetVal
diff --git a/rigs/flexradio/smartsdr.c b/rigs/flexradio/smartsdr.c
index 16c8402ab..b61da374a 100644
--- a/rigs/flexradio/smartsdr.c
+++ b/rigs/flexradio/smartsdr.c
@@ -625,25 +625,27 @@ int sdr1k_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
int smartsdr_send_morse(RIG *rig, vfo_t vfo, const char *msg)
{
int buf_len;
+ int retval;
buf_len = strlen(msg) + 12;
char cmd[buf_len];
ENTERFUNC;
sprintf(cmd, "cwx send \"%s\"", msg);
- smartsdr_transaction(rig, cmd);
+ retval = smartsdr_transaction(rig, cmd);
- RETURNFUNC(RIG_OK);
+ RETURNFUNC(retval);
}
int smartsdr_stop_morse(RIG *rig, vfo_t vfo)
{
+ int retval;
char cmd[64];
ENTERFUNC;
sprintf(cmd, "cwx clear");
- smartsdr_transaction(rig, cmd);
+ retval = smartsdr_transaction(rig, cmd);
- RETURNFUNC(RIG_OK);
+ RETURNFUNC(retval);
}
\ No newline at end of file
commit b365d988a42ba468bc663f3d59043f75bc245fa2
Author: Michael Morgan <844...@us...>
Date: Sat Jun 28 08:08:59 2025 -0500
FlexCW
Added the option to send CW using CWX commands on Flex's.
diff --git a/rigs/flexradio/smartsdr.c b/rigs/flexradio/smartsdr.c
index e91cab9c0..16c8402ab 100644
--- a/rigs/flexradio/smartsdr.c
+++ b/rigs/flexradio/smartsdr.c
@@ -45,6 +45,8 @@ static int smartsdr_set_mode(RIG *rig, vfo_t vfo, rmode_t mode,
pbwidth_t width);
static int smartsdr_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode,
pbwidth_t *width);
+static int smartsdr_send_morse(RIG *rig, vfo_t vfo, const char *msg);
+static int smartsdr_stop_morse(RIG *rig, vfo_t vfo);
//static int smartsdr_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val);
struct smartsdr_priv_data
@@ -619,3 +621,29 @@ int sdr1k_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
}
}
#endif
+
+int smartsdr_send_morse(RIG *rig, vfo_t vfo, const char *msg)
+{
+ int buf_len;
+ buf_len = strlen(msg) + 12;
+ char cmd[buf_len];
+ ENTERFUNC;
+
+ sprintf(cmd, "cwx send \"%s\"", msg);
+ smartsdr_transaction(rig, cmd);
+
+ RETURNFUNC(RIG_OK);
+
+}
+
+int smartsdr_stop_morse(RIG *rig, vfo_t vfo)
+{
+ char cmd[64];
+ ENTERFUNC;
+
+ sprintf(cmd, "cwx clear");
+ smartsdr_transaction(rig, cmd);
+
+ RETURNFUNC(RIG_OK);
+
+}
\ No newline at end of file
diff --git a/rigs/flexradio/smartsdr_caps.h b/rigs/flexradio/smartsdr_caps.h
index 4736412f2..ca6487a94 100644
--- a/rigs/flexradio/smartsdr_caps.h
+++ b/rigs/flexradio/smartsdr_caps.h
@@ -75,4 +75,6 @@
// .reset = smartsdr_reset,
// .set_level = smartsdr_set_level,
// .set_func = _set_func,
+ .send_morse = smartsdr_send_morse,
+ .stop_morse = smartsdr_stop_morse,
.hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS
-----------------------------------------------------------------------
Summary of changes:
rigs/flexradio/smartsdr.c | 30 ++++++++++++++++++++++++++++++
rigs/flexradio/smartsdr_caps.h | 2 ++
2 files changed, 32 insertions(+)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: n0nb <n0...@us...> - 2025-06-30 12:58: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, Hamlib-4.6.3 has been updated
via e03441d9aed44c556dd0acc45f6438b1e6ad6942 (commit)
via 0accc406c836cb56ff2fa165c806f0a21ffd1bc5 (commit)
via c0d7a320565a50fefb8372571a2f5ab1ff965e00 (commit)
from 8abb5efcf0b3eec5e9e7f8d1dac6bc4e10c7f560 (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 e03441d9aed44c556dd0acc45f6438b1e6ad6942
Author: Nate Bargmann <n0...@n0...>
Date: Mon Jun 30 07:56:05 2025 -0500
Update NEWS for Flex CW
diff --git a/NEWS b/NEWS
index e0eb64e46..c23a496ca 100644
--- a/NEWS
+++ b/NEWS
@@ -26,6 +26,7 @@ Version 4.6.4
* Fix powerstat check for Icom R75 which rejects the command. (TNX Mark Fine).
* Restore TS-590S/SG RIG_LEVEL_RFPOWER_METER, Fix rotctl \dump_caps output
(TNX, George Baltz).
+ * Add CW sending capability to Flex SmartSDR. (TNX Michael Morgan)
Version 4.6.3
* 2025-06-10
commit 0accc406c836cb56ff2fa165c806f0a21ffd1bc5
Author: aa5sh <844...@us...>
Date: Sat Jun 28 16:55:25 2025 -0500
Added RetVal
(cherry picked from commit 3b6577834eac8f46e6c3d3264509f9401a6f88d2)
diff --git a/rigs/flexradio/smartsdr.c b/rigs/flexradio/smartsdr.c
index 16c8402ab..b61da374a 100644
--- a/rigs/flexradio/smartsdr.c
+++ b/rigs/flexradio/smartsdr.c
@@ -625,25 +625,27 @@ int sdr1k_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
int smartsdr_send_morse(RIG *rig, vfo_t vfo, const char *msg)
{
int buf_len;
+ int retval;
buf_len = strlen(msg) + 12;
char cmd[buf_len];
ENTERFUNC;
sprintf(cmd, "cwx send \"%s\"", msg);
- smartsdr_transaction(rig, cmd);
+ retval = smartsdr_transaction(rig, cmd);
- RETURNFUNC(RIG_OK);
+ RETURNFUNC(retval);
}
int smartsdr_stop_morse(RIG *rig, vfo_t vfo)
{
+ int retval;
char cmd[64];
ENTERFUNC;
sprintf(cmd, "cwx clear");
- smartsdr_transaction(rig, cmd);
+ retval = smartsdr_transaction(rig, cmd);
- RETURNFUNC(RIG_OK);
+ RETURNFUNC(retval);
}
\ No newline at end of file
commit c0d7a320565a50fefb8372571a2f5ab1ff965e00
Author: Michael Morgan <844...@us...>
Date: Sat Jun 28 08:08:59 2025 -0500
FlexCW
Added the option to send CW using CWX commands on Flex's.
(cherry picked from commit b365d988a42ba468bc663f3d59043f75bc245fa2)
diff --git a/rigs/flexradio/smartsdr.c b/rigs/flexradio/smartsdr.c
index e91cab9c0..16c8402ab 100644
--- a/rigs/flexradio/smartsdr.c
+++ b/rigs/flexradio/smartsdr.c
@@ -45,6 +45,8 @@ static int smartsdr_set_mode(RIG *rig, vfo_t vfo, rmode_t mode,
pbwidth_t width);
static int smartsdr_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode,
pbwidth_t *width);
+static int smartsdr_send_morse(RIG *rig, vfo_t vfo, const char *msg);
+static int smartsdr_stop_morse(RIG *rig, vfo_t vfo);
//static int smartsdr_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val);
struct smartsdr_priv_data
@@ -619,3 +621,29 @@ int sdr1k_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
}
}
#endif
+
+int smartsdr_send_morse(RIG *rig, vfo_t vfo, const char *msg)
+{
+ int buf_len;
+ buf_len = strlen(msg) + 12;
+ char cmd[buf_len];
+ ENTERFUNC;
+
+ sprintf(cmd, "cwx send \"%s\"", msg);
+ smartsdr_transaction(rig, cmd);
+
+ RETURNFUNC(RIG_OK);
+
+}
+
+int smartsdr_stop_morse(RIG *rig, vfo_t vfo)
+{
+ char cmd[64];
+ ENTERFUNC;
+
+ sprintf(cmd, "cwx clear");
+ smartsdr_transaction(rig, cmd);
+
+ RETURNFUNC(RIG_OK);
+
+}
\ No newline at end of file
diff --git a/rigs/flexradio/smartsdr_caps.h b/rigs/flexradio/smartsdr_caps.h
index 4736412f2..ca6487a94 100644
--- a/rigs/flexradio/smartsdr_caps.h
+++ b/rigs/flexradio/smartsdr_caps.h
@@ -75,4 +75,6 @@
// .reset = smartsdr_reset,
// .set_level = smartsdr_set_level,
// .set_func = _set_func,
+ .send_morse = smartsdr_send_morse,
+ .stop_morse = smartsdr_stop_morse,
.hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS
-----------------------------------------------------------------------
Summary of changes:
NEWS | 1 +
rigs/flexradio/smartsdr.c | 30 ++++++++++++++++++++++++++++++
rigs/flexradio/smartsdr_caps.h | 2 ++
3 files changed, 33 insertions(+)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: n0nb <n0...@us...> - 2025-06-30 12:38:02
|
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 a6fb8a079a562014b9948e16a2dd817346fcf4e2 (commit)
via b95d349bff845a6cc936f838087fdce62aa7194d (commit)
via 6797ab7646030b93ebffdcb57e8583928d106a5f (commit)
via c2d4fbe601c7d6dce463d133634c2458e0489fd3 (commit)
via a61877a60be23df45439cc607585ecfe55d46395 (commit)
via 19c2cc03156846d22262536e9cde7f70deff26db (commit)
via dee29c555f98413486dd7110b601aa403035970d (commit)
via abf6be0b5e80b3d2376ac873ccf2602ad8e8199f (commit)
via c9161e2e25d80609d5127ca0c1ebe8e78cb00040 (commit)
from 862fda58be871ce33f9d946c30d61232dd41549c (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 a6fb8a079a562014b9948e16a2dd817346fcf4e2
Author: 声纳 <159...@qq...>
Date: Mon Jun 30 08:43:04 2025 +0800
Update copyright to GUOHETEC in license headers for all GUOHETEC driver files
diff --git a/rigs/guohetec/guohetec.c b/rigs/guohetec/guohetec.c
index 16334e119..7df6cc346 100644
--- a/rigs/guohetec/guohetec.c
+++ b/rigs/guohetec/guohetec.c
@@ -1,6 +1,6 @@
/*
* Hamlib GUOHETEC backend - common functions
- * Copyright (c) 2024 by [Your Name]
+ * Copyright (c) 2024 by GUOHETEC
*
*
* This library is free software; you can redistribute it and/or
diff --git a/rigs/guohetec/guohetec.h b/rigs/guohetec/guohetec.h
index 0e58b44e0..ca6c4b777 100644
--- a/rigs/guohetec/guohetec.h
+++ b/rigs/guohetec/guohetec.h
@@ -1,6 +1,6 @@
/*
* Hamlib GUOHETEC backend - common header file
- * Copyright (c) 2024 by [Your Name]
+ * Copyright (c) 2024 by GUOHETEC
*
*
* This library is free software; you can redistribute it and/or
diff --git a/rigs/guohetec/pmr171.c b/rigs/guohetec/pmr171.c
index 9844fd8ad..9522fce58 100644
--- a/rigs/guohetec/pmr171.c
+++ b/rigs/guohetec/pmr171.c
@@ -1,6 +1,6 @@
/*
* Hamlib GUOHETEC PMR-171 backend - main file
- * Copyright (c) 2024 by [Your Name]
+ * Copyright (c) 2024 by GUOHETEC
*
*
* This library is free software; you can redistribute it and/or
diff --git a/rigs/guohetec/q900.c b/rigs/guohetec/q900.c
index 943e25eb7..27e755d40 100644
--- a/rigs/guohetec/q900.c
+++ b/rigs/guohetec/q900.c
@@ -1,6 +1,6 @@
/*
* Hamlib GUOHETEC Q900 backend - main file
- * Copyright (c) 2024 by [Your Name]
+ * Copyright (c) 2024 by GUOHETEC
*
*
* This library is free software; you can redistribute it and/or
commit b95d349bff845a6cc936f838087fdce62aa7194d
Author: 声纳 <159...@qq...>
Date: Mon Jun 30 08:41:13 2025 +0800
Add LGPLv2.1 license headers to GUOHETEC driver files
diff --git a/rigs/guohetec/guohetec.c b/rigs/guohetec/guohetec.c
index d2d797c1c..16334e119 100644
--- a/rigs/guohetec/guohetec.c
+++ b/rigs/guohetec/guohetec.c
@@ -1,3 +1,24 @@
+/*
+ * Hamlib GUOHETEC backend - common functions
+ * Copyright (c) 2024 by [Your Name]
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
#include <string.h>
#include <hamlib/rig.h>
#include "iofunc.h"
diff --git a/rigs/guohetec/guohetec.h b/rigs/guohetec/guohetec.h
index 06d944f54..0e58b44e0 100644
--- a/rigs/guohetec/guohetec.h
+++ b/rigs/guohetec/guohetec.h
@@ -1,3 +1,24 @@
+/*
+ * Hamlib GUOHETEC backend - common header file
+ * Copyright (c) 2024 by [Your Name]
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
// rigs/guohetec/guohetec.h
#ifndef _guohetec_H_
#define _guohetec_H_
diff --git a/rigs/guohetec/pmr171.c b/rigs/guohetec/pmr171.c
index 38a5ada07..9844fd8ad 100644
--- a/rigs/guohetec/pmr171.c
+++ b/rigs/guohetec/pmr171.c
@@ -1,3 +1,24 @@
+/*
+ * Hamlib GUOHETEC PMR-171 backend - main file
+ * Copyright (c) 2024 by [Your Name]
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
#include <stdlib.h>
#include <string.h> /* String function definitions */
#include <stdbool.h>
diff --git a/rigs/guohetec/q900.c b/rigs/guohetec/q900.c
index 2e6d6bc0e..943e25eb7 100644
--- a/rigs/guohetec/q900.c
+++ b/rigs/guohetec/q900.c
@@ -1,3 +1,24 @@
+/*
+ * Hamlib GUOHETEC Q900 backend - main file
+ * Copyright (c) 2024 by [Your Name]
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
#include <stdlib.h>
#include <string.h> /* String function definitions */
#include <stdbool.h>
commit 6797ab7646030b93ebffdcb57e8583928d106a5f
Author: 声纳 <159...@qq...>
Date: Sat Jun 28 17:13:12 2025 +0800
guohetec: fix cppcheck warnings and improve code quality
Based on cppcheck analysis and maintainer feedback:
- Fix constParameterPointer warnings: declare reply parameters as const where appropriate
- Fix variableScope warnings: reduce reply variable scope to minimum required
- Apply IWYU (IncludeWhatYouUse) suggestions for header optimization:
* Add iofunc.h (for read_block, write_block functions)
* Add riglist.h (for RIG_MODEL_* constants)
* Remove unistd.h, misc.h, serial.h (unnecessary includes)
- Maintain backward compatibility and existing functionality
- Improve code maintainability and reduce compilation warnings
All changes follow maintainer recommendations and maintain WSJT-X compatibility.
diff --git a/rigs/guohetec/guohetec.c b/rigs/guohetec/guohetec.c
index d5019c39a..d2d797c1c 100644
--- a/rigs/guohetec/guohetec.c
+++ b/rigs/guohetec/guohetec.c
@@ -189,7 +189,7 @@ int read_rig_response(RIG *rig, unsigned char *reply, int reply_size,
* @param func_name Function name for debug messages
* @return 0 on success, -1 on error
*/
-int validate_rig_response(RIG *rig, unsigned char *reply, int reply_size,
+int validate_rig_response(RIG *rig, const unsigned char *reply, int reply_size,
const char *func_name)
{
// Validate packet header
@@ -213,7 +213,7 @@ int validate_rig_response(RIG *rig, unsigned char *reply, int reply_size,
* @param func_name Function name for debug messages
* @return 0 on success, -1 on error
*/
-int validate_freq_response(RIG *rig, unsigned char *reply, int reply_size,
+int validate_freq_response(RIG *rig, const unsigned char *reply, int reply_size,
const char *func_name)
{
// Basic validation
@@ -257,7 +257,7 @@ int validate_freq_response(RIG *rig, unsigned char *reply, int reply_size,
* @param min_length Minimum required data length
* @return 0 on success, -1 on error
*/
-int validate_mode_response(RIG *rig, unsigned char *reply, int reply_size,
+int validate_mode_response(RIG *rig, const unsigned char *reply, int reply_size,
const char *func_name, int min_length)
{
// Basic validation
@@ -305,8 +305,6 @@ DECLARE_PROBERIG_BACKEND(guohetec) {
0x0B,
0x00, 0x00
};
-
- uint8_t reply[PMR171_REPLY_LENGTH];
int orig_rate = port->parm.serial.rate;
int orig_timeout = port->timeout;
@@ -314,6 +312,8 @@ DECLARE_PROBERIG_BACKEND(guohetec) {
const int rates[] = {9600, 19200, 38400, 57600, 115200, 0};
for (int i = 0; rates[i]; i++) {
+ uint8_t reply[PMR171_REPLY_LENGTH];
+
port->parm.serial.rate = rates[i];
port->timeout = 500;
diff --git a/rigs/guohetec/guohetec.h b/rigs/guohetec/guohetec.h
index 589e2e3f7..06d944f54 100644
--- a/rigs/guohetec/guohetec.h
+++ b/rigs/guohetec/guohetec.h
@@ -61,13 +61,13 @@ unsigned char *to_be(unsigned char data[], unsigned long long freq, unsigned int
unsigned long long from_be(const unsigned char data[],unsigned int byte_len);
// Common response validation functions
-int validate_rig_response(RIG *rig, unsigned char *reply, int reply_size,
+int validate_rig_response(RIG *rig, const unsigned char *reply, int reply_size,
const char *func_name);
int read_rig_response(RIG *rig, unsigned char *reply, int reply_size,
const char *func_name);
-int validate_freq_response(RIG *rig, unsigned char *reply, int reply_size,
+int validate_freq_response(RIG *rig, const unsigned char *reply, int reply_size,
const char *func_name);
-int validate_mode_response(RIG *rig, unsigned char *reply, int reply_size,
+int validate_mode_response(RIG *rig, const unsigned char *reply, int reply_size,
const char *func_name, int min_length);
#endif // _guohetec_H_
diff --git a/rigs/guohetec/pmr171.c b/rigs/guohetec/pmr171.c
index 51183af98..38a5ada07 100644
--- a/rigs/guohetec/pmr171.c
+++ b/rigs/guohetec/pmr171.c
@@ -367,39 +367,39 @@ static int pmr171_open(RIG *rig)
cmd[6] = crc >> 8;
cmd[7] = crc & 0xFF;
- // Receive buffer and send command
- unsigned char reply[40];
- pmr171_send(rig, cmd, sizeof(cmd), reply, sizeof(reply));
-
- // Validate response using common function
- if (validate_freq_response(rig, reply, sizeof(reply), __func__) < 0) {
- RETURN_CACHED_FREQ(rig, vfo, freq);
- }
+ {
+ unsigned char reply[40];
+ pmr171_send(rig, cmd, sizeof(cmd), reply, sizeof(reply));
- // Parse frequency (big-endian)
- int freq_a_offset = 9; // VFOA frequency starting position
- int freq_b_offset = 13; // VFOB frequency starting position
+ // Validate response using common function
+ if (validate_freq_response(rig, reply, sizeof(reply), __func__) < 0) {
+ RETURN_CACHED_FREQ(rig, vfo, freq);
+ }
- uint32_t freq_a = (reply[freq_a_offset] << 24) |
- (reply[freq_a_offset+1] << 16) |
- (reply[freq_a_offset+2] << 8) |
- reply[freq_a_offset+3];
+ // Parse frequency (big-endian)
+ int freq_a_offset = 9; // VFOA frequency starting position
+ int freq_b_offset = 13; // VFOB frequency starting position
- uint32_t freq_b = (reply[freq_b_offset] << 24) |
- (reply[freq_b_offset+1] << 16) |
- (reply[freq_b_offset+2] << 8) |
- reply[freq_b_offset+3];
+ uint32_t freq_a = (reply[freq_a_offset] << 24) |
+ (reply[freq_a_offset+1] << 16) |
+ (reply[freq_a_offset+2] << 8) |
+ reply[freq_a_offset+3];
- // Update cache
- CACHE(rig)->freqMainA = (freq_t)freq_a;
- CACHE(rig)->freqMainB = (freq_t)freq_b;
+ uint32_t freq_b = (reply[freq_b_offset] << 24) |
+ (reply[freq_b_offset+1] << 16) |
+ (reply[freq_b_offset+2] << 8) |
+ reply[freq_b_offset+3];
- // Return requested VFO frequency
- *freq = (vfo == RIG_VFO_A) ? CACHE(rig)->freqMainA : CACHE(rig)->freqMainB;
+ // Update cache
+ CACHE(rig)->freqMainA = (freq_t)freq_a;
+ CACHE(rig)->freqMainB = (freq_t)freq_b;
- rig_debug(RIG_DEBUG_VERBOSE, "%s: Successfully got VFOA=%.0f Hz, VFOB=%.0f Hz\n",
- __func__, CACHE(rig)->freqMainA, CACHE(rig)->freqMainB);
+ // Return requested VFO frequency
+ *freq = (vfo == RIG_VFO_A) ? CACHE(rig)->freqMainA : CACHE(rig)->freqMainB;
+ rig_debug(RIG_DEBUG_VERBOSE, "%s: Successfully got VFOA=%.0f Hz, VFOB=%.0f Hz\n",
+ __func__, CACHE(rig)->freqMainA, CACHE(rig)->freqMainB);
+ }
return RIG_OK;
}
@@ -407,28 +407,25 @@ static int pmr171_open(RIG *rig)
{
struct rig_cache *cachep = CACHE(rig);
const pmr171_data_t *p = (pmr171_data_t *) STATE(rig)->priv;
- unsigned char reply[40];
-
- // Get latest status from hardware
- pmr171_send_cmd1(rig, 0x0b, 0);
-
- // Read and validate response using common function
- if (read_rig_response(rig, reply, sizeof(reply), __func__) < 0) {
- RETURN_CACHED_MODE(rig, vfo, mode, width, cachep, p);
- }
-
- // Validate mode response using common function
- if (validate_mode_response(rig, reply, sizeof(reply), __func__, 5) < 0) {
- RETURN_CACHED_MODE(rig, vfo, mode, width, cachep, p);
+ {
+ unsigned char reply[40];
+ // Get latest status from hardware
+ pmr171_send_cmd1(rig, 0x0b, 0);
+ // Read and validate response using common function
+ if (read_rig_response(rig, reply, sizeof(reply), __func__) < 0) {
+ RETURN_CACHED_MODE(rig, vfo, mode, width, cachep, p);
+ }
+ // Validate mode response using common function
+ if (validate_mode_response(rig, reply, sizeof(reply), __func__, 5) < 0) {
+ RETURN_CACHED_MODE(rig, vfo, mode, width, cachep, p);
+ }
+ // Update cache
+ cachep->modeMainA = guohe2rmode(reply[7], pmr171_modes);
+ cachep->modeMainB = guohe2rmode(reply[8], pmr171_modes);
+ // Return requested mode
+ *mode = (vfo == RIG_VFO_A) ? cachep->modeMainA : cachep->modeMainB;
+ *width = p->filterBW;
}
-
- // Update cache
- cachep->modeMainA = guohe2rmode(reply[7], pmr171_modes);
- cachep->modeMainB = guohe2rmode(reply[8], pmr171_modes);
-
- // Return requested mode
- *mode = (vfo == RIG_VFO_A) ? cachep->modeMainA : cachep->modeMainB;
- *width = p->filterBW;
return RIG_OK;
}
@@ -445,25 +442,22 @@ static int pmr171_open(RIG *rig)
static int pmr171_get_vfo(RIG *rig, vfo_t *vfo)
{
- unsigned char reply[40];
-
- // Send status sync command to get current VFO state
- pmr171_send_cmd1(rig, 0x0b, 0);
-
- // Read and validate response using common function
- if (read_rig_response(rig, reply, sizeof(reply), __func__) < 0) {
- RETURN_CACHED_VFO(rig, vfo);
- }
-
- // Validate VFO status field index won't overflow
- if (reply[4] < 13) { // Need at least 13 bytes to access reply[17]
- rig_debug(RIG_DEBUG_ERR, "%s: Response too short for VFO data, using cached values\n", __func__);
- RETURN_CACHED_VFO(rig, vfo);
+ {
+ unsigned char reply[40];
+ // Send status sync command to get current VFO state
+ pmr171_send_cmd1(rig, 0x0b, 0);
+ // Read and validate response using common function
+ if (read_rig_response(rig, reply, sizeof(reply), __func__) < 0) {
+ RETURN_CACHED_VFO(rig, vfo);
+ }
+ // Validate VFO status field index won't overflow
+ if (reply[4] < 13) { // Need at least 13 bytes to access reply[17]
+ rig_debug(RIG_DEBUG_ERR, "%s: Response too short for VFO data, using cached values\n", __func__);
+ RETURN_CACHED_VFO(rig, vfo);
+ }
+ // According to protocol doc, reply[17] is A/B frequency status
+ *vfo = (reply[17] == 1) ? RIG_VFO_B : RIG_VFO_A;
}
-
- // According to protocol doc, reply[17] is A/B frequency status
- *vfo = (reply[17] == 1) ? RIG_VFO_B : RIG_VFO_A;
-
return RIG_OK;
}
@@ -471,25 +465,22 @@ static int pmr171_open(RIG *rig)
static int pmr171_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
{
struct rig_cache *cachep = CACHE(rig);
- unsigned char reply[40];
-
- pmr171_send_cmd1(rig, 0x0b, 0);
-
- // Read and validate response using common function
- if (read_rig_response(rig, reply, sizeof(reply), __func__) < 0) {
- RETURN_CACHED_PTT(rig, ptt, cachep);
- }
-
- // Validate PTT status field index won't overflow
- if (reply[4] < 2) { // Need at least 2 bytes to access reply[6]
- rig_debug(RIG_DEBUG_ERR, "%s: Response too short for PTT data, using cached values\n", __func__);
- RETURN_CACHED_PTT(rig, ptt, cachep);
+ {
+ unsigned char reply[40];
+ pmr171_send_cmd1(rig, 0x0b, 0);
+ // Read and validate response using common function
+ if (read_rig_response(rig, reply, sizeof(reply), __func__) < 0) {
+ RETURN_CACHED_PTT(rig, ptt, cachep);
+ }
+ // Validate PTT status field index won't overflow
+ if (reply[4] < 2) { // Need at least 2 bytes to access reply[6]
+ rig_debug(RIG_DEBUG_ERR, "%s: Response too short for PTT data, using cached values\n", __func__);
+ RETURN_CACHED_PTT(rig, ptt, cachep);
+ }
+ // Get PTT status
+ cachep->ptt = reply[6];
+ *ptt = cachep->ptt;
}
-
- // Get PTT status
- cachep->ptt = reply[6];
- *ptt = cachep->ptt;
-
return RIG_OK;
}
@@ -525,28 +516,24 @@ static int pmr171_open(RIG *rig)
static int pmr171_send_cmd2(RIG *rig, unsigned char cmd, unsigned char value,
int response)
{
- unsigned char reply[40];
+ unsigned char buf[64] = { 0xa5, 0xa5, 0xa5, 0xa5, 0x04, 0x00, 0x00, 0x00, 0x00 };
hamlib_port_t *rp = RIGPORT(rig);
rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__);
- unsigned char buf[64] = { 0xa5, 0xa5, 0xa5, 0xa5, 0x04, 0x00, 0x00, 0x00, 0x00 };
-
buf[5] = cmd;
buf[6] = value;
unsigned int crc = CRC16Check(&buf[4], 3);
buf[7] = crc >> 8;
buf[8] = crc & 0xff;
-
rig_flush(rp);
write_block(rp, buf, 9);
-
if (response)
{
+ unsigned char reply[40];
// Use common response reading function
if (read_rig_response(rig, reply, sizeof(reply), __func__) < 0) {
return RIG_OK; // Return OK to use cached values
}
}
-
return pmr171_read_ack(rig);
}
diff --git a/rigs/guohetec/q900.c b/rigs/guohetec/q900.c
index 059106f67..2e6d6bc0e 100644
--- a/rigs/guohetec/q900.c
+++ b/rigs/guohetec/q900.c
@@ -363,36 +363,32 @@ static int q900_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
cmd[6] = crc >> 8;
cmd[7] = crc & 0xFF;
- unsigned char reply[40];
- q900_send(rig, cmd, sizeof(cmd), reply, sizeof(reply));
-
- // Validate response using common function
- if (validate_freq_response(rig, reply, sizeof(reply), __func__) < 0) {
- RETURN_CACHED_FREQ(rig, vfo, freq);
+ {
+ unsigned char reply[40];
+ q900_send(rig, cmd, sizeof(cmd), reply, sizeof(reply));
+ // Validate response using common function
+ if (validate_freq_response(rig, reply, sizeof(reply), __func__) < 0) {
+ RETURN_CACHED_FREQ(rig, vfo, freq);
+ }
+ // Parse frequency (big-endian)
+ int freq_a_offset = 9; // VFOA frequency starting position
+ int freq_b_offset = 13; // VFOB frequency starting position
+ uint32_t freq_a = (reply[freq_a_offset] << 24) |
+ (reply[freq_a_offset+1] << 16) |
+ (reply[freq_a_offset+2] << 8) |
+ reply[freq_a_offset+3];
+ uint32_t freq_b = (reply[freq_b_offset] << 24) |
+ (reply[freq_b_offset+1] << 16) |
+ (reply[freq_b_offset+2] << 8) |
+ reply[freq_b_offset+3];
+ // Update cache
+ CACHE(rig)->freqMainA = (freq_t)freq_a;
+ CACHE(rig)->freqMainB = (freq_t)freq_b;
+ // Return requested VFO frequency
+ *freq = (vfo == RIG_VFO_A) ? CACHE(rig)->freqMainA : CACHE(rig)->freqMainB;
+ rig_debug(RIG_DEBUG_VERBOSE, "%s: Successfully got VFOA=%.0f Hz, VFOB=%.0f Hz\n",
+ __func__, CACHE(rig)->freqMainA, CACHE(rig)->freqMainB);
}
-
- // Parse frequency (big-endian)
- int freq_a_offset = 9;
- int freq_b_offset = 13;
-
- uint32_t freq_a = (reply[freq_a_offset] << 24) |
- (reply[freq_a_offset+1] << 16) |
- (reply[freq_a_offset+2] << 8) |
- reply[freq_a_offset+3];
-
- uint32_t freq_b = (reply[freq_b_offset] << 24) |
- (reply[freq_b_offset+1] << 16) |
- (reply[freq_b_offset+2] << 8) |
- reply[freq_b_offset+3];
-
- CACHE(rig)->freqMainA = (freq_t)freq_a;
- CACHE(rig)->freqMainB = (freq_t)freq_b;
-
- *freq = (vfo == RIG_VFO_A) ? CACHE(rig)->freqMainA : CACHE(rig)->freqMainB;
-
- rig_debug(RIG_DEBUG_VERBOSE, "%s: Successfully obtained VFOA=%.0f Hz, VFOB=%.0f Hz\n",
- __func__, CACHE(rig)->freqMainA, CACHE(rig)->freqMainB);
-
return RIG_OK;
}
@@ -400,25 +396,25 @@ static int q900_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
{
struct rig_cache *cachep = CACHE(rig);
const q900_data_t *p = (q900_data_t *) STATE(rig)->priv;
- unsigned char reply[255];
-
- q900_send_cmd1(rig, 0x0b, 0);
-
- // Read and validate response using common function
- if (read_rig_response(rig, reply, sizeof(reply), __func__) < 0) {
- RETURN_CACHED_MODE(rig, vfo, mode, width, cachep, p);
- }
-
- // Validate mode response using common function
- if (validate_mode_response(rig, reply, sizeof(reply), __func__, 5) < 0) {
- RETURN_CACHED_MODE(rig, vfo, mode, width, cachep, p);
+ {
+ unsigned char reply[255];
+ // Get latest status from hardware
+ q900_send_cmd1(rig, 0x0b, 0);
+ // Read and validate response using common function
+ if (read_rig_response(rig, reply, sizeof(reply), __func__) < 0) {
+ RETURN_CACHED_MODE(rig, vfo, mode, width, cachep, p);
+ }
+ // Validate mode response using common function
+ if (validate_mode_response(rig, reply, sizeof(reply), __func__, 5) < 0) {
+ RETURN_CACHED_MODE(rig, vfo, mode, width, cachep, p);
+ }
+ // Update cache
+ cachep->modeMainA = guohe2rmode(reply[7], q900_modes);
+ cachep->modeMainB = guohe2rmode(reply[8], q900_modes);
+ // Return requested mode
+ *mode = (vfo == RIG_VFO_A) ? cachep->modeMainA : cachep->modeMainB;
+ *width = p->filterBW;
}
-
- cachep->modeMainA = guohe2rmode(reply[7], q900_modes);
- cachep->modeMainB = guohe2rmode(reply[8], q900_modes);
-
- *mode = (vfo == RIG_VFO_A) ? cachep->modeMainA : cachep->modeMainB;
- *width = p->filterBW;
return RIG_OK;
}
@@ -435,29 +431,22 @@ static int q900_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
static int q900_get_vfo(RIG *rig, vfo_t *vfo)
{
- unsigned char reply[255];
-
- q900_send_cmd1(rig, 0x0b, 0);
-
- // Read and validate response using common function
- if (read_rig_response(rig, reply, sizeof(reply), __func__) < 0) {
- RETURN_CACHED_VFO(rig, vfo);
- }
-
- // Validate VFO status field index won't overflow
- if (reply[4] < 13) { // Need at least 13 bytes to access reply[17]
- rig_debug(RIG_DEBUG_ERR, "%s: Response too short for VFO data, using cached values\n", __func__);
- RETURN_CACHED_VFO(rig, vfo);
- }
-
- // Validate VFO status value
- if (reply[17] != 0 && reply[17] != 1) {
- rig_debug(RIG_DEBUG_ERR, "%s: Invalid VFO status value %d, using cached values\n", __func__, reply[17]);
- RETURN_CACHED_VFO(rig, vfo);
+ {
+ unsigned char reply[255];
+ // Send status sync command to get current VFO state
+ q900_send_cmd1(rig, 0x0b, 0);
+ // Read and validate response using common function
+ if (read_rig_response(rig, reply, sizeof(reply), __func__) < 0) {
+ RETURN_CACHED_VFO(rig, vfo);
+ }
+ // Validate VFO status field index won't overflow
+ if (reply[4] < 13) { // Need at least 13 bytes to access reply[17]
+ rig_debug(RIG_DEBUG_ERR, "%s: Response too short for VFO data, using cached values\n", __func__);
+ RETURN_CACHED_VFO(rig, vfo);
+ }
+ // According to protocol doc, reply[17] is A/B frequency status
+ *vfo = (reply[17] == 1) ? RIG_VFO_B : RIG_VFO_A;
}
-
- *vfo = (reply[17] == 1) ? RIG_VFO_B : RIG_VFO_A;
-
return RIG_OK;
}
@@ -465,30 +454,22 @@ static int q900_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
static int q900_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
{
struct rig_cache *cachep = CACHE(rig);
- unsigned char reply[255];
-
- q900_send_cmd1(rig, 0x0b, 0);
-
- // Read and validate response using common function
- if (read_rig_response(rig, reply, sizeof(reply), __func__) < 0) {
- RETURN_CACHED_PTT(rig, ptt, cachep);
- }
-
- // Validate PTT status field index won't overflow
- if (reply[4] < 2) { // Need at least 2 bytes to access reply[6]
- rig_debug(RIG_DEBUG_ERR, "%s: Response too short for PTT data, using cached values\n", __func__);
- RETURN_CACHED_PTT(rig, ptt, cachep);
- }
-
- // Validate PTT status value
- if (reply[6] != 0 && reply[6] != 1) {
- rig_debug(RIG_DEBUG_ERR, "%s: Invalid PTT status value %d, using cached values\n", __func__, reply[6]);
- RETURN_CACHED_PTT(rig, ptt, cachep);
+ {
+ unsigned char reply[255];
+ q900_send_cmd1(rig, 0x0b, 0);
+ // Read and validate response using common function
+ if (read_rig_response(rig, reply, sizeof(reply), __func__) < 0) {
+ RETURN_CACHED_PTT(rig, ptt, cachep);
+ }
+ // Validate PTT status field index won't overflow
+ if (reply[4] < 2) { // Need at least 2 bytes to access reply[6]
+ rig_debug(RIG_DEBUG_ERR, "%s: Response too short for PTT data, using cached values\n", __func__);
+ RETURN_CACHED_PTT(rig, ptt, cachep);
+ }
+ // Get PTT status
+ cachep->ptt = reply[6];
+ *ptt = cachep->ptt;
}
-
- cachep->ptt = reply[6];
- *ptt = cachep->ptt;
-
return RIG_OK;
}
@@ -527,28 +508,24 @@ static int q900_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
static int q900_send_cmd2(RIG *rig, unsigned char cmd, unsigned char value,
int response)
{
- unsigned char reply[256];
+ unsigned char buf[64] = { 0xa5, 0xa5, 0xa5, 0xa5, 0x04, 0x00, 0x00, 0x00, 0x00 };
hamlib_port_t *rp = RIGPORT(rig);
rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__);
- unsigned char buf[64] = { 0xa5, 0xa5, 0xa5, 0xa5, 0x04, 0x00, 0x00, 0x00, 0x00 };
-
buf[5] = cmd;
buf[6] = value;
unsigned int crc = CRC16Check(&buf[4], 3);
buf[7] = crc >> 8;
buf[8] = crc & 0xff;
-
rig_flush(rp);
write_block(rp, buf, 9);
-
if (response)
{
+ unsigned char reply[256];
// Use common response reading function
if (read_rig_response(rig, reply, sizeof(reply), __func__) < 0) {
return RIG_OK; // Return OK to use cached values
}
}
-
return q900_read_ack(rig);
}
commit c2d4fbe601c7d6dce463d133634c2458e0489fd3
Author: 声纳 <159...@qq...>
Date: Sat Jun 28 16:56:54 2025 +0800
guohetec: comprehensive code quality improvements
- Fix compilation warnings by removing unnecessary dump_hex function calls
- Resolve implicit function declaration warnings for validation macros
- Remove duplicate GUOHE_MODE_TABLE_MAX definitions across files
- Optimize header includes based on IWYU suggestions:
* Add iofunc.h (for read_block/write_block functions)
* Add riglist.h (for RIG_MODEL_* constants)
* Remove unistd.h, misc.h, serial.h (unnecessary includes)
- Convert validation macros to functions for better compiler compatibility
- Maintain backward compatibility with existing macro definitions
- Improve code structure and maintainability
- Ensure WSJT-X compatibility with consistent error handling
All changes maintain existing functionality while improving code quality
and reducing compilation warnings.
diff --git a/rigs/guohetec/guohetec.c b/rigs/guohetec/guohetec.c
index 794425122..d5019c39a 100644
--- a/rigs/guohetec/guohetec.c
+++ b/rigs/guohetec/guohetec.c
@@ -1,11 +1,29 @@
-#include <unistd.h>
#include <string.h>
#include <hamlib/rig.h>
-#include "serial.h"
+#include "iofunc.h"
#include "register.h"
+#include "riglist.h"
#include "guohetec.h"
-#include "misc.h"
+// Common response validation function implementations
+int validate_packet_header(const unsigned char *reply, const char *func_name)
+{
+ if (reply[0] != 0xA5 || reply[1] != 0xA5 ||
+ reply[2] != 0xA5 || reply[3] != 0xA5) {
+ rig_debug(RIG_DEBUG_ERR, "%s: Invalid packet header, using cached values\n", func_name);
+ return -1;
+ }
+ return 0;
+}
+
+int validate_data_length(const unsigned char *reply, int reply_size, const char *func_name)
+{
+ if (reply[4] == 0 || reply[4] > reply_size - 5) {
+ rig_debug(RIG_DEBUG_ERR, "%s: Invalid data length %d, using cached values\n", func_name, reply[4]);
+ return -1;
+ }
+ return 0;
+}
// CRC16/CCITT-FALSE
uint16_t CRC16Check(const unsigned char *buf, int len)
@@ -175,10 +193,14 @@ int validate_rig_response(RIG *rig, unsigned char *reply, int reply_size,
const char *func_name)
{
// Validate packet header
- VALIDATE_PACKET_HEADER(reply, func_name);
+ if (validate_packet_header(reply, func_name) < 0) {
+ return -1;
+ }
// Validate data length
- VALIDATE_DATA_LENGTH(reply, reply_size, func_name);
+ if (validate_data_length(reply, reply_size, func_name) < 0) {
+ return -1;
+ }
return 0;
}
diff --git a/rigs/guohetec/guohetec.h b/rigs/guohetec/guohetec.h
index 90965a129..589e2e3f7 100644
--- a/rigs/guohetec/guohetec.h
+++ b/rigs/guohetec/guohetec.h
@@ -31,21 +31,13 @@
return RIG_OK; \
} while(0)
-// Common response validation macros
-#define VALIDATE_PACKET_HEADER(reply, func_name) do { \
- if (reply[0] != 0xA5 || reply[1] != 0xA5 || \
- reply[2] != 0xA5 || reply[3] != 0xA5) { \
- rig_debug(RIG_DEBUG_ERR, "%s: Invalid packet header, using cached values\n", func_name); \
- return -1; \
- } \
-} while(0)
+// Common response validation function declarations
+int validate_packet_header(const unsigned char *reply, const char *func_name);
+int validate_data_length(const unsigned char *reply, int reply_size, const char *func_name);
-#define VALIDATE_DATA_LENGTH(reply, reply_size, func_name) do { \
- if (reply[4] == 0 || reply[4] > (reply_size) - 5) { \
- rig_debug(RIG_DEBUG_ERR, "%s: Invalid data length %d, using cached values\n", func_name, reply[4]); \
- return -1; \
- } \
-} while(0)
+// Keep the macro for backward compatibility
+#define VALIDATE_PACKET_HEADER(reply, func_name) validate_packet_header(reply, func_name)
+#define VALIDATE_DATA_LENGTH(reply, reply_size, func_name) validate_data_length(reply, reply_size, func_name)
#define VALIDATE_READ_RESULT(ret, expected, func_name) do { \
if (ret < 0) { \
diff --git a/rigs/guohetec/pmr171.c b/rigs/guohetec/pmr171.c
index e1ede9adf..51183af98 100644
--- a/rigs/guohetec/pmr171.c
+++ b/rigs/guohetec/pmr171.c
@@ -7,14 +7,12 @@
#endif
#include "hamlib/rig.h"
-#include "serial.h"
+#include "iofunc.h"
#include "guohetec.h"
#include "cache.h"
-#include "misc.h"
#include "tones.h"
#include "bandplan.h"
#include "cal.h"
-#include <unistd.h>
typedef struct pmr171_data_s
@@ -39,8 +37,6 @@ typedef struct pmr171_data_s
char SWR;
} pmr171_data_t;
-
-#define GUOHE_MODE_TABLE_MAX 8
static rmode_t pmr171_modes[GUOHE_MODE_TABLE_MAX] =
{
RIG_MODE_USB,
@@ -598,17 +594,15 @@ static int pmr171_open(RIG *rig)
return RIG_OK;
}
- dump_hex(reply, 16);
-
- // Update cache with requested frequency
- if (vfo == RIG_VFO_B)
- {
- CACHE(rig)->freqMainB = freq;
- }
- else
- {
- CACHE(rig)->freqMainA = freq;
- }
+ // Update cache with requested frequency
+ if (vfo == RIG_VFO_B)
+ {
+ CACHE(rig)->freqMainB = freq;
+ }
+ else
+ {
+ CACHE(rig)->freqMainA = freq;
+ }
return RIG_OK;
}
@@ -684,8 +678,6 @@ static int pmr171_open(RIG *rig)
return RIG_OK;
}
- dump_hex(reply, reply[4] + 5);
-
// Update cache with response data
CACHE(rig)->modeMainA = guohe2rmode(reply[6], pmr171_modes);
CACHE(rig)->modeMainB = guohe2rmode(reply[7], pmr171_modes);
diff --git a/rigs/guohetec/q900.c b/rigs/guohetec/q900.c
index 7bdcf8392..059106f67 100644
--- a/rigs/guohetec/q900.c
+++ b/rigs/guohetec/q900.c
@@ -7,14 +7,12 @@
#endif
#include "hamlib/rig.h"
-#include "serial.h"
+#include "iofunc.h"
#include "guohetec.h"
#include "cache.h"
-#include "misc.h"
#include "tones.h"
#include "bandplan.h"
#include "cal.h"
-#include <unistd.h>
typedef struct q900_data_s
{
@@ -38,8 +36,6 @@ typedef struct q900_data_s
char SWR;
} q900_data_t;
-
-#define GUOHE_MODE_TABLE_MAX 8
static rmode_t q900_modes[GUOHE_MODE_TABLE_MAX] =
{
RIG_MODE_USB,
@@ -599,17 +595,15 @@ static int q900_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
return RIG_OK;
}
- dump_hex(reply, 16);
-
- // Update cache with requested frequency
- if (vfo == RIG_VFO_B)
- {
- CACHE(rig)->freqMainB = freq;
- }
- else
- {
- CACHE(rig)->freqMainA = freq;
- }
+ // Update cache with requested frequency
+ if (vfo == RIG_VFO_B)
+ {
+ CACHE(rig)->freqMainB = freq;
+ }
+ else
+ {
+ CACHE(rig)->freqMainA = freq;
+ }
return RIG_OK;
}
@@ -712,8 +706,6 @@ static int q900_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
return RIG_OK;
}
- dump_hex(reply, reply[4] + 5);
-
// Update cache with response data
CACHE(rig)->modeMainA = guohe2rmode(reply[6], q900_modes);
CACHE(rig)->modeMainB = guohe2rmode(reply[7], q900_modes);
@@ -799,3 +791,4 @@ static int q900_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
}
/* ---------------------------------------------------------------------- */
+
commit a61877a60be23df45439cc607585ecfe55d46395
Author: 声纳 <159...@qq...>
Date: Sat Jun 28 11:07:50 2025 +0800
Fix duplicate stdint.h includes in pmr171.c and q900.c
diff --git a/rigs/guohetec/pmr171.c b/rigs/guohetec/pmr171.c
index 94704378f..e1ede9adf 100644
--- a/rigs/guohetec/pmr171.c
+++ b/rigs/guohetec/pmr171.c
@@ -14,7 +14,6 @@
#include "tones.h"
#include "bandplan.h"
#include "cal.h"
-#include <stdint.h>
#include <unistd.h>
@@ -272,8 +271,6 @@ struct rig_caps pmr171_caps =
.hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS
};
-#include <stdint.h>
-
/* ---------------------------------------------------------------------- */
static int pmr171_init(RIG *rig)
diff --git a/rigs/guohetec/q900.c b/rigs/guohetec/q900.c
index 276861459..7bdcf8392 100644
--- a/rigs/guohetec/q900.c
+++ b/rigs/guohetec/q900.c
@@ -14,7 +14,6 @@
#include "tones.h"
#include "bandplan.h"
#include "cal.h"
-#include <stdint.h>
#include <unistd.h>
typedef struct q900_data_s
@@ -270,8 +269,6 @@ struct rig_caps q900_caps =
.hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS
};
-#include <stdint.h>
-
/* ---------------------------------------------------------------------- */
static int q900_init(RIG *rig)
commit 19c2cc03156846d22262536e9cde7f70deff26db
Author: 声纳 <159...@qq...>
Date: Sat Jun 28 11:04:58 2025 +0800
Fix duplicate retval variable definition in guohetec.c probe function
diff --git a/rigs/guohetec/guohetec.c b/rigs/guohetec/guohetec.c
index 64e9be3d8..794425122 100644
--- a/rigs/guohetec/guohetec.c
+++ b/rigs/guohetec/guohetec.c
@@ -301,7 +301,6 @@ DECLARE_PROBERIG_BACKEND(guohetec) {
rig_flush(port);
- int retval = write_block(port, cmd, PMR171_CMD_LENGTH);
int retval = write_block(port, cmd, PMR171_CMD_LENGTH);
if (retval != RIG_OK) {
continue;
commit dee29c555f98413486dd7110b601aa403035970d
Author: 声纳 <159...@qq...>
Date: Sat Jun 28 10:55:20 2025 +0800
Implement consistent error handling for GUOHETEC drivers
- Use unified error handling mechanism in send_cmd2 functions
- Always return RIG_OK to prevent WSJT-X errors
- Update cache with requested values even when communication fails
- Use English comments and debug messages
- Ensure graceful degradation with cached values on protocol/timeout errors
diff --git a/rigs/guohetec/pmr171.c b/rigs/guohetec/pmr171.c
index 386c71ff5..94704378f 100644
--- a/rigs/guohetec/pmr171.c
+++ b/rigs/guohetec/pmr171.c
@@ -548,22 +548,9 @@ static int pmr171_open(RIG *rig)
if (response)
{
- // Read header
- int ret = read_block(rp, reply, 5);
- if (ret < 0) {
- rig_debug(RIG_DEBUG_ERR, "%s: Failed to read header\n", __func__);
- }
-
- // Validate data length
- if (reply[4] == 0 || reply[4] > sizeof(reply) - 5) {
- if (reply[4] == 0 || reply[4] > sizeof(reply) - 5) {
- rig_debug(RIG_DEBUG_ERR, "%s: Invalid data length %d\n", __func__, reply[4]);
- }
-
- // Read data section
- ret = read_block(rp, &reply[5], reply[4]);
- if (ret < 0) {
- rig_debug(RIG_DEBUG_ERR, "%s: Failed to read data\n", __func__);
+ // Use common response reading function
+ if (read_rig_response(rig, reply, sizeof(reply), __func__) < 0) {
+ return RIG_OK; // Return OK to use cached values
}
}
@@ -601,11 +588,22 @@ static int pmr171_open(RIG *rig)
// Read response and validate length
int ret = read_block(rp, reply, sizeof(reply));
if (ret < 0) {
- rig_debug(RIG_DEBUG_ERR, "%s: Failed to read response\n", __func__);
+ rig_debug(RIG_DEBUG_ERR, "%s: Failed to read response, using cached values\n", __func__);
+ // Update cache with requested frequency even if response failed
+ if (vfo == RIG_VFO_B)
+ {
+ CACHE(rig)->freqMainB = freq;
+ }
+ else
+ {
+ CACHE(rig)->freqMainA = freq;
+ }
+ return RIG_OK;
}
dump_hex(reply, 16);
+ // Update cache with requested frequency
if (vfo == RIG_VFO_B)
{
CACHE(rig)->freqMainB = freq;
@@ -660,31 +658,38 @@ static int pmr171_open(RIG *rig)
rig_flush(rp);
write_block(rp, cmd, 10);
- // Read header
- int ret = read_block(rp, reply, 5);
- if (ret < 0) {
- rig_debug(RIG_DEBUG_ERR, "%s: read_block failed for header\n", __func__);
- }
-
- // Validate data length
- if (reply[4] == 0 || reply[4] > sizeof(reply) - 5) {
- rig_debug(RIG_DEBUG_ERR, "%s: invalid reply length %d\n", __func__, reply[4]);
- }
-
- // Read data section
- ret = read_block(rp, &reply[5], reply[4]);
- if (ret < 0) {
- rig_debug(RIG_DEBUG_ERR, "%s: read_block failed for data\n", __func__);
+ // Use common response reading function
+ if (read_rig_response(rig, reply, sizeof(reply), __func__) < 0) {
+ // Update cache with requested mode even if response failed
+ if (vfo == RIG_VFO_B)
+ {
+ CACHE(rig)->modeMainB = mode;
+ }
+ else
+ {
+ CACHE(rig)->modeMainA = mode;
+ }
+ return RIG_OK;
}
// Validate mode field index won't overflow
if (reply[4] < 3) { // Need at least 3 bytes to access reply[6] and reply[7]
- rig_debug(RIG_DEBUG_ERR, "%s: Response too short for mode data\n", __func__);
+ rig_debug(RIG_DEBUG_ERR, "%s: Response too short for mode data, using cached values\n", __func__);
+ // Update cache with requested mode even if validation failed
+ if (vfo == RIG_VFO_B)
+ {
+ CACHE(rig)->modeMainB = mode;
+ }
+ else
+ {
+ CACHE(rig)->modeMainA = mode;
+ }
+ return RIG_OK;
}
dump_hex(reply, reply[4] + 5);
- // Update cache
+ // Update cache with response data
CACHE(rig)->modeMainA = guohe2rmode(reply[6], pmr171_modes);
CACHE(rig)->modeMainB = guohe2rmode(reply[7], pmr171_modes);
diff --git a/rigs/guohetec/q900.c b/rigs/guohetec/q900.c
index 8d4b2c1cc..276861459 100644
--- a/rigs/guohetec/q900.c
+++ b/rigs/guohetec/q900.c
@@ -319,7 +319,6 @@ static int q900_open(RIG *rig)
/* ---------------------------------------------------------------------- */
static int q900_send(RIG *rig, const unsigned char* buff, int len, unsigned char *reply, int rlen)
- static int q900_send(RIG *rig, const unsigned char* buff, int len, unsigned char *reply, int rlen)
{
hamlib_port_t *rp = RIGPORT(rig);
int retry = 5;
@@ -539,43 +538,24 @@ static int q900_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
hamlib_port_t *rp = RIGPORT(rig);
rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__);
unsigned char buf[64] = { 0xa5, 0xa5, 0xa5, 0xa5, 0x04, 0x00, 0x00, 0x00, 0x00 };
-
+
buf[5] = cmd;
buf[6] = value;
unsigned int crc = CRC16Check(&buf[4], 3);
buf[7] = crc >> 8;
buf[8] = crc & 0xff;
-
+
rig_flush(rp);
write_block(rp, buf, 9);
-
+
if (response)
{
- // Read header
- int ret = read_block(rp, reply, 5);
- if (ret < 0) {
- rig_debug(RIG_DEBUG_ERR, "%s: Failed to read header\n", __func__);
- }
-
- // Validate data length
- if (reply[4] == 0 || reply[4] > sizeof(reply) - 5) {
- if (reply[4] == 0 || reply[4] > sizeof(reply) - 5) {
- rig_debug(RIG_DEBUG_ERR, "%s: Invalid data length %d\n", __func__, reply[4]);
- }
-
- // Read data section
- ret = read_block(rp, &reply[5], reply[4]);
- if (ret < 0) {
- rig_debug(RIG_DEBUG_ERR, "%s: Failed to read data\n", __func__);
- }
-
- // Validate response length matches expected
- if (ret != reply[4]) {
- rig_debug(RIG_DEBUG_ERR, "%s: Data read mismatch: expected %d, got %d\n",
- __func__, reply[4], ret);
+ // Use common response reading function
+ if (read_rig_response(rig, reply, sizeof(reply), __func__) < 0) {
+ return RIG_OK; // Return OK to use cached values
}
}
-
+
return q900_read_ack(rig);
}
@@ -586,7 +566,7 @@ static int q900_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
unsigned char cmd[16] = { 0xa5, 0xa5, 0xa5, 0xa5, 11, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
unsigned char reply[16];
hamlib_port_t *rp = RIGPORT(rig);
-
+
rig_debug(RIG_DEBUG_VERBOSE, "q900: requested freq = %"PRIfreq" Hz\n", freq);
if (vfo == RIG_VFO_B)
@@ -609,12 +589,22 @@ static int q900_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
// Read response
int ret = read_block(rp, reply, 16);
if (ret < 0) {
- rig_debug(RIG_DEBUG_ERR, "%s: Failed to read response\n", __func__);
+ rig_debug(RIG_DEBUG_ERR, "%s: Failed to read response, using cached values\n", __func__);
+ // Update cache with requested frequency even if response failed
+ if (vfo == RIG_VFO_B)
+ {
+ CACHE(rig)->freqMainB = freq;
+ }
+ else
+ {
+ CACHE(rig)->freqMainA = freq;
+ }
+ return RIG_OK;
}
dump_hex(reply, 16);
-
+ // Update cache with requested frequency
if (vfo == RIG_VFO_B)
{
CACHE(rig)->freqMainB = freq;
@@ -667,104 +657,67 @@ static int q900_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
rig_flush(rp);
write_block(rp, cmd, 10);
- // Read header
- int ret = read_block(rp, reply, 5);
- if (ret < 0) {
- rig_debug(RIG_DEBUG_ERR, "%s: read_block failed for header\n", __func__);
- }
-
- // Validate data length
- if (reply[4] == 0 || reply[4] > sizeof(reply) - 5) {
- rig_debug(RIG_DEBUG_ERR, "%s: invalid reply length %d\n", __func__, reply[4]);
- }
-
- // Read data section
- ret = read_block(rp, &reply[5], reply[4]);
- if (ret < 0) {
- rig_debug(RIG_DEBUG_ERR, "%s: read_block failed for data\n", __func__);
- }
-
- // Validate response length matches expected
- if (ret != reply[4]) {
- rig_debug(RIG_DEBUG_ERR, "%s: Data read mismatch: expected %d, got %d\n",
- __func__, reply[4], ret);
- }
-
- // Validate mode field index won't overflow
- if (reply[4] < 3) { // Need at least 3 bytes to access reply[6] and reply[7]
- rig_debug(RIG_DEBUG_ERR, "%s: Response too short for mode data\n", __func__);
- }
-
- // Validate mode field indices are within bounds
- if (reply[6] >= GUOHE_MODE_TABLE_MAX) {
- rig_debug(RIG_DEBUG_ERR, "%s: Invalid mode A index %d\n", __func__, reply[6]);
- }
-
- if (reply[7] >= GUOHE_MODE_TABLE_MAX) {
- rig_debug(RIG_DEBUG_ERR, "%s: Invalid mode B index %d\n", __func__, reply[7]);
- }
-
- dump_hex(reply, reply[4] + 5);
-
- CACHE(rig)->modeMainA = guohe2rmode(reply[6], q900_modes);
- CACHE(rig)->modeMainB = guohe2rmode(reply[7], q900_modes);
-
- if (vfo == RIG_VFO_B)
- {
- cmd[6] = rmode2guohe(CACHE(rig)->modeMainA, q900_modes);
- cmd[7] = i;
- }
- else
- {
- cmd[6] = i;
- cmd[7] = rmode2guohe(CACHE(rig)->modeMainB, q900_modes);
- }
-
- int crc = CRC16Check(&cmd[4], 4);
- cmd[8] = crc >> 8;
- cmd[9] = crc & 0xff;
- rig_flush(rp);
- write_block(rp, cmd, 10);
-
- // Read header
- int ret = read_block(rp, reply, 5);
- if (ret < 0) {
- rig_debug(RIG_DEBUG_ERR, "%s: read_block failed for header\n", __func__);
- }
-
- // Validate data length
- if (reply[4] == 0 || reply[4] > sizeof(reply) - 5) {
- rig_debug(RIG_DEBUG_ERR, "%s: invalid reply length %d\n", __func__, reply[4]);
- }
-
- // Read data section
- ret = read_block(rp, &reply[5], reply[4]);
- if (ret < 0) {
- rig_debug(RIG_DEBUG_ERR, "%s: read_block failed for data\n", __func__);
- }
-
- // Validate response length matches expected
- if (ret != reply[4]) {
- rig_debug(RIG_DEBUG_ERR, "%s: Data read mismatch: expected %d, got %d\n",
- __func__, reply[4], ret);
+ // Use common response reading function
+ if (read_rig_response(rig, reply, sizeof(reply), __func__) < 0) {
+ // Update cache with requested mode even if response failed
+ if (vfo == RIG_VFO_B)
+ {
+ CACHE(rig)->modeMainB = mode;
+ }
+ else
+ {
+ CACHE(rig)->modeMainA = mode;
+ }
+ return RIG_OK;
}
// Validate mode field index won't overflow
if (reply[4] < 3) { // Need at least 3 bytes to access reply[6] and reply[7]
- rig_debug(RIG_DEBUG_ERR, "%s: Response too short for mode data\n", __func__);
+ rig_debug(RIG_DEBUG_ERR, "%s: Response too short for mode data, using cached values\n", __func__);
+ // Update cache with requested mode even if validation failed
+ if (vfo == RIG_VFO_B)
+ {
+ CACHE(rig)->modeMainB = mode;
+ }
+ else
+ {
+ CACHE(rig)->modeMainA = mode;
+ }
+ return RIG_OK;
}
// Validate mode field indices are within bounds
if (reply[6] >= GUOHE_MODE_TABLE_MAX) {
- rig_debug(RIG_DEBUG_ERR, "%s: Invalid mode A index %d\n", __func__, reply[6]);
+ rig_debug(RIG_DEBUG_ERR, "%s: Invalid mode A index %d, using cached values\n", __func__, reply[6]);
+ // Update cache with requested mode even if validation failed
+ if (vfo == RIG_VFO_B)
+ {
+ CACHE(rig)->modeMainB = mode;
+ }
+ else
+ {
+ CACHE(rig)->modeMainA = mode;
+ }
+ return RIG_OK;
}
if (reply[7] >= GUOHE_MODE_TABLE_MAX) {
- rig_debug(RIG_DEBUG_ERR, "%s: Invalid mode B index %d\n", __func__, reply[7]);
+ rig_debug(RIG_DEBUG_ERR, "%s: Invalid mode B index %d, using cached values\n", __func__, reply[7]);
+ // Update cache with requested mode even if validation failed
+ if (vfo == RIG_VFO_B)
+ {
+ CACHE(rig)->modeMainB = mode;
+ }
+ else
+ {
+ CACHE(rig)->modeMainA = mode;
+ }
+ return RIG_OK;
}
dump_hex(reply, reply[4] + 5);
+ // Update cache with response data
CACHE(rig)->modeMainA = guohe2rmode(reply[6], q900_modes);
CACHE(rig)->modeMainB = guohe2rmode(reply[7], q900_modes);
@@ -787,7 +740,6 @@ static int q900_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
unsigned char reply[9];
q900_send(rig, cmd, sizeof(cmd), reply, sizeof(reply));
- q900_send(rig, cmd, sizeof(cmd), reply, sizeof(reply));
// Update cache
CACHE(rig)->ptt = ptt;
commit abf6be0b5e80b3d2376ac873ccf2602ad8e8199f
Author: 声纳 <159...@qq...>
Date: Sat Jun 28 10:22:26 2025 +0800
Fix compilation errors in GUOHETEC drivers
- Remove duplicate function declarations in pmr171_send
- Remove duplicate code blocks in pmr171_set_mode
- Remove duplicate pmr171_send calls in pmr171_set_ptt
- Add missing from_be function implementation
- Fix syntax errors that were causing CI failures
diff --git a/rigs/guohetec/guohetec.c b/rigs/guohetec/guohetec.c
index 414bc42ae..64e9be3d8 100644
--- a/rigs/guohetec/guohetec.c
+++ b/rigs/guohetec/guohetec.c
@@ -96,6 +96,26 @@ uint16_t CRC16Check(const unsigned char *buf, int len)
return data;
}
+ /**
+ * Convert from big-endian byte order
+ * @param data Data pointer
+ * @param byte_len Byte length
+ * @return Converted value
+ */
+ unsigned long long from_be(const unsigned char data[], unsigned int byte_len)
+ {
+ unsigned long long result = 0;
+ int i;
+
+ rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
+
+ for (i = 0; i < byte_len; i++)
+ {
+ result = (result << 8) | data[i];
+ }
+
+ return result;
+ }
// Common response validation functions
diff --git a/rigs/guohetec/pmr171.c b/rigs/guohetec/pmr171.c
index e3ca96877..386c71ff5 100644
--- a/rigs/guohetec/pmr171.c
+++ b/rigs/guohetec/pmr171.c
@@ -321,7 +321,6 @@ static int pmr171_open(RIG *rig)
/* ---------------------------------------------------------------------- */
static int pmr171_send(RIG *rig, const unsigned char* buff, int len, unsigned char *reply, int rlen)
- static int pmr171_send(RIG *rig, const unsigned char* buff, int len, unsigned char *reply, int rlen)
{
hamlib_port_t *rp = RIGPORT(rig);
int retry = 5;
@@ -644,16 +643,6 @@ static int pmr171_open(RIG *rig)
unsigned char reply[10];
unsigned char i = rmode2guohe(mode, pmr171_modes);
- if (vfo == RIG_VFO_B)
- {
- cmd[6] = rmode2guohe(CACHE(rig)->modeMainA, pmr171_modes);
- cmd[7] = i;
- }
- else
- {
- cmd[6] = i;
- cmd[7] = rmode2guohe(CACHE(rig)->modeMainB, pmr171_modes);
- }
if (vfo == RIG_VFO_B)
{
cmd[6] = rmode2guohe(CACHE(rig)->modeMainA, pmr171_modes);
@@ -695,39 +684,6 @@ static int pmr171_open(RIG *rig)
dump_hex(reply, reply[4] + 5);
- // Update cache
- CACHE(rig)->modeMainA = guohe2rmode(reply[6], pmr171_modes);
- CACHE(rig)->modeMainB = guohe2rmode(reply[7], pmr171_modes);
- int crc = CRC16Check(&cmd[4], 4);
- cmd[8] = crc >> 8;
- cmd[9] = crc & 0xff;
- rig_flush(rp);
- write_block(rp, cmd, 10);
-
- // Read header
- int ret = read_block(rp, reply, 5);
- if (ret < 0) {
- rig_debug(RIG_DEBUG_ERR, "%s: read_block failed for header\n", __func__);
- }
-
- // Validate data length
- if (reply[4] == 0 || reply[4] > sizeof(reply) - 5) {
- rig_debug(RIG_DEBUG_ERR, "%s: invalid reply length %d\n", __func__, reply[4]);
- }
-
- // Read data section
- ret = read_block(rp, &reply[5], reply[4]);
- if (ret < 0) {
- rig_debug(RIG_DEBUG_ERR, "%s: read_block failed for data\n", __func__);
- }
-
- // Validate mode field index won't overflow
- if (reply[4] < 3) { // Need at least 3 bytes to access reply[6] and reply[7]
- rig_debug(RIG_DEBUG_ERR, "%s: Response too short for mode data\n", __func__);
- }
-
- dump_hex(reply, reply[4] + 5);
-
// Update cache
CACHE(rig)->modeMainA = guohe2rmode(reply[6], pmr171_modes);
CACHE(rig)->modeMainB = guohe2rmode(reply[7], pmr171_modes);
@@ -751,7 +707,6 @@ static int pmr171_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
unsigned char reply[9];
pmr171_send(rig, cmd, sizeof(cmd), reply, sizeof(reply));
- pmr171_send(rig, cmd, sizeof(cmd), reply, sizeof(reply));
CACHE(rig)->ptt = ptt;
commit c9161e2e25d80609d5127ca0c1ebe8e78cb00040
Author: 声纳 <159...@qq...>
Date: Sat Jun 28 10:11:21 2025 +0800
Improve error handling for GUOHETEC drivers to enhance WSJT-X compatibility
- Add graceful degradation for communication errors
- Return cached values instead of error codes on failures
- Implement unified response validation functions
- Add cache return macros for consistent error handling
- Maintain backward compatibility while improving stability
This change ensures WSJT-X and similar applications continue working
even when temporary communication issues occur with GUOHETEC radios.
Fixes: WSJT-X compatibility issues with PMR-171 and Q900 drivers
diff --git a/rigs/guohetec/guohetec.c b/rigs/guohetec/guohetec.c
index 49b1a1a30..414bc42ae 100644
--- a/rigs/guohetec/guohetec.c
+++ b/rigs/guohetec/guohetec.c
@@ -96,7 +96,153 @@ uint16_t CRC16Check(const unsigned char *buf, int len)
return data;
}
-
+
+// Common response validation functions
+
+/**
+ * Read rig response with validation
+ * @param rig RIG structure
+ * @param reply Reply buffer
+ * @param reply_size Size of reply buffer
+ * @param func_name Function name for debug messages
+ * @return 0 on success, -1 on error
+ */
+int read_rig_response(RIG *rig, unsigned char *reply, int reply_size,
+ const char *func_name)
+{
+ hamlib_port_t *rp = RIGPORT(rig);
+ int ret;
+
+ // Read header
+ ret = read_block(rp, reply, 5);
+ if (ret < 0) {
+ rig_debug(RIG_DEBUG_ERR, "%s: Failed to read header, using cached values\n", func_name);
+ return -1;
+ }
+
+ // Validate data length
+ if (reply[4] == 0 || reply[4] > reply_size - 5) {
+ rig_debug(RIG_DEBUG_ERR, "%s: Invalid data length %d, using cached values\n", func_name, reply[4]);
+ return -1;
+ }
+
+ // Read data section
+ ret = read_block(rp, &reply[5], reply[4]);
+ if (ret < 0) {
+ rig_debug(RIG_DEBUG_ERR, "%s: Failed to read data, using cached values\n", func_name);
+ return -1;
+ }
+
+ // Validate response length matches expected
+ if (ret != reply[4]) {
+ rig_debug(RIG_DEBUG_ERR, "%s: Data read mismatch: expected %d, got %d, using cached values\n",
+ func_name, reply[4], ret);
+ return -1;
+ }
+
+ return 0;
+}
+
+/**
+ * Validate basic rig response
+ * @param rig RIG structure
+ * @param reply Reply buffer
+ * @param reply_size Size of reply buffer
+ * @param func_name Function name for debug messages
+ * @return 0 on success, -1 on error
+ */
+int validate_rig_response(RIG *rig, unsigned char *reply, int reply_size,
+ const char *func_name)
+{
+ // Validate packet header
+ VALIDATE_PACKET_HEADER(reply, func_name);
+
+ // Validate data length
+ VALIDATE_DATA_LENGTH(reply, reply_size, func_name);
+
+ return 0;
+}
+
+/**
+ * Validate frequency response with CRC check
+ * @param rig RIG structure
+ * @param reply Reply buffer
+ * @param reply_size Size of reply buffer
+ * @param func_name Function name for debug messages
+ * @return 0 on success, -1 on error
+ */
+int validate_freq_response(RIG *rig, unsigned char *reply, int reply_size,
+ const char *func_name)
+{
+ // Basic validation
+ if (validate_rig_response(rig, reply, reply_size, func_name) < 0) {
+ return -1;
+ }
+
+ // Validate buffer boundaries for CRC
+ int expected_total_length = 5 + reply[4] + 2; // header(5) + data_length + CRC(2)
+ if (expected_total_length > reply_size) {
+ rig_debug(RIG_DEBUG_ERR, "%s: Response too large for buffer: %d > %d, using cached values\n",
+ func_name, expected_total_length, reply_size);
+ return -1;
+ }
+
+ // CRC check
+ uint16_t recv_crc = (reply[31] << 8) | reply[32]; // Last 2 bytes are CRC
+ uint16_t calc_crc = CRC16Check(&reply[4], 27);
+ if (recv_crc != calc_crc) {
+ rig_debug(RIG_DEBUG_ERR, "%s: CRC check failed (received: %04X, calculated: %04X), using cached values\n",
+ func_name, recv_crc, calc_crc);
+ return -1;
+ }
+
+ // Validate frequency field offset
+ int freq_b_offset = 13; // VFOB frequency starting position
+ if (freq_b_offset + 3 >= expected_total_length - 2) { // -2 for CRC
+ rig_debug(RIG_DEBUG_ERR, "%s: Frequency field offset out of bounds, using cached values\n", func_name);
+ return -1;
+ }
+
+ return 0;
+}
+
+/**
+ * Validate mode response with bounds checking
+ * @param rig RIG structure
+ * @pa...
[truncated message content] |
|
From: n0nb <n0...@us...> - 2025-06-27 12:44:19
|
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 862fda58be871ce33f9d946c30d61232dd41549c (commit)
via 5eda68367f86a770cae92d0a601ba1c040714597 (commit)
from 9c187349117592a5a3fe21375c0508c11a262c09 (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 862fda58be871ce33f9d946c30d61232dd41549c
Merge: 9c1873491 5eda68367
Author: Nate Bargmann <n0...@n0...>
Date: Fri Jun 27 07:40:51 2025 -0500
Merge GitHub PR #1786
commit 5eda68367f86a770cae92d0a601ba1c040714597
Author: Mark J. Fine <mar...@fi...>
Date: Fri Jun 27 08:05:03 2025 -0400
Corrected a couple of cppcheck warnings: uninitialize variable and condition always false.
diff --git a/rigs/icom/icom_alt_agc.c b/rigs/icom/icom_alt_agc.c
index 0f163e320..be845b87e 100644
--- a/rigs/icom/icom_alt_agc.c
+++ b/rigs/icom/icom_alt_agc.c
@@ -397,6 +397,7 @@ int icom_rig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
rig_debug(RIG_DEBUG_TRACE, "%s: no extcmd found\n", __func__);
+ cmdbuf[0] = 0x00;
cmd_len = 0;
lvl_cn = C_CTL_FUNC;
@@ -414,7 +415,8 @@ int icom_rig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
/*
* strbuf should contain Cn,Sc,Data area
*/
- cmdhead = ((lvl_sc == -1) ? 1 : 2) + cmd_len;
+ //cmdhead = ((lvl_sc == -1) ? 1 : 2) + cmd_len;
+ cmdhead = 2 + cmd_len;
resp_len -= cmdhead;
if (respbuf[0] != lvl_cn)
-----------------------------------------------------------------------
Summary of changes:
rigs/icom/icom_alt_agc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: n0nb <n0...@us...> - 2025-06-27 12:27:16
|
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 9c187349117592a5a3fe21375c0508c11a262c09 (commit)
via cb308819e7c1f65e6b0045fe154446f06376ad7c (commit)
via 7fe7602a8289fd9bc74a350ea084c72640c319ad (commit)
from 36f582222f6a460735cf0538990cfc20fd46888e (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 9c187349117592a5a3fe21375c0508c11a262c09
Author: Nate Bargmann <n0...@n0...>
Date: Fri Jun 27 07:22:21 2025 -0500
Update NEWS for recent merges
diff --git a/NEWS b/NEWS
index 31627e686..8e7e076a8 100644
--- a/NEWS
+++ b/NEWS
@@ -22,6 +22,11 @@ Version 4.7.0
* Remove dead getopt code. GitHub PR #1709. (TNX Daniele Forsi)
* Move rig_cache to separate(calloc) storage. Prepare for other moves.
Issue #1420
+ * Many fixes for SWIG binding generation and improved Python support
+ and testing. (TNX Daniele Forsi).
+ * Fix AGC for IC-R75, fix AGC for all Icom rigs. (TNX Mark Fine).
+ * Separate PMR-171 and Q900 into new the GUOHETEC backend, add
+ additional support add clean up code. (TNX FVsonar).
Version 4.6.3
* 2025-06-10
commit cb308819e7c1f65e6b0045fe154446f06376ad7c
Merge: 36f582222 7fe7602a8
Author: Nate Bargmann <n0...@n0...>
Date: Fri Jun 27 06:53:07 2025 -0500
Merge GitHub PR #1785
commit 7fe7602a8289fd9bc74a350ea084c72640c319ad
Author: 声纳 <159...@qq...>
Date: Fri Jun 27 11:12:46 2025 +0800
Delete redundant functions and structures in guohetec. c, pmr171. c, and q900. c, optimize code structure, fix data length verification logic, and ensure the security and stability of data processing. All cppcheck style warnings have been fixed
diff --git a/rigs/guohetec/guohetec.c b/rigs/guohetec/guohetec.c
index 8f074f23b..49b1a1a30 100644
--- a/rigs/guohetec/guohetec.c
+++ b/rigs/guohetec/guohetec.c
@@ -97,23 +97,6 @@ uint16_t CRC16Check(const unsigned char *buf, int len)
}
- unsigned long long from_be(const unsigned char data[],
- unsigned int byte_len)
- {
- int i;
- unsigned long long f = 0;
-
- rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
-
- for (i = 0; i < byte_len; i++)
- {
- f = (f << 8) + data[i];
- }
-
- return f;
- }
-
-
// Initialization function
DECLARE_INITRIG_BACKEND(guohetec) {
rig_debug(RIG_DEBUG_VERBOSE, "%s: Initializing guohetec \n", __func__);
@@ -136,7 +119,6 @@ DECLARE_PROBERIG_BACKEND(guohetec) {
};
uint8_t reply[PMR171_REPLY_LENGTH];
- int retval;
int orig_rate = port->parm.serial.rate;
int orig_timeout = port->timeout;
@@ -153,7 +135,7 @@ DECLARE_PROBERIG_BACKEND(guohetec) {
rig_flush(port);
- retval = write_block(port, cmd, PMR171_CMD_LENGTH);
+ int retval = write_block(port, cmd, PMR171_CMD_LENGTH);
if (retval != RIG_OK) {
continue;
}
diff --git a/rigs/guohetec/pmr171.c b/rigs/guohetec/pmr171.c
index b876ed989..c89fa6744 100644
--- a/rigs/guohetec/pmr171.c
+++ b/rigs/guohetec/pmr171.c
@@ -18,31 +18,6 @@
#include <unistd.h>
-struct pmr171_priv_data
-{
- /* rx status */
- struct timeval rx_status_tv;
- unsigned char rx_status;
-
- /* tx status */
- struct timeval tx_status_tv;
- unsigned char tx_status; /* Raw data from rig. Highest bit 0 = PTT */
-
- /* tx levels */
- struct timeval tx_level_tv;
- unsigned char swr_level;
- unsigned char alc_level;
- unsigned char mod_level;
- unsigned char pwr_level; /* TX power level */
-
- /* freq & mode status */
- struct timeval fm_status_tv;
- unsigned char fm_status[5]; /* 5 bytes, NOT related to YAESU_CMD_LENGTH */
- /* Digi mode is not part of regular fm_status response.
- * So keep track of it in a separate variable. */
- unsigned char dig_mode;
-};
-
typedef struct pmr171_data_s
{
char ptt;
@@ -345,7 +320,7 @@ static int pmr171_open(RIG *rig)
/* ---------------------------------------------------------------------- */
- static int pmr171_send(RIG *rig, unsigned char* buff, int len, unsigned char *reply, int rlen)
+ static int pmr171_send(RIG *rig, const unsigned char* buff, int len, unsigned char *reply, int rlen)
{
hamlib_port_t *rp = RIGPORT(rig);
int retry = 5;
@@ -401,10 +376,7 @@ static int pmr171_open(RIG *rig)
// Receive buffer (complete response packet should be 33 bytes)
unsigned char reply[40];
- int ret = pmr171_send(rig, cmd, sizeof(cmd), reply, sizeof(reply));
- if (ret != RIG_OK) {
- rig_debug(RIG_DEBUG_ERR, "%s: Communication failure, error code=%d\n", __func__, ret);
- }
+ pmr171_send(rig, cmd, sizeof(cmd), reply, sizeof(reply));
/* ----------- Protocol validation ----------- */
// 1. Check packet header
@@ -472,7 +444,7 @@ static int pmr171_open(RIG *rig)
{
struct rig_cache *cachep = CACHE(rig);
hamlib_port_t *rp = RIGPORT(rig);
- pmr171_data_t *p = (pmr171_data_t *) STATE(rig)->priv;
+ const pmr171_data_t *p = (pmr171_data_t *) STATE(rig)->priv;
unsigned char reply[40];
// Get latest status from hardware
@@ -482,22 +454,26 @@ static int pmr171_open(RIG *rig)
int ret = read_block(rp, reply, 5);
if (ret < 0) {
rig_debug(RIG_DEBUG_ERR, "%s: Failed to read header\n", __func__);
+ return -RIG_ETIMEOUT;
}
// Validate data length
- if (reply[4] <= 0 || reply[4] > sizeof(reply) - 5) {
+ if (reply[4] == 0 || reply[4] > sizeof(reply) - 5) {
rig_debug(RIG_DEBUG_ERR, "%s: Invalid data length %d\n", __func__, reply[4]);
+ return -RIG_EPROTO;
}
// Read data section
ret = read_block(rp, &reply[5], reply[4]);
if (ret < 0) {
rig_debug(RIG_DEBUG_ERR, "%s: Failed to read data\n", __func__);
+ return -RIG_ETIMEOUT;
}
// Validate mode field index won't overflow
if (reply[4] < 5) { // Need at least 5 bytes to access reply[7] and reply[8]
rig_debug(RIG_DEBUG_ERR, "%s: Response too short for mode data\n", __func__);
+ return -RIG_EPROTO;
}
// Update cache
@@ -533,22 +509,26 @@ static int pmr171_open(RIG *rig)
int ret = read_block(rp, reply, 5);
if (ret < 0) {
rig_debug(RIG_DEBUG_ERR, "%s: Failed to read header\n", __func__);
+ return -RIG_ETIMEOUT;
}
// Validate data length
- if (reply[4] <= 0 || reply[4] > sizeof(reply) - 5) {
+ if (reply[4] == 0 || reply[4] > sizeof(reply) - 5) {
rig_debug(RIG_DEBUG_ERR, "%s: Invalid data length %d\n", __func__, reply[4]);
+ return -RIG_EPROTO;
}
// Read data section
ret = read_block(rp, &reply[5], reply[4]);
if (ret < 0) {
rig_debug(RIG_DEBUG_ERR, "%s: Failed to read data\n", __func__);
+ return -RIG_ETIMEOUT;
}
// Validate VFO status field index won't overflow
if (reply[4] < 13) { // Need at least 13 bytes to access reply[17]
rig_debug(RIG_DEBUG_ERR, "%s: Response too short for VFO data\n", __func__);
+ return -RIG_EPROTO;
}
// According to protocol doc, reply[17] is A/B frequency status
@@ -570,22 +550,26 @@ static int pmr171_open(RIG *rig)
int ret = read_block(rp, reply, 5);
if (ret < 0) {
rig_debug(RIG_DEBUG_ERR, "%s: Failed to read header\n", __func__);
+ return -RIG_ETIMEOUT;
}
// Validate data length
- if (reply[4] <= 0 || reply[4] > sizeof(reply) - 5) {
+ if (reply[4] == 0 || reply[4] > sizeof(reply) - 5) {
rig_debug(RIG_DEBUG_ERR, "%s: Invalid data length %d\n", __func__, reply[4]);
+ return -RIG_EPROTO;
}
// Read data section
ret = read_block(rp, &reply[5], reply[4]);
if (ret < 0) {
rig_debug(RIG_DEBUG_ERR, "%s: Failed to read data\n", __func__);
+ return -RIG_ETIMEOUT;
}
// Validate PTT status field index won't overflow
if (reply[4] < 2) { // Need at least 2 bytes to access reply[6]
rig_debug(RIG_DEBUG_ERR, "%s: Response too short for PTT data\n", __func__);
+ return -RIG_EPROTO;
}
// Get PTT status
@@ -650,7 +634,7 @@ static int pmr171_open(RIG *rig)
}
// Validate data length
- if (reply[4] <= 0 || reply[4] > sizeof(reply) - 5) {
+ if (reply[4] == 0 || reply[4] > sizeof(reply) - 5) {
rig_debug(RIG_DEBUG_ERR, "%s: Invalid data length %d\n", __func__, reply[4]);
}
@@ -735,60 +719,53 @@ static int pmr171_open(RIG *rig)
hamlib_port_t *rp = RIGPORT(rig);
unsigned char cmd[10] = { 0xa5, 0xa5, 0xa5, 0xa5, 5, 0x0a, 0x00, 0x00, 0x00, 0x00 };
unsigned char reply[10];
- int crc;
unsigned char i = rmode2guohe(mode, pmr171_modes);
- if (i != (-1))
+ if (vfo == RIG_VFO_B)
{
- if (vfo == RIG_VFO_B)
- {
- cmd[6] = rmode2guohe(CACHE(rig)->modeMainA, pmr171_modes);
- cmd[7] = i;
- }
- else
- {
- cmd[6] = i;
- cmd[7] = rmode2guohe(CACHE(rig)->modeMainB, pmr171_modes);
- }
-
- crc = CRC16Check(&cmd[4], 4);
- cmd[8] = crc >> 8;
- cmd[9] = crc & 0xff;
- rig_flush(rp);
- write_block(rp, cmd, 10);
-
- // Read header
- int ret = read_block(rp, reply, 5);
- if (ret < 0) {
- rig_debug(RIG_DEBUG_ERR, "%s: read_block failed for header\n", __func__);
- }
-
- // Validate data length
- if (reply[4] <= 0 || reply[4] > sizeof(reply) - 5) {
- rig_debug(RIG_DEBUG_ERR, "%s: invalid reply length %d\n", __func__, reply[4]);
- }
-
- // Read data section
- ret = read_block(rp, &reply[5], reply[4]);
- if (ret < 0) {
- rig_debug(RIG_DEBUG_ERR, "%s: read_block failed for data\n", __func__);
- }
-
- // Validate mode field index won't overflow
- if (reply[4] < 3) { // Need at least 3 bytes to access reply[6] and reply[7]
- rig_debug(RIG_DEBUG_ERR, "%s: Response too short for mode data\n", __func__);
- }
-
- dump_hex(reply, reply[4] + 5);
-
- // Update cache
- CACHE(rig)->modeMainA = guohe2rmode(reply[6], pmr171_modes);
- CACHE(rig)->modeMainB = guohe2rmode(reply[7], pmr171_modes);
+ cmd[6] = rmode2guohe(CACHE(rig)->modeMainA, pmr171_modes);
+ cmd[7] = i;
+ }
+ else
+ {
+ cmd[6] = i;
+ cmd[7] = rmode2guohe(CACHE(rig)->modeMainB, pmr171_modes);
+ }
- return RIG_OK;
+ int crc = CRC16Check(&cmd[4], 4);
+ cmd[8] = crc >> 8;
+ cmd[9] = crc & 0xff;
+ rig_flush(rp);
+ write_block(rp, cmd, 10);
+
+ // Read header
+ int ret = read_block(rp, reply, 5);
+ if (ret < 0) {
+ rig_debug(RIG_DEBUG_ERR, "%s: read_block failed for header\n", __func__);
}
+
+ // Validate data length
+ if (reply[4] == 0 || reply[4] > sizeof(reply) - 5) {
+ rig_debug(RIG_DEBUG_ERR, "%s: invalid reply length %d\n", __func__, reply[4]);
+ }
+
+ // Read data section
+ ret = read_block(rp, &reply[5], reply[4]);
+ if (ret < 0) {
+ rig_debug(RIG_DEBUG_ERR, "%s: read_block failed for data\n", __func__);
+ }
+
+ // Validate mode field index won't overflow
+ if (reply[4] < 3) { // Need at least 3 bytes to access reply[6] and reply[7]
+ rig_debug(RIG_DEBUG_ERR, "%s: Response too short for mode data\n", __func__);
+ }
+
+ dump_hex(reply, reply[4] + 5);
+
+ // Update cache
+ CACHE(rig)->modeMainA = guohe2rmode(reply[6], pmr171_modes);
+ CACHE(rig)->modeMainB = guohe2rmode(reply[7], pmr171_modes);
- rig_debug(RIG_DEBUG_ERR, "%s: invalid mode=%s\n", __func__, rig_strrmode(mode));
return RIG_OK;
}
@@ -807,10 +784,7 @@ static int pmr171_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
cmd[8] = crc & 0xff;
unsigned char reply[9];
- int ret = pmr171_send(rig, cmd, sizeof(cmd), reply, sizeof(reply));
- if (ret != RIG_OK) {
- rig_debug(RIG_DEBUG_ERR, "%s: PTT command failed\n", __func__);
- }
+ pmr171_send(rig, cmd, sizeof(cmd), reply, sizeof(reply));
CACHE(rig)->ptt = ptt;
diff --git a/rigs/guohetec/q900.c b/rigs/guohetec/q900.c
index 29017b1a6..92973740a 100644
--- a/rigs/guohetec/q900.c
+++ b/rigs/guohetec/q900.c
@@ -17,31 +17,6 @@
#include <stdint.h>
#include <unistd.h>
-struct q900_priv_data
-{
- /* rx status */
- struct timeval rx_status_tv;
- unsigned char rx_status;
-
- /* tx status */
- struct timeval tx_status_tv;
- unsigned char tx_status; /* Raw data from rig. Highest bit 0 = PTT */
-
- /* tx levels */
- struct timeval tx_level_tv;
- unsigned char swr_level;
- unsigned char alc_level;
- unsigned char mod_level;
- unsigned char pwr_level; /* TX power level */
-
- /* freq & mode status */
- struct timeval fm_status_tv;
- unsigned char fm_status[5]; /* 5 bytes, NOT related to YAESU_CMD_LENGTH */
- /* Digi mode is not part of regular fm_status response.
- * So keep track of it in a separate variable. */
- unsigned char dig_mode;
-};
-
typedef struct q900_data_s
{
char ptt;
@@ -344,7 +319,7 @@ static int q900_open(RIG *rig)
/* ---------------------------------------------------------------------- */
- static int q900_send(RIG *rig, unsigned char* buff, int len, unsigned char *reply, int rlen)
+ static int q900_send(RIG *rig, const unsigned char* buff, int len, unsigned char *reply, int rlen)
{
hamlib_port_t *rp = RIGPORT(rig);
int retry = 5;
@@ -397,18 +372,16 @@ static int q900_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
cmd[7] = crc & 0xFF;
unsigned char reply[40];
- int ret = q900_send(rig, cmd, sizeof(cmd), reply, sizeof(reply));
- if (ret != RIG_OK) {
- rig_debug(RIG_DEBUG_ERR, "%s: Communication failure, error code=%d\n", __func__, ret);
- }
+ q900_send(rig, cmd, sizeof(cmd), reply, sizeof(reply));
if (reply[0] != 0xA5 || reply[1] != 0xA5 ||
reply[2] != 0xA5 || reply[3] != 0xA5) {
rig_debug(RIG_DEBUG_ERR, "%s: Invalid packet header\n", __func__);
}
- if (reply[4] != 0x1B) {
- rig_debug(RIG_DEBUG_ERR, "%s: Invalid packet length %d\n", __func__, reply[4]);
+ if (reply[4] == 0 || reply[4] > sizeof(reply) - 5) {
+ rig_debug(RIG_DEBUG_ERR, "%s: Invalid data length %d\n", __func__, reply[4]);
+ return -RIG_EPROTO;
}
// Validate buffer boundaries - ensure enough space for CRC
@@ -459,7 +432,7 @@ static int q900_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
{
struct rig_cache *cachep = CACHE(rig);
hamlib_port_t *rp = RIGPORT(rig);
- q900_data_t *p = (q900_data_t *) STATE(rig)->priv;
+ const q900_data_t *p = (q900_data_t *) STATE(rig)->priv;
unsigned char reply[255];
q900_send_cmd1(rig, 0x0b, 0);
@@ -468,37 +441,44 @@ static int q900_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
int ret = read_block(rp, reply, 5);
if (ret < 0) {
rig_debug(RIG_DEBUG_ERR, "%s: Failed to read header\n", __func__);
+ return -RIG_ETIMEOUT;
}
// Validate data length
- if (reply[4] <= 0 || reply[4] > sizeof(reply) - 5) {
+ if (reply[4] == 0 || reply[4] > sizeof(reply) - 5) {
rig_debug(RIG_DEBUG_ERR, "%s: Invalid data length %d\n", __func__, reply[4]);
+ return -RIG_EPROTO;
}
// Read data section
ret = read_block(rp, &reply[5], reply[4]);
if (ret < 0) {
rig_debug(RIG_DEBUG_ERR, "%s: Failed to read data\n", __func__);
+ return -RIG_ETIMEOUT;
}
// Validate response length matches expected
if (ret != reply[4]) {
rig_debug(RIG_DEBUG_ERR, "%s: Data read mismatch: expected %d, got %d\n",
__func__, reply[4], ret);
+ return -RIG_EPROTO;
}
// Validate mode field index won't overflow
if (reply[4] < 5) { // Need at least 5 bytes to access reply[7] and reply[8]
rig_debug(RIG_DEBUG_ERR, "%s: Response too short for mode data\n", __func__);
+ return -RIG_EPROTO;
}
// Validate mode field indices are within bounds
if (reply[7] >= GUOHE_MODE_TABLE_MAX) {
rig_debug(RIG_DEBUG_ERR, "%s: Invalid mode A index %d\n", __func__, reply[7]);
+ return -RIG_EPROTO;
}
if (reply[8] >= GUOHE_MODE_TABLE_MAX) {
rig_debug(RIG_DEBUG_ERR, "%s: Invalid mode B index %d\n", __func__, reply[8]);
+ return -RIG_EPROTO;
}
cachep->modeMainA = guohe2rmode(reply[7], q900_modes);
@@ -531,33 +511,39 @@ static int q900_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
int ret = read_block(rp, reply, 5);
if (ret < 0) {
rig_debug(RIG_DEBUG_ERR, "%s: Failed to read header\n", __func__);
+ return -RIG_ETIMEOUT;
}
// Validate data length
- if (reply[4] <= 0 || reply[4] > sizeof(reply) - 5) {
+ if (reply[4] == 0 || reply[4] > sizeof(reply) - 5) {
rig_debug(RIG_DEBUG_ERR, "%s: Invalid data length %d\n", __func__, reply[4]);
+ return -RIG_EPROTO;
}
// Read data section
ret = read_block(rp, &reply[5], reply[4]);
if (ret < 0) {
rig_debug(RIG_DEBUG_ERR, "%s: Failed to read data\n", __func__);
+ return -RIG_ETIMEOUT;
}
// Validate response length matches expected
if (ret != reply[4]) {
rig_debug(RIG_DEBUG_ERR, "%s: Data read mismatch: expected %d, got %d\n",
__func__, reply[4], ret);
+ return -RIG_EPROTO;
}
// Validate VFO status field index won't overflow
if (reply[4] < 13) { // Need at least 13 bytes to access reply[17]
rig_debug(RIG_DEBUG_ERR, "%s: Response too short for VFO data\n", __func__);
+ return -RIG_EPROTO;
}
// Validate VFO status value
if (reply[17] != 0 && reply[17] != 1) {
rig_debug(RIG_DEBUG_ERR, "%s: Invalid VFO status value %d\n", __func__, reply[17]);
+ return -RIG_EPROTO;
}
*vfo = (reply[17] == 1) ? RIG_VFO_B : RIG_VFO_A;
@@ -578,33 +564,39 @@ static int q900_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
int ret = read_block(rp, reply, 5);
if (ret < 0) {
rig_debug(RIG_DEBUG_ERR, "%s: Failed to read header\n", __func__);
+ return -RIG_ETIMEOUT;
}
// Validate data length
- if (reply[4] <= 0 || reply[4] > sizeof(reply) - 5) {
+ if (reply[4] == 0 || reply[4] > sizeof(reply) - 5) {
rig_debug(RIG_DEBUG_ERR, "%s: Invalid data length %d\n", __func__, reply[4]);
+ return -RIG_EPROTO;
}
// Read data section
ret = read_block(rp, &reply[5], reply[4]);
if (ret < 0) {
rig_debug(RIG_DEBUG_ERR, "%s: Failed to read data\n", __func__);
+ return -RIG_ETIMEOUT;
}
// Validate response length matches expected
if (ret != reply[4]) {
rig_debug(RIG_DEBUG_ERR, "%s: Data read mismatch: expected %d, got %d\n",
__func__, reply[4], ret);
+ return -RIG_EPROTO;
}
// Validate PTT status field index won't overflow
if (reply[4] < 2) { // Need at least 2 bytes to access reply[6]
rig_debug(RIG_DEBUG_ERR, "%s: Response too short for PTT data\n", __func__);
+ return -RIG_EPROTO;
}
// Validate PTT status value
if (reply[6] != 0 && reply[6] != 1) {
rig_debug(RIG_DEBUG_ERR, "%s: Invalid PTT status value %d\n", __func__, reply[6]);
+ return -RIG_EPROTO;
}
cachep->ptt = reply[6];
@@ -671,7 +663,7 @@ static int q900_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
}
// Validate data length
- if (reply[4] <= 0 || reply[4] > sizeof(reply) - 5) {
+ if (reply[4] == 0 || reply[4] > sizeof(reply) - 5) {
rig_debug(RIG_DEBUG_ERR, "%s: Invalid data length %d\n", __func__, reply[4]);
}
@@ -760,74 +752,67 @@ static int q900_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
hamlib_port_t *rp = RIGPORT(rig);
unsigned char cmd[10] = { 0xa5, 0xa5, 0xa5, 0xa5, 5, 0x0a, 0x00, 0x00, 0x00, 0x00 };
unsigned char reply[10];
- int crc;
unsigned char i = rmode2guohe(mode, q900_modes);
-
- if (i != (-1))
+
+ if (vfo == RIG_VFO_B)
{
- if (vfo == RIG_VFO_B)
- {
- cmd[6] = rmode2guohe(CACHE(rig)->modeMainA, q900_modes);
- cmd[7] = i;
- }
- else
- {
- cmd[6] = i;
- cmd[7] = rmode2guohe(CACHE(rig)->modeMainB, q900_modes);
- }
-
- crc = CRC16Check(&cmd[4], 4);
- cmd[8] = crc >> 8;
- cmd[9] = crc & 0xff;
- rig_flush(rp);
- write_block(rp, cmd, 10);
-
- // Read header
- int ret = read_block(rp, reply, 5);
- if (ret < 0) {
- rig_debug(RIG_DEBUG_ERR, "%s: read_block failed for header\n", __func__);
- }
-
- // Validate data length
- if (reply[4] <= 0 || reply[4] > sizeof(reply) - 5) {
- rig_debug(RIG_DEBUG_ERR, "%s: invalid reply length %d\n", __func__, reply[4]);
- }
-
- // Read data section
- ret = read_block(rp, &reply[5], reply[4]);
- if (ret < 0) {
- rig_debug(RIG_DEBUG_ERR, "%s: read_block failed for data\n", __func__);
- }
-
- // Validate response length matches expected
- if (ret != reply[4]) {
- rig_debug(RIG_DEBUG_ERR, "%s: Data read mismatch: expected %d, got %d\n",
- __func__, reply[4], ret);
- }
-
- // Validate mode field index won't overflow
- if (reply[4] < 3) { // Need at least 3 bytes to access reply[6] and reply[7]
- rig_debug(RIG_DEBUG_ERR, "%s: Response too short for mode data\n", __func__);
- }
-
- // Validate mode field indices are within bounds
- if (reply[6] >= GUOHE_MODE_TABLE_MAX) {
- rig_debug(RIG_DEBUG_ERR, "%s: Invalid mode A index %d\n", __func__, reply[6]);
- }
-
- if (reply[7] >= GUOHE_MODE_TABLE_MAX) {
- rig_debug(RIG_DEBUG_ERR, "%s: Invalid mode B index %d\n", __func__, reply[7]);
- }
-
- dump_hex(reply, reply[4] + 5);
-
- CACHE(rig)->modeMainA = guohe2rmode(reply[6], q900_modes);
- CACHE(rig)->modeMainB = guohe2rmode(reply[7], q900_modes);
+ cmd[6] = rmode2guohe(CACHE(rig)->modeMainA, q900_modes);
+ cmd[7] = i;
+ }
+ else
+ {
+ cmd[6] = i;
+ cmd[7] = rmode2guohe(CACHE(rig)->modeMainB, q900_modes);
+ }
- return RIG_OK;
+ int crc = CRC16Check(&cmd[4], 4);
+ cmd[8] = crc >> 8;
+ cmd[9] = crc & 0xff;
+ rig_flush(rp);
+ write_block(rp, cmd, 10);
+
+ // Read header
+ int ret = read_block(rp, reply, 5);
+ if (ret < 0) {
+ rig_debug(RIG_DEBUG_ERR, "%s: read_block failed for header\n", __func__);
}
-
- rig_debug(RIG_DEBUG_ERR, "%s: invalid mode=%s\n", __func__, rig_strrmode(mode));
+
+ // Validate data length
+ if (reply[4] == 0 || reply[4] > sizeof(reply) - 5) {
+ rig_debug(RIG_DEBUG_ERR, "%s: invalid reply length %d\n", __func__, reply[4]);
+ }
+
+ // Read data section
+ ret = read_block(rp, &reply[5], reply[4]);
+ if (ret < 0) {
+ rig_debug(RIG_DEBUG_ERR, "%s: read_block failed for data\n", __func__);
+ }
+
+ // Validate response length matches expected
+ if (ret != reply[4]) {
+ rig_debug(RIG_DEBUG_ERR, "%s: Data read mismatch: expected %d, got %d\n",
+ __func__, reply[4], ret);
+ }
+
+ // Validate mode field index won't overflow
+ if (reply[4] < 3) { // Need at least 3 bytes to access reply[6] and reply[7]
+ rig_debug(RIG_DEBUG_ERR, "%s: Response too short for mode data\n", __func__);
+ }
+
+ // Validate mode field indices are within bounds
+ if (reply[6] >= GUOHE_MODE_TABLE_MAX) {
+ rig_debug(RIG_DEBUG_ERR, "%s: Invalid mode A index %d\n", __func__, reply[6]);
+ }
+
+ if (reply[7] >= GUOHE_MODE_TABLE_MAX) {
+ rig_debug(RIG_DEBUG_ERR, "%s: Invalid mode B index %d\n", __func__, reply[7]);
+ }
+
+ dump_hex(reply, reply[4] + 5);
+
+ CACHE(rig)->modeMainA = guohe2rmode(reply[6], q900_modes);
+ CACHE(rig)->modeMainB = guohe2rmode(reply[7], q900_modes);
+
return RIG_OK;
}
@@ -846,10 +831,7 @@ static int q900_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
cmd[8] = crc & 0xff;
unsigned char reply[9];
- int ret = q900_send(rig, cmd, sizeof(cmd), reply, sizeof(reply));
- if (ret != RIG_OK) {
- rig_debug(RIG_DEBUG_ERR, "%s: PTT command failed\n", __func__);
- }
+ q900_send(rig, cmd, sizeof(cmd), reply, sizeof(reply));
// Update cache
CACHE(rig)->ptt = ptt;
-----------------------------------------------------------------------
Summary of changes:
NEWS | 5 ++
rigs/guohetec/guohetec.c | 20 +----
rigs/guohetec/pmr171.c | 148 +++++++++++++++---------------------
rigs/guohetec/q900.c | 192 +++++++++++++++++++++--------------------------
4 files changed, 154 insertions(+), 211 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: n0nb <n0...@us...> - 2025-06-27 11:50:21
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hamlib -- Ham radio control libraries".
The branch, master has been updated
via 36f582222f6a460735cf0538990cfc20fd46888e (commit)
via bf518c06098d68ce5cae6e58812b78ff46d5be05 (commit)
via 6c399b55ffd9027de2c0958d43b8f5fcb07d4d97 (commit)
via 7223fb0766468fabe2c40b3a3d0e309c9b1abfa1 (commit)
via 453e68c6cd6d5b21286cc914773cfdb029ca86c7 (commit)
from ef3e2782031967ffb6feeb5176cc47cd2e080f4b (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 36f582222f6a460735cf0538990cfc20fd46888e
Merge: ef3e27820 bf518c060
Author: Nate Bargmann <n0...@n0...>
Date: Fri Jun 27 06:36:16 2025 -0500
Merge GitHub PR #1784
commit bf518c06098d68ce5cae6e58812b78ff46d5be05
Author: Daniele Forsi IU5HKX <iu...@gm...>
Date: Wed Jun 25 23:02:31 2025 +0200
Fix Rig.get_ant()
The only supported value for get_ant() in the union of "option"
is signed integer.
Do the test when the rig is open.
diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py
index 9be7fd79e..1c3927cb0 100755
--- a/bindings/python/test_rig.py
+++ b/bindings/python/test_rig.py
@@ -59,6 +59,11 @@ class TestClass:
assert rig.get_split_vfo() == [5000000, 1]
assert rig.get_split_vfo(Hamlib.RIG_VFO_CURR) == [5000000, 1]
+ # FIXME should use a RIG_ANT_* constant but it isn't available in the bindings
+ RIG_ANT_UNKNOWN = 1<<30
+ assert rig.get_ant(Hamlib.RIG_VFO_A) == [RIG_ANT_UNKNOWN, RIG_ANT_UNKNOWN, Hamlib.RIG_VFO_A, 0]
+ assert rig.get_ant(Hamlib.RIG_VFO_A, Hamlib.RIG_VFO_A) == [RIG_ANT_UNKNOWN, RIG_ANT_UNKNOWN, Hamlib.RIG_VFO_A, 0]
+
assert rig.close() is None
assert rig.state.comm_state == 0
info = rig.get_info()
@@ -72,12 +77,6 @@ class TestClass:
assert rig.close() is None
assert rig.ext_token_lookup("") is None
- option = Hamlib.value_t()
- ant = 0 # FIXME should use a RIG_ANT_* constant but it isn't available in the bindings
- with raises(AssertionError): # FIXME
- assert len(rig.get_ant(option, ant)) == 4
- assert len(rig.get_ant(option, ant, Hamlib.RIG_VFO_CURR)) == 4
- assert option.i == 0
assert rig.get_chan_all() is None
channel = 0
readonly = 0
@@ -158,10 +157,12 @@ class TestClass:
assert rig.scan(0, 0, 0) is None
assert rig.send_dtmf(0, "") is None
assert rig.send_morse(0, "") is None
+ # FIXME should use a RIG_ANT_* constant but it isn't available in the bindings
+ RIG_ANT_1 = 1<<0
option = Hamlib.value_t()
- option.i = 0 # FIXME should use a RIG_ANT_* constant but it isn't available in the bindings
+ option.i = 0
assert rig.set_ant(Hamlib.RIG_VFO_CURR, option) is None
- assert rig.set_ant(Hamlib.RIG_VFO_CURR, option, 0) is None
+ assert rig.set_ant(Hamlib.RIG_VFO_CURR, option, RIG_ANT_1) is None
assert rig.set_bank(0, 0) is None
channel = Hamlib.channel()
channel = Hamlib.channel(0)
diff --git a/bindings/rig.swg b/bindings/rig.swg
index 5c086b330..f87e44847 100644
--- a/bindings/rig.swg
+++ b/bindings/rig.swg
@@ -473,7 +473,7 @@ typedef channel_t * const_channel_t_p;
METHOD1VGET(get_rit, shortfreq_t)
METHOD1VGET(get_xit, shortfreq_t)
METHOD1VGET(get_ts, shortfreq_t)
- extern void get_ant(ant_t *OUTPUT, ant_t *OUTPUT, ant_t *OUTPUT, value_t *OUTPUT, ant_t ant, vfo_t vfo = RIG_VFO_CURR);
+ extern void get_ant(ant_t *OUTPUT, ant_t *OUTPUT, ant_t *OUTPUT, signed int *OUTPUT, ant_t ant, vfo_t vfo = RIG_VFO_CURR);
void get_vfo_info (int *satmode, split_t *split, pbwidth_t *width, rmode_t *mode, freq_t *freq, vfo_t vfo = RIG_VFO_CURR)
{ self->error_status = rig_get_vfo_info(self->rig, vfo, freq, mode, width, split, satmode); }
METHOD1VGET(get_mem, int)
@@ -623,9 +623,11 @@ void Rig_get_split_freq_mode(Rig *self, vfo_t vfo, freq_t *tx_freq, rmode_t *tx_
/*
* these ones return 4 values
*/
-void Rig_get_ant(Rig *self, ant_t *ant_rx, ant_t *ant_tx, ant_t *ant_curr, value_t *option, ant_t ant, vfo_t vfo)
+void Rig_get_ant(Rig *self, ant_t *ant_rx, ant_t *ant_tx, ant_t *ant_curr, signed int *option, ant_t ant, vfo_t vfo)
{
- self->error_status = rig_get_ant(self->rig, vfo, ant, option, ant_curr, ant_tx, ant_rx);
+ value_t value;
+ self->error_status = rig_get_ant(self->rig, vfo, ant, &value, ant_curr, ant_tx, ant_rx);
+ *option = value.i;
}
struct channel *Rig_get_chan_all(Rig *self)
commit 6c399b55ffd9027de2c0958d43b8f5fcb07d4d97
Author: Daniele Forsi IU5HKX <iu...@gm...>
Date: Wed Jun 25 19:49:58 2025 +0200
Assert the length of sequences instead of the list datatype
We only need to check how many values exist.
diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py
index 7b3adc1b5..9be7fd79e 100755
--- a/bindings/python/test_rig.py
+++ b/bindings/python/test_rig.py
@@ -74,8 +74,9 @@ class TestClass:
assert rig.ext_token_lookup("") is None
option = Hamlib.value_t()
ant = 0 # FIXME should use a RIG_ANT_* constant but it isn't available in the bindings
- assert isinstance(rig.get_ant(option, ant), list)
- assert isinstance(rig.get_ant(option, ant, Hamlib.RIG_VFO_CURR), list)
+ with raises(AssertionError): # FIXME
+ assert len(rig.get_ant(option, ant)) == 4
+ assert len(rig.get_ant(option, ant, Hamlib.RIG_VFO_CURR)) == 4
assert option.i == 0
assert rig.get_chan_all() is None
channel = 0
@@ -109,8 +110,8 @@ class TestClass:
assert isinstance(rig.get_level_i(0), int)
assert isinstance(rig.get_mem(), int)
assert isinstance(rig.get_mem(Hamlib.RIG_VFO_CURR), int)
- assert isinstance(rig.get_mode(), list)
- assert isinstance(rig.get_mode(Hamlib.RIG_VFO_CURR), list)
+ assert len(rig.get_mode()) == 2
+ assert len(rig.get_mode(Hamlib.RIG_VFO_CURR)) == 2
assert rig.get_parm(0) is None
assert isinstance(rig.get_parm_f(0), float)
assert isinstance(rig.get_parm_i(0), int)
@@ -125,14 +126,14 @@ class TestClass:
assert isinstance(rig.get_rptr_shift(Hamlib.RIG_VFO_CURR), int)
assert isinstance(rig.get_split_freq(), float)
assert isinstance(rig.get_split_freq(Hamlib.RIG_VFO_CURR), float)
- assert isinstance(rig.get_split_mode(), list)
- assert isinstance(rig.get_split_mode(Hamlib.RIG_VFO_CURR), list)
+ assert len(rig.get_split_mode()) == 2
+ assert len(rig.get_split_mode(Hamlib.RIG_VFO_CURR)) == 2
assert isinstance(rig.get_trn(), int) # deprecated
assert isinstance(rig.get_ts(), int)
assert isinstance(rig.get_ts(Hamlib.RIG_VFO_CURR), int)
assert isinstance(rig.get_vfo(), int)
- assert isinstance(rig.get_vfo_info(), list)
- assert isinstance(rig.get_vfo_info(Hamlib.RIG_VFO_CURR), list)
+ assert len(rig.get_vfo_info()) == 5
+ assert len(rig.get_vfo_info(Hamlib.RIG_VFO_CURR)) == 5
assert isinstance(rig.get_xit(), int)
assert isinstance(rig.get_xit(Hamlib.RIG_VFO_CURR), int)
# assert rig_has_get_func(0) FIXME not defined
commit 7223fb0766468fabe2c40b3a3d0e309c9b1abfa1
Author: Daniele Forsi IU5HKX <iu...@gm...>
Date: Tue Jun 24 22:08:46 2025 +0200
Fix Rig.get_vfo_info()
diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py
index a24ffe07d..7b3adc1b5 100755
--- a/bindings/python/test_rig.py
+++ b/bindings/python/test_rig.py
@@ -131,10 +131,8 @@ class TestClass:
assert isinstance(rig.get_ts(), int)
assert isinstance(rig.get_ts(Hamlib.RIG_VFO_CURR), int)
assert isinstance(rig.get_vfo(), int)
- with raises(TypeError):
- assert rig.get_vfo_info(Hamlib.RIG_VFO_CURR) is None # FIXME
- assert rig.get_vfo_info(Hamlib.RIG_VFO_CURR, 2) is None # FIXME
- assert rig.get_vfo_info(Hamlib.RIG_VFO_CURR, 2, 3) is None # FIXME
+ assert isinstance(rig.get_vfo_info(), list)
+ assert isinstance(rig.get_vfo_info(Hamlib.RIG_VFO_CURR), list)
assert isinstance(rig.get_xit(), int)
assert isinstance(rig.get_xit(Hamlib.RIG_VFO_CURR), int)
# assert rig_has_get_func(0) FIXME not defined
diff --git a/bindings/rig.swg b/bindings/rig.swg
index 1c60a6d45..5c086b330 100644
--- a/bindings/rig.swg
+++ b/bindings/rig.swg
@@ -30,8 +30,14 @@
%include <hamlib/riglist.h>
%include <hamlib/rig.h>
-%apply unsigned int *OUTPUT { vfo_t * };
+%apply int *OUTPUT { int *};
+
+%apply unsigned int *OUTPUT { ant_t * };
+%apply double *OUTPUT { freq_t * };
+%apply shortfreq_t *OUTPUT { pbwidth_t * };
+%apply uint64_t *OUTPUT { rmode_t * };
%apply int *OUTPUT { split_t * };
+%apply unsigned int *OUTPUT { vfo_t * };
%inline %{
@@ -468,7 +474,8 @@ typedef channel_t * const_channel_t_p;
METHOD1VGET(get_xit, shortfreq_t)
METHOD1VGET(get_ts, shortfreq_t)
extern void get_ant(ant_t *OUTPUT, ant_t *OUTPUT, ant_t *OUTPUT, value_t *OUTPUT, ant_t ant, vfo_t vfo = RIG_VFO_CURR);
- extern void get_vfo_info (int *satmode, split_t *split, pbwidth_t *width, rmode_t *mode, freq_t *freq, vfo_t vfo = RIG_VFO_CURR);
+ void get_vfo_info (int *satmode, split_t *split, pbwidth_t *width, rmode_t *mode, freq_t *freq, vfo_t vfo = RIG_VFO_CURR)
+ { self->error_status = rig_get_vfo_info(self->rig, vfo, freq, mode, width, split, satmode); }
METHOD1VGET(get_mem, int)
METHOD1GET(get_powerstat, powerstat_t)
METHOD1GET(get_trn, int)
@@ -620,11 +627,6 @@ void Rig_get_ant(Rig *self, ant_t *ant_rx, ant_t *ant_tx, ant_t *ant_curr, value
{
self->error_status = rig_get_ant(self->rig, vfo, ant, option, ant_curr, ant_tx, ant_rx);
}
-void Rig_get_vfo_info (Rig *self, int *satmode, split_t *split, pbwidth_t *width, rmode_t *mode, freq_t *freq, vfo_t vfo)
-{
- self->error_status = rig_get_vfo_info(self->rig, vfo, freq, mode, width, split, satmode);
-}
-
struct channel *Rig_get_chan_all(Rig *self)
{
commit 453e68c6cd6d5b21286cc914773cfdb029ca86c7
Author: Daniele Forsi IU5HKX <iu...@gm...>
Date: Tue Jun 24 20:51:26 2025 +0200
Fix Rig.get_split_vfo()
The VFO argument optional with a default of RIG_VFO_CURR.
Fixes PR ##1555.
diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py
index 4790dc92e..a24ffe07d 100755
--- a/bindings/python/test_rig.py
+++ b/bindings/python/test_rig.py
@@ -50,6 +50,15 @@ class TestClass:
assert rig.state.comm_state == 1
info = rig.get_info()
assert isinstance(info, str)
+
+ assert rig.set_split_vfo(-600000, Hamlib.RIG_VFO_A) is None
+ assert rig.get_split_vfo(Hamlib.RIG_VFO_TX) == [-600000, 1]
+ assert rig.set_split_vfo(5000000, Hamlib.RIG_VFO_B) is None
+ assert rig.get_split_vfo(Hamlib.RIG_VFO_TX) == [5000000, 2]
+ assert rig.set_split_vfo(5000000, Hamlib.RIG_VFO_CURR) is None
+ assert rig.get_split_vfo() == [5000000, 1]
+ assert rig.get_split_vfo(Hamlib.RIG_VFO_CURR) == [5000000, 1]
+
assert rig.close() is None
assert rig.state.comm_state == 0
info = rig.get_info()
@@ -118,9 +127,6 @@ class TestClass:
assert isinstance(rig.get_split_freq(Hamlib.RIG_VFO_CURR), float)
assert isinstance(rig.get_split_mode(), list)
assert isinstance(rig.get_split_mode(Hamlib.RIG_VFO_CURR), list)
- with raises(TypeError):
- assert rig.get_split_vfo() is None # FIXME
- assert rig.get_split_vfo(Hamlib.RIG_VFO_CURR) is None # FIXME
assert isinstance(rig.get_trn(), int) # deprecated
assert isinstance(rig.get_ts(), int)
assert isinstance(rig.get_ts(Hamlib.RIG_VFO_CURR), int)
diff --git a/bindings/rig.swg b/bindings/rig.swg
index e0f3373e6..1c60a6d45 100644
--- a/bindings/rig.swg
+++ b/bindings/rig.swg
@@ -30,6 +30,9 @@
%include <hamlib/riglist.h>
%include <hamlib/rig.h>
+%apply unsigned int *OUTPUT { vfo_t * };
+%apply int *OUTPUT { split_t * };
+
%inline %{
#pragma SWIG nowarn=451
-----------------------------------------------------------------------
Summary of changes:
bindings/python/test_rig.py | 42 ++++++++++++++++++++++++------------------
bindings/rig.swg | 25 ++++++++++++++++---------
2 files changed, 40 insertions(+), 27 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|
|
From: n0nb <n0...@us...> - 2025-06-26 18:20: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 ef3e2782031967ffb6feeb5176cc47cd2e080f4b (commit)
via ef0b7e30bd6fa770a2bccd27cd5e8b554a7dd764 (commit)
via 82dd540d3a3fc181a81f1c3c3891f4331e770bbd (commit)
via 6dffee33df0a9b79401a17150d5c431e268b8a64 (commit)
via 8abe1ec8e4fe08560fc14ebb2965f89105213a18 (commit)
via a09603fdd4e5699a72f509db284f9bbb494f4e10 (commit)
from 31c3c973520e8bf87478e17dc6136845351e2e74 (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 ef3e2782031967ffb6feeb5176cc47cd2e080f4b
Merge: 31c3c9735 ef0b7e30b
Author: Nate Bargmann <n0...@n0...>
Date: Thu Jun 26 13:14:29 2025 -0500
Merge GitHub PR #1776
commit ef0b7e30bd6fa770a2bccd27cd5e8b554a7dd764
Author: Mark J. Fine <mar...@fi...>
Date: Thu Jun 26 13:38:23 2025 -0400
Reverted CW Pitch value<->knob conversion for non-ICR75 radios. Apparently R75 is the only one using the set mode command.
Edited out all non-essential code commenting that was done during local testing.
diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c
index 17c6aa76c..24ba8f0ee 100644
--- a/rigs/icom/icom.c
+++ b/rigs/icom/icom.c
@@ -3683,8 +3683,15 @@ int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
icom_val = 900;
}
else
+ {
icom_val = val.i;
- //icom_val = (int) lroundf(((float) icom_val - 300) * (255.0f / 600.0f));
+ }
+
+ if (!RIG_IS_ICR75)
+ {
+ //interpolate to return knob value
+ icom_val = (int) lroundf(((float) icom_val - 300) * (255.0f / 600.0f));
+ }
break;
default:
@@ -3877,7 +3884,6 @@ int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
}
else
{
- // Legacy mapping that does not apply to all rigs
switch (val.i)
{
case RIG_AGC_OFF:
@@ -4686,8 +4692,15 @@ int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
break;
case RIG_LEVEL_CWPITCH:
- //val->i = (int) lroundf(300.0f + ((float) icom_val * 600.0f / 255.0f));
- val->i = icom_val;
+ if (!RIG_IS_ICR75)
+ {
+ //use knob value and interpolate
+ val->i = (int) lroundf(300.0f + ((float) icom_val * 600.0f / 255.0f));
+ }
+ else
+ {
+ val->i = icom_val;
+ }
break;
case RIG_LEVEL_KEYSPD:
diff --git a/rigs/icom/icom_alt_agc.c b/rigs/icom/icom_alt_agc.c
index 0de9f9592..0f163e320 100644
--- a/rigs/icom/icom_alt_agc.c
+++ b/rigs/icom/icom_alt_agc.c
@@ -19,25 +19,11 @@
*
*/
-//#include <stdlib.h>
-//#include <string.h> /* String function definitions */
-//#include <unistd.h> /* UNIX standard function definitions */
-//#include <math.h>
-
-//#include <hamlib/rig.h>
-//#include <serial.h>
-//#include <cal.h>
-//#include <token.h>
-//#include <register.h>
-
#include "icom.h"
#include "icom_defs.h"
#include "icom_alt_agc.h"
#include "frame.h"
#include "misc.h"
-//#include "event.h"
-//#include "cache.h"
-
/*
* Note:
@@ -259,7 +245,6 @@ int icom_rig_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
}
else
{
- //struct rig_state *rs = STATE(rig);
unsigned char cmdbuf[MAXFRAMELEN], ackbuf[MAXFRAMELEN];
int cmd_len, ack_len = sizeof(ackbuf);
int lvl_cn, lvl_sc; /* Command Number, Subcommand */
@@ -387,7 +372,6 @@ int icom_rig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
}
else
{
- //struct rig_state *rs;
unsigned char cmdbuf[MAXFRAMELEN], respbuf[MAXFRAMELEN];
int cmd_len, resp_len;
int lvl_cn, lvl_sc; /* Command Number, Subcommand */
@@ -413,8 +397,6 @@ int icom_rig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
rig_debug(RIG_DEBUG_TRACE, "%s: no extcmd found\n", __func__);
- //rs = STATE(rig);
-
cmd_len = 0;
lvl_cn = C_CTL_FUNC;
diff --git a/rigs/icom/icom_defs.h b/rigs/icom/icom_defs.h
index 0776a1287..6313ec2de 100644
--- a/rigs/icom/icom_defs.h
+++ b/rigs/icom/icom_defs.h
@@ -233,11 +233,11 @@
* Set AGC (S_FUNC_AGC) data
*/
#define D_AGC_OFF 0x00
-#define D_AGC_SUPERFAST 0x01 //was 0x03 /* IC746 pro */
-#define D_AGC_FAST 0x02 //was 0x00
-#define D_AGC_SLOW 0x03 //was 0x02
+#define D_AGC_SUPERFAST 0x01
+#define D_AGC_FAST 0x02
+#define D_AGC_SLOW 0x03
#define D_AGC_USER 0x04
-#define D_AGC_MID 0x05 //was 0x01
+#define D_AGC_MID 0x05
#define D_AGC_AUTO 0x06
/*
commit 82dd540d3a3fc181a81f1c3c3891f4331e770bbd
Author: Mark J. Fine <mar...@fi...>
Date: Thu Jun 26 13:04:58 2025 -0400
Part 2 of Issue#1775: Adds optional wrappers for rigs that need to use the alternate AGC mapping originally specified in icom.c. Instructions for employment are provided within icom_alt_agc.c.
diff --git a/rigs/icom/Makefile.am b/rigs/icom/Makefile.am
index b295fe8d1..38b3fd7e9 100644
--- a/rigs/icom/Makefile.am
+++ b/rigs/icom/Makefile.am
@@ -1,4 +1,5 @@
-ICOMSRC = icom.c icom.h icom_defs.h frame.c frame.h ic706.c icr8500.c ic735.c ic775.c ic756.c \
+ICOMSRC = icom.c icom.h icom_defs.h icom_alt_agc.c icom_alt_agc.h frame.c frame.h \
+ ic706.c icr8500.c ic735.c ic775.c ic756.c \
ic275.c ic475.c ic1275.c ic820h.c ic821h.c \
icr7000.c ic910.c ic9100.c ic970.c ic725.c ic737.c ic718.c \
os535.c os456.c omni.c delta2.c ic92d.c \
diff --git a/rigs/icom/icom_alt_agc.c b/rigs/icom/icom_alt_agc.c
new file mode 100644
index 000000000..0de9f9592
--- /dev/null
+++ b/rigs/icom/icom_alt_agc.c
@@ -0,0 +1,506 @@
+/*
+ * Hamlib CI-V backend - wrapper to get/set alternate AGC levels
+ * Copyright (c) 2000-2025 by Stephane Fillod
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+//#include <stdlib.h>
+//#include <string.h> /* String function definitions */
+//#include <unistd.h> /* UNIX standard function definitions */
+//#include <math.h>
+
+//#include <hamlib/rig.h>
+//#include <serial.h>
+//#include <cal.h>
+//#include <token.h>
+//#include <register.h>
+
+#include "icom.h"
+#include "icom_defs.h"
+#include "icom_alt_agc.h"
+#include "frame.h"
+#include "misc.h"
+//#include "event.h"
+//#include "cache.h"
+
+
+/*
+ * Note:
+ * This file contains a wrapper to utilize the original AGC settings routines
+ * for specific radios that require this alternate mapping.
+ *
+ * In order to make use of it, modify your rig's backend with the following:
+ *
+ * 1. Add `#include icom_alt_agc.h`
+ *
+ * 2. Change
+ * `.set_level = icom_set_level,`
+ * To
+ * `.set_level = icom_rig_set_level,`
+ *
+ * 3. Change
+ * `.get_level = icom_get_level,`
+ * To
+ * `.get_level = icom_rig_get_level,`
+ *
+ * All other level set/get routines other than AGC should be unaffected.
+ */
+
+static int icom_check_ack(int ack_len, unsigned char *ackbuf)
+{
+ if ((ack_len >= 1 && ackbuf[0] != ACK) && (ack_len >= 2 && ackbuf[1] != NAK))
+ {
+ // if we don't get ACK/NAK some serial corruption occurred
+ // so we'll call it a timeout for retry purposes
+ rig_debug(RIG_DEBUG_WARN, "%s: command timed out (%#.2x)\n", __func__,
+ ackbuf[0]);
+ return -RIG_ETIMEOUT;
+ }
+
+ if (ack_len != 1 || ackbuf[0] != ACK)
+ {
+ rig_debug(RIG_DEBUG_ERR, "%s: command not acknowledged (%#.2x), len=%d\n",
+ __func__,
+ ackbuf[0], ack_len);
+ return -RIG_ERJCTED;
+ }
+
+ return RIG_OK;
+}
+
+static int icom_set_cmd(RIG *rig, vfo_t vfo, struct cmdparams *par, value_t val)
+{
+ ENTERFUNC;
+
+ unsigned char cmdbuf[MAXFRAMELEN];
+ int cmdlen = 0;
+ unsigned char ackbuf[MAXFRAMELEN];
+ int ack_len = 0;
+
+ if (!(par->submod & SC_MOD_WR)) { RETURNFUNC(-RIG_EINVAL); }
+
+ if ((par->submod & SC_MOD_RW12) == SC_MOD_RW12)
+ {
+ cmdbuf[0] = 0x01;
+ cmdlen = 1;
+ }
+ else
+ {
+ cmdlen = par->sublen;
+ memcpy(cmdbuf, par->subext, cmdlen);
+ }
+
+ int wrd = val.i;
+ int i;
+
+ switch (par->dattyp)
+ {
+ case CMD_DAT_WRD:
+ for (i = 1; i <= par->datlen; i++)
+ {
+ cmdbuf[cmdlen + par->datlen - i] = wrd & 0xff;
+ wrd >>= 8;
+ }
+
+ break;
+
+ case CMD_DAT_BUF:
+ memcpy(&cmdbuf[cmdlen], val.b.d, par->datlen);
+ break;
+
+ case CMD_DAT_INT:
+ case CMD_DAT_BOL:
+ to_bcd_be(&cmdbuf[cmdlen], val.i, (par->datlen * 2));
+ break;
+
+ case CMD_DAT_FLT:
+ to_bcd_be(&cmdbuf[cmdlen], (int) val.f, (par->datlen * 2));
+ break;
+
+ case CMD_DAT_LVL:
+ to_bcd_be(&cmdbuf[cmdlen], (int)(val.f * 255.0), (par->datlen * 2));
+ break;
+
+ case CMD_DAT_TIM: // returned as seconds since midnight
+ to_bcd_be(&cmdbuf[cmdlen],
+ ((((int)val.i / 3600) * 100) + (((int)val.i / 60) % 60)), (par->datlen * 2));
+ break;
+
+ default:
+ break;
+ }
+
+ cmdlen += par->datlen;
+ RETURNFUNC(icom_transaction(rig, par->command, par->subcmd, cmdbuf, cmdlen,
+ ackbuf,
+ &ack_len));
+}
+
+static int icom_get_cmd(RIG *rig, vfo_t vfo, struct cmdparams *par, value_t *val)
+{
+
+ ENTERFUNC;
+
+ unsigned char ssc = 0x02;
+ unsigned char resbuf[MAXFRAMELEN];
+ int reslen = sizeof(resbuf);
+ int retval;
+
+ if (!(par->submod & SC_MOD_RD)) { RETURNFUNC(-RIG_EINVAL); }
+
+ if ((par->submod & SC_MOD_RW12) == SC_MOD_RW12)
+ {
+ retval = icom_get_raw_buf(rig, par->command, par->subcmd, 1, &ssc, &reslen,
+ resbuf);
+ }
+ else
+ {
+ retval = icom_get_raw_buf(rig, par->command, par->subcmd,
+ par->sublen, (unsigned char *)par->subext, &reslen, resbuf);
+ }
+
+ if (retval != RIG_OK)
+ {
+ RETURNFUNC(retval);
+ }
+
+ switch (par->dattyp)
+ {
+ case CMD_DAT_WRD:
+ {
+ int wrd = 0;
+ int i;
+
+ for (i = 0; i < par->datlen; i++)
+ {
+ wrd = (wrd << 8) + resbuf[i];
+ }
+
+ val->i = wrd;
+ }
+ break;
+
+ case CMD_DAT_STR:
+ if (strlen(val->s) < reslen)
+ {
+ RETURNFUNC(-RIG_EINTERNAL);
+ }
+
+ memcpy(val->s, resbuf, reslen);
+ val->s[reslen] = 0;
+ break;
+
+ case CMD_DAT_BUF:
+ if (reslen > val->b.l)
+ {
+ RETURNFUNC(-RIG_EINTERNAL);
+ }
+
+ memcpy(val->b.d, resbuf, reslen);
+ val->b.l = reslen;
+ break;
+
+ case CMD_DAT_INT:
+ val->i = from_bcd_be(resbuf, (reslen * 2));
+ break;
+
+ case CMD_DAT_FLT:
+ val->f = (float) from_bcd_be(resbuf, (reslen * 2));
+ break;
+
+ case CMD_DAT_LVL:
+ val->f = (float) from_bcd_be(resbuf, (reslen * 2)) / 255.0;
+ break;
+
+ case CMD_DAT_BOL:
+ val->i = (from_bcd_be(resbuf, (reslen * 2)) == 0) ? 0 : 1;
+ break;
+
+ case CMD_DAT_TIM:
+ val->i = (from_bcd_be(resbuf, 2) * 3600) + (from_bcd_be(&resbuf[1], 2) * 60);
+ break;
+
+ default:
+ val->i = 0;
+ break;
+ }
+
+ RETURNFUNC(RIG_OK);
+}
+
+/*
+ * icom_rig_set_level
+ * rig-specific wrapper for setting alternate AGC values only
+ * Assumes rig!=NULL, STATE(rig)->priv!=NULL
+ */
+int icom_rig_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
+{
+ int retval;
+
+ if (level != RIG_LEVEL_AGC)
+ {
+ retval = icom_set_level(rig, vfo, level, val);
+ RETURNFUNC(retval);
+ }
+ else
+ {
+ //struct rig_state *rs = STATE(rig);
+ unsigned char cmdbuf[MAXFRAMELEN], ackbuf[MAXFRAMELEN];
+ int cmd_len, ack_len = sizeof(ackbuf);
+ int lvl_cn, lvl_sc; /* Command Number, Subcommand */
+ int icom_val;
+ int i;
+ const struct icom_priv_caps *priv_caps =
+ (const struct icom_priv_caps *) rig->caps->priv;
+
+ ENTERFUNC;
+
+ const struct cmdparams *extcmds = priv_caps->extcmds;
+
+ for (i = 0; extcmds && extcmds[i].id.s != 0; i++)
+ {
+ if (extcmds[i].cmdparamtype == CMD_PARAM_TYPE_LEVEL && extcmds[i].id.s == level)
+ {
+ RETURNFUNC(icom_set_cmd(rig, vfo, (struct cmdparams *)&extcmds[i], val));
+ }
+ }
+
+ /*
+ * Many levels of float type are in [0.0..1.0] range
+ */
+ if (RIG_LEVEL_IS_FLOAT(level))
+ {
+ icom_val = val.f * 255;
+ }
+ else
+ {
+ icom_val = val.i;
+ }
+
+ /*
+ * Most of the time, the data field is a 3 digit BCD,
+ * but in *big endian* order: 0000..0255
+ * (from_bcd is little endian)
+ */
+ cmd_len = 2;
+ to_bcd_be(cmdbuf, (long long) icom_val, cmd_len * 2);
+
+ lvl_cn = C_CTL_FUNC;
+ lvl_sc = S_FUNC_AGC;
+ cmd_len = 1;
+
+ if (priv_caps->agc_levels_present)
+ {
+ int found = 0;
+
+ for (i = 0;
+ i <= HAMLIB_MAX_AGC_LEVELS
+ && priv_caps->agc_levels[i].level != RIG_AGC_LAST; i++)
+ {
+ if (priv_caps->agc_levels[i].level == val.i)
+ {
+ cmdbuf[0] = priv_caps->agc_levels[i].icom_level;
+ found = 1;
+ break;
+ }
+ }
+
+ if (!found)
+ {
+ RETURNFUNC(-RIG_EINVAL);
+ }
+ }
+ else
+ {
+ // Legacy mapping that does not apply to all rigs
+ switch (val.i)
+ {
+ case RIG_AGC_SUPERFAST:
+ cmdbuf[0] = ICOM_AGC_SUPERFAST;
+ break;
+
+ case RIG_AGC_FAST:
+ cmdbuf[0] = ICOM_AGC_FAST;
+ break;
+
+ case RIG_AGC_SLOW:
+ cmdbuf[0] = ICOM_AGC_SLOW;
+ break;
+
+ case RIG_AGC_MEDIUM:
+ cmdbuf[0] = ICOM_AGC_MID;
+ break;
+
+ default:
+ rig_debug(RIG_DEBUG_ERR, "%s: unsupported LEVEL_AGC %d\n",
+ __func__, val.i);
+ RETURNFUNC(-RIG_EINVAL);
+ }
+ }
+
+ retval = icom_transaction(rig, lvl_cn, lvl_sc, cmdbuf, cmd_len, ackbuf,
+ &ack_len);
+
+ if (retval != RIG_OK)
+ {
+ RETURNFUNC(retval);
+ }
+
+ if ((retval = icom_check_ack(ack_len, ackbuf)) != RIG_OK)
+ {
+ RETURNFUNC(retval);
+ }
+
+ RETURNFUNC(RIG_OK);
+ }
+}
+
+/*
+ * icom_rig_get_level
+ * rig-specific wrapper for getting alternate AGC values only
+ * Assumes rig!=NULL, STATE(rig)->priv!=NULL, val!=NULL
+ *
+ */
+int icom_rig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
+{
+ int retval;
+
+ if (level != RIG_LEVEL_AGC)
+ {
+ retval = icom_get_level(rig, vfo, level, val);
+ RETURNFUNC(retval);
+ }
+ else
+ {
+ //struct rig_state *rs;
+ unsigned char cmdbuf[MAXFRAMELEN], respbuf[MAXFRAMELEN];
+ int cmd_len, resp_len;
+ int lvl_cn, lvl_sc; /* Command Number, Subcommand */
+ int icom_val;
+ int cmdhead;
+ const struct icom_priv_caps *priv_caps =
+ (const struct icom_priv_caps *) rig->caps->priv;
+
+ ENTERFUNC;
+
+ const struct cmdparams *extcmds = priv_caps->extcmds;
+ int i;
+
+ for (i = 0; extcmds && extcmds[i].id.s != 0; i++)
+ {
+ //rig_debug(RIG_DEBUG_TRACE, "%s: i=%d\n", __func__, i);
+
+ if (extcmds[i].cmdparamtype == CMD_PARAM_TYPE_LEVEL && extcmds[i].id.s == level)
+ {
+ RETURNFUNC(icom_get_cmd(rig, vfo, (struct cmdparams *)&extcmds[i], val));
+ }
+ }
+
+ rig_debug(RIG_DEBUG_TRACE, "%s: no extcmd found\n", __func__);
+
+ //rs = STATE(rig);
+
+ cmd_len = 0;
+
+ lvl_cn = C_CTL_FUNC;
+ lvl_sc = S_FUNC_AGC;
+
+ /* use cmdbuf and cmd_len for 'set mode' subcommand */
+ retval = icom_transaction(rig, lvl_cn, lvl_sc, cmdbuf, cmd_len, respbuf,
+ &resp_len);
+
+ if (retval != RIG_OK)
+ {
+ RETURNFUNC(retval);
+ }
+
+ /*
+ * strbuf should contain Cn,Sc,Data area
+ */
+ cmdhead = ((lvl_sc == -1) ? 1 : 2) + cmd_len;
+ resp_len -= cmdhead;
+
+ if (respbuf[0] != lvl_cn)
+ {
+ rig_debug(RIG_DEBUG_ERR, "%s: ack NG (%#.2x), len=%d\n", __func__,
+ respbuf[0], resp_len);
+ RETURNFUNC(-RIG_ERJCTED);
+ }
+
+ /*
+ * The result is a 3 digit BCD, but in *big endian* order: 0000..0255
+ * (from_bcd is little endian)
+ */
+ icom_val = from_bcd_be(respbuf + cmdhead, resp_len * 2);
+
+ if (priv_caps->agc_levels_present)
+ {
+ int found = 0;
+
+ for (i = 0;
+ i <= HAMLIB_MAX_AGC_LEVELS && priv_caps->agc_levels[i].level >= 0; i++)
+ {
+ if (priv_caps->agc_levels[i].icom_level == icom_val)
+ {
+ val->i = priv_caps->agc_levels[i].level;
+ found = 1;
+ break;
+ }
+ }
+
+ if (!found)
+ {
+ rig_debug(RIG_DEBUG_ERR, "%s: unexpected AGC 0x%02x\n", __func__,
+ icom_val);
+ RETURNFUNC(-RIG_EPROTO);
+ }
+ }
+ else
+ {
+ switch (icom_val)
+ {
+ case ICOM_AGC_SUPERFAST:
+ val->i = RIG_AGC_SUPERFAST;
+ break;
+
+ case ICOM_AGC_FAST:
+ val->i = RIG_AGC_FAST;
+ break;
+
+ case ICOM_AGC_SLOW:
+ val->i = RIG_AGC_SLOW;
+ break;
+
+ case ICOM_AGC_MID:
+ val->i = RIG_AGC_MEDIUM;
+ break;
+
+ default:
+ rig_debug(RIG_DEBUG_ERR, "%s: unexpected AGC 0x%02x\n", __func__,
+ icom_val);
+ RETURNFUNC(-RIG_EPROTO);
+ }
+ }
+
+ rig_debug(RIG_DEBUG_TRACE, "%s: %d %d %d %f\n", __func__, resp_len,
+ icom_val, val->i, val->f);
+
+ RETURNFUNC(RIG_OK);
+ }
+}
+
diff --git a/rigs/icom/icom_alt_agc.h b/rigs/icom/icom_alt_agc.h
new file mode 100644
index 000000000..76c2e0200
--- /dev/null
+++ b/rigs/icom/icom_alt_agc.h
@@ -0,0 +1,33 @@
+/*
+ * Hamlib CI-V backend - alternate AGC header
+ * Copyright (c) 2000-2025 by Stephane Fillod
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifndef _ICOM_ALT_AGC_H
+#define _ICOM_ALT_AGC_H 1
+
+#define ICOM_AGC_FAST 0x00
+#define ICOM_AGC_MID 0x01
+#define ICOM_AGC_SLOW 0x02
+#define ICOM_AGC_SUPERFAST 0x03 /* IC746 pro */
+
+int icom_rig_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val);
+int icom_rig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val);
+
+#endif /* _ICOM_ALT_AGC_H */
\ No newline at end of file
commit 6dffee33df0a9b79401a17150d5c431e268b8a64
Author: markjfine <mar...@fi...>
Date: Mon Jun 23 17:46:06 2025 -0400
Correct CWPitch set/get for Icom radios
Icom has two confusing ways to set/get CW Pitch. The first way is to read/write the knob setting using CI-V command 14 subcommand 9. The second way is just to set/get the actual value via mode command 10.
At some point the commands in hamlib changed from the former to the latter, but never adjusted the interpolation code of the former.
This commit fixes the set and get routines appropriately.
diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c
index 5bb420348..17c6aa76c 100644
--- a/rigs/icom/icom.c
+++ b/rigs/icom/icom.c
@@ -3682,8 +3682,9 @@ int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
{
icom_val = 900;
}
-
- icom_val = (int) lroundf(((float) icom_val - 300) * (255.0f / 600.0f));
+ else
+ icom_val = val.i;
+ //icom_val = (int) lroundf(((float) icom_val - 300) * (255.0f / 600.0f));
break;
default:
@@ -4685,7 +4686,8 @@ int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
break;
case RIG_LEVEL_CWPITCH:
- val->i = (int) lroundf(300.0f + ((float) icom_val * 600.0f / 255.0f));
+ //val->i = (int) lroundf(300.0f + ((float) icom_val * 600.0f / 255.0f));
+ val->i = icom_val;
break;
case RIG_LEVEL_KEYSPD:
commit 8abe1ec8e4fe08560fc14ebb2965f89105213a18
Author: markjfine <mar...@fi...>
Date: Mon Jun 23 17:07:17 2025 -0400
Correct mapping of D_AGC values
Ref issue#1775 (part 1)
Corrected mapping of D_AGC values to currently enumerated AGC set. Will separately provide alternate mapping, if required, in backends that require it.
diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c
index 85b6d1e68..5bb420348 100644
--- a/rigs/icom/icom.c
+++ b/rigs/icom/icom.c
@@ -3879,20 +3879,32 @@ int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
// Legacy mapping that does not apply to all rigs
switch (val.i)
{
- case RIG_AGC_SLOW:
- cmdbuf[0] = D_AGC_SLOW;
+ case RIG_AGC_OFF:
+ cmdbuf[0] = D_AGC_OFF;
break;
- case RIG_AGC_MEDIUM:
- cmdbuf[0] = D_AGC_MID;
+ case RIG_AGC_SUPERFAST:
+ cmdbuf[0] = D_AGC_SUPERFAST;
break;
case RIG_AGC_FAST:
cmdbuf[0] = D_AGC_FAST;
break;
- case RIG_AGC_SUPERFAST:
- cmdbuf[0] = D_AGC_SUPERFAST;
+ case RIG_AGC_SLOW:
+ cmdbuf[0] = D_AGC_SLOW;
+ break;
+
+ case RIG_AGC_USER:
+ cmdbuf[0] = D_AGC_USER;
+ break;
+
+ case RIG_AGC_MEDIUM:
+ cmdbuf[0] = D_AGC_MID;
+ break;
+
+ case RIG_AGC_AUTO:
+ cmdbuf[0] = D_AGC_AUTO;
break;
default:
@@ -4526,20 +4538,32 @@ int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
{
switch (icom_val)
{
- case D_AGC_SLOW:
- val->i = RIG_AGC_SLOW;
+ case D_AGC_OFF:
+ val->i = RIG_AGC_OFF;
break;
- case D_AGC_MID:
- val->i = RIG_AGC_MEDIUM;
+ case D_AGC_SUPERFAST:
+ val->i = RIG_AGC_SUPERFAST;
break;
- case D_AGC_FAST:
+ case D_AGC_FAST:
val->i = RIG_AGC_FAST;
break;
- case D_AGC_SUPERFAST:
- val->i = RIG_AGC_SUPERFAST;
+ case D_AGC_SLOW:
+ val->i = RIG_AGC_SLOW;
+ break;
+
+ case D_AGC_USER:
+ val->i = RIG_AGC_USER;
+ break;
+
+ case D_AGC_MID:
+ val->i = RIG_AGC_MEDIUM;
+ break;
+
+ case D_AGC_AUTO:
+ val->i = RIG_AGC_AUTO;
break;
default:
commit a09603fdd4e5699a72f509db284f9bbb494f4e10
Author: markjfine <mar...@fi...>
Date: Mon Jun 23 17:02:26 2025 -0400
Correct and update mapping of D_AGC values
Ref issue#1775 (part 1)
Corrected mapping of D_AGC values to currently enumerated AGC set. Will separately provide alternate mapping, if required, in backends that require it.
diff --git a/rigs/icom/icom_defs.h b/rigs/icom/icom_defs.h
index 7ac84f8e2..0776a1287 100644
--- a/rigs/icom/icom_defs.h
+++ b/rigs/icom/icom_defs.h
@@ -232,10 +232,13 @@
/*
* Set AGC (S_FUNC_AGC) data
*/
-#define D_AGC_FAST 0x00
-#define D_AGC_MID 0x01
-#define D_AGC_SLOW 0x02
-#define D_AGC_SUPERFAST 0x03 /* IC746 pro */
+#define D_AGC_OFF 0x00
+#define D_AGC_SUPERFAST 0x01 //was 0x03 /* IC746 pro */
+#define D_AGC_FAST 0x02 //was 0x00
+#define D_AGC_SLOW 0x03 //was 0x02
+#define D_AGC_USER 0x04
+#define D_AGC_MID 0x05 //was 0x01
+#define D_AGC_AUTO 0x06
/*
* Set antenna (C_SET_ANT) subcommands
-----------------------------------------------------------------------
Summary of changes:
rigs/icom/Makefile.am | 3 +-
rigs/icom/icom.c | 71 +++-
rigs/icom/icom_alt_agc.c | 488 ++++++++++++++++++++++++++
rigs/{alinco/alinco.c => icom/icom_alt_agc.h} | 32 +-
rigs/icom/icom_defs.h | 11 +-
5 files changed, 563 insertions(+), 42 deletions(-)
create mode 100644 rigs/icom/icom_alt_agc.c
copy rigs/{alinco/alinco.c => icom/icom_alt_agc.h} (62%)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|