hamlib-cvs-digest Mailing List for Ham Radio Control Libraries (Page 2)
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
(4) |
Nov
|
Dec
|
From: n0nb <n0...@us...> - 2025-09-07 23:08: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 9f4e4d38467fb50e00e79a38fe1fd34f00dbc19d (commit) via 89c18ba89c7ddf3ea22608fc2136ed186f4989f5 (commit) from 0f871a5a3e24a85414eb3a8bcfa9b6b9776406f0 (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 9f4e4d38467fb50e00e79a38fe1fd34f00dbc19d Merge: 0f871a5a3 89c18ba89 Author: Nate Bargmann <n0...@n0...> Date: Sun Sep 7 18:04:50 2025 -0500 Merge GitHub PR #1890 commit 89c18ba89c7ddf3ea22608fc2136ed186f4989f5 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Sep 7 10:40:04 2025 +0200 Fix typo diff --git a/cppcheck.sh b/cppcheck.sh index e55f20164..aeb2115a8 100755 --- a/cppcheck.sh +++ b/cppcheck.sh @@ -61,7 +61,7 @@ CHECK="\ -D BACKEND_EXPORT \ -D PRId64 \ -D DECLARE_INITRIG_BACKEND \ --D DECLARE_INITRROT_BACKEND \ +-D DECLARE_INITROT_BACKEND \ -D DECLARE_INITAMP_BACKEND \ -D B230400 -U RIG_LEVEL_LINEOUT \ ----------------------------------------------------------------------- Summary of changes: cppcheck.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-09-07 23:03:36
|
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 0f871a5a3e24a85414eb3a8bcfa9b6b9776406f0 (commit) from e762a812d08ab677808bd7f6d53adc87b3fa6195 (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 0f871a5a3e24a85414eb3a8bcfa9b6b9776406f0 Author: Nate Bargmann <n0...@n0...> Date: Sat Sep 6 18:13:12 2025 -0500 Update Doxygen comments for rigerror() and rigerror2() Add a new topic of "Hamlib internals" with the group of lib_internal. Address GitHub issue #1881. diff --git a/doc/hamlib.cfg.in b/doc/hamlib.cfg.in index 67817ca4b..8bdac4392 100644 --- a/doc/hamlib.cfg.in +++ b/doc/hamlib.cfg.in @@ -57,7 +57,7 @@ EXTRACT_STATIC = NO HIDE_UNDOC_MEMBERS = NO SHOW_INCLUDE_FILES = YES INHERIT_DOCS = YES -ENABLED_SECTIONS = "" +ENABLED_SECTIONS = "hl_static" PREDEFINED = DOXYGEN "DOC_HIDDEN" JAVADOC_AUTOBRIEF = NO OPTIMIZE_OUTPUT_FOR_C = YES diff --git a/doc/index.doxygen b/doc/index.doxygen index 5eada25a6..4a4b85edf 100644 --- a/doc/index.doxygen +++ b/doc/index.doxygen @@ -200,4 +200,5 @@ GNU/Linux. * \defgroup amp_internal Amplifier Internal API * \defgroup port Port data structure for accessing devices * \defgroup utilities Utility Routines API + * \defgroup lib_internal Hamlib internals */ diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 0502e97ca..b78d4ca0c 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -200,43 +200,38 @@ extern HAMLIB_EXPORT_VAR(const char *) hamlib_copyright2; /** * \brief Hamlib error codes + * * Error code definition that can be returned by the Hamlib functions. - * Unless stated otherwise, Hamlib functions return the negative value - * of rig_errcode_e definitions in case of error, or 0 when successful. + * Unless stated otherwise, in case of error Hamlib functions return the + * negative value of `rig_errcode_e` definitions, or `RIG_OK` when + * successful. */ - /** - * @{ \name Hamlib error codes - */ - enum rig_errcode_e { - RIG_OK = 0, /*!< 0 No error, operation completed successfully */ - RIG_EINVAL, /*!< 1 invalid parameter */ - RIG_ECONF, /*!< 2 invalid configuration (serial,..) */ - RIG_ENOMEM, /*!< 3 memory shortage */ - RIG_ENIMPL, /*!< 4 function not implemented, but will be */ - RIG_ETIMEOUT, /*!< 5 communication timed out */ - RIG_EIO, /*!< 6 IO error, including open failed */ - RIG_EINTERNAL, /*!< 7 Internal Hamlib error, huh! */ - RIG_EPROTO, /*!< 8 Protocol error */ - RIG_ERJCTED, /*!< 9 Command rejected by the rig */ - RIG_ETRUNC, /*!< 10 Command performed, but arg truncated */ - RIG_ENAVAIL, /*!< 11 Function not available */ - RIG_ENTARGET, /*!< 12 VFO not targetable */ - RIG_BUSERROR, /*!< 13 Error talking on the bus */ - RIG_BUSBUSY, /*!< 14 Collision on the bus */ - RIG_EARG, /*!< 15 NULL RIG handle or any invalid pointer parameter in get arg */ - RIG_EVFO, /*!< 16 Invalid VFO */ - RIG_EDOM, /*!< 17 Argument out of domain of func */ - RIG_EDEPRECATED,/*!< 18 Function deprecated */ - RIG_ESECURITY, /*!< 19 Security error */ - RIG_EPOWER, /*!< 20 Rig not powered on */ - RIG_ELIMIT, /*!< 21 Limit exceeded */ - RIG_EACCESS, /*!< 22 Access denied -- e.g. port already in use */ + RIG_OK = 0, /*!< \c 0 No error, operation completed successfully */ + RIG_EINVAL, /*!< \c 1 Invalid parameter */ + RIG_ECONF, /*!< \c 2 Invalid configuration (serial,..) */ + RIG_ENOMEM, /*!< \c 3 Memory shortage */ + RIG_ENIMPL, /*!< \c 4 Function not implemented, but will be */ + RIG_ETIMEOUT, /*!< \c 5 Communication timed out */ + RIG_EIO, /*!< \c 6 IO error, including open failed */ + RIG_EINTERNAL, /*!< \c 7 Internal Hamlib error, huh! */ + RIG_EPROTO, /*!< \c 8 Protocol error */ + RIG_ERJCTED, /*!< \c 9 Command rejected by the rig */ + RIG_ETRUNC, /*!< \c 10 Command performed, but arg truncated */ + RIG_ENAVAIL, /*!< \c 11 Function not available */ + RIG_ENTARGET, /*!< \c 12 VFO not targetable */ + RIG_BUSERROR, /*!< \c 13 Error talking on the bus */ + RIG_BUSBUSY, /*!< \c 14 Collision on the bus */ + RIG_EARG, /*!< \c 15 NULL RIG handle or any invalid pointer parameter in get arg */ + RIG_EVFO, /*!< \c 16 Invalid VFO */ + RIG_EDOM, /*!< \c 17 Argument out of domain of func */ + RIG_EDEPRECATED,/*!< \c 18 Function deprecated */ + RIG_ESECURITY, /*!< \c 19 Security error */ + RIG_EPOWER, /*!< \c 20 Rig not powered on */ + RIG_ELIMIT, /*!< \c 21 Limit exceeded */ + RIG_EACCESS, /*!< \c 22 Access denied -- e.g. port already in use */ RIG_EEND // MUST BE LAST ITEM IN LAST }; -/** - * @} - */ /** * \brief Determines if the given error code indicates a "soft" error diff --git a/src/rig.c b/src/rig.c index 8e7c9c05a..288968ffd 100644 --- a/src/rig.c +++ b/src/rig.c @@ -22,11 +22,6 @@ */ /* SPDX-License-Identifier: LGPL-2.1-or-later */ -/** - * \addtogroup rig - * @{ - */ - /** * \file src/rig.c * \brief Ham Radio Control Libraries interface @@ -50,6 +45,11 @@ * \example ../tests/testrig.c */ +/** + * \addtogroup rig + * @{ + */ + #include "hamlib/config.h" #include "hamlib/rig.h" #include "hamlib/rig_state.h" @@ -75,21 +75,20 @@ /** * \brief Hamlib short license name - * */ const char *hamlib_license = "LGPL"; -/** - * \brief Hamlib release number - * - * The version number has the format x.y.z - */ + /* * Careful: The hamlib 1.2 ABI implicitly specifies a size of 21 bytes for * the hamlib_version string. Changing the size provokes a warning from the * dynamic loader. + * + * TODO: Remove and replace by hamlib_version2 for Hamlib 5. */ + //! @cond Doxygen_Suppress const char hamlib_version[21] = "Hamlib " PACKAGE_VERSION; + #if INTPTR_MAX == INT128_MAX #define ARCHBITS "128-bit" #elif INTPTR_MAX == INT64_MAX @@ -98,8 +97,20 @@ const char hamlib_version[21] = "Hamlib " PACKAGE_VERSION; #define ARCHBITS "32-bit" #endif //! @endcond -const char *hamlib_version2 = "Hamlib " PACKAGE_VERSION " " HAMLIBDATETIME " " - ARCHBITS; + +/** + * \brief Hamlib version string. + * + * The version number has the format x.y.z where: + * - *x* is a major version that indicates API/ABI changes from prior major versions + * - *y* is a minor version that indicates new device support + * - *z* is a point version that indicates bug fixes only + * - `PACKAGE_VERSION` is set in `configure.ac`. + * - `HAMLIBDATETIME` is generated at build time. + * - `ARCHBITS` is derived from tests of the build platform. + */ +const char *hamlib_version2 = "Hamlib " PACKAGE_VERSION " " HAMLIBDATETIME " " ARCHBITS; + HAMLIB_EXPORT_VAR(int) cookie_use; HAMLIB_EXPORT_VAR(int) skip_init; HAMLIB_EXPORT_VAR(int) lock_mode; // for use by rigctld @@ -114,9 +125,10 @@ struct rig_caps caps_test; const char *hamlib_copyright2 = "Copyright (C) 2000-2012 Stephane Fillod\n" "Copyright (C) 2000-2003 Frank Singleton\n" - "Copyright (C) 2014-2020 Michael Black W9MDB\n" + "Copyright (C) 2014-2025 Michael Black W9MDB\n" "This is free software; see the source for copying conditions. There is NO\n" "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."; + //! @cond Doxygen_Suppress const char hamlib_copyright[231] = /* hamlib 1.2 ABI specifies 231 bytes */ "Copyright (C) 2000-2012 Stephane Fillod\n" @@ -126,8 +138,7 @@ const char hamlib_copyright[231] = /* hamlib 1.2 ABI specifies 231 bytes */ //! @endcond -#ifndef DOC_HIDDEN - +//! @cond Doxygen_Suppress #if defined(WIN32) && !defined(__CYGWIN__) # define DEFAULT_SERIAL_PORT "\\\\.\\COM1" #elif BSD @@ -214,11 +225,25 @@ struct opened_rig_l struct opened_rig_l *next; }; static struct opened_rig_l *opened_rig_list = { NULL }; +//! @endcond -/* - * Careful, the order must be the same as their RIG_E* counterpart! - * TODO: localise the messages.. +/* My intention was to add this to the internal documentation, but Daxygen + * up through version 1.14 resolutely refuses to include it without doing + * project-wide settings like ENABLE_STATIC=yes and HIDE_UNDOC_MEMBERS=yes. + * + * Perhaps one day. Sigh... + */ +//! @cond hl_static +/** + * @brief Plain text desrciptions of Hamlib error codes. + * + * @ingroup lib_internal + * + * @note Careful, the order must be the same as their RIG_E* counterpart in + * rig_errcode_e and this structure must be kept in sync with rig_errcode_e! + * + * @todo Localise the messages. */ static const char *const rigerror_table[] = { @@ -246,10 +271,19 @@ static const char *const rigerror_table[] = "Limit exceeded", "Access denied" }; +//! @endcond - +/** + * @brief Convenience macro calculating `rigerror_table` size. + * + * @ingroup lib_internal + * + * Used to ensure access beyond the end of `rigerror_table` does + * not occur. + * */ #define ERROR_TBL_SZ (sizeof(rigerror_table)/sizeof(char *)) +//! @cond Doxygen_Suppress typedef struct async_data_handler_args_s { RIG *rig; @@ -334,6 +368,7 @@ static int remove_opened_rig(const RIG *rig) return (-RIG_EINVAL); /* Not found in list ! */ } +//! @endcond /** @@ -370,8 +405,6 @@ int foreach_opened_rig(int (*cfunc)(RIG *, rig_ptr_t), rig_ptr_t data) return (RIG_OK); } -#endif /* !DOC_HIDDEN */ - char debugmsgsave[DEBUGMSGSAVE_SIZE] = ""; char debugmsgsave2[DEBUGMSGSAVE_SIZE] = ""; // deprecated @@ -379,6 +412,17 @@ char debugmsgsave3[DEBUGMSGSAVE_SIZE] = ""; // deprecated MUTEX(mutex_debugmsgsave); + +/** + * @brief Handle stack trace messages. + * + * @ingroup lib_internal + * + * Maintains an array of debug messages to build a stack trace of up to 20 + * lines. + * + * @sa rigerror() + */ void add2debugmsgsave(const char *s) { const char *p; @@ -431,16 +475,19 @@ void add2debugmsgsave(const char *s) MUTEX_UNLOCK(mutex_debugmsgsave); } + /** - * \brief get string describing the error code - * \param errnum The error code - * \return the appropriate description string, otherwise a NULL pointer - * if the error code is unknown. + * \brief Get the string describing the passed error code. + * + * Simple version of rigerror() as it only outputs a short predefined string. + * + * \param errnum The error code defined in #rig_errcode_e, e.g. RIG_OK. * - * Returns a string describing the error code passed in the argument \a - * errnum. + * \return The matched description string from `rigerror_table`, otherwise + * `"ERR_OUT_OF_RANGE"` if `errnum` exceeds the number of strings defined in + * `rigerror_table`. * - * \todo support gettext/localization + * \todo Support gettext/localization */ const char *HAMLIB_API rigerror2(int errnum) // returns single-line message { @@ -457,6 +504,19 @@ const char *HAMLIB_API rigerror2(int errnum) // returns single-line message return msg; } + +/** + * @brief Add error message to debug output. + * + * \param errnum The error code defined in #rig_errcode_e, e.g. RIG_OK. + * + * @return Pointer to the complete debug output otherwise `"ERR_OUT_OF_RANGE"` + * if `errnum` exceeds the number of strings defined in `rigerror_table`. + * + * @sa add2debugmsgsave() + * + * \todo Support gettext/localization + */ const char *HAMLIB_API rigerror(int errnum) { errnum = abs(errnum); ----------------------------------------------------------------------- Summary of changes: doc/hamlib.cfg.in | 2 +- doc/index.doxygen | 1 + include/hamlib/rig.h | 59 ++++++++++++-------------- src/rig.c | 118 ++++++++++++++++++++++++++++++++++++++------------- 4 files changed, 118 insertions(+), 62 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-09-05 23:36:53
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via e762a812d08ab677808bd7f6d53adc87b3fa6195 (commit) from a35365d1554e018792a7d141c4186b9ad72c7d23 (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 e762a812d08ab677808bd7f6d53adc87b3fa6195 Author: Nate Bargmann <n0...@n0...> Date: Fri Sep 5 18:34:05 2025 -0500 Add 4.6.4 and 4.6.5 release info diff --git a/NEWS b/NEWS index 7eba7f0cd..c1905dc47 100644 --- a/NEWS +++ b/NEWS @@ -36,6 +36,28 @@ Version 4.7.0 * New AF6SA WRC rotator backend. (TNX Michael Morgan) * New Yaesu FTX-1 model support (alpha). (TNX Jeremy Miller). +Version 4.6.5 + * 2025-09-05 + * Update Kenwood CW buffer max message size, fix one byte buffer + overrun in icom.c. (TNX George Baltz). + * Fix Segmentation Fault in rigs/dummy/netrigctl.c. (TNX Daniele Forsi) + * Fix segfault with set_parm KEYERTYPE in rigctl_parse.c. (TNX Daniele + Forsi) + +Version 4.6.4 + * 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). + * Fixed jrc_set_chan. (TNX Mark Fine). + * Fix memory leak in rigctl_parse.c and use unique separator character + for each rigctld connection--closes GitHub #1748. (TNX George Baltz). + * 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) + * Handle spaces correctly for Fles SmartSDR. (TNX Michael Morgan) + Version 4.6.3 * 2025-06-10 * Release dedicated to the memory of Michael Black, W9MDB (SK). Mike was a ----------------------------------------------------------------------- Summary of changes: NEWS | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-09-05 23:15:28
|
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.5 has been created at a1de76612507742cfec88a819b80244049af21ce (tag) tagging 8a6bd56cc1f9685a744eda8b88efc068e2f94d3e (commit) replaces 4.6.4 tagged by Nate Bargmann on Fri Sep 5 14:52:52 2025 -0500 - Log ----------------------------------------------------------------- Hamlib 4.6.5 release -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQSC1k9rDmfNQfaJu6b7LFEw1VqIGQUCaLs/uQAKCRD7LFEw1VqI Gb70AJ9NeTn0CI9Z7+3SIl1+Ce0zz/76kwCgmX1DlxD6wYlJKob0NHSuXRNBP2g= =rg8T -----END PGP SIGNATURE----- Daniele Forsi IU5HKX (2): Fix segfault when executing the dump_caps command Fix segfault with set_parm KEYERTYPE George Baltz N3GB (2): Update Kenwood max CW message size. Fix one byte buffer overrun Nate Bargmann (7): Advance to 4.6.5 Update NEWS with seg fault fix Update Segfault-award for netrigctl_open() fix Update NEWS with seg fault fix in rigctl Update Segfault-award for rigctl fix Advance to 4.6.5 release Update NEWS for 4.6.5 release ----------------------------------------------------------------------- hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-09-05 19:57:15
|
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 8a6bd56cc1f9685a744eda8b88efc068e2f94d3e (commit) via 1e0240253fd161415b59f08d3fec4d69cd94fd89 (commit) from 02363078fc379b6772a9593954585f27a3518093 (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 8a6bd56cc1f9685a744eda8b88efc068e2f94d3e Author: Nate Bargmann <n0...@n0...> Date: Fri Sep 5 14:49:48 2025 -0500 Update NEWS for 4.6.5 release diff --git a/NEWS b/NEWS index 65adb642d..097e45ce4 100644 --- a/NEWS +++ b/NEWS @@ -16,7 +16,7 @@ Version 4.7.0 * 2025-12-01 (target) Version 4.6.5 - * 2025-??-?? + * 2025-09-05 * Update Kenwood CW buffer max message size, fix one byte buffer overrun in icom.c. (TNX George Baltz). * Fix Segmentation Fault in rigs/dummy/netrigctl.c. (TNX Daniele Forsi) commit 1e0240253fd161415b59f08d3fec4d69cd94fd89 Author: Nate Bargmann <n0...@n0...> Date: Fri Sep 5 14:48:12 2025 -0500 Advance to 4.6.5 release diff --git a/configure.ac b/configure.ac index 4facb20b9..bc720b7dc 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.5~rc],[ham...@li...],[hamlib],[http://www.hamlib.org]) +AC_INIT([Hamlib],[4.6.5],[ham...@li...],[hamlib],[http://www.hamlib.org]) #AC_INIT([PRODUCT_NAME], [Hamlib]) #AC_DEFINE([Hamlib], [PRODUCT_VERSION_RESOURCE]) ----------------------------------------------------------------------- Summary of changes: NEWS | 2 +- configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-09-05 12:26: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 a35365d1554e018792a7d141c4186b9ad72c7d23 (commit) via 8d5e6022297e8a17baa27cd4664ddd7cd74ffda5 (commit) via c4d524e379bb33193efd0e19760509c3e2141e72 (commit) from 23bc557ed7d64dad18108e3907eb3e6309c16f1f (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 a35365d1554e018792a7d141c4186b9ad72c7d23 Merge: 23bc557ed 8d5e60222 Author: Nate Bargmann <n0...@n0...> Date: Fri Sep 5 07:20:11 2025 -0500 Merge GitHub PR #1886 commit 8d5e6022297e8a17baa27cd4664ddd7cd74ffda5 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Thu Sep 4 21:34:22 2025 +0200 Add missing configuration parameter freq_skip diff --git a/doc/man1/rigctld.1 b/doc/man1/rigctld.1 index 98e6786dc..ce9bbe804 100644 --- a/doc/man1/rigctld.1 +++ b/doc/man1/rigctld.1 @@ -309,6 +309,7 @@ Set configuration parameter(s). Some common ones are: .BR dcd_pathname: "Path name to the device file of the Data Carrier Detect (or squelch)" .BR disable_yaesu_bandselect: "True disables the automatic band select on band change for Yaesu rigs" .BR dtr_state: "ON turns on DTR, OFF turns it off, Unset disables it" +.BR freq_skip: "!=0 skips setting freq on TX_VFO when in RX and on RX_VFO when in TX -- for use with gpredict and rigs that do not have TARGETABLE_VFO .BR lo_freq: "Frequency to add to the VFO frequency for use with a transverter" .BR post_write_delay: "Delay in ms between each command sent out" .BR ptt_share: "True enables ptt port to be shared with other apps" commit c4d524e379bb33193efd0e19760509c3e2141e72 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Thu Sep 4 21:19:34 2025 +0200 Fix typo diff --git a/doc/man1/rotctld.1 b/doc/man1/rotctld.1 index 7be6f0504..f95f42283 100644 --- a/doc/man1/rotctld.1 +++ b/doc/man1/rotctld.1 @@ -904,7 +904,7 @@ for RotorEZ using COM2 on Win32: .PP .in +4n .EX -> \fBrotctl \-m 401 \-r COM2\fP +> \fBrotctld \-m 401 \-r COM2\fP .EE .in . ----------------------------------------------------------------------- Summary of changes: doc/man1/rigctld.1 | 1 + doc/man1/rotctld.1 | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-09-05 12:19: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 23bc557ed7d64dad18108e3907eb3e6309c16f1f (commit) via d8565776c22f5a2383b804446a0cd5565568344c (commit) via 6b4c6200d01c5bdffe60d21c64160c3b30925795 (commit) via b8f42e4a6d9a200a291160ddac9f642749195697 (commit) from 00562fbc509ffe9cca351870c658b2bd842f3469 (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 23bc557ed7d64dad18108e3907eb3e6309c16f1f Merge: 00562fbc5 d8565776c Author: Nate Bargmann <n0...@n0...> Date: Thu Sep 4 18:38:38 2025 -0500 Merge GitHub PR #1878 commit d8565776c22f5a2383b804446a0cd5565568344c Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Thu Sep 4 22:43:38 2025 +0200 Add a short description of INDI (Instrument Neutral Distributed Interface) diff --git a/doc/man1/rotctl.1 b/doc/man1/rotctl.1 index 6ffaa15a7..7da2249d4 100644 --- a/doc/man1/rotctl.1 +++ b/doc/man1/rotctl.1 @@ -828,7 +828,15 @@ for INDI using the local domain on Linux: .RB $ " rotctl -m 2001 -r @/tmp/indiserver" .EE .in -. +.PP +INDI (Instrument Neutral Distributed Interface) is an LGPLv2 +software to control astronomical equipment, +including telescope mounts that can be used to rotate antennas. +.PP +For more information see +.UR https://indilib.org/ +indilib.org +.UE . .SH BUGS . commit 6b4c6200d01c5bdffe60d21c64160c3b30925795 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Tue Sep 2 00:07:13 2025 +0200 Add examples of using INDI rotators diff --git a/doc/man1/rotctl.1 b/doc/man1/rotctl.1 index 83175119c..6ffaa15a7 100644 --- a/doc/man1/rotctl.1 +++ b/doc/man1/rotctl.1 @@ -5,7 +5,7 @@ .\" .\" Note: Please keep this page in sync with the source, rotctl.c .\" -.TH ROTCTL "1" "2020-09-09" "Hamlib" "Hamlib Utilities" +.TH ROTCTL "1" "2025-09-01" "Hamlib" "Hamlib Utilities" . . .SH NAME @@ -805,6 +805,30 @@ TCP port, and querying the position: .EE .in . +.PP +Start +.B rotctl +for INDI using an address other than the default \fIlocalhost:5764\fP: +. +.PP +.in +4n +.EX +.RB $ " rotctl -m 2001 -r example.com:12345" +.EE +.in +. +.PP +Start +.B rotctl +for INDI using the local domain on Linux: +. +.PP +.in +4n +.EX +.RB $ " rotctl -m 2001 -r @/tmp/indiserver" +.EE +.in +. . .SH BUGS . commit b8f42e4a6d9a200a291160ddac9f642749195697 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Fri Aug 29 23:31:27 2025 +0200 Do not hardcode host and port number of INDI server This allows to connect to the server running on another machine or on a different port. Defaults to the old value of localhost:7624. It is still possible to connect to the local domain, eg. with --rot-file @/tmp/indiserver diff --git a/rotators/indi/indi.c b/rotators/indi/indi.c index e40538248..39ec6411c 100644 --- a/rotators/indi/indi.c +++ b/rotators/indi/indi.c @@ -30,7 +30,7 @@ const struct rot_caps indi_rot_caps = ROT_MODEL(ROT_MODEL_INDI), .model_name = "INDI", .mfg_name = "INDI", - .version = "0.1", + .version = "0.2", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rot_type = ROT_TYPE_OTHER, diff --git a/rotators/indi/indi_wrapper.cpp b/rotators/indi/indi_wrapper.cpp index 0ae8f1758..0861fd7d0 100644 --- a/rotators/indi/indi_wrapper.cpp +++ b/rotators/indi/indi_wrapper.cpp @@ -597,9 +597,20 @@ extern "C" const char *indi_wrapper_get_info(ROT *rot) extern "C" int indi_wrapper_open(ROT *rot) { + hamlib_port_t *rotp = ROTPORT(rot); + char host[256]; + char port[6]; + rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__); - indi_wrapper_client->setServer("localhost", 7624); + if (parse_hoststr(rotp->pathname, strlen(rotp->pathname), host, port) == RIG_OK) + { + indi_wrapper_client->setServer(host, atoi(port)); + } + else + { + indi_wrapper_client->setServer("localhost", 7624); + } if (!indi_wrapper_client->connectServer()) { diff --git a/rotators/indi/indi_wrapper.hpp b/rotators/indi/indi_wrapper.hpp index c96bf277c..69b90b32f 100644 --- a/rotators/indi/indi_wrapper.hpp +++ b/rotators/indi/indi_wrapper.hpp @@ -26,6 +26,7 @@ #include <libindi/baseclient.h> #include <hamlib/rotator.h> +#include "misc.h" class RotINDIClient : public INDI::BaseClient { ----------------------------------------------------------------------- Summary of changes: doc/man1/rotctl.1 | 34 +++++++++++++++++++++++++++++++++- rotators/indi/indi.c | 2 +- rotators/indi/indi_wrapper.cpp | 13 ++++++++++++- rotators/indi/indi_wrapper.hpp | 1 + 4 files changed, 47 insertions(+), 3 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-09-04 23:37:07
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 00562fbc509ffe9cca351870c658b2bd842f3469 (commit) via 64ec35845c1cdcf2c64d541ca1bb4bf7f499a16e (commit) via 901682ba30a4aae692a81fae585791b3dee94a90 (commit) via 31fc48c1459b37b6f78439489c2fad1d1da18d95 (commit) via b3cde37a06dd869e639dcb116de31556bf94a0b0 (commit) via 7ab3dd718ceaf234df027a9c617c7fcd24cb7a92 (commit) from 8645a5a95e41dddeeefbf669d1009bbe105bb336 (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 00562fbc509ffe9cca351870c658b2bd842f3469 Merge: 8645a5a95 64ec35845 Author: Nate Bargmann <n0...@n0...> Date: Thu Sep 4 07:15:06 2025 -0500 Merge GitHub PR #1884 commit 64ec35845c1cdcf2c64d541ca1bb4bf7f499a16e Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Wed Sep 3 20:25:57 2025 +0200 Return "Feature not available" for range_list_number and range_list_name Test case: tests/rigctl get_conf range_list_number get_conf range_list_name error = *1:event.c(269):rig_poll_routine_start entered *1:event.c(309):rig_poll_routine_start returning(0) rig.c(294):add_opened_rig entered rig.c(306):add_opened_rig returning2(0) rig.c(1669):rig_open returning2(0) *1:rig.c(6904):rig_get_powerstat entered *rig.c(6918) trace **2:dummy.c(1680):dummy_get_powerstat entered **2:dummy.c(1683):dummy_get_powerstat returning(0) *1:rig.c(6931):rig_get_powerstat returning(0) Backend version: 20240709.0, Status: Stable rigctl_parse: called, interactive=0 rigctl_parse: vfo_opt=0 rig_set_cache_timeout_ms: called selection=0, ms=1000 rig_set_cache_timeout_ms: called selection=0, ms=1000 rigctl_get_conf: rig_token_lookup called for range_list_number rig_confparam_lookup called for range_list_number rig_get_conf2 called Feature not available error = **2:dummy.c(1680):dummy_get_powerstat entered **2:dummy.c(1683):dummy_get_powerstat returning(0) *1:rig.c(6931):rig_get_powerstat returning(0) Backend version: 20240709.0, Status: Stable rigctl_parse: called, interactive=0 rigctl_parse: vfo_opt=0 rig_set_cache_timeout_ms: called selection=0, ms=1000 rig_set_cache_timeout_ms: called selection=0, ms=1000 rigctl_get_conf: rig_token_lookup called for range_list_number rig_confparam_lookup called for range_list_number rig_get_conf2 called Feature not available rigctl_parse: called, interactive=0 rigctl_parse: vfo_opt=0 rigctl_get_conf: rig_token_lookup called for range_list_name rig_confparam_lookup called for range_list_name rig_get_conf2 called Feature not available diff --git a/src/conf.c b/src/conf.c index 3ec4a40b3..7d4871d13 100644 --- a/src/conf.c +++ b/src/conf.c @@ -1222,12 +1222,10 @@ static int frontend_get_conf2(RIG *rig, hamlib_token_t token, char *val, break; case TOK_RANGE_SELECTED: - SNPRINTF(val, val_len, "%d", 0); // FIXME - break; + return -RIG_ENAVAIL; case TOK_RANGE_NAME: - SNPRINTF(val, val_len, "%s", ""); // FIXME - break; + return -RIG_ENAVAIL; case TOK_CACHE_TIMEOUT: SNPRINTF(val, val_len, "%d", rig_get_cache_timeout_ms(rig, HAMLIB_CACHE_ALL)); commit 901682ba30a4aae692a81fae585791b3dee94a90 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Aug 31 16:38:39 2025 +0200 [rigctl] Use "fout" for consistency This makes no difference in the current code, but other usages of dumpconf_list() are different: $ grep dumpconf_list *parse.c rigctl_parse.c: dumpconf_list(rig, stdout); rigctl_parse.c: dumpconf_list(rig, fout); rotctl_parse.c: dumpconf_list(rot, fout); rotctl_parse.c: dumpconf_list(rot, fout); rotctl_parse.c: dumpconf_list(rot, fout); diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 4eaa56bc0..801c259a0 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -6048,7 +6048,7 @@ declare_proto_rig(get_conf) if (arg1 == NULL || arg1[0] == '?') { - dumpconf_list(rig, stdout); + dumpconf_list(rig, fout); debugmsgsave[0] = 0; debugmsgsave2[0] = 0; return RIG_OK; commit 31fc48c1459b37b6f78439489c2fad1d1da18d95 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Aug 31 15:30:19 2025 +0200 [dummy] Add code to get_conf static_data diff --git a/rigs/dummy/dummy.c b/rigs/dummy/dummy.c index ac45cac61..1e7969bc9 100644 --- a/rigs/dummy/dummy.c +++ b/rigs/dummy/dummy.c @@ -430,6 +430,10 @@ static int dummy_get_conf(RIG *rig, hamlib_token_t token, char *val) strcpy(val, priv->magic_conf); break; + case TOK_CFG_STATIC_DATA: + SNPRINTF(val, 128, "%d", priv->static_data); + break; + default: RETURNFUNC(-RIG_EINVAL); } commit b3cde37a06dd869e639dcb116de31556bf94a0b0 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Aug 31 11:54:01 2025 +0200 Add missing code to read some configuration parameters Adds code keeping the same order of token.h to `get_conf` the following tokens: freq_skip offset_vfoa offset_vfob range_list_name (always returns an empty string) range_list_number (always returns 0) tuner_control_pathname diff --git a/src/conf.c b/src/conf.c index 9315d3cf3..3ec4a40b3 100644 --- a/src/conf.c +++ b/src/conf.c @@ -1221,6 +1221,14 @@ static int frontend_get_conf2(RIG *rig, hamlib_token_t token, char *val, SNPRINTF(val, val_len, "%g", rs->lo_freq); break; + case TOK_RANGE_SELECTED: + SNPRINTF(val, val_len, "%d", 0); // FIXME + break; + + case TOK_RANGE_NAME: + SNPRINTF(val, val_len, "%s", ""); // FIXME + break; + case TOK_CACHE_TIMEOUT: SNPRINTF(val, val_len, "%d", rig_get_cache_timeout_ms(rig, HAMLIB_CACHE_ALL)); break; @@ -1257,10 +1265,22 @@ static int frontend_get_conf2(RIG *rig, hamlib_token_t token, char *val, SNPRINTF(val, val_len, "%d", rs->twiddle_rit); break; + case TOK_OFFSET_VFOA: + SNPRINTF(val, val_len, "%g", rs->offset_vfoa); + break; + + case TOK_OFFSET_VFOB: + SNPRINTF(val, val_len, "%g", rs->offset_vfob); + break; + case TOK_ASYNC: SNPRINTF(val, val_len, "%d", rs->async_data_enabled); break; + case TOK_TUNER_CONTROL_PATHNAME: + SNPRINTF(val, val_len, "%s", rs->tuner_control_pathname); + break; + case TOK_TIMEOUT_RETRY: SNPRINTF(val, val_len, "%d", rp->timeout_retry); break; @@ -1281,6 +1301,10 @@ static int frontend_get_conf2(RIG *rig, hamlib_token_t token, char *val, SNPRINTF(val, val_len, "%d", rs->multicast_cmd_port); break; + case TOK_FREQ_SKIP: + SNPRINTF(val, val_len, "%d", rs->freq_skip); + break; + default: return -RIG_EINVAL; } commit 7ab3dd718ceaf234df027a9c617c7fcd24cb7a92 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Aug 31 11:09:12 2025 +0200 Fix conflicting names for TOK_RANGE_SELECTED and TOK_RANGE_NAME Change also the descriptions. Test case before: tests/rigctl dump_conf | grep range Selected range list: "The tx/rx range list in use" Selected range list: "The tx/rx range list name" after: tests/rigctl dump_conf | grep range range_list_number: "The tx/rx range list number in use" range_list_name: "The tx/rx range list name in use" diff --git a/src/conf.c b/src/conf.c index 67f50d19b..9315d3cf3 100644 --- a/src/conf.c +++ b/src/conf.c @@ -81,13 +81,13 @@ static const struct confparams frontend_cfg_params[] = "1", RIG_CONF_NUMERIC, { .n = { 0, 100, 1 } } }, { - TOK_RANGE_SELECTED, "Selected range list", "Range list#", - "The tx/rx range list in use", + TOK_RANGE_SELECTED, "range_list_number", "Range list number", + "The tx/rx range list number in use", "0", RIG_CONF_NUMERIC, { .n = { 1, 5, 1 } } }, { - TOK_RANGE_NAME, "Selected range list", "Range list name", - "The tx/rx range list name", + TOK_RANGE_NAME, "range_list_name", "Range list name", + "The tx/rx range list name in use", "Default", RIG_CONF_STRING }, { ----------------------------------------------------------------------- Summary of changes: rigs/dummy/dummy.c | 4 ++++ src/conf.c | 30 ++++++++++++++++++++++++++---- tests/rigctl_parse.c | 2 +- 3 files changed, 31 insertions(+), 5 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-09-03 20:15:34
|
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 8645a5a95e41dddeeefbf669d1009bbe105bb336 (commit) from f42782c2eac82d326783e5138a9bed860e9f83eb (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 8645a5a95e41dddeeefbf669d1009bbe105bb336 Author: Nate Bargmann <n0...@n0...> Date: Wed Sep 3 15:11:52 2025 -0500 Add suggestions regarding Markdown diff --git a/README.coding_style b/README.coding_style index 7a3e2594e..661e7d62d 100644 --- a/README.coding_style +++ b/README.coding_style @@ -202,6 +202,24 @@ work flawlessly. Somehow. When indenting a line in a Makefile.am (and the resulting Makefile) that a real Tab character (0x09) is required. Spaces will cause 'make' errors. +3.5 Markdown + +Markdown (https://daringfireball.net/projects/markdown/) is characterized by +the use of various characters, indentation, and spaces to generate HTML markup +by various tools. There are several dialects of Markdown in use. The most +pertinent dialect for our use is GitHub Flavored Markdown +(https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax) + +Besides its conversion to HTML, the intention of Markdown is readable text +files where the formatting cues don't distract from reading the text. Sites +like GitHub will process these files on the fly and render them in HTML. + +For Markdown files included in Hamlib, consider these suggestions: + + - Markdown files should have an extension of .md + - Spaces should be used instead of tabs. + - Text width should be limited to 80-100 characters with 80 preferred. + 4. Use of code formatting tools ----------------------------------------------------------------------- Summary of changes: README.coding_style | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-09-03 19:40:42
|
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 f42782c2eac82d326783e5138a9bed860e9f83eb (commit) via 688b9dba9a51b143b75a33b204932d37cb3b99e6 (commit) via 7f8ac191e98eb00ce80318777573d632e40a38f1 (commit) via 50852d43b91dd4762d143c02fdec10389ab2b3b9 (commit) via dfad2a788ba2d3863ddbf8f3b3f3cac39ae8c8da (commit) via fa7ca3415ded790764b4434dcf6d315b089eb19b (commit) via 9bad1d6eb20b91c16d9d88f37a65bae7fd3ddd48 (commit) from f15537f2e690bcf4a705a8976e4327738a18afde (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 f42782c2eac82d326783e5138a9bed860e9f83eb Author: George Baltz N3GB <Geo...@gm...> Date: Wed Sep 3 10:11:41 2025 -0400 Fix typo diff --git a/ReleaseNotes_4.7.md b/ReleaseNotes_4.7.md index 72a7c59de..18c1323d5 100644 --- a/ReleaseNotes_4.7.md +++ b/ReleaseNotes_4.7.md @@ -46,7 +46,7 @@ Along with the moves to separate storage, the definitions of these data structur will be moved out of hamlib/rig.h to their own include files. These `.h` files also define macros to get the address of said structures. -Prelinary versions of these files are also part of 4.7 for pre-emptive use. +Preliminary versions of these files are also part of 4.7 for pre-emptive use. ### The good news If your application only calls the Hamlib API routines, then nothing needs to change. commit 688b9dba9a51b143b75a33b204932d37cb3b99e6 Author: George Baltz N3GB <Geo...@gm...> Date: Tue Sep 2 22:09:06 2025 -0400 Ask for testing of FTX-1 diff --git a/ReleaseNotes_4.7.md b/ReleaseNotes_4.7.md index 90bb2ad4a..72a7c59de 100644 --- a/ReleaseNotes_4.7.md +++ b/ReleaseNotes_4.7.md @@ -6,7 +6,7 @@ This release brings new equipment support, bug fixes/code cleanups, and some changes to ease transition to 5.0 ## New equipment support -- Yaesu FTX-1 Optima/Field - Work in progress +- Yaesu FTX-1 Optima/Field - Work in progress; testers welcome. - Drake R8/R8A/R8B - new, revised backend - AF6SA WRC rotator - GUOHETEC PMR-171 & Q900 moved to separate backend commit 7f8ac191e98eb00ce80318777573d632e40a38f1 Author: George Baltz N3GB <Geo...@gm...> Date: Tue Sep 2 18:17:30 2025 -0400 Bring some things up to date. Still nowhere close to done. diff --git a/ReleaseNotes_4.7.md b/ReleaseNotes_4.7.md index 0fe2dae33..90bb2ad4a 100644 --- a/ReleaseNotes_4.7.md +++ b/ReleaseNotes_4.7.md @@ -1,32 +1,35 @@ # HAMLIB 4.7 - Release Notes (WIP) 2025-12-01(?) +*This is very much a first cut - nothing is set in concrete or inviolate - n3gb* + This release brings new equipment support, bug fixes/code cleanups, and some changes to ease transition to 5.0 ## New equipment support -- Yaesu FTX-1 Optima/Field - Work in progress, waiting for official - documentation from Yaesu +- Yaesu FTX-1 Optima/Field - Work in progress - Drake R8/R8A/R8B - new, revised backend - AF6SA WRC rotator - GUOHETEC PMR-171 & Q900 moved to separate backend -## Bug Fixes & Code cleanups +## Bug fixes & code cleanups - Codebase conforms to ISO/IEC 9899:2024 (-std=c23) - Reduce gripes from cppcheck and other static analyzers - Functions `rig_get_conf()`, `rot_get_conf()` and `amp_get_conf()` are deprecated and will be removed in 5.0. Use `..._get_conf2()` instead. See issue [#924](https://github.com/Hamlib/Hamlib/issues/924). +- Documentation brought up to date. - (TBD) -## Build/install Changes +## Build/install changes - POSIX threads(PTHREADS) support required +- Many fixes for building the optional language bindings - C compiler - Supported compilers unchanged; c11 or c17 recommended, c23 optional. 5.0 will require at least c11. ## Changes for 5.0 HAMLIB 5.0 will make some major changes to the Application Binary Interface(ABI) that will require changes to some applications, and at least recompilation/linking for all -apps. Most(All, I hope) of these source changes can be made/tested/debugged incrementally +apps. Most(all, I hope) of these source changes can be made/tested/debugged incrementally with 4.7, making the transition much easier. The Application Programming Interface(API) does not change. @@ -43,6 +46,8 @@ Along with the moves to separate storage, the definitions of these data structur will be moved out of hamlib/rig.h to their own include files. These `.h` files also define macros to get the address of said structures. +Prelinary versions of these files are also part of 4.7 for pre-emptive use. + ### The good news If your application only calls the Hamlib API routines, then nothing needs to change. If your application only uses configuration items like names, speeds, etc, it may be diff --git a/ReleaseNotes_5.0.md b/ReleaseNotes_5.0.md index 890afc35a..fb1797e9d 100644 --- a/ReleaseNotes_5.0.md +++ b/ReleaseNotes_5.0.md @@ -1,5 +1,7 @@ # HAMLIB 5.0 - Release Notes (DRAFT) 2026-12-01(target) +*This more of a list of possibilities than a true document - a strawman only* + This major release includes a restructuring of HAMLIB internal storage, forcing changes to the Application Binary Interface(ABI). commit 50852d43b91dd4762d143c02fdec10389ab2b3b9 Author: George Baltz N3GB <Geo...@gm...> Date: Sun Aug 3 10:28:27 2025 -0400 Add deprecation/change info diff --git a/ReleaseNotes_4.7.md b/ReleaseNotes_4.7.md index f0bde453b..0fe2dae33 100644 --- a/ReleaseNotes_4.7.md +++ b/ReleaseNotes_4.7.md @@ -35,8 +35,8 @@ HAMLIB 5.0 will move many data items/structures out of rig_struct into separate buffers. See issues [#487](https://github.com/Hanlib/Hamlib/issues/487), [#1445](https://github.com/Hamlib/Hamlib/issues/1445), and [#1420](https://github.com/Hamlib/Hamlib/issues/1420). This changes many of -the methods for accessing HAMLIB internal data. It also removes some obsolete -items, and restructures/resizes others. +the methods for accessing HAMLIB internal data. HAMLIB 4.7 marks these old methods as +"Deprecated", and supplies macros to use for forward compatibility. ### Include files Along with the moves to separate storage, the definitions of these data structures diff --git a/ReleaseNotes_5.0.md b/ReleaseNotes_5.0.md index 04e72579e..890afc35a 100644 --- a/ReleaseNotes_5.0.md +++ b/ReleaseNotes_5.0.md @@ -6,19 +6,28 @@ changes to the Application Binary Interface(ABI). ## New Hardware - TBD -## Build changes -- No more K&R C - C compiler needs at least c11 capability. +## Bug fixes & code cleanups +- shortfreq_t changed to int32? - Functions rig_get_conf(), rot_get_conf() and amp_get_conf() have been removed. See [issue #924](https://github.com/Hamlib/Hamlib/issues/924). -- shortfreq_t changed to int32? + +## Build changes +- No more K&R C - C compiler needs at least c11 capability. ## Application changes +The renovation of HAMLIB working storage was done with three goals: + +- Eliminate problems due to having structures within structures, which caused alignment + issues between applications and shared libraries. +- Separate API definitions from HAMLIB internal data. +- Plan for the future. + +### Structure renovation Many of the internal HAMLIB data structures have been moved out of the rig_struct area into their own heap buffers, and are addressed by pointers. Any application that wishes to access these structure will have to add a new `#include` statement and use a macro defined in that `.h` file to obtain the address. - | Structure | Old reference | Include file | New Pointer | | --------- | ---------------- | ----------------- | ------------ | | Rig state | `rig->state` | `<hamlib/rig_state.h>` | `HAMLIB_STATE(rig)` | @@ -30,3 +39,12 @@ use a macro defined in that `.h` file to obtain the address. | Rotator state | `rot->state` | `<hamlib/rot_state.h>` | `HAMLIB_ROTSTATE(rot)` | | Rotator port | `rot->state.rotport` | `<hamlib/port.h>` | `HAMLIB_ROTPORT(rot)` | | Rotator port2 | `rot->state.rotport2` | `<hamlib/port.h>` | `HAMLIB_ROTPORT2(rot)` | + +### Separate definitions +Previously, including `hamlib/rig.h` in an application defined not only the API functions +and constants needed to use HAMLIB, but everything needed by HAMLIB itself. This may +have caused conflicts with the app's own symbols("namespace pollution"), or just added to +compilation time. Some(many?) of these are now kept solely within HAMLIB. Including +`hamlib/rig.h` should be just enough to call the API functions. + +### Future considerations commit dfad2a788ba2d3863ddbf8f3b3f3cac39ae8c8da Author: George Baltz N3GB <Geo...@gm...> Date: Thu Jul 31 21:38:53 2025 -0400 More things filled in Add links to issues(with URLs) Add table of structures/include files/macros diff --git a/ReleaseNotes_4.7.md b/ReleaseNotes_4.7.md index e7241a87b..f0bde453b 100644 --- a/ReleaseNotes_4.7.md +++ b/ReleaseNotes_4.7.md @@ -1,4 +1,4 @@ -# HAMLIB 4.7 - Release Notes +# HAMLIB 4.7 - Release Notes (WIP) 2025-12-01(?) This release brings new equipment support, bug fixes/code cleanups, and some changes to ease transition to 5.0 @@ -13,8 +13,9 @@ changes to ease transition to 5.0 ## Bug Fixes & Code cleanups - Codebase conforms to ISO/IEC 9899:2024 (-std=c23) - Reduce gripes from cppcheck and other static analyzers -- Functions rig_get_conf(), rot_get_conf() and amp_get_conf() are deprecated and - will be removed in 5.0. Use xyz_get_conf2() instead. See issue #924 +- Functions `rig_get_conf()`, `rot_get_conf()` and `amp_get_conf()` are deprecated and + will be removed in 5.0. Use `..._get_conf2()` instead. See issue + [#924](https://github.com/Hamlib/Hamlib/issues/924). - (TBD) ## Build/install Changes @@ -30,9 +31,12 @@ with 4.7, making the transition much easier. The Application Programming Interfa does not change. ### Storage restructuring -HAMLIB 5.0 will move many data items/structures out of rig_struct into separate, -calloc'ed buffers. This changes many of the methods for accessing HAMLIB internal -data. It also removes some obsolete items, and restructures/resizes others. +HAMLIB 5.0 will move many data items/structures out of rig_struct into separate heap +buffers. See issues [#487](https://github.com/Hanlib/Hamlib/issues/487), +[#1445](https://github.com/Hamlib/Hamlib/issues/1445), and +[#1420](https://github.com/Hamlib/Hamlib/issues/1420). This changes many of +the methods for accessing HAMLIB internal data. It also removes some obsolete +items, and restructures/resizes others. ### Include files Along with the moves to separate storage, the definitions of these data structures diff --git a/ReleaseNotes_5.0.md b/ReleaseNotes_5.0.md index 526b67517..04e72579e 100644 --- a/ReleaseNotes_5.0.md +++ b/ReleaseNotes_5.0.md @@ -1,4 +1,4 @@ -# HAMLIB 5.0 - Release Notes (DRAFT) +# HAMLIB 5.0 - Release Notes (DRAFT) 2026-12-01(target) This major release includes a restructuring of HAMLIB internal storage, forcing changes to the Application Binary Interface(ABI). @@ -9,7 +9,24 @@ changes to the Application Binary Interface(ABI). ## Build changes - No more K&R C - C compiler needs at least c11 capability. - Functions rig_get_conf(), rot_get_conf() and amp_get_conf() have been removed. - See issue #924. -- shortfreq_t changed to int? + See [issue #924](https://github.com/Hamlib/Hamlib/issues/924). +- shortfreq_t changed to int32? ## Application changes +Many of the internal HAMLIB data structures have been moved out of the rig_struct +area into their own heap buffers, and are addressed by pointers. Any application that +wishes to access these structure will have to add a new `#include` statement and +use a macro defined in that `.h` file to obtain the address. + + +| Structure | Old reference | Include file | New Pointer | +| --------- | ---------------- | ----------------- | ------------ | +| Rig state | `rig->state` | `<hamlib/rig_state.h>` | `HAMLIB_STATE(rig)` | +| Rig CAT port | `rig->state.rigport` | `<hamlib/port.h>` | `HAMLIB_RIGPORT(rig)` | +| Rig PTT port | `rig->state.pttport` | `<hamlib/port.h>` | `HAMLIB_PTTPORT(rig)` | +| Rig DCD port | `rig->state.dcdport` | `<hamlib/port.h>` | `HAMLIB_DCDPORT(rig)` | +| Amplifier state | `amp->state` | `<hamlib/amp_state.h>` | `HAMLIB_AMPSTATE(amp)` | +| Amplifier port | `amp->state.ampport` | `<hamlib/port.h>` | `HAMLIB_AMPPORT(amp)` | +| Rotator state | `rot->state` | `<hamlib/rot_state.h>` | `HAMLIB_ROTSTATE(rot)` | +| Rotator port | `rot->state.rotport` | `<hamlib/port.h>` | `HAMLIB_ROTPORT(rot)` | +| Rotator port2 | `rot->state.rotport2` | `<hamlib/port.h>` | `HAMLIB_ROTPORT2(rot)` | commit fa7ca3415ded790764b4434dcf6d315b089eb19b Author: George Baltz N3GB <Geo...@gm...> Date: Sun Jul 27 17:15:17 2025 -0400 More text for relnote diff --git a/ReleaseNotes_4.7.md b/ReleaseNotes_4.7.md index 036e80b7d..e7241a87b 100644 --- a/ReleaseNotes_4.7.md +++ b/ReleaseNotes_4.7.md @@ -1,6 +1,6 @@ # HAMLIB 4.7 - Release Notes -The release brings new equipment support, bug fixes/code cleanups, and some +This release brings new equipment support, bug fixes/code cleanups, and some changes to ease transition to 5.0 ## New equipment support @@ -13,21 +13,33 @@ changes to ease transition to 5.0 ## Bug Fixes & Code cleanups - Codebase conforms to ISO/IEC 9899:2024 (-std=c23) - Reduce gripes from cppcheck and other static analyzers -- Function rig_get_conf() is deprecated and will be removed in 5.0. - Use rig_get_conf2() instead. +- Functions rig_get_conf(), rot_get_conf() and amp_get_conf() are deprecated and + will be removed in 5.0. Use xyz_get_conf2() instead. See issue #924 - (TBD) ## Build/install Changes -- POSIX thread(PTHREADS) support required +- POSIX threads(PTHREADS) support required - C compiler - Supported compilers unchanged; c11 or c17 recommended, c23 optional. 5.0 will require at least c11. ## Changes for 5.0 +HAMLIB 5.0 will make some major changes to the Application Binary Interface(ABI) that will +require changes to some applications, and at least recompilation/linking for all +apps. Most(All, I hope) of these source changes can be made/tested/debugged incrementally +with 4.7, making the transition much easier. The Application Programming Interface(API) +does not change. ### Storage restructuring -HAMLIB 5.0 will move many data items/structures out of rig_struct into -separate, calloc'ed buffers. This changes many of the methods for accessing -HAMLIB internal data. +HAMLIB 5.0 will move many data items/structures out of rig_struct into separate, +calloc'ed buffers. This changes many of the methods for accessing HAMLIB internal +data. It also removes some obsolete items, and restructures/resizes others. ### Include files - +Along with the moves to separate storage, the definitions of these data structures +will be moved out of hamlib/rig.h to their own include files. These `.h` files also +define macros to get the address of said structures. + +### The good news +If your application only calls the Hamlib API routines, then nothing needs to change. +If your application only uses configuration items like names, speeds, etc, it may be +easiest to change over to using rig_set_conf(). and let Hamlib handle the internals. diff --git a/ReleaseNotes_5.0.md b/ReleaseNotes_5.0.md index dcba4a2ab..526b67517 100644 --- a/ReleaseNotes_5.0.md +++ b/ReleaseNotes_5.0.md @@ -7,7 +7,9 @@ changes to the Application Binary Interface(ABI). - TBD ## Build changes -- No more K&R C - need at least c11 compiler support. +- No more K&R C - C compiler needs at least c11 capability. +- Functions rig_get_conf(), rot_get_conf() and amp_get_conf() have been removed. + See issue #924. - shortfreq_t changed to int? ## Application changes commit 9bad1d6eb20b91c16d9d88f37a65bae7fd3ddd48 Author: George Baltz N3GB <Geo...@gm...> Date: Sat Jul 26 13:09:42 2025 -0400 Baseline for Release Notes diff --git a/ReleaseNotes_4.7.md b/ReleaseNotes_4.7.md new file mode 100644 index 000000000..036e80b7d --- /dev/null +++ b/ReleaseNotes_4.7.md @@ -0,0 +1,33 @@ +# HAMLIB 4.7 - Release Notes + +The release brings new equipment support, bug fixes/code cleanups, and some +changes to ease transition to 5.0 + +## New equipment support +- Yaesu FTX-1 Optima/Field - Work in progress, waiting for official + documentation from Yaesu +- Drake R8/R8A/R8B - new, revised backend +- AF6SA WRC rotator +- GUOHETEC PMR-171 & Q900 moved to separate backend + +## Bug Fixes & Code cleanups +- Codebase conforms to ISO/IEC 9899:2024 (-std=c23) +- Reduce gripes from cppcheck and other static analyzers +- Function rig_get_conf() is deprecated and will be removed in 5.0. + Use rig_get_conf2() instead. +- (TBD) + +## Build/install Changes +- POSIX thread(PTHREADS) support required +- C compiler - Supported compilers unchanged; c11 or c17 recommended, + c23 optional. 5.0 will require at least c11. + +## Changes for 5.0 + +### Storage restructuring +HAMLIB 5.0 will move many data items/structures out of rig_struct into +separate, calloc'ed buffers. This changes many of the methods for accessing +HAMLIB internal data. + +### Include files + diff --git a/ReleaseNotes_5.0.md b/ReleaseNotes_5.0.md new file mode 100644 index 000000000..dcba4a2ab --- /dev/null +++ b/ReleaseNotes_5.0.md @@ -0,0 +1,13 @@ +# HAMLIB 5.0 - Release Notes (DRAFT) + +This major release includes a restructuring of HAMLIB internal storage, forcing +changes to the Application Binary Interface(ABI). + +## New Hardware +- TBD + +## Build changes +- No more K&R C - need at least c11 compiler support. +- shortfreq_t changed to int? + +## Application changes ----------------------------------------------------------------------- Summary of changes: ReleaseNotes_4.7.md | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++ ReleaseNotes_5.0.md | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 106 insertions(+) create mode 100644 ReleaseNotes_4.7.md create mode 100644 ReleaseNotes_5.0.md hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-09-02 20:45: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, master has been updated via f15537f2e690bcf4a705a8976e4327738a18afde (commit) via e4c43821d0b1e53c1b8eebc0b5e9cd2091c9a1f0 (commit) via 632746cf91c50cdbefce5ba8fbe7e502feef9568 (commit) from 3582d8dee09e16c4afd43b6bb696cbfe34ee00a6 (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 f15537f2e690bcf4a705a8976e4327738a18afde Merge: 3582d8dee e4c43821d Author: Nate Bargmann <n0...@n0...> Date: Tue Sep 2 15:38:54 2025 -0500 Merge GitHub PR #1875 commit e4c43821d0b1e53c1b8eebc0b5e9cd2091c9a1f0 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Tue Sep 2 21:45:44 2025 +0200 Always print error messages to stderr Do not depend on the debug level set with --verbose diff --git a/tests/ampctl_parse.c b/tests/ampctl_parse.c index 9e443b812..c4a68408d 100644 --- a/tests/ampctl_parse.c +++ b/tests/ampctl_parse.c @@ -1584,7 +1584,7 @@ void list_models() if (status != RIG_OK) { - rig_debug(RIG_DEBUG_ERR, "amp_list_foreach: error = %s \n", rigerror(status)); + fprintf(stderr, "amp_list_foreach: error = %s \n", rigerror2(status)); exit(2); } diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index f5a9c1fc8..4eaa56bc0 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -2154,7 +2154,7 @@ void list_models() if (status != RIG_OK) { - rig_debug(RIG_DEBUG_ERR, "rig_list_foreach: error = %s \n", rigerror(status)); + fprintf(stderr, "rig_list_foreach: error = %s \n", rigerror2(status)); exit(2); } diff --git a/tests/rotctl_parse.c b/tests/rotctl_parse.c index e7fed60e5..9e4de9637 100644 --- a/tests/rotctl_parse.c +++ b/tests/rotctl_parse.c @@ -1667,7 +1667,7 @@ void list_models() if (status != RIG_OK) { - rig_debug(RIG_DEBUG_ERR, "rot_list_foreach: error = %s \n", rigerror(status)); + fprintf(stderr, "rot_list_foreach: error = %s \n", rigerror2(status)); exit(2); } commit 632746cf91c50cdbefce5ba8fbe7e502feef9568 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Aug 17 17:13:59 2025 +0200 Use rig_debug() instead of sending error messages to stdout diff --git a/tests/ampctl_parse.c b/tests/ampctl_parse.c index e47b6c1ff..9e443b812 100644 --- a/tests/ampctl_parse.c +++ b/tests/ampctl_parse.c @@ -1584,7 +1584,7 @@ void list_models() if (status != RIG_OK) { - printf("amp_list_foreach: error = %s \n", rigerror(status)); + rig_debug(RIG_DEBUG_ERR, "amp_list_foreach: error = %s \n", rigerror(status)); exit(2); } diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index ad42193ec..f5a9c1fc8 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -2154,7 +2154,7 @@ void list_models() if (status != RIG_OK) { - printf("rig_list_foreach: error = %s \n", rigerror(status)); + rig_debug(RIG_DEBUG_ERR, "rig_list_foreach: error = %s \n", rigerror(status)); exit(2); } diff --git a/tests/rotctl_parse.c b/tests/rotctl_parse.c index bfc3488b7..e7fed60e5 100644 --- a/tests/rotctl_parse.c +++ b/tests/rotctl_parse.c @@ -1667,7 +1667,7 @@ void list_models() if (status != RIG_OK) { - printf("rot_list_foreach: error = %s \n", rigerror(status)); + rig_debug(RIG_DEBUG_ERR, "rot_list_foreach: error = %s \n", rigerror(status)); exit(2); } ----------------------------------------------------------------------- Summary of changes: tests/ampctl_parse.c | 2 +- tests/rigctl_parse.c | 2 +- tests/rotctl_parse.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-09-02 12:03:56
|
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 3582d8dee09e16c4afd43b6bb696cbfe34ee00a6 (commit) via a78291ff944a3ae2a6023bd88a7d7ff78739df5d (commit) via d76d563857dcc3702d308b70eeb86a9699a14786 (commit) via 2805dc5ed66412f80e008650169d5d78f2a94cb1 (commit) via d596581ecebc12da1c301542b570391a53fca2fa (commit) from 7180eb7da6297eb436a43c309151170580cc06d9 (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 3582d8dee09e16c4afd43b6bb696cbfe34ee00a6 Author: Nate Bargmann <n0...@n0...> Date: Mon Sep 1 17:33:51 2025 -0500 Update information on Windows builds Rename README.win32 to README.windows Point to build scripts and mention new MinGW name and Web site. diff --git a/README.win32 b/README.windows similarity index 72% rename from README.win32 rename to README.windows index 840b479da..fcde7e253 100644 --- a/README.win32 +++ b/README.windows @@ -1,16 +1,33 @@ -Win32 builds ------------- +Windows 32 and 64 bit builds +============================ -MinGW -===== +MinGW-w64 +--------- -For DLLs compatible with MSVC++ cross-compiled from Linux with MinGW, see -the build-win32.sh script in the scripts/ directory and its companion README -file. +Despite the new name, MinGW-w64 will build binaries for MS Windows 32 bit (x86) +and 64 bit (x64) architectures. The project is hosted at +https://sourceforge.net/projects/mingw-w64/ and the Wiki is at +https://sourceforge.net/p/mingw-w64/wiki2/Home/ +For DLLs compatible with MSVC++ cross-compiled from Linux with MinGW, see the +build-win32.sh or build-w64.sh shell scripts in the scripts/ directory and the +companion README.build-Windows file. The top of each script contains comments +about dependencies and have environment variables that can be tailored to your +system. + +Upon completion the scripts generate a .ZIP file suitable to be installed on an +MS Windows system. Besides the compiled binary files, the scripts include the +Hamlib manual pages converted to HTML format and other files converted to cr/lf +line endings. Also included are the C header files, files that can be used by +MinGW on Windows, and a .DEF file that can be used by MSVC++ to generate its +.LIB file. A README file is generated and included in the archive that has +greater detail. + + +The following may be outdated. Feedback on current commands/process is welcome. Cygwin -====== +------ From: "Mark J. Fine" <mar...@fi...> Subject: [Hamlib-developer] Building under Cygwin for Windows (Mingw32) @@ -93,5 +110,3 @@ MSVC C/C++ projects must use the NuGet pthread package in order to compile as of An example C++ project is in bindings/MSVC If you want to do a dotnet build you will need this done from an administrative PowerShell npm install -g --production windows-build-tools - - commit a78291ff944a3ae2a6023bd88a7d7ff78739df5d Author: Nate Bargmann <n0...@n0...> Date: Thu Aug 28 08:10:09 2025 -0500 Update CONTRIBUTING.md to be relevant to Hamlib diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7765fa2b7..4dc8b1725 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,16 +1,18 @@ # Welcome to Hamlib docs contributing guide <!-- omit in toc --> -Thank you for investing your time in contributing to our project! Any contribution you make will be reflected on [docs.github.com](https://docs.github.com/en) :sparkles:. +Thank you for investing your time in contributing to the Hamlib project! -Read our [Code of Conduct](./CODE_OF_CONDUCT.md) to keep our community approachable and respectable. +Read our [Code of Conduct](./CODE_OF_CONDUCT.md) to keep our community +approachable and respectable. -In this guide you will get an overview of the contribution workflow from opening an issue, creating a PR, reviewing, and merging the PR. - -Use the table of contents icon <img src="/contributing/images/table-of-contents.png" width="25" height="25" /> on the top left corner of this document to get to a specific section of this guide quickly. +In this guide you will get an overview of the contribution workflow from +opening an issue, creating a PR, reviewing, and merging the PR. ## New contributor guide -To get an overview of the project, read the [README](../README.md) file. Here are some resources to help you get started with open source contributions: +To get an overview of the project, read the [README](README.md) file. Here are +some GitHub resources to help you get started with Free Software/open source +contributions: - [Finding ways to contribute to open source on GitHub](https://docs.github.com/en/get-started/exploring-projects-on-github/finding-ways-to-contribute-to-open-source-on-github) - [Set up Git](https://docs.github.com/en/get-started/getting-started-with-git/set-up-git) @@ -20,74 +22,89 @@ To get an overview of the project, read the [README](../README.md) file. Here ar ## Getting started -To navigate our codebase with confidence, see [the introduction to working in the docs repository](/contributing/README.md) :confetti_ball:. For more information on how we write our markdown files, see "[Using Markdown and Liquid in GitHub Docs](https://docs.github.com/en/contributing/writing-for-github-docs/using-markdown-and-liquid-in-github-docs)." +The [README.developer](README.developer) is a detailed overview of contributing +to the Hamlib project. -Check to see what [types of contributions](/contributing/types-of-contributions.md) we accept before making changes. Some of them don't even require writing a single line of code :sparkles:. +For those primarily interested in testing, +[README.betatester](README.betatester) will serve as a guide. ### Issues #### Create a new issue -If you spot a problem with the docs, [search if an issue already exists](https://docs.github.com/en/github/searching-for-information-on-github/searching-on-github/searching-issues-and-pull-requests#search-by-the-title-body-or-comments). If a related issue doesn't exist, you can open a new issue using a relevant [issue form](https://github.com/github/docs/issues/new/choose). - -#### Solve an issue - -Scan through our [existing issues](https://github.com/github/docs/issues) to find one that interests you. You can narrow down the search using `labels` as filters. See "[Label reference](https://docs.github.com/en/contributing/collaborating-on-github-docs/label-reference)" for more information. As a general rule, we don’t assign issues to anyone. If you find an issue to work on, you are welcome to open a PR with a fix. +If you wish to report a problem with a specific radio or have an idea for an +enhancement of Hamlib, take a look at the [Hamlib issue +tracker](https://github.com/Hamlib/Hamlib/issues). -### Make Changes - -#### Make changes in the UI +Use these GitHub documents to learn [how to search if an issue already +exists](https://docs.github.com/en/github/searching-for-information-on-github/searching-on-github/searching-issues-and-pull-requests#search-by-the-title-body-or-comments). +If a related issue doesn't exist, you can open a new issue using a relevant +[issue form](https://github.com/github/docs/issues/new/choose). -Click **Make a contribution** at the bottom of any docs page to make small changes such as a typo, sentence fix, or a broken link. This takes you to the `.md` file where you can make your changes and [create a pull request](#pull-request) for a review. - <img src="/contributing/images/contribution_cta.png" /> +#### Solve an issue -#### Make changes in a codespace +Scan through our [existing issues](https://github.com/Hamlib/Hamlib/issues) to +find one that interests you. You can narrow down the search using `labels` as +filters. See "[Label +reference](https://docs.github.com/en/contributing/collaborating-on-github-docs/label-reference)" +for more information. As a general rule, we don’t assign issues to anyone +unless interest is expressed in doing so as a signal it is being worked on. +If you find an issue to work on, you are welcome to open a PR with a fix and +reference the issue with the `#dddd` syntax in the text of your PR. This will +link the two. -For more information about using a codespace for working on GitHub documentation, see "[Working in a codespace](https://github.com/github/docs/blob/main/contributing/codespace.md)." +### Make Changes #### Make changes locally 1. Fork the repository. -- Using GitHub Desktop: - - [Getting started with GitHub Desktop](https://docs.github.com/en/desktop/installing-and-configuring-github-desktop/getting-started-with-github-desktop) will guide you through setting up Desktop. - - Once Desktop is set up, you can use it to [fork the repo](https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/cloning-and-forking-repositories-from-github-desktop)! + - Using GitHub Desktop: + - [Getting started with GitHub + Desktop](https://docs.github.com/en/desktop/installing-and-configuring-github-desktop/getting-started-with-github-desktop) + will guide you through setting up Desktop. + - Once Desktop is set up, you can use it to [fork the Hamlib + repository](https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/cloning-and-forking-repositories-from-github-desktop). -- Using the command line: - - [Fork the repo](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo#fork-an-example-repository) so that you can make your changes without affecting the original project until you're ready to merge them. + - Using the command line: + - [Fork the Hamlib + repository](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo#fork-an-example-repository) + so that you can make your changes without affecting the original project + until you're ready to merge them. -2. Install or update to **Node.js**, at the version specified in `.node-version`. For more information, see [the development guide](../contributing/development.md). - -3. Create a working branch and start with your changes! +2. Create a working branch and start with your changes! ### Commit your update -Commit the changes once you are happy with them. Don't forget to use the "[Self review checklist](https://docs.github.com/en/contributing/collaborating-on-github-docs/self-review-checklist)" to speed up the review process :zap:. +Commit the changes once you are satisfied with them and the code works as +intended + +**Note:** Some advice is out there to commit each time a file is saved. This +creates a needless string of commits that might never make it into the final +merge. Better is to test and iterate and once the code is where you want it +then commit with a descriptive message. Even so, it is worthwhile to use `git +rebase` to reorder, drop, squash, fixup, or one of the other actions it +provides to make you look like a code genius! ### Pull Request -When you're finished with the changes, create a pull request, also known as a PR. -- Fill the "Ready for review" template so that we can review your PR. This template helps reviewers understand your changes as well as the purpose of your pull request. -- Don't forget to [link PR to issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) if you are solving one. -- Enable the checkbox to [allow maintainer edits](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork) so the branch can be updated for a merge. -Once you submit your PR, a Docs team member will review your proposal. We may ask questions or request additional information. -- We may ask for changes to be made before a PR can be merged, either using [suggested changes](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/incorporating-feedback-in-your-pull-request) or pull request comments. You can apply suggested changes directly through the UI. You can make any other changes in your fork, then commit them to your branch. -- As you update your PR and apply changes, mark each conversation as [resolved](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/commenting-on-a-pull-request#resolving-conversations). -- If you run into any merge issues, checkout this [git tutorial](https://github.com/skills/resolve-merge-conflicts) to help you resolve merge conflicts and other issues. +After you've tested your commits to ensure they compile without errors, or +warnings (if possible), "push" your commits to your GitHub repository, i.e. +your *fork* of Hamlib. Once the push completes successfully the GitHub server +will return a URL that can be opened in your Web browser to create the Pull +Request (PR). -### Your PR is merged! +### PR review -Congratulations :tada::tada: The Hamlib team thanks you :sparkles:. +Your PR will be reviewed by at least the Hamlib maintainer before being merged +into the master branch. Discussion may take place in the PR about one or more +commits and it's possible that the process will result in you being asked to +do something differently or consider another approach to solving a problem. +This is the process of collaborative development. -Once your PR is merged, your contributions will be publicly visible on [Hamlib](https://github.com/Hamlib/Hamlib). - -## Windows +### Your PR is merged! -This site can be developed on Windows, however a few potential gotchas need to be kept in mind: +Congratulations :tada::tada: The Hamlib team thanks you :sparkles:. -1. Regular Expressions: Windows uses `\r\n` for line endings, while Unix-based systems use `\n`. Therefore, when working on Regular Expressions, use `\r?\n` instead of `\n` in order to support both environments. The Node.js [`os.EOL`](https://nodejs.org/api/os.html#os_os_eol) property can be used to get an OS-specific end-of-line marker. -2. Paths: Windows systems use `\` for the path separator, which would be returned by `path.join` and others. You could use `path.posix`, `path.posix.join` etc and the [slash](https://ghub.io/slash) module, if you need forward slashes - like for constructing URLs - or ensure your code works with either. -3. Bash: Not every Windows developer has a terminal that fully supports Bash, so it's generally preferred to write [scripts](/script) in JavaScript instead of Bash. -4. Filename too long error: There is a 260 character limit for a filename when Git is compiled with `msys`. While the suggestions below are not guaranteed to work and could cause other issues, a few workarounds include: - - Update Git configuration: `git config --system core.longpaths true` - - Consider using a different Git client on Windows +Once your PR is merged, your contributions will be publicly visible on +[Hamlib](https://github.com/Hamlib/Hamlib). commit d76d563857dcc3702d308b70eeb86a9699a14786 Author: Nate Bargmann <n0...@n0...> Date: Thu Aug 28 08:09:09 2025 -0500 Update INSTALL to align with current practice diff --git a/INSTALL b/INSTALL index cf7c215bc..9a2adf0eb 100644 --- a/INSTALL +++ b/INSTALL @@ -16,10 +16,13 @@ main directory and do the following: 1. Configure the source code by typing: - If you check out the source code from github you need this step first + If you clone the repository from GitHub or SourceForge you need this + step first: + $ ./bootstrap With the tar file or after the step above from a git clone + $ ./configure If configure does not exist you can create it with ./bootstrap @@ -44,7 +47,8 @@ main directory and do the following: $ make Running `make' takes a while. Since Hamlib is a package, now is the - time to go get a cup of coffee. + time to go get a cup of coffee, or tea, or orange juice, or your favorite + beverage. 3. Some packages are bundled with self-tests for source-code verification. If this package includes such tests, you can optionally run them after @@ -66,7 +70,6 @@ main directory and do the following: Libraries -> /prefix/lib Public header files -> /prefix/include Man pages -> /prefix/man/man? - Info files -> /prefix/info Doc files -> /prefix/share/doc/<prog name> Share files -> /prefix/share/<prog name> where `prefix' is either `/usr/local' or the PATH that you specified commit 2805dc5ed66412f80e008650169d5d78f2a94cb1 Author: Nate Bargmann <n0...@n0...> Date: Thu Aug 28 08:03:31 2025 -0500 Update READMEs Update for current practices with tips. Mention both GitHub and SourceForge as "forges". Format paragraphs to a text width of 80 characters maximum. diff --git a/README.betatester b/README.betatester index 73267aa5b..3013cd83f 100644 --- a/README.betatester +++ b/README.betatester @@ -1,39 +1,42 @@ Hamlib - (C) Frank Singleton 2000 (vk...@ix...) (C) Stephane Fillod 2000-2011 - (C) The Hamlib Group 2000-2013 + (C) The Hamlib Group 2000-2025 Why does Hamlib need beta-testers? ================================== -Hamlib is developed by a team of radio enthusiasts around the world, for -fun, much in the spirit of ham radio. (Note that it is not restricted for -ham usage only). There are a great deal of protocols and rigs around the -world developers may not own. However, protocols may be available, so -backends can be implemented, but cannot always be tested by developers. -That's where beta-testers are so precious. On top of that, I've been told -that there's no such sure thing like bug free code. +Hamlib is developed by a team of radio enthusiasts around the world, for fun, +much in the spirit of ham radio. (Note that it is not restricted for ham usage +only as telescope controllers are part of the rotator API). There are a great +deal of protocols and rigs around the world developers may not own. However, +protocols may be available, so backends can be implemented, but cannot always +be tested by developers. That's where beta-testers are so precious. On top of +that, we've been told that there's no such sure thing like bug free code (check +the GitHub issue tracker for proof). -Feedback and improvement requests are also valuable. +Feedback and improvement requests are also valuable (many are listed in the +GitHub issue tracker). Okay, you volunteer as beta-tester, how to proceed? =================================================== -First of all, you can start testing official releases. They are easier to -test because they come in precompiled and packaged (.rpm, .deb, etc.) but -they have the drawback of being older than the Git repository. Reports from -these versions are still very appreciated. Please send them to the -ha...@li... mailing list. +First of all, you can start testing official releases. They are easier to test +because they come in precompiled and packaged form (.deb, .rpm, etc.) but they +have the drawback of being older than the Git repository. Reports from these +versions are still very appreciated. Please send them to the +ha...@li... mailing list or open an issue on the +GitHub site: https://github.com/Hamlib/Hamlib/issues. -However, the development of Hamlib is still very active, so it's better to -test from the latest Git version of the code. And, depending on feedback -you make, developers can commit a fix, so you can try out the change soon -after, without waiting for the next official version. +The development of Hamlib reamins very active, so it's better to test from the +latest Git version of the code. And, depending on feedback you make, developers +can commit a fix, so you can try out the change soon after, without waiting for +the next official version. -To proceed, you will have first to obtain either a daily snapshot or a check -out the latest sources from the Git repository, then rebuild the Hamlib -package and finally test it with your rig. Don't worry, it's much simpler -than it looks, despite the size of the package. +To proceed, you will have first to obtain either a daily snapshot or check out +the latest sources from the Git repository, then rebuild the Hamlib package and +finally test it with your device (radio, rotator, or amplifier). Don't worry, +it's much simpler than it looks, despite the size of the package. Pre-requisite: - some kind of internet access @@ -52,18 +55,18 @@ Download the latest Git master branch snapshot from: http://n0nb.users.sourceforge.net You'll find a tarball with a name like -hamlib-3.0~git-30e58df-20121009.tar.gz, i.e. a check out made 09 Oct 2012 -With a Git SHA1 of 30e58df (The SHA1 is a signature of each commit. Each is -unique and as our project is small, the first seven characters for the full +hamlib-4.7~git-20250624-dc12b01ae.tar.gz, i.e. a check out made 24 Jun 2025 +with a Git SHA1 of dc12b01ae (The SHA1 is a signature of each commit. Each is +unique and as our project is small, the first eight characters for the full 40 character SHA1 are likely unique. The shorthand SHA1 is automatically generated and may become longer in the future.), ready for building using the familiar "three step" (see below). Each morning by about 1130z a new snapshot is generated and uploaded and the prior day's version is removed. The advantage of the Git snapshot is that you won't need as many tools -installed to build Hamlib as the work of the GNU Build System has already -been done. Most of the other packages listed below will be needed. If you -tell the 'configure' script to build certain parts of Hamlib like +installed to build Hamlib as the work of generating the GNU Build System has +already been done. Most of the other packages listed below will be needed. If +you tell the 'configure' script to build certain parts of Hamlib like documentation or scripting language bindings the relevant optional packages will be needed. See 'configure --help' for more information. @@ -78,16 +81,19 @@ package will install a number of tools and minimize the number of packages that need to be installed manually. Optional, but highly recommended for a complete build: -* GNU C++ (g++) # g++ --version -* swig (for bindings) 1.3.14+ # swig -version +* GNU C++ (g++) # g++ +* swig (for bindings) # swig * perl devel # h2xs * tcl devel # tcltk-depends * python devel # python-config +* lua devel # Lua 5.2+ * zlib devel # Needed by configure's test for Python * libxml2 devel # xml2-config --version * libgd2 devel # gdlib-config --version * libusb-1.0 devel # ver 1.0 or newer (not 0.1!) * libreadline devel # ver 5.2 or newer +* libindi devel # INDI telescope control +* libnova # dependency of libindi N.B The libusb package is required for building most of the 'kit' backend. The newer version is needed, not 0.1. Debian and derivatives @@ -108,20 +114,22 @@ to do the following commands. make check make install -The prefix argument is optional. Convention is that local packages be +The prefix argument is optional. Convention is that local packages should be placed in /usr/local away from distribution installed packages This is the -default location for the snapshots so it may be disregarded unless you wish -to install Hamlib elsewhere. The example above would install Hamlib to -the user's home directory under the 'local' subdirectory. +default location for the snapshots so it may be disregarded unless you wish to +install Hamlib elsewhere. The example above would install Hamlib to the user's +home directory under the 'local' subdirectory (doing so will require starting +programs as LD_LIBRARY_PATH=$HOME/local/lib/ tlf). Other useful options are '--with-perl-binding' or '--with-python-binding' or '--with-tcl-binding' if you are interested in Swig binding support for those scripting languages If you are unsure it is safe to ignore these -options. +options. See the output of 'configure --help' for a complete list. 'make' will run the C and, optionally, the C++ compiler building all of the binary object files and finally linking all of them together to form the -Hamlib "frontend" and "backend" libraries. +Hamlib "frontend" and "backend" libraries. When a C++ build environment is +detected, C++ components will be built by default. The 'make check' target will run a few predetermined tests using the 'dummy' (rig model 1) backend and some other Hamlib functions in the build tree. @@ -167,7 +175,7 @@ To remove Hamlib from your system: Note that due to a limitation in a Perl support script that if the Perl binding is built and installed that not all of the files under -/usr/local/lib/perl/PERL_VERSION will not be removed. +/usr/local/lib/perl/PERL_VERSION will be removed. Git checkout: @@ -185,11 +193,11 @@ For the brave who want to peruse the contents, here are what all the subdirectories are for (these are just a sample as more are added from time to time): -rigs: rig backends +rigs: rig (radio) backends rotors: rotator backends -rigs/dummy: virtual dummy rig and rotator and other non-rig devices, for testing use. +rigs/dummy: virtual dummy rig and rotator and other non-rig devices. lib: library for functions missing on your system -bindings Perl, Python, Tcl, and Visual Basic bindings +bindings Perl, Python, Tcl, and Lua bindings c++: C++ bindings doc: documentation base and scripts to extract from src include/hamlib: exported header files go here @@ -229,7 +237,7 @@ or simply: Let's say you own an Icom IC-756: - rigctl -vvvvv -r /dev/ttyS0 -m 326 + rigctl -vvvvv -r /dev/ttyS0 -m 3026 The -vvvvv is very important since this will increase verbosity, and give precious traces to developers if something goes wrong. At this level, the @@ -237,7 +245,7 @@ protocol data exchanged will also be dumped to the screen. Some backends produce a useful amount of data regarding function calls and critical variables with the -vvvv option without all the protocol data. -Unless some problem shows up, you should be presented with a menu +Unless some problem shows up, you should be presented with a prompt like "Rig command: ". Enter "?" followed by return to have the list of available commands. 'Q' or 'q' quits rigctl immediately. diff --git a/README.developer b/README.developer index 41576a385..614dc4579 100644 --- a/README.developer +++ b/README.developer @@ -2,7 +2,9 @@ Hamlib - (C) Frank Singleton 2000 (vk...@ix...) (C) Stephane Fillod 2000-2011 (C) The Hamlib Group 2000-2025 -Primary site for the latest development version of Hamlib is https://github.com/Hamlib/Hamlib +Primary site for the latest development version of Hamlib is +https://github.com/Hamlib/Hamlib + Also take a look at http://sourceforge.net/projects/hamlib/ Here you will find a mail list, and the latest releases. @@ -11,8 +13,9 @@ See README.betatester for background on testing Hamlib. The library provides functions for both radio, rotator, and amplifier control, -and data retrieval from the radio, rotator, or amplifier. A number of functions useful -for calculating distance and bearing and grid square conversion are included. +and data retrieval from the radio, rotator, or amplifier. A number of functions +useful for calculating distance and bearing and grid square conversion are +included. libhamlib.so - library that provides generic API for all RIG types. This is what Application programmers will "see". Will have different @@ -26,151 +29,113 @@ Backend Examples are: 1. yaesu will provide connectivity to Yaesu FT 747GX Transceiver, FT 847 "Earth Station", etc. via a standard API. -2. xxxx. will provide connectivity to the Wiz-bang moon-melter 101A (yikes..) +2. xxxx will provide connectivity to the Wiz-bang moon-melter 101A (yikes..) -Hamlib also enables developers to develop professional looking -GUI's towards a standard control library API, and they would not have -to worry about the underlying connection towards physical hardware. +Hamlib also enables developers to develop professional looking GUI's towards a +unified control library API, and they would not have to worry about the +underlying connection towards physical hardware. -Serial (RS232) connectivity is built in as are RPC, IP (also via a socket -utility), and USB. Other connectivity will follow afterwards. +Serial (RS-232) connectivity is built in as are IP (also via a socket utility), +and USB. Other connectivity will follow afterwards. General Guidelines. ------------------- -0. The top level directory looks like this as of 2025-05-03 +0. The top level directory looks like this as of 2025-08-27 -$ tree -d -I .git -. +$ tree -L 1 . ├── amplifiers -│ ├── elecraft -│ ├── expert -│ └── gemini ├── android -├── autom4te.cache +├── Android.mk +├── astyle.sh +├── AUTHORS ├── bindings -│ └── csharp -│ └── multicast -├── build-aux +├── bootstrap ├── c++ +├── ChangeLog +├── CODE_OF_CONDUCT.md +├── configure.ac +├── CONTRIBUTING.md +├── COPYING +├── COPYING.LIB +├── cppcheck.sh ├── doc -│ ├── man1 -│ ├── man7 -│ └── manuals ├── docker-build ├── extra -│ ├── gnuradio -│ └── kylix -│ └── tests +├── hamlib.m4 +├── hamlib.pc.in ├── include -│ └── hamlib +├── INSTALL ├── lib +├── LICENSE ├── macros -├── perl +├── Makefile.am +├── NEWS +├── PLAN +├── README +├── README.betatester +├── README.coding_style +├── README.developer +├── README.freqranges +├── README.macos +├── README.md +├── README.multicast +├── README.release +├── README.win32 ├── rigs -│ ├── adat -│ ├── alinco -│ ├── anytone -│ ├── aor -│ ├── barrett -│ ├── codan -│ ├── commradio -│ ├── dorji -│ ├── drake -│ ├── dummy -│ ├── elad -│ ├── flexradio -│ ├── gomspace -│ │ └── gs100_sim -│ ├── icmarine -│ ├── icom -│ ├── jrc -│ ├── kachina -│ ├── kenwood -│ ├── kit -│ ├── lowe -│ ├── mds -│ ├── motorola -│ ├── pcr -│ ├── prm80 -│ ├── racal -│ ├── rft -│ ├── rs -│ ├── skanti -│ ├── tapr -│ ├── tentec -│ ├── tuner -│ ├── uniden -│ ├── winradio -│ │ └── linradio -│ ├── wj -│ └── yaesu ├── rotators -│ ├── amsat -│ ├── androidsensor -│ ├── apex -│ ├── ars -│ ├── celestron -│ ├── cnctrk -│ ├── easycomm -│ ├── ether6 -│ ├── flir -│ ├── fodtrack -│ ├── grbltrk -│ ├── gs232a -│ ├── heathkit -│ ├── indi -│ ├── ioptron -│ ├── m2 -│ ├── meade -│ ├── prosistel -│ ├── radant -│ ├── rotorez -│ ├── saebrtrack -│ ├── sartek -│ ├── satel -│ ├── skywatcher -│ ├── spid -│ └── ts7400 -│ └── include ├── scripts -│ └── MSVC ├── security +├── SECURITY.md +├── Segfault-award ├── simulators ├── src -└── tests - ├── config - ├── rigctl.test - ├── testbcd.test - ├── testfreq.test - └── testloc.test +├── tests +├── THANKS +└── VFOs.txt + +18 directories, 32 files -103 directories 1. Building -If you just want to recompile the library, please refer to the INSTALL -file. This document introduces hacking the code of Hamlib. +If you just want to compile the library, please refer to the INSTALL file. This +document introduces hacking the code of Hamlib. + +As your objective is development, either GitHub or SourceForge (hereinafter +"forges") offer similar work flows where a "fork" of the main repository is +created that is your private copy. Proposed changes that you wish to be added +to Hamlib will be "pushed" to your repository after which the Web site (GitHub, +at least) will offer a link to create a "pull request" that is done through the +Web site's UI. Once the pull request is created on GitHub, Continuous +Integration will check your changes and then compile Hamlib on various systems +with various configurations. This is the main work flow of the Hamlib project. 1.1 Obtaining sources: git clone - git clone git://git.code.sf.net/p/hamlib/code hamlib +Each forge offers secure methods of authentication and encryption through SSH +and provide a special link that is used to "pull" and "push" to your fork. + +Otherwise, if you just want to clone the Git repository anonymously, each offer +HTTPS links (SourceForge link shown): + + git clone https://git.code.sf.net/p/hamlib/code hamlib The clone only has to be done the first time. -After the initial clone, whenever you want to update your local -repository, issue the following command in the root directory of Hamlib: +After the initial clone, whenever you want to update your local repository, +issue the following command in the root directory of Hamlib: git pull -This will download and merge any changes from the canonical Hamlib Git -repository (what Git calls origin by default). This command actually -combines two Git commands, fetch and merge into one that will first check -for conflicting changes between your local repository and the remote -(origin) repository and will not apply any changes if conflicts are found. +This will download and merge any changes from either canonical Hamlib Git +repository (what Git calls origin by default). This command actually combines +two Git commands, fetch and merge into one that will first check for conflicting +changes between your local repository and the remote (origin) repository and +will not apply any changes if conflicts are found. A pull can be restricted to just a single branch if desired: @@ -179,44 +144,50 @@ A pull can be restricted to just a single branch if desired: 1.1.1 Obtaining more info on Git -Check out the Source Forge page at -https://sourceforge.net/scm/?type=git&group_id=8305 for more information -about how to use the Git repository of Hamlib. +Check out the SourceForge page at +https://sourceforge.net/p/forge/documentation/Git/ for more information about +how to use the Git repository of Hamlib hosted by SourceForge. + +GitHub has much documentation on using its platform. Using either forge is the +same from your working directory on your computer. Only the "remote" name is +different (your choosing). Much documentation on Git exists. A good starting point is: -http://git-scm.com/documentation +https://git-scm.com/doc -From this page are links to tutorials, books (Pro Git proved useful for me), -and references (http://gitref.org/ is another good resource). +From this page are links to tutorials, books (Pro Git proved useful), and +references. -Another site: +Another useful site: http://www-cs-students.stanford.edu/~blynn/gitmagic/ -1.1.2 Providing patches with Git +1.1.2 Providing patches with Git outside of the forges Git provides tools to generate patches and submit them to the Hamlib developers -via email. Use of these tools is preferred as Git allows credit to be given -to the author and submitter of the patches. Please submit the patches to -the hamlib-developer mailing list. See section 8.3. +via email. Use of these tools is preferred as Git allows credit to be given to +the author and submitter of the patches. Please submit the patches to the +hamlib-developer mailing list. See section 8.3. + +Even without Git email tooling, every effort will be made to properly credit all +contributions. 1.1.3 Git and branches One of the most powerful features of Git is its ability to make working with -branches easy. It also allows the developers to "cherry pick" patches from -the master development branch into stable release branches. In this manner -we can accommodate patches submitted against a stable release and merge them -into master as well. Such parallel development is a new feature for our -project and there will be a learning curve! - -After cloning the repository as above, the repository is synchronized with -the "master" branch. This can be confirmed by 'git branch'. A new branch -can be created by providing a name, 'git branch n0nb_k3_level' which will -now exist as a branch in your local repository. This is a good way to work -on new features as Git keeps changes to files in each branch separate. +branches easy. It also allows the developers to "cherry pick" patches from the +master development branch into stable release branches or vice versa. In this +manner we can accommodate patches submitted against a stable release and merge +them into master as well. + +After cloning the repository as above, the repository is synchronized with the +"master" branch. This can be confirmed by 'git branch'. A new branch can be +created by providing a name, 'git branch n0nb_k3_level' which will now exist as +a branch in your local repository. This is a good way to work on new features +as Git keeps changes to files in each branch separate. As you can see: @@ -224,77 +195,79 @@ $ git branch Hamlib-1.2.13 Hamlib-1.2.13.1 * master - n0nb_k3 + n0nb_k3_level there are a number of branches in my local repository. Most, such as -"Hamlib-1.2.13", exist in the canonical repository as well. They can be -seen by 'git branch -r' and you can switch to any of them using the 'git -checkout BRANCH_NAME' command. +"Hamlib-1.2.13", exist in the canonical repository as well. They can be seen by +'git branch -r' and you can switch to any of them using the 'git checkout +BRANCH_NAME' command. Finally, once your changes are ready for inclusion in Hamlib, commit your -changes to the branch you are working in, checkout the master branch, and -use 'git merge' to synchronize your changes into the master branch. Lastly, -push your changes to the canonical repository (developer write access and -checkout using the SSH protocol required. See -https://sourceforge.net/scm/?type=git&group_id=8305) or email them to -ha...@li... for inclusion into Hamlib. +changes to the branch you are working in and "push" the commits to the forge. + +GitHub, at least, will return a URL that can be opened in your Web browser to +create the Pull Request (PR). SourceForge may offer similar capability. + +Unlike previously stated in this document, there is no need to merge your +commits into the "master" branch before pushing. In fact, it is preferred that +PRs remain as a separate branch. 1.1.4 Summary -This is a very brief introduction to Git for Hamlib developers. Day-to-day -Git usage involves a handful of commands--clone, status, commit, pull, -branch, checkout, merge, and push are probably the most common. Other -useful commands are log and diff to see changes (especially when color -output is enabled in your Git configuration). See the references above -to learn about setting up Git to your preference. +This is a very brief introduction to Git for Hamlib developers. Day-to-day Git +usage involves a handful of commands--clone, status, commit, pull, branch, +checkout, merge, and push are probably the most common. Other useful commands +are log and diff to see changes (especially when color output is enabled in your +Git configuration). See the references above to learn about setting up Git to +your preference. -If you like a GUI tool several exist. Gitk and Gitg are similar with the -former being written with the Tk toolkit and the latter in GTK+. Another is -Giggle with its own interface. All allow looking at the complete history of -the repository and changes made to any file. +If you like a GUI tool several exist. Gitk and Gitg are similar with the former +being written with the Tk toolkit and the latter in GTK+ and both supplied by +the Git project. Many more are available as are many ways to integrate Git into +your favorite editor (this crusty author prefers to work with Git in a separate +terminal window, although "git blame" in the Vim editor is handy). All allow +looking at the complete history of the repository and changes made to any file. 1.2. Requirements -Hamlib is entirely developed using GNU tools, under various Linux systems. -Note that Hamlib is not restricted to Linux systems. We welcome anyone who -has access to a POSIXish system to port Hamlib. Contact us for help. +Hamlib is entirely developed using GNU tools, under various operating systems +include Microsoft Windows. Note that Hamlib is not restricted to Linux or Unix +type systems, MS Windows is well supported. -That is, if you want to take part in the development of Hamlib, -you'll need the following tools. Make sure you have at least the required -version or you won't even be able to build from the Git clone. +That is, if you want to take part in the development of Hamlib, you'll need the +following tools. Make sure you have at least the required version or you won't +even be able to build from the Git clone. -N.B. The Debian and derivatives (Ubuntu and friends) 'build-essential' -package will install a number of tools and minimize the number of packages -that need to be installed manually (Debian package names are listed, other -distributions may differ). +N.B. The Debian and derivatives (Ubuntu and friends) 'build-essential' package +will install a number of tools and minimize the number of packages that need to +be installed manually (Debian package names are listed, other distributions may +differ). * Gnu C or any C99 compliant compiler # gcc --version * Gnu make (or any modern one, BSD okay) # make --version -* autoconf 2.67 # autoconf --version -* automake 1.11 # automake --version -* libtool 2.2.6b+ # libtool --version -* Git for connection to git.code.sf.net/p/hamlib/code - -As of Hamlib 4.7, POSIX thread support (pthreads) is required to compile or -run Hamlib. +* autoconf 2.69 # autoconf --version +* automake 1.16 # automake --version +* libtool 2.4.6 # libtool --version +* Git 2.30 # git --version -N.B. Hamlib requires libtool >= 2.2.6b in compliance with CVE-2009-3736. +As of Hamlib 4.7.0 (commit e09007a), POSIX thread support (pthreads) is +required to compile or run Hamlib. Optional, but highly recommended: -* GNU C++ # g++ --version -* swig (for bindings) # swig -version -* perl devel # h2xs -* tcl devel # tcltk-depends -* python devel # python-config +* GNU C++ # Build C++ binding and INDI backend +* swig (for bindings) # Generate wrappers for the bindings +* perl devel # For Perl binding +* tcl devel # For tcl binding +* python devel # For Python binding * pytest -* lua devel +* lua devel # For Lua binding * libxml2 devel # xml2-config --version * libgd2 devel # gdlib-config --version (rigmatrix) * libindi devel # INDI rotators * libnova devel -* libusb-1.0 devel # 1.0.0 or newer +* libusb-1.0 devel # 1.0.24 or newer * libreadline devel # ver 5.2 or newer * pkg-config # pkg-config --version (libxml and USRP) * zlib1g devel # (rigmatrix) @@ -303,24 +276,28 @@ N.B.: The libusb-1.0 package is required for building most of the 'kit' backend. The older version of libusb 0.1.x is no longer supported. N.B.: Some systems can have several versions of the autotools installed. In -that case, autoconf may be called "autoconf2.59", autoheader -"autoheader2.59", and automake "automake-1.9", aclocal "aclocal-1.9" or a -newer version. +that case, autoconf may be called "autoconf2.69", autoheader "autoheader2.69", +and automake "automake-1.16" aclocal "aclocal-1.16" or a newer version. + +IMPORTANT: If autoconf or automake are installed on your system, make sure they +are matching *at least* the version shown above. -IMPORTANT: If autoconf or automake are installed on your system, -make sure they are matching *at least* the version shown above. +!!!BEWARE!!! Some systems have the "Autoconf Macro Archive" package installed. +These newer macros will conflict with similarly named macros in the 'macros' +directory. See GitHub issue #1746 for the gory details +(https://github.com/Hamlib/Hamlib/issues/1746). 1.3. configure and build stage -It is important to note that the Git repository holds no Autotools -generated files, i.e. configure, config.guess, Makefile, etc. Hence -after a fresh checkout, you'll have to generate those files. +It is important to note that the Git repository holds no Autotools generated +files, i.e. configure, config.guess, Makefile, etc. Hence after a fresh +checkout, you'll have to generate those files. To proceed, first edit the bootstrap script, and set appropriately the AUTORECONF, AUTOMAKE, and LIBTOOLIZE variables with the required versions seen -in the previous section (most systems will be fine with the default names, -only do this if a problem arises and please let us know). +in the previous section (most systems will be fine with the default names, only +do this if a problem arises and please let us know). cd hamlib ./bootstrap @@ -340,71 +317,73 @@ following in the same parent directory of hamlib: make make install -Note: In the examples above, passing the CFLAGS environment variable is -optional as shown using the square brackets.. +Note: In the examples above, passing the CFLAGS environment variable is optional +as shown using the square brackets.. -This will keep the binary output files separate from the source tree and aid -in development by reducing clutter in the source tree. +This will keep the binary output files separate from the source tree and aid in +development by reducing clutter in the source tree. -Once you've run 'bootstrap', make sure you've got some recent config.guess -and config.sub (needed to guess your system type). Anything of at least -year 2004 should be fine, unless you run some exotic hardware/software system -(modern Linux distributions and Cygwin keep these up to date): +Once you've run 'bootstrap', make sure you've got some recent config.guess and +config.sub (needed to guess your system type). Anything of at least year 2004 +should be fine, unless you run some exotic hardware/software system (modern +Linux distributions and Cygwin keep these up to date): ./config.guess --version ./config.sub --version -The '--prefix' option to 'configure' is optional and not shown as it defaults -to /usr/local. Convention is that locally built packages be installed in +The '--prefix' option to 'configure' is optional and not shown as it defaults to +/usr/local. Convention is that locally built packages be installed in /usr/local away from distribution installed packages. The 'CFLAGS="-g -O0"' environment variable generates less optimized binaries with the '-O0' while the '-g' option adds debugging info which can be changed to -ggdb to generate debugging info for gdb. Additionally, you may want to add the '--with-perl-binding' or -'--with-python-binding' or '--with-tcl-binding' or '--with-lua-binding' if you are -interested in SWIG binding support for those scripting languages. +'--with-python-binding' or '--with-tcl-binding' or '--with-lua-binding' if you +are interested in SWIG binding support for those scripting languages. For LUA bindings if you run "lua luatest.lua" and see this error message: luatest.lua:44: Error in Rig::set_mode (arg 2), expected 'rmode_t' got 'string' -This means you need to upgrade both swig and lua for 64-bit lua support -This is known to work on swig 4.0.1 and lua 5.3.5 +This means you need to upgrade both swig and lua for 64-bit lua support This is +known to work on swig 4.0.1 and lua 5.3.5 NOTE: The bootstrap script has only to be run the first time after a fresh -checkout or when a Makefile.am or other build file is modified or added. +checkout or when a Makefile.am or other build file is modified or added (usually +this is not the case as the build system will automatically generate itself when +it detects its source has been modified, but once in a while...). For a Tcl build, add this if needed: --with-tcl=/usr/lib/tcl8.2 -Note: C-shell users may have to run bootstrap and make through a bourne -shell instead, or pass "SHELL=bash" as a parameter to make. +Note: C-shell users may have to run bootstrap and make through a bourne shell +instead, or pass "SHELL=bash" as a parameter to make. -Some basic testing is accomplished with the 'make check' target which will -run a few predetermined tests using the 'dummy' (rig model 1) backend and -some other Hamlib functions in the build tree. This is a basic sanity check -and cannot test all backends. +Some basic testing is accomplished with the 'make check' target which will run a +few predetermined tests using the 'dummy' (rig model 1) backend and some other +Hamlib functions in the build tree. This is a basic sanity check and cannot test +all backends. -Likewise, a complete test of the build system is accomplished with -'make distcheck' which exercises a complete build sequence from creating -a distribution tarball, building, installing, uninstalling, and cleaning -Hamlib. All packages listed above except for Swig and Doxygen are required -for this target as neither the bindings or old documentation are generated -in a default build. +Likewise, a complete test of the build system is accomplished with 'make +distcheck' which exercises a complete build sequence from creating a +distribution tarball, building, installing, uninstalling, and cleaning Hamlib. +All packages listed above except for Swig and Doxygen are required for this +target as neither the bindings or old documentation are generated in a default +build. -NOTE! If Hamlib has not been previously installed as a locally built -package you will need to make sure that 'ldconfig' is configured correctly -and run periodically after 'make install'. Most modern distributions have -an /etc/ld.so.conf.d/ directory where local configuration can be made. -Later versions of Debian and derivatives have a file named 'libc.conf' in -this directory. The contents of libc.conf are: +NOTE! If Hamlib has not been previously installed as a locally built package +you will need to make sure that 'ldconfig' is configured correctly and run +periodically after 'make install'. Most modern distributions have an +/etc/ld.so.conf.d/ directory where local configuration can be made. Later +versions of Debian and derivatives have a file named 'libc.conf' in this +directory. The contents of libc.conf are: # libc default configuration /usr/local/lib -If your system does not have such a file, one will need to be created and -then 'ldconfig' will need to be run as the root user so that applications -using the Hamlib libraries can find them. +If your system does not have such a file, one will need to be created and then +'ldconfig' will need to be run as the root user so that applications using the +Hamlib libraries can find them. 1.3.1 Doxygen generated reference manual @@ -413,6 +392,7 @@ The following packages need to be installed: * Doxygen * GNU Source-highlight + 1.3.1.1 HTML manual In the top level of the build directory: @@ -420,11 +400,12 @@ In the top level of the build directory: cd doc make doc -will build the HTML manual. The resulting 'doc/html' directory contains all -of the files needed for the HTML manual. The 'index.html' file is the entry -point to the manual. +will build the HTML manual. The resulting 'doc/html' directory contains all of +the files needed for the HTML manual. The 'index.html' file is the entry point +to the manual. + -1.3.1.2 PDF manual +1.3.1.2 PDF manual (not recently tested) To generate the PDF version of the reference manual the following texlive packages are required (Debian package names shown): @@ -444,6 +425,7 @@ as above and once the run is complete: The resulting generated document in the 'latex' directory is 'refman.pdf'. + 1.3.2 Automated tests Automated tests are executed running: @@ -451,23 +433,26 @@ Automated tests are executed running: make check The makefiles run the simple tests with automake. + The make variable TESTS contains the tests to be run and the variables -check_PROGRAMS and check_SCRIPTS contain the executables needed to run the -tests that aren't built by make all. +check_PROGRAMS and check_SCRIPTS contain the executables needed to run the tests +that aren't built by make all. + For more information see the automake manual at https://www.gnu.org/software/automake/manual/html_node/Scripts_002dbased-Testsuites.html + 1.3.2.1 C tests Tests written in C are available in the tests/ directory. They are run with: make -C tests/ check + 1.3.2.2 Python tests with pytest -Tests written in Python are available in the bindings/python directory if -Hamlib is configured to build the Python bindings and if pytest is installed, -eg.: +Tests written in Python are available in the bindings/python directory if Hamlib +is configured to build the Python bindings and if pytest is installed, e.g.: ./configure --with-python-binding --enable-pytest @@ -476,58 +461,92 @@ They are run with: make -C bindings/ check The Python scripts consist in handwritten tests, meant to test realistic use -cases, and autogenerated tests, meant to detect unwanted changes in the +cases, and auto-generated tests, meant to detect unwanted changes in the bindings. When a public symbol is added to the bindings or removed, the -autogenerated tests must be updated: +auto-generated tests must be updated: make -C bindings/ generate-pytests -and the handwritten tests should be updated to reflect the change. +And the handwritten tests should be updated to reflect the change. + +The Python tests can also be run against a simulator or an actual rig, but they +aren't guaranteed to succeed because the CI only tests the dummy rig. To +execute the tests from the build tree, add the path to the libraries that you +built, using the PYTHONPATH environment variable, eg: -The Python tests can also be run against a simulator or an actual rig, but -they aren't guaranteed to succeed because the CI only tests the dummy rig. -To execute the tests from the build tree, add the path to the libraries -that you built, using the PYTHONPATH environment variable, eg: PYTHONPATH=bindings/:bindings/.libs/ bindings/python/test_rig.py \ --model 1035 --rig-file /dev/ttyUSB0 --serial-speed 4800 Only the following long arguments are supported: + --model ID --rig-file DEVICE --serial-speed BAUD --hamlib-verbose + The argument --hamlib-verbose can be repeated as many times as the --verbose argument accepted by rigctl. 1.4. Feedback -The Hamlib team is very interested to hear from you, how Hamlib builds and -works on your system, especially on non-Linux or non-PC systems. We are -trying to make Hamlib as portable as possible. Please report problems to our -developer mailing list, ham...@li... +The Hamlib team is very interested to hear from you, how Hamlib builds and works +on your system, especially on non-Linux or non-PC systems. We are trying to make +Hamlib as portable as possible. Please report problems to our developer mailing +list, ham...@li... Patches are welcome too! Just send them to the mailing list. Git formatted -patches are preferred. Unified diff format (diff -u) is also welcome. -Patches should apply to the current Git master branch or a testing branch, -if possible. If you're patching against an older released version of -Hamlib, we can take those as well but please document the release the diff -is generated against. +patches are preferred. Unified diff format (diff -u) is also welcome. Patches +should apply to the current Git master branch or a testing branch, if possible. +If you're patching against an older released version of Hamlib, we can take +those as well but please document the release the diff is generated against. So far, Hamlib has been tested successfully under the following systems: (if your system is not present, please report to the mailing list) - * Debian i386 (plus derivatives--Ubuntu, etc.) - * Debian sid mipsel - * Raspbian armhf (Raspberry Pi Debian derivative) - * RedHat i386 + * Debian (plus derivatives--Ubuntu, etc.) + * Raspberry Pi OS (Raspberry Pi Debian derivative) + * Fedora * openSUSE (Leap & Tumbleweed) - * Linux ppc - * Slackware i386 + * Slackware * FreeBSD & NetBSD - * Solaris 2.6 - * Mac OS X - * MS Windows: Cygwin, Mingw + * MacOS + * MS Windows: Cygwin, Mingw, can be imported into MSVC + + +1.5. A word about AI + +Over the past several years the latest rage is so-called Artificial +Intelligence, a.k.a. Large-language Learning Models (LLM). Companies are +pushing using AI for development. GitHub (owned by Microsoft) seems to be +pushing "Copilot" at every turn. Many thoughts about this technology exist +among Free Software developers. + +Perhaps the most questionable aspect of LLM generated code is licensing--can +such code be licensed under the GPL/LGPL? It's not an easy question to answer. +Code that is written by a developer is copyrighted by that developer, presuming +it is original work. That does not change even when code is collaboratively +developed and held in a common repository. Ostensibly, the developer has +written the code and not plagiarized that of someone else without due credit +(certainly, it is fine to "borrow" code from compatibly licensed projects, just +credit the project/authors and disclaim it is your original work). + +The question leads to another question, did the LLM have access to sources that +were licensed under an incompatible license? Could this lead to a copyright +infringement issue? At this time LLMs don't seem to reveal their learning +sources and Copilot likely has access to closed sources that are hosted at +GitHub. + +The Hamlib project accepts contributions on the "honor system". It is implied +that contributions are the original works of their respective authors and +offered under the license terms of the GPL 2.0 or LGPL 2.1. Use of LLM +generated code breaks this model. The contributors of such code cannot claim it +as their own original work. + +Finally, Hamlib is a hobby project for hobbyists and as such all contributors +should take pride in having their original work included for the benefit of many +other radio hobbyists. Against that backdrop, using LLM generated code seems +like cheating. 2. How to add a new backend @@ -612,10 +631,10 @@ So far, Hamlib has been tested successfully under the following systems: 3. How to add a new model to an existing backend - 3.1. make sure there's already a (unique) ID for the model to be added + 3.1. Make sure there's already a (unique) ID for the model to be added in include/hamlib/riglist.h or include/hamlib/rotlist.h or include/hamlib/amplist.h - 3.2. locate the existing backend + 3.2. Locate the existing backend 3.3. Clone the most similar model in the backend 3.4. Add the new C file to the _SOURCES variable of the backend's Makefile.am @@ -660,9 +679,9 @@ good starting point for your new backend. 6. C code examples. -A C code snippet to connect to a FT847 and set the frequency of the main VFO -to 439,700,000 Hz, using FM as the required mode, would look something like -this. The error... [truncated message content] |
From: n0nb <n0...@us...> - 2025-09-01 22:01:06
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 7180eb7da6297eb436a43c309151170580cc06d9 (commit) via 80281719f4aaee97e2fbcbfccc52c428a807005d (commit) from 4c520571dfb13cc04c42120e751d09af6f2ef0e6 (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 7180eb7da6297eb436a43c309151170580cc06d9 Merge: 4c520571d 80281719f Author: Nate Bargmann <n0...@n0...> Date: Mon Sep 1 13:20:11 2025 -0500 Merge GitHub PR #1879 commit 80281719f4aaee97e2fbcbfccc52c428a807005d Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Aug 31 09:51:11 2025 +0200 Fix twiddle_timeout Fixes the definition of config parameter "twiddle_timeout" and the description of rig_set_twiddle(). diff --git a/src/conf.c b/src/conf.c index ef845dcde..d9cb1f888 100644 --- a/src/conf.c +++ b/src/conf.c @@ -175,7 +175,7 @@ static const struct confparams frontend_cfg_params[] = { TOK_TWIDDLE_TIMEOUT, "twiddle_timeout", "Timeout(secs) to resume VFO polling when twiddling VFO", "For satellite ops when VFOB is twiddled will pause VFOB commands until timeout", - "Unset", RIG_CONF_COMBO, { .c = {{ "Unset", "ON", "OFF", NULL }} } + "0", RIG_CONF_NUMERIC, { .n = { 0, 100, 1 } } }, { TOK_TWIDDLE_RIT, "twiddle_rit", "RIT twiddle", diff --git a/src/rig.c b/src/rig.c index 4807011db..e7cea674c 100644 --- a/src/rig.c +++ b/src/rig.c @@ -1918,7 +1918,6 @@ int HAMLIB_API rig_cleanup(RIG *rig) * \param seconds The timeout to set to * * timeout seconds to stop rigctld when VFO is manually changed - * turns on/off the radio. * * \return RIG_OK if the operation has been successful, otherwise * a negative value if an error occurred (in which case, cause is ----------------------------------------------------------------------- Summary of changes: src/conf.c | 2 +- src/rig.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-09-01 14:36:38
|
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 4c520571dfb13cc04c42120e751d09af6f2ef0e6 (commit) via e09007a543f707cd833bbd1b199a804cb84c3b32 (commit) via 1c0de2107c4061f2cd79958dc4e362a34f03a6c3 (commit) via 002677e48c2d5218254421472cefa6a354f54e84 (commit) via 9a90745ba693767a4c29caaabb406a3feb943982 (commit) via df65ceee67bc11d6f6daba9bce3142ef55a082c5 (commit) via 9f4755cf70e0a556bff61f433dbaab5e6e20f269 (commit) from 9123d08a6c95a59214a01da6551fd9c887939ce8 (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 4c520571dfb13cc04c42120e751d09af6f2ef0e6 Merge: 9123d08a6 e09007a54 Author: Nate Bargmann <n0...@n0...> Date: Sun Aug 31 20:11:12 2025 -0500 Merge GitHub PR #1876 commit e09007a543f707cd833bbd1b199a804cb84c3b32 Author: George Baltz N3GB <Geo...@gm...> Date: Sun Aug 31 14:36:55 2025 -0400 Update NEWS diff --git a/NEWS b/NEWS index 7cf1895e1..7eba7f0cd 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,9 @@ Version 5.x -- future Version 4.7.0 * 2025-12-01 (target) + * POSIX threads are required to build and run Hamlib. Note that it was + actually the case for 4.6.x, but now the configuration step will + fail instead of the compilation. * Functions rig_get_conf, rot_get_conf, amp_get_conf deprecated; use *_get_conf2() instead. * Fix handling of unprintable characters in kenwood.c that broke radios commit 1c0de2107c4061f2cd79958dc4e362a34f03a6c3 Author: George Baltz N3GB <Geo...@gm...> Date: Sat Aug 30 11:29:45 2025 -0400 Remove conditionals based on HAVE_PTHREAD diff --git a/tests/ampctld.c b/tests/ampctld.c index 89baf9c62..3f0bc8284 100644 --- a/tests/ampctld.c +++ b/tests/ampctld.c @@ -54,9 +54,7 @@ # include <netdb.h> #endif -#ifdef HAVE_PTHREAD -# include <pthread.h> -#endif +#include <pthread.h> #include "hamlib/amplifier.h" @@ -168,10 +166,8 @@ int main(int argc, char *argv[]) char host[NI_MAXHOST]; char serv[NI_MAXSERV]; -#ifdef HAVE_PTHREAD pthread_t thread; pthread_attr_t attr; -#endif struct handle_data *arg; #ifdef SIGPIPE #if HAVE_SIGACTION @@ -557,7 +553,6 @@ int main(int argc, char *argv[]) host, serv); -#ifdef HAVE_PTHREAD pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); @@ -569,9 +564,6 @@ int main(int argc, char *argv[]) break; } -#else - handle_socket(arg); -#endif } while (retcode == 0); @@ -676,9 +668,7 @@ handle_exit: #endif free(arg); -#ifdef HAVE_PTHREAD pthread_exit(NULL); -#endif return NULL; } diff --git a/tests/rigctld.c b/tests/rigctld.c index 1f291de61..9935f5520 100644 --- a/tests/rigctld.c +++ b/tests/rigctld.c @@ -64,9 +64,7 @@ # include <netdb.h> #endif -#ifdef HAVE_PTHREAD -# include <pthread.h> -#endif +#include <pthread.h> #include "hamlib/rig.h" #include "misc.h" @@ -129,9 +127,7 @@ void *handle_socket(void *arg); void usage(void); -#ifdef HAVE_PTHREAD static unsigned client_count; -#endif static RIG *my_rig; /* handle to rig (instance) */ static volatile int rig_opened = 0; @@ -159,7 +155,6 @@ static int bind_all = 0; void mutex_rigctld(int lock) { -#ifdef HAVE_PTHREAD static pthread_mutex_t client_lock = PTHREAD_MUTEX_INITIALIZER; if (lock) @@ -173,7 +168,6 @@ void mutex_rigctld(int lock) pthread_mutex_unlock(&client_lock); } -#endif } #ifdef WIN32 @@ -273,10 +267,8 @@ int main(int argc, char *argv[]) struct sigaction act; #endif -#ifdef HAVE_PTHREAD pthread_t thread; pthread_attr_t attr; -#endif struct handle_data *arg; int vfo_mode = 0; /* vfo_mode=0 means target VFO is current VFO */ int i; @@ -1070,7 +1062,6 @@ int main(int argc, char *argv[]) host, serv); -#ifdef HAVE_PTHREAD pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); @@ -1082,16 +1073,12 @@ int main(int argc, char *argv[]) break; } -#else - handle_socket(arg); -#endif } } while (!ctrl_c); rig_debug(RIG_DEBUG_VERBOSE, "%s: while loop done\n", __func__); -#ifdef HAVE_PTHREAD /* allow threads to finish current action */ mutex_rigctld(1); @@ -1107,9 +1094,6 @@ int main(int argc, char *argv[]) #endif rig_close(my_rig); mutex_rigctld(0); -#else - rig_close(my_rig); /* close port */ -#endif rig_cleanup(my_rig); /* if you care about memory */ @@ -1185,7 +1169,6 @@ void *handle_socket(void *arg) goto handle_exit; } -#ifdef HAVE_PTHREAD mutex_rigctld(1); ++client_count; @@ -1206,19 +1189,6 @@ void *handle_socket(void *arg) #endif mutex_rigctld(0); -#else - mutex_rigctld(1); - retcode = rig_open(my_rig); - mutex_rigctld(0); - - if (RIG_OK == retcode && verbose > RIG_DEBUG_ERR) - { - printf("Opened rig model %d, '%s'\n", - my_rig->caps->rig_model, - my_rig->caps->model_name); - } - -#endif if (my_rig->caps->get_powerstat) { @@ -1314,21 +1284,16 @@ void *handle_socket(void *arg) } while (!ctrl_c && (retcode == RIG_OK || RIG_IS_SOFT_ERRCODE(retcode))); -#if defined(HAVE_PTHREAD) - + mutex_rigctld(1); if (rigctld_idle && client_count == 1) -#else - if (rigctld_idle) -#endif { rig_close(my_rig); if (verbose > RIG_DEBUG_ERR) { printf("Closed rig model %s. Will reopen for new clients\n", my_rig->caps->model_name); } } - -#ifdef HAVE_PTHREAD --client_count; + mutex_rigctld(0); if (rigctld_idle && client_count > 0) { printf("%u client%s still connected so rig remains open\n", client_count, client_count > 1 ? "s" : ""); } @@ -1349,17 +1314,6 @@ void *handle_socket(void *arg) } mutex_rigctld(0); -#endif -#else - rig_close(my_rig); - - if (verbose > RIG_DEBUG_ERR) - { - printf("Closed rig model %d, '%s - will reopen for new clients'\n", - my_rig->caps->rig_model, - my_rig->caps->model_name); - } - #endif if ((retcode = getnameinfo((struct sockaddr const *)&handle_data_arg->cli_addr, @@ -1404,9 +1358,7 @@ handle_exit: free(arg); -#ifdef HAVE_PTHREAD pthread_exit(NULL); -#endif return NULL; } commit 002677e48c2d5218254421472cefa6a354f54e84 Author: George Baltz N3GB <Geo...@gm...> Date: Wed Aug 27 15:12:57 2025 -0400 Still more pthread conditional code cleanup diff --git a/src/microham.c b/src/microham.c index 77ed1ca64..b18c25765 100644 --- a/src/microham.c +++ b/src/microham.c @@ -88,18 +88,12 @@ static int uh_wkey_in_use; static int statusbyte = 0; -#ifdef HAVE_PTHREAD - #include <pthread.h> static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; static pthread_t readthread; #define getlock() if (pthread_mutex_lock(&mutex)) perror("GETLOCK:") #define freelock() if (pthread_mutex_unlock(&mutex)) perror("FREELOCK:") -#else -#define getlock() -#define freelock() -#endif #if defined(HAVE_SELECT) // @@ -108,7 +102,7 @@ static pthread_t readthread; static time_t lastbeat = 0; #endif -#if defined(HAVE_PTHREAD) && defined(HAVE_SOCKETPAIR) && defined(HAVE_SELECT) +#if defined(HAVE_SOCKETPAIR) && defined(HAVE_SELECT) static time_t starttime; #define TIME ((int) (time(NULL) - starttime)) @@ -176,10 +170,8 @@ static void close_microham() TRACE("%10d:Closing MicroHam device\n", TIME); uh_is_initialized = 0; -#ifdef HAVE_PTHREAD // wait for read_device thread to finish pthread_join(readthread, NULL); -#endif close_all_files(); } @@ -717,7 +709,7 @@ static void writeControl(const unsigned char *data, int len) } -#if defined(HAVE_PTHREAD) && defined(HAVE_SOCKETPAIR) && defined(HAVE_SELECT) +#if defined(HAVE_SOCKETPAIR) && defined(HAVE_SELECT) // // send a heartbeat and record time // The "last heartbeat" time is recorded in a global variable @@ -733,7 +725,7 @@ static void heartbeat() writeControl(seq, 2); lastbeat = time(NULL); } -#endif /* defined(HAVE_PTHREAD) && defined(HAVE_SOCKETPAIR) && defined(HAVE_SELECT) */ +#endif /* defined(HAVE_SOCKETPAIR) && defined(HAVE_SELECT) */ #if defined(HAVE_SELECT) @@ -770,7 +762,7 @@ static void *read_device(void *p) } -#if defined(HAVE_PTHREAD) && defined(HAVE_SOCKETPAIR) && defined(HAVE_SELECT) +#if defined(HAVE_SOCKETPAIR) && defined(HAVE_SELECT) // // This is the right place to ensure that a heartbeat is sent @@ -906,7 +898,7 @@ static void *read_device(void *p) */ static void start_thread() { -#if defined(HAVE_PTHREAD) && defined(HAVE_SOCKETPAIR) && defined(HAVE_SELECT) +#if defined(HAVE_SOCKETPAIR) && defined(HAVE_SELECT) /* * Find a microHam device and open serial port to it. * If successful, create sockets for doing I/O from within hamlib diff --git a/src/misc.h b/src/misc.h index 2e4331e78..25ad442f9 100644 --- a/src/misc.h +++ b/src/misc.h @@ -23,20 +23,15 @@ #ifndef _MISC_H #define _MISC_H 1 -#include "hamlib/rig.h" #include "hamlib/config.h" +#include "hamlib/rig.h" /* */ -#ifdef HAVE_PTHREAD #include <pthread.h> #define set_transaction_active(rig) {pthread_mutex_lock(&STATE(rig)->mutex_set_transaction);STATE(rig)->transaction_active = 1;} #define set_transaction_inactive(rig) {STATE(rig)->transaction_active = 0;pthread_mutex_unlock(&STATE(rig)->mutex_set_transaction);} -#else -#define set_transaction_active(rig) {STATE(rig)->transaction_active = 1;} -#define set_transaction_inactive(rig) {STATE(rig)->transaction_active = 0;} -#endif __BEGIN_DECLS diff --git a/src/settings.c b/src/settings.c index 500708c83..14ca46e7f 100644 --- a/src/settings.c +++ b/src/settings.c @@ -96,7 +96,6 @@ int HAMLIB_API rig_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) || vfo == RIG_VFO_CURR || vfo == STATE(rig)->current_vfo) { -#if defined(HAVE_PTHREAD) if (level == RIG_LEVEL_KEYSPD) { @@ -104,7 +103,6 @@ int HAMLIB_API rig_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) morse_data_handler_set_keyspd(rig, val.i); } -#endif retcode = caps->set_level(rig, vfo, level, val); rig_lock(rig, 0); return retcode; diff --git a/tests/ampctl_parse.c b/tests/ampctl_parse.c index 375cee160..005f50db1 100644 --- a/tests/ampctl_parse.c +++ b/tests/ampctl_parse.c @@ -72,11 +72,9 @@ extern int read_history(); /* Hash table implementation See: http://uthash.sourceforge.net/ */ #include "uthash.h" -#ifdef HAVE_PTHREAD -# include <pthread.h> +#include <pthread.h> static pthread_mutex_t amp_mutex = PTHREAD_MUTEX_INITIALIZER; -#endif #define STR1(S) #S #define STR(S) STR1(S) @@ -1339,9 +1337,7 @@ int ampctl_parse(AMP *my_amp, FILE *fin, FILE *fout, char *argv[], int argc) * mutex locking needed because ampctld is multithreaded * and hamlib is not MT-safe */ -#ifdef HAVE_PTHREAD pthread_mutex_lock(&_mutex); -#endif if (!prompt) { @@ -1389,9 +1385,7 @@ int ampctl_parse(AMP *my_amp, FILE *fin, FILE *fout, char *argv[], int argc) ""); #endif -#ifdef HAVE_PTHREAD pthread_mutex_unlock(&_mutex); -#endif if (retcode == -RIG_EIO) { return retcode; } diff --git a/tests/rigctltcp.c b/tests/rigctltcp.c index 0aef3a708..5e92f8cf9 100644 --- a/tests/rigctltcp.c +++ b/tests/rigctltcp.c @@ -68,9 +68,7 @@ # include <netdb.h> #endif -#ifdef HAVE_PTHREAD -# include <pthread.h> -#endif +#include <pthread.h> #include "hamlib/rig.h" #include "misc.h" @@ -132,10 +130,7 @@ struct handle_data void *handle_socket(void *arg); void usage(void); - -#ifdef HAVE_PTHREAD static unsigned client_count; -#endif static RIG *my_rig; /* handle to rig (instance) */ static volatile int rig_opened = 0; @@ -163,7 +158,6 @@ static int rigctld_idle = void mutex_rigctld(int lock) { -#ifdef HAVE_PTHREAD static pthread_mutex_t client_lock = PTHREAD_MUTEX_INITIALIZER; if (lock) @@ -177,7 +171,6 @@ void mutex_rigctld(int lock) pthread_mutex_unlock(&client_lock); } -#endif } #ifdef WIN32 @@ -273,10 +266,8 @@ int main(int argc, char *argv[]) struct sigaction act; #endif -#ifdef HAVE_PTHREAD pthread_t thread; pthread_attr_t attr; -#endif struct handle_data *arg; int vfo_mode = 0; /* vfo_mode=0 means target VFO is current VFO */ int i; @@ -980,7 +971,6 @@ int main(int argc, char *argv[]) host, serv); -#ifdef HAVE_PTHREAD pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); @@ -992,16 +982,12 @@ int main(int argc, char *argv[]) break; } -#else - handle_socket(arg); -#endif } } while (!ctrl_c); rig_debug(RIG_DEBUG_VERBOSE, "%s: while loop done\n", __func__); -#ifdef HAVE_PTHREAD /* allow threads to finish current action */ mutex_rigctld(1); @@ -1012,9 +998,6 @@ int main(int argc, char *argv[]) rig_close(my_rig); mutex_rigctld(0); -#else - rig_close(my_rig); /* close port */ -#endif network_multicast_publisher_stop(my_rig); @@ -1088,7 +1071,6 @@ void *handle_socket(void *arg) goto handle_exit; } -#ifdef HAVE_PTHREAD mutex_rigctld(1); ++client_count; @@ -1109,19 +1091,6 @@ void *handle_socket(void *arg) #endif mutex_rigctld(0); -#else - mutex_rigctld(1); - retcode = rig_open(my_rig); - mutex_rigctld(1); - - if (RIG_OK == retcode && verbose > RIG_DEBUG_ERR) - { - printf("Opened rig model %d, '%s'\n", - my_rig->caps->rig_model, - my_rig->caps->model_name); - } - -#endif if (my_rig->caps->get_powerstat) { @@ -1316,23 +1285,18 @@ void *handle_socket(void *arg) client_done: -#if defined(HAVE_PTHREAD) - if (rigctld_idle && client_count == 1) -#else - if (rigctld_idle) -#endif { rig_close(my_rig); if (verbose > RIG_DEBUG_ERR) { printf("Closed rig model %s. Will reopen for new clients\n", my_rig->caps->model_name); } } - -#ifdef HAVE_PTHREAD + mutex_rigctld(1); --client_count; if (rigctld_idle && client_count > 0) { printf("%u client%s still connected so rig remains open\n", client_count, client_count > 1 ? "s" : ""); } + mutex_rigctld(0); #if 0 mutex_rigctld(1); @@ -1351,17 +1315,6 @@ client_done: } mutex_rigctld(0); -#endif -#else - rig_close(my_rig); - - if (verbose > RIG_DEBUG_ERR) - { - printf("Closed rig model %d, '%s - will reopen for new clients'\n", - my_rig->caps->rig_model, - my_rig->caps->model_name); - } - #endif if ((retcode = getnameinfo((struct sockaddr const *)&handle_data_arg->cli_addr, @@ -1406,9 +1359,7 @@ handle_exit: free(arg); -#ifdef HAVE_PTHREAD pthread_exit(NULL); -#endif return NULL; } diff --git a/tests/rotctl_parse.c b/tests/rotctl_parse.c index bfc3488b7..2b4255890 100644 --- a/tests/rotctl_parse.c +++ b/tests/rotctl_parse.c @@ -88,11 +88,9 @@ extern int read_history(); /* Hash table implementation See: http://uthash.sourceforge.net/ */ #include "uthash.h" -#ifdef HAVE_PTHREAD -# include <pthread.h> +#include <pthread.h> static pthread_mutex_t rot_mutex = PTHREAD_MUTEX_INITIALIZER; -#endif #define STR1(S) #S #define STR(S) STR1(S) @@ -1413,9 +1411,7 @@ int rotctl_parse(ROT *my_rot, FILE *fin, FILE *fout, const char *argv[], * mutex locking needed because rotctld is multithreaded * and hamlib is not MT-safe */ -#ifdef HAVE_PTHREAD pthread_mutex_lock(&rot_mutex); -#endif if (!prompt) { @@ -1467,9 +1463,7 @@ int rotctl_parse(ROT *my_rot, FILE *fin, FILE *fout, const char *argv[], ""); #endif -#ifdef HAVE_PTHREAD pthread_mutex_unlock(&rot_mutex); -#endif if (retcode == -RIG_EIO) { return retcode; } diff --git a/tests/rotctld.c b/tests/rotctld.c index 405591bb6..9410620ea 100644 --- a/tests/rotctld.c +++ b/tests/rotctld.c @@ -51,9 +51,7 @@ # include <netdb.h> #endif -#ifdef HAVE_PTHREAD -# include <pthread.h> -#endif +#include <pthread.h> #include "hamlib/rotator.h" @@ -166,10 +164,8 @@ int main(int argc, char *argv[]) char host[NI_MAXHOST]; char serv[NI_MAXSERV]; -#ifdef HAVE_PTHREAD pthread_t thread; pthread_attr_t attr; -#endif struct handle_data *arg; rig_set_debug(verbose); @@ -575,7 +571,6 @@ int main(int argc, char *argv[]) host, serv); -#ifdef HAVE_PTHREAD pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); @@ -587,12 +582,7 @@ int main(int argc, char *argv[]) break; } -#else - handle_socket(arg); - retcode = 1; -#endif } - while (retcode == 0); rot_close(my_rot); /* close port */ @@ -702,9 +692,7 @@ handle_exit: #endif free(arg); -#ifdef HAVE_PTHREAD pthread_exit(NULL); -#endif return NULL; } commit 9a90745ba693767a4c29caaabb406a3feb943982 Author: George Baltz N3GB <Geo...@gm...> Date: Thu Aug 21 04:23:26 2025 -0400 More conditional pthread usage unleashed Anybody know what sync_callback() is supposed to do? Currently unused, very broken, and not even a header comment. diff --git a/rotators/ars/ars.c b/rotators/ars/ars.c index 795aa0f53..2b51609a4 100644 --- a/rotators/ars/ars.c +++ b/rotators/ars/ars.c @@ -27,9 +27,7 @@ #include <sys/ioctl.h> #endif -#ifdef HAVE_PTHREAD #include <pthread.h> -#endif #include "hamlib/rotator.h" #include "hamlib/rot_state.h" @@ -84,9 +82,7 @@ static int ars_set_position_sync(ROT *rot, azimuth_t az, elevation_t el); static int ars_set_position(ROT *rot, azimuth_t az, elevation_t el); static int ars_get_position(ROT *rot, azimuth_t *az, elevation_t *el); -#ifdef HAVE_PTHREAD static void *handle_set_position(void *); -#endif /* ************************************************************************* */ @@ -193,7 +189,6 @@ ars_open(ROT *rot) /* make it idle, and known state */ ars_stop(rot); -#ifdef HAVE_PTHREAD { struct ars_priv_data *priv = (struct ars_priv_data *)ROTSTATE(rot)->priv; pthread_attr_t attr; @@ -212,7 +207,6 @@ ars_open(ROT *rot) return -RIG_ENOMEM; } } -#endif return RIG_OK; } @@ -220,11 +214,9 @@ ars_open(ROT *rot) int ars_close(ROT *rot) { -#ifdef HAVE_PTHREAD struct ars_priv_data *priv = (struct ars_priv_data *)ROTSTATE(rot)->priv; pthread_cancel(priv->thread); -#endif /* leave it in safe state */ ars_stop(rot); @@ -241,9 +233,7 @@ ars_stop(ROT *rot) rig_debug(RIG_DEBUG_TRACE, "%s called, brake was %s\n", __func__, priv->brake_off ? "OFF" : "ON"); -#ifdef HAVE_PTHREAD priv->set_pos_active = 0; -#endif par_lock(pport); @@ -422,7 +412,6 @@ static int angle_in_range(float angle, float angle_base, float range) /* * Thread handler */ -#ifdef HAVE_PTHREAD static void *handle_set_position(void *arg) { ROT *rot = (ROT *) arg; @@ -453,7 +442,6 @@ static void *handle_set_position(void *arg) return NULL; } -#endif /* * ars_set_position_sync() is synchronous. @@ -583,7 +571,6 @@ ars_set_position_sync(ROT *rot, azimuth_t az, elevation_t el) int ars_set_position(ROT *rot, azimuth_t az, elevation_t el) { -#ifdef HAVE_PTHREAD struct ars_priv_data *priv = (struct ars_priv_data *)ROTSTATE(rot)->priv; /* will be picked by handle_set_position() next polling tick */ @@ -592,9 +579,6 @@ ars_set_position(ROT *rot, azimuth_t az, elevation_t el) priv->set_pos_active = 1; return RIG_OK; -#else - return ars_set_position_sync(rot, az, el); -#endif } static int comparunsigned(const void *a, const void *b) diff --git a/rotators/ars/ars.h b/rotators/ars/ars.h index c85c3796e..b463f84b1 100644 --- a/rotators/ars/ars.h +++ b/rotators/ars/ars.h @@ -30,12 +30,10 @@ struct ars_priv_data { int curr_move; unsigned char pp_control; unsigned char pp_data; -#ifdef HAVE_PTHREAD pthread_t thread; int set_pos_active; azimuth_t target_az; elevation_t target_el; -#endif }; extern const struct rot_caps rci_az_rot_caps; diff --git a/src/event.c b/src/event.c index ad3ed7789..78c5b9624 100644 --- a/src/event.c +++ b/src/event.c @@ -39,9 +39,7 @@ #include <stdio.h> #include <errno.h> -#ifdef HAVE_PTHREAD -# include <pthread.h> -#endif +#include <pthread.h> #include "hamlib/rig.h" #include "hamlib/rig_state.h" @@ -52,7 +50,6 @@ #define CHECK_RIG_ARG(r) (!(r) || !(r)->caps || !STATE(r)->comm_state) -#ifdef HAVE_PTHREAD typedef struct rig_poll_routine_args_s { RIG *rig; @@ -362,8 +359,6 @@ int rig_poll_routine_stop(RIG *rig) RETURNFUNC(RIG_OK); } -#endif - /** * \brief set the callback for freq events * \param rig The rig handle @@ -609,7 +604,6 @@ int HAMLIB_API rig_get_trn(RIG *rig, int *trn) RETURNFUNC(-RIG_EDEPRECATED); } -#if defined(HAVE_PTHREAD) int rig_fire_freq_event(RIG *rig, vfo_t vfo, freq_t freq) { ENTERFUNC; @@ -648,9 +642,7 @@ int rig_fire_freq_event(RIG *rig, vfo_t vfo, freq_t freq) RETURNFUNC(0); } -#endif -#if defined(HAVE_PTHREAD) int rig_fire_mode_event(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) { ENTERFUNC; @@ -676,10 +668,8 @@ int rig_fire_mode_event(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) RETURNFUNC(0); } -#endif -#if defined(HAVE_PTHREAD) int rig_fire_vfo_event(RIG *rig, vfo_t vfo) { struct rig_cache *cachep = CACHE(rig); @@ -699,10 +689,8 @@ int rig_fire_vfo_event(RIG *rig, vfo_t vfo) RETURNFUNC(0); } -#endif -#if defined(HAVE_PTHREAD) int rig_fire_ptt_event(RIG *rig, vfo_t vfo, ptt_t ptt) { struct rig_cache *cachep = CACHE(rig); @@ -723,10 +711,8 @@ int rig_fire_ptt_event(RIG *rig, vfo_t vfo, ptt_t ptt) RETURNFUNC(0); } -#endif -#if defined(HAVE_PTHREAD) int rig_fire_dcd_event(RIG *rig, vfo_t vfo, dcd_t dcd) { ENTERFUNC; @@ -743,10 +729,8 @@ int rig_fire_dcd_event(RIG *rig, vfo_t vfo, dcd_t dcd) RETURNFUNC(0); } -#endif -#if defined(HAVE_PTHREAD) int rig_fire_pltune_event(RIG *rig, vfo_t vfo, freq_t *freq, rmode_t *mode, pbwidth_t *width) { @@ -764,10 +748,8 @@ int rig_fire_pltune_event(RIG *rig, vfo_t vfo, freq_t *freq, rmode_t *mode, RETURNFUNC(RIG_OK); } -#endif -#if defined(HAVE_PTHREAD) static int print_spectrum_line(char *str, size_t length, struct rig_spectrum_line *line) { @@ -825,10 +807,8 @@ static int print_spectrum_line(char *str, size_t length, return c; } -#endif -#if defined(HAVE_PTHREAD) int rig_fire_spectrum_event(RIG *rig, struct rig_spectrum_line *line) { ENTERFUNC; @@ -850,6 +830,5 @@ int rig_fire_spectrum_event(RIG *rig, struct rig_spectrum_line *line) RETURNFUNC(RIG_OK); } -#endif /** @} */ diff --git a/src/mutex.h b/src/mutex.h index a872231b4..f11d79913 100644 --- a/src/mutex.h +++ b/src/mutex.h @@ -1,18 +1,9 @@ #include "hamlib/config.h" -#if defined(HAVE_PTHREAD) #include <pthread.h> -#endif -#ifdef HAVE_PTHREAD #define MUTEX(var) static pthread_mutex_t var = PTHREAD_MUTEX_INITIALIZER #define MUTEX_LOCK(var) pthread_mutex_lock(&var) #define MUTEX_UNLOCK(var) pthread_mutex_unlock(&var) -#else -#warning NOT PTHREAD -#define MUTEX(var) -#define MUTEX_LOCK(var) -#define MUTEX_UNLOCK(var) -#endif extern int MUTEX_CHECK(pthread_mutex_t *m); diff --git a/src/network.c b/src/network.c index 848a45eae..958075b3d 100644 --- a/src/network.c +++ b/src/network.c @@ -125,9 +125,7 @@ typedef struct multicast_publisher_args_s int data_read_fd; #endif -#ifdef HAVE_PTHREAD pthread_mutex_t write_lock; -#endif } multicast_publisher_args; typedef struct multicast_publisher_priv_data_s @@ -511,9 +509,9 @@ int network_close(hamlib_port_t *rp) } //! @endcond -extern void sync_callback(int lock); +//TODO See defn in rig.c +//extern void sync_callback(int lock); -#ifdef HAVE_PTHREAD //! @cond Doxygen_Suppress #define MULTICAST_DATA_PIPE_TIMEOUT_MILLIS 1000 @@ -1953,5 +1951,4 @@ int network_multicast_receiver_stop(RIG *rig) RETURNFUNC(RIG_OK); } -#endif /** @} */ diff --git a/src/rig.c b/src/rig.c index 4807011db..f40846fe4 100644 --- a/src/rig.c +++ b/src/rig.c @@ -192,7 +192,6 @@ const char hamlib_copyright[231] = /* hamlib 1.2 ABI specifies 231 bytes */ MUTEX(morse_mutex); -#ifdef HAVE_PTHREAD // returns true if mutex is busy int MUTEX_CHECK(pthread_mutex_t *m) { @@ -205,9 +204,6 @@ int MUTEX_CHECK(pthread_mutex_t *m) return trylock == EBUSY; } -#else -#define MUTEX_CHECK(var) 0 -#endif /* @@ -255,7 +251,6 @@ static const char *const rigerror_table[] = #define ERROR_TBL_SZ (sizeof(rigerror_table)/sizeof(char *)) -#if defined(HAVE_PTHREAD) typedef struct async_data_handler_args_s { RIG *rig; @@ -270,9 +265,7 @@ typedef struct async_data_handler_priv_data_s static int async_data_handler_start(RIG *rig); static int async_data_handler_stop(RIG *rig); static void *async_data_handler(void *arg); -#endif -#if defined(HAVE_PTHREAD) typedef struct morse_data_handler_args_s { RIG *rig; @@ -290,7 +283,6 @@ static int morse_data_handler_start(RIG *rig); static int morse_data_handler_stop(RIG *rig); int morse_data_handler_set_keyspd(RIG *rig, int keyspd); static void *morse_data_handler(void *arg); -#endif /* * track which rig is opened (with rig_open) @@ -642,9 +634,7 @@ RIG *HAMLIB_API rig_init(rig_model_t rig_model) * TODO: read the Preferences here! */ rs = STATE(rig); -#if defined(HAVE_PTHREAD) pthread_mutex_init(&rs->mutex_set_transaction, NULL); -#endif //TODO Allocate and link ports // For now, use the embedded ones @@ -681,9 +671,7 @@ RIG *HAMLIB_API rig_init(rig_model_t rig_model) rs->comm_state); #endif rp->type.rig = caps->port_type; /* default from caps */ -#if defined(HAVE_PTHREAD) rp->asyncio = 0; -#endif switch (caps->port_type) { @@ -1548,8 +1536,6 @@ int HAMLIB_API rig_open(RIG *rig) if (skip_init) { RETURNFUNC2(RIG_OK); } -#if defined(HAVE_PTHREAD) - status = async_data_handler_start(rig); if (status < 0) @@ -1573,8 +1559,6 @@ int HAMLIB_API rig_open(RIG *rig) } } -#endif - if (rs->auto_disable_screensaver) { // try to turn off the screensaver if possible @@ -1646,7 +1630,6 @@ int HAMLIB_API rig_open(RIG *rig) rig_flush_force(rp, 1); rs->timeout = timesave; -#if defined(HAVE_PTHREAD) enum multicast_item_e items = RIG_MULTICAST_POLL | RIG_MULTICAST_TRANSCEIVE | RIG_MULTICAST_SPECTRUM; retval = network_multicast_publisher_start(rig, rs->multicast_data_addr, @@ -1680,8 +1663,6 @@ int HAMLIB_API rig_open(RIG *rig) // we will consider this non-fatal for now } -#endif - rs->comm_status = RIG_COMM_STATUS_OK; add_opened_rig(rig); @@ -1733,8 +1714,6 @@ int HAMLIB_API rig_close(RIG *rig) rs->comm_status = RIG_COMM_STATUS_DISCONNECTED; -#if defined(HAVE_PTHREAD) - if (!skip_init) { morse_data_handler_stop(rig); @@ -1744,8 +1723,6 @@ int HAMLIB_API rig_close(RIG *rig) network_multicast_publisher_stop(rig); } -#endif - // Let the backend say 73 to the rig. // and ignore the return code. if (caps->rig_close) @@ -8395,13 +8372,12 @@ int HAMLIB_API rig_cookie(RIG *rig, enum cookie_e cookie_cmd, char *cookie, return ret; } -#if defined(HAVE_PTHREAD) +//TODO FIX THIS!!!! (presently unused) +#if 0 static pthread_mutex_t initializer = PTHREAD_MUTEX_INITIALIZER; -#endif HAMLIB_EXPORT(void) sync_callback(int lock) { -#if defined(HAVE_PTHREAD) pthread_mutex_t client_lock = initializer; if (lock) @@ -8415,12 +8391,11 @@ HAMLIB_EXPORT(void) sync_callback(int lock) pthread_mutex_unlock(&client_lock); } -#endif } +#endif void rig_lock(RIG *rig, int lock) { -#if defined(HAVE_PTHREAD) struct rig_state *rs = STATE(rig); @@ -8435,8 +8410,6 @@ void rig_lock(RIG *rig, int lock) pthread_mutex_unlock(&rs->api_mutex); } -#endif - } @@ -8445,7 +8418,6 @@ void rig_lock(RIG *rig, int lock) #define MAX_FRAME_LENGTH 1024 -#if defined(HAVE_PTHREAD) static int async_data_handler_start(RIG *rig) { struct rig_state *rs = STATE(rig); @@ -8487,9 +8459,7 @@ static int async_data_handler_start(RIG *rig) RETURNFUNC(RIG_OK); } -#endif -#if defined(HAVE_PTHREAD) static int morse_data_handler_start(RIG *rig) { struct rig_state *rs = STATE(rig); @@ -8527,10 +8497,8 @@ static int morse_data_handler_start(RIG *rig) RETURNFUNC(RIG_OK); } -#endif -#if defined(HAVE_PTHREAD) static int async_data_handler_stop(RIG *rig) { struct rig_state *rs = STATE(rig); @@ -8569,9 +8537,7 @@ static int async_data_handler_stop(RIG *rig) RETURNFUNC(RIG_OK); } -#endif -#if defined(HAVE_PTHREAD) static int morse_data_handler_stop(RIG *rig) { struct rig_state *rs = STATE(rig); @@ -8625,9 +8591,7 @@ static int morse_data_handler_stop(RIG *rig) RETURNFUNC(RIG_OK); } -#endif -#if defined(HAVE_PTHREAD) static void *async_data_handler(void *arg) { struct async_data_handler_args_s *args = (struct async_data_handler_args_s *) @@ -8721,9 +8685,7 @@ again: pthread_exit(NULL); return NULL; } -#endif -#if defined(HAVE_PTHREAD) static void *morse_data_handler(void *arg) { struct morse_data_handler_args_s *args = @@ -8866,7 +8828,6 @@ static void *morse_data_handler(void *arg) pthread_exit(NULL); return NULL; } -#endif HAMLIB_EXPORT(int) rig_password(RIG *rig, const char *key1) @@ -9065,7 +9026,6 @@ HAMLIB_EXPORT(int) rig_is_model(RIG *rig, rig_model_t model) } -#if defined(HAVE_PTHREAD) int morse_data_handler_set_keyspd(RIG *rig, int keyspd) { struct rig_state *rs = STATE(rig); @@ -9075,7 +9035,6 @@ int morse_data_handler_set_keyspd(RIG *rig, int keyspd) rig_debug(RIG_DEBUG_VERBOSE, "%s: keyspd=%d\n", __func__, keyspd); return RIG_OK; } -#endif /** * \brief Get the address of a Hamlib data structure commit df65ceee67bc11d6f6daba9bce3142ef55a082c5 Author: George Baltz N3GB <Geo...@gm...> Date: Wed Aug 20 18:11:15 2025 -0400 Start removing conditional pthreads use. We can treat HAVE_PTHREAD and HAVE_PTHREAD_H as equivalent. But using _PTHREAD_H is a real kludge. diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 902bb683c..0502e97ca 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -178,11 +178,7 @@ typedef struct int head; int tail; int flush; // flush flag for stop_morse -#ifdef _PTHREAD_H pthread_mutex_t mutex; -#else - int mutex; -#endif } FIFO_RIG; diff --git a/include/hamlib/rig_state.h b/include/hamlib/rig_state.h index bd1c727c1..5d32089d7 100644 --- a/include/hamlib/rig_state.h +++ b/include/hamlib/rig_state.h @@ -24,8 +24,10 @@ #ifndef _RIG_STATE_H #define _RIG_STATE_H 1 -__BEGIN_DECLS +//#include <hamlib/rig.h> +//#include <pthread.h> +__BEGIN_DECLS /** * \addtogroup rig diff --git a/rigs/anytone/anytone.c b/rigs/anytone/anytone.c index 3945d08f6..426332deb 100644 --- a/rigs/anytone/anytone.c +++ b/rigs/anytone/anytone.c @@ -223,9 +223,7 @@ int anytone_init(RIG *rig) { STATE(rig)->priv = p; p->vfo_curr = RIG_VFO_NONE; -#ifdef HAVE_PTHREAD pthread_mutex_init(&p->mutex, NULL); -#endif } } diff --git a/rigs/dummy/rot_pstrotator.c b/rigs/dummy/rot_pstrotator.c index 69d7c4da1..a4b31d675 100644 --- a/rigs/dummy/rot_pstrotator.c +++ b/rigs/dummy/rot_pstrotator.c @@ -178,7 +178,6 @@ static void readPacket(int sockfd, char *buf, int buf_len, int expected) //if (n > 0) { rig_debug(RIG_DEBUG_VERBOSE, "%s: buf=%s\n", __func__, buf); } } -#if defined(HAVE_PTHREAD) #if 0 typedef struct pstrotator_handler_args_sw { @@ -245,8 +244,6 @@ static void *pstrotator_handler_start(void *arg) return NULL; } -#endif - static int pstrotator_rot_init(ROT *rot) { struct pstrotator_rot_priv_data *priv; diff --git a/rigs/dummy/rot_pstrotator.h b/rigs/dummy/rot_pstrotator.h index 5f85c46b7..509f31382 100644 --- a/rigs/dummy/rot_pstrotator.h +++ b/rigs/dummy/rot_pstrotator.h @@ -40,7 +40,6 @@ extern struct rot_caps pstrotator_caps; extern struct rot_caps netrotctl_caps; -#if defined(HAVE_PTHREAD) typedef struct pstrotator_handler_args_sw { ROT *rot; @@ -55,8 +54,6 @@ typedef struct pstrotator_handler_priv_data_s int sockfd2; } pstrotator_handler_priv_data; -#endif - #endif /* _ROT_PSTROTATOR_H */ diff --git a/rigs/flexradio/smartsdr.c b/rigs/flexradio/smartsdr.c index c24718905..1bbc1da8d 100644 --- a/rigs/flexradio/smartsdr.c +++ b/rigs/flexradio/smartsdr.c @@ -301,7 +301,6 @@ int smartsdr_cleanup(RIG *rig) } #if 0 -#if defined(HAVE_PTHREAD) typedef struct smartsdr_data_handler_args_s { RIG *rig; @@ -370,7 +369,6 @@ static int smartsdr_data_handler_start(RIG *rig) } #endif -#endif /* Example response to "sub slice 0" 511+511+35 diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 77d3ac80e..85686a68b 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -9049,7 +9049,6 @@ int icom_mW2power(RIG *rig, float *power, unsigned int mwpower, freq_t freq, RETURNFUNC(RIG_OK); } -#if defined(HAVE_PTHREAD) static int icom_parse_spectrum_frame(RIG *rig, size_t length, const unsigned char *frame_data) { @@ -9209,7 +9208,6 @@ static int icom_parse_spectrum_frame(RIG *rig, size_t length, RETURNFUNC(RIG_OK); } -#endif int icom_is_async_frame(RIG *rig, size_t frame_length, const unsigned char *frame) @@ -9262,9 +9260,7 @@ int icom_process_async_frame(RIG *rig, size_t frame_length, // TODO: Disable cache timeout for frequency after first transceive packet once we figure out how to get active VFO reliably with transceive updates // TODO: rig_set_cache_timeout_ms(rig, HAMLIB_CACHE_FREQ, HAMLIB_CACHE_ALWAYS); freq_t freq = (freq_t) from_bcd(frame + 5, (priv->civ_731_mode ? 4 : 5) * 2); -#if defined(HAVE_PTHREAD) rig_fire_freq_event(rig, RIG_VFO_CURR, freq); -#endif #if 0 @@ -9284,9 +9280,7 @@ int icom_process_async_frame(RIG *rig, size_t frame_length, // TODO: Disable cache timeout for frequency after first transceive packet once we figure out how to get active VFO reliably with transceive updates // TODO: rig_set_cache_timeout_ms(rig, HAMLIB_CACHE_MODE, HAMLIB_CACHE_ALWAYS); icom2rig_mode(rig, frame[5], frame[6], &mode, &width); -#if defined(HAVE_PTHREAD) rig_fire_mode_event(rig, RIG_VFO_CURR, mode, width); -#endif if (rs->use_cached_mode != 1) { @@ -9297,8 +9291,6 @@ int icom_process_async_frame(RIG *rig, size_t frame_length, break; -#if defined(HAVE_PTHREAD) - case C_CTL_SCP: if (frame[5] == S_SCP_DAT) { @@ -9306,7 +9298,6 @@ int icom_process_async_frame(RIG *rig, size_t frame_length, } break; -#endif default: rig_debug(RIG_DEBUG_VERBOSE, "%s: transceive cmd unsupported %#2.2x\n", diff --git a/rigs/tentec/orion.h b/rigs/tentec/orion.h index 76772a4c2..cf6c89040 100644 --- a/rigs/tentec/orion.h +++ b/rigs/tentec/orion.h @@ -354,25 +354,13 @@ RIG_MODEL(RIG_MODEL_TT565), .rig_close = tt565_close, .set_freq = tt565_set_freq, -#if defined(HAVE_PTHREAD) .get_freq = tt565_get_freq_cache, -#else -.get_freq = tt565_get_freq, -#endif .set_vfo = tt565_set_vfo, .get_vfo = tt565_get_vfo, .set_mode = tt565_set_mode, -#if defined(HAVE_PTHREAD) .get_mode = tt565_get_mode_cache, -#else -.get_mode = tt565_get_mode, -#endif .set_split_vfo = tt565_set_split_vfo, -#if defined(HAVE_PTHREAD) .get_split_vfo = tt565_get_split_vfo_cache, -#else -.get_split_vfo = tt565_get_split_vfo, -#endif .set_level = tt565_set_level, .get_level = tt565_get_level, .set_mem = tt565_set_mem, diff --git a/src/fifo.c b/src/fifo.c index cd112a9d7..b145bcbd0 100644 --- a/src/fifo.c +++ b/src/fifo.c @@ -8,10 +8,8 @@ void initFIFO(FIFO_RIG *fifo) { fifo->head = 0; fifo->tail = 0; -#ifdef _PTHREAD_H static pthread_mutex_t t = PTHREAD_MUTEX_INITIALIZER; fifo->mutex = t; -#endif } void resetFIFO(FIFO_RIG *fifo) @@ -25,9 +23,7 @@ void resetFIFO(FIFO_RIG *fifo) // return -RIG error if overflow int push(FIFO_RIG *fifo, const char *msg) { -#ifdef _PTHREAD_H pthread_mutex_lock(&fifo->mutex); -#endif int len = strlen(msg); for (int i = 0; i < len; ++i) @@ -57,9 +53,7 @@ int push(FIFO_RIG *fifo, const char *msg) fifo->tail = (fifo->tail + 1) % HAMLIB_FIFO_SIZE; } -#ifdef _PTHREAD_H pthread_mutex_unlock(&fifo->mutex); -#endif return RIG_OK; } @@ -73,9 +67,7 @@ int peek(FIFO_RIG *fifo) if (fifo->tail == fifo->head) { return -1; } -#ifdef _PTHREAD_H pthread_mutex_lock(&fifo->mutex); -#endif char c = fifo->data[fifo->head]; #if 0 @@ -89,9 +81,7 @@ int peek(FIFO_RIG *fifo) fifo->tail); #endif -#ifdef _PTHREAD_H pthread_mutex_unlock(&fifo->mutex); -#endif return c; } @@ -99,9 +89,7 @@ int pop(FIFO_RIG *fifo) { if (fifo->tail == fifo->head) { return -1; } -#ifdef _PTHREAD_H pthread_mutex_lock(&fifo->mutex); -#endif char c = fifo->data[fifo->head]; #if 0 @@ -115,9 +103,7 @@ int pop(FIFO_RIG *fifo) #endif fifo->head = (fifo->head + 1) % HAMLIB_FIFO_SIZE; -#ifdef _PTHREAD_H pthread_mutex_unlock(&fifo->mutex); -#endif return c; } commit 9f4755cf70e0a556bff61f433dbaab5e6e20f269 Author: George Baltz N3GB <Geo...@gm...> Date: Tue Aug 19 21:12:56 2025 -0400 Add requirement for POSIX threads (pthreads) I wrote this one-liner, and then realized I couldn't test it - I have no systems that do not have pthreads as an integral part - does anybody? Since <pthread.h> has been a de facto requirement since 4.5, the point may be moot. (Update: quick '# mv pthread.h pthread2.h' and it fails) And are the URLs in README.developer correct? Should they point to github? diff --git a/README.developer b/README.developer index 177717f09..41576a385 100644 --- a/README.developer +++ b/README.developer @@ -159,7 +159,7 @@ file. This document introduces hacking the code of Hamlib. git clone git://git.code.sf.net/p/hamlib/code hamlib -The clone has to only be done the first time. +The clone only has to be done the first time. After the initial clone, whenever you want to update your local repository, issue the following command in the root directory of Hamlib: @@ -277,6 +277,9 @@ distributions may differ). * libtool 2.2.6b+ # libtool --version * Git for connection to git.code.sf.net/p/hamlib/code +As of Hamlib 4.7, POSIX thread support (pthreads) is required to compile or +run Hamlib. + N.B. Hamlib requires libtool >= 2.2.6b in compliance with CVE-2009-3736. Optional, but highly recommended: @@ -518,6 +521,7 @@ So far, Hamlib has been tested successfully under the following systems: * Debian sid mipsel * Raspbian armhf (Raspberry Pi Debian derivative) * RedHat i386 + * openSUSE (Leap & Tumbleweed) * Linux ppc * Slackware i386 * FreeBSD & NetBSD diff --git a/configure.ac b/configure.ac index 81e045539..150954246 100644 --- a/configure.ac +++ b/configure.ac @@ -172,7 +172,7 @@ dnl If pthread support is found, this macro defines HAVE_PTHREAD and dnl AC_SUBST's PTHREAD_LIBS, PTHREAD_CFLAGS, and PTHREAD_CC making those dnl variables available in Makefiles. # macros/ax_pthread.m4 -AX_PTHREAD +AX_PTHREAD([], [AC_MSG_ERROR([POSIX threads not found])]) AC_SYS_POSIX_TERMIOS() ----------------------------------------------------------------------- Summary of changes: NEWS | 3 +++ README.developer | 6 ++++- configure.ac | 2 +- include/hamlib/rig.h | 4 ---- include/hamlib/rig_state.h | 4 +++- rigs/anytone/anytone.c | 2 -- rigs/dummy/rot_pstrotator.c | 3 --- rigs/dummy/rot_pstrotator.h | 3 --- rigs/flexradio/smartsdr.c | 2 -- rigs/icom/icom.c | 9 -------- rigs/tentec/orion.h | 12 ---------- rotators/ars/ars.c | 16 ------------- rotators/ars/ars.h | 2 -- src/event.c | 23 +------------------ src/fifo.c | 14 ------------ src/microham.c | 18 +++++---------- src/misc.h | 7 +----- src/mutex.h | 9 -------- src/network.c | 7 ++---- src/rig.c | 47 +++----------------------------------- src/settings.c | 2 -- tests/ampctl_parse.c | 8 +------ tests/ampctld.c | 12 +--------- tests/rigctld.c | 54 +++----------------------------------------- tests/rigctltcp.c | 55 +++------------------------------------------ tests/rotctl_parse.c | 8 +------ tests/rotctld.c | 14 +----------- 27 files changed, 34 insertions(+), 312 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-09-01 00:35:24
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 9123d08a6c95a59214a01da6551fd9c887939ce8 (commit) via 341a5201c6748bf17f0caa003fce2a7b87530bc2 (commit) via 8f343197e0926ca422c3b6aeb66b39b1b43c6a6b (commit) from 43b84ee56a66c19844c5efcb63f1217f57fac4c2 (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 9123d08a6c95a59214a01da6551fd9c887939ce8 Merge: 43b84ee56 341a5201c Author: Nate Bargmann <n0...@n0...> Date: Sun Aug 31 19:21:27 2025 -0500 Merge GitHub PR #1874 commit 341a5201c6748bf17f0caa003fce2a7b87530bc2 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Fri Aug 29 23:04:00 2025 +0200 Replace literal constant with defined symbol diff --git a/src/misc.c b/src/misc.c index 2156d0b7b..d363f0f1b 100644 --- a/src/misc.c +++ b/src/misc.c @@ -2131,14 +2131,14 @@ int HAMLIB_API parse_hoststr(char *hoststr, int hoststr_len, char host[256], // Exclude any names that aren't a host:port format // Handle device names 1st - if (strstr(hoststr, "/dev")) { return -1; } + if (strstr(hoststr, "/dev")) { return -RIG_EINVAL; } - if (strstr(hoststr, "/")) { return -1; } // probably a path so not a hoststr + if (strstr(hoststr, "/")) { return -RIG_EINVAL; } // probably a path so not a hoststr - if (strncasecmp(hoststr, "com", 3) == 0) { return -1; } + if (strncasecmp(hoststr, "com", 3) == 0) { return -RIG_EINVAL; } // escaped COM port like \\.\COM3 or \.\COM3 - if (strstr(hoststr, "\\.\\")) { return -1; } + if (strstr(hoststr, "\\.\\")) { return -RIG_EINVAL; } // Now let's try and parse a host:port thing // bracketed IPV6 with optional port @@ -2235,7 +2235,7 @@ int HAMLIB_API parse_hoststr(char *hoststr, int hoststr_len, char host[256], rig_debug(RIG_DEBUG_BUG, "%s: Unhandled host=%s\n", __func__, hoststr); - return -1; + return -RIG_EINVAL; } commit 8f343197e0926ca422c3b6aeb66b39b1b43c6a6b Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Thu Aug 28 19:51:51 2025 +0200 Replace a printf() with rig_debug() The bug is that we don't know why the string is invalid. Test case: before tests/rigctl -r "invalid:123:port" -m 2 Unhandled host=invalid:123:port Unhandled host=invalid:123:port after: tests/rigctl -r "invalid:123:port" -m 2 (no output) tests/rigctl -r "invalid:123:port" -m 2 -v parse_hoststr: Unhandled host=invalid:123:port parse_hoststr: Unhandled host=invalid:123:port diff --git a/src/misc.c b/src/misc.c index c87f9b3b0..2156d0b7b 100644 --- a/src/misc.c +++ b/src/misc.c @@ -2233,7 +2233,7 @@ int HAMLIB_API parse_hoststr(char *hoststr, int hoststr_len, char host[256], if (n >= 1 && strlen(dummy) == 0) { return RIG_OK; } - printf("Unhandled host=%s\n", hoststr); + rig_debug(RIG_DEBUG_BUG, "%s: Unhandled host=%s\n", __func__, hoststr); return -1; } ----------------------------------------------------------------------- Summary of changes: src/misc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-09-01 00:20:35
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 43b84ee56a66c19844c5efcb63f1217f57fac4c2 (commit) via 39e155efe71f9f2a84f42b5f64f510135173aa85 (commit) from d227444aa60ad7f35e204607d9506e1fab5b14bd (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 43b84ee56a66c19844c5efcb63f1217f57fac4c2 Merge: d227444aa 39e155efe Author: Nate Bargmann <n0...@n0...> Date: Sun Aug 31 19:07:18 2025 -0500 Merge GitHub PR #1873 commit 39e155efe71f9f2a84f42b5f64f510135173aa85 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Aug 30 09:17:16 2025 +0200 Fix include config.h It should be included, with its path, before any hamlib include and before any #ifdef that uses the symbols that it defines. diff --git a/lib/precise_time.c b/lib/precise_time.c index 7639a7a26..677c516b5 100644 --- a/lib/precise_time.c +++ b/lib/precise_time.c @@ -20,7 +20,7 @@ // along with fldigi. If not, see <http://www.gnu.org/licenses/>. // --------------------------------------------------------------------- -#include "config.h" +#include "hamlib/config.h" #include <errno.h> #include <time.h> #include <sys/time.h> diff --git a/rigs/anytone/anytone.c b/rigs/anytone/anytone.c index 3945d08f6..6615560dc 100644 --- a/rigs/anytone/anytone.c +++ b/rigs/anytone/anytone.c @@ -34,7 +34,7 @@ // HAMLIB INCLUDES // --------------------------------------------------------------------------- -#include "config.h" +#include "hamlib/config.h" #include "hamlib/rig.h" #include "serial.h" #include "misc.h" diff --git a/rigs/barrett/barrett.c b/rigs/barrett/barrett.c index c9d46c6cf..026debcd4 100644 --- a/rigs/barrett/barrett.c +++ b/rigs/barrett/barrett.c @@ -19,7 +19,7 @@ * */ -#include "config.h" +#include "hamlib/config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/rigs/dummy/dummy.c b/rigs/dummy/dummy.c index dc9b5c69a..ac45cac61 100644 --- a/rigs/dummy/dummy.c +++ b/rigs/dummy/dummy.c @@ -20,7 +20,7 @@ * */ -#include "config.h" +#include "hamlib/config.h" // cppcheck-suppress * #include <stdint.h> // cppcheck-suppress * diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index 597856cab..6343fb352 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -20,7 +20,7 @@ * */ -#include "config.h" +#include "hamlib/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 b5551ca14..19df9eef0 100644 --- a/rigs/dummy/netrigctl.c +++ b/rigs/dummy/netrigctl.c @@ -19,7 +19,7 @@ * */ -#include "config.h" +#include "hamlib/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 2fa52ec8d..9c9893d57 100644 --- a/rigs/dummy/quisk.c +++ b/rigs/dummy/quisk.c @@ -19,7 +19,7 @@ * */ -#include "config.h" +#include "hamlib/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 286b1c71a..51dbdbd49 100644 --- a/rigs/dummy/tci1x.c +++ b/rigs/dummy/tci1x.c @@ -19,7 +19,7 @@ * */ -#include "config.h" +#include "hamlib/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 3c9dfe649..aa21ee3d3 100644 --- a/rigs/dummy/trxmanager.c +++ b/rigs/dummy/trxmanager.c @@ -20,7 +20,7 @@ * */ -#include "config.h" +#include "hamlib/config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> /* String function definitions */ diff --git a/rigs/kit/usrp_impl.cc b/rigs/kit/usrp_impl.cc index 7c1cc9e2a..23e9de3bc 100644 --- a/rigs/kit/usrp_impl.cc +++ b/rigs/kit/usrp_impl.cc @@ -19,7 +19,7 @@ * */ -#include <hamlib/config.h> +#include "hamlib/config.h" /* * Compile only this model if usrp is available diff --git a/rigs/winradio/g313-posix.c b/rigs/winradio/g313-posix.c index fd64ea595..1c0a04027 100644 --- a/rigs/winradio/g313-posix.c +++ b/rigs/winradio/g313-posix.c @@ -23,7 +23,7 @@ #include <string.h> #include <unistd.h> -#include "config.h" +#include "hamlib/config.h" #ifdef HAVE_DLFCN_H # include <dlfcn.h> diff --git a/rigs/winradio/linradio/wrg313api.c b/rigs/winradio/linradio/wrg313api.c index 3c6503c63..4191dfaa7 100644 --- a/rigs/winradio/linradio/wrg313api.c +++ b/rigs/winradio/linradio/wrg313api.c @@ -2,7 +2,7 @@ #include <stdio.h> -#include "config.h" +#include "hamlib/config.h" #ifdef HAVE_DLFCN_H # include <dlfcn.h> diff --git a/rotators/androidsensor/androidsensor.cpp b/rotators/androidsensor/androidsensor.cpp index d970647be..6aa0ea5fc 100644 --- a/rotators/androidsensor/androidsensor.cpp +++ b/rotators/androidsensor/androidsensor.cpp @@ -21,7 +21,7 @@ * */ -#include <hamlib/config.h> +#include "hamlib/config.h" #include <stdio.h> #include <stdlib.h> diff --git a/rotators/grbltrk/grbltrk.c b/rotators/grbltrk/grbltrk.c index 50989e582..f087ca17e 100644 --- a/rotators/grbltrk/grbltrk.c +++ b/rotators/grbltrk/grbltrk.c @@ -20,7 +20,7 @@ */ #ifdef HAVE_CONFIG_H -#include "config.h" +#include "hamlib/config.h" #endif #include <stdint.h> diff --git a/security/AESStringCrypt.c b/security/AESStringCrypt.c index 819eb4817..a19a072d5 100644 --- a/security/AESStringCrypt.c +++ b/security/AESStringCrypt.c @@ -28,7 +28,7 @@ * BUT NOT LIMITED TO, LOSS OF DATA OR DATA BEING RENDERED INACCURATE. */ -#include "config.h" +#include "hamlib/config.h" #include <stdio.h> #include <string.h> diff --git a/src/fifo.c b/src/fifo.c index cd112a9d7..ba090ee61 100644 --- a/src/fifo.c +++ b/src/fifo.c @@ -1,8 +1,10 @@ -#include "hamlib/rig.h" +#include "hamlib/config.h" + #include <stdio.h> #include <ctype.h> + +#include "hamlib/rig.h" #include "fifo.h" -#include "config.h" void initFIFO(FIFO_RIG *fifo) { diff --git a/src/parallel.h b/src/parallel.h index 9eae56b55..fa5dff024 100644 --- a/src/parallel.h +++ b/src/parallel.h @@ -23,7 +23,7 @@ #ifndef _PARALLEL_H #define _PARALLEL_H 1 -#include "config.h" +#include "hamlib/config.h" #include "hamlib/rig.h" #ifdef HAVE_PARALLEL diff --git a/tests/rigtestlibusb.c b/tests/rigtestlibusb.c index 45d82906e..119625152 100644 --- a/tests/rigtestlibusb.c +++ b/tests/rigtestlibusb.c @@ -25,7 +25,7 @@ #include <stdint.h> #include <stdio.h> #include <string.h> -#include "config.h" +#include <hamlib/config.h> #if defined(HAVE_LIBUSB_H) #include <libusb.h> #elif defined(HAVE_LIBUSB_1_0_LIBUSB_H) diff --git a/tests/rigtestmcastrx.c b/tests/rigtestmcastrx.c index 1be2b7fe3..a7100d005 100644 --- a/tests/rigtestmcastrx.c +++ b/tests/rigtestmcastrx.c @@ -1,4 +1,4 @@ -#include "config.h" +#include <hamlib/config.h> #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/tests/testnet.c b/tests/testnet.c index 84411446a..67d939c62 100644 --- a/tests/testnet.c +++ b/tests/testnet.c @@ -9,7 +9,7 @@ #include <sys/types.h> #include <signal.h> -#include "config.h" +#include <hamlib/config.h> #ifdef HAVE_NETINET_IN_H # include <netinet/in.h> ----------------------------------------------------------------------- Summary of changes: lib/precise_time.c | 2 +- rigs/anytone/anytone.c | 2 +- rigs/barrett/barrett.c | 2 +- rigs/dummy/dummy.c | 2 +- rigs/dummy/flrig.c | 2 +- rigs/dummy/netrigctl.c | 2 +- rigs/dummy/quisk.c | 2 +- rigs/dummy/tci1x.c | 2 +- rigs/dummy/trxmanager.c | 2 +- rigs/kit/usrp_impl.cc | 2 +- rigs/winradio/g313-posix.c | 2 +- rigs/winradio/linradio/wrg313api.c | 2 +- rotators/androidsensor/androidsensor.cpp | 2 +- rotators/grbltrk/grbltrk.c | 2 +- security/AESStringCrypt.c | 2 +- src/fifo.c | 6 ++++-- src/parallel.h | 2 +- tests/rigtestlibusb.c | 2 +- tests/rigtestmcastrx.c | 2 +- tests/testnet.c | 2 +- 20 files changed, 23 insertions(+), 21 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-09-01 00:04:58
|
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 d227444aa60ad7f35e204607d9506e1fab5b14bd (commit) via 47f60d4ad7e98fe9c4d2dfe46cd531f8ebf64fe3 (commit) via 83ed5abeb44e21c1e13a7a57e0f02eb8a1dece6e (commit) from 0a06af1ddef5e56593276e9c4bd069741a487f80 (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 d227444aa60ad7f35e204607d9506e1fab5b14bd Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Thu Aug 28 20:19:28 2025 +0200 Fix return values of amp_load_backend() and rot_load_backend() The value -EINVAL is in the domain of errno. diff --git a/src/amp_reg.c b/src/amp_reg.c index 2738a2e5b..68a1c7dc4 100644 --- a/src/amp_reg.c +++ b/src/amp_reg.c @@ -388,7 +388,7 @@ int HAMLIB_API amp_load_backend(const char *be_name) if (be_init == NULL) { printf("Null\n"); - return -EINVAL; + return -RIG_EINVAL; } status = (*be_init)(NULL); @@ -396,7 +396,7 @@ int HAMLIB_API amp_load_backend(const char *be_name) } } - return -EINVAL; + return -RIG_EINVAL; } //! @endcond diff --git a/src/rot_reg.c b/src/rot_reg.c index 66b017ee1..3c1066602 100644 --- a/src/rot_reg.c +++ b/src/rot_reg.c @@ -445,7 +445,7 @@ int HAMLIB_API rot_load_backend(const char *be_name) if (be_init == NULL) { printf("Null\n"); - return -EINVAL; + return -RIG_EINVAL; } status = (*be_init)(NULL); @@ -453,7 +453,7 @@ int HAMLIB_API rot_load_backend(const char *be_name) } } - return -EINVAL; + return -RIG_EINVAL; } //! @endcond commit 47f60d4ad7e98fe9c4d2dfe46cd531f8ebf64fe3 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Aug 30 09:29:48 2025 +0200 [simulators] Remove unused includes Found by iwyu. diff --git a/simulators/sim.h b/simulators/sim.h index 206f45686..10aa5403f 100644 --- a/simulators/sim.h +++ b/simulators/sim.h @@ -1,6 +1,7 @@ #include <errno.h> #include <fcntl.h> #include <stdlib.h> +#include <unistd.h> #include "../src/misc.h" diff --git a/simulators/simeasycomm.c b/simulators/simeasycomm.c index da5647650..cf99a6f80 100644 --- a/simulators/simeasycomm.c +++ b/simulators/simeasycomm.c @@ -6,7 +6,6 @@ #include <unistd.h> #include <pthread.h> -#include "hamlib/rig.h" #include "misc.h" #define BUFSIZE 256 diff --git a/simulators/simelecraft.c b/simulators/simelecraft.c index acc931d09..fced9bbac 100644 --- a/simulators/simelecraft.c +++ b/simulators/simelecraft.c @@ -4,7 +4,6 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <unistd.h> #include "hamlib/rig.h" #include "sim.h" diff --git a/simulators/simelecraftk4.c b/simulators/simelecraftk4.c index edd31061b..43d28aab0 100644 --- a/simulators/simelecraftk4.c +++ b/simulators/simelecraftk4.c @@ -3,7 +3,6 @@ // since we are POSIX here we need this #include <stdio.h> #include <string.h> -#include <unistd.h> #include "hamlib/rig.h" #include "sim.h" diff --git a/simulators/simft1000.c b/simulators/simft1000.c index 30e2429e3..5eb2aa1ec 100644 --- a/simulators/simft1000.c +++ b/simulators/simft1000.c @@ -2,8 +2,6 @@ #define _XOPEN_SOURCE 700 // since we are POSIX here we need this #include <stdio.h> -#include <string.h> -#include <unistd.h> #include "sim.h" diff --git a/simulators/simft736.c b/simulators/simft736.c index c10614dfc..c416d0c17 100644 --- a/simulators/simft736.c +++ b/simulators/simft736.c @@ -2,8 +2,6 @@ #define _XOPEN_SOURCE 700 // since we are POSIX here we need this #include <stdio.h> -#include <string.h> -#include <unistd.h> #include "sim.h" diff --git a/simulators/simft747gx.c b/simulators/simft747gx.c index 5fca30362..1c57c6302 100644 --- a/simulators/simft747gx.c +++ b/simulators/simft747gx.c @@ -2,9 +2,6 @@ #define _XOPEN_SOURCE 700 // since we are POSIX here we need this #include <stdio.h> -#include <stdlib.h> -#include <fcntl.h> -#include <string.h> #include <unistd.h> #include "sim.h" diff --git a/simulators/simft817.c b/simulators/simft817.c index cd9ebeaa2..ad7d1a23c 100644 --- a/simulators/simft817.c +++ b/simulators/simft817.c @@ -2,7 +2,6 @@ #define _XOPEN_SOURCE 700 // since we are POSIX here we need this #include <stdio.h> -#include <string.h> #include <unistd.h> #include "sim.h" diff --git a/simulators/simft847.c b/simulators/simft847.c index a8800012a..3ce5a1264 100644 --- a/simulators/simft847.c +++ b/simulators/simft847.c @@ -2,7 +2,6 @@ #define _XOPEN_SOURCE 700 // since we are POSIX here we need this #include <stdio.h> -#include <string.h> #include <unistd.h> //#include "hamlib/rig.h" diff --git a/simulators/simft897.c b/simulators/simft897.c index fdf855bfd..fa3f3c5e0 100644 --- a/simulators/simft897.c +++ b/simulators/simft897.c @@ -2,11 +2,7 @@ #define _XOPEN_SOURCE 700 // since we are POSIX here we need this #include <stdio.h> -#include <stdlib.h> -#include <fcntl.h> -#include <string.h> #include <unistd.h> -#include "hamlib/rig.h" #include "sim.h" diff --git a/simulators/simjupiter.c b/simulators/simjupiter.c index 9c96078d0..e9c3bd36d 100644 --- a/simulators/simjupiter.c +++ b/simulators/simjupiter.c @@ -2,8 +2,6 @@ #define _XOPEN_SOURCE 700 // since we are POSIX here we need this #include <stdio.h> -#include <string.h> -#include <unistd.h> #include "sim.h" diff --git a/simulators/simrotorez.c b/simulators/simrotorez.c index 7b4ba21d5..c97548f38 100644 --- a/simulators/simrotorez.c +++ b/simulators/simrotorez.c @@ -6,7 +6,6 @@ #include <unistd.h> #include <pthread.h> -#include "hamlib/rig.h" #include "misc.h" #define BUFSIZE 256 diff --git a/simulators/simspid.c b/simulators/simspid.c index 9c96078d0..e9c3bd36d 100644 --- a/simulators/simspid.c +++ b/simulators/simspid.c @@ -2,8 +2,6 @@ #define _XOPEN_SOURCE 700 // since we are POSIX here we need this #include <stdio.h> -#include <string.h> -#include <unistd.h> #include "sim.h" diff --git a/simulators/simtrusdx.c b/simulators/simtrusdx.c index 58241c19a..6527f22f4 100644 --- a/simulators/simtrusdx.c +++ b/simulators/simtrusdx.c @@ -3,7 +3,6 @@ // since we are POSIX here we need this #include <stdio.h> #include <string.h> -#include <unistd.h> #include <sys/types.h> #include "hamlib/rig.h" diff --git a/simulators/simts450.c b/simulators/simts450.c index be89a2398..6cccc236a 100644 --- a/simulators/simts450.c +++ b/simulators/simts450.c @@ -3,7 +3,6 @@ // since we are POSIX here we need this #include <stdio.h> #include <string.h> -#include <unistd.h> #include <sys/types.h> #include "hamlib/rig.h" diff --git a/simulators/simts890.c b/simulators/simts890.c index 32ea9e188..dc6f0638a 100644 --- a/simulators/simts890.c +++ b/simulators/simts890.c @@ -34,7 +34,6 @@ #include <ctype.h> #include <time.h> -#include "config.h" //#include "hamlib/rig.h" /* Definitions */ commit 83ed5abeb44e21c1e13a7a57e0f02eb8a1dece6e Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Fri Aug 29 23:38:34 2025 +0200 [src] Remove unused includes Found by iwyu. diff --git a/src/amp_conf.c b/src/amp_conf.c index 481786b3f..6d47da6ea 100644 --- a/src/amp_conf.c +++ b/src/amp_conf.c @@ -37,7 +37,6 @@ #include <string.h> /* String function definitions */ #include "hamlib/amplifier.h" -#include "hamlib/port.h" #include "hamlib/amp_state.h" #include "amp_conf.h" diff --git a/src/amp_reg.c b/src/amp_reg.c index c42b3a7d1..2738a2e5b 100644 --- a/src/amp_reg.c +++ b/src/amp_reg.c @@ -29,7 +29,6 @@ #include "hamlib/config.h" -#include <errno.h> #include <stdlib.h> #include <string.h> #include <stdio.h> diff --git a/src/amplifier.c b/src/amplifier.c index e6dceb5a5..8a278f190 100644 --- a/src/amplifier.c +++ b/src/amplifier.c @@ -58,13 +58,11 @@ #include <fcntl.h> #include "hamlib/amplifier.h" -#include "hamlib/port.h" #include "hamlib/amp_state.h" #include "serial.h" #include "parallel.h" #include "usb_port.h" #include "network.h" -#include "token.h" //! @cond Doxygen_Suppress #define CHECK_AMP_ARG(r) (!(r) || !(r)->caps || !AMPSTATE(r)->comm_state) diff --git a/src/cm108.c b/src/cm108.c index 2b0a0b4d3..1bfbd7e7d 100644 --- a/src/cm108.c +++ b/src/cm108.c @@ -45,10 +45,6 @@ # include <sys/ioctl.h> #endif -#ifdef HAVE_SYS_PARAM_H -# include <sys/param.h> -#endif - #ifdef HAVE_WINDOWS_H # include <windows.h> # include "par_nt.h" @@ -68,8 +64,6 @@ #include "cm108.h" -#include <stdio.h> - const char *get_usb_device_class_string(int device_class) { switch (device_class) diff --git a/src/cm108.h b/src/cm108.h index b388f1639..806b25e7e 100644 --- a/src/cm108.h +++ b/src/cm108.h @@ -24,7 +24,6 @@ #define _CM108_H 1 #include "hamlib/rig.h" -#include "iofunc.h" __BEGIN_DECLS diff --git a/src/conf.c b/src/conf.c index ef845dcde..fba988229 100644 --- a/src/conf.c +++ b/src/conf.c @@ -38,7 +38,6 @@ #include <strings.h> #include "hamlib/rig.h" -#include "hamlib/port.h" #include "hamlib/rig_state.h" #include "token.h" diff --git a/src/extamp.c b/src/extamp.c index 1510d140b..744a9e595 100644 --- a/src/extamp.c +++ b/src/extamp.c @@ -47,9 +47,6 @@ #include "hamlib/amplifier.h" -#include "token.h" - - /** * \brief Executes \a cfunc on all the elements stored in the amp_caps::extlevels * extension levels table. diff --git a/src/gpio.c b/src/gpio.c index 5a192c5a8..3f9ed0c20 100644 --- a/src/gpio.c +++ b/src/gpio.c @@ -22,11 +22,9 @@ #include <string.h> #include <errno.h> #include <unistd.h> -#include <sys/stat.h> #include <fcntl.h> #include "gpio.h" -#include "hamlib/port.h" int gpio_open(hamlib_port_t *port, int output, int on_value) diff --git a/src/iofunc.c b/src/iofunc.c index 99e75414f..c01be13f2 100644 --- a/src/iofunc.c +++ b/src/iofunc.c @@ -41,7 +41,6 @@ #include <sys/time.h> #include <sys/types.h> -#include "hamlib/port.h" #include "iofunc.h" #include "misc.h" diff --git a/src/mem.c b/src/mem.c index 3b69415a2..c3bb4f65a 100644 --- a/src/mem.c +++ b/src/mem.c @@ -37,7 +37,6 @@ #include <stdlib.h> #include <string.h> #include <stdio.h> -#include <sys/stat.h> #include "hamlib/rig.h" #include "hamlib/rig_state.h" diff --git a/src/network.c b/src/network.c index 848a45eae..31e3760bf 100644 --- a/src/network.c +++ b/src/network.c @@ -74,7 +74,6 @@ #endif #include "hamlib/rig.h" -#include "hamlib/port.h" #include "hamlib/rig_state.h" #include "network.h" #include "misc.h" diff --git a/src/parallel.c b/src/parallel.c index e750bb136..de6c8d606 100644 --- a/src/parallel.c +++ b/src/parallel.c @@ -40,10 +40,6 @@ # include <sys/ioctl.h> #endif -#ifdef HAVE_SYS_PARAM_H -# include <sys/param.h> -#endif - #ifdef HAVE_WINDOWS_H # include <windows.h> # include "par_nt.h" @@ -57,7 +53,6 @@ # include <winbase.h> #endif -#include "hamlib/port.h" #include "parallel.h" #ifdef HAVE_LINUX_PPDEV_H diff --git a/src/register.c b/src/register.c index fd6419e57..17b94eb32 100644 --- a/src/register.c +++ b/src/register.c @@ -35,7 +35,6 @@ #include "register.h" #include "hamlib/rig.h" -#include "misc.h" //! @cond Doxygen_Suppress #ifndef PATH_MAX diff --git a/src/register.h b/src/register.h index 148f16945..472598b27 100644 --- a/src/register.h +++ b/src/register.h @@ -23,8 +23,6 @@ #include "hamlib/rig.h" -#include "hamlib/rotator.h" -#include "hamlib/amplifier.h" #include "hamlib/config.h" #ifdef __cplusplus diff --git a/src/rig.c b/src/rig.c index 4807011db..977919e82 100644 --- a/src/rig.c +++ b/src/rig.c @@ -52,7 +52,6 @@ #include "hamlib/config.h" #include "hamlib/rig.h" -#include "hamlib/port.h" #include "hamlib/rig_state.h" #include "fifo.h" diff --git a/src/rot_conf.c b/src/rot_conf.c index 5f204aed7..22c315e05 100644 --- a/src/rot_conf.c +++ b/src/rot_conf.c @@ -38,7 +38,6 @@ #include <string.h> /* String function definitions */ #include "hamlib/rotator.h" -#include "hamlib/port.h" #include "hamlib/rot_state.h" #include "rot_conf.h" diff --git a/src/rot_reg.c b/src/rot_reg.c index 89350a9db..66b017ee1 100644 --- a/src/rot_reg.c +++ b/src/rot_reg.c @@ -29,7 +29,6 @@ #include "hamlib/config.h" -#include <errno.h> #include <stdlib.h> #include <string.h> #include <stdio.h> diff --git a/src/rot_settings.c b/src/rot_settings.c index d406b220e..2a8d55434 100644 --- a/src/rot_settings.c +++ b/src/rot_settings.c @@ -38,7 +38,6 @@ #include "hamlib/config.h" #include <stdio.h> -#include <sys/stat.h> #include "hamlib/rig.h" #include "hamlib/rotator.h" diff --git a/src/rotator.c b/src/rotator.c index 4ce7b5326..5d71cd236 100644 --- a/src/rotator.c +++ b/src/rotator.c @@ -53,11 +53,9 @@ #include <string.h> #include <unistd.h> #include <stdio.h> -#include <sys/stat.h> #include <fcntl.h> #include "hamlib/rotator.h" -#include "hamlib/port.h" #include "hamlib/rot_state.h" #include "serial.h" #include "parallel.h" @@ -65,9 +63,6 @@ #include "usb_port.h" #endif #include "network.h" -#include "rot_conf.h" -#include "token.h" -#include "iofunc.h" #ifndef DOC_HIDDEN diff --git a/src/serial.c b/src/serial.c index ba82aeaff..3dfce1ec1 100644 --- a/src/serial.c +++ b/src/serial.c @@ -46,10 +46,6 @@ # include <sys/ioctl.h> #endif -#ifdef HAVE_SYS_PARAM_H -# include <sys/param.h> -#endif - #ifdef HAVE_TERMIOS_H # include <termios.h> /* POSIX terminal control definitions */ #else @@ -63,7 +59,6 @@ #endif #include "hamlib/rig.h" -#include "hamlib/port.h" //! @cond Doxygen_Suppress #if defined(WIN32) && !defined(HAVE_TERMIOS_H) diff --git a/src/settings.c b/src/settings.c index 500708c83..5b8b49123 100644 --- a/src/settings.c +++ b/src/settings.c @@ -999,7 +999,6 @@ int HAMLIB_API rig_setting2idx(setting_t s) return 0; } -#include <unistd.h> /* UNIX standard function definitions */ #if 0 #include "hamlib/config.h" diff --git a/src/snapshot_data.c b/src/snapshot_data.c index 8664deb0e..bc5c4e80b 100644 --- a/src/snapshot_data.c +++ b/src/snapshot_data.c @@ -2,7 +2,6 @@ #include <unistd.h> #include "hamlib/config.h" #include "hamlib/rig.h" -#include "hamlib/port.h" #include "hamlib/rig_state.h" #include "misc.h" #include "cache.h" diff --git a/src/sprintflst.c b/src/sprintflst.c index 8d7e51475..25634eb0a 100644 --- a/src/sprintflst.c +++ b/src/sprintflst.c @@ -22,7 +22,6 @@ #include "hamlib/config.h" -#include <stdlib.h> #include <stdio.h> /* Standard input/output definitions */ #include <string.h> /* String function definitions */ diff --git a/src/usb_port.c b/src/usb_port.c index 80c9bc9f9..09fa3d9c5 100644 --- a/src/usb_port.c +++ b/src/usb_port.c @@ -39,7 +39,6 @@ #include <strings.h> #include "hamlib/rig.h" -#include "hamlib/port.h" #ifdef HAVE_LIBUSB_H # include <libusb.h> diff --git a/src/usb_port.h b/src/usb_port.h index a980db5ec..6e8f1b83c 100644 --- a/src/usb_port.h +++ b/src/usb_port.h @@ -23,7 +23,6 @@ #define _USB_PORT_H 1 #include "hamlib/rig.h" -#include "iofunc.h" __BEGIN_DECLS ----------------------------------------------------------------------- Summary of changes: simulators/sim.h | 1 + simulators/simeasycomm.c | 1 - simulators/simelecraft.c | 1 - simulators/simelecraftk4.c | 1 - simulators/simft1000.c | 2 -- simulators/simft736.c | 2 -- simulators/simft747gx.c | 3 --- simulators/simft817.c | 1 - simulators/simft847.c | 1 - simulators/simft897.c | 4 ---- simulators/simjupiter.c | 2 -- simulators/simrotorez.c | 1 - simulators/simspid.c | 2 -- simulators/simtrusdx.c | 1 - simulators/simts450.c | 1 - simulators/simts890.c | 1 - src/amp_conf.c | 1 - src/amp_reg.c | 5 ++--- src/amplifier.c | 2 -- src/cm108.c | 6 ------ src/cm108.h | 1 - src/conf.c | 1 - src/extamp.c | 3 --- src/gpio.c | 2 -- src/iofunc.c | 1 - src/mem.c | 1 - src/network.c | 1 - src/parallel.c | 5 ----- src/register.c | 1 - src/register.h | 2 -- src/rig.c | 1 - src/rot_conf.c | 1 - src/rot_reg.c | 5 ++--- src/rot_settings.c | 1 - src/rotator.c | 5 ----- src/serial.c | 5 ----- src/settings.c | 1 - src/snapshot_data.c | 1 - src/sprintflst.c | 1 - src/usb_port.c | 1 - src/usb_port.h | 1 - 41 files changed, 5 insertions(+), 75 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-08-24 22:24:54
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 0a06af1ddef5e56593276e9c4bd069741a487f80 (commit) via 06a2a25cb71b50b0ddac6ce0770846373455e6df (commit) from 233282671325283b64518bae98282c62fde618db (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 0a06af1ddef5e56593276e9c4bd069741a487f80 Merge: 233282671 06a2a25cb Author: Nate Bargmann <n0...@n0...> Date: Sun Aug 24 17:22:57 2025 -0500 Merge GitHub PR #1867 commit 06a2a25cb71b50b0ddac6ce0770846373455e6df Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Aug 24 18:52:06 2025 +0200 Remove misleading duplicated error message The correct error message has been printed by getopt_long() before returning. Test cases: $ rigmem -Q rigmem: invalid option -- 'Q' Unknown option '?' Usage: rigmem [OPTION]... COMMAND... FILE ... $ rigmem --foo rigmem: unrecognized option '--foo' Unknown option '?' Usage: rigmem [OPTION]... COMMAND... FILE ... diff --git a/tests/rigmem.c b/tests/rigmem.c index 4314e1c2a..15154db0a 100644 --- a/tests/rigmem.c +++ b/tests/rigmem.c @@ -187,7 +187,6 @@ int main(int argc, char *argv[]) break; default: - fprintf(stderr, "Unknown option '%c'\n", c); usage(); /* unknown option? */ exit(1); } ----------------------------------------------------------------------- Summary of changes: tests/rigmem.c | 1 - 1 file changed, 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-08-24 22:15:34
|
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 233282671325283b64518bae98282c62fde618db (commit) via feef144bb85d4d2a737d1c351c5ffc2adffa35a9 (commit) via 7fdbc999110ef1fa983d202d21c61f939742dfbc (commit) via 5acd75fecc111458f5816b560099c626cc568274 (commit) via 05a9034d2e94df1c901377927b2dfa52f5454ac3 (commit) via f4d4d855b928c11b03552acabd3f60e798f0d98f (commit) via 6a700023abdec3c7ae021d7dc981b0cd5d5dbd29 (commit) from 4340198076ea9f0e65e34356fef3a82d8c3583e9 (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 233282671325283b64518bae98282c62fde618db Merge: 434019807 feef144bb Author: Nate Bargmann <n0...@n0...> Date: Sun Aug 24 16:26:05 2025 -0500 Merge GitHub PR #1866 commit feef144bb85d4d2a737d1c351c5ffc2adffa35a9 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Aug 23 21:31:23 2025 +0200 Propagate the actual error code from grbl_request() Instead of overridng first with -RIG_EPROTO then with -RIG_EIO. diff --git a/rotators/grbltrk/grbltrk.c b/rotators/grbltrk/grbltrk.c index 48232e813..50989e582 100644 --- a/rotators/grbltrk/grbltrk.c +++ b/rotators/grbltrk/grbltrk.c @@ -155,7 +155,7 @@ grbl_request(ROT *rot, char *request, uint32_t req_size, char *response, if (fail_count >= 10) { rot_debug(RIG_DEBUG_ERR, "%s too much xfer fail! exit\n", __func__); - return -RIG_EPROTO; + return retval; } rig_flush(rotp); @@ -198,7 +198,7 @@ grbl_init(ROT *rot) if (retval != RIG_OK) { rot_debug(RIG_DEBUG_ERR, "grbl_request [%s] fail\n", grbl_init_list[i]); - return -RIG_EIO; + return retval; } } commit 7fdbc999110ef1fa983d202d21c61f939742dfbc Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Aug 23 20:38:56 2025 +0200 Return the error code from grbl_init() diff --git a/rotators/grbltrk/grbltrk.c b/rotators/grbltrk/grbltrk.c index 67e8e262e..48232e813 100644 --- a/rotators/grbltrk/grbltrk.c +++ b/rotators/grbltrk/grbltrk.c @@ -448,11 +448,11 @@ grbltrk_rot_set_conf(ROT *rot, hamlib_token_t token, const char *val) static int grbltrk_rot_open(ROT *rot) { - int r = RIG_OK; + int r; rot_debug(RIG_DEBUG_TRACE, "%s:%d\n", __func__, __LINE__); - grbl_init(rot); + r = grbl_init(rot); return r; } commit 5acd75fecc111458f5816b560099c626cc568274 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Aug 23 20:35:11 2025 +0200 Remove code that only prints debug messages and add new debug messages diff --git a/rotators/grbltrk/grbltrk.c b/rotators/grbltrk/grbltrk.c index 4f585aa53..67e8e262e 100644 --- a/rotators/grbltrk/grbltrk.c +++ b/rotators/grbltrk/grbltrk.c @@ -174,6 +174,8 @@ grbl_init(ROT *rot) char rsp[RSIZE]; uint32_t resp_size; + rot_debug(RIG_DEBUG_TRACE, "%s:%d\n", __func__, __LINE__); + /* get total config */ grbl_request(rot, grbl_get_config, strlen(grbl_get_config), rsp, &resp_size); @@ -443,67 +445,15 @@ grbltrk_rot_set_conf(ROT *rot, hamlib_token_t token, const char *val) return RIG_OK; } -static int -grbltrk_rot_init(ROT *rot) -{ - int r = RIG_OK; - - rot_debug(RIG_DEBUG_TRACE, "%s:%d rot->caps->rot_model: %d\n", __func__, __LINE__, - rot->caps->rot_model); - - return r; -} - -static int -grbl_net_open(ROT *rot, int port) -{ - //network_open(ROTPORT(rot), port); - - //rot_debug(RIG_DEBUG_TRACE, "%s:%d network_fd: %d\n", __func__, __LINE__, ROTPORT(rot)->fd); - rot_debug(RIG_DEBUG_TRACE, "%s:%d \n", __func__, __LINE__); - - return 0; -} - static int grbltrk_rot_open(ROT *rot) { int r = RIG_OK; - char host[128] = {0}; - //char ip[32]; - //int port; - //rot_debug(RIG_DEBUG_TRACE, "%s:%d rot->caps->rot_model: %d\n", __func__, __LINE__, rot->caps->rot_model); - if (rot->caps->rot_model == ROT_MODEL_GRBLTRK_SER) - { - rot_debug(RIG_DEBUG_TRACE, "%s:%d ctrl via serial\n", __func__, __LINE__); - } - else if (rot->caps->rot_model == ROT_MODEL_GRBLTRK_NET) - { - rot_get_conf2(rot, TOK_PATHNAME, host, sizeof(host)); - rot_debug(RIG_DEBUG_TRACE, "%s:%d ctrl via net, host [%s]\n", __func__, __LINE__, - host); - grbl_net_open(rot, 23); - -#if 0 - - if (sscanf(host, "%[^:]:%d", ip, &port) == 2) - { - grbl_net_open(rot, ip, port); - } - else - { - grbl_net_open(rot, NULL, 0); /* use default ip & port */ - } - -#endif - - } + rot_debug(RIG_DEBUG_TRACE, "%s:%d\n", __func__, __LINE__); grbl_init(rot); - //rot_debug(RIG_DEBUG_TRACE, "%s:%d\n", __func__, __LINE__); - return r; } @@ -518,11 +468,7 @@ grbltrk_rot_close(ROT *rot) { int r = RIG_OK; - if (rot->caps->rot_model == ROT_MODEL_GRBLTRK_SER) - { - rot_debug(RIG_DEBUG_TRACE, "%s:%d\n", __func__, __LINE__); - } - else if (rot->caps->rot_model == ROT_MODEL_GRBLTRK_NET) + if (rot->caps->rot_model == ROT_MODEL_GRBLTRK_NET) { rot_debug(RIG_DEBUG_TRACE, "%s:%d\n", __func__, __LINE__); grbl_net_close(rot); @@ -563,7 +509,6 @@ const struct rot_caps grbltrk_serial_rot_caps = .min_el = 0, .max_el = 90, - .rot_init = grbltrk_rot_init, .rot_open = grbltrk_rot_open, .set_position = grbltrk_rot_set_position, @@ -595,7 +540,6 @@ const struct rot_caps grbltrk_net_rot_caps = .min_el = 0, .max_el = 90, - .rot_init = grbltrk_rot_init, .rot_open = grbltrk_rot_open, .rot_close = grbltrk_rot_close, commit 05a9034d2e94df1c901377927b2dfa52f5454ac3 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Aug 23 20:18:57 2025 +0200 Reduce severity of some debug messages from ERR to TRACE They do not depend on an error situation. diff --git a/rotators/grbltrk/grbltrk.c b/rotators/grbltrk/grbltrk.c index 4ff35c8bd..4f585aa53 100644 --- a/rotators/grbltrk/grbltrk.c +++ b/rotators/grbltrk/grbltrk.c @@ -224,7 +224,7 @@ grbltrk_rot_set_position(ROT *rot, azimuth_t curr_az, elevation_t curr_el) /* az:x: 0 - 360 */ /* el:y: 0 - 90 */ - rot_debug(RIG_DEBUG_ERR, + rot_debug(RIG_DEBUG_TRACE, "%s: (prev_x) = (%.3f); (prev_az) = (%.3f); (prev_el) = (%.3f); (curr_az, curr_el) = (%.3f, %.3f)\n", __func__, prev_x, prev_az, prev_el, curr_az, curr_el); @@ -238,7 +238,7 @@ grbltrk_rot_set_position(ROT *rot, azimuth_t curr_az, elevation_t curr_el) (curr_az > 0 && curr_az < 90)) { - rot_debug(RIG_DEBUG_ERR, "%s:%d\n", __func__, __LINE__); + rot_debug(RIG_DEBUG_TRACE, "%s:%d\n", __func__, __LINE__); if (prev_x >= XDEGREE2MM(270)) { @@ -254,7 +254,7 @@ grbltrk_rot_set_position(ROT *rot, azimuth_t curr_az, elevation_t curr_el) else if ((prev_az > 0 && prev_az < 90) && (curr_az > 270 && curr_az < 360)) { - rot_debug(RIG_DEBUG_ERR, "%s:%d\n", __func__, __LINE__); + rot_debug(RIG_DEBUG_TRACE, "%s:%d\n", __func__, __LINE__); if (prev_x >= XDEGREE2MM(360)) { @@ -269,12 +269,12 @@ grbltrk_rot_set_position(ROT *rot, azimuth_t curr_az, elevation_t curr_el) } else if (curr_az == 0 && curr_el == 0) { - rot_debug(RIG_DEBUG_ERR, "%s: reset\n", __func__); + rot_debug(RIG_DEBUG_TRACE, "%s: reset\n", __func__); curr_x = 0; } else { - rot_debug(RIG_DEBUG_ERR, "%s:%d prev_x: %.3f\n", __func__, __LINE__, prev_x); + rot_debug(RIG_DEBUG_TRACE, "%s:%d prev_x: %.3f\n", __func__, __LINE__, prev_x); x[0] = XDEGREE2MM(curr_az) - XDEGREE2MM(360); x[1] = XDEGREE2MM(curr_az); @@ -303,7 +303,7 @@ grbltrk_rot_set_position(ROT *rot, azimuth_t curr_az, elevation_t curr_el) } curr_x = x[min_index]; - rot_debug(RIG_DEBUG_ERR, "min_index: %d; curr_x: %.3f\n", min_index, curr_x); + rot_debug(RIG_DEBUG_TRACE, "min_index: %d; curr_x: %.3f\n", min_index, curr_x); } y = YDEGREE2MM(curr_el); @@ -341,7 +341,7 @@ grbltrk_rot_get_position(ROT *rot, azimuth_t *az, elevation_t *el) int i; - rot_debug(RIG_DEBUG_ERR, "%s called\n", __func__); + rot_debug(RIG_DEBUG_TRACE, "%s called\n", __func__); //snprintf(req, sizeof(req), "?\r\n"); @@ -371,7 +371,7 @@ grbltrk_rot_get_position(ROT *rot, azimuth_t *az, elevation_t *el) //<Idle|MPos:0.000,0.000,0.000|FS:0,0|Pn:P|WCO:5.000,0.000,0.000> sscanf(rsp, "%[^'|']|MPos:%f,%f,%255s", dummy0, &mpos[0], &mpos[1], dummy1); - //rot_debug(RIG_DEBUG_ERR, "%s: (%.3f, %.3f) (%.3f, %.3f)\n", __func__, mpos[0], mpos[1], wpos[0], wpos[1]); + //rot_debug(RIG_DEBUG_TRACE, "%s: (%.3f, %.3f) (%.3f, %.3f)\n", __func__, mpos[0], mpos[1], wpos[0], wpos[1]); //*az = (azimuth_t) mpos[0] / 0.111; //*el = (elevation_t) mpos[1] / 0.111; @@ -383,9 +383,7 @@ grbltrk_rot_get_position(ROT *rot, azimuth_t *az, elevation_t *el) (*az) = (*az) + 360; } - //rot_debug(RIG_DEBUG_ERR, "%s: (az, el) = (%.3f, %.3f)\n", __func__, *az, *el); - - rot_debug(RIG_DEBUG_ERR, "%s: (az, el) = (%.3f, %.3f)\n", __func__, *az, *el); + rot_debug(RIG_DEBUG_TRACE, "%s: (az, el) = (%.3f, %.3f)\n", __func__, *az, *el); return RIG_OK; @@ -401,7 +399,7 @@ grbltrk_rot_set_conf(ROT *rot, hamlib_token_t token, const char *val) { uint32_t resp_size, len; - rot_debug(RIG_DEBUG_ERR, "token: %ld; value: [%s]\n", token, val); + rot_debug(RIG_DEBUG_TRACE, "token: %ld; value: [%s]\n", token, val); len = strlen(val); @@ -432,7 +430,7 @@ grbltrk_rot_set_conf(ROT *rot, hamlib_token_t token, const char *val) req[i] = '\n'; len = strlen(req); - rot_debug(RIG_DEBUG_ERR, "send gcode [%s]\n", req); + rot_debug(RIG_DEBUG_TRACE, "send gcode [%s]\n", req); retval = grbl_request(rot, req, len, rsp, &resp_size); if (retval < 0) @@ -450,7 +448,7 @@ grbltrk_rot_init(ROT *rot) { int r = RIG_OK; - rot_debug(RIG_DEBUG_ERR, "%s:%d rot->caps->rot_model: %d\n", __func__, __LINE__, + rot_debug(RIG_DEBUG_TRACE, "%s:%d rot->caps->rot_model: %d\n", __func__, __LINE__, rot->caps->rot_model); return r; @@ -461,8 +459,8 @@ grbl_net_open(ROT *rot, int port) { //network_open(ROTPORT(rot), port); - //rot_debug(RIG_DEBUG_ERR, "%s:%d network_fd: %d\n", __func__, __LINE__, ROTPORT(rot)->fd); - rot_debug(RIG_DEBUG_ERR, "%s:%d \n", __func__, __LINE__); + //rot_debug(RIG_DEBUG_TRACE, "%s:%d network_fd: %d\n", __func__, __LINE__, ROTPORT(rot)->fd); + rot_debug(RIG_DEBUG_TRACE, "%s:%d \n", __func__, __LINE__); return 0; } @@ -475,15 +473,15 @@ grbltrk_rot_open(ROT *rot) //char ip[32]; //int port; - //rot_debug(RIG_DEBUG_ERR, "%s:%d rot->caps->rot_model: %d\n", __func__, __LINE__, rot->caps->rot_model); + //rot_debug(RIG_DEBUG_TRACE, "%s:%d rot->caps->rot_model: %d\n", __func__, __LINE__, rot->caps->rot_model); if (rot->caps->rot_model == ROT_MODEL_GRBLTRK_SER) { - rot_debug(RIG_DEBUG_ERR, "%s:%d ctrl via serial\n", __func__, __LINE__); + rot_debug(RIG_DEBUG_TRACE, "%s:%d ctrl via serial\n", __func__, __LINE__); } else if (rot->caps->rot_model == ROT_MODEL_GRBLTRK_NET) { rot_get_conf2(rot, TOK_PATHNAME, host, sizeof(host)); - rot_debug(RIG_DEBUG_ERR, "%s:%d ctrl via net, host [%s]\n", __func__, __LINE__, + rot_debug(RIG_DEBUG_TRACE, "%s:%d ctrl via net, host [%s]\n", __func__, __LINE__, host); grbl_net_open(rot, 23); @@ -504,7 +502,7 @@ grbltrk_rot_open(ROT *rot) grbl_init(rot); - //rot_debug(RIG_DEBUG_ERR, "%s:%d\n", __func__, __LINE__); + //rot_debug(RIG_DEBUG_TRACE, "%s:%d\n", __func__, __LINE__); return r; } @@ -522,15 +520,15 @@ grbltrk_rot_close(ROT *rot) if (rot->caps->rot_model == ROT_MODEL_GRBLTRK_SER) { - rot_debug(RIG_DEBUG_ERR, "%s:%d\n", __func__, __LINE__); + rot_debug(RIG_DEBUG_TRACE, "%s:%d\n", __func__, __LINE__); } else if (rot->caps->rot_model == ROT_MODEL_GRBLTRK_NET) { - rot_debug(RIG_DEBUG_ERR, "%s:%d\n", __func__, __LINE__); + rot_debug(RIG_DEBUG_TRACE, "%s:%d\n", __func__, __LINE__); grbl_net_close(rot); } - rot_debug(RIG_DEBUG_ERR, "%s:%d\n", __func__, __LINE__); + rot_debug(RIG_DEBUG_TRACE, "%s:%d\n", __func__, __LINE__); return r; } @@ -611,9 +609,7 @@ const struct rot_caps grbltrk_net_rot_caps = DECLARE_INITROT_BACKEND(grbltrk) { - rig_debug(RIG_DEBUG_VERBOSE, "%s: _init called\n", __func__); - - //rot_debug(RIG_DEBUG_ERR, "%s: _init called\n", __func__); + rot_debug(RIG_DEBUG_TRACE, "%s: _init called\n", __func__); rot_register(&grbltrk_serial_rot_caps); commit f4d4d855b928c11b03552acabd3f60e798f0d98f Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Aug 23 19:46:55 2025 +0200 Show the error code and the failure count in debug messages diff --git a/rotators/grbltrk/grbltrk.c b/rotators/grbltrk/grbltrk.c index 74e0778c7..4ff35c8bd 100644 --- a/rotators/grbltrk/grbltrk.c +++ b/rotators/grbltrk/grbltrk.c @@ -125,9 +125,9 @@ grbl_request(ROT *rot, char *request, uint32_t req_size, char *response, if ((retval = write_block(rotp, (unsigned char *)request, req_size)) != RIG_OK) { - rot_debug(RIG_DEBUG_ERR, "%s write_block fail!\n", __func__); - //exit(-1); fail_count++; + rot_debug(RIG_DEBUG_ERR, "%s write_block fail! (%d) fail_count %d\n", __func__, retval, fail_count); + //exit(-1); //return -RIG_EIO; } else @@ -142,9 +142,9 @@ grbl_request(ROT *rot, char *request, uint32_t req_size, char *response, if ((retval = read_string(rotp, (unsigned char *)response, 1024, "\n", 1, 0, 1)) < 0) { - rot_debug(RIG_DEBUG_ERR, "%s read_string fail! (%d) \n", __func__, retval); - //exit(-1); fail_count++; + rot_debug(RIG_DEBUG_ERR, "%s read_string fail! (%d) fail_count %d\n", __func__, retval, fail_count); + //exit(-1); //return -RIG_EIO; } else commit 6a700023abdec3c7ae021d7dc981b0cd5d5dbd29 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Aug 23 19:25:26 2025 +0200 Remove duplicated custom debug output It has several issues: * these are trace messages so RIG_DEBUG_ERR is inappropriate * they are in a custom format which doesn't handle end of line chars * write_block() and read_string() print the same information when debug level is set to TRACE diff --git a/rotators/grbltrk/grbltrk.c b/rotators/grbltrk/grbltrk.c index b207f6a64..74e0778c7 100644 --- a/rotators/grbltrk/grbltrk.c +++ b/rotators/grbltrk/grbltrk.c @@ -116,8 +116,6 @@ grbl_request(ROT *rot, char *request, uint32_t req_size, char *response, static int fail_count = 0; hamlib_port_t *rotp = ROTPORT(rot); - rot_debug(RIG_DEBUG_ERR, "req: [%s][%d]\n", request, fail_count); - if (rot->caps->rot_model == ROT_MODEL_GRBLTRK_SER || rot->caps->rot_model == ROT_MODEL_GRBLTRK_NET) { @@ -162,11 +160,7 @@ grbl_request(ROT *rot, char *request, uint32_t req_size, char *response, rig_flush(rotp); - rot_debug(RIG_DEBUG_ERR, "rsp: [%s]\n", response); - //fprintf(stderr, "rsp: [%s]\n", response); - *resp_size = retval; - } return RIG_OK; @@ -194,7 +188,7 @@ grbl_init(ROT *rot) for (i = 0; i < init_count; i++) { int retval; - rot_debug(RIG_DEBUG_ERR, "grbl_request [%s] ", grbl_init_list[i]); + retval = grbl_request(rot, grbl_init_list[i], strlen(grbl_init_list[i]), rsp, &resp_size); ----------------------------------------------------------------------- Summary of changes: rotators/grbltrk/grbltrk.c | 120 ++++++++++----------------------------------- 1 file changed, 27 insertions(+), 93 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-08-24 21:20: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 4340198076ea9f0e65e34356fef3a82d8c3583e9 (commit) via bc8dbca1f3a06de5faa69cd96f7b4e6c5819ac34 (commit) via 5ba906c9aaf532c3d4817ab01ba027f2c9dc58fc (commit) via 844bd8eba8c3efd06e90e3b8157b1295d8bde9a2 (commit) via b5db8e3200cc59651bf2e2e2eee186671b21f564 (commit) via 1194125b3d58170f3bd32a1d1b8e0c47ba614650 (commit) from 17cb45f2f0424bff46dc0ac26d93543a2781136e (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 4340198076ea9f0e65e34356fef3a82d8c3583e9 Merge: 17cb45f2f bc8dbca1f Author: Nate Bargmann <n0...@n0...> Date: Sun Aug 24 15:54:07 2025 -0500 Merge GitHub PR #1865 commit bc8dbca1f3a06de5faa69cd96f7b4e6c5819ac34 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Aug 24 20:18:30 2025 +0200 Remove duplicated rig_type[] lines diff --git a/tests/dumpcaps.c b/tests/dumpcaps.c index 4c5805730..8962ee1b0 100644 --- a/tests/dumpcaps.c +++ b/tests/dumpcaps.c @@ -55,7 +55,6 @@ struct rig_type_s rig_type[] = {RIG_FLAG_APRS, "APRS"}, {RIG_FLAG_TNC, "TNC"}, {RIG_FLAG_DXCLUSTER, "DxCluster"}, - {RIG_FLAG_DXCLUSTER, "DxCluster"}, {RIG_FLAG_TUNER, "Tuner"}, {-1, "?\n"} }; diff --git a/tests/dumpstate.c b/tests/dumpstate.c index ff66ce54a..09798cfc3 100644 --- a/tests/dumpstate.c +++ b/tests/dumpstate.c @@ -54,7 +54,6 @@ static struct rig_type_s rig_type[] = {RIG_FLAG_APRS, "APRS"}, {RIG_FLAG_TNC, "TNC"}, {RIG_FLAG_DXCLUSTER, "DxCluster"}, - {RIG_FLAG_DXCLUSTER, "DxCluster"}, {RIG_FLAG_TUNER, "Tuner"}, {-1, "?\n"} }; commit 5ba906c9aaf532c3d4817ab01ba027f2c9dc58fc Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Wed Aug 20 21:32:10 2025 +0200 Document building testsecurity At some time, the commented out line check_PROGRAMS removed by this commit was identical to the line following it, plus testsecurity appended, then they went out of sync. The commented out line check_PROGRAMS added by this commit appends testsecurity in an explicit way. diff --git a/tests/Makefile.am b/tests/Makefile.am index ed9b45fd7..6a01d8684 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -16,8 +16,9 @@ DISTCLEANFILES = rigctl.log rigctl.sum testbcd.log testbcd.sum bin_PROGRAMS = rigctl rigctld rigmem rigsmtr rigswr rotctl rotctld rigctlcom rigctltcp rigctlsync ampctl ampctld rigtestmcast rigtestmcastrx $(TESTLIBUSB) rigfreqwalk -#check_PROGRAMS = dumpmem testrig testrigopen testrigcaps testtrn testbcd testfreq listrigs testloc rig_bench testcache cachetest cachetest2 testcookie testgrid testsecurity check_PROGRAMS = dumpmem testrig testrigopen testrigcaps testtrn testbcd testfreq listrigs testloc rig_bench testcache cachetest cachetest2 testcookie testgrid hamlibmodels testmW2power test2038 +# Document building testsecurity +### check_PROGRAMS += testsecurity RIGCOMMONSRC = rigctl_parse.c rigctl_parse.h dumpcaps.c dumpstate.c uthash.h rig_tests.c rig_tests.h dumpcaps.h ROTCOMMONSRC = rotctl_parse.c rotctl_parse.h dumpcaps_rot.c uthash.h dumpcaps_rot.h commit 844bd8eba8c3efd06e90e3b8157b1295d8bde9a2 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Aug 17 15:33:34 2025 +0200 Remove unneeded dependencies make knows how to build an executable from a single C source file diff --git a/tests/Makefile.am b/tests/Makefile.am index 9d6aceb0c..ed9b45fd7 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -32,8 +32,6 @@ rotctl_SOURCES = rotctl.c $(ROTCOMMONSRC) rotctld_SOURCES = rotctld.c $(ROTCOMMONSRC) ampctl_SOURCES = ampctl.c $(AMPCOMMONSRC) ampctld_SOURCES = ampctld.c $(AMPCOMMONSRC) -rigswr_SOURCES = rigswr.c -rigsmtr_SOURCES = rigsmtr.c rigmem_SOURCES = rigmem.c memsave.c memload.c memcsv.c if HAVE_LIBUSB rigtestlibusb_SOURCES = rigtestlibusb.c commit b5db8e3200cc59651bf2e2e2eee186671b21f564 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Wed Aug 20 17:41:20 2025 +0200 Add conditionally generated file to .gitignore and CLEANFILES No need to add it *conditionally* to CLEANFILES because for make it isn't an error trying to delete a file that doesn't exist. diff --git a/tests/.gitignore b/tests/.gitignore index c55a7bae7..2e11b9215 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -12,6 +12,7 @@ rigctld rigctlsync rigctltcp rigfreqwalk +rigmatrix rigmem rigsmtr rigswr diff --git a/tests/Makefile.am b/tests/Makefile.am index ab63d9d86..9d6aceb0c 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -166,4 +166,4 @@ test2038.sh: echo 'LD_LIBRARY_PATH=$(top_builddir)/src/.libs:$(top_builddir)/dummy/.libs ./test2038 1' > test2038.sh chmod +x ./test2038.sh -CLEANFILES = testrig.sh testfreq.sh testbcd.sh testloc.sh testrigcaps.sh testcache.sh testcookie.sh rigtestlibusb build-w32.sh build-w64.sh build-w64-jtsdk.sh testgrid.sh testrigcaps.sh test2038.sh tuner_control.log +CLEANFILES = rigmatrix testrig.sh testfreq.sh testbcd.sh testloc.sh testrigcaps.sh testcache.sh testcookie.sh rigtestlibusb build-w32.sh build-w64.sh build-w64-jtsdk.sh testgrid.sh testrigcaps.sh test2038.sh tuner_control.log commit 1194125b3d58170f3bd32a1d1b8e0c47ba614650 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Aug 17 16:06:39 2025 +0200 Remove unused code, apparently copied from rotctl_parse.c and modified diff --git a/tests/ampctl_parse.c b/tests/ampctl_parse.c index e47b6c1ff..375cee160 100644 --- a/tests/ampctl_parse.c +++ b/tests/ampctl_parse.c @@ -2108,313 +2108,3 @@ declare_proto_amp(send_cmd) return retval; } - - -/* 'L' */ -/* -declare_proto_amp(lonlat2loc) -{ - unsigned char loc[MAXARGSZ + 1]; - double lat, lon; - int err, pair; - - CHKSCN1ARG(sscanf(arg1, "%lf", &lon)); - CHKSCN1ARG(sscanf(arg2, "%lf", &lat)); - CHKSCN1ARG(sscanf(arg3, "%d", &pair)); - - pair /= 2; - - err = longlat2locator(lon, lat, (char *)&loc, pair); - - if (err != RIG_OK) - { - return err; - } - - if ((interactive && prompt) || (interactive && !prompt && ext_resp)) - { - fprintf(fout, "%s: ", cmd->arg4); - } - - fprintf(fout, "%s%c", loc, resp_sep); - - return err; -} -*/ - - -/* 'l' */ -/* -declare_proto_amp(loc2lonlat) -{ - unsigned char loc[MAXARGSZ + 1]; - double lat, lon; - int status; - - CHKSCN1ARG(sscanf(arg1, "%s", (char *)&loc)); - - status = locator2longlat(&lon, &lat, (const char *)loc); - - if (status != RIG_OK) - { - return status; - } - - if ((interactive && prompt) || (interactive && !prompt && ext_resp)) - { - fprintf(fout, "%s: ", cmd->arg2); - } - - fprintf(fout, "%f%c", lon, resp_sep); - - if ((interactive && prompt) || (interactive && !prompt && ext_resp)) - { - fprintf(fout, "%s: ", cmd->arg3); - } - - fprintf(fout, "%f%c", lat, resp_sep); - - return status; -} -*/ - - -/* 'D' */ -/* -declare_proto_amp(d_m_s2dec) -{ - int deg, min, sw; - double sec, dec_deg; - - CHKSCN1ARG(sscanf(arg1, "%d", °)); - CHKSCN1ARG(sscanf(arg2, "%d", &min)); - CHKSCN1ARG(sscanf(arg3, "%lf", &sec)); - CHKSCN1ARG(sscanf(arg4, "%d", &sw)); - - dec_deg = dms2dec(deg, min, sec, sw); - - if ((interactive && prompt) || (interactive && !prompt && ext_resp)) - { - fprintf(fout, "%s: ", cmd->arg5); - } - - fprintf(fout, "%lf%c", dec_deg, resp_sep); - - return RIG_OK; -} -*/ - - -/* 'd' */ -/* -declare_proto_amp(dec2d_m_s) -{ - int deg, min, sw, err; - double sec, dec_deg; - - CHKSCN1ARG(sscanf(arg1, "%lf", &dec_deg)); - - err = dec2dms(dec_deg, °, &min, &sec, &sw); - - if (err != RIG_OK) - { - return err; - } - - if ((interactive && prompt) || (interactive && !prompt && ext_resp)) - { - fprintf(fout, "%s: ", cmd->arg2); - } - - fprintf(fout, "%d%c", deg, resp_sep); - - if ((interactive && prompt) || (interactive && !prompt && ext_resp)) - { - fprintf(fout, "%s: ", cmd->arg3); - } - - fprintf(fout, "%d%c", min, resp_sep); - - if ((interactive && prompt) || (interactive && !prompt && ext_resp)) - { - fprintf(fout, "%s: ", cmd->arg4); - } - - fprintf(fout, "%lf%c", sec, resp_sep); - - if ((interactive && prompt) || (interactive && !prompt && ext_resp)) - { - fprintf(fout, "%s: ", cmd->arg5); - } - - fprintf(fout, "%d%c", sw, resp_sep); - - return err; -} -*/ - - -/* 'E' */ -/* -declare_proto_amp(d_mm2dec) -{ - int deg, sw; - double dec_deg, min; - - CHKSCN1ARG(sscanf(arg1, "%d", °)); - CHKSCN1ARG(sscanf(arg2, "%lf", &min)); - CHKSCN1ARG(sscanf(arg3, "%d", &sw)); - - dec_deg = dmmm2dec(deg, min, sw); - - if ((interactive && prompt) || (interactive && !prompt && ext_resp)) - { - fprintf(fout, "%s: ", cmd->arg4); - } - - fprintf(fout, "%lf%c", dec_deg, resp_sep); - - return RIG_OK; -} -*/ - - -/* 'e' */ -/* -declare_proto_amp(dec2d_mm) -{ - int deg, sw, err; - double min, dec_deg; - - CHKSCN1ARG(sscanf(arg1, "%lf", &dec_deg)); - - err = dec2dmmm(dec_deg, °, &min, &sw); - - if (err != RIG_OK) - { - return err; - } - - if ((interactive && prompt) || (interactive && !prompt && ext_resp)) - { - fprintf(fout, "%s: ", cmd->arg2); - } - - fprintf(fout, "%d%c", deg, resp_sep); - - if ((interactive && prompt) || (interactive && !prompt && ext_resp)) - { - fprintf(fout, "%s: ", cmd->arg3); - } - - fprintf(fout, "%lf%c", min, resp_sep); - - if ((interactive && prompt) || (interactive && !prompt && ext_resp)) - { - fprintf(fout, "%s: ", cmd->arg4); - } - - fprintf(fout, "%d%c", sw, resp_sep); - - return err; -} -*/ - - -/* 'B' */ -/* -declare_proto_amp(coord2qrb) -{ - double lon1, lat1, lon2, lat2, dist, az; - int err; - - CHKSCN1ARG(sscanf(arg1, "%lf", &lon1)); - CHKSCN1ARG(sscanf(arg2, "%lf", &lat1)); - CHKSCN1ARG(sscanf(arg3, "%lf", &lon2)); - CHKSCN1ARG(sscanf(arg4, "%lf", &lat2)); - - err = qrb(lon1, lat1, lon2, lat2, &dist, &az); - - if (err != RIG_OK) - { - return err; - } - - if ((interactive && prompt) || (interactive && !prompt && ext_resp)) - { - fprintf(fout, "%s: ", cmd->arg5); - } - - fprintf(fout, "%lf%c", dist, resp_sep); - - if ((interactive && prompt) || (interactive && !prompt && ext_resp)) - { - fprintf(fout, "%s: ", cmd->arg6); - } - - fprintf(fout, "%lf%c", az, resp_sep); - - return err; -} -*/ - - -/* 'A' */ -/* -declare_proto_amp(az_sp2az_lp) -{ - double az_sp, az_lp; - - CHKSCN1ARG(sscanf(arg1, "%lf", &az_sp)); - - az_lp = azimuth_long_path(az_sp); - - if (az_lp < 0) - { - return -RIG_EINVAL; - } - - if ((interactive && prompt) || (interactive && !prompt && ext_resp)) - { - fprintf(fout, "%s: ", cmd->arg2); - } - - fprintf(fout, "%lf%c", az_lp, resp_sep); - - return RIG_OK; -} -*/ - - -/* 'a' */ -/* -declare_proto_amp(dist_sp2dist_lp) -{ - double dist_sp, dist_lp; - - CHKSCN1ARG(sscanf(arg1, "%lf", &dist_sp)); - - dist_lp = distance_long_path(dist_sp); - - if ((interactive && prompt) || (interactive && !prompt && ext_resp)) - { - fprintf(fout, "%s: ", cmd->arg2); - } - - fprintf(fout, "%lf%c", dist_lp, resp_sep); - - return RIG_OK; -} -*/ - - -/* '0x8c'--pause processing */ -/* -declare_proto_amp(pause) -{ - unsigned seconds; - CHKSCN1ARG(sscanf(arg1, "%u", &seconds)); - sleep(seconds); - return RIG_OK; -} -*/ ----------------------------------------------------------------------- Summary of changes: tests/.gitignore | 1 + tests/Makefile.am | 7 +- tests/ampctl_parse.c | 310 --------------------------------------------------- tests/dumpcaps.c | 1 - tests/dumpstate.c | 1 - 5 files changed, 4 insertions(+), 316 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-08-24 20:53: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 17cb45f2f0424bff46dc0ac26d93543a2781136e (commit) via d66a601c8395178bf02955a0f99b42180438701b (commit) via a0792e4f85833f499daf007f7e5fef8302494ec9 (commit) via 43d9b3d35487a5344b3eca6df2398a356f7451a2 (commit) via e81e40ed70062765ad21a6eadfd5cb4753722165 (commit) via 91e5f1441f43f638a0698fe037a4127ea6a11493 (commit) via b300747aa228d42740a76e6d6d3418ae2be7ec51 (commit) via 8febac180a6f98900ccb5d2c2cffd12ba46886f9 (commit) via cb6866ff8650b266f2fa8d4554b5de51d6cdba35 (commit) via e772d6481ef7d016a687ae6f57a26d1087543ae1 (commit) via 3b2df4ecd0ce49311f75612c56de78349ff24e35 (commit) via 7dc8462b20f597184bd942569b50cdad03977f6f (commit) via ee7c0c323503d7dc95bf10744a4fc2e0dfbe4edf (commit) from ad8707c74cea2bea661ffd1a187db36dc269e06c (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 17cb45f2f0424bff46dc0ac26d93543a2781136e Merge: ad8707c74 d66a601c8 Author: Nate Bargmann <n0...@n0...> Date: Sun Aug 24 15:50:44 2025 -0500 Merge GitHub PR #1862 commit d66a601c8395178bf02955a0f99b42180438701b Author: Nate Bargmann <n0...@n0...> Date: Sun Aug 24 21:58:50 2025 +0200 Fix typo in digraph diff --git a/configure.ac b/configure.ac index fb1cf573e..81e045539 100644 --- a/configure.ac +++ b/configure.ac @@ -407,7 +407,7 @@ AC_MSG_CHECKING([whether to use INDI in rotctl/rotctld]) AC_ARG_WITH([indi], [AS_HELP_STRING([--without-indi], - [disable INDI in rotctl/rotctld @<:@default=detect:>@])], + [disable INDI in rotctl/rotctld @<:@default=detect@:>@])], [cf_with_indi_support=$withval], [cf_with_indi_support=detect] ) commit a0792e4f85833f499daf007f7e5fef8302494ec9 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Aug 24 13:41:10 2025 +0200 Excercise the detect logic for INDI on the macOS CI libnova is available in brew, but libindi isn't available; ./configure will detect that and not build the INDI driver. diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 77953f3d9..21c9a58c4 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -68,6 +68,7 @@ jobs: run: | brew install autoconf brew install automake + brew install libnova brew install libtool brew install grep brew install swig @@ -86,7 +87,7 @@ jobs: run: ./configure ${{ matrix.configure_args }} - name: configure on macOS if: runner.os == 'macOS' - run: ./configure ${{ matrix.configure_args }} --without-lua-binding PYTHON=/opt/homebrew/bin/python3 + run: ./configure ${{ matrix.configure_args }} --with-indi=detect --without-lua-binding PYTHON=/opt/homebrew/bin/python3 - name: make run: make -j 4 V=0 --no-print-directory - name: make distcheck @@ -94,4 +95,4 @@ jobs: run: make distcheck V=0 --no-print-directory AM_DISTCHECK_CONFIGURE_FLAGS="${{ matrix.configure_args }} --without-perl-binding" - name: make distcheck on macOS if: runner.os == 'macOS' - run: make distcheck V=0 --no-print-directory AM_DISTCHECK_CONFIGURE_FLAGS="${{ matrix.configure_args }} --without-perl-binding --without-lua-binding --without-tcl-binding PYTHON=/opt/homebrew/bin/python3" + run: make distcheck V=0 --no-print-directory AM_DISTCHECK_CONFIGURE_FLAGS="${{ matrix.configure_args }} --with-indi=detect --without-perl-binding --without-lua-binding --without-tcl-binding PYTHON=/opt/homebrew/bin/python3" commit 43d9b3d35487a5344b3eca6df2398a356f7451a2 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Aug 24 11:09:21 2025 +0200 If --with-indi[=yes] was given, error out if prerequisites aren't met Error out also if libnova or libindi are missing, not just if a C++11 compiler is missing. diff --git a/configure.ac b/configure.ac index 439ea6b95..fb1cf573e 100644 --- a/configure.ac +++ b/configure.ac @@ -414,37 +414,35 @@ AC_ARG_WITH([indi], AC_MSG_RESULT([$cf_with_indi_support]) -case "${cf_with_indi_support}" in - detect) cf_with_indi_support=$cf_with_cxx ;; - yes) - AS_IF([test x"${cf_with_cxx}" != "xyes"], - [AC_MSG_ERROR([INDI support needs a C++ compiler.])] - ) - ;; - no) ;; - *) AC_MSG_ERROR([invalid value for --without-indi: ${cf_with_indi_support}]) ;; -esac - AS_IF([test x"$cf_with_indi_support" != "xno"], [ # macros/ax_lib_nova.m4 AX_LIB_NOVA - AS_IF([test x"$ax_cv_lib_nova" = "xno"], [ - AC_MSG_WARN([libnova support not found, required by INDI.]) - cf_with_indi_support=no - ]) + # macros/ax_lib_indi.m4 + AX_LIB_INDI +]) - AS_IF([test x"$ax_cv_lib_nova" != "xno"], [ - # macros/ax_lib_indi.m4 - AX_LIB_INDI +AS_IF([test x"$cf_with_indi_support" = "xyes"], [ + AS_IF([test x"$cf_with_cxx" = "xno"], + [AC_MSG_ERROR([INDI support needs a C++ compiler.])] + ) - AS_IF([test x"$ax_cv_lib_indi" = "xno"], [ - AC_MSG_WARN([INDI support not found.]) - cf_with_indi_support=no - ]) + AS_IF([test x"$ax_cv_lib_nova" = "xno"], + [AC_MSG_ERROR([libnova support not found, required by INDI.])] + ) - ]) + AS_IF([test x"$ax_cv_lib_indi" = "xno"], + [AC_MSG_ERROR([libindi support not found, required by INDI.])] + ) ]) + +AS_IF([test x"$cf_with_indi_support" = "xdetect"], [ + AS_IF([test x"$cf_with_cxx" = "xno" -o x"$ax_cv_lib_nova" = "xno" -o x"$ax_cv_lib_indi" = "xno"], + [cf_with_indi_support=no], + [cf_with_indi_support=yes] + ) +]) + AS_IF([test x"$cf_with_indi_support" != "xno"], [ROT_BACKEND_LIST="$ROT_BACKEND_LIST rotators/indi"], [ROT_BACKEND_OPTIONAL_LIST="$ROT_BACKEND_OPTIONAL_LIST rotators/indi"] commit e81e40ed70062765ad21a6eadfd5cb4753722165 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Aug 24 09:37:48 2025 +0200 If neither yes or no were given, build C++ binding only if prerequisites are met Options availables are: ./configure # same as --with-cxx-binding=detect ./configure --with-cxx-binding=detect # build if prerequisites are met ./configure --with-cxx-binding=no # do not build ./configure --without-cxx-binding # do not build ./configure --with-cxx-binding=yes # fail if prerequisites aren't met diff --git a/configure.ac b/configure.ac index 647ab65da..439ea6b95 100644 --- a/configure.ac +++ b/configure.ac @@ -555,22 +555,27 @@ BINDING_LIST="" BINDING_LIB_TARGETS="" -dnl Check if cxx-binding not wanted, default is to build it +dnl Check if cxx-binding not wanted, default is to build it if a C++ compiler is available # C++ binding AC_MSG_CHECKING([whether to build C++ binding]) AC_ARG_WITH([cxx-binding], [AS_HELP_STRING([--without-cxx-binding], - [do not build C++ binding @<:@default=yes@:>@])], + [do not build C++ binding @<:@default=detect@:>@])], [cf_with_cxx_binding=$withval], - [cf_with_cxx_binding=yes]) + [cf_with_cxx_binding=detect]) AC_MSG_RESULT([$cf_with_cxx_binding]) -AS_IF([test x"$cf_with_cxx_binding" = "xyes"], [ - AS_IF([test x"${cf_with_cxx}" != "xyes"], [ - AC_MSG_ERROR([C++ binding needs a C++ compiler.]) - ]) -]) +case "${cf_with_cxx_binding}" in + detect) cf_with_cxx_binding=$cf_with_cxx ;; + yes) + AS_IF([test x"${cf_with_cxx}" != "xyes"], + [AC_MSG_ERROR([C++ binding needs a C++ compiler.])] + ) + ;; + no) ;; + *) AC_MSG_ERROR([invalid value for --without-cxx-binding: ${cf_with_cxx_binding}]) ;; +esac AS_IF([test x"${cf_with_cxx_binding}" = "xyes"], [BINDINGS="${BINDINGS} c++"]) commit 91e5f1441f43f638a0698fe037a4127ea6a11493 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Aug 24 09:34:33 2025 +0200 If neither yes or no were given, build INDI only if prerequisites are met Options availables are: ./configure # same as --with-indi=detect ./configure --with-indi=detect # build if prerequisites are met ./configure --with-indi=no # do not build ./configure --without-indi # do not build ./configure --with-indi=yes # fail if prerequisites aren't met diff --git a/configure.ac b/configure.ac index 1a2635c6c..647ab65da 100644 --- a/configure.ac +++ b/configure.ac @@ -407,18 +407,23 @@ AC_MSG_CHECKING([whether to use INDI in rotctl/rotctld]) AC_ARG_WITH([indi], [AS_HELP_STRING([--without-indi], - [disable INDI in rotctl/rotctld @<:@default=yes:>@])], + [disable INDI in rotctl/rotctld @<:@default=detect:>@])], [cf_with_indi_support=$withval], - [cf_with_indi_support=yes] + [cf_with_indi_support=detect] ) AC_MSG_RESULT([$cf_with_indi_support]) -AS_IF([test x"$cf_with_indi_support" = "xyes"], [ - AS_IF([test x"${cf_with_cxx}" != "xyes"], [ - AC_MSG_ERROR([INDI support needs a C++ compiler.]) - ]) -]) +case "${cf_with_indi_support}" in + detect) cf_with_indi_support=$cf_with_cxx ;; + yes) + AS_IF([test x"${cf_with_cxx}" != "xyes"], + [AC_MSG_ERROR([INDI support needs a C++ compiler.])] + ) + ;; + no) ;; + *) AC_MSG_ERROR([invalid value for --without-indi: ${cf_with_indi_support}]) ;; +esac AS_IF([test x"$cf_with_indi_support" != "xno"], [ # macros/ax_lib_nova.m4 commit b300747aa228d42740a76e6d6d3418ae2be7ec51 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat Aug 23 22:52:54 2025 +0200 Fix comment and messages Looks like they were copied from the texts for readline. diff --git a/configure.ac b/configure.ac index ad43b6065..1a2635c6c 100644 --- a/configure.ac +++ b/configure.ac @@ -402,12 +402,12 @@ AS_IF([test x"$ax_cv_lib_readline" = "xno"], [ cf_with_readline_support=no ]) -dnl Check if INDI support in rigctl/rotctl is wanted -AC_MSG_CHECKING([whether to use INDI in rigctl/rotctl]) +dnl Check if INDI support in rotctl/rotctld is wanted +AC_MSG_CHECKING([whether to use INDI in rotctl/rotctld]) AC_ARG_WITH([indi], [AS_HELP_STRING([--without-indi], - [disable INDI in rigctl/rotctl @<:@default=yes@:>@])], + [disable INDI in rotctl/rotctld @<:@default=yes:>@])], [cf_with_indi_support=$withval], [cf_with_indi_support=yes] ) commit 8febac180a6f98900ccb5d2c2cffd12ba46886f9 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Fri Aug 22 14:38:12 2025 +0200 Fix typo diff --git a/configure.ac b/configure.ac index 327e8fae2..ad43b6065 100644 --- a/configure.ac +++ b/configure.ac @@ -111,7 +111,7 @@ AC_PROG_AWK AC_PROG_INSTALL AC_PROG_LN_S -dml check whether CXX is functional +dnl check whether CXX is functional AX_CXX_COMPILE_STDCXX([11],[noext],[optional]) AS_IF([test "$HAVE_CXX11" = 1], [cf_with_cxx=yes], commit cb6866ff8650b266f2fa8d4554b5de51d6cdba35 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Fri Aug 22 10:47:28 2025 +0200 Fix detecting functional C++11 compilers Allows to build Hamlib when a C++ compiler isn't available, by running: ./configure --without-indi --without-cxx-binding diff --git a/configure.ac b/configure.ac index ccad1182e..327e8fae2 100644 --- a/configure.ac +++ b/configure.ac @@ -111,11 +111,13 @@ AC_PROG_AWK AC_PROG_INSTALL AC_PROG_LN_S -AS_IF([test -z "$CXX"], - [cf_with_cxx=no], - [cf_with_cxx=yes] +dml check whether CXX is functional +AX_CXX_COMPILE_STDCXX([11],[noext],[optional]) +AS_IF([test "$HAVE_CXX11" = 1], + [cf_with_cxx=yes], + [cf_with_cxx=no] ) -AM_CONDITIONAL([ENABLE_CXX], [test x"${cf_with_cxx}" = "xyes"]) +AM_CONDITIONAL([ENABLE_CXX], [test "$HAVE_CXX11" = 1]) dnl Broke on older Automake, so test for its existence. m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) @@ -821,9 +823,6 @@ AS_IF([test x"${DL_LIBS}" = "x-ldl"], AC_SUBST([DL_LIBS]) -dnl check for c++11 -AX_CXX_COMPILE_STDCXX([11],[noext],[optional]) - dnl stuff that requires C++ support AS_IF([test x"${cf_with_usrp}" = "xyes"],[ commit e772d6481ef7d016a687ae6f57a26d1087543ae1 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Thu Aug 21 22:37:22 2025 +0200 Fix usage of AS_IF Needs one set of square brackets for the true case and one sert for false case. diff --git a/configure.ac b/configure.ac index 24b2c6b70..ccad1182e 100644 --- a/configure.ac +++ b/configure.ac @@ -111,10 +111,10 @@ AC_PROG_AWK AC_PROG_INSTALL AC_PROG_LN_S -AS_IF([test -z "$CXX"], [ - cf_with_cxx=yes, - cf_with_cxx=no -]) +AS_IF([test -z "$CXX"], + [cf_with_cxx=no], + [cf_with_cxx=yes] +) AM_CONDITIONAL([ENABLE_CXX], [test x"${cf_with_cxx}" = "xyes"]) dnl Broke on older Automake, so test for its existence. commit 3b2df4ecd0ce49311f75612c56de78349ff24e35 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Thu Aug 21 19:56:13 2025 +0200 Fix detecting the availability of a C++ compiler that needs arguments If the earlier macro AC_PROG_CXX found a compiler that needs some arguments, the variable CXX will contain also the arguments, so the macro AC_CHECK_PROG will try to find a file that doesn't exist (such as "g++ -std=gnu++11" instead of just "g++"). If AC_PROG_CXX didn't find a compiler, the variable CXX is empty. diff --git a/configure.ac b/configure.ac index e10251f05..24b2c6b70 100644 --- a/configure.ac +++ b/configure.ac @@ -111,9 +111,10 @@ AC_PROG_AWK AC_PROG_INSTALL AC_PROG_LN_S -# TODO: check whether CXX is functional -AC_CHECK_PROG([cf_with_cxx], ["${CXX}"], [yes], [no]) - +AS_IF([test -z "$CXX"], [ + cf_with_cxx=yes, + cf_with_cxx=no +]) AM_CONDITIONAL([ENABLE_CXX], [test x"${cf_with_cxx}" = "xyes"]) dnl Broke on older Automake, so test for its existence. commit 7dc8462b20f597184bd942569b50cdad03977f6f Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Thu Aug 21 18:02:17 2025 +0200 Add missing AC_MSG_RESULT diff --git a/configure.ac b/configure.ac index 7b3db011e..e10251f05 100644 --- a/configure.ac +++ b/configure.ac @@ -409,6 +409,8 @@ AC_ARG_WITH([indi], [cf_with_indi_support=yes] ) +AC_MSG_RESULT([$cf_with_indi_support]) + AS_IF([test x"$cf_with_indi_support" = "xyes"], [ AS_IF([test x"${cf_with_cxx}" != "xyes"], [ AC_MSG_ERROR([INDI support needs a C++ compiler.]) commit ee7c0c323503d7dc95bf10744a4fc2e0dfbe4edf Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Thu Aug 21 16:54:36 2025 +0200 Make a C++11 compiler mandatory if INDI or C++ binding are requested Otherwise make it optional. Fixes issue #1730. diff --git a/configure.ac b/configure.ac index c6a0caa24..7b3db011e 100644 --- a/configure.ac +++ b/configure.ac @@ -401,20 +401,17 @@ AS_IF([test x"$ax_cv_lib_readline" = "xno"], [ dnl Check if INDI support in rigctl/rotctl is wanted AC_MSG_CHECKING([whether to use INDI in rigctl/rotctl]) -#AS_IF([test x"${cf_with_cxx_binding}" = "xyes"], [ - AC_ARG_WITH([indi], - [AS_HELP_STRING([--without-indi], - [disable INDI in rigctl/rotctl @<:@default=yes@:>@])], - [cf_with_indi_support=$with_indi], - [cf_with_indi_support=no] - ) -#]) -AS_IF([test x"$cf_with_indi_support" != "xno"], [ - # INDI support needs a C++ compiler, tested for presence above. +AC_ARG_WITH([indi], + [AS_HELP_STRING([--without-indi], + [disable INDI in rigctl/rotctl @<:@default=yes@:>@])], + [cf_with_indi_support=$withval], + [cf_with_indi_support=yes] +) + +AS_IF([test x"$cf_with_indi_support" = "xyes"], [ AS_IF([test x"${cf_with_cxx}" != "xyes"], [ - AC_MSG_WARN([INDI support needs a C++ compiler.]) - cf_with_indi_support=no + AC_MSG_ERROR([INDI support needs a C++ compiler.]) ]) ]) @@ -556,9 +553,15 @@ AC_ARG_WITH([cxx-binding], [AS_HELP_STRING([--without-cxx-binding], [do not build C++ binding @<:@default=yes@:>@])], [cf_with_cxx_binding=$withval], - [cf_with_cxx_binding=$cf_with_cxx]) + [cf_with_cxx_binding=yes]) AC_MSG_RESULT([$cf_with_cxx_binding]) +AS_IF([test x"$cf_with_cxx_binding" = "xyes"], [ + AS_IF([test x"${cf_with_cxx}" != "xyes"], [ + AC_MSG_ERROR([C++ binding needs a C++ compiler.]) + ]) +]) + AS_IF([test x"${cf_with_cxx_binding}" = "xyes"], [BINDINGS="${BINDINGS} c++"]) @@ -816,7 +819,7 @@ AS_IF([test x"${DL_LIBS}" = "x-ldl"], AC_SUBST([DL_LIBS]) dnl check for c++11 -AX_CXX_COMPILE_STDCXX([11],[noext],[mandatory]) +AX_CXX_COMPILE_STDCXX([11],[noext],[optional]) dnl stuff that requires C++ support ----------------------------------------------------------------------- Summary of changes: .github/workflows/c-cpp.yml | 5 ++- configure.ac | 91 ++++++++++++++++++++++++++------------------- 2 files changed, 55 insertions(+), 41 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-08-22 20:49:36
|
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 ad8707c74cea2bea661ffd1a187db36dc269e06c (commit) via 6eb7c1d6dd24f77b8232bca83f90eecaa18e2711 (commit) from b953141b0f538f21cc696c2a1b874c311f3154c5 (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 ad8707c74cea2bea661ffd1a187db36dc269e06c Merge: b953141b0 6eb7c1d6d Author: Nate Bargmann <n0...@n0...> Date: Fri Aug 22 15:21:04 2025 -0500 Merge GitHub PR #1864 commit 6eb7c1d6dd24f77b8232bca83f90eecaa18e2711 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Fri Aug 22 22:02:01 2025 +0200 Fix build failure on openSUSE Tumbleweed, Slowroll and Leap 16.0 Thanks to @dl8fcl Walter. diff --git a/bindings/rig.swg b/bindings/rig.swg index 1d23e69a8..d0757effe 100644 --- a/bindings/rig.swg +++ b/bindings/rig.swg @@ -783,7 +783,7 @@ int *rig_spectrum_cb_python(RIG *rig, struct rig_spectrum_line *rig_spectrum_lin #endif #ifdef SWIGPERL - char *send_raw(char *send, char *term, char *returnstr) + void send_raw(char *send, char *term, char *returnstr) { returnstr[0] = '\0'; int count; ----------------------------------------------------------------------- Summary of changes: bindings/rig.swg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-08-22 11:31: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 branch, master has been updated via b953141b0f538f21cc696c2a1b874c311f3154c5 (commit) from 0317e64dc83f9b0b3999d2c98df67608e4fa960e (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 b953141b0f538f21cc696c2a1b874c311f3154c5 Author: aa5sh <844...@us...> Date: Thu Aug 21 22:54:31 2025 -0500 Bug Fixes for FTX1 Needed to adjust one of the timeouts. Was causing issues on Windows. Also made some changes due to IF command response size being 30, it was erroring out. And last band mapping was a little different on this rig for 2m, 70cm, 4m and Air Band. diff --git a/rigs/yaesu/ftx1.h b/rigs/yaesu/ftx1.h index 63251bd74..4f530d4a7 100644 --- a/rigs/yaesu/ftx1.h +++ b/rigs/yaesu/ftx1.h @@ -164,7 +164,7 @@ /* 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 5 +#define FTX1_WRITE_DELAY 0 /* Delay sequential fast writes */ diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 9e45d120b..6e812bd34 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -438,11 +438,15 @@ static int newcat_band_index(freq_t freq) // using < instead of <= for the moment // does anybody work LSB or RTTYR at the upper band edge? // what about band 13 -- what is it? - if (freq >= MHz(420) && freq < MHz(470)) { band = 16; } + if (freq >= MHz(420) && freq < MHz(470) && !is_ftx1) { band = 16; } + else if (freq >= MHz(420) && freq < MHz(470) && is_ftx1) { band = 14; } + else if (freq >= MHz(144) && freq < MHz(148) && is_ftx1) { band = 13; } else if (freq >= MHz(144) && freq < MHz(148)) { band = 15; } // band 14 is RX only // override band 15 with 14 if needed + else if (freq >= MHz(118) && freq < MHz(164) && is_ftx1) { band = 12; } else if (freq >= MHz(118) && freq < MHz(164)) { band = 14; } + else if (freq >= MHz(70) && freq < MHz(70.5) && is_ftx1) { band = 11; } else if (freq >= MHz(70) && freq < MHz(70.5)) { band = 17; } else if (freq >= MHz(50) && freq < MHz(55)) { band = 10; } else if (freq >= MHz(28) && freq < MHz(29.7)) { band = 9; } @@ -864,7 +868,7 @@ int newcat_60m_exception(RIG *rig, freq_t freq, mode_t mode) // some rigs need to skip freq/mode settings as 60M only operates in memory mode if (is_ft991 || is_ft897 || is_ft897d || is_ftdx5000 || is_ftdx10) { return 1; } - if (!is_ftdx10 && !is_ft710 && !is_ftdx101d && !is_ftdx101mp) { return 0; } + if (!is_ftdx10 && !is_ft710 && !is_ftdx101d && !is_ftdx101mp && !is_ftx1) { return 0; } rig_debug(RIG_DEBUG_VERBOSE, "%s: 60M exception ignoring freq/mode commands\n", __func__); @@ -2790,7 +2794,7 @@ int newcat_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) vfo = RIG_VFO_A; tx_vfo = RIG_SPLIT_ON == split ? RIG_VFO_B : RIG_VFO_A; } - else if (is_ftdx101d || is_ftdx101mp) + else if (is_ftdx101d || is_ftdx101mp || is_ftx1) { // FTDX101(D/MP) always use Sub VFO for transmit when in split mode vfo = RIG_VFO_MAIN; @@ -3025,7 +3029,7 @@ int newcat_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit) case 41: // FT-991 V2-01 seems to randomly give 13 extra bytes case 28: offset = 14; break; - + case 30: offset = 14; break; default: offset = 0; } @@ -3139,7 +3143,7 @@ int newcat_get_xit(RIG *rig, vfo_t vfo, shortfreq_t *xit) switch (strlen(priv->ret_data)) { case 27: offset = 13; break; - + case 30: offset = 14; break; case 41: // FT-991 V2-01 seems to randomly give 13 extra bytes case 28: offset = 14; break; @@ -8583,7 +8587,7 @@ static int newcat_get_split(RIG *rig, split_t *split, vfo_t *tx_vfo) *split = RIG_SPLIT_ON; // These rigs have fixed RX and TX VFOs when using the ST split command - if (is_ftdx101d || is_ftdx101mp) + if (is_ftdx101d || is_ftdx101mp || is_ftx1) { *tx_vfo = RIG_VFO_SUB; } @@ -11114,7 +11118,7 @@ int newcat_get_vfo_mode(RIG *rig, vfo_t vfo, vfo_t *vfo_mode) switch (strlen(priv->ret_data)) { case 27: offset = 21; priv->width_frequency = 8; break; - + case 30: offset = 21; priv->width_frequency = 8; break; case 41: // FT-991 V2-01 seems to randomly give 13 extra bytes case 28: offset = 22; priv->width_frequency = 9; break; ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/ftx1.h | 2 +- rigs/yaesu/newcat.c | 18 +++++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-08-21 03:16:59
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 0317e64dc83f9b0b3999d2c98df67608e4fa960e (commit) from 32d064d60ba6ae732fc7b1c590ae91296b9e1217 (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 0317e64dc83f9b0b3999d2c98df67608e4fa960e Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Wed Aug 20 23:04:41 2025 +0200 Remove double call to rig_token_lookup() and rot_token_lookup() The needed value is already in the variable. Test case /to check that the changes don't break the code): tests/rigctl --set-conf=rig_pathname=test,write_delay=1,timeout=2 --show-conf Q | grep --no-group-separator -A1 -E "(rig_pathname|^write_delay|^timeout):" tests/rotctl --set-conf=rot_pathname=test,write_delay=1,timeout=2 --show-conf Q | grep --no-group-separator -A1 -E "(rot_pathname|^write_delay|^timeout):" The output before and after this patch is: rig_pathname: "Path name to the device file of the rig" Default: /dev/rig, Value: test write_delay: "Delay in ms between each byte sent out" Default: 0, Value: 1 timeout: "Timeout in ms" Default: 0, Value: 2 Command 'Q' not found! rot_pathname: "Path name to the device file of the rotator" Default: /dev/rotator, Value: test write_delay: "Delay in ms between each byte sent out" Default: 0, Value: 1 timeout: "Timeout in ms" Default: 0, Value: 2 diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 44049b223..ad42193ec 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -6102,7 +6102,7 @@ declare_proto_rig(set_conf) } else { - ret = rig_set_conf(rig, rig_token_lookup(rig, arg1), arg2); + ret = rig_set_conf(rig, mytoken, arg2); } return (ret); diff --git a/tests/rotctl_parse.c b/tests/rotctl_parse.c index fa2c69f0a..bfc3488b7 100644 --- a/tests/rotctl_parse.c +++ b/tests/rotctl_parse.c @@ -1738,7 +1738,7 @@ declare_proto_rot(set_conf) } else { - ret = rot_set_conf(rot, rot_token_lookup(rot, arg1), arg2); + ret = rot_set_conf(rot, mytoken, arg2); } return (ret); ----------------------------------------------------------------------- Summary of changes: tests/rigctl_parse.c | 2 +- tests/rotctl_parse.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-08-20 18:20: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 32d064d60ba6ae732fc7b1c590ae91296b9e1217 (commit) via 8847cbeafb1cfdebcad62e9f3eaeab1980a15040 (commit) from cbefd0835f5284509d5b32b1f50251aa2c3f82f3 (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 32d064d60ba6ae732fc7b1c590ae91296b9e1217 Merge: cbefd0835 8847cbeaf Author: Nate Bargmann <n0...@n0...> Date: Wed Aug 20 13:03:23 2025 -0500 Merge GitHub PR #1860 commit 8847cbeafb1cfdebcad62e9f3eaeab1980a15040 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Wed Aug 20 19:18:02 2025 +0200 Implement send_raw for the Perl bindings Doesn't allow '\0' embedded in the strings to be sent or received. Closes #1479. diff --git a/bindings/perltest.pl b/bindings/perltest.pl index 509560ad6..92a935187 100755 --- a/bindings/perltest.pl +++ b/bindings/perltest.pl @@ -68,6 +68,15 @@ print "Attenuators:\t\t@$att\n"; print "\nSending Morse, '73'\n"; $rig->send_morse($Hamlib::RIG_VFO_A, "73"); +print "\nSending raw string\n"; +$send = "test string 012\n"; + +$reply = $rig->send_raw($send, "\n"); +exit(1) if(!$reply eq $send); + +$reply = $rig->send_raw($send, "1"); +exit(1) if(!$reply eq "test string 01"); + $rig->close(); diff --git a/bindings/rig.swg b/bindings/rig.swg index 7aca173ef..1d23e69a8 100644 --- a/bindings/rig.swg +++ b/bindings/rig.swg @@ -782,6 +782,17 @@ int *rig_spectrum_cb_python(RIG *rig, struct rig_spectrum_line *rig_spectrum_lin } #endif +#ifdef SWIGPERL + char *send_raw(char *send, char *term, char *returnstr) + { + returnstr[0] = '\0'; + int count; + + count = rig_send_raw(self->rig, send, strlen(send), returnstr, MAX_RETURNSTR, term); + self->error_status = count < 0 ? count : RIG_OK; + } +#endif + //#ifndef SWIGJAVA /* TODO */ void get_level(setting_t level, vfo_t vfo = RIG_VFO_CURR) ----------------------------------------------------------------------- Summary of changes: bindings/perltest.pl | 9 +++++++++ bindings/rig.swg | 11 +++++++++++ 2 files changed, 20 insertions(+) hooks/post-receive -- Hamlib -- Ham radio control libraries |