hamlib-cvs-digest Mailing List for Ham Radio Control Libraries (Page 3)
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
|
Sep
|
Oct
|
Nov
|
Dec
|
From: n0nb <n0...@us...> - 2025-06-07 13:09:30
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, Hamlib-4.6.3 has been updated via ff72e8eef28045194a9284c1fba8a5f9c71f2ea9 (commit) via 5b4c8c2ea3abbca7f788b0766e7be6aa77db1cd5 (commit) from d901969d351b867ee6a176125c3ac4bdbbbacaaf (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 ff72e8eef28045194a9284c1fba8a5f9c71f2ea9 Author: Nate Bargmann <n0...@n0...> Date: Sat Jun 7 08:05:32 2025 -0500 Update NEWS and advance to 4.6.3~rc3 diff --git a/NEWS b/NEWS index 596fadb61..33f1da732 100644 --- a/NEWS +++ b/NEWS @@ -22,6 +22,7 @@ Version 4.6.3 five years from 2020 to 2025. Mike passed away on March 28, 2025 due to complications from ALS (Lou Gehrig's disease). + * Fix various typos in Doxygen tags. (TNX Daniele Forsi) * JRC: Removed RIG_FUNC_FAGC from 535D as erroneous, Added RIG_FUNC_NB2 functionality to both 535D and 545. (TNX Mark Fine) * Restore IC-7300 spectrum data callback - regression in 4.6 (n3gb) diff --git a/configure.ac b/configure.ac index f7f73afa2..442b8354a 100644 --- a/configure.ac +++ b/configure.ac @@ -14,7 +14,7 @@ dnl Please do not use '-' in the version number, as package managers will fail, dnl however, the use of '~' should be fine as apt (others?) will treat dnl it as an earlier version than the actual release. TNX KA6MAL dnl PACKAGE_NAME + " " + PACKAGE_VERSION must not exceed 20 chars! -AC_INIT([Hamlib],[4.6.3~rc2],[ham...@li...],[hamlib],[http://www.hamlib.org]) +AC_INIT([Hamlib],[4.6.3~rc3],[ham...@li...],[hamlib],[http://www.hamlib.org]) #AC_INIT([PRODUCT_NAME], [Hamlib]) #AC_DEFINE([Hamlib], [PRODUCT_VERSION_RESOURCE]) commit 5b4c8c2ea3abbca7f788b0766e7be6aa77db1cd5 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Mon May 26 22:59:36 2025 +0200 Fix Doxygen tags (cherry picked from commit ea5a5ac312393189c8e46b5315b8a450df7e6a93) diff --git a/rigs/aor/ar7030p.c b/rigs/aor/ar7030p.c index 2d57b0f17..7ed486006 100644 --- a/rigs/aor/ar7030p.c +++ b/rigs/aor/ar7030p.c @@ -352,12 +352,12 @@ static int ar7030p_cleanup(RIG *rig) return (rc); } -/* - * /brief Open I/O to receiver +/** + * \brief Open I/O to receiver * - * /param rig Pointer to rig struct + * \param rig Pointer to rig struct * - * /return 0 on success, < 0 on failure + * \return 0 on success, < 0 on failure */ static int ar7030p_open(RIG *rig) { @@ -422,12 +422,12 @@ static int ar7030p_open(RIG *rig) return (rc); } -/* - * /brief Close I/O to receiver +/** + * \brief Close I/O to receiver * - * /param rig Pointer to rig struct + * \param rig Pointer to rig struct * - * /return 0 on success, < 0 on failure + * \return 0 on success, < 0 on failure */ // cppcheck-suppress * static int ar7030p_close(RIG *rig) @@ -468,11 +468,11 @@ static const char *ar7030p_get_info(RIG *rig) } /* - * /brief Set receiver frequency + * \brief Set receiver frequency * - * /param rig Pointer to rig struct - * /param vfo VFO to operate on - * /param freq Frequency to set + * \param rig Pointer to rig struct + * \param vfo VFO to operate on + * \param freq Frequency to set * */ static int ar7030p_set_freq(RIG *rig, vfo_t vfo, freq_t freq) @@ -528,11 +528,11 @@ static int ar7030p_set_freq(RIG *rig, vfo_t vfo, freq_t freq) } /* - * /brief Get receiver frequency + * \brief Get receiver frequency * - * /param rig Pointer to rig struct - * /param vfo VFO to operate on - * /param freq Pointer to hold frequency value (in Hz) + * \param rig Pointer to rig struct + * \param vfo VFO to operate on + * \param freq Pointer to hold frequency value (in Hz) * */ static int ar7030p_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) @@ -584,12 +584,12 @@ static int ar7030p_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) } /* - * /brief Set receiver mode + * \brief Set receiver mode * - * /param rig Pointer to rig struct - * /param vfo VFO to operate on - * /param mode Mode to set - * /param width Bandwidth to set + * \param rig Pointer to rig struct + * \param vfo VFO to operate on + * \param mode Mode to set + * \param width Bandwidth to set * */ static int ar7030p_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, @@ -650,12 +650,12 @@ static int ar7030p_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, } /* - * /brief Get receiver mode and bandwidth + * \brief Get receiver mode and bandwidth * - * /param rig Pointer to rig struct - * /param vfo VFO to operate on - * /param mode Pointer to value to hold mode - * /param width Pointer to value to hold bandwidth + * \param rig Pointer to rig struct + * \param vfo VFO to operate on + * \param mode Pointer to value to hold mode + * \param width Pointer to value to hold bandwidth * */ static int ar7030p_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, @@ -694,16 +694,16 @@ static int ar7030p_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, } /* - * /brief Get memory channel parameters + * \brief Get memory channel parameters * - * /param rig Pointer to rig struct - * /param chan Channel number (0-399) - * /param freq Pointer to frequency value - * /param mode Pointer to mode value (1-7) - * /param filt Pointer to filter value (1-6) - * /param pbs Pointer to passband tuning value - * /param sql Pointer to squelch value (0-255) - * /param id Pointer to channel ident string (14 chars) + * \param rig Pointer to rig struct + * \param chan Channel number (0-399) + * \param freq Pointer to frequency value + * \param mode Pointer to mode value (1-7) + * \param filt Pointer to filter value (1-6) + * \param pbs Pointer to passband tuning value + * \param sql Pointer to squelch value (0-255) + * \param id Pointer to channel ident string (14 chars) * */ #if 0 /* unused; re-enabled as needed. */ @@ -818,14 +818,14 @@ static void ar7030p_get_memory(RIG *rig, const unsigned int chan, #endif /* unused */ /* - * /brief Set receiver levels + * \brief Set receiver levels * - * /param rig Pointer to rig struct - * /param vfo VFO to operate on - * /param level Level to set - * /param val Value to set level to + * \param rig Pointer to rig struct + * \param vfo VFO to operate on + * \param level Level to set + * \param val Value to set level to * - * /return RIG_OK on success + * \return RIG_OK on success */ static int ar7030p_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) @@ -996,14 +996,14 @@ static int ar7030p_set_level(RIG *rig, vfo_t vfo, setting_t level, /* - * /brief Get receiver levels + * \brief Get receiver levels * - * /param rig Pointer to rig struct - * /param vfo VFO to operate on - * /param level Level to get - * /param val Pointer to value to get + * \param rig Pointer to rig struct + * \param vfo VFO to operate on + * \param level Level to get + * \param val Pointer to value to get * - * /return RIG_OK on success + * \return RIG_OK on success */ static int ar7030p_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) @@ -1469,13 +1469,13 @@ static int ar7030p_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts) } /* - * /brief Get receiver tuning step size + * \brief Get receiver tuning step size * - * /param rig Pointer to rig struct - * /param vfo VFO to operate on - * /param ts Pointer to tuning step value + * \param rig Pointer to rig struct + * \param vfo VFO to operate on + * \param ts Pointer to tuning step value * - * /return RIG_OK on success + * \return RIG_OK on success */ static int ar7030p_get_ts(RIG *rig, vfo_t vfo, shortfreq_t *ts) { @@ -1506,12 +1506,12 @@ static int ar7030p_get_ts(RIG *rig, vfo_t vfo, shortfreq_t *ts) } /* - * /brief Set receiver power status + * \brief Set receiver power status * - * /param rig Pointer to rig struct - * /param status Power status to set + * \param rig Pointer to rig struct + * \param status Power status to set * - * /return RIG_OK on success + * \return RIG_OK on success */ static int ar7030p_set_powerstat(RIG *rig, powerstat_t status) { @@ -1542,12 +1542,12 @@ static int ar7030p_set_powerstat(RIG *rig, powerstat_t status) } /* - * /brief Get receiver power status + * \brief Get receiver power status * - * /param rig Pointer to rig struct - * /param status Pointer to power status value + * \param rig Pointer to rig struct + * \param status Pointer to power status value * - * /return RIG_OK on success + * \return RIG_OK on success */ static int ar7030p_get_powerstat(RIG *rig, powerstat_t *status) { @@ -1581,12 +1581,12 @@ static int ar7030p_get_powerstat(RIG *rig, powerstat_t *status) } /* - * /brief Reset receiver + * \brief Reset receiver * - * /param rig Pointer to rig struct - * /param reset Reset operation to perform + * \param rig Pointer to rig struct + * \param reset Reset operation to perform * - * /return RIG_OK on success + * \return RIG_OK on success */ static int ar7030p_reset(RIG *rig, reset_t reset) { diff --git a/rigs/aor/ar7030p_utils.c b/rigs/aor/ar7030p_utils.c index adeef7b8b..b59a8af44 100644 --- a/rigs/aor/ar7030p_utils.c +++ b/rigs/aor/ar7030p_utils.c @@ -387,11 +387,11 @@ int BUT(RIG *rig, enum BUTTON_e button) #endif // 0 -/* - * /brief Execute routine +/** + * \brief Execute routine * - * /param rig Pointer to rig struct - * /param rtn Receiver routine to execute + * \param rig Pointer to rig struct + * \param rtn Receiver routine to execute * * \return RIG_OK on success, error code on failure * @@ -413,12 +413,12 @@ int execRoutine(RIG *rig, enum ROUTINE_e rtn) return (rc); } -/* - * /brief Set address for I/O with radio +/** + * \brief Set address for I/O with radio * - * /param rig Pointer to rig struct - * /param page Memory page number (0-4, 15) - * /param addr Address offset within page (0-4095, depending on page) + * \param rig Pointer to rig struct + * \param page Memory page number (0-4, 15) + * \param addr Address offset within page (0-4095, depending on page) * * \return RIG_OK on success, error code on failure * @@ -513,12 +513,12 @@ static int setAddr(RIG *rig, enum PAGE_e page, unsigned int addr) } /* - * /brief Write one byte to the receiver + * \brief Write one byte to the receiver * - * /param rig Pointer to rig struct - * /param page Memory page number (0-4, 15) - * /param addr Address offset within page (0-4095, depending on page) - * /param x Value to write to radio + * \param rig Pointer to rig struct + * \param page Memory page number (0-4, 15) + * \param addr Address offset within page (0-4095, depending on page) + * \param x Value to write to radio * * \return RIG_OK on success, error code on failure * @@ -554,12 +554,12 @@ int writeByte(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned char x) } /* - * /brief Write two bytes to the receiver + * \brief Write two bytes to the receiver * - * /param rig Pointer to rig struct - * /param page Memory page number (0-4, 15) - * /param addr Address offset within page (0-4095, depending on page) - * /param x Value to write to radio + * \param rig Pointer to rig struct + * \param page Memory page number (0-4, 15) + * \param addr Address offset within page (0-4095, depending on page) + * \param x Value to write to radio * * \return Number of bytes written, 0 on error. Get error code with getErrno. * @@ -581,12 +581,12 @@ int writeShort(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned short x) } /* - * /brief Write three bytes to the receiver + * \brief Write three bytes to the receiver * - * /param rig Pointer to rig struct - * /param page Memory page number (0-4, 15) - * /param addr Address offset within page (0-4095, depending on page) - * /param x Value to write to radio + * \param rig Pointer to rig struct + * \param page Memory page number (0-4, 15) + * \param addr Address offset within page (0-4095, depending on page) + * \param x Value to write to radio * * \return Number of bytes written, 0 on error. Get error code with getErrno. * @@ -616,12 +616,12 @@ int write3Bytes(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned int x) #ifdef XXREMOVEDXX // this function is not referenced anywhere /* - * /brief Write unsigned int (4 bytes) to the receiver + * \brief Write unsigned int (4 bytes) to the receiver * - * /param rig Pointer to rig struct - * /param page Memory page number (0-4, 15) - * /param addr Address offset within page (0-4095, depending on page) - * /param x Value to write to radio + * \param rig Pointer to rig struct + * \param page Memory page number (0-4, 15) + * \param addr Address offset within page (0-4095, depending on page) + * \param x Value to write to radio * * \return Number of bytes written, 0 on error. Get error code with getErrno. * @@ -656,12 +656,12 @@ int writeInt(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned int x) #endif /* - * /brief Read one byte from the receiver + * \brief Read one byte from the receiver * - * /param rig Pointer to rig struct - * /param page Memory page number (0-4, 15) - * /param addr Address offset within page (0-4095, depending on page) - * /param x Pointer to value to read from radio + * \param rig Pointer to rig struct + * \param page Memory page number (0-4, 15) + * \param addr Address offset within page (0-4095, depending on page) + * \param x Pointer to value to read from radio * * \return RIG_OK on success, error code on failure * @@ -697,12 +697,12 @@ int readByte(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned char *x) } /* - * /brief Read an unsigned short (two bytes) from the receiver + * \brief Read an unsigned short (two bytes) from the receiver * - * /param rig Pointer to rig struct - * /param page Memory page number (0-4, 15) - * /param addr Address offset within page (0-4095, depending on page) - * /param x Pointer to value to read from radio + * \param rig Pointer to rig struct + * \param page Memory page number (0-4, 15) + * \param addr Address offset within page (0-4095, depending on page) + * \param x Pointer to value to read from radio * * \return RIG_OK on success, error code on failure * @@ -734,12 +734,12 @@ int readShort(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned short *x) } /* - * /brief Read an unsigned int (three bytes) from the receiver + * \brief Read an unsigned int (three bytes) from the receiver * - * /param rig Pointer to rig struct - * /param page Memory page number (0-4, 15) - * /param addr Address offset within page (0-4095, depending on page) - * /param x Pointer to value to read from radio + * \param rig Pointer to rig struct + * \param page Memory page number (0-4, 15) + * \param addr Address offset within page (0-4095, depending on page) + * \param x Pointer to value to read from radio * * \return RIG_OK on success, error code on failure * @@ -779,12 +779,12 @@ int read3Bytes(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned int *x) #ifdef XXREMOVEDXX // this function is not referenced anywhere /* - * /brief Read an unsigned int (four bytes) from the receiver + * \brief Read an unsigned int (four bytes) from the receiver * - * /param rig Pointer to rig struct - * /param page Memory page number (0-4, 15) - * /param addr Address offset within page (0-4095, depending on page) - * /param x Pointer to value to read from radio + * \param rig Pointer to rig struct + * \param page Memory page number (0-4, 15) + * \param addr Address offset within page (0-4095, depending on page) + * \param x Pointer to value to read from radio * * \return RIG_OK on success, error code on failure * @@ -827,9 +827,9 @@ int readInt(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned int *x) #endif /* - * /brief Read raw AGC value from the radio + * \brief Read raw AGC value from the radio * - * /param rig Pointer to rig struct + * \param rig Pointer to rig struct * * \return RIG_OK on success, error code on failure */ @@ -858,9 +858,9 @@ int readSignal(RIG *rig, unsigned char *x) #ifdef XXREMOVEDXX // this function is not referenced anywhere /* - * /brief Flush I/O with radio + * \brief Flush I/O with radio * - * /param rig Pointer to rig struct + * \param rig Pointer to rig struct * */ int flushBuffer(RIG *rig) @@ -880,10 +880,10 @@ int flushBuffer(RIG *rig) #endif /* - * /brief Lock receiver for remote operations + * \brief Lock receiver for remote operations * - * /param rig Pointer to rig struct - * /param level Lock level (0-3) + * \param rig Pointer to rig struct + * \param level Lock level (0-3) * */ int lockRx(RIG *rig, enum LOCK_LVL_e level) @@ -1104,11 +1104,11 @@ int getFilterBW(RIG *rig, enum FILTER_e filter) } /* - * /brief Convert DDS steps to frequency in Hz + * \brief Convert DDS steps to frequency in Hz * - * /param steps DDS count + * \param steps DDS count * - * /return Frequency in Hz or 0 on failure + * \return Frequency in Hz or 0 on failure */ freq_t ddsToHz(const unsigned int steps) { @@ -1120,11 +1120,11 @@ freq_t ddsToHz(const unsigned int steps) } /* - * /brief Convert frequency in Hz to DDS steps + * \brief Convert frequency in Hz to DDS steps * - * /param freq Frequency in Hz + * \param freq Frequency in Hz * - * /return DDS steps (24 bits) or 0 on failure + * \return DDS steps (24 bits) or 0 on failure */ unsigned int hzToDDS(const freq_t freq) { @@ -1156,11 +1156,11 @@ unsigned int hzToDDS(const freq_t freq) } /* - * /brief Convert PBS/BFO steps to frequency in Hz + * \brief Convert PBS/BFO steps to frequency in Hz * - * /param steps PBS/BFO offset steps + * \param steps PBS/BFO offset steps * - * /return Frequency in Hz or 0 on failure + * \return Frequency in Hz or 0 on failure * * Max +ve offset is 127, max -ve offset is 128 * Min -ve offset is 255 @@ -1187,11 +1187,11 @@ float pbsToHz(const unsigned char steps) #ifdef XXREMOVEDXX // this function is not referenced anywhere /* - * /brief Convert PBS/BFO offset frequency in Hz to steps + * \brief Convert PBS/BFO offset frequency in Hz to steps * - * /param freq Offset frequency in Hz + * \param freq Offset frequency in Hz * - * /return steps (8 bits) or 0 on failure + * \return steps (8 bits) or 0 on failure */ unsigned char hzToPBS(const float freq) { @@ -1229,11 +1229,11 @@ unsigned char hzToPBS(const float freq) #endif /* - * /brief Convert native Mode to Hamlib mode + * \brief Convert native Mode to Hamlib mode * - * /param mode Native mode value + * \param mode Native mode value * - * /return Hamlib mode value + * \return Hamlib mode value */ rmode_t modeToHamlib(const unsigned char mode) { @@ -1280,11 +1280,11 @@ rmode_t modeToHamlib(const unsigned char mode) } /* - * /brief Convert Hamlib Mode to native mode + * \brief Convert Hamlib Mode to native mode * - * /param mode Hamlib mode value + * \param mode Hamlib mode value * - * /return Native mode value + * \return Native mode value */ unsigned char modeToNative(const rmode_t mode) { @@ -1331,11 +1331,11 @@ unsigned char modeToNative(const rmode_t mode) } /* - * /brief Convert native AGC speed to Hamlib AGC speed + * \brief Convert native AGC speed to Hamlib AGC speed * - * /param agc Native AGC speed value + * \param agc Native AGC speed value * - * /return Hamlib AGC speed value + * \return Hamlib AGC speed value */ enum agc_level_e agcToHamlib(const unsigned char agc) { @@ -1370,11 +1370,11 @@ enum agc_level_e agcToHamlib(const unsigned char agc) } /* - * /brief Convert Hamlib AGC speed to native AGC speed + * \brief Convert Hamlib AGC speed to native AGC speed * - * /param agc Hamlib AGC speed value + * \param agc Hamlib AGC speed value * - * /return Native AGC speed value + * \return Native AGC speed value */ unsigned char agcToNative(const enum agc_level_e agc) { @@ -1413,11 +1413,11 @@ unsigned char agcToNative(const enum agc_level_e agc) } /* - * /brief Get page size + * \brief Get page size * - * /param page Page to get size of + * \param page Page to get size of * - * /return Page size, -1 on error + * \return Page size, -1 on error */ int pageSize(const enum PAGE_e page) { @@ -1440,9 +1440,9 @@ int pageSize(const enum PAGE_e page) } /* - * /brief Set and execute IR controller code + * \brief Set and execute IR controller code * - * /param code IR code to execute + * \param code IR code to execute * * \return RIG_OK on success, error code on failure */ diff --git a/src/misc.c b/src/misc.c index 091655dca..fed8cbd8a 100644 --- a/src/misc.c +++ b/src/misc.c @@ -1027,7 +1027,7 @@ static const struct { AMP_LEVEL_NONE, "" }, }; -/* +/** * \brief check input to set_level * \param rig Pointer to rig data * \param level RIG_LEVEL_* trying to set diff --git a/src/rig.c b/src/rig.c index 1be0bad4a..9259f55ce 100644 --- a/src/rig.c +++ b/src/rig.c @@ -2945,7 +2945,7 @@ int HAMLIB_API rig_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) RETURNFUNC(retcode); } -/* +/** * \brief get the mode of the target VFO * \param rig The rig handle * \param vfo The target VFO ----------------------------------------------------------------------- Summary of changes: NEWS | 1 + configure.ac | 2 +- rigs/aor/ar7030p.c | 128 +++++++++++++++++------------------ rigs/aor/ar7030p_utils.c | 170 +++++++++++++++++++++++------------------------ src/misc.c | 2 +- src/rig.c | 2 +- 6 files changed, 153 insertions(+), 152 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-06-07 13:01: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 7b60cb586dc6b1f76bd85bceba42dac373159914 (commit) via 10180a6dc2433d525d4c3ba75c2f6519f0c55031 (commit) via 721b81d9bed4c23ce74d1140833968c55e6b4d1e (commit) via 72bde6e13171e1c2425e094413598ec88a8397a0 (commit) from ae9556462a2989b8b97af0d6e320558ffa0e1f3e (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 7b60cb586dc6b1f76bd85bceba42dac373159914 Merge: ae9556462 10180a6dc Author: Nate Bargmann <n0...@n0...> Date: Sat Jun 7 07:56:07 2025 -0500 Merge GitHub PR #1751 commit 10180a6dc2433d525d4c3ba75c2f6519f0c55031 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Tue May 27 20:15:34 2025 +0200 Fix sign of error return values All RIG_E* constants should be negated when returned or compared. Fixed with: perl -pe 's/return RIG_E/return -RIG_E/' -i $(grep -lEr "return RIG_E" --include=*.{c,h}) perl -pe 's/= RIG_E/= -RIG_E/g' -i $(grep -lEr "= RIG_E" --include=*.{c,h}) diff --git a/rigs/adat/adat.c b/rigs/adat/adat.c index ad08b58e4..e23002184 100644 --- a/rigs/adat/adat.c +++ b/rigs/adat/adat.c @@ -1565,9 +1565,9 @@ int adat_cmd_recover_from_error(RIG *pRig, int nError) // Recover from communication error - if ((nError == RIG_ETIMEOUT) - || (nError == RIG_EPROTO) - || (nError == RIG_EIO)) + if ((nError == -RIG_ETIMEOUT) + || (nError == -RIG_EPROTO) + || (nError == -RIG_EIO)) { rig_close(pRig); diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index a150e1bc9..4ee7b3de6 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -887,7 +887,7 @@ static int flrig_open(RIG *rig) /* see if get_modeA is available */ retval = flrig_transaction(rig, "rig.get_modeA", NULL, value, sizeof(value)); - if (retval == RIG_ENAVAIL) // must not have it + if (retval == -RIG_ENAVAIL) // must not have it { priv->has_get_modeA = 0; rig_debug(RIG_DEBUG_VERBOSE, "%s: getmodeA is not available=%s\n", __func__, @@ -902,7 +902,7 @@ static int flrig_open(RIG *rig) /* see if get_modeB is available */ retval = flrig_transaction(rig, "rig.get_modeB", NULL, value, sizeof(value)); - if (retval == RIG_ENAVAIL) // must not have it + if (retval == -RIG_ENAVAIL) // must not have it { priv->has_get_modeB = 0; rig_debug(RIG_DEBUG_VERBOSE, "%s: getmodeB is not available=%s\n", __func__, @@ -927,7 +927,7 @@ static int flrig_open(RIG *rig) retval = flrig_transaction(rig, "rig.get_bwA", NULL, value, sizeof(value)); int dummy; - if (retval == RIG_ENAVAIL || value[0] == 0 + if (retval == -RIG_ENAVAIL || value[0] == 0 || sscanf(value, "%d", &dummy) <= 0) // must not have it { priv->has_get_bwA = 0; @@ -946,7 +946,7 @@ static int flrig_open(RIG *rig) /* see if set_bwA is available */ retval = flrig_transaction(rig, "rig.set_bwA", NULL, value, sizeof(value)); - if (retval == RIG_ENAVAIL) // must not have it + if (retval == -RIG_ENAVAIL) // must not have it { priv->has_set_bwA = 0; priv->has_set_bwB = 0; @@ -964,7 +964,7 @@ static int flrig_open(RIG *rig) // see if get_bwB is available FLRig can return empty value too retval = flrig_transaction(rig, "rig.get_bwB", NULL, value, sizeof(value)); - if (retval == RIG_ENAVAIL || strlen(value) == 0) // must not have it + if (retval == -RIG_ENAVAIL || strlen(value) == 0) // must not have it { priv->has_get_bwB = 0; rig_debug(RIG_DEBUG_VERBOSE, "%s: get_bwB is not available=%s\n", __func__, @@ -979,7 +979,7 @@ static int flrig_open(RIG *rig) /* see if set_bwB is available */ retval = flrig_transaction(rig, "rig.set_bwB", NULL, value, sizeof(value)); - if (retval == RIG_ENAVAIL) // must not have it + if (retval == -RIG_ENAVAIL) // must not have it { priv->has_set_bwB = 0; rig_debug(RIG_DEBUG_VERBOSE, "%s: set_bwB is not available=%s\n", __func__, @@ -2383,7 +2383,7 @@ static int flrig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) retval = flrig_transaction(rig, cmd, NULL, value, sizeof(value)); - if (retval == RIG_ENAVAIL && strcmp(cmd, "rig.get_SWR") == 0) + if (retval == -RIG_ENAVAIL && strcmp(cmd, "rig.get_SWR") == 0) { priv->get_SWR = 0; cmd = "rig.get_swrmeter"; // revert to old flrig method diff --git a/rigs/dummy/quisk.c b/rigs/dummy/quisk.c index 4f8007af8..c3fb30b0e 100644 --- a/rigs/dummy/quisk.c +++ b/rigs/dummy/quisk.c @@ -2070,7 +2070,7 @@ static int quisk_get_powerstat(RIG *rig, powerstat_t *status) // a return of 1 should indicate there is no powerstat command available // so we fake the ON status // also a problem with Flex 6xxx and Log4OM not working due to lack of PS command - if (ret != RIG_ETIMEOUT) + if (ret != -RIG_ETIMEOUT) { rig_debug(RIG_DEBUG_VERBOSE, "%s: PS command failed (ret=%d) so returning RIG_POWER_ON\n", __func__, ret); diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 38e12e82b..7cb8cf81a 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -1232,7 +1232,7 @@ retry_open: { // maybe we need power on? rig_debug(RIG_DEBUG_VERBOSE, "%s trying power on\n", __func__); - retval = abs(rig_set_powerstat(rig, 1)); + retval = rig_set_powerstat(rig, 1); // this is only a fatal error if powerstat is implemented // if not implemented than we're at an error here @@ -1243,7 +1243,7 @@ retry_open: rig_debug(RIG_DEBUG_ERR, "%s: rig_set_powerstat failed: %s\n", __func__, rigerror(retval)); - if (retval == RIG_ENIMPL || retval == RIG_ENAVAIL) + if (retval == -RIG_ENIMPL || retval == -RIG_ENAVAIL) { rig_debug(RIG_DEBUG_ERR, "%s: rig_set_powerstat not implemented for rig\n", __func__); @@ -1316,11 +1316,11 @@ int icom_rig_close(RIG *rig) { // maybe we need power off? rig_debug(RIG_DEBUG_VERBOSE, "%s trying power off\n", __func__); - int retval = abs(rig_set_powerstat(rig, 0)); + int retval = rig_set_powerstat(rig, 0); // this is only a fatal error if powerstat is implemented // if not implemented than we're at an error here - if (retval != RIG_OK && retval != RIG_ENIMPL && retval != RIG_ENAVAIL) + if (retval != RIG_OK && retval != -RIG_ENIMPL && retval != -RIG_ENAVAIL) { rig_debug(RIG_DEBUG_WARN, "%s: unexpected retval here: %s\n", __func__, rigerror(retval)); diff --git a/rigs/kenwood/ic10.c b/rigs/kenwood/ic10.c index ac57db4b8..c2c75e13a 100644 --- a/rigs/kenwood/ic10.c +++ b/rigs/kenwood/ic10.c @@ -152,7 +152,7 @@ static int get_ic10_if(RIG *rig, char *data) { const struct kenwood_priv_caps *priv = (struct kenwood_priv_caps *) rig->caps->priv; - int i, data_len, retval = RIG_EINVAL; + int i, data_len, retval = -RIG_EINVAL; rig_debug(RIG_DEBUG_TRACE, "%s: called\n", __func__); diff --git a/rigs/kenwood/k3.c b/rigs/kenwood/k3.c index 4f129a1a3..da0541059 100644 --- a/rigs/kenwood/k3.c +++ b/rigs/kenwood/k3.c @@ -2352,7 +2352,7 @@ int k3_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) } else { - return RIG_EPROTO; + return -RIG_EPROTO; } // extended K22 format PCnnnx where 0=.1W units and 1=1W units diff --git a/rigs/pcr/pcr.c b/rigs/pcr/pcr.c index 12a8ae12d..f0c73f673 100644 --- a/rigs/pcr/pcr.c +++ b/rigs/pcr/pcr.c @@ -589,7 +589,7 @@ pcr_open(RIG *rig) rig_flush(rp); - /* return RIG_ERJCTED if power is off */ + /* return -RIG_ERJCTED if power is off */ err = pcr_transaction(rig, "H1?"); if (err != RIG_OK) @@ -1939,7 +1939,7 @@ int pcr_get_powerstat(RIG *rig, powerstat_t *status) struct pcr_priv_data *priv = (struct pcr_priv_data *) STATE(rig)->priv; int err; - /* return RIG_ERJCTED if power is off */ + /* return -RIG_ERJCTED if power is off */ err = pcr_transaction(rig, "H1?"); if (err != RIG_OK && err != -RIG_ERJCTED) diff --git a/rigs/tentec/orion.c b/rigs/tentec/orion.c index 2ad454553..d497eefe0 100644 --- a/rigs/tentec/orion.c +++ b/rigs/tentec/orion.c @@ -425,7 +425,7 @@ int tt565_set_freq(RIG *rig, vfo_t vfo, freq_t freq) * matches the VFO A/B setting. c.f. rig_get_range(). * Recall VFOA = ham only, VFOB = gen coverage for Hamlib. * (We assume VFOA = Main RXTX and VFOB = Sub RX.) - * If outside range, return RIG_ERJECTED for compatibility vs icom.c etc. + * If outside range, return -RIG_ERJECTED for compatibility vs icom.c etc. */ in_range = FALSE; diff --git a/rigs/yaesu/ft757gx.c b/rigs/yaesu/ft757gx.c index d7bdf5518..4189e8bc7 100644 --- a/rigs/yaesu/ft757gx.c +++ b/rigs/yaesu/ft757gx.c @@ -508,7 +508,7 @@ static int ft757gx_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) return RIG_OK; } - return RIG_ENAVAIL; + return -RIG_ENAVAIL; } /* diff --git a/rotators/grbltrk/grbltrk.c b/rotators/grbltrk/grbltrk.c index 9227206fb..abf398765 100644 --- a/rotators/grbltrk/grbltrk.c +++ b/rotators/grbltrk/grbltrk.c @@ -133,7 +133,7 @@ grbl_request(ROT *rot, char *request, uint32_t req_size, char *response, rot_debug(RIG_DEBUG_ERR, "%s write_block fail!\n", __func__); //exit(-1); fail_count++; - //return RIG_EIO; + //return -RIG_EIO; } else { @@ -150,7 +150,7 @@ grbl_request(ROT *rot, char *request, uint32_t req_size, char *response, rot_debug(RIG_DEBUG_ERR, "%s read_string fail! (%d) \n", __func__, retval); //exit(-1); fail_count++; - //return RIG_EIO; + //return -RIG_EIO; } else { @@ -205,7 +205,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 -RIG_EIO; } } @@ -447,7 +447,7 @@ grbltrk_rot_set_conf(ROT *rot, hamlib_token_t token, const char *val) if (retval < 0) { rot_debug(RIG_DEBUG_ERR, "grbl_request [%s] fail\n", val); - return RIG_EIO; + return -RIG_EIO; } } diff --git a/rotators/meade/meade.c b/rotators/meade/meade.c index e36a075fd..997ec24cc 100644 --- a/rotators/meade/meade.c +++ b/rotators/meade/meade.c @@ -310,7 +310,7 @@ static int meade_set_position(ROT *rot, azimuth_t az, elevation_t el) { rig_debug(RIG_DEBUG_VERBOSE, "%s: expected 110, got %s\n", __func__, return_str); - return RIG_EINVAL; + return -RIG_EINVAL; } } diff --git a/rotators/skywatcher/skywatcher.c b/rotators/skywatcher/skywatcher.c index 4cd6e6da6..43a38a54a 100644 --- a/rotators/skywatcher/skywatcher.c +++ b/rotators/skywatcher/skywatcher.c @@ -93,7 +93,7 @@ static int skywatcher_cmd(ROT *rot, const char *cmd, char *response, rig_debug(RIG_DEBUG_ERR, "Error response: '%s'\n", response); } - return RIG_EPROTO; + return -RIG_EPROTO; } // remove leading '=' @@ -204,7 +204,7 @@ int skywatcher_set_motor_position(ROT *rot, int motor_index, float angle) if (status & 0b10) { rig_debug(RIG_DEBUG_ERR, "%s: motor is blocked\n", __func__); - return RIG_EPROTO; + return -RIG_EPROTO; } if (status & 0b1) @@ -221,7 +221,7 @@ int skywatcher_set_motor_position(ROT *rot, int motor_index, float angle) if (!stopped) { - return RIG_EPROTO; + return -RIG_EPROTO; } SNPRINTF(req, sizeof(req), ":G%d00\r", motor_index); diff --git a/src/rig.c b/src/rig.c index e479f0c46..5d83546eb 100644 --- a/src/rig.c +++ b/src/rig.c @@ -7448,7 +7448,7 @@ int HAMLIB_API rig_send_morse(RIG *rig, vfo_t vfo, const char *msg) { const struct rig_caps *caps; struct rig_state *rs; - int retcode = RIG_EINTERNAL, rc2; + int retcode = -RIG_EINTERNAL, rc2; vfo_t curr_vfo; if (CHECK_RIG_ARG(rig)) diff --git a/tests/ampctl_parse.c b/tests/ampctl_parse.c index 62e3ac080..66499bd40 100644 --- a/tests/ampctl_parse.c +++ b/tests/ampctl_parse.c @@ -1393,7 +1393,7 @@ int ampctl_parse(AMP *my_amp, FILE *fin, FILE *fout, char *argv[], int argc) pthread_mutex_unlock(&_mutex); #endif - if (retcode == RIG_EIO) { return retcode; } + if (retcode == -RIG_EIO) { return retcode; } if (retcode != RIG_OK) { @@ -1608,7 +1608,7 @@ int set_conf(AMP *my_amp, char *conf_parms) if (!q) { - return RIG_EINVAL; + return -RIG_EINVAL; } *q++ = '\0'; diff --git a/tests/rigmem.c b/tests/rigmem.c index 54de7fbdb..8bc44abc8 100644 --- a/tests/rigmem.c +++ b/tests/rigmem.c @@ -421,7 +421,7 @@ static int set_conf(RIG *rig, char *conf_parms) if (!q) { - return RIG_EINVAL; + return -RIG_EINVAL; } *q++ = '\0'; diff --git a/tests/rigsmtr.c b/tests/rigsmtr.c index 26132d3b8..21533f6de 100644 --- a/tests/rigsmtr.c +++ b/tests/rigsmtr.c @@ -394,7 +394,7 @@ int set_conf_rig(RIG *rig, char *conf_parms) if (!q) { - return RIG_EINVAL; + return -RIG_EINVAL; *q++ = '\0'; n = strchr(q, ','); diff --git a/tests/rigswr.c b/tests/rigswr.c index af0a186f9..a3f0a592a 100644 --- a/tests/rigswr.c +++ b/tests/rigswr.c @@ -346,7 +346,7 @@ static int set_conf(RIG *rig, char *conf_parms) if (!q) { - return RIG_EINVAL; + return -RIG_EINVAL; } *q++ = '\0'; diff --git a/tests/rotctl_parse.c b/tests/rotctl_parse.c index c47457645..5b843f03a 100644 --- a/tests/rotctl_parse.c +++ b/tests/rotctl_parse.c @@ -1472,7 +1472,7 @@ int rotctl_parse(ROT *my_rot, FILE *fin, FILE *fout, const char *argv[], pthread_mutex_unlock(&rot_mutex); #endif - if (retcode == RIG_EIO) { return retcode; } + if (retcode == -RIG_EIO) { return retcode; } if (retcode != RIG_OK) { commit 721b81d9bed4c23ce74d1140833968c55e6b4d1e Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Fri May 30 23:03:03 2025 +0200 Fix sign of return values Doxygen comments All RIG_E* constants are negated when returned. Fied with: perl -pe 's/return RIG_E/return -RIG_E/' -i src/vent.c perl -pe 's/retval RIG_E/retval -RIG_E/g' -i $(grep -lEr "retval RIG_E" --include=*.{c,h}) diff --git a/src/amp_conf.c b/src/amp_conf.c index 14f53d62c..22738866a 100644 --- a/src/amp_conf.c +++ b/src/amp_conf.c @@ -102,7 +102,7 @@ static const struct confparams ampfrontend_serial_cfg_params[] = * \return RIG_OK or a **negative value** error. * * \retval RIG_OK TOK_... value set successfully. - * \retval RIG_EINVAL TOK_.. value not set. + * \retval -RIG_EINVAL TOK_.. value not set. * * \sa frontamp_get_conf() */ @@ -365,7 +365,7 @@ int frontamp_set_conf(AMP *amp, hamlib_token_t token, const char *val) * \return RIG_OK or a **negative value** on error. * * \retval RIG_OK TOK_... value queried successfully. - * \retval RIG_EINVAL TOK_.. value not queried. + * \retval -RIG_EINVAL TOK_.. value not queried. * * \sa frontamp_set_conf() */ @@ -517,7 +517,7 @@ int frontamp_get_conf2(AMP *amp, hamlib_token_t token, char *val, int val_len) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The \a cfunc action completed successfully. - * \retval RIG_EINVAL \a amp is NULL or inconsistent or \a cfunc is NULL. + * \retval -RIG_EINVAL \a amp is NULL or inconsistent or \a cfunc is NULL. */ int HAMLIB_API amp_token_foreach(AMP *amp, int (*cfunc)(const struct confparams *, @@ -673,8 +673,8 @@ hamlib_token_t HAMLIB_API amp_token_lookup(AMP *amp, const char *name) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The parameter was set successfully. - * \retval RIG_EINVAL \a amp is NULL or inconsistent or \a token is invalid. - * \retval RIG_ENAVAIL amp_caps#set_conf() capability is not available. + * \retval -RIG_EINVAL \a amp is NULL or inconsistent or \a token is invalid. + * \retval -RIG_ENAVAIL amp_caps#set_conf() capability is not available. * * \sa amp_get_conf() */ @@ -729,8 +729,8 @@ int HAMLIB_API amp_set_conf(AMP *amp, hamlib_token_t token, const char *val) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK Querying the parameter was successful. - * \retval RIG_EINVAL \a amp is NULL or inconsistent. - * \retval RIG_ENAVAIL amp_caps#get_conf() capability is not available. + * \retval -RIG_EINVAL \a amp is NULL or inconsistent. + * \retval -RIG_ENAVAIL amp_caps#get_conf() capability is not available. * * \sa amp_set_conf() */ diff --git a/src/amplifier.c b/src/amplifier.c index b34a1d617..9be99e0e0 100644 --- a/src/amplifier.c +++ b/src/amplifier.c @@ -304,7 +304,7 @@ AMP *HAMLIB_API amp_init(amp_model_t amp_model) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK Communication channel successfully opened. - * \retval RIG_EINVAL \a amp is NULL or inconsistent. + * \retval -RIG_EINVAL \a amp is NULL or inconsistent. * * \sa amp_init(), amp_close() */ @@ -463,7 +463,7 @@ int HAMLIB_API amp_open(AMP *amp) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK Communication channel successfully closed. - * \retval RIG_EINVAL \a amp is NULL or inconsistent. + * \retval -RIG_EINVAL \a amp is NULL or inconsistent. * * \sa amp_cleanup(), amp_open() */ @@ -555,7 +555,7 @@ int HAMLIB_API amp_close(AMP *amp) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK #AMP handle successfully released. - * \retval RIG_EINVAL \a amp is NULL or inconsistent. + * \retval -RIG_EINVAL \a amp is NULL or inconsistent. * * \sa amp_init(), amp_close() */ @@ -602,8 +602,8 @@ int HAMLIB_API amp_cleanup(AMP *amp) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The reset command was successful. - * \retval RIG_EINVAL \a amp is NULL or inconsistent. - * \retval RIG_ENAVAIL amp_caps#reset() capability is not available. + * \retval -RIG_EINVAL \a amp is NULL or inconsistent. + * \retval -RIG_ENAVAIL amp_caps#reset() capability is not available. */ int HAMLIB_API amp_reset(AMP *amp, amp_reset_t reset) { @@ -639,8 +639,8 @@ int HAMLIB_API amp_reset(AMP *amp, amp_reset_t reset) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The query was successful. - * \retval RIG_EINVAL \a amp is NULL or inconsistent. - * \retval RIG_ENAVAIL amp_caps#get_freq() capability is not available. + * \retval -RIG_EINVAL \a amp is NULL or inconsistent. + * \retval -RIG_ENAVAIL amp_caps#get_freq() capability is not available. * * \sa amp_set_freq() */ @@ -679,8 +679,8 @@ int HAMLIB_API amp_get_freq(AMP *amp, freq_t *freq) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK Setting the frequency was successful. - * \retval RIG_EINVAL \a amp is NULL or inconsistent. - * \retval RIG_ENAVAIL amp_caps#set_freq() capability is not available. + * \retval -RIG_EINVAL \a amp is NULL or inconsistent. + * \retval -RIG_ENAVAIL amp_caps#set_freq() capability is not available. * * \sa amp_get_freq() */ @@ -752,8 +752,8 @@ const char *HAMLIB_API amp_get_info(AMP *amp) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The query was successful. - * \retval RIG_EINVAL \a amp is NULL or inconsistent. - * \retval RIG_ENAVAIL amp_caps#get_level() capability is not available. + * \retval -RIG_EINVAL \a amp is NULL or inconsistent. + * \retval -RIG_ENAVAIL amp_caps#get_level() capability is not available. * * \sa amp_set_ext_level() */ @@ -789,8 +789,8 @@ int HAMLIB_API amp_set_level(AMP *amp, setting_t level, value_t val) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The query was successful. - * \retval RIG_EINVAL \a amp is NULL or inconsistent. - * \retval RIG_ENAVAIL amp_caps#get_level() capability is not available. + * \retval -RIG_EINVAL \a amp is NULL or inconsistent. + * \retval -RIG_ENAVAIL amp_caps#get_level() capability is not available. * * \sa amp_get_ext_level() */ @@ -825,8 +825,8 @@ int HAMLIB_API amp_get_level(AMP *amp, setting_t level, value_t *val) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The query was successful. - * \retval RIG_EINVAL \a amp is NULL or inconsistent. - * \retval RIG_ENAVAIL amp_caps#set_ext_level() capability is not available. + * \retval -RIG_EINVAL \a amp is NULL or inconsistent. + * \retval -RIG_ENAVAIL amp_caps#set_ext_level() capability is not available. * * \sa amp_set_level() */ @@ -860,8 +860,8 @@ int HAMLIB_API amp_set_ext_level(AMP *amp, hamlib_token_t level, value_t val) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The query was successful. - * \retval RIG_EINVAL \a amp is NULL or inconsistent. - * \retval RIG_ENAVAIL amp_caps#get_ext_level() capability is not available. + * \retval -RIG_EINVAL \a amp is NULL or inconsistent. + * \retval -RIG_ENAVAIL amp_caps#get_ext_level() capability is not available. * * \sa amp_get_level() */ @@ -898,8 +898,8 @@ int HAMLIB_API amp_get_ext_level(AMP *amp, hamlib_token_t level, value_t *val) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The requested power/standby state was successful. - * \retval RIG_EINVAL \a amp is NULL or inconsistent. - * \retval RIG_ENAVAIL amp_caps#set_powerstat() capability is not available. + * \retval -RIG_EINVAL \a amp is NULL or inconsistent. + * \retval -RIG_ENAVAIL amp_caps#set_powerstat() capability is not available. * * \sa amp_get_powerstat() */ @@ -935,8 +935,8 @@ int HAMLIB_API amp_set_powerstat(AMP *amp, powerstat_t status) * if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK Querying the power/standby state was successful. - * \retval RIG_EINVAL \a amp is NULL or inconsistent. - * \retval RIG_ENAVAIL amp_caps#get_powerstat() capability is not available. + * \retval -RIG_EINVAL \a amp is NULL or inconsistent. + * \retval -RIG_ENAVAIL amp_caps#get_powerstat() capability is not available. * * \sa amp_set_powerstat() */ diff --git a/src/cm108.c b/src/cm108.c index 340282eeb..9fd36c1e3 100644 --- a/src/cm108.c +++ b/src/cm108.c @@ -165,8 +165,8 @@ const char *get_usb_device_class_string(int device_class) * \return File descriptor, otherwise a **negative value** if an error * occurred (in which case, cause is set appropriately). * - * \retval RIG_EINVAL The port pathname is empty or no CM108 device detected. - * \retval RIG_EIO The `open`(2) system call returned a **negative value**. + * \retval -RIG_EINVAL The port pathname is empty or no CM108 device detected. + * \retval -RIG_EIO The `open`(2) system call returned a **negative value**. */ int cm108_open(hamlib_port_t *port) { @@ -263,9 +263,9 @@ int cm108_close(hamlib_port_t *port) * occurred (in which case, cause is set appropriately). * * \retval RIG_OK Setting or unsetting the PTT was successful. - * \retval RIG_EINVAL The file descriptor is invalid or the PTT type is + * \retval -RIG_EINVAL The file descriptor is invalid or the PTT type is * unsupported. - * \retval RIG_EIO The `write`(2) system call returned a **negative value**. + * \retval -RIG_EIO The `write`(2) system call returned a **negative value**. */ int cm108_ptt_set(hamlib_port_t *p, ptt_t pttx) { @@ -347,8 +347,8 @@ int cm108_ptt_set(hamlib_port_t *p, ptt_t pttx) * occurred (in which case, cause is set appropriately). * * \retval RIG_OK Getting the PTT state was successful. - * \retval RIG_ENIMPL Getting the state is not yet implemented. - * \retval RIG_ENAVAIL Getting the state is not available for this PTT type. + * \retval -RIG_ENIMPL Getting the state is not yet implemented. + * \retval -RIG_ENAVAIL Getting the state is not available for this PTT type. */ int cm108_ptt_get(hamlib_port_t *p, ptt_t *pttx) { diff --git a/src/event.c b/src/event.c index 10a47ff88..84b4d2649 100644 --- a/src/event.c +++ b/src/event.c @@ -577,7 +577,7 @@ int HAMLIB_API rig_set_spectrum_callback(RIG *rig, spectrum_cb_t cb, * \sa rig_get_trn() * * \deprecated This functionality has never worked correctly and it is now disabled in favor of new async data handling capabilities. - * The command will always return RIG_EDEPRECATED until the command will be removed eventually. + * The command will always return -RIG_EDEPRECATED until the command will be removed eventually. */ int HAMLIB_API rig_set_trn(RIG *rig, int trn) { @@ -601,7 +601,7 @@ int HAMLIB_API rig_set_trn(RIG *rig, int trn) * \sa rig_set_trn() * * \deprecated This functionality has never worked correctly and it is now disabled in favor of new async data handling capabilities. - * The command will always return RIG_EDEPRECATED until the command will be removed eventually. + * The command will always return -RIG_EDEPRECATED until the command will be removed eventually. */ int HAMLIB_API rig_get_trn(RIG *rig, int *trn) { diff --git a/src/extamp.c b/src/extamp.c index 278e308bf..0fda44911 100644 --- a/src/extamp.c +++ b/src/extamp.c @@ -66,7 +66,7 @@ * **negative value** which means an abnormal end, * * \retval RIG_OK All extension levels elements successfully processed. - * \retval RIG_EINVAL \a amp or \a cfunc is NULL or inconsistent. + * \retval -RIG_EINVAL \a amp or \a cfunc is NULL or inconsistent. */ int HAMLIB_API amp_ext_level_foreach(AMP *amp, int (*cfunc)(AMP *, @@ -117,7 +117,7 @@ int HAMLIB_API amp_ext_level_foreach(AMP *amp, * **negative value** which means an abnormal end. * * \retval RIG_OK All extension parameters elements successfully processed. - * \retval RIG_EINVAL \a amp or \a cfunc is NULL or inconsistent. + * \retval -RIG_EINVAL \a amp or \a cfunc is NULL or inconsistent. */ int HAMLIB_API amp_ext_parm_foreach(AMP *amp, int (*cfunc)(AMP *, diff --git a/src/locator.c b/src/locator.c index 0fc9aaa5f..652ca007b 100644 --- a/src/locator.c +++ b/src/locator.c @@ -290,7 +290,7 @@ double HAMLIB_API dmmm2dec(int degrees, double minutes, double seconds, int sw) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The conversion was successful. - * \retval RIG_EINVAL Either of the pointers are NULL. + * \retval -RIG_EINVAL Either of the pointers are NULL. * * \sa dms2dec() */ @@ -388,7 +388,7 @@ int HAMLIB_API dec2dms(double dec, * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The conversion was successful. - * \retval RIG_EINVAL Either of the pointers are NULL. + * \retval -RIG_EINVAL Either of the pointers are NULL. * * \sa dmmm2dec() */ @@ -438,7 +438,7 @@ int HAMLIB_API dec2dmmm(double dec, int *degrees, double *minutes, int *sw) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The conversion was successful. - * \retval RIG_EINVAL The QRA locator exceeds RR99xx99xx99 or exceeds length + * \retval -RIG_EINVAL The QRA locator exceeds RR99xx99xx99 or exceeds length * limit--currently 1 to 6 lon/lat pairs--or is otherwise malformed. * * \bug The fifth pair ranges from aa to xx, there is another convention @@ -531,7 +531,7 @@ int HAMLIB_API locator2longlat(double *longitude, * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The conversion was successful. - * \retval RIG_EINVAL if \a locator is NULL or \a pair_count exceeds length + * \retval -RIG_EINVAL if \a locator is NULL or \a pair_count exceeds length * limit. Currently 1 to 6 lon/lat pairs. * * \bug \a locator is not tested for overflow. @@ -611,7 +611,7 @@ int HAMLIB_API longlat2locator(double longitude, * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The calculations were successful. - * \retval RIG_EINVAL If a NULL pointer passed or \a lat and \a lon values + * \retval -RIG_EINVAL If a NULL pointer passed or \a lat and \a lon values * exceed -90 to 90 or -180 to 180. * * \sa distance_long_path(), azimuth_long_path() diff --git a/src/rig.c b/src/rig.c index 5fff46aae..e479f0c46 100644 --- a/src/rig.c +++ b/src/rig.c @@ -984,8 +984,8 @@ RIG *HAMLIB_API rig_init(rig_model_t rig_model) * a negative value if an error occurred (in which case, cause is * set appropriately). * - * \retval RIG_EINVAL \a rig is NULL or inconsistent. - * \retval RIG_ENIMPL port type communication is not implemented yet. + * \retval -RIG_EINVAL \a rig is NULL or inconsistent. + * \retval -RIG_ENIMPL port type communication is not implemented yet. * * \sa rig_init(), rig_close() */ diff --git a/src/rot_conf.c b/src/rot_conf.c index 6e5cc7ec4..44e2f467e 100644 --- a/src/rot_conf.c +++ b/src/rot_conf.c @@ -133,7 +133,7 @@ static const struct confparams rotfrontend_serial_cfg_params[] = * \return RIG_OK or a **negative value** on error. * * \retval RIG_OK TOK_... value set successfully. - * \retval RIG_EINVAL TOK_.. value not set. + * \retval -RIG_EINVAL TOK_.. value not set. * * \sa frontrot_get_conf() */ @@ -402,7 +402,7 @@ int frontrot_set_conf(ROT *rot, hamlib_token_t token, const char *val) * \return RIG_OK or a **negative value** on error. * * \retval RIG_OK TOK_... value queried successfully. - * \retval RIG_EINVAL TOK_.. value not queried. + * \retval -RIG_EINVAL TOK_.. value not queried. * * \sa frontrot_set_conf() */ @@ -577,7 +577,7 @@ int frontrot_get_conf(ROT *rot, hamlib_token_t token, char *val, int val_len) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The \a cfunc action completed successfully. - * \retval RIG_EINVAL \a rot is NULL or inconsistent or \a cfunc is NULL. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent or \a cfunc is NULL. */ int HAMLIB_API rot_token_foreach(ROT *rot, int (*cfunc)(const struct confparams *, @@ -738,8 +738,8 @@ hamlib_token_t HAMLIB_API rot_token_lookup(ROT *rot, const char *name) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The parameter was set successfully. - * \retval RIG_EINVAL \a rot is NULL or inconsistent or \a token is invalid. - * \retval RIG_ENAVAIL rot_caps#set_conf() capability is not available. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent or \a token is invalid. + * \retval -RIG_ENAVAIL rot_caps#set_conf() capability is not available. * * \sa rot_get_conf() */ @@ -794,8 +794,8 @@ int HAMLIB_API rot_set_conf(ROT *rot, hamlib_token_t token, const char *val) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK Querying the parameter was successful. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENAVAIL rot_caps#get_conf() capability is not available. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENAVAIL rot_caps#get_conf() capability is not available. * * \sa rot_set_conf() */ diff --git a/src/rot_ext.c b/src/rot_ext.c index 63915b7ed..c6bbd9538 100644 --- a/src/rot_ext.c +++ b/src/rot_ext.c @@ -87,7 +87,7 @@ static int rot_has_ext_token(ROT *rot, hamlib_token_t token) * value** which means an abnormal end. * * \retval RIG_OK All extension functions elements successfully processed. - * \retval RIG_EINVAL \a rot or \a cfunc is NULL or inconsistent. + * \retval -RIG_EINVAL \a rot or \a cfunc is NULL or inconsistent. */ int HAMLIB_API rot_ext_func_foreach(ROT *rot, int (*cfunc)(ROT *, @@ -143,7 +143,7 @@ int HAMLIB_API rot_ext_func_foreach(ROT *rot, * **negative value** which means an abnormal end. * * \retval RIG_OK All extension levels elements successfully processed. - * \retval RIG_EINVAL \a rot or \a cfunc is NULL or inconsistent. + * \retval -RIG_EINVAL \a rot or \a cfunc is NULL or inconsistent. */ int HAMLIB_API rot_ext_level_foreach(ROT *rot, int (*cfunc)(ROT *, @@ -199,7 +199,7 @@ int HAMLIB_API rot_ext_level_foreach(ROT *rot, * **negative value** which means an abnormal end. * * \retval RIG_OK All extension parameters elements successfully processed. - * \retval RIG_EINVAL \a rot or \a cfunc is NULL or inconsistent. + * \retval -RIG_EINVAL \a rot or \a cfunc is NULL or inconsistent. */ int HAMLIB_API rot_ext_parm_foreach(ROT *rot, int (*cfunc)(ROT *, diff --git a/src/rot_settings.c b/src/rot_settings.c index bee4a8f29..ed366401e 100644 --- a/src/rot_settings.c +++ b/src/rot_settings.c @@ -69,8 +69,8 @@ * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK Setting the level was successful. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENAVAIL rot_caps#set_level() capability is not available. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENAVAIL rot_caps#set_level() capability is not available. * * \sa rot_has_set_level(), rot_get_level() */ @@ -113,8 +113,8 @@ int HAMLIB_API rot_set_level(ROT *rot, setting_t level, value_t val) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The query was successful. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENAVAIL rot_caps#get_level() capability is not available. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENAVAIL rot_caps#get_level() capability is not available. * * \sa rot_has_get_level(), rot_set_level() */ @@ -158,8 +158,8 @@ int HAMLIB_API rot_get_level(ROT *rot, setting_t level, value_t *val) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The parameter was set successfully. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENAVAIL rot_caps#set_parm() capability is not available. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENAVAIL rot_caps#set_parm() capability is not available. * * \sa rot_has_set_parm(), rot_get_parm() */ @@ -198,8 +198,8 @@ int HAMLIB_API rot_set_parm(ROT *rot, setting_t parm, value_t val) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The parameter was queried successfully. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENAVAIL rot_caps#get_parm() capability is not available. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENAVAIL rot_caps#get_parm() capability is not available. * * \sa rot_has_get_parm(), rot_set_parm() */ @@ -461,8 +461,8 @@ setting_t HAMLIB_API rot_has_set_func(ROT *rot, setting_t func) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The function was activated or deactivated successfully. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENAVAIL rot_caps#set_func() capability is not available or + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENAVAIL rot_caps#set_func() capability is not available or * \a func is not supported. * * \sa rot_get_func() @@ -505,8 +505,8 @@ int HAMLIB_API rot_set_func(ROT *rot, setting_t func, int status) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The function status was queried successfully. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENAVAIL rot_caps#get_func() capability is not available or + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENAVAIL rot_caps#get_func() capability is not available or * \a func is not supported. * * \sa rot_set_func() @@ -549,8 +549,8 @@ int HAMLIB_API rot_get_func(ROT *rot, setting_t func, int *status) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The extension level was set successfully. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENAVAIL rot_caps#set_ext_level() capability is not available. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENAVAIL rot_caps#set_ext_level() capability is not available. * * \sa rot_get_ext_level() */ @@ -589,8 +589,8 @@ int HAMLIB_API rot_set_ext_level(ROT *rot, hamlib_token_t token, value_t val) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The extension level was queried successfully. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENAVAIL rot_caps#get_ext_level() capability is not available. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENAVAIL rot_caps#get_ext_level() capability is not available. * * \sa rot_set_ext_level() */ @@ -633,8 +633,8 @@ int HAMLIB_API rot_get_ext_level(ROT *rot, hamlib_token_t token, value_t *val) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The extension function status was set successfully. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENAVAIL rot_caps#get_ext_func() capability is not available. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENAVAIL rot_caps#get_ext_func() capability is not available. * * \sa rot_get_ext_func() */ @@ -676,8 +676,8 @@ int HAMLIB_API rot_set_ext_func(ROT *rot, hamlib_token_t token, int status) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The extension function status was queried successfully. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENAVAIL rot_caps#get_ext_func() capability is not available or + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENAVAIL rot_caps#get_ext_func() capability is not available or * \a token is not supported. * * \sa rot_set_ext_func() @@ -719,8 +719,8 @@ int HAMLIB_API rot_get_ext_func(ROT *rot, hamlib_token_t token, int *status) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The extension parameter was set successfully. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENAVAIL rot_caps#set_ext_parm() capability is not available. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENAVAIL rot_caps#set_ext_parm() capability is not available. * * \sa rot_get_ext_parm() */ @@ -757,8 +757,8 @@ int HAMLIB_API rot_set_ext_parm(ROT *rot, hamlib_token_t token, value_t val) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The extension parameter was queried successfully. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENAVAIL rot_caps#get_ext_parm() capability is not available. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENAVAIL rot_caps#get_ext_parm() capability is not available. * * \sa rot_set_ext_parm() */ diff --git a/src/rotator.c b/src/rotator.c index f92695d6e..d09606f66 100644 --- a/src/rotator.c +++ b/src/rotator.c @@ -364,8 +364,8 @@ ROT *HAMLIB_API rot_init(rot_model_t rot_model) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK Communication channel successfully opened. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENIMPL Communication port type is not implemented yet. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENIMPL Communication port type is not implemented yet. * * \sa rot_init(), rot_close() */ @@ -603,7 +603,7 @@ int HAMLIB_API rot_open(ROT *rot) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK Communication channel successfully closed. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. * * \sa rot_cleanup(), rot_open() */ @@ -692,7 +692,7 @@ int HAMLIB_API rot_close(ROT *rot) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK #ROT handle successfully released. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. * * \sa rot_init(), rot_close() */ @@ -746,9 +746,9 @@ int HAMLIB_API rot_cleanup(ROT *rot) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK Either or both parameters set successfully. - * \retval RIG_EINVAL \a rot is NULL or inconsistent \b or either \a azimuth + * \retval -RIG_EINVAL \a rot is NULL or inconsistent \b or either \a azimuth * or \a elevation is out of range for this rotator. - * \retval RIG_ENAVAIL rot_caps#set_position() capability is not available. + * \retval -RIG_ENAVAIL rot_caps#set_position() capability is not available. * * \sa rot_get_position() */ @@ -819,8 +819,8 @@ int HAMLIB_API rot_set_position(ROT *rot, * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK Either or both parameters queried and stored successfully. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENAVAIL rot_caps#get_position() capability is not available. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENAVAIL rot_caps#get_position() capability is not available. * * \sa rot_set_position() */ @@ -880,8 +880,8 @@ int HAMLIB_API rot_get_position(ROT *rot, * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The rotator was parked successfully. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENAVAIL rot_caps#park() capability is not available. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENAVAIL rot_caps#park() capability is not available. * */ int HAMLIB_API rot_park(ROT *rot) @@ -917,8 +917,8 @@ int HAMLIB_API rot_park(ROT *rot) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The rotator was stopped successfully. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENAVAIL rot_caps#stop() capability is not available. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENAVAIL rot_caps#stop() capability is not available. * * \sa rot_move() */ @@ -956,8 +956,8 @@ int HAMLIB_API rot_stop(ROT *rot) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The rotator was reset successfully. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENAVAIL rot_caps#reset() capability is not available. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENAVAIL rot_caps#reset() capability is not available. */ int HAMLIB_API rot_reset(ROT *rot, rot_reset_t reset) { @@ -995,8 +995,8 @@ int HAMLIB_API rot_reset(ROT *rot, rot_reset_t reset) * The \a speed is a value between 1 and 100 or #ROT_SPEED_NOCHANGE. * * \retval RIG_OK The rotator move was successful. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENAVAIL rot_caps#move() capability is not available. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENAVAIL rot_caps#move() capability is not available. * * \sa rot_stop() */ @@ -1065,8 +1065,8 @@ const char *HAMLIB_API rot_get_info(ROT *rot) * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The query was successful. - * \retval RIG_EINVAL \a rot is NULL or inconsistent. - * \retval RIG_ENAVAIL rot_caps#get_status() capability is not available. + * \retval -RIG_EINVAL \a rot is NULL or inconsistent. + * \retval -RIG_ENAVAIL rot_caps#get_status() capability is not available. */ int HAMLIB_API rot_get_status(ROT *rot, rot_status_t *status) { commit 72bde6e13171e1c2425e094413598ec88a8397a0 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Fri May 30 22:56:37 2025 +0200 Fix sign of error return values All RIG_E* constants should be negated when returned or compared. Change the usages of RIG_IS_SOFT_ERRCODE() for consistency. diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 6656c5aeb..8f6326d01 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -222,10 +222,10 @@ enum rig_errcode_e { * Soft errors are caused by invalid parameters and software/hardware features * and cannot be fixed by retries or by re-initializing hardware. */ -#define RIG_IS_SOFT_ERRCODE(errcode) (errcode == RIG_EINVAL || errcode == RIG_ENIMPL || errcode == RIG_ERJCTED \ - || errcode == RIG_ETRUNC || errcode == RIG_ENAVAIL || errcode == RIG_ENTARGET \ - || errcode == RIG_EVFO || errcode == RIG_EDOM || errcode == RIG_EDEPRECATED \ - || errcode == RIG_ESECURITY || errcode == RIG_EPOWER) +#define RIG_IS_SOFT_ERRCODE(errcode) (errcode == -RIG_EINVAL || errcode == -RIG_ENIMPL || errcode == -RIG_ERJCTED \ + || errcode == -RIG_ETRUNC || errcode == -RIG_ENAVAIL || errcode == -RIG_ENTARGET \ + || errcode == -RIG_EVFO || errcode == -RIG_EDOM || errcode == -RIG_EDEPRECATED \ + || errcode == -RIG_ESECURITY || errcode == -RIG_EPOWER) /** * \brief Token in the netrigctl protocol for returning error code diff --git a/tests/rigctl.c b/tests/rigctl.c index a262d32f3..e04ff7e8f 100644 --- a/tests/rigctl.c +++ b/tests/rigctl.c @@ -816,7 +816,7 @@ int main(int argc, char *argv[]) // if we get a hard error we try to reopen the rig again // this should cover short dropouts that can occur - if (retcode < 0 && !RIG_IS_SOFT_ERRCODE(-retcode)) + if (retcode < 0 && !RIG_IS_SOFT_ERRCODE(retcode)) { int retry = 3; rig_debug(RIG_DEBUG_ERR, "%s: i/o error\n", __func__); @@ -833,7 +833,7 @@ int main(int argc, char *argv[]) while (retry-- > 0 && retcode != RIG_OK); } } - while (!ctrl_c && (retcode == RIG_OK || RIG_IS_SOFT_ERRCODE(-retcode))); + while (!ctrl_c && (retcode == RIG_OK || RIG_IS_SOFT_ERRCODE(retcode))); if (interactive && prompt) { diff --git a/tests/rigctld.c b/tests/rigctld.c index 9ffb01a6f..4435c26ca 100644 --- a/tests/rigctld.c +++ b/tests/rigctld.c @@ -1282,7 +1282,7 @@ void *handle_socket(void *arg) // if we get a hard error we try to reopen the rig again // this should cover short dropouts that can occur - if (retcode < 0 && !RIG_IS_SOFT_ERRCODE(-retcode)) + if (retcode < 0 && !RIG_IS_SOFT_ERRCODE(retcode)) { int retry = 3; rig_debug(RIG_DEBUG_ERR, "%s: i/o error\n", __func__); @@ -1312,7 +1312,7 @@ void *handle_socket(void *arg) while (!ctrl_c && !rig_opened && retry-- > 0 && retcode != RIG_OK); } } - while (!ctrl_c && (retcode == RIG_OK || RIG_IS_SOFT_ERRCODE(-retcode))); + while (!ctrl_c && (retcode == RIG_OK || RIG_IS_SOFT_ERRCODE(retcode))); #if defined(HAVE_PTHREAD) diff --git a/tests/rigctltcp.c b/tests/rigctltcp.c index a9eaa9dc7..17d40be6e 100644 --- a/tests/rigctltcp.c +++ b/tests/rigctltcp.c @@ -1283,7 +1283,7 @@ void *handle_socket(void *arg) // if we get a hard error we try to reopen the rig again // this should cover short dropouts that can occur - if (retcode < 0 && !RIG_IS_SOFT_ERRCODE(-retcode)) + if (retcode < 0 && !RIG_IS_SOFT_ERRCODE(retcode)) { int retry = 3; rig_debug(RIG_DEBUG_ERR, "%s: i/o error\n", __func__); @@ -1313,7 +1313,7 @@ void *handle_socket(void *arg) while (!ctrl_c && !rig_opened && retry-- > 0 && retcode != RIG_OK); } } - while (!ctrl_c && (retcode == RIG_OK || RIG_IS_SOFT_ERRCODE(-retcode))); + while (!ctrl_c && (retcode == RIG_OK || RIG_IS_SOFT_ERRCODE(retcode))); client_done: ----------------------------------------------------------------------- Summary of changes: include/hamlib/rig.h | 8 +++---- rigs/adat/adat.c | 6 ++--- rigs/dummy/flrig.c | 14 ++++++------ rigs/dummy/quisk.c | 2 +- rigs/icom/icom.c | 8 +++---- rigs/kenwood/ic10.c | 2 +- rigs/kenwood/k3.c | 2 +- rigs/pcr/pcr.c | 4 ++-- rigs/tentec/orion.c | 2 +- rigs/yaesu/ft757gx.c | 2 +- rotators/grbltrk/grbltrk.c | 8 +++---- rotators/meade/meade.c | 2 +- rotators/skywatcher/skywatcher.c | 6 ++--- src/amp_conf.c | 14 ++++++------ src/amplifier.c | 42 +++++++++++++++++------------------ src/cm108.c | 12 +++++----- src/event.c | 4 ++-- src/extamp.c | 4 ++-- src/locator.c | 10 ++++----- src/rig.c | 6 ++--- src/rot_conf.c | 14 ++++++------ src/rot_ext.c | 6 ++--- src/rot_settings.c | 48 ++++++++++++++++++++-------------------- src/rotator.c | 36 +++++++++++++++--------------- tests/ampctl_parse.c | 4 ++-- tests/rigctl.c | 4 ++-- tests/rigctld.c | 4 ++-- tests/rigctltcp.c | 4 ++-- tests/rigmem.c | 2 +- tests/rigsmtr.c | 2 +- tests/rigswr.c | 2 +- tests/rotctl_parse.c | 2 +- 32 files changed, 143 insertions(+), 143 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-06-07 12:32:26
|
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 ae9556462a2989b8b97af0d6e320558ffa0e1f3e (commit) from 355d237ffe974371091865fe73bd1bce42a4c085 (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 ae9556462a2989b8b97af0d6e320558ffa0e1f3e Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Wed May 7 22:27:07 2025 +0200 Fix debug messages shown even from disabled levels Messages from ENTERFUNC and RETURNFUNC where stored in an internal buffer even whe debug_level wasn't TRACE and were returned when calling rigerror(). diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 6656c5aeb..57c067b59 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -3770,11 +3770,10 @@ extern HAMLIB_EXPORT_VAR(char) debugmsgsave2[DEBUGMSGSAVE_SIZE]; // last-1 debu // debugmsgsave3 is deprecated extern HAMLIB_EXPORT_VAR(char) debugmsgsave3[DEBUGMSGSAVE_SIZE]; // last-2 debug msg #define rig_debug_clear() { debugmsgsave[0] = debugmsgsave2[0] = debugmsgsave3[0] = 0; }; -#ifndef __cplusplus -#ifdef __GNUC__ -// doing the debug macro with a dummy sprintf allows gcc to check the format string -#define rig_debug(debug_level,fmt,...) do { snprintf(debugmsgsave2,sizeof(debugmsgsave2),fmt,__VA_ARGS__);rig_debug(debug_level,fmt,##__VA_ARGS__); add2debugmsgsave(debugmsgsave2); } while(0) -#endif +#if !defined(__cplusplus) && defined(__GNUC__) +#define ATTRIBUTE_FORMAT_PRINTF __attribute__((__format__ (__printf__, 2, 3))) +#else +#define ATTRIBUTE_FORMAT_PRINTF #endif // Measuring elapsed time -- local variable inside function when macro is used @@ -3786,7 +3785,7 @@ extern HAMLIB_EXPORT_VAR(char) debugmsgsave3[DEBUGMSGSAVE_SIZE]; // last-2 debu extern HAMLIB_EXPORT(void) rig_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level, - const char *fmt, ...)); + const char *fmt, ...)) ATTRIBUTE_FORMAT_PRINTF; extern HAMLIB_EXPORT(vprintf_cb_t) rig_set_debug_callback HAMLIB_PARAMS((vprintf_cb_t cb, diff --git a/src/debug.c b/src/debug.c index de66c0879..a57685535 100644 --- a/src/debug.c +++ b/src/debug.c @@ -202,7 +202,6 @@ void HAMLIB_API rig_set_debug_time_stamp(int flag) * The formatted character string is passed to the `vfprintf`(3) C library * call and follows its format specification. */ -#undef rig_debug void HAMLIB_API rig_debug(enum rig_debug_level_e debug_level, const char *fmt, ...) { ----------------------------------------------------------------------- Summary of changes: include/hamlib/rig.h | 11 +++++------ src/debug.c | 1 - 2 files changed, 5 insertions(+), 7 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-06-07 02:23:03
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 355d237ffe974371091865fe73bd1bce42a4c085 (commit) via ea5a5ac312393189c8e46b5315b8a450df7e6a93 (commit) from 778edf7757966c6e8df1089c8536f81fad64288b (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 355d237ffe974371091865fe73bd1bce42a4c085 Merge: 778edf775 ea5a5ac31 Author: Nate Bargmann <n0...@n0...> Date: Fri Jun 6 21:18:35 2025 -0500 Merge GitHub PR #1758 commit ea5a5ac312393189c8e46b5315b8a450df7e6a93 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Mon May 26 22:59:36 2025 +0200 Fix Doxygen tags diff --git a/rigs/aor/ar7030p.c b/rigs/aor/ar7030p.c index 2d57b0f17..7ed486006 100644 --- a/rigs/aor/ar7030p.c +++ b/rigs/aor/ar7030p.c @@ -352,12 +352,12 @@ static int ar7030p_cleanup(RIG *rig) return (rc); } -/* - * /brief Open I/O to receiver +/** + * \brief Open I/O to receiver * - * /param rig Pointer to rig struct + * \param rig Pointer to rig struct * - * /return 0 on success, < 0 on failure + * \return 0 on success, < 0 on failure */ static int ar7030p_open(RIG *rig) { @@ -422,12 +422,12 @@ static int ar7030p_open(RIG *rig) return (rc); } -/* - * /brief Close I/O to receiver +/** + * \brief Close I/O to receiver * - * /param rig Pointer to rig struct + * \param rig Pointer to rig struct * - * /return 0 on success, < 0 on failure + * \return 0 on success, < 0 on failure */ // cppcheck-suppress * static int ar7030p_close(RIG *rig) @@ -468,11 +468,11 @@ static const char *ar7030p_get_info(RIG *rig) } /* - * /brief Set receiver frequency + * \brief Set receiver frequency * - * /param rig Pointer to rig struct - * /param vfo VFO to operate on - * /param freq Frequency to set + * \param rig Pointer to rig struct + * \param vfo VFO to operate on + * \param freq Frequency to set * */ static int ar7030p_set_freq(RIG *rig, vfo_t vfo, freq_t freq) @@ -528,11 +528,11 @@ static int ar7030p_set_freq(RIG *rig, vfo_t vfo, freq_t freq) } /* - * /brief Get receiver frequency + * \brief Get receiver frequency * - * /param rig Pointer to rig struct - * /param vfo VFO to operate on - * /param freq Pointer to hold frequency value (in Hz) + * \param rig Pointer to rig struct + * \param vfo VFO to operate on + * \param freq Pointer to hold frequency value (in Hz) * */ static int ar7030p_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) @@ -584,12 +584,12 @@ static int ar7030p_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) } /* - * /brief Set receiver mode + * \brief Set receiver mode * - * /param rig Pointer to rig struct - * /param vfo VFO to operate on - * /param mode Mode to set - * /param width Bandwidth to set + * \param rig Pointer to rig struct + * \param vfo VFO to operate on + * \param mode Mode to set + * \param width Bandwidth to set * */ static int ar7030p_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, @@ -650,12 +650,12 @@ static int ar7030p_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, } /* - * /brief Get receiver mode and bandwidth + * \brief Get receiver mode and bandwidth * - * /param rig Pointer to rig struct - * /param vfo VFO to operate on - * /param mode Pointer to value to hold mode - * /param width Pointer to value to hold bandwidth + * \param rig Pointer to rig struct + * \param vfo VFO to operate on + * \param mode Pointer to value to hold mode + * \param width Pointer to value to hold bandwidth * */ static int ar7030p_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, @@ -694,16 +694,16 @@ static int ar7030p_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, } /* - * /brief Get memory channel parameters + * \brief Get memory channel parameters * - * /param rig Pointer to rig struct - * /param chan Channel number (0-399) - * /param freq Pointer to frequency value - * /param mode Pointer to mode value (1-7) - * /param filt Pointer to filter value (1-6) - * /param pbs Pointer to passband tuning value - * /param sql Pointer to squelch value (0-255) - * /param id Pointer to channel ident string (14 chars) + * \param rig Pointer to rig struct + * \param chan Channel number (0-399) + * \param freq Pointer to frequency value + * \param mode Pointer to mode value (1-7) + * \param filt Pointer to filter value (1-6) + * \param pbs Pointer to passband tuning value + * \param sql Pointer to squelch value (0-255) + * \param id Pointer to channel ident string (14 chars) * */ #if 0 /* unused; re-enabled as needed. */ @@ -818,14 +818,14 @@ static void ar7030p_get_memory(RIG *rig, const unsigned int chan, #endif /* unused */ /* - * /brief Set receiver levels + * \brief Set receiver levels * - * /param rig Pointer to rig struct - * /param vfo VFO to operate on - * /param level Level to set - * /param val Value to set level to + * \param rig Pointer to rig struct + * \param vfo VFO to operate on + * \param level Level to set + * \param val Value to set level to * - * /return RIG_OK on success + * \return RIG_OK on success */ static int ar7030p_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) @@ -996,14 +996,14 @@ static int ar7030p_set_level(RIG *rig, vfo_t vfo, setting_t level, /* - * /brief Get receiver levels + * \brief Get receiver levels * - * /param rig Pointer to rig struct - * /param vfo VFO to operate on - * /param level Level to get - * /param val Pointer to value to get + * \param rig Pointer to rig struct + * \param vfo VFO to operate on + * \param level Level to get + * \param val Pointer to value to get * - * /return RIG_OK on success + * \return RIG_OK on success */ static int ar7030p_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) @@ -1469,13 +1469,13 @@ static int ar7030p_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts) } /* - * /brief Get receiver tuning step size + * \brief Get receiver tuning step size * - * /param rig Pointer to rig struct - * /param vfo VFO to operate on - * /param ts Pointer to tuning step value + * \param rig Pointer to rig struct + * \param vfo VFO to operate on + * \param ts Pointer to tuning step value * - * /return RIG_OK on success + * \return RIG_OK on success */ static int ar7030p_get_ts(RIG *rig, vfo_t vfo, shortfreq_t *ts) { @@ -1506,12 +1506,12 @@ static int ar7030p_get_ts(RIG *rig, vfo_t vfo, shortfreq_t *ts) } /* - * /brief Set receiver power status + * \brief Set receiver power status * - * /param rig Pointer to rig struct - * /param status Power status to set + * \param rig Pointer to rig struct + * \param status Power status to set * - * /return RIG_OK on success + * \return RIG_OK on success */ static int ar7030p_set_powerstat(RIG *rig, powerstat_t status) { @@ -1542,12 +1542,12 @@ static int ar7030p_set_powerstat(RIG *rig, powerstat_t status) } /* - * /brief Get receiver power status + * \brief Get receiver power status * - * /param rig Pointer to rig struct - * /param status Pointer to power status value + * \param rig Pointer to rig struct + * \param status Pointer to power status value * - * /return RIG_OK on success + * \return RIG_OK on success */ static int ar7030p_get_powerstat(RIG *rig, powerstat_t *status) { @@ -1581,12 +1581,12 @@ static int ar7030p_get_powerstat(RIG *rig, powerstat_t *status) } /* - * /brief Reset receiver + * \brief Reset receiver * - * /param rig Pointer to rig struct - * /param reset Reset operation to perform + * \param rig Pointer to rig struct + * \param reset Reset operation to perform * - * /return RIG_OK on success + * \return RIG_OK on success */ static int ar7030p_reset(RIG *rig, reset_t reset) { diff --git a/rigs/aor/ar7030p_utils.c b/rigs/aor/ar7030p_utils.c index adeef7b8b..b59a8af44 100644 --- a/rigs/aor/ar7030p_utils.c +++ b/rigs/aor/ar7030p_utils.c @@ -387,11 +387,11 @@ int BUT(RIG *rig, enum BUTTON_e button) #endif // 0 -/* - * /brief Execute routine +/** + * \brief Execute routine * - * /param rig Pointer to rig struct - * /param rtn Receiver routine to execute + * \param rig Pointer to rig struct + * \param rtn Receiver routine to execute * * \return RIG_OK on success, error code on failure * @@ -413,12 +413,12 @@ int execRoutine(RIG *rig, enum ROUTINE_e rtn) return (rc); } -/* - * /brief Set address for I/O with radio +/** + * \brief Set address for I/O with radio * - * /param rig Pointer to rig struct - * /param page Memory page number (0-4, 15) - * /param addr Address offset within page (0-4095, depending on page) + * \param rig Pointer to rig struct + * \param page Memory page number (0-4, 15) + * \param addr Address offset within page (0-4095, depending on page) * * \return RIG_OK on success, error code on failure * @@ -513,12 +513,12 @@ static int setAddr(RIG *rig, enum PAGE_e page, unsigned int addr) } /* - * /brief Write one byte to the receiver + * \brief Write one byte to the receiver * - * /param rig Pointer to rig struct - * /param page Memory page number (0-4, 15) - * /param addr Address offset within page (0-4095, depending on page) - * /param x Value to write to radio + * \param rig Pointer to rig struct + * \param page Memory page number (0-4, 15) + * \param addr Address offset within page (0-4095, depending on page) + * \param x Value to write to radio * * \return RIG_OK on success, error code on failure * @@ -554,12 +554,12 @@ int writeByte(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned char x) } /* - * /brief Write two bytes to the receiver + * \brief Write two bytes to the receiver * - * /param rig Pointer to rig struct - * /param page Memory page number (0-4, 15) - * /param addr Address offset within page (0-4095, depending on page) - * /param x Value to write to radio + * \param rig Pointer to rig struct + * \param page Memory page number (0-4, 15) + * \param addr Address offset within page (0-4095, depending on page) + * \param x Value to write to radio * * \return Number of bytes written, 0 on error. Get error code with getErrno. * @@ -581,12 +581,12 @@ int writeShort(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned short x) } /* - * /brief Write three bytes to the receiver + * \brief Write three bytes to the receiver * - * /param rig Pointer to rig struct - * /param page Memory page number (0-4, 15) - * /param addr Address offset within page (0-4095, depending on page) - * /param x Value to write to radio + * \param rig Pointer to rig struct + * \param page Memory page number (0-4, 15) + * \param addr Address offset within page (0-4095, depending on page) + * \param x Value to write to radio * * \return Number of bytes written, 0 on error. Get error code with getErrno. * @@ -616,12 +616,12 @@ int write3Bytes(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned int x) #ifdef XXREMOVEDXX // this function is not referenced anywhere /* - * /brief Write unsigned int (4 bytes) to the receiver + * \brief Write unsigned int (4 bytes) to the receiver * - * /param rig Pointer to rig struct - * /param page Memory page number (0-4, 15) - * /param addr Address offset within page (0-4095, depending on page) - * /param x Value to write to radio + * \param rig Pointer to rig struct + * \param page Memory page number (0-4, 15) + * \param addr Address offset within page (0-4095, depending on page) + * \param x Value to write to radio * * \return Number of bytes written, 0 on error. Get error code with getErrno. * @@ -656,12 +656,12 @@ int writeInt(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned int x) #endif /* - * /brief Read one byte from the receiver + * \brief Read one byte from the receiver * - * /param rig Pointer to rig struct - * /param page Memory page number (0-4, 15) - * /param addr Address offset within page (0-4095, depending on page) - * /param x Pointer to value to read from radio + * \param rig Pointer to rig struct + * \param page Memory page number (0-4, 15) + * \param addr Address offset within page (0-4095, depending on page) + * \param x Pointer to value to read from radio * * \return RIG_OK on success, error code on failure * @@ -697,12 +697,12 @@ int readByte(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned char *x) } /* - * /brief Read an unsigned short (two bytes) from the receiver + * \brief Read an unsigned short (two bytes) from the receiver * - * /param rig Pointer to rig struct - * /param page Memory page number (0-4, 15) - * /param addr Address offset within page (0-4095, depending on page) - * /param x Pointer to value to read from radio + * \param rig Pointer to rig struct + * \param page Memory page number (0-4, 15) + * \param addr Address offset within page (0-4095, depending on page) + * \param x Pointer to value to read from radio * * \return RIG_OK on success, error code on failure * @@ -734,12 +734,12 @@ int readShort(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned short *x) } /* - * /brief Read an unsigned int (three bytes) from the receiver + * \brief Read an unsigned int (three bytes) from the receiver * - * /param rig Pointer to rig struct - * /param page Memory page number (0-4, 15) - * /param addr Address offset within page (0-4095, depending on page) - * /param x Pointer to value to read from radio + * \param rig Pointer to rig struct + * \param page Memory page number (0-4, 15) + * \param addr Address offset within page (0-4095, depending on page) + * \param x Pointer to value to read from radio * * \return RIG_OK on success, error code on failure * @@ -779,12 +779,12 @@ int read3Bytes(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned int *x) #ifdef XXREMOVEDXX // this function is not referenced anywhere /* - * /brief Read an unsigned int (four bytes) from the receiver + * \brief Read an unsigned int (four bytes) from the receiver * - * /param rig Pointer to rig struct - * /param page Memory page number (0-4, 15) - * /param addr Address offset within page (0-4095, depending on page) - * /param x Pointer to value to read from radio + * \param rig Pointer to rig struct + * \param page Memory page number (0-4, 15) + * \param addr Address offset within page (0-4095, depending on page) + * \param x Pointer to value to read from radio * * \return RIG_OK on success, error code on failure * @@ -827,9 +827,9 @@ int readInt(RIG *rig, enum PAGE_e page, unsigned int addr, unsigned int *x) #endif /* - * /brief Read raw AGC value from the radio + * \brief Read raw AGC value from the radio * - * /param rig Pointer to rig struct + * \param rig Pointer to rig struct * * \return RIG_OK on success, error code on failure */ @@ -858,9 +858,9 @@ int readSignal(RIG *rig, unsigned char *x) #ifdef XXREMOVEDXX // this function is not referenced anywhere /* - * /brief Flush I/O with radio + * \brief Flush I/O with radio * - * /param rig Pointer to rig struct + * \param rig Pointer to rig struct * */ int flushBuffer(RIG *rig) @@ -880,10 +880,10 @@ int flushBuffer(RIG *rig) #endif /* - * /brief Lock receiver for remote operations + * \brief Lock receiver for remote operations * - * /param rig Pointer to rig struct - * /param level Lock level (0-3) + * \param rig Pointer to rig struct + * \param level Lock level (0-3) * */ int lockRx(RIG *rig, enum LOCK_LVL_e level) @@ -1104,11 +1104,11 @@ int getFilterBW(RIG *rig, enum FILTER_e filter) } /* - * /brief Convert DDS steps to frequency in Hz + * \brief Convert DDS steps to frequency in Hz * - * /param steps DDS count + * \param steps DDS count * - * /return Frequency in Hz or 0 on failure + * \return Frequency in Hz or 0 on failure */ freq_t ddsToHz(const unsigned int steps) { @@ -1120,11 +1120,11 @@ freq_t ddsToHz(const unsigned int steps) } /* - * /brief Convert frequency in Hz to DDS steps + * \brief Convert frequency in Hz to DDS steps * - * /param freq Frequency in Hz + * \param freq Frequency in Hz * - * /return DDS steps (24 bits) or 0 on failure + * \return DDS steps (24 bits) or 0 on failure */ unsigned int hzToDDS(const freq_t freq) { @@ -1156,11 +1156,11 @@ unsigned int hzToDDS(const freq_t freq) } /* - * /brief Convert PBS/BFO steps to frequency in Hz + * \brief Convert PBS/BFO steps to frequency in Hz * - * /param steps PBS/BFO offset steps + * \param steps PBS/BFO offset steps * - * /return Frequency in Hz or 0 on failure + * \return Frequency in Hz or 0 on failure * * Max +ve offset is 127, max -ve offset is 128 * Min -ve offset is 255 @@ -1187,11 +1187,11 @@ float pbsToHz(const unsigned char steps) #ifdef XXREMOVEDXX // this function is not referenced anywhere /* - * /brief Convert PBS/BFO offset frequency in Hz to steps + * \brief Convert PBS/BFO offset frequency in Hz to steps * - * /param freq Offset frequency in Hz + * \param freq Offset frequency in Hz * - * /return steps (8 bits) or 0 on failure + * \return steps (8 bits) or 0 on failure */ unsigned char hzToPBS(const float freq) { @@ -1229,11 +1229,11 @@ unsigned char hzToPBS(const float freq) #endif /* - * /brief Convert native Mode to Hamlib mode + * \brief Convert native Mode to Hamlib mode * - * /param mode Native mode value + * \param mode Native mode value * - * /return Hamlib mode value + * \return Hamlib mode value */ rmode_t modeToHamlib(const unsigned char mode) { @@ -1280,11 +1280,11 @@ rmode_t modeToHamlib(const unsigned char mode) } /* - * /brief Convert Hamlib Mode to native mode + * \brief Convert Hamlib Mode to native mode * - * /param mode Hamlib mode value + * \param mode Hamlib mode value * - * /return Native mode value + * \return Native mode value */ unsigned char modeToNative(const rmode_t mode) { @@ -1331,11 +1331,11 @@ unsigned char modeToNative(const rmode_t mode) } /* - * /brief Convert native AGC speed to Hamlib AGC speed + * \brief Convert native AGC speed to Hamlib AGC speed * - * /param agc Native AGC speed value + * \param agc Native AGC speed value * - * /return Hamlib AGC speed value + * \return Hamlib AGC speed value */ enum agc_level_e agcToHamlib(const unsigned char agc) { @@ -1370,11 +1370,11 @@ enum agc_level_e agcToHamlib(const unsigned char agc) } /* - * /brief Convert Hamlib AGC speed to native AGC speed + * \brief Convert Hamlib AGC speed to native AGC speed * - * /param agc Hamlib AGC speed value + * \param agc Hamlib AGC speed value * - * /return Native AGC speed value + * \return Native AGC speed value */ unsigned char agcToNative(const enum agc_level_e agc) { @@ -1413,11 +1413,11 @@ unsigned char agcToNative(const enum agc_level_e agc) } /* - * /brief Get page size + * \brief Get page size * - * /param page Page to get size of + * \param page Page to get size of * - * /return Page size, -1 on error + * \return Page size, -1 on error */ int pageSize(const enum PAGE_e page) { @@ -1440,9 +1440,9 @@ int pageSize(const enum PAGE_e page) } /* - * /brief Set and execute IR controller code + * \brief Set and execute IR controller code * - * /param code IR code to execute + * \param code IR code to execute * * \return RIG_OK on success, error code on failure */ diff --git a/src/misc.c b/src/misc.c index b65722182..0a59f1499 100644 --- a/src/misc.c +++ b/src/misc.c @@ -1028,7 +1028,7 @@ static const struct { AMP_LEVEL_NONE, "" }, }; -/* +/** * \brief check input to set_level * \param rig Pointer to rig data * \param level RIG_LEVEL_* trying to set diff --git a/src/rig.c b/src/rig.c index 71944b292..5fff46aae 100644 --- a/src/rig.c +++ b/src/rig.c @@ -2976,7 +2976,7 @@ int HAMLIB_API rig_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) RETURNFUNC(retcode); } -/* +/** * \brief get the mode of the target VFO * \param rig The rig handle * \param vfo The target VFO ----------------------------------------------------------------------- Summary of changes: rigs/aor/ar7030p.c | 128 +++++++++++++++++------------------ rigs/aor/ar7030p_utils.c | 170 +++++++++++++++++++++++------------------------ src/misc.c | 2 +- src/rig.c | 2 +- 4 files changed, 151 insertions(+), 151 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-06-07 02:15:52
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 778edf7757966c6e8df1089c8536f81fad64288b (commit) via 4ce5763cb96444225e4ebe6d95c4420f110a375e (commit) from 98d1d4f57b0d0a297dc3e082cb693dfdae74efe5 (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 778edf7757966c6e8df1089c8536f81fad64288b Merge: 98d1d4f57 4ce5763cb Author: Nate Bargmann <n0...@n0...> Date: Fri Jun 6 21:11:36 2025 -0500 Merge GitHub PR #1757 commit 4ce5763cb96444225e4ebe6d95c4420f110a375e Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Fri Jun 6 19:05:38 2025 +0200 Fix exit statuses Exit status 2 is for invalid command line options or arguments. Exit status 2 is for errors returned by Hamlib. diff --git a/tests/rigctlcom.c b/tests/rigctlcom.c index a9d4e0142..09eb14a3b 100644 --- a/tests/rigctlcom.c +++ b/tests/rigctlcom.c @@ -413,7 +413,7 @@ int main(int argc, char *argv[]) if (argc == 1) { usage(); - exit(2); + exit(1); } my_rig = rig_init(my_model); @@ -443,7 +443,7 @@ int main(int argc, char *argv[]) if (my_model > 5 && !rig_file) { fprintf(stderr, "-r rig com port not provided\n"); - exit(2); + exit(1); } if (rig_file) @@ -454,7 +454,7 @@ int main(int argc, char *argv[]) if (!rig_file2) { fprintf(stderr, "-R com port not provided\n"); - exit(2); + exit(1); } strncpy(my_com.pathname, rig_file2, HAMLIB_FILPATHLEN - 1); diff --git a/tests/rigctld.c b/tests/rigctld.c index ae7fbf0cc..9ffb01a6f 100644 --- a/tests/rigctld.c +++ b/tests/rigctld.c @@ -783,7 +783,7 @@ int main(int argc, char *argv[]) else { fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(retcode)); - exit(2); + exit(1); } saved_result = result; @@ -798,7 +798,7 @@ int main(int argc, char *argv[]) { handle_error(RIG_DEBUG_ERR, "socket"); freeaddrinfo(saved_result); /* No longer needed */ - exit(2); + exit(1); } const int optval = 1; diff --git a/tests/rotctld.c b/tests/rotctld.c index 744dff685..d8a44d420 100644 --- a/tests/rotctld.c +++ b/tests/rotctld.c @@ -423,7 +423,7 @@ int main(int argc, char *argv[]) if (retcode != 0) { fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(retcode)); - exit(2); + exit(1); } saved_result = result; ----------------------------------------------------------------------- Summary of changes: tests/rigctlcom.c | 6 +++--- tests/rigctld.c | 4 ++-- tests/rotctld.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-06-07 02:10:05
|
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 d901969d351b867ee6a176125c3ac4bdbbbacaaf (commit) via 8a4e550978fd0a499781710ed0fd581e6099dde8 (commit) from bb8b764412e033b30a07c2b28aaf5bda29580180 (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 d901969d351b867ee6a176125c3ac4bdbbbacaaf Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Fri Jun 6 21:00:40 2025 +0200 Fix typo Do the same change as in commit 42f41773 (cherry picked from commit 0123cce1356b99ff15d9d3a400556bd0b8de7e8b) diff --git a/doc/man1/rigctl.1 b/doc/man1/rigctl.1 index 2fec9b6a9..557b3028c 100644 --- a/doc/man1/rigctl.1 +++ b/doc/man1/rigctl.1 @@ -538,7 +538,7 @@ option above) only a single VFO parameter is required: .IP .in +4n .EX -.RB $ " rigctl -m 229 -r /dev/rig -o" +.RB $ " rigctl -m 2029 -r /dev/rig -o" Rig command: V VFO: VFOB commit 8a4e550978fd0a499781710ed0fd581e6099dde8 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Fri Jun 6 19:19:39 2025 +0200 Fix syntax error Fixes an error that happens when trying to run the example: $ nc -w 1 localhost 4532P nc: port number invalid: 4532P (cherry picked from commit 2967945e327d91eb08413140fc80759527ae0c56) diff --git a/doc/man1/rigctld.1 b/doc/man1/rigctld.1 index 187ecfce1..b8bd84949 100644 --- a/doc/man1/rigctld.1 +++ b/doc/man1/rigctld.1 @@ -1741,7 +1741,7 @@ default protocol from the shell prompt: .PP .in +4n .EX -$ \fBecho "\\set_freq 14266000" | nc -w 1 localhost 4532\P +$ \fBecho "\\set_freq 14266000" | nc -w 1 localhost 4532\fP .EE .in . ----------------------------------------------------------------------- Summary of changes: doc/man1/rigctl.1 | 2 +- doc/man1/rigctld.1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-06-07 02:08:17
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 98d1d4f57b0d0a297dc3e082cb693dfdae74efe5 (commit) via 0123cce1356b99ff15d9d3a400556bd0b8de7e8b (commit) via 2967945e327d91eb08413140fc80759527ae0c56 (commit) from b17644d4e3d53b36ec168574cec8b5a770c7fe46 (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 98d1d4f57b0d0a297dc3e082cb693dfdae74efe5 Merge: b17644d4e 0123cce13 Author: Nate Bargmann <n0...@n0...> Date: Fri Jun 6 21:05:04 2025 -0500 Merge GitHub PR #1756 commit 0123cce1356b99ff15d9d3a400556bd0b8de7e8b Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Fri Jun 6 21:00:40 2025 +0200 Fix typo Do the same change as in commit 42f41773 diff --git a/doc/man1/rigctl.1 b/doc/man1/rigctl.1 index 2fec9b6a9..557b3028c 100644 --- a/doc/man1/rigctl.1 +++ b/doc/man1/rigctl.1 @@ -538,7 +538,7 @@ option above) only a single VFO parameter is required: .IP .in +4n .EX -.RB $ " rigctl -m 229 -r /dev/rig -o" +.RB $ " rigctl -m 2029 -r /dev/rig -o" Rig command: V VFO: VFOB commit 2967945e327d91eb08413140fc80759527ae0c56 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Fri Jun 6 19:19:39 2025 +0200 Fix syntax error Fixes an error that happens when trying to run the example: $ nc -w 1 localhost 4532P nc: port number invalid: 4532P diff --git a/doc/man1/rigctld.1 b/doc/man1/rigctld.1 index 187ecfce1..b8bd84949 100644 --- a/doc/man1/rigctld.1 +++ b/doc/man1/rigctld.1 @@ -1741,7 +1741,7 @@ default protocol from the shell prompt: .PP .in +4n .EX -$ \fBecho "\\set_freq 14266000" | nc -w 1 localhost 4532\P +$ \fBecho "\\set_freq 14266000" | nc -w 1 localhost 4532\fP .EE .in . ----------------------------------------------------------------------- Summary of changes: doc/man1/rigctl.1 | 2 +- doc/man1/rigctld.1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-06-07 01:52: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, Hamlib-4.6.3 has been updated via bb8b764412e033b30a07c2b28aaf5bda29580180 (commit) from 26340d9a8a2f98d10b0477c4b70f584ae313ec23 (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 bb8b764412e033b30a07c2b28aaf5bda29580180 Author: markjfine <mar...@fi...> Date: Fri Jun 6 15:50:55 2025 -0400 Kill warnings Kills some warnings in jrc_set_func when compiling on Mac that weren't seen in Linux. (cherry picked from commit b17644d4e3d53b36ec168574cec8b5a770c7fe46) diff --git a/rigs/jrc/jrc.c b/rigs/jrc/jrc.c index 8f24f1e41..40cd79ff0 100644 --- a/rigs/jrc/jrc.c +++ b/rigs/jrc/jrc.c @@ -466,7 +466,7 @@ int jrc_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) int jrc_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) { char cmdbuf[BUFSZ]; - int blanker; + int blanker = 0; /* Optimize: * sort the switch cases with the most frequent first @@ -485,7 +485,7 @@ int jrc_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) blanker = 0; else if (func == RIG_FUNC_NB) blanker = 1; - else if (func == RIG_FUNC_NB2) + else //if (func == RIG_FUNC_NB2) blanker = 2; SNPRINTF(cmdbuf, sizeof(cmdbuf), "N%d" EOM, blanker); ----------------------------------------------------------------------- Summary of changes: rigs/jrc/jrc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-06-07 01:50: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 b17644d4e3d53b36ec168574cec8b5a770c7fe46 (commit) from 04a8503eab7fbf4cabd11766b01dc84603fb258b (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 b17644d4e3d53b36ec168574cec8b5a770c7fe46 Author: markjfine <mar...@fi...> Date: Fri Jun 6 15:50:55 2025 -0400 Kill warnings Kills some warnings in jrc_set_func when compiling on Mac that weren't seen in Linux. diff --git a/rigs/jrc/jrc.c b/rigs/jrc/jrc.c index 8f24f1e41..40cd79ff0 100644 --- a/rigs/jrc/jrc.c +++ b/rigs/jrc/jrc.c @@ -466,7 +466,7 @@ int jrc_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) int jrc_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) { char cmdbuf[BUFSZ]; - int blanker; + int blanker = 0; /* Optimize: * sort the switch cases with the most frequent first @@ -485,7 +485,7 @@ int jrc_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) blanker = 0; else if (func == RIG_FUNC_NB) blanker = 1; - else if (func == RIG_FUNC_NB2) + else //if (func == RIG_FUNC_NB2) blanker = 2; SNPRINTF(cmdbuf, sizeof(cmdbuf), "N%d" EOM, blanker); ----------------------------------------------------------------------- Summary of changes: rigs/jrc/jrc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-06-06 02:53:44
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 04a8503eab7fbf4cabd11766b01dc84603fb258b (commit) from c92fee947abdd74b1043ce46514694ca521d6272 (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 04a8503eab7fbf4cabd11766b01dc84603fb258b Author: Nate Bargmann <n0...@n0...> Date: Thu Jun 5 21:52:14 2025 -0500 Update NEWS diff --git a/NEWS b/NEWS index d11a05a6e..ab7ec0bc7 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,7 @@ Version 5.x -- future Version 4.7.0 * 2025-12-01 (target) + * Remove dead getopt code. GitHub PR #1709. (TNX Daniele Forsi) * Move rig_cache to separate(calloc) storage. Prepare for other moves. Issue #1420 @@ -24,6 +25,8 @@ Version 4.6.3 five years from 2020 to 2025. Mike passed away on March 28, 2025 due to complications from ALS (Lou Gehrig's disease). + * JRC: Removed RIG_FUNC_FAGC from 535D as erroneous, Added RIG_FUNC_NB2 + functionality to both 535D and 545. (TNX Mark Fine) * Restore IC-7300 spectrum data callback - regression in 4.6 (n3gb) * Add locking to rig_[gs]et_level() - fixes sending CW from tlf (n3gb) * Fix attempt to use memory returned by setlocale() after being freed (TNX Mooneer Salem) ----------------------------------------------------------------------- Summary of changes: NEWS | 3 +++ 1 file changed, 3 insertions(+) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-06-06 02:47:27
|
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 c92fee947abdd74b1043ce46514694ca521d6272 (commit) via 20b92ea1157af1ce97c28c3e71ec7d5eedd7c0ad (commit) from 735e1810dff3ddd10c54ccee303ccf9b9478f289 (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 c92fee947abdd74b1043ce46514694ca521d6272 Merge: 735e1810d 20b92ea11 Author: Nate Bargmann <n0...@n0...> Date: Thu Jun 5 21:42:20 2025 -0500 Merge GitHub PR #1709 commit 20b92ea1157af1ce97c28c3e71ec7d5eedd7c0ad Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Mon Apr 21 22:34:11 2025 +0200 Remove dead code The code removed could never be executed because getopt()/getopt_long() detect a missing argument only if it is at the end of the command line and return '?' which is handled by the default case of the switch which prints an error message to stderr. diff --git a/tests/ampctl.c b/tests/ampctl.c index 6a0cf29b3..4f4af3b9f 100644 --- a/tests/ampctl.c +++ b/tests/ampctl.c @@ -160,32 +160,14 @@ int main(int argc, char *argv[]) exit(0); case 'm': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - my_model = atoi(optarg); break; case 'r': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - amp_file = optarg; break; case 's': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) { fprintf(stderr, "Invalid baud rate of %s\n", optarg); @@ -195,12 +177,6 @@ int main(int argc, char *argv[]) break; case 'C': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (*conf_parms != '\0') { strcat(conf_parms, ","); @@ -217,12 +193,6 @@ int main(int argc, char *argv[]) break; case 't': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (strlen(optarg) > 1) { send_cmd_term = strtol(optarg, NULL, 0); diff --git a/tests/ampctld.c b/tests/ampctld.c index 079eb068b..bf065a257 100644 --- a/tests/ampctld.c +++ b/tests/ampctld.c @@ -203,32 +203,14 @@ int main(int argc, char *argv[]) exit(0); case 'm': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - my_model = atoi(optarg); break; case 'r': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - amp_file = optarg; break; case 's': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) { fprintf(stderr, "Invalid baud rate of %s\n", optarg); @@ -238,12 +220,6 @@ int main(int argc, char *argv[]) break; case 'C': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (*conf_parms != '\0') { strcat(conf_parms, ","); @@ -260,22 +236,10 @@ int main(int argc, char *argv[]) break; case 't': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - portno = optarg; break; case 'T': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - src_addr = optarg; break; diff --git a/tests/rigctl.c b/tests/rigctl.c index 35d1241b3..98e737afc 100644 --- a/tests/rigctl.c +++ b/tests/rigctl.c @@ -276,52 +276,22 @@ int main(int argc, char *argv[]) exit(0); case 'm': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - my_model = atoi(optarg); break; case 'r': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - rig_file = optarg; break; case 'p': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - ptt_file = optarg; break; case 'd': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - dcd_file = optarg; break; case 'P': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (!strcmp(optarg, "RIG")) { ptt_type = RIG_PTT_RIG; @@ -363,12 +333,6 @@ int main(int argc, char *argv[]) break; case 'D': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (!strcmp(optarg, "RIG")) { dcd_type = RIG_DCD_RIG; @@ -414,22 +378,10 @@ int main(int argc, char *argv[]) break; case 'c': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - civaddr = optarg; break; case 't': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (strlen(optarg) > 1) { send_cmd_term = strtol(optarg, NULL, 0); @@ -442,12 +394,6 @@ int main(int argc, char *argv[]) break; case 's': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) { fprintf(stderr, "Invalid baud rate of %s\n", optarg); @@ -457,12 +403,6 @@ int main(int argc, char *argv[]) break; case 'C': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (*conf_parms != '\0') { strcat(conf_parms, ","); diff --git a/tests/rigctlcom.c b/tests/rigctlcom.c index e7b8fbf07..63ec30d8c 100644 --- a/tests/rigctlcom.c +++ b/tests/rigctlcom.c @@ -258,63 +258,27 @@ int main(int argc, char *argv[]) break; case 'm': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - my_model = atoi(optarg); break; case 'r': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - rig_file = optarg; break; case 'R': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - rig_file2 = optarg; break; case 'p': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - ptt_file = optarg; break; case 'd': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - dcd_file = optarg; break; case 'P': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (!strcmp(optarg, "RIG")) { ptt_type = RIG_PTT_RIG; @@ -347,12 +311,6 @@ int main(int argc, char *argv[]) break; case 'D': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (!strcmp(optarg, "RIG")) { dcd_type = RIG_DCD_RIG; @@ -385,22 +343,10 @@ int main(int argc, char *argv[]) break; case 'c': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - civaddr = optarg; break; case 's': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) { fprintf(stderr, "Invalid baud rate of %s\n", optarg); @@ -410,23 +356,11 @@ int main(int argc, char *argv[]) break; case 'S': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - serial_rate2 = atoi(optarg); break; case 'C': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (*conf_parms != '\0') { strcat(conf_parms, ","); diff --git a/tests/rigctld.c b/tests/rigctld.c index 8ee613cf1..09cf3fb29 100644 --- a/tests/rigctld.c +++ b/tests/rigctld.c @@ -334,52 +334,22 @@ int main(int argc, char *argv[]) break; case 'm': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - my_model = atoi(optarg); break; case 'r': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - rig_file = optarg; break; case 'p': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - ptt_file = optarg; break; case 'd': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - dcd_file = optarg; break; case 'P': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (!strcmp(optarg, "RIG")) { ptt_type = RIG_PTT_RIG; @@ -421,12 +391,6 @@ int main(int argc, char *argv[]) break; case 'D': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (!strcmp(optarg, "RIG")) { dcd_type = RIG_DCD_RIG; @@ -472,33 +436,15 @@ int main(int argc, char *argv[]) break; case 'c': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - civaddr = optarg; break; case 'S': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - resp_sep = *optarg; rig_debug(RIG_DEBUG_VERBOSE, "%s: resp_sep=%c\n", __func__, resp_sep); break; case 's': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) { fprintf(stderr, "Invalid baud rate of %s\n", optarg); @@ -508,12 +454,6 @@ int main(int argc, char *argv[]) break; case 'C': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (strcmp(optarg, "auto_power_on=0") == 0) { rig_debug(RIG_DEBUG_ERR, "%s: skipping rig_open\n", __func__); @@ -540,22 +480,10 @@ int main(int argc, char *argv[]) break; case 't': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - portno = optarg; break; case 'T': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - src_addr = optarg; break; @@ -581,24 +509,12 @@ int main(int argc, char *argv[]) break; case 'W': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - twiddle_timeout = atoi(optarg); fprintf(stderr, "twiddle_timeout is deprecated...use e.g. --set-conf=twiddle_timeout=5\n"); break; case 'w': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - twiddle_rit = atoi(optarg); fprintf(stderr, "twiddle_rit is deprecated...use e.g. --set-conf=twiddle_rit=1\n"); @@ -606,12 +522,6 @@ int main(int argc, char *argv[]) case 'x': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - uplink = atoi(optarg); break; diff --git a/tests/rigctlsync.c b/tests/rigctlsync.c index a576b3af2..ce1a4a896 100644 --- a/tests/rigctlsync.c +++ b/tests/rigctlsync.c @@ -254,12 +254,6 @@ int main(int argc, char *argv[]) case 'm': case 'M': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (c == 'm') { my_model[0] = atoi(optarg); @@ -272,22 +266,10 @@ int main(int argc, char *argv[]) break; case 'r': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - rig_file = optarg; break; case 'R': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - rig_file2 = optarg; break; @@ -295,12 +277,6 @@ int main(int argc, char *argv[]) #if 0 case 'p': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - ptt_file = optarg; break; #endif @@ -308,12 +284,6 @@ int main(int argc, char *argv[]) #if 0 case 'd': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - dcd_file = optarg; break; #endif @@ -321,12 +291,6 @@ int main(int argc, char *argv[]) #if 0 case 'P': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (!strcmp(optarg, "RIG")) { ptt_type = RIG_PTT_RIG; @@ -362,12 +326,6 @@ int main(int argc, char *argv[]) #if 0 case 'D': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (!strcmp(optarg, "RIG")) { dcd_type = RIG_DCD_RIG; @@ -401,22 +359,10 @@ int main(int argc, char *argv[]) #endif case 'c': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - civaddr = optarg; break; case 's': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) { fprintf(stderr, "Invalid baud rate of %s\n", optarg); @@ -426,23 +372,11 @@ int main(int argc, char *argv[]) break; case 'S': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - serial_rate2 = atoi(optarg); break; case 'C': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (*conf_parms != '\0') { strcat(conf_parms, ","); diff --git a/tests/rigctltcp.c b/tests/rigctltcp.c index cf3a921d4..0450f1835 100644 --- a/tests/rigctltcp.c +++ b/tests/rigctltcp.c @@ -331,52 +331,22 @@ int main(int argc, char *argv[]) break; case 'm': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - my_model = atoi(optarg); break; case 'r': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - rig_file = optarg; break; case 'p': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - ptt_file = optarg; break; case 'd': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - dcd_file = optarg; break; case 'P': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (!strcmp(optarg, "RIG")) { ptt_type = RIG_PTT_RIG; @@ -418,12 +388,6 @@ int main(int argc, char *argv[]) break; case 'D': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (!strcmp(optarg, "RIG")) { dcd_type = RIG_DCD_RIG; @@ -469,33 +433,15 @@ int main(int argc, char *argv[]) break; case 'c': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - civaddr = optarg; break; case 'S': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - resp_sep = *optarg; rig_debug(RIG_DEBUG_VERBOSE, "%s: resp_sep=%c\n", __func__, resp_sep); break; case 's': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) { fprintf(stderr, "Invalid baud rate of %s\n", optarg); @@ -505,12 +451,6 @@ int main(int argc, char *argv[]) break; case 'C': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (*conf_parms != '\0') { strcat(conf_parms, ","); @@ -527,22 +467,10 @@ int main(int argc, char *argv[]) break; case 't': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - portno = optarg; break; case 'T': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - src_addr = optarg; break; @@ -568,24 +496,12 @@ int main(int argc, char *argv[]) break; case 'W': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - twiddle_timeout = atoi(optarg); fprintf(stderr, "twiddle_timeout is deprecated...use e.g. --set-conf=twiddle_timeout=5\n"); break; case 'w': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - twiddle_rit = atoi(optarg); fprintf(stderr, "twiddle_rit is deprecated...use e.g. --set-conf=twiddle_rit=1\n"); @@ -593,12 +509,6 @@ int main(int argc, char *argv[]) case 'x': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - uplink = atoi(optarg); break; @@ -608,22 +518,10 @@ int main(int argc, char *argv[]) break; case 'M': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - multicast_addr = optarg; break; case 'n': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - multicast_port = atoi(optarg); if (multicast_port == 0) diff --git a/tests/rigmem.c b/tests/rigmem.c index bf73e7102..5f134b467 100644 --- a/tests/rigmem.c +++ b/tests/rigmem.c @@ -128,42 +128,18 @@ int main(int argc, char *argv[]) exit(0); case 'm': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - my_model = atoi(optarg); break; case 'r': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - rig_file = optarg; break; case 'c': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - civaddr = optarg; break; case 's': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) { fprintf(stderr, "Invalid baud rate of %s\n", optarg); @@ -173,12 +149,6 @@ int main(int argc, char *argv[]) break; case 'C': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (*conf_parms != '\0') { strcat(conf_parms, ","); @@ -195,12 +165,6 @@ int main(int argc, char *argv[]) break; case 'p': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - csv_sep = optarg[0]; break; diff --git a/tests/rigsmtr.c b/tests/rigsmtr.c index aae17d2ec..88ac36bf4 100644 --- a/tests/rigsmtr.c +++ b/tests/rigsmtr.c @@ -113,42 +113,18 @@ int main(int argc, char *argv[]) exit(0); case 'm': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - rig_model = atoi(optarg); break; case 'r': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - rig_file = optarg; break; case 'c': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - civaddr = optarg; break; case 's': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) { fprintf(stderr, "Invalid baud rate of %s\n", optarg); @@ -158,12 +134,6 @@ int main(int argc, char *argv[]) break; case 'C': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (*rig_conf_parms != '\0') { strcat(rig_conf_parms, ","); @@ -180,42 +150,18 @@ int main(int argc, char *argv[]) break; case 'M': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - rot_model = atoi(optarg); break; case 'R': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - rot_file = optarg; break; case 'S': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - rot_serial_rate = atoi(optarg); break; case 'N': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (*rot_conf_parms != '\0') { strcat(rot_conf_parms, ","); diff --git a/tests/rigswr.c b/tests/rigswr.c index 0caf9bb22..86ce8aa7a 100644 --- a/tests/rigswr.c +++ b/tests/rigswr.c @@ -103,42 +103,18 @@ int main(int argc, char *argv[]) exit(0); case 'm': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - my_model = atoi(optarg); break; case 'r': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - rig_file = optarg; break; case 'c': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - civaddr = optarg; break; case 's': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) { fprintf(stderr, "Invalid baud rate of %s\n", optarg); @@ -148,12 +124,6 @@ int main(int argc, char *argv[]) break; case 'C': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (*conf_parms != '\0') { strcat(conf_parms, ","); @@ -170,22 +140,10 @@ int main(int argc, char *argv[]) break; case 'p': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - ptt_file = optarg; break; case 'P': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (!strcmp(optarg, "RIG")) { ptt_type = RIG_PTT_RIG; diff --git a/tests/rotctl.c b/tests/rotctl.c index 873c9b96e..ac874818d 100644 --- a/tests/rotctl.c +++ b/tests/rotctl.c @@ -168,42 +168,18 @@ int main(int argc, char *argv[]) exit(0); case 'm': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - my_model = atoi(optarg); break; case 'r': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - rot_file = optarg; break; case 'R': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - rot_file2 = optarg; break; case 's': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) { fprintf(stderr, "Invalid baud rate of %s\n", optarg); @@ -213,12 +189,6 @@ int main(int argc, char *argv[]) break; case 'C': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (*conf_parms != '\0') { strcat(conf_parms, ","); @@ -235,12 +205,6 @@ int main(int argc, char *argv[]) break; case 't': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (strlen(optarg) > 1) { send_cmd_term = strtol(optarg, NULL, 0); @@ -253,22 +217,10 @@ int main(int argc, char *argv[]) break; case 'o': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - az_offset = atof(optarg); break; case 'O': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - el_offset = atof(optarg); break; diff --git a/tests/rotctld.c b/tests/rotctld.c index e68227acf..ce6d1a101 100644 --- a/tests/rotctld.c +++ b/tests/rotctld.c @@ -196,42 +196,18 @@ int main(int argc, char *argv[]) exit(0); case 'm': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - my_model = atoi(optarg); break; case 'r': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - rot_file = optarg; break; case 'R': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - rot_file2 = optarg; break; case 's': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) { fprintf(stderr, "Invalid baud rate of %s\n", optarg); @@ -241,12 +217,6 @@ int main(int argc, char *argv[]) break; case 'C': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - if (*conf_parms != '\0') { strcat(conf_parms, ","); @@ -263,42 +233,18 @@ int main(int argc, char *argv[]) break; case 't': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - portno = optarg; break; case 'T': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - src_addr = optarg; break; case 'o': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - az_offset = atof(optarg); break; case 'O': - if (!optarg) - { - usage(); /* wrong arg count */ - exit(1); - } - el_offset = atof(optarg); case 'v': ----------------------------------------------------------------------- Summary of changes: tests/ampctl.c | 30 ---------------- tests/ampctld.c | 36 ------------------- tests/rigctl.c | 60 ------------------------------- tests/rigctlcom.c | 66 ---------------------------------- tests/rigctld.c | 90 ---------------------------------------------- tests/rigctlsync.c | 66 ---------------------------------- tests/rigctltcp.c | 102 ----------------------------------------------------- tests/rigmem.c | 36 ------------------- tests/rigsmtr.c | 54 ---------------------------- tests/rigswr.c | 42 ---------------------- tests/rotctl.c | 48 ------------------------- tests/rotctld.c | 54 ---------------------------- 12 files changed, 684 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-06-06 02:39:46
|
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 26340d9a8a2f98d10b0477c4b70f584ae313ec23 (commit) via cffa440c38ac05a80a9f170244ed8f8be9e7ce8d (commit) via 1a740dfbe225a84fea405416ec295c930710538e (commit) via f876f951ba2ce3a00ba51b7ffbb5cce82a4d2685 (commit) from a640201ad768137a787d9a158533f3ad3b6da727 (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 26340d9a8a2f98d10b0477c4b70f584ae313ec23 Author: Nate Bargmann <n0...@n0...> Date: Thu Jun 5 21:37:59 2025 -0500 Update NEWS for JRC 535D and 545 diff --git a/NEWS b/NEWS index 7e2378205..596fadb61 100644 --- a/NEWS +++ b/NEWS @@ -22,6 +22,8 @@ Version 4.6.3 five years from 2020 to 2025. Mike passed away on March 28, 2025 due to complications from ALS (Lou Gehrig's disease). + * JRC: Removed RIG_FUNC_FAGC from 535D as erroneous, Added RIG_FUNC_NB2 + functionality to both 535D and 545. (TNX Mark Fine) * Restore IC-7300 spectrum data callback - regression in 4.6 (n3gb) * Add locking to rig_[gs]et_level() - fixes sending CW from tlf (n3gb) * Fix attempt to use memory returned by setlocale() after being freed (TNX Mooneer Salem) commit cffa440c38ac05a80a9f170244ed8f8be9e7ce8d Author: markjfine <mar...@fi...> Date: Thu Jun 5 18:45:54 2025 -0400 Added NB2 Added RIG_FUNC_NB2 to the function list to complement RIG_FUNC_NB. (cherry picked from commit 735e1810dff3ddd10c54ccee303ccf9b9478f289) diff --git a/rigs/jrc/nrd545.c b/rigs/jrc/nrd545.c index 60ba7604f..d463bfc5a 100644 --- a/rigs/jrc/nrd545.c +++ b/rigs/jrc/nrd545.c @@ -28,7 +28,7 @@ #define NRD545_MODES (RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_SSB|RIG_MODE_FM|RIG_MODE_RTTY|RIG_MODE_AMS|RIG_MODE_ECSS) -#define NRD545_FUNC (RIG_FUNC_FAGC|RIG_FUNC_NB|RIG_FUNC_LOCK|RIG_FUNC_BC|RIG_FUNC_NR|RIG_FUNC_MN) +#define NRD545_FUNC (RIG_FUNC_FAGC|RIG_FUNC_NB|RIG_FUNC_NB2|RIG_FUNC_LOCK|RIG_FUNC_BC|RIG_FUNC_NR|RIG_FUNC_MN) #define NRD545_LEVEL (RIG_LEVEL_RAWSTR|RIG_LEVEL_STRENGTH|RIG_LEVEL_ATT|RIG_LEVEL_RF|RIG_LEVEL_AF|RIG_LEVEL_AGC|RIG_LEVEL_IF|RIG_LEVEL_NR|RIG_LEVEL_NOTCHF|RIG_LEVEL_SQL|RIG_LEVEL_IF|RIG_LEVEL_CWPITCH) /*RIG_LEVEL_BWC*/ @@ -213,4 +213,3 @@ struct rig_caps nrd545_caps = /* * Function definitions below */ - commit 1a740dfbe225a84fea405416ec295c930710538e Author: markjfine <mar...@fi...> Date: Thu Jun 5 18:42:18 2025 -0400 Removed FAGC and added NB2 Removed FAGC from the function list as erroneous for this model. Added RIG_FUNC_NB2 to the function list to complement RIG_FUNC_NB. (cherry picked from commit 472154a131a38c1a1513ccc331f1d65c60104a54) diff --git a/rigs/jrc/nrd535.c b/rigs/jrc/nrd535.c index e5eabb598..b56bc8f4f 100644 --- a/rigs/jrc/nrd535.c +++ b/rigs/jrc/nrd535.c @@ -28,7 +28,7 @@ #define NRD535_MODES (RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_SSB|RIG_MODE_FM|RIG_MODE_RTTY|RIG_MODE_ECSS|RIG_MODE_FAX) /* + FAX */ -#define NRD535_FUNC (RIG_FUNC_FAGC|RIG_FUNC_NB) +#define NRD535_FUNC (RIG_FUNC_NB|RIG_FUNC_NB2) #define NRD535_LEVEL (RIG_LEVEL_RAWSTR|RIG_LEVEL_STRENGTH|RIG_LEVEL_ATT|RIG_LEVEL_IF|RIG_LEVEL_AGC|RIG_LEVEL_CWPITCH) /*RIG_LEVEL_BWC*/ @@ -69,7 +69,6 @@ .freq = 1, \ .mode = 1, \ .width = 1, \ - .funcs = RIG_FUNC_FAGC, \ .levels = RIG_LEVEL_ATT|RIG_LEVEL_AGC, \ } @@ -211,4 +210,3 @@ struct rig_caps nrd535_caps = * Function definitions below */ - commit f876f951ba2ce3a00ba51b7ffbb5cce82a4d2685 Author: markjfine <mar...@fi...> Date: Thu Jun 5 18:35:27 2025 -0400 Fix NB and NB2 used by 535 and 545 JRC uses one command to switch between NB and NB2. Combined both in the get and set switch blocks to better accommodate this. (cherry picked from commit 6115a6ddf1001456c319f7e5d88e38da99f01ff8) diff --git a/rigs/jrc/jrc.c b/rigs/jrc/jrc.c index 91b9378d7..8f24f1e41 100644 --- a/rigs/jrc/jrc.c +++ b/rigs/jrc/jrc.c @@ -466,6 +466,7 @@ int jrc_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) int jrc_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) { char cmdbuf[BUFSZ]; + int blanker; /* Optimize: * sort the switch cases with the most frequent first @@ -479,11 +480,18 @@ int jrc_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) return jrc_transaction(rig, cmdbuf, strlen(cmdbuf), NULL, NULL); case RIG_FUNC_NB: - /* FIXME: NB1 and NB2 */ - SNPRINTF(cmdbuf, sizeof(cmdbuf), "N%d" EOM, status ? 1 : 0); - + case RIG_FUNC_NB2: + if (!status) + blanker = 0; + else if (func == RIG_FUNC_NB) + blanker = 1; + else if (func == RIG_FUNC_NB2) + blanker = 2; + + SNPRINTF(cmdbuf, sizeof(cmdbuf), "N%d" EOM, blanker); + return jrc_transaction(rig, cmdbuf, strlen(cmdbuf), NULL, NULL); - + /* * FIXME: which BB mode for NR and BC at same time ? */ @@ -555,7 +563,7 @@ int jrc_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status) return RIG_OK; case RIG_FUNC_NB: - /* FIXME: NB1 and NB2 */ + case RIG_FUNC_NB2: retval = jrc_transaction(rig, "N" EOM, 2, funcbuf, &func_len); if (retval != RIG_OK) @@ -570,7 +578,7 @@ int jrc_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status) return -RIG_ERJCTED; } - *status = funcbuf[1] != '0'; + *status = (((func == RIG_FUNC_NB) && (funcbuf[1] == '1')) || ((func == RIG_FUNC_NB2) && (funcbuf[1] == '2'))); return RIG_OK; @@ -1679,4 +1687,3 @@ DECLARE_INITRIG_BACKEND(jrc) return RIG_OK; } - ----------------------------------------------------------------------- Summary of changes: NEWS | 2 ++ rigs/jrc/jrc.c | 21 ++++++++++++++------- rigs/jrc/nrd535.c | 4 +--- rigs/jrc/nrd545.c | 3 +-- 4 files changed, 18 insertions(+), 12 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-06-06 02:34:22
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 735e1810dff3ddd10c54ccee303ccf9b9478f289 (commit) via 472154a131a38c1a1513ccc331f1d65c60104a54 (commit) via 6115a6ddf1001456c319f7e5d88e38da99f01ff8 (commit) from edef3747878659fb08f5c5b00d91fdb6014b8437 (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 735e1810dff3ddd10c54ccee303ccf9b9478f289 Author: markjfine <mar...@fi...> Date: Thu Jun 5 18:45:54 2025 -0400 Added NB2 Added RIG_FUNC_NB2 to the function list to complement RIG_FUNC_NB. diff --git a/rigs/jrc/nrd545.c b/rigs/jrc/nrd545.c index 60ba7604f..d463bfc5a 100644 --- a/rigs/jrc/nrd545.c +++ b/rigs/jrc/nrd545.c @@ -28,7 +28,7 @@ #define NRD545_MODES (RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_SSB|RIG_MODE_FM|RIG_MODE_RTTY|RIG_MODE_AMS|RIG_MODE_ECSS) -#define NRD545_FUNC (RIG_FUNC_FAGC|RIG_FUNC_NB|RIG_FUNC_LOCK|RIG_FUNC_BC|RIG_FUNC_NR|RIG_FUNC_MN) +#define NRD545_FUNC (RIG_FUNC_FAGC|RIG_FUNC_NB|RIG_FUNC_NB2|RIG_FUNC_LOCK|RIG_FUNC_BC|RIG_FUNC_NR|RIG_FUNC_MN) #define NRD545_LEVEL (RIG_LEVEL_RAWSTR|RIG_LEVEL_STRENGTH|RIG_LEVEL_ATT|RIG_LEVEL_RF|RIG_LEVEL_AF|RIG_LEVEL_AGC|RIG_LEVEL_IF|RIG_LEVEL_NR|RIG_LEVEL_NOTCHF|RIG_LEVEL_SQL|RIG_LEVEL_IF|RIG_LEVEL_CWPITCH) /*RIG_LEVEL_BWC*/ @@ -213,4 +213,3 @@ struct rig_caps nrd545_caps = /* * Function definitions below */ - commit 472154a131a38c1a1513ccc331f1d65c60104a54 Author: markjfine <mar...@fi...> Date: Thu Jun 5 18:42:18 2025 -0400 Removed FAGC and added NB2 Removed FAGC from the function list as erroneous for this model. Added RIG_FUNC_NB2 to the function list to complement RIG_FUNC_NB. diff --git a/rigs/jrc/nrd535.c b/rigs/jrc/nrd535.c index e5eabb598..b56bc8f4f 100644 --- a/rigs/jrc/nrd535.c +++ b/rigs/jrc/nrd535.c @@ -28,7 +28,7 @@ #define NRD535_MODES (RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_SSB|RIG_MODE_FM|RIG_MODE_RTTY|RIG_MODE_ECSS|RIG_MODE_FAX) /* + FAX */ -#define NRD535_FUNC (RIG_FUNC_FAGC|RIG_FUNC_NB) +#define NRD535_FUNC (RIG_FUNC_NB|RIG_FUNC_NB2) #define NRD535_LEVEL (RIG_LEVEL_RAWSTR|RIG_LEVEL_STRENGTH|RIG_LEVEL_ATT|RIG_LEVEL_IF|RIG_LEVEL_AGC|RIG_LEVEL_CWPITCH) /*RIG_LEVEL_BWC*/ @@ -69,7 +69,6 @@ .freq = 1, \ .mode = 1, \ .width = 1, \ - .funcs = RIG_FUNC_FAGC, \ .levels = RIG_LEVEL_ATT|RIG_LEVEL_AGC, \ } @@ -211,4 +210,3 @@ struct rig_caps nrd535_caps = * Function definitions below */ - commit 6115a6ddf1001456c319f7e5d88e38da99f01ff8 Author: markjfine <mar...@fi...> Date: Thu Jun 5 18:35:27 2025 -0400 Fix NB and NB2 used by 535 and 545 JRC uses one command to switch between NB and NB2. Combined both in the get and set switch blocks to better accommodate this. diff --git a/rigs/jrc/jrc.c b/rigs/jrc/jrc.c index 91b9378d7..8f24f1e41 100644 --- a/rigs/jrc/jrc.c +++ b/rigs/jrc/jrc.c @@ -466,6 +466,7 @@ int jrc_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) int jrc_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) { char cmdbuf[BUFSZ]; + int blanker; /* Optimize: * sort the switch cases with the most frequent first @@ -479,11 +480,18 @@ int jrc_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) return jrc_transaction(rig, cmdbuf, strlen(cmdbuf), NULL, NULL); case RIG_FUNC_NB: - /* FIXME: NB1 and NB2 */ - SNPRINTF(cmdbuf, sizeof(cmdbuf), "N%d" EOM, status ? 1 : 0); - + case RIG_FUNC_NB2: + if (!status) + blanker = 0; + else if (func == RIG_FUNC_NB) + blanker = 1; + else if (func == RIG_FUNC_NB2) + blanker = 2; + + SNPRINTF(cmdbuf, sizeof(cmdbuf), "N%d" EOM, blanker); + return jrc_transaction(rig, cmdbuf, strlen(cmdbuf), NULL, NULL); - + /* * FIXME: which BB mode for NR and BC at same time ? */ @@ -555,7 +563,7 @@ int jrc_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status) return RIG_OK; case RIG_FUNC_NB: - /* FIXME: NB1 and NB2 */ + case RIG_FUNC_NB2: retval = jrc_transaction(rig, "N" EOM, 2, funcbuf, &func_len); if (retval != RIG_OK) @@ -570,7 +578,7 @@ int jrc_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status) return -RIG_ERJCTED; } - *status = funcbuf[1] != '0'; + *status = (((func == RIG_FUNC_NB) && (funcbuf[1] == '1')) || ((func == RIG_FUNC_NB2) && (funcbuf[1] == '2'))); return RIG_OK; @@ -1679,4 +1687,3 @@ DECLARE_INITRIG_BACKEND(jrc) return RIG_OK; } - ----------------------------------------------------------------------- Summary of changes: rigs/jrc/jrc.c | 21 ++++++++++++++------- rigs/jrc/nrd535.c | 4 +--- rigs/jrc/nrd545.c | 3 +-- 3 files changed, 16 insertions(+), 12 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-06-04 14:43:08
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via edef3747878659fb08f5c5b00d91fdb6014b8437 (commit) from b0d5d606fef17e349f5a2fd587fa429f8f89be30 (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 edef3747878659fb08f5c5b00d91fdb6014b8437 Author: Nate Bargmann <n0...@n0...> Date: Wed Jun 4 09:41:38 2025 -0500 Set the correct ABI_REVISION value diff --git a/configure.ac b/configure.ac index ce96ad667..4ef857e1d 100644 --- a/configure.ac +++ b/configure.ac @@ -75,7 +75,7 @@ dnl See README.release on setting these values # Values given to -version-info when linking. See libtool documentation. # Set them here to keep c++/Makefile and src/Makefile in sync. ABI_VERSION=4 -ABI_REVISION=6 +ABI_REVISION=7 ABI_PATCH=0 ABI_AGE=0 ----------------------------------------------------------------------- Summary of changes: configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-06-04 14:39: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 branch, master has been updated via b0d5d606fef17e349f5a2fd587fa429f8f89be30 (commit) via 1532432236a526a5d019eb1ece48eb8643b1fd7d (commit) via 3bdfdebacb59ab5d044515edd1954d4eba414469 (commit) via 29924af2f123e96241b69beb2185455f94706f64 (commit) via f5eb8f19e9dcdaabf654b095d671135f46ae5c90 (commit) via 1fca93a5a25b1afb6cc591d1769924bbaa746099 (commit) via 6f8bf815149f535831f8e1ced44d2b5e6a01bb97 (commit) via 7d28822273dec229da1ceca809a3d4f241e4749f (commit) via 4d322337c1d6d06edaa42887b2ba8430c53aa4f7 (commit) via 3bc9e5261be8359203419f8d8fe0d100b40f3eb0 (commit) via 6b5c5b48f9c7a0582beb0259f00a1bf1c81bf451 (commit) via 7fa0c863f262a937cae95450fd15056a0fbce12f (commit) via 63e1bb4c0096a974ad3388357c47c4398a587a84 (commit) from cccee9b7916548c2c48a1bfd55116fded3d3a6ed (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 b0d5d606fef17e349f5a2fd587fa429f8f89be30 Author: George Baltz N3GB <Geo...@gm...> Date: Wed Jun 4 09:46:51 2025 -0400 Update NEWS diff --git a/NEWS b/NEWS index 7e2378205..d11a05a6e 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,8 @@ Version 5.x -- future Version 4.7.0 * 2025-12-01 (target) + * Move rig_cache to separate(calloc) storage. Prepare for other moves. + Issue #1420 Version 4.6.3 * 2025-06-10 commit 1532432236a526a5d019eb1ece48eb8643b1fd7d Author: George Baltz N3GB <Geo...@gm...> Date: Wed May 21 13:49:18 2025 -0400 Move more rig_cache infrastructure to cache.[ch] Macros from rig.h, routines from misc.c Add some error checks and comments diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index b9cd59908..6656c5aeb 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -2522,7 +2522,7 @@ typedef hamlib_port_t port_t; #define RIGPORT(r) (&r->state.rigport) #define PTTPORT(r) (&r->state.pttport) #define DCDPORT(r) (&r->state.dcdport) -#define CACHE(r) ((r)->cache_addr) +//Moved to cache.h #define CACHE(r) ((r)->cache_addr) #define AMPPORT(a) (&a->state.ampport) #define ROTPORT(r) (&r->state.rotport) #define ROTPORT2(r) (&r->state.rotport2) @@ -2539,7 +2539,7 @@ typedef hamlib_port_t port_t; #define HAMLIB_RIGPORT(r) ((hamlib_port_t *)rig_data_pointer(r, RIG_PTRX_RIGPORT)) #define HAMLIB_PTTPORT(r) ((hamlib_port_t *)rig_data_pointer(r, RIG_PTRX_PTTPORT)) #define HAMLIB_DCDPORT(r) ((hamlib_port_t *)rig_data_pointer(r, RIG_PTRX_DCDPORT)) -#define HAMLIB_CACHE(r) ((struct rig_cache *)rig_data_pointer(r, RIG_PTRX_CACHE)) +//#define HAMLIB_CACHE(r) ((struct rig_cache *)rig_data_pointer(r, RIG_PTRX_CACHE)) #define HAMLIB_AMPPORT(a) ((hamlib_port_t *)amp_data_pointer(a, RIG_PTRX_AMPPORT)) #define HAMLIB_ROTPORT(r) ((hamlib_port_t *)rot_data_pointer(r, RIG_PTRX_ROTPORT)) #define HAMLIB_ROTPORT2(r) ((hamlib_port_t *)rot_data_pointer(r, RIG_PTRX_ROTPORT2)) diff --git a/src/cache.c b/src/cache.c index 3ae4e11ee..d66b64af4 100644 --- a/src/cache.c +++ b/src/cache.c @@ -310,8 +310,8 @@ int rig_set_cache_freq(RIG *rig, vfo_t vfo, freq_t freq) int rig_get_cache(RIG *rig, vfo_t vfo, freq_t *freq, int *cache_ms_freq, rmode_t *mode, int *cache_ms_mode, pbwidth_t *width, int *cache_ms_width) { - struct rig_cache *cachep = CACHE(rig); - struct rig_state *rs = STATE(rig); + struct rig_cache *cachep; + struct rig_state *rs; if (CHECK_RIG_ARG(rig) || !freq || !cache_ms_freq || !mode || !cache_ms_mode || !width || !cache_ms_width) @@ -319,6 +319,9 @@ int rig_get_cache(RIG *rig, vfo_t vfo, freq_t *freq, int *cache_ms_freq, return -RIG_EINVAL; } + cachep = CACHE(rig); + rs = STATE(rig); + if (rig_need_debug(RIG_DEBUG_CACHE)) { ENTERFUNC2; @@ -565,6 +568,25 @@ int rig_get_cache_freq(RIG *rig, vfo_t vfo, freq_t *freq, int *cache_ms_freq_p) return retval; } +/* Get cache timeout period + * Returns value in msec, -1 if error + */ +int HAMLIB_API rig_get_cache_timeout_ms(RIG *rig, hamlib_cache_t selection) +{ + rig_debug(RIG_DEBUG_TRACE, "%s: called selection=%d\n", __func__, selection); + if (!rig) {return -1;} + return CACHE(rig)->timeout_ms; +} + +int HAMLIB_API rig_set_cache_timeout_ms(RIG *rig, hamlib_cache_t selection, + int ms) +{ + rig_debug(RIG_DEBUG_TRACE, "%s: called selection=%d, ms=%d\n", __func__, + selection, ms); + if (!rig) {return -RIG_EINVAL;} + CACHE(rig)->timeout_ms = ms; + return RIG_OK; +} void rig_cache_show(RIG *rig, const char *func, int line) { diff --git a/src/cache.h b/src/cache.h index e977273de..80ee340b8 100644 --- a/src/cache.h +++ b/src/cache.h @@ -28,6 +28,14 @@ __BEGIN_DECLS +/* It should be noted that there are two distinct cache implementations + * in Hamlib. This one is for the app-facing side, providing cached status + * (freq, mode, band, etc) for application queries. The other is used by + * backends for rig status probes, watchdog timers, and other hardware related + * tasks. Also note that they use different times - timespec vs timeval. + * - n3gb 2025-05-14 + */ + /** * \brief Rig cache data * @@ -108,6 +116,13 @@ struct rig_cache { int satmode; // if rig is in satellite mode }; +/* Access macros */ +#define CACHE(r) ((r)->cache_addr) +//#define HAMLIB_CACHE(r) ((struct rig_cache *)rig_data_pointer(r, RIG_PTRX_CACHE)) + +/* Function templates + * Does not include those marked as part of HAMLIB_API + */ int rig_set_cache_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width); int rig_set_cache_freq(RIG *rig, vfo_t vfo, freq_t freq); void rig_cache_show(RIG *rig, const char *func, int line); diff --git a/src/misc.c b/src/misc.c index b81f5b37c..b65722182 100644 --- a/src/misc.c +++ b/src/misc.c @@ -1967,6 +1967,7 @@ double HAMLIB_API elapsed_ms(struct timespec *start, int option) break; } + // Casts used to make sure the add is done as double elapsed_msec = (double)((stop.tv_sec - start->tv_sec) * 1000) + // sec -> ms (double)(stop.tv_nsec - start->tv_nsec) / 1e6; // ns -> ms @@ -1978,22 +1979,6 @@ double HAMLIB_API elapsed_ms(struct timespec *start, int option) } //! @endcond - -int HAMLIB_API rig_get_cache_timeout_ms(RIG *rig, hamlib_cache_t selection) -{ - rig_debug(RIG_DEBUG_TRACE, "%s: called selection=%d\n", __func__, selection); - return CACHE(rig)->timeout_ms; -} - -int HAMLIB_API rig_set_cache_timeout_ms(RIG *rig, hamlib_cache_t selection, - int ms) -{ - rig_debug(RIG_DEBUG_TRACE, "%s: called selection=%d, ms=%d\n", __func__, - selection, ms); - CACHE(rig)->timeout_ms = ms; - return RIG_OK; -} - static char *funcname = "Unknown"; static int linenum = 0; commit 3bdfdebacb59ab5d044515edd1954d4eba414469 Author: George Baltz N3GB <Geo...@gm...> Date: Wed May 14 15:21:24 2025 -0400 Simplify elapsed time computation Do as much of the arithmetic in integers as possible. Convert both parts to final units(msec) and add. The casts are actually unneeded, but show when the conversions are done. And drop an unreachable break. diff --git a/src/misc.c b/src/misc.c index 37566539d..b81f5b37c 100644 --- a/src/misc.c +++ b/src/misc.c @@ -1959,7 +1959,6 @@ double HAMLIB_API elapsed_ms(struct timespec *start, int option) //rig_debug(RIG_DEBUG_TRACE, "%s: after gettime, start = %ld,%ld\n", __func__, // (long)start->tv_sec, (long)start->tv_nsec); return 999 * 1000; // so we can tell the difference in debug where we came from - break; case HAMLIB_ELAPSED_INVALIDATE: clock_gettime(CLOCK_REALTIME, start); @@ -1968,8 +1967,8 @@ double HAMLIB_API elapsed_ms(struct timespec *start, int option) break; } - elapsed_msec = ((stop.tv_sec - start->tv_sec) + (stop.tv_nsec / 1e9 - - start->tv_nsec / 1e9)) * 1e3; + elapsed_msec = (double)((stop.tv_sec - start->tv_sec) * 1000) + // sec -> ms + (double)(stop.tv_nsec - start->tv_nsec) / 1e6; // ns -> ms //rig_debug(RIG_DEBUG_TRACE, "%s: elapsed_msecs=%.0f\n", __func__, elapsed_msec); commit 29924af2f123e96241b69beb2185455f94706f64 Author: George Baltz N3GB <Geo...@gm...> Date: Mon May 12 15:05:51 2025 -0400 Minor cleanups Noticed while perusing cache code. diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 828731d2e..38e12e82b 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -6030,10 +6030,10 @@ int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq) if (ptt) { int cache_ms_freq; - rig_get_cache_freq(rig, vfo, tx_freq, &cache_ms_freq); + retval = rig_get_cache_freq(rig, vfo, tx_freq, &cache_ms_freq); rig_debug(RIG_DEBUG_TRACE, "%s: ptt is on so returning last known freq\n", __func__); - RETURNFUNC2(RIG_OK); + RETURNFUNC2(retval); } } diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index 45bd5012f..1596c2dfe 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -666,19 +666,13 @@ transaction_read: * the decoder for callback. That way we don't ignore any * commands. */ - // if we got FA or FB unexpectedly then perhaps RIG_TRN is enabled and we just need to handle it - if (strncmp(buffer, "FA", 2) == 0) + // If we got FA or FB unexpectedly then perhaps RIG_TRN is enabled + // and we just need to handle it + if (buffer[0] == 'F' && (buffer[1] == 'A' || buffer[1] == 'B')) { freq_t freq; - sscanf(buffer, "FA%lg", &freq); - rig_set_cache_freq(rig, RIG_VFO_A, freq); - goto transaction_read; - } - else if (strncmp(buffer, "FB", 2) == 0) - { - freq_t freq; - sscanf(buffer, "FB%lg", &freq); - rig_set_cache_freq(rig, RIG_VFO_B, freq); + sscanf(buffer + 2, "%lg", &freq); + rig_set_cache_freq(rig, buffer[1] == 'A' ? RIG_VFO_A : RIG_VFO_B, freq); goto transaction_read; } commit f5eb8f19e9dcdaabf654b095d671135f46ae5c90 Author: George Baltz N3GB <Geo...@gm...> Date: Sat May 3 21:56:45 2025 -0400 Add utility routine to release all allocated buffers, including rig itself. One stop shopping for all your rig data cleanup needs. diff --git a/src/rig.c b/src/rig.c index 922f45912..71944b292 100644 --- a/src/rig.c +++ b/src/rig.c @@ -529,6 +529,27 @@ static int rig_check_rig_caps() return (rc); } +/* Final cleanup of rig structure + * + * Release all allocations for this rig, including the rig_struct + * Clear them to catch use-after-free errors + */ +static void vaporize(RIG *rig) +{ + if (CACHE(rig)) + { + free(CACHE(rig)); + CACHE(rig) = NULL; + } + + /* Other buffers go here, as they are converted + * to pointers/calloc - WIP + */ + + free(rig); + return; +} + /** * \brief Allocate a new #RIG handle. * \param rig_model The rig model for this new handle @@ -638,7 +659,7 @@ RIG *HAMLIB_API rig_init(rig_model_t rig_model) if (!CACHE(rig)) { rig_debug(RIG_DEBUG_ERR, "%s:Cache calloc failed\n", __func__); - free(rig); //TODO Replace with cleanup routine + vaporize(rig); return NULL; } cachep = CACHE(rig); @@ -943,7 +964,7 @@ RIG *HAMLIB_API rig_init(rig_model_t rig_model) "%s: backend_init failed!\n", __func__); /* cleanup and exit */ - free(rig); + vaporize(rig); return (NULL); } } @@ -1885,15 +1906,8 @@ int HAMLIB_API rig_cleanup(RIG *rig) //pthread_mutex_destroy(&STATE(rig)->api_mutex); - //TODO Release and null any allocated data - - // state, ports, cache, etc. - if (CACHE(rig)) - { - free(CACHE(rig)); - CACHE(rig) = NULL; - } - - free(rig); + /* Release all buffers, and the rig_struct itself */ + vaporize(rig); return (RIG_OK); } commit 1fca93a5a25b1afb6cc591d1769924bbaa746099 Author: George Baltz N3GB <Geo...@gm...> Date: Fri May 2 16:21:43 2025 -0400 Deprecate rig_cache definition in rig.h Add new rig_cache definition in cache.h diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index cb2d7c48f..b9cd59908 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -2589,9 +2589,10 @@ typedef enum { * \brief Rig cache data * * This struct contains all the items we cache at the highest level - * DO NOT MODIFY THIS STRUCTURE AT ALL -- we need a new cache that is a pointer rather than a structure + * DO NOT MODIFY THIS STRUCTURE AT ALL -- should go away in 5.0 + * see cache.h - new cache is a pointer rather than an embedded structure */ -struct rig_cache { +struct rig_cache_deprecated { int timeout_ms; // the cache timeout for invalidating itself vfo_t vfo; //freq_t freq; // to be deprecated in 4.1 when full Main/Sub/A/B caching is implemented in 4.1 @@ -2784,7 +2785,7 @@ struct rig_state { int twiddle_timeout; /*!< timeout to resume from twiddling */ // uplink allows gpredict to behave better by no reading the uplink VFO int uplink; /*!< uplink=1 will not read Sub, uplink=2 will not read Main */ - struct rig_cache cache; + struct rig_cache_deprecated cache; // Only here for backward compatability int vfo_opt; /*!< Is -o switch turned on? */ int auto_power_on; /*!< Allow Hamlib to power on rig automatically if supported */ @@ -2984,7 +2985,7 @@ struct rig_state_deprecated { int twiddle_timeout; /*!< timeout to resume from twiddling */ // uplink allows gpredict to behave better by no reading the uplink VFO int uplink; /*!< uplink=1 will not read Sub, uplink=2 will not read Main */ - struct rig_cache cache; + struct rig_cache_deprecated cache; // Here for backward compatibility int vfo_opt; /*!< Is -o switch turned on? */ int auto_power_on; /*!< Allow Hamlib to power on rig automatically if supported */ diff --git a/src/cache.h b/src/cache.h index 08d98ea5f..e977273de 100644 --- a/src/cache.h +++ b/src/cache.h @@ -19,14 +19,99 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ #ifndef _CACHE_H #define _CACHE_H #include <hamlib/rig.h> +__BEGIN_DECLS + +/** + * \brief Rig cache data + * + * This struct contains all the items we cache at the highest level + * Replaces cache structure(s) in state + */ +struct rig_cache { + int timeout_ms; // the cache timeout for invalidating itself + vfo_t vfo; + //freq_t freq; // to be deprecated in 4.1 when full Main/Sub/A/B caching is implemented in 4.1 + // other abstraction here is based on dual vfo rigs and mapped to all others + // So we have four possible states of rig + // MainA, MainB, SubA, SubB + // Main is the Main VFO and Sub is for the 2nd VFO + // Most rigs have MainA and MainB + // Dual VFO rigs can have SubA and SubB too + // For dual VFO rigs simplex operations are all done on MainA/MainB -- ergo this abstraction + freq_t freqCurr; // Other VFO + freq_t freqOther; // Other VFO + freq_t freqMainA; // VFO_A, VFO_MAIN, and VFO_MAINA + freq_t freqMainB; // VFO_B, VFO_SUB, and VFO_MAINB + freq_t freqMainC; // VFO_C, VFO_MAINC + freq_t freqSubA; // VFO_SUBA -- only for rigs with dual Sub VFOs + freq_t freqSubB; // VFO_SUBB -- only for rigs with dual Sub VFOs + freq_t freqSubC; // VFO_SUBC -- only for rigs with 3 Sub VFOs + freq_t freqMem; // VFO_MEM -- last MEM channel + rmode_t modeCurr; + rmode_t modeOther; + rmode_t modeMainA; + rmode_t modeMainB; + rmode_t modeMainC; + rmode_t modeSubA; + rmode_t modeSubB; + rmode_t modeSubC; + rmode_t modeMem; + pbwidth_t widthCurr; // if non-zero then rig has separate width for MainA + pbwidth_t widthOther; // if non-zero then rig has separate width for MainA + pbwidth_t widthMainA; // if non-zero then rig has separate width for MainA + pbwidth_t widthMainB; // if non-zero then rig has separate width for MainB + pbwidth_t widthMainC; // if non-zero then rig has separate width for MainC + pbwidth_t widthSubA; // if non-zero then rig has separate width for SubA + pbwidth_t widthSubB; // if non-zero then rig has separate width for SubB + pbwidth_t widthSubC; // if non-zero then rig has separate width for SubC + pbwidth_t widthMem; // if non-zero then rig has separate width for Mem + ptt_t ptt; + split_t split; + vfo_t split_vfo; // split caches two values + struct timespec time_freqCurr; + struct timespec time_freqOther; + struct timespec time_freqMainA; + struct timespec time_freqMainB; + struct timespec time_freqMainC; + struct timespec time_freqSubA; + struct timespec time_freqSubB; + struct timespec time_freqSubC; + struct timespec time_freqMem; + struct timespec time_vfo; + struct timespec time_modeCurr; + struct timespec time_modeOther; + struct timespec time_modeMainA; + struct timespec time_modeMainB; + struct timespec time_modeMainC; + struct timespec time_modeSubA; + struct timespec time_modeSubB; + struct timespec time_modeSubC; + struct timespec time_modeMem; + struct timespec time_widthCurr; + struct timespec time_widthOther; + struct timespec time_widthMainA; + struct timespec time_widthMainB; + struct timespec time_widthMainC; + struct timespec time_widthSubA; + struct timespec time_widthSubB; + struct timespec time_widthSubC; + struct timespec time_widthMem; + struct timespec time_ptt; + struct timespec time_split; + int satmode; // if rig is in satellite mode +}; + int rig_set_cache_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width); int rig_set_cache_freq(RIG *rig, vfo_t vfo, freq_t freq); void rig_cache_show(RIG *rig, const char *func, int line); +__END_DECLS + #endif commit 6f8bf815149f535831f8e1ced44d2b5e6a01bb97 Author: George Baltz N3GB <Geo...@gm...> Date: Tue Apr 29 02:57:52 2025 -0400 Allocate separate storage for cache buffer Add address to rig_struct, change CACHE() macro to use it. Free it when done. Issue #1420 diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 814eb2921..cb2d7c48f 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -253,10 +253,14 @@ enum rig_debug_level_e { /* --------------- Rig capabilities -----------------*/ -/* Forward struct references */ +/* Forward struct references + * may also include structures defined elsewhere, + * but pointed to by rig + */ struct rig; struct rig_state; +struct rig_cache; /** * \brief Rig structure definition (see rig for details). @@ -2518,7 +2522,7 @@ typedef hamlib_port_t port_t; #define RIGPORT(r) (&r->state.rigport) #define PTTPORT(r) (&r->state.pttport) #define DCDPORT(r) (&r->state.dcdport) -#define CACHE(r) (&r->state.cache) +#define CACHE(r) ((r)->cache_addr) #define AMPPORT(a) (&a->state.ampport) #define ROTPORT(r) (&r->state.rotport) #define ROTPORT2(r) (&r->state.rotport2) @@ -3101,6 +3105,10 @@ struct s_rig { struct rig_callbacks callbacks; /*!< registered event callbacks */ // state should really be a pointer but that's a LOT of changes involved struct rig_state state; /*!< Rig state */ +/* Data beyond this line is for hamlib internal use only, + * and should *NOT* be referenced by applications, as layout will change! + */ + struct rig_cache *cache_addr; }; diff --git a/src/rig.c b/src/rig.c index 1be0bad4a..922f45912 100644 --- a/src/rig.c +++ b/src/rig.c @@ -549,6 +549,7 @@ RIG *HAMLIB_API rig_init(rig_model_t rig_model) hamlib_port_t *rp, *pttp, *dcdp; struct rig_cache *cachep; int i; + size_t needed; if (rig_test_2038(NULL)) { @@ -598,7 +599,9 @@ RIG *HAMLIB_API rig_init(rig_model_t rig_model) * okay, we've found it. Allocate some memory and set it to zeros, * and especially the callbacks */ - rig = calloc(1, sizeof(RIG)); + needed = sizeof(RIG); + rig_debug(RIG_DEBUG_TRACE, "Requesting %zd bytes for rig_struct\n", needed); + rig = calloc(1, needed); if (rig == NULL) { @@ -628,7 +631,16 @@ RIG *HAMLIB_API rig_init(rig_model_t rig_model) pttp = PTTPORT(rig); dcdp = DCDPORT(rig); - //TODO Ditto for cache + // Allocate space for cached data + needed = sizeof(struct rig_cache); + rig_debug(RIG_DEBUG_TRACE, "Requesting %zd bytes for rig_cache\n", needed); + CACHE(rig) = calloc(1, needed); + if (!CACHE(rig)) + { + rig_debug(RIG_DEBUG_ERR, "%s:Cache calloc failed\n", __func__); + free(rig); //TODO Replace with cleanup routine + return NULL; + } cachep = CACHE(rig); rs->rig_model = caps->rig_model; @@ -1875,6 +1887,11 @@ int HAMLIB_API rig_cleanup(RIG *rig) //TODO Release and null any allocated data - // state, ports, cache, etc. + if (CACHE(rig)) + { + free(CACHE(rig)); + CACHE(rig) = NULL; + } free(rig); commit 7d28822273dec229da1ceca809a3d4f241e4749f Author: George Baltz N3GB <Geo...@gm...> Date: Fri Apr 25 15:11:56 2025 -0400 Add '#include "cache.h"' to all files that reference cache structure. Issue #1420 diff --git a/rigs/dummy/dummy.c b/rigs/dummy/dummy.c index a43a8fe23..edf4155bc 100644 --- a/rigs/dummy/dummy.c +++ b/rigs/dummy/dummy.c @@ -43,6 +43,7 @@ #include "tones.h" #include "idx_builtin.h" #include "register.h" +#include "cache.h" #include "dummy.h" diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index 7d41e1df9..a150e1bc9 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -32,6 +32,7 @@ #include "dummy_common.h" #include "flrig.h" +#include "cache.h" #define DEBUG 1 #define DEBUG_TRACE DEBUG_VERBOSE diff --git a/rigs/icom/frame.c b/rigs/icom/frame.c index 5fa28a110..b7c6c817c 100644 --- a/rigs/icom/frame.c +++ b/rigs/icom/frame.c @@ -33,7 +33,6 @@ #include "icom.h" #include "icom_defs.h" #include "frame.h" -#include "cache.h" /* * Build a CI-V frame. diff --git a/rigs/icom/ic7300.c b/rigs/icom/ic7300.c index fe633a77e..3c495563b 100644 --- a/rigs/icom/ic7300.c +++ b/rigs/icom/ic7300.c @@ -30,6 +30,7 @@ #include "icom.h" #include "icom_defs.h" #include "misc.h" +#include "cache.h" #include "bandplan.h" #include "tones.h" #include "ic7300.h" diff --git a/rigs/icom/ic821h.c b/rigs/icom/ic821h.c index 9c1e4b2ba..83527e30a 100644 --- a/rigs/icom/ic821h.c +++ b/rigs/icom/ic821h.c @@ -25,7 +25,7 @@ #include <hamlib/rig.h> #include "icom.h" #include "misc.h" - +#include "cache.h" #define IC821H_MODES (RIG_MODE_SSB|RIG_MODE_CW|RIG_MODE_FM) diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index c25c713da..828731d2e 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -39,6 +39,7 @@ #include "frame.h" #include "misc.h" #include "event.h" +#include "cache.h" // we automatically determine availability of the 1A 03 command enum { ENUM_1A_03_UNK, ENUM_1A_03_YES, ENUM_1A_03_NO }; diff --git a/rigs/icom/id5100.c b/rigs/icom/id5100.c index 9e86b2a5f..deeada4aa 100644 --- a/rigs/icom/id5100.c +++ b/rigs/icom/id5100.c @@ -26,6 +26,7 @@ #include "icom_defs.h" #include "frame.h" #include "misc.h" +#include "cache.h" enum { diff --git a/rigs/icom/xiegu.c b/rigs/icom/xiegu.c index b35382fa6..d1e19a886 100644 --- a/rigs/icom/xiegu.c +++ b/rigs/icom/xiegu.c @@ -38,6 +38,7 @@ #include "icom_defs.h" #include "frame.h" #include "misc.h" +#include "cache.h" #include "tones.h" #include "bandplan.h" diff --git a/rigs/jrc/jst145.c b/rigs/jrc/jst145.c index 573fd268d..a309b3ba4 100644 --- a/rigs/jrc/jst145.c +++ b/rigs/jrc/jst145.c @@ -24,6 +24,7 @@ #include <string.h> #include "hamlib/rig.h" +#include "cache.h" #include "iofunc.h" #include "jrc.h" diff --git a/rigs/kenwood/ts2000.c b/rigs/kenwood/ts2000.c index b7c1ac5ad..5c25d3461 100644 --- a/rigs/kenwood/ts2000.c +++ b/rigs/kenwood/ts2000.c @@ -28,6 +28,7 @@ #include "kenwood.h" #include "token.h" #include "misc.h" +#include "cache.h" #include "iofunc.h" #include "cal.h" diff --git a/rigs/kenwood/ts590.c b/rigs/kenwood/ts590.c index a21528cc5..3cc9cc786 100644 --- a/rigs/kenwood/ts590.c +++ b/rigs/kenwood/ts590.c @@ -27,6 +27,7 @@ #include "hamlib/rig.h" #include "kenwood.h" #include "misc.h" +#include "cache.h" #include "cal.h" #include "iofunc.h" diff --git a/rigs/tentec/orion.c b/rigs/tentec/orion.c index fbed4962d..2ad454553 100644 --- a/rigs/tentec/orion.c +++ b/rigs/tentec/orion.c @@ -77,6 +77,7 @@ #include <hamlib/rig.h> #include "serial.h" #include "misc.h" +#include "cache.h" #include "orion.h" #ifdef TT565_TIME diff --git a/rigs/yaesu/ft100.c b/rigs/yaesu/ft100.c index 94b7cbb3c..ec4084ddd 100644 --- a/rigs/yaesu/ft100.c +++ b/rigs/yaesu/ft100.c @@ -34,6 +34,7 @@ #include "yaesu.h" #include "ft100.h" #include "misc.h" +#include "cache.h" #include "bandplan.h" enum ft100_native_cmd_e diff --git a/rigs/yaesu/ft1000d.c b/rigs/yaesu/ft1000d.c index e6a7d4745..0ae60a82e 100644 --- a/rigs/yaesu/ft1000d.c +++ b/rigs/yaesu/ft1000d.c @@ -35,6 +35,7 @@ #include "bandplan.h" #include "serial.h" #include "misc.h" +#include "cache.h" #include "yaesu.h" #include "ft1000d.h" diff --git a/rigs/yaesu/ft1000mp.c b/rigs/yaesu/ft1000mp.c index 86b5b63c0..9b16ba60b 100644 --- a/rigs/yaesu/ft1000mp.c +++ b/rigs/yaesu/ft1000mp.c @@ -38,6 +38,7 @@ #include "bandplan.h" #include "serial.h" #include "misc.h" +#include "cache.h" #include "yaesu.h" #include "ft1000mp.h" diff --git a/rigs/yaesu/ft747.c b/rigs/yaesu/ft747.c index b8ad27ffa..6426fcaa0 100644 --- a/rigs/yaesu/ft747.c +++ b/rigs/yaesu/ft747.c @@ -39,6 +39,7 @@ #include "hamlib/rig.h" #include "serial.h" #include "misc.h" +#include "cache.h" #include "yaesu.h" #include "ft747.h" diff --git a/rigs/yaesu/ft817.c b/rigs/yaesu/ft817.c index 125e2696b..49bf79981 100644 --- a/rigs/yaesu/ft817.c +++ b/rigs/yaesu/ft817.c @@ -57,6 +57,7 @@ #include "yaesu.h" #include "ft817.h" #include "misc.h" +#include "cache.h" #include "tones.h" #include "bandplan.h" #include "cal.h" diff --git a/rigs/yaesu/ft857.c b/rigs/yaesu/ft857.c index eee908bc2..e514bc2fb 100644 --- a/rigs/yaesu/ft857.c +++ b/rigs/yaesu/ft857.c @@ -63,6 +63,7 @@ #include "ft857.h" #include "ft817.h" /* We use functions from the 817 code */ #include "misc.h" +#include "cache.h" #include "tones.h" #include "bandplan.h" #include "cal.h" diff --git a/rigs/yaesu/ft990v12.c b/rigs/yaesu/ft990v12.c index f56d1bdc3..bd99ce350 100644 --- a/rigs/yaesu/ft990v12.c +++ b/rigs/yaesu/ft990v12.c @@ -45,6 +45,7 @@ #include "bandplan.h" #include "serial.h" #include "misc.h" +//#include "cache.h" #include "yaesu.h" #include "ft990v12.h" diff --git a/rigs/yaesu/ft991.c b/rigs/yaesu/ft991.c index c68b8e920..6417d523e 100644 --- a/rigs/yaesu/ft991.c +++ b/rigs/yaesu/ft991.c @@ -33,6 +33,7 @@ #include <string.h> #include "hamlib/rig.h" #include "misc.h" +#include "cache.h" #include "newcat.h" #include "yaesu.h" #include "ft991.h" diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index b64cce03a..82ed2caf7 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -34,6 +34,7 @@ #include "hamlib/rig.h" #include "iofunc.h" #include "misc.h" +#include "cache.h" #include "cal.h" #include "newcat.h" #include "serial.h" diff --git a/rigs/yaesu/pmr171.c b/rigs/yaesu/pmr171.c index 260395fdc..8c5758c86 100644 --- a/rigs/yaesu/pmr171.c +++ b/rigs/yaesu/pmr171.c @@ -43,6 +43,7 @@ //#include "pmr171.h" #include "misc.h" #include "tones.h" +#include "cache.h" #include "bandplan.h" #include "cal.h" diff --git a/src/misc.c b/src/misc.c index 091655dca..37566539d 100644 --- a/src/misc.c +++ b/src/misc.c @@ -50,6 +50,7 @@ #include <hamlib/amplifier.h> #include "misc.h" +#include "cache.h" #include "serial.h" #include "network.h" #include "sprintflst.h" diff --git a/src/multicast.c b/src/multicast.c index e68e4efd1..6822ea51d 100644 --- a/src/multicast.c +++ b/src/multicast.c @@ -13,6 +13,7 @@ #endif #include "hamlib/rig.h" #include "misc.h" +#include "cache.h" #include "multicast.h" #include "network.h" #include "sprintflst.h" diff --git a/src/snapshot_data.c b/src/snapshot_data.c index c68f13a90..c89b43617 100644 --- a/src/snapshot_data.c +++ b/src/snapshot_data.c @@ -4,6 +4,7 @@ #include <hamlib/config.h> #include <hamlib/rig.h> #include "misc.h" +#include "cache.h" #include "snapshot_data.h" #include "hamlibdatetime.h" #include "sprintflst.h" diff --git a/tests/rigctlcom.c b/tests/rigctlcom.c index e7b8fbf07..8570c33f7 100644 --- a/tests/rigctlcom.c +++ b/tests/rigctlcom.c @@ -78,6 +78,7 @@ #include <hamlib/rig.h> #include "misc.h" +#include "cache.h" #include "iofunc.h" #include "rigctl_parse.h" #include "riglist.h" commit 4d322337c1d6d06edaa42887b2ba8430c53aa4f7 Author: George Baltz N3GB <Geo...@gm...> Date: Sun Jun 1 10:55:32 2025 -0400 Update NEWS diff --git a/NEWS b/NEWS index 090e4ed3b..7e2378205 100644 --- a/NEWS +++ b/NEWS @@ -22,6 +22,8 @@ Version 4.6.3 five years from 2020 to 2025. Mike passed away on March 28, 2025 due to complications from ALS (Lou Gehrig's disease). + * Restore IC-7300 spectrum data callback - regression in 4.6 (n3gb) + * Add locking to rig_[gs]et_level() - fixes sending CW from tlf (n3gb) * Fix attempt to use memory returned by setlocale() after being freed (TNX Mooneer Salem) * Language bindings configuration and build fixes (TNX Daniele Forsi) * Various build system and compilation fixes (TNX Daniele Forsi) commit 3bc9e5261be8359203419f8d8fe0d100b40f3eb0 Author: George Baltz N3GB <Geo...@gm...> Date: Sat May 31 14:17:10 2025 -0400 Still more functions made static. diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 5fec748b5..c25c713da 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -812,7 +812,7 @@ int icom_cleanup(RIG *rig) * Returns 0 when USB ECHO is on * \return Returns < 0 when error occurs (e.g. timeout, nimple, navail) */ -int icom_get_usb_echo_off(RIG *rig) +static int icom_get_usb_echo_off(RIG *rig) { int retval; unsigned char ackbuf[MAXFRAMELEN]; @@ -1419,7 +1419,7 @@ static int icom_set_default_vfo(RIG *rig) // return true if band is changing from last set_freq // Assumes rig is currently on the VFO being changed // This handles the case case Main/Sub cannot be on the same band -int icom_band_changing(RIG *rig, freq_t test_freq) +static int icom_band_changing(RIG *rig, freq_t test_freq) { freq_t curr_freq, freq1, freq2; int retval; @@ -3423,7 +3423,7 @@ int icom_set_vfo(RIG *rig, vfo_t vfo) RETURNFUNC2(RIG_OK); } -int icom_set_cmd(RIG *rig, vfo_t vfo, struct cmdparams *par, value_t val) +static int icom_set_cmd(RIG *rig, vfo_t vfo, struct cmdparams *par, value_t val) { ENTERFUNC; @@ -3491,7 +3491,7 @@ int icom_set_cmd(RIG *rig, vfo_t vfo, struct cmdparams *par, value_t val) &ack_len)); } -int icom_get_cmd(RIG *rig, vfo_t vfo, struct cmdparams *par, value_t *val) +static int icom_get_cmd(RIG *rig, vfo_t vfo, struct cmdparams *par, value_t *val) { ENTERFUNC; @@ -5363,7 +5363,7 @@ int icom_set_conf(RIG *rig, hamlib_token_t token, const char *val) * Assumes rig!=NULL, STATE(rig)->priv!=NULL * and val points to a buffer big enough to hold the conf value. */ -int icom_get_conf2(RIG *rig, hamlib_token_t token, char *val, int val_len) +static int icom_get_conf2(RIG *rig, hamlib_token_t token, char *val, int val_len) { struct icom_priv_data *priv; struct rig_state *rs; @@ -7647,7 +7647,7 @@ int icom_set_parm(RIG *rig, setting_t parm, value_t val) RETURNFUNC(-RIG_EINVAL); } -const char *icom_get_band(RIG *rig, int band) +static const char *icom_get_band(RIG *rig, int band) { rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); commit 6b5c5b48f9c7a0582beb0259f00a1bf1c81bf451 Author: George Baltz N3GB <Geo...@gm...> Date: Sat May 31 14:10:05 2025 -0400 Don't try to process short spectrum frames. diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 9f753ebf1..5fec748b5 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -9016,7 +9016,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) @@ -9025,15 +9024,20 @@ static int icom_parse_spectrum_frame(RIG *rig, size_t length, struct icom_priv_caps *priv_caps = (struct icom_priv_caps *) caps->priv; struct icom_priv_data *priv = (struct icom_priv_data *) STATE(rig)->priv; struct icom_spectrum_scope_cache *cache; - - int division = (int) from_bcd(frame_data + 1, 1 * 2); - int max_division = (int) from_bcd(frame_data + 2, 1 * 2); - + int division, max_division; size_t spectrum_data_length_in_frame; const unsigned char *spectrum_data_start_in_frame; ENTERFUNC; + if (length < 3) + { + rig_debug(RIG_DEBUG_WARN, "%s: Short scope data - len=%zu\n", __func__, length); + RETURNFUNC(-RIG_EPROTO); + } + division = (int) from_bcd(frame_data + 1, 1 * 2); + max_division = (int) from_bcd(frame_data + 2, 1 * 2); + // The first byte indicates spectrum scope ID/VFO: 0 = Main, 1 = Sub int spectrum_id = frame_data[0]; @@ -9048,9 +9052,17 @@ static int icom_parse_spectrum_frame(RIG *rig, size_t length, if (division == 1) { - int spectrum_scope_mode = frame_data[3]; - int out_of_range = frame_data[14]; + int spectrum_scope_mode; + int out_of_range; + if (length < 15) + { + rig_debug(RIG_DEBUG_WARN, "%s: Short scope header - len=%zu\n", __func__, length); + RETURNFUNC(-RIG_EPROTO); + } + + spectrum_scope_mode = frame_data[3]; + out_of_range = frame_data[14]; cache->spectrum_mode = RIG_SPECTRUM_MODE_NONE; switch (spectrum_scope_mode) @@ -9155,9 +9167,7 @@ static int icom_parse_spectrum_frame(RIG *rig, size_t length, .spectrum_data = cache->spectrum_data, }; -#if defined(HAVE_PTHREAD) rig_fire_spectrum_event(rig, &spectrum_line); -#endif cache->spectrum_metadata_valid = 0; } commit 7fa0c863f262a937cae95450fd15056a0fbce12f Author: George Baltz N3GB <Geo...@gm...> Date: Fri May 30 12:39:29 2025 -0400 Don't start async_data_handler until rig is fully opened. Let the <model>_rig_open() finish its setup before trying to read status. diff --git a/src/rig.c b/src/rig.c index 227a4aa15..1be0bad4a 100644 --- a/src/rig.c +++ b/src/rig.c @@ -1422,22 +1422,6 @@ int HAMLIB_API rig_open(RIG *rig) RETURNFUNC2(status); } -#if defined(HAVE_PTHREAD) - - if (!skip_init) - { - status = async_data_handler_start(rig); - - if (status < 0) - { - port_close(rp, rp->type.rig); - rs->comm_status = RIG_COMM_STATUS_ERROR; - RETURNFUNC2(status); - } - } - -#endif - rs->comm_state = 1; rig_debug(RIG_DEBUG_VERBOSE, "%s: %p rs->comm_state==1?=%d\n", __func__, &rs->comm_state, @@ -1488,15 +1472,6 @@ int HAMLIB_API rig_open(RIG *rig) if (status != RIG_OK) { remove_opened_rig(rig); -#if defined(HAVE_PTHREAD) - - if (!skip_init) - { - async_data_handler_stop(rig); - morse_data_handler_stop(rig); - } - -#endif port_close(rp, rp->type.rig); memcpy(&rs->rigport_deprecated, rp, sizeof(hamlib_port_t_deprecated)); rs->comm_state = 0; @@ -1542,6 +1517,15 @@ int HAMLIB_API rig_open(RIG *rig) #if defined(HAVE_PTHREAD) + status = async_data_handler_start(rig); + + if (status < 0) + { + port_close(rp, rp->type.rig); + rs->comm_status = RIG_COMM_STATUS_ERROR; + RETURNFUNC2(status); + } + // Some models don't support CW so don't need morse handler if (rig->caps->send_morse) { commit 63e1bb4c0096a974ad3388357c47c4398a587a84 Author: George Baltz N3GB <Geo...@gm...> Date: Sun May 18 10:49:25 2025 -0400 Pass spectrum data through to callback Fixes issue #1734 diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 77564a4b1..9f753ebf1 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -772,8 +772,6 @@ int icom_init(RIG *rig) // Reset 0x25/0x26 command detection for the rigs that may support it icom_set_x25x26_ability(rig, -1); - rig_debug(RIG_DEBUG_TRACE, "%s: done\n", __func__); - RETURNFUNC(RIG_OK); } @@ -9201,12 +9199,12 @@ int icom_process_async_frame(RIG *rig, size_t frame_length, * the rest is data * and don't forget one byte at the end for the EOM */ - if (frame[2] != 0x00 || frame[2] == 0x01) + if (frame[2] != BCASTID && frame[2] != CTRLID) { // just ignoring 0x01 for now // fe fe 01 94 1c 03 00 80 07 07 00 fd - rig_debug(RIG_DEBUG_VERBOSE, "%s: 3rd byte not 0x00 or is 0x01...not async\n", - __func__); + rig_debug(RIG_DEBUG_VERBOSE, "%s: Unknown/invalid destination - %#x\n", + __func__, frame[2]); RETURNFUNC(RIG_OK); } diff --git a/rigs/icom/icom.h b/rigs/icom/icom.h index 47d99d91d..1ceedec12 100644 --- a/rigs/icom/icom.h +++ b/rigs/icom/icom.h @@ -35,7 +35,7 @@ #include <sys/time.h> #endif -#define BACKEND_VER "20250107" +#define BACKEND_VER "20250517" #define ICOM_IS_ID31 rig_is_model(rig, RIG_MODEL_ID31) #define ICOM_IS_ID51 rig_is_model(rig, RIG_MODEL_ID51) ----------------------------------------------------------------------- Summary of changes: NEWS | 4 ++ include/hamlib/rig.h | 23 ++++++++---- rigs/dummy/dummy.c | 1 + rigs/dummy/flrig.c | 1 + rigs/icom/frame.c | 1 - rigs/icom/ic7300.c | 1 + rigs/icom/ic821h.c | 2 +- rigs/icom/icom.c | 53 +++++++++++++++----------- rigs/icom/icom.h | 2 +- rigs/icom/id5100.c | 1 + rigs/icom/xiegu.c | 1 + rigs/jrc/jst145.c | 1 + rigs/kenwood/kenwood.c | 16 +++----- rigs/kenwood/ts2000.c | 1 + rigs/kenwood/ts590.c | 1 + rigs/tentec/orion.c | 1 + rigs/yaesu/ft100.c | 1 + rigs/yaesu/ft1000d.c | 1 + rigs/yaesu/ft1000mp.c | 1 + rigs/yaesu/ft747.c | 1 + rigs/yaesu/ft817.c | 1 + rigs/yaesu/ft857.c | 1 + rigs/yaesu/ft990v12.c | 1 + rigs/yaesu/ft991.c | 1 + rigs/yaesu/newcat.c | 1 + rigs/yaesu/pmr171.c | 1 + src/cache.c | 26 ++++++++++++- src/cache.h | 100 +++++++++++++++++++++++++++++++++++++++++++++++++ src/misc.c | 23 ++---------- src/multicast.c | 1 + src/rig.c | 79 ++++++++++++++++++++++---------------- src/snapshot_data.c | 1 + tests/rigctlcom.c | 1 + 33 files changed, 255 insertions(+), 96 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-06-04 14:21: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, Hamlib-4.6.3 has been updated via a640201ad768137a787d9a158533f3ad3b6da727 (commit) from 04af313f7d0953217b64fc4e1fdbb3dc1baa7e10 (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 a640201ad768137a787d9a158533f3ad3b6da727 Author: Nate Bargmann <n0...@n0...> Date: Tue Jun 3 11:05:13 2025 -0500 Advance to 4.6.3~rc2 diff --git a/configure.ac b/configure.ac index 2cee3461e..f7f73afa2 100644 --- a/configure.ac +++ b/configure.ac @@ -14,7 +14,7 @@ dnl Please do not use '-' in the version number, as package managers will fail, dnl however, the use of '~' should be fine as apt (others?) will treat dnl it as an earlier version than the actual release. TNX KA6MAL dnl PACKAGE_NAME + " " + PACKAGE_VERSION must not exceed 20 chars! -AC_INIT([Hamlib],[4.6.3~rc1],[ham...@li...],[hamlib],[http://www.hamlib.org]) +AC_INIT([Hamlib],[4.6.3~rc2],[ham...@li...],[hamlib],[http://www.hamlib.org]) #AC_INIT([PRODUCT_NAME], [Hamlib]) #AC_DEFINE([Hamlib], [PRODUCT_VERSION_RESOURCE]) @@ -76,7 +76,7 @@ dnl See README.release on setting these values # Set them here to keep c++/Makefile and src/Makefile in sync. ABI_VERSION=4 ABI_REVISION=6 -ABI_PATCH=0 +ABI_PATCH=3 ABI_AGE=0 AC_DEFINE_UNQUOTED([ABI_VERSION], [$ABI_VERSION], [Frontend ABI version]) ----------------------------------------------------------------------- Summary of changes: configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-06-03 15:59: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, Hamlib-4.6.3 has been updated via 04af313f7d0953217b64fc4e1fdbb3dc1baa7e10 (commit) via 3abac287677804f517c415dce047157e00eb4aca (commit) via 3249598cbf3b9e8e9ca1d360930c8d66217c3375 (commit) from 6150ee94c703b8d02d200ed685c497408394fc2a (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 04af313f7d0953217b64fc4e1fdbb3dc1baa7e10 Author: George Baltz N3GB <Geo...@gm...> Date: Sun Jun 1 10:55:32 2025 -0400 Update NEWS (cherry picked from commit 4d322337c1d6d06edaa42887b2ba8430c53aa4f7) diff --git a/NEWS b/NEWS index 090e4ed3b..7e2378205 100644 --- a/NEWS +++ b/NEWS @@ -22,6 +22,8 @@ Version 4.6.3 five years from 2020 to 2025. Mike passed away on March 28, 2025 due to complications from ALS (Lou Gehrig's disease). + * Restore IC-7300 spectrum data callback - regression in 4.6 (n3gb) + * Add locking to rig_[gs]et_level() - fixes sending CW from tlf (n3gb) * Fix attempt to use memory returned by setlocale() after being freed (TNX Mooneer Salem) * Language bindings configuration and build fixes (TNX Daniele Forsi) * Various build system and compilation fixes (TNX Daniele Forsi) commit 3abac287677804f517c415dce047157e00eb4aca Author: George Baltz N3GB <Geo...@gm...> Date: Fri May 30 12:39:29 2025 -0400 Don't start async_data_handler until rig is fully opened. Let the <model>_rig_open() finish its setup before trying to read status. (cherry picked from commit 7fa0c863f262a937cae95450fd15056a0fbce12f) diff --git a/src/rig.c b/src/rig.c index 227a4aa15..1be0bad4a 100644 --- a/src/rig.c +++ b/src/rig.c @@ -1422,22 +1422,6 @@ int HAMLIB_API rig_open(RIG *rig) RETURNFUNC2(status); } -#if defined(HAVE_PTHREAD) - - if (!skip_init) - { - status = async_data_handler_start(rig); - - if (status < 0) - { - port_close(rp, rp->type.rig); - rs->comm_status = RIG_COMM_STATUS_ERROR; - RETURNFUNC2(status); - } - } - -#endif - rs->comm_state = 1; rig_debug(RIG_DEBUG_VERBOSE, "%s: %p rs->comm_state==1?=%d\n", __func__, &rs->comm_state, @@ -1488,15 +1472,6 @@ int HAMLIB_API rig_open(RIG *rig) if (status != RIG_OK) { remove_opened_rig(rig); -#if defined(HAVE_PTHREAD) - - if (!skip_init) - { - async_data_handler_stop(rig); - morse_data_handler_stop(rig); - } - -#endif port_close(rp, rp->type.rig); memcpy(&rs->rigport_deprecated, rp, sizeof(hamlib_port_t_deprecated)); rs->comm_state = 0; @@ -1542,6 +1517,15 @@ int HAMLIB_API rig_open(RIG *rig) #if defined(HAVE_PTHREAD) + status = async_data_handler_start(rig); + + if (status < 0) + { + port_close(rp, rp->type.rig); + rs->comm_status = RIG_COMM_STATUS_ERROR; + RETURNFUNC2(status); + } + // Some models don't support CW so don't need morse handler if (rig->caps->send_morse) { commit 3249598cbf3b9e8e9ca1d360930c8d66217c3375 Author: George Baltz N3GB <Geo...@gm...> Date: Sun May 18 10:49:25 2025 -0400 Pass spectrum data through to callback Fixes issue #1734 (cherry picked from commit 63e1bb4c0096a974ad3388357c47c4398a587a84) diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 77564a4b1..9f753ebf1 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -772,8 +772,6 @@ int icom_init(RIG *rig) // Reset 0x25/0x26 command detection for the rigs that may support it icom_set_x25x26_ability(rig, -1); - rig_debug(RIG_DEBUG_TRACE, "%s: done\n", __func__); - RETURNFUNC(RIG_OK); } @@ -9201,12 +9199,12 @@ int icom_process_async_frame(RIG *rig, size_t frame_length, * the rest is data * and don't forget one byte at the end for the EOM */ - if (frame[2] != 0x00 || frame[2] == 0x01) + if (frame[2] != BCASTID && frame[2] != CTRLID) { // just ignoring 0x01 for now // fe fe 01 94 1c 03 00 80 07 07 00 fd - rig_debug(RIG_DEBUG_VERBOSE, "%s: 3rd byte not 0x00 or is 0x01...not async\n", - __func__); + rig_debug(RIG_DEBUG_VERBOSE, "%s: Unknown/invalid destination - %#x\n", + __func__, frame[2]); RETURNFUNC(RIG_OK); } diff --git a/rigs/icom/icom.h b/rigs/icom/icom.h index 47d99d91d..1ceedec12 100644 --- a/rigs/icom/icom.h +++ b/rigs/icom/icom.h @@ -35,7 +35,7 @@ #include <sys/time.h> #endif -#define BACKEND_VER "20250107" +#define BACKEND_VER "20250517" #define ICOM_IS_ID31 rig_is_model(rig, RIG_MODEL_ID31) #define ICOM_IS_ID51 rig_is_model(rig, RIG_MODEL_ID51) ----------------------------------------------------------------------- Summary of changes: NEWS | 2 ++ rigs/icom/icom.c | 8 +++----- rigs/icom/icom.h | 2 +- src/rig.c | 34 +++++++++------------------------- 4 files changed, 15 insertions(+), 31 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-05-29 17:40:45
|
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 6150ee94c703b8d02d200ed685c497408394fc2a (commit) via 59ab35248703d5b492817c1d1e2511da41ede88e (commit) from 8f919a5a54d7318afea557790d34ddb74c1c6b56 (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 6150ee94c703b8d02d200ed685c497408394fc2a Author: George Baltz N3GB <Geo...@gm...> Date: Wed May 28 09:57:04 2025 -0400 Fix backward frequency tests in ft857.c Found by cppcheck.sh (cherry picked from commit 00d285576cae5c5db3cdac03f3b9abc13508a964) diff --git a/rigs/yaesu/ft857.c b/rigs/yaesu/ft857.c index fa7530922..eee908bc2 100644 --- a/rigs/yaesu/ft857.c +++ b/rigs/yaesu/ft857.c @@ -928,11 +928,11 @@ int ft857_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) rig_get_cache(rig, vfo, &freq, &freq_ms, &mode, &mode_ms, &width, &width_ms); - if (144000000.0f >= freq && 148000000.0f <= freq) + if (144000000.0f <= freq && 148000000.0f > freq) { return ft857_get_pometer_level(rig, val, &rig->caps->rfpower_meter_cal, 2.0); } - else if (420000000.0f >= freq && 450000000.0f <= freq) + else if (420000000.0f <= freq && 450000000.0f > freq) { return ft857_get_pometer_level(rig, val, &rig->caps->rfpower_meter_cal, 5.0); } commit 59ab35248703d5b492817c1d1e2511da41ede88e Author: George Baltz N3GB <Geo...@gm...> Date: Sat May 17 14:22:09 2025 -0400 Fix out of sequence merge for issue #1634 Still undetermined if fix is needed for TS-590SG (cherry picked from commit a4b6ef4fd73dce67de5cb859f111d819d40313ed) diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index c4449c5d6..45bd5012f 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -231,7 +231,7 @@ struct confparams kenwood_cfg_params[] = { RIG_CONF_END, NULL, } }; -int remove_nonprint(char *s) +static int remove_nonprint(char *s) { int i, j = 0; if (s == NULL) return 0; @@ -392,7 +392,7 @@ transaction_write: skip |= strncmp(cmdstr, "RD", 2) == 0; skip |= strncmp(cmdstr, "KYW", 3) == 0; skip |= strncmp(cmdstr, "KY ", 3) == 0; - skip |= strncmp(cmdstr, "KY0", 3) == 0; + skip |= strncmp(cmdstr, "KY0", 3) == 0; skip |= strncmp(cmdstr, "KY2", 3) == 0; skip |= strncmp(cmdstr, "PS1", 3) == 0; skip |= strncmp(cmdstr, "PS0", 3) == 0; @@ -770,7 +770,7 @@ int kenwood_safe_transaction(RIG *rig, const char *cmd, char *buf, if (checklen && length != expected) /* worth retrying as some rigs occasionally send short results */ { - // QRPLABS can't seem top decide if they give 37 or 38 bytes for IF command + // QRPLABS can't seem to decide if they give 37 or 38 bytes for IF command if (strncmp(cmd, "IF", 2) == 0 && rig->caps->rig_model == RIG_MODEL_QRPLABS) { break; } struct kenwood_priv_data *priv = STATE(rig)->priv; @@ -5575,6 +5575,14 @@ int kenwood_send_morse(RIG *rig, vfo_t vfo, const char *msg) SNPRINTF(morsebuf, sizeof(morsebuf), "KY %s", m2); break; + case RIG_MODEL_TS590S: + //??case RIG_MODEL_TS590SG: + /* The command must consist of 28 bytes right aligned. + * See https://github.com/Hamlib/Hamlib/issues/1634 + */ + SNPRINTF(morsebuf, sizeof(morsebuf), "KY %24s", m2); + break; + case RIG_MODEL_TS890S: SNPRINTF(morsebuf, sizeof morsebuf, "KY2%s", m2); break; @@ -5589,11 +5597,6 @@ int kenwood_send_morse(RIG *rig, vfo_t vfo, const char *msg) } /* FALL THROUGH */ - case RIG_MODEL_TS590S: - /* the command must consist of 28 bytes right aligned */ - SNPRINTF(morsebuf, sizeof(morsebuf), "KY %24s", m2); - break; - default: /* the command must consist of 28 bytes 0x20 padded */ SNPRINTF(morsebuf, sizeof(morsebuf), "KY %-24s", m2); diff --git a/rigs/kenwood/kenwood.h b/rigs/kenwood/kenwood.h index f553cadc4..36783db08 100644 --- a/rigs/kenwood/kenwood.h +++ b/rigs/kenwood/kenwood.h @@ -28,7 +28,7 @@ #include "token.h" #include "idx_builtin.h" -#define BACKEND_VER "20250107" +#define BACKEND_VER "20250515" #define EOM_KEN ';' #define EOM_TH '\r' ----------------------------------------------------------------------- Summary of changes: rigs/kenwood/kenwood.c | 19 +++++++++++-------- rigs/kenwood/kenwood.h | 2 +- rigs/yaesu/ft857.c | 4 ++-- 3 files changed, 14 insertions(+), 11 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-05-29 17:37: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 cccee9b7916548c2c48a1bfd55116fded3d3a6ed (commit) via b74bd31b408369ddb1e09de52036b8b3d9002385 (commit) via 00d285576cae5c5db3cdac03f3b9abc13508a964 (commit) via 0a6d07a1adaec907facee2fd8e3428fded978672 (commit) via 9f43659831c22fa210732b8fd6a88d11fd6aa603 (commit) via a4b6ef4fd73dce67de5cb859f111d819d40313ed (commit) from 9fdf8f201ce78a2c3b8b0a245bdd2cacf17cbb68 (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 cccee9b7916548c2c48a1bfd55116fded3d3a6ed Author: George Baltz N3GB <Geo...@gm...> Date: Thu May 29 05:40:06 2025 -0400 Still more cppcheck complaints dealt with. diff --git a/amplifiers/elecraft/kpa.c b/amplifiers/elecraft/kpa.c index 8ffbbe28e..b7bf05a05 100644 --- a/amplifiers/elecraft/kpa.c +++ b/amplifiers/elecraft/kpa.c @@ -90,7 +90,7 @@ int kpa_close(AMP *amp) return RIG_OK; } -int kpa_flushbuffer(AMP *amp) +static int kpa_flushbuffer(AMP *amp) { rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index f165dca29..814eb2921 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -3888,7 +3888,7 @@ locator2longlat HAMLIB_PARAMS((double *longitude, double *latitude, const char *locator)); -extern HAMLIB_EXPORT(char*) rig_make_md5(char *pass); +extern HAMLIB_EXPORT(char*) rig_make_md5(const char *pass); extern HAMLIB_EXPORT(int) rig_set_lock_mode(RIG *rig, int lock); extern HAMLIB_EXPORT(int) rig_get_lock_mode(RIG *rig, int *lock); diff --git a/rigs/kenwood/xg3.c b/rigs/kenwood/xg3.c index 271bebca2..de65d8282 100644 --- a/rigs/kenwood/xg3.c +++ b/rigs/kenwood/xg3.c @@ -75,22 +75,22 @@ static struct kenwood_priv_caps xg3_priv_caps = /* XG3 specific rig_caps API function declarations */ -int xg3_init(RIG *rig); -int xg3_open(RIG *rig); -int xg3_set_vfo(RIG *rig, vfo_t vfo); -int xg3_get_vfo(RIG *rig, vfo_t *vfo); -int xg3_set_freq(RIG *rig, vfo_t vfo, freq_t freq); -int xg3_get_freq(RIG *rig, vfo_t vfo, freq_t *freq); -int xg3_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt); -int xg3_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt); -int xg3_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val); -int xg3_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val); -int xg3_set_powerstat(RIG *rig, powerstat_t status); -int xg3_get_powerstat(RIG *rig, powerstat_t *status); -int xg3_set_mem(RIG *rig, vfo_t vfo, int ch); -int xg3_get_mem(RIG *rig, vfo_t vfo, int *ch); -int xg3_set_parm(RIG *rig, setting_t parm, value_t val); -int xg3_get_parm(RIG *rig, setting_t parm, value_t *val); +static int xg3_init(RIG *rig); +static int xg3_open(RIG *rig); +static int xg3_set_vfo(RIG *rig, vfo_t vfo); +static int xg3_get_vfo(RIG *rig, vfo_t *vfo); +static int xg3_set_freq(RIG *rig, vfo_t vfo, freq_t freq); +static int xg3_get_freq(RIG *rig, vfo_t vfo, freq_t *freq); +static int xg3_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt); +static int xg3_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt); +static int xg3_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val); +static int xg3_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val); +static int xg3_set_powerstat(RIG *rig, powerstat_t status); +static int xg3_get_powerstat(RIG *rig, powerstat_t *status); +static int xg3_set_mem(RIG *rig, vfo_t vfo, int ch); +static int xg3_get_mem(RIG *rig, vfo_t vfo, int *ch); +static int xg3_set_parm(RIG *rig, setting_t parm, value_t val); +static int xg3_get_parm(RIG *rig, setting_t parm, value_t *val); /* @@ -183,7 +183,7 @@ struct rig_caps xg3_caps = /* * xg3_init() */ -int xg3_init(RIG *rig) +static int xg3_init(RIG *rig) { struct kenwood_priv_data *priv; int i; @@ -225,7 +225,7 @@ int xg3_init(RIG *rig) /* * xg3_open() */ -int xg3_open(RIG *rig) +static int xg3_open(RIG *rig) { int err; ptt_t ptt; @@ -245,7 +245,7 @@ int xg3_open(RIG *rig) } -int xg3_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) +static int xg3_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) { char levelbuf[16]; @@ -275,7 +275,7 @@ int xg3_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) /* * kenwood_get_level */ -int xg3_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) +static int xg3_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) { char cmdbuf[32], replybuf[32]; int retval; @@ -343,7 +343,7 @@ int xg3_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) /* * xg3_get_vfo */ -int xg3_get_vfo(RIG *rig, vfo_t *vfo) +static int xg3_get_vfo(RIG *rig, vfo_t *vfo) { rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); @@ -359,7 +359,7 @@ int xg3_get_vfo(RIG *rig, vfo_t *vfo) /* * xg3_set_vfo */ -int xg3_set_vfo(RIG *rig, vfo_t vfo) +static int xg3_set_vfo(RIG *rig, vfo_t vfo) { rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); @@ -379,7 +379,7 @@ int xg3_set_vfo(RIG *rig, vfo_t vfo) /* * xg3_set_freq */ -int xg3_set_freq(RIG *rig, vfo_t vfo, freq_t freq) +static int xg3_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { int err; vfo_t tvfo; @@ -422,7 +422,7 @@ int xg3_set_freq(RIG *rig, vfo_t vfo, freq_t freq) /* * xg3_get_freq */ -int xg3_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) +static int xg3_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) { struct hamlib_port *rp; char freqbuf[50]; @@ -494,7 +494,7 @@ int xg3_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) /* * xg3_set_powerstat */ -int xg3_set_powerstat(RIG *rig, powerstat_t status) +static int xg3_set_powerstat(RIG *rig, powerstat_t status) { rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); @@ -514,7 +514,7 @@ int xg3_set_powerstat(RIG *rig, powerstat_t status) /* * xg3_get_powerstat */ -int xg3_get_powerstat(RIG *rig, powerstat_t *status) +static int xg3_get_powerstat(RIG *rig, powerstat_t *status) { const char *cmd = "G"; // any command to test will do char buf[6]; @@ -540,7 +540,7 @@ int xg3_get_powerstat(RIG *rig, powerstat_t *status) /* * xg3_set_mem */ -int xg3_set_mem(RIG *rig, vfo_t vfo, int ch) +static int xg3_set_mem(RIG *rig, vfo_t vfo, int ch) { char cmdbuf[32]; int retval; @@ -569,7 +569,7 @@ int xg3_set_mem(RIG *rig, vfo_t vfo, int ch) /* * xg3_get_mem */ -int xg3_get_mem(RIG *rig, vfo_t vfo, int *ch) +static int xg3_get_mem(RIG *rig, vfo_t vfo, int *ch) { char cmdbuf[32]; char reply[32]; @@ -602,7 +602,7 @@ int xg3_get_mem(RIG *rig, vfo_t vfo, int *ch) /* * xg3_set_ptt */ -int xg3_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) +static int xg3_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) { int retval; @@ -622,7 +622,7 @@ int xg3_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) /* * kenwood_get_ptt */ -int xg3_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) +static int xg3_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) { char pttbuf[6]; int retval; @@ -650,7 +650,7 @@ int xg3_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) /* * xg3_set_parm */ -int xg3_set_parm(RIG *rig, setting_t parm, value_t val) +static int xg3_set_parm(RIG *rig, setting_t parm, value_t val) { int ival; char cmdbuf[16]; @@ -679,7 +679,7 @@ int xg3_set_parm(RIG *rig, setting_t parm, value_t val) /* * xg3_get_parm */ -int xg3_get_parm(RIG *rig, setting_t parm, value_t *val) +static int xg3_get_parm(RIG *rig, setting_t parm, value_t *val) { int ival; char replybuf[6]; diff --git a/rigs/tentec/jupiter.c b/rigs/tentec/jupiter.c index 3a28dc677..ed9bcf8f6 100644 --- a/rigs/tentec/jupiter.c +++ b/rigs/tentec/jupiter.c @@ -257,7 +257,7 @@ static int tt538_transaction(RIG *rig, const char *cmd, int cmd_len, retval = tentec_transaction(rig, cmd, cmd_len, data, data_len); - if (data == NULL || (data != NULL && data_len > 0)) + if (data == NULL || data_len > 0) { return retval; } diff --git a/security/aes.c b/security/aes.c index a46bdfdb4..9333b8a04 100644 --- a/security/aes.c +++ b/security/aes.c @@ -434,7 +434,7 @@ uint32 KT3[256]; /* AES key scheduling routine */ -int aes_set_key(aes_context *ctx, uint8 *key, int nbits) +int aes_set_key(aes_context *ctx, const uint8 *key, int nbits) { int i; uint32 *RK, *SK; @@ -591,7 +591,7 @@ int aes_set_key(aes_context *ctx, uint8 *key, int nbits) /* AES 128-bit block encryption routine */ -void aes_encrypt(aes_context *ctx, uint8 input[16], uint8 output[16]) +void aes_encrypt(aes_context *ctx, const uint8 input[16], uint8 output[16]) { uint32 *RK, X0, X1, X2, X3, Y0, Y1, Y2, Y3; @@ -681,7 +681,7 @@ void aes_encrypt(aes_context *ctx, uint8 input[16], uint8 output[16]) /* AES 128-bit block decryption routine */ -void aes_decrypt(aes_context *ctx, uint8 input[16], uint8 output[16]) +void aes_decrypt(aes_context *ctx, const uint8 input[16], uint8 output[16]) { uint32 *RK, X0, X1, X2, X3, Y0, Y1, Y2, Y3; diff --git a/security/aes.h b/security/aes.h index 7c39f9eed..8b960ac3f 100755 --- a/security/aes.h +++ b/security/aes.h @@ -17,8 +17,8 @@ typedef struct } aes_context; -int aes_set_key( aes_context *ctx, uint8 *key, int nbits ); -void aes_encrypt( aes_context *ctx, uint8 input[16], uint8 output[16] ); -void aes_decrypt( aes_context *ctx, uint8 input[16], uint8 output[16] ); +int aes_set_key( aes_context *ctx, const uint8 *key, int nbits ); +void aes_encrypt( aes_context *ctx, const uint8 input[16], uint8 output[16] ); +void aes_decrypt( aes_context *ctx, const uint8 input[16], uint8 output[16] ); #endif /* aes.h */ diff --git a/security/md5.c b/security/md5.c index b5ceb3883..9baf0a048 100644 --- a/security/md5.c +++ b/security/md5.c @@ -292,7 +292,7 @@ unsigned char *make_hash(const char *arg) return digest; } -char *rig_make_md5(char *pass) +char *rig_make_md5(const char *pass) { const unsigned char *hash = make_hash(pass); char *md5str = make_digest(hash, 16); diff --git a/security/sha256.c b/security/sha256.c index 73224a3e9..811cee623 100644 --- a/security/sha256.c +++ b/security/sha256.c @@ -53,7 +53,7 @@ void sha256_starts(sha256_context *ctx) ctx->state[7] = 0x5BE0CD19; } -void sha256_process(sha256_context *ctx, uint8 data[64]) +void sha256_process(sha256_context *ctx, const uint8 data[64]) { uint32 temp1, temp2, W[64]; uint32 A, B, C, D, E, F, G, H; commit b74bd31b408369ddb1e09de52036b8b3d9002385 Author: George Baltz N3GB <Geo...@gm...> Date: Wed May 28 14:26:34 2025 -0400 Quiet a few more cppcheck gripes. Making these functions static also reduces the possibilities of collisions with app names and may shorten load time. And I can finally make meter_type1 and meter_type2 const, like I tried to do in the beginning. diff --git a/.gitignore b/.gitignore index caa28b297..5da00dd4e 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ config.sub config.log config.status configure +cppcheck.log depcomp hamlib.pc hamlib.spec diff --git a/rigs/dummy/dummy.c b/rigs/dummy/dummy.c index dccebd215..a43a8fe23 100644 --- a/rigs/dummy/dummy.c +++ b/rigs/dummy/dummy.c @@ -2312,7 +2312,7 @@ static int dummy_mW2power(RIG *rig, float *power, unsigned int mwpower, static int m_year, m_month, m_day, m_hour, m_min, m_sec, m_utc_offset; static double m_msec; -int dummy_set_clock(RIG *rig, int year, int month, int day, int hour, int min, +static int dummy_set_clock(RIG *rig, int year, int month, int day, int hour, int min, int sec, double msec, int utc_offset) { int retval = RIG_OK; @@ -2337,7 +2337,7 @@ int dummy_set_clock(RIG *rig, int year, int month, int day, int hour, int min, return retval; } -int dummy_get_clock(RIG *rig, int *year, int *month, int *day, int *hour, +static int dummy_get_clock(RIG *rig, int *year, int *month, int *day, int *hour, int *min, int *sec, double *msec, int *utc_offset) { int retval = RIG_OK; diff --git a/rigs/flexradio/dttsp.c b/rigs/flexradio/dttsp.c index 217e73b90..2a24b70f1 100644 --- a/rigs/flexradio/dttsp.c +++ b/rigs/flexradio/dttsp.c @@ -439,7 +439,7 @@ int dttsp_set_conf(RIG *rig, hamlib_token_t token, const char *val) * Assumes rig!=NULL, STATE(rig)->priv!=NULL * and val points to a buffer big enough to hold the conf value. */ -int dttsp_get_conf2(RIG *rig, hamlib_token_t token, char *val, int val_len) +static int dttsp_get_conf2(RIG *rig, hamlib_token_t token, char *val, int val_len) { struct dttsp_priv_data *priv; struct rig_state *rs; diff --git a/rigs/icom/ic7100.c b/rigs/icom/ic7100.c index de5b3b2a1..9f500ddcc 100644 --- a/rigs/icom/ic7100.c +++ b/rigs/icom/ic7100.c @@ -211,7 +211,7 @@ static const struct icom_priv_caps ic7100_priv_caps = }; // if hour < 0 then only date will be set -int ic7100_set_clock(RIG *rig, int year, int month, int day, int hour, int min, +static int ic7100_set_clock(RIG *rig, int year, int month, int day, int hour, int min, int sec, double msec, int utc_offset) { int cmd = 0x1a; @@ -265,7 +265,7 @@ int ic7100_set_clock(RIG *rig, int year, int month, int day, int hour, int min, return retval; } -int ic7100_get_clock(RIG *rig, int *year, int *month, int *day, int *hour, +static int ic7100_get_clock(RIG *rig, int *year, int *month, int *day, int *hour, int *min, int *sec, double *msec, int *utc_offset) { int cmd = 0x1a; diff --git a/rigs/icom/ic7200.c b/rigs/icom/ic7200.c index 0824d6780..0d413de58 100644 --- a/rigs/icom/ic7200.c +++ b/rigs/icom/ic7200.c @@ -95,8 +95,8 @@ } } -int ic7200_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val); -int ic7200_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val); +static int ic7200_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val); +static int ic7200_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val); /* * IC-7200 rig capabilities. @@ -295,7 +295,7 @@ struct rig_caps ic7200_caps = .hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS }; -int ic7200_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) +static int ic7200_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) { unsigned char cmdbuf[MAXFRAMELEN]; @@ -312,7 +312,7 @@ int ic7200_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) } } -int ic7200_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) +static int ic7200_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) { unsigned char cmdbuf[MAXFRAMELEN]; diff --git a/rigs/kenwood/ts890s.c b/rigs/kenwood/ts890s.c index 32d8c4533..74f3c22b5 100644 --- a/rigs/kenwood/ts890s.c +++ b/rigs/kenwood/ts890s.c @@ -290,13 +290,13 @@ static int kenwood_ts890_get_level(RIG *rig, vfo_t vfo, setting_t level, case RIG_LEVEL_STRENGTH: case RIG_LEVEL_RFPOWER_METER_WATTS: { - cal_table_float_t *table; + const cal_table_float_t *table; ptt_t ptt = RIG_PTT_OFF; /* Values taken from the TS-890S In-Depth Manual (IDM), p. 8 * 0.03 - 21.5 MHz, Preamp 1 */ /* Meter Type 1 - Kenwood specific, factory default */ - static cal_table_float_t meter_type1 = + static const cal_table_float_t meter_type1 = { 9, { { 0, -28.4f}, { 3, -26}, {11, -19.5f}, {19, -13}, {27, -6.5f}, {35, 0}, @@ -304,7 +304,7 @@ static int kenwood_ts890_get_level(RIG *rig, vfo_t vfo, setting_t level, } }; /* Meter Type 2 - IARU recommended */ - static cal_table_float_t meter_type2 = + static const cal_table_float_t meter_type2 = { 9, { { 0, -54}, { 3, -48}, {11, -36}, {19, -24}, {27, -12}, {35, 0}, @@ -462,7 +462,7 @@ static int ts890_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status) return retval; } - *status = current[2] & mask ? 1 : 0; + *status = (current[2] & mask) ? 1 : 0; return RIG_OK; } diff --git a/rigs/yaesu/ft3000.c b/rigs/yaesu/ft3000.c index 505821a00..9ba104f41 100644 --- a/rigs/yaesu/ft3000.c +++ b/rigs/yaesu/ft3000.c @@ -144,7 +144,7 @@ int ftdx3000_ext_tokens[] = TOK_BACKEND_NONE }; -int ft3000_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option) +static int ft3000_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option) { char *cmd; int err; @@ -181,7 +181,7 @@ int ft3000_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option) RETURNFUNC(RIG_OK); } -int ft3000_get_ant(RIG *rig, vfo_t vfo, ant_t dummy, value_t *option, +static int ft3000_get_ant(RIG *rig, vfo_t vfo, ant_t dummy, value_t *option, ant_t *ant_curr, ant_t *ant_tx, ant_t *ant_rx) { struct newcat_priv_data *priv = (struct newcat_priv_data *)STATE(rig)->priv; diff --git a/rigs/yaesu/pmr171.c b/rigs/yaesu/pmr171.c index 2abe30e6e..260395fdc 100644 --- a/rigs/yaesu/pmr171.c +++ b/rigs/yaesu/pmr171.c @@ -333,7 +333,7 @@ struct rig_caps pmr171_caps = //*****************************************************/ #include <stdint.h> -uint16_t CRC16Check(const unsigned char *buf, int len) +static uint16_t CRC16Check(const unsigned char *buf, int len) { uint16_t crc = 0xFFFF; // Initial value uint16_t polynomial = 0x1021; // Polynomial x^16 + x^12 + x^5 + 1 @@ -479,7 +479,7 @@ rmode_t pmr171_modes[GUOHE_MODE_TABLE_MAX] = RIG_MODE_RTTY // not functioning }; -rmode_t guohe2rmode(unsigned char mode, const rmode_t mode_table[]) +static rmode_t guohe2rmode(unsigned char mode, const rmode_t mode_table[]) { rig_debug(RIG_DEBUG_VERBOSE, "%s called, mode=0x%02x\n", __func__, mode); @@ -494,7 +494,7 @@ rmode_t guohe2rmode(unsigned char mode, const rmode_t mode_table[]) return (mode_table[mode]); } -unsigned char rmode2guohe(rmode_t mode, const rmode_t mode_table[]) +static unsigned char rmode2guohe(rmode_t mode, const rmode_t mode_table[]) { rig_debug(RIG_DEBUG_VERBOSE, "%s called, mode=%s\n", __func__, rig_strrmode(mode)); @@ -519,7 +519,7 @@ unsigned char rmode2guohe(rmode_t mode, const rmode_t mode_table[]) /** * Converting to Big-endian bytes */ -unsigned char *to_be(unsigned char data[], +static unsigned char *to_be(unsigned char data[], unsigned long long freq, unsigned int byte_len) { @@ -538,7 +538,7 @@ unsigned char *to_be(unsigned char data[], } -unsigned long long from_be(const unsigned char data[], +static unsigned long long from_be(const unsigned char data[], unsigned int byte_len) { int i; diff --git a/src/sprintflst.c b/src/sprintflst.c index 06b381316..b1fe66bb9 100644 --- a/src/sprintflst.c +++ b/src/sprintflst.c @@ -40,7 +40,7 @@ // just doing a warning message for now // eventually should make this -RIG_EINTERNAL -int check_buffer_overflow(char *str, int len, int nlen) +static int check_buffer_overflow(char *str, int len, int nlen) { if (len + 32 >= nlen) // make sure at least 32 bytes are available { commit 00d285576cae5c5db3cdac03f3b9abc13508a964 Author: George Baltz N3GB <Geo...@gm...> Date: Wed May 28 09:57:04 2025 -0400 Fix backward frequency tests in ft857.c Found by cppcheck.sh diff --git a/rigs/yaesu/ft857.c b/rigs/yaesu/ft857.c index fa7530922..eee908bc2 100644 --- a/rigs/yaesu/ft857.c +++ b/rigs/yaesu/ft857.c @@ -928,11 +928,11 @@ int ft857_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) rig_get_cache(rig, vfo, &freq, &freq_ms, &mode, &mode_ms, &width, &width_ms); - if (144000000.0f >= freq && 148000000.0f <= freq) + if (144000000.0f <= freq && 148000000.0f > freq) { return ft857_get_pometer_level(rig, val, &rig->caps->rfpower_meter_cal, 2.0); } - else if (420000000.0f >= freq && 450000000.0f <= freq) + else if (420000000.0f <= freq && 450000000.0f > freq) { return ft857_get_pometer_level(rig, val, &rig->caps->rfpower_meter_cal, 5.0); } commit 0a6d07a1adaec907facee2fd8e3428fded978672 Author: George Baltz N3GB <Geo...@gm...> Date: Tue May 27 19:26:23 2025 -0400 Make a few more functions static All rig-specific overrides should only be used in one file. Keep the definitions local. diff --git a/rigs/kenwood/ts2000.c b/rigs/kenwood/ts2000.c index 7e24a20ef..b7c1ac5ad 100644 --- a/rigs/kenwood/ts2000.c +++ b/rigs/kenwood/ts2000.c @@ -266,7 +266,7 @@ static struct kenwood_priv_caps ts2000_priv_caps = * Function definitions below */ -int ts2000_init(RIG *rig) +static int ts2000_init(RIG *rig) { struct kenwood_priv_data *priv; int retval; diff --git a/rigs/kenwood/ts480.c b/rigs/kenwood/ts480.c index 043f25334..17cb9a1c5 100644 --- a/rigs/kenwood/ts480.c +++ b/rigs/kenwood/ts480.c @@ -169,7 +169,7 @@ const struct confparams ts480_ext_levels[] = * kenwood_ts480_get_info * Assumes rig!=NULL */ -const char * +static const char * kenwood_ts480_get_info(RIG *rig) { char firmbuf[50]; @@ -313,7 +313,7 @@ static int ts480_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status) * WARNING: The commands differ slightly from the general versions in kenwood.c * e.g.: "SQ"=>"SQ0" , "AG"=>"AG0" */ -int kenwood_ts480_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) +static int kenwood_ts480_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) { char levelbuf[16]; int kenwood_val; @@ -489,7 +489,7 @@ static int ts480_read_meters(RIG *rig, int *swr, int *comp, int *alc) * kenwood_ts480_get_level * Assumes rig!=NULL, val!=NULL */ -int +static int kenwood_ts480_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) { char ackbuf[50]; @@ -1204,7 +1204,7 @@ static struct kenwood_priv_caps ts480_priv_caps = .slope_filter_low = ts480_slope_filter_low, }; -int ts480_init(RIG *rig) +static int ts480_init(RIG *rig) { struct kenwood_priv_data *priv; int retval; @@ -1227,7 +1227,7 @@ int ts480_init(RIG *rig) RETURNFUNC(RIG_OK); } -int qrplabs_open(RIG *rig) +static int qrplabs_open(RIG *rig) { int retval; char buf[64]; @@ -1279,7 +1279,7 @@ int qdx_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) } -int qrplabs_get_clock(RIG *rig, int *year, int *month, int *day, int *hour, +static int qrplabs_get_clock(RIG *rig, int *year, int *month, int *day, int *hour, int *min, int *sec, double *msec, int *utc_offset) { char tm_cmd[32]; @@ -1295,7 +1295,7 @@ int qrplabs_get_clock(RIG *rig, int *year, int *month, int *day, int *hour, return retval; } -int qrplabs_set_clock(RIG *rig, int year, int month, int day, int hour, int min, +static int qrplabs_set_clock(RIG *rig, int year, int month, int day, int hour, int min, int sec, double msec, int utc_offset) { char tm_cmd[32]; @@ -2356,7 +2356,7 @@ const struct confparams malachite_cfg_parms[] = { RIG_CONF_END, NULL, } }; -int malachite_init(RIG *rig) +static int malachite_init(RIG *rig) { struct kenwood_priv_data *priv; int retval; @@ -2374,7 +2374,7 @@ int malachite_init(RIG *rig) RETURNFUNC(RIG_OK); } -int malachite_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) +static int malachite_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) { int post_write_delay_save = STATE(rig)->post_write_delay; STATE(rig)->post_write_delay = 0; @@ -2383,7 +2383,7 @@ int malachite_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) return retval; } -int malachite_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) +static int malachite_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) { int post_write_delay_save = STATE(rig)->post_write_delay; ENTERFUNC; @@ -2393,7 +2393,7 @@ int malachite_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) RETURNFUNC(retval); } -int malachite_set_freq(RIG *rig, vfo_t vfo, freq_t freq) +static int malachite_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { int retval; struct rig_cache *cachep = CACHE(rig); diff --git a/rigs/kenwood/ts570.c b/rigs/kenwood/ts570.c index 72710db2d..0d6cf9c1e 100644 --- a/rigs/kenwood/ts570.c +++ b/rigs/kenwood/ts570.c @@ -242,7 +242,7 @@ static int ts570_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) * extends kenwood_set_func * Assumes rig!=NULL, val!=NULL */ -int ts570_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) +static int ts570_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) { char fctbuf[6]; @@ -278,7 +278,7 @@ int ts570_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) * extends kenwood_get_func * Assumes rig!=NULL, val!=NULL */ -int ts570_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status) +static int ts570_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status) { char fctbuf[50]; size_t fct_len; @@ -342,7 +342,7 @@ int ts570_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status) * * set levels of most functions */ -int +static int ts570_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) { char levelbuf[16]; @@ -400,7 +400,7 @@ ts570_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) * ts570_get_level * Assumes rig!=NULL, val!=NULL */ -int +static int ts570_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) { char ackbuf[50]; @@ -515,7 +515,7 @@ ts570_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) /* * ts570_get_split_vfo */ -int ts570_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo) +static int ts570_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo) { char ack[10]; char ack2[10]; @@ -568,7 +568,7 @@ int ts570_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo) /* * ts570_set_split_vfo */ -int ts570_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t txvfo) +static int ts570_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t txvfo) { char cmdbuf[16], ackbuf[20]; int retval; @@ -683,7 +683,7 @@ int ts570_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t txvfo) .ctcss_tone=1 \ } -int ts570_set_channel(RIG *rig, vfo_t vfo, const channel_t *chan) +static int ts570_set_channel(RIG *rig, vfo_t vfo, const channel_t *chan) { char cmdbuf[30]; int retval; @@ -746,7 +746,7 @@ int ts570_set_channel(RIG *rig, vfo_t vfo, const channel_t *chan) return RIG_OK; } -int ts570_get_xit(RIG *rig, vfo_t vfo, shortfreq_t *rit) +static int ts570_get_xit(RIG *rig, vfo_t vfo, shortfreq_t *rit) { char infobuf[50]; int retval; @@ -780,7 +780,7 @@ int ts570_get_xit(RIG *rig, vfo_t vfo, shortfreq_t *rit) return RIG_OK; } -int ts570_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit) +static int ts570_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit) { char buf[50]; unsigned char c; @@ -840,7 +840,7 @@ int ts570_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit) return RIG_OK; } -int ts570_set_xit(RIG *rig, vfo_t vfo, shortfreq_t rit) +static int ts570_set_xit(RIG *rig, vfo_t vfo, shortfreq_t rit) { char buf[50]; unsigned char c; diff --git a/rigs/kenwood/ts590.c b/rigs/kenwood/ts590.c index bbe80b940..a21528cc5 100644 --- a/rigs/kenwood/ts590.c +++ b/rigs/kenwood/ts590.c @@ -185,7 +185,7 @@ const struct confparams ts590_ext_levels[] = * This is not documented in the manual as of 3/11/15 but confirmed from Kenwood * "TY" produces "TYK 00" for example */ -const char *ts590_get_info(RIG *rig) +static const char *ts590_get_info(RIG *rig) { char firmbuf[10]; int retval; diff --git a/rigs/kenwood/ts870s.c b/rigs/kenwood/ts870s.c index 98343310d..a2299e781 100644 --- a/rigs/kenwood/ts870s.c +++ b/rigs/kenwood/ts870s.c @@ -265,7 +265,7 @@ static int ts870s_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) return retval; } -int ts870s_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) +static int ts870s_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) { char levelbuf[16]; int intval; commit 9f43659831c22fa210732b8fd6a88d11fd6aa603 Author: George Baltz N3GB <Geo...@gm...> Date: Tue May 27 15:34:16 2025 -0400 Fix gain controls in simts890.c And a couple of other hiccups found by cppcheck diff --git a/simulators/simts890.c b/simulators/simts890.c index 854a1e96e..4c2982f97 100644 --- a/simulators/simts890.c +++ b/simulators/simts890.c @@ -180,9 +180,9 @@ const int stepvalues[4][10] = // Step sizes in Hz int stepsize[4] = { 1000, 500, 10000, 5000}; // Defaults by modeclass /* Function prototypes */ -int freq2band(int freq); -kvfop_t newvfo(kvfop_t ovfo, int band); -void swapvfos(kvfop_t *vfoset[]); +static int freq2band(int freq); +static kvfop_t newvfo(kvfop_t ovfo, int band); +static void swapvfos(kvfop_t *vfoset[]); // Extracted from rig.h int hl_usleep(unsigned long usec); // Until it's replaced @@ -410,24 +410,6 @@ int main(int argc, char *argv[]) { sscanf(buf, "RA%d", &ra); } - else if (strcmp(buf, "RG;") == 0) - { - hl_usleep(mysleep * 000); - pbuf = "RG255;"; - OUTPUT(pbuf); - } - else if (strcmp(buf, "MG;") == 0) - { - hl_usleep(mysleep * 1000); - pbuf = "MG050;"; - OUTPUT(pbuf); - } - else if (strcmp(buf, "AG;") == 0) - { - hl_usleep(mysleep * 1000); - pbuf = "AG100;"; - OUTPUT(pbuf); - } else if (strcmp(buf, "FV;") == 0) { hl_usleep(mysleep * 1000); @@ -1529,7 +1511,7 @@ int main(int argc, char *argv[]) * * Returns band # or negative if invalid input */ -int freq2band(int freq) +static int freq2band(int freq) { int i, retval = -1; // Assume the worst @@ -1553,7 +1535,7 @@ int freq2band(int freq) * new band * Return: new vfo pointer */ -kvfop_t newvfo(kvfop_t ovfo, int band) +static kvfop_t newvfo(kvfop_t ovfo, int band) { int vfonum, slot; @@ -1566,7 +1548,7 @@ kvfop_t newvfo(kvfop_t ovfo, int band) /* Reverse the function of vfoA and vfoB * No status returned */ -void swapvfos(kvfop_t *vfoset[]) +static void swapvfos(kvfop_t *vfoset[]) { kvfop_t *temp; diff --git a/simulators/simts990.c b/simulators/simts990.c index 1b2c93fbf..84b4d7c82 100644 --- a/simulators/simts990.c +++ b/simulators/simts990.c @@ -197,13 +197,6 @@ int main(int argc, char *argv[]) write(fd, pbuf, strlen(pbuf)); continue; } - else if (strcmp(buf, "MG;") == 0) - { - hl_usleep(mysleep * 1000); - pbuf = "MG050;"; - write(fd, pbuf, strlen(pbuf)); - continue; - } else if (strcmp(buf, "AG;") == 0) { hl_usleep(mysleep * 1000); commit a4b6ef4fd73dce67de5cb859f111d819d40313ed Author: George Baltz N3GB <Geo...@gm...> Date: Sat May 17 14:22:09 2025 -0400 Fix out of sequence merge for issue #1634 Still undetermined if fix is needed for TS-590SG diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index c4449c5d6..45bd5012f 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -231,7 +231,7 @@ struct confparams kenwood_cfg_params[] = { RIG_CONF_END, NULL, } }; -int remove_nonprint(char *s) +static int remove_nonprint(char *s) { int i, j = 0; if (s == NULL) return 0; @@ -392,7 +392,7 @@ transaction_write: skip |= strncmp(cmdstr, "RD", 2) == 0; skip |= strncmp(cmdstr, "KYW", 3) == 0; skip |= strncmp(cmdstr, "KY ", 3) == 0; - skip |= strncmp(cmdstr, "KY0", 3) == 0; + skip |= strncmp(cmdstr, "KY0", 3) == 0; skip |= strncmp(cmdstr, "KY2", 3) == 0; skip |= strncmp(cmdstr, "PS1", 3) == 0; skip |= strncmp(cmdstr, "PS0", 3) == 0; @@ -770,7 +770,7 @@ int kenwood_safe_transaction(RIG *rig, const char *cmd, char *buf, if (checklen && length != expected) /* worth retrying as some rigs occasionally send short results */ { - // QRPLABS can't seem top decide if they give 37 or 38 bytes for IF command + // QRPLABS can't seem to decide if they give 37 or 38 bytes for IF command if (strncmp(cmd, "IF", 2) == 0 && rig->caps->rig_model == RIG_MODEL_QRPLABS) { break; } struct kenwood_priv_data *priv = STATE(rig)->priv; @@ -5575,6 +5575,14 @@ int kenwood_send_morse(RIG *rig, vfo_t vfo, const char *msg) SNPRINTF(morsebuf, sizeof(morsebuf), "KY %s", m2); break; + case RIG_MODEL_TS590S: + //??case RIG_MODEL_TS590SG: + /* The command must consist of 28 bytes right aligned. + * See https://github.com/Hamlib/Hamlib/issues/1634 + */ + SNPRINTF(morsebuf, sizeof(morsebuf), "KY %24s", m2); + break; + case RIG_MODEL_TS890S: SNPRINTF(morsebuf, sizeof morsebuf, "KY2%s", m2); break; @@ -5589,11 +5597,6 @@ int kenwood_send_morse(RIG *rig, vfo_t vfo, const char *msg) } /* FALL THROUGH */ - case RIG_MODEL_TS590S: - /* the command must consist of 28 bytes right aligned */ - SNPRINTF(morsebuf, sizeof(morsebuf), "KY %24s", m2); - break; - default: /* the command must consist of 28 bytes 0x20 padded */ SNPRINTF(morsebuf, sizeof(morsebuf), "KY %-24s", m2); diff --git a/rigs/kenwood/kenwood.h b/rigs/kenwood/kenwood.h index f553cadc4..36783db08 100644 --- a/rigs/kenwood/kenwood.h +++ b/rigs/kenwood/kenwood.h @@ -28,7 +28,7 @@ #include "token.h" #include "idx_builtin.h" -#define BACKEND_VER "20250107" +#define BACKEND_VER "20250515" #define EOM_KEN ';' #define EOM_TH '\r' ----------------------------------------------------------------------- Summary of changes: .gitignore | 1 + amplifiers/elecraft/kpa.c | 2 +- include/hamlib/rig.h | 2 +- rigs/dummy/dummy.c | 4 +-- rigs/flexradio/dttsp.c | 2 +- rigs/icom/ic7100.c | 4 +-- rigs/icom/ic7200.c | 8 +++--- rigs/kenwood/kenwood.c | 19 ++++++++------ rigs/kenwood/kenwood.h | 2 +- rigs/kenwood/ts2000.c | 2 +- rigs/kenwood/ts480.c | 22 ++++++++-------- rigs/kenwood/ts570.c | 20 +++++++-------- rigs/kenwood/ts590.c | 2 +- rigs/kenwood/ts870s.c | 2 +- rigs/kenwood/ts890s.c | 8 +++--- rigs/kenwood/xg3.c | 64 +++++++++++++++++++++++------------------------ rigs/tentec/jupiter.c | 2 +- rigs/yaesu/ft3000.c | 4 +-- rigs/yaesu/ft857.c | 4 +-- rigs/yaesu/pmr171.c | 10 ++++---- security/aes.c | 6 ++--- security/aes.h | 6 ++--- security/md5.c | 2 +- security/sha256.c | 2 +- simulators/simts890.c | 30 +++++----------------- simulators/simts990.c | 7 ------ src/sprintflst.c | 2 +- 27 files changed, 109 insertions(+), 130 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-05-29 08:14: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, Hamlib-4.6.3 has been updated via 8f919a5a54d7318afea557790d34ddb74c1c6b56 (commit) from 53d2eed741d36fd87622a601590d8e860f048bc3 (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 8f919a5a54d7318afea557790d34ddb74c1c6b56 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Tue May 27 08:58:56 2025 +0200 Fix list of dependecies of aclocal.m4 Adds missing ax_lib_readline.m4 and ax_lua.m4 to the list of MACROS. Also sorts the list. (cherry picked from commit 9fdf8f201ce78a2c3b8b0a245bdd2cacf17cbb68) diff --git a/macros/Makefile.am b/macros/Makefile.am index 5bbf29963..295d473d8 100644 --- a/macros/Makefile.am +++ b/macros/Makefile.am @@ -3,12 +3,14 @@ MACROS = \ ax_append_flag.m4 \ ax_cflags_warn_all.m4 \ + ax_cxx_compile_stdcxx.m4 \ + ax_lib_indi.m4 \ + ax_lib_nova.m4 \ + ax_lib_readline.m4 \ + ax_lua.m4 \ ax_pkg_swig.m4 \ ax_pthread.m4 \ ax_python_devel.m4 \ - ax_lib_indi.m4 \ - ax_lib_nova.m4 \ - ax_cxx_compile_stdcxx.m4 \ gr_doxygen.m4 \ gr_pwin32.m4 \ hl_getaddrinfo.m4 \ ----------------------------------------------------------------------- Summary of changes: macros/Makefile.am | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-05-29 08:10: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 9fdf8f201ce78a2c3b8b0a245bdd2cacf17cbb68 (commit) from 717d720a3605745a47812908b088117580e4e10c (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 9fdf8f201ce78a2c3b8b0a245bdd2cacf17cbb68 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Tue May 27 08:58:56 2025 +0200 Fix list of dependecies of aclocal.m4 Adds missing ax_lib_readline.m4 and ax_lua.m4 to the list of MACROS. Also sorts the list. diff --git a/macros/Makefile.am b/macros/Makefile.am index 5bbf29963..295d473d8 100644 --- a/macros/Makefile.am +++ b/macros/Makefile.am @@ -3,12 +3,14 @@ MACROS = \ ax_append_flag.m4 \ ax_cflags_warn_all.m4 \ + ax_cxx_compile_stdcxx.m4 \ + ax_lib_indi.m4 \ + ax_lib_nova.m4 \ + ax_lib_readline.m4 \ + ax_lua.m4 \ ax_pkg_swig.m4 \ ax_pthread.m4 \ ax_python_devel.m4 \ - ax_lib_indi.m4 \ - ax_lib_nova.m4 \ - ax_cxx_compile_stdcxx.m4 \ gr_doxygen.m4 \ gr_pwin32.m4 \ hl_getaddrinfo.m4 \ ----------------------------------------------------------------------- Summary of changes: macros/Makefile.am | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-05-26 16:17:49
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, Hamlib-4.6.3 has been updated via 53d2eed741d36fd87622a601590d8e860f048bc3 (commit) from f0ac83bcba5b7bf0a6a2db18d31069bbd118cd41 (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 53d2eed741d36fd87622a601590d8e860f048bc3 Author: George Baltz N3GB <Geo...@gm...> Date: Sat May 24 20:20:10 2025 -0400 Add locking around get/set levels (cherry picked from commit b5df48d8d9839460e13201765b278c6a32741158) diff --git a/src/settings.c b/src/settings.c index 8dfbb6731..0667160b0 100644 --- a/src/settings.c +++ b/src/settings.c @@ -90,6 +90,7 @@ int HAMLIB_API rig_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) return -RIG_ENAVAIL; } + rig_lock(rig, 1); if ((caps->targetable_vfo & RIG_TARGETABLE_LEVEL) || vfo == RIG_VFO_CURR || vfo == STATE(rig)->current_vfo) @@ -103,12 +104,14 @@ int HAMLIB_API rig_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) } #endif - - return caps->set_level(rig, vfo, level, val); + retcode = caps->set_level(rig, vfo, level, val); + rig_lock(rig, 0); + return retcode; } if (!caps->set_vfo) { + rig_lock(rig, 0); return -RIG_ENTARGET; } @@ -117,11 +120,13 @@ int HAMLIB_API rig_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) if (retcode != RIG_OK) { + rig_lock(rig, 0); return retcode; } retcode = caps->set_level(rig, vfo, level, val); caps->set_vfo(rig, curr_vfo); + rig_lock(rig, 0); return retcode; } @@ -172,6 +177,7 @@ int HAMLIB_API rig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) return -RIG_ENAVAIL; } + rig_lock(rig, 1); // Keep Out! /* * Special case(frontend emulation): calibrated S-meter reading */ @@ -187,10 +193,12 @@ int HAMLIB_API rig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) if (retcode != RIG_OK) { + rig_lock(rig, 0); return retcode; } val->i = (int)rig_raw2val(rawstr.i, &rs->str_cal); + rig_lock(rig, 0); return RIG_OK; } @@ -199,12 +207,14 @@ int HAMLIB_API rig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) || vfo == RIG_VFO_CURR || vfo == rs->current_vfo) { - - return caps->get_level(rig, vfo, level, val); + retcode = caps->get_level(rig, vfo, level, val); + rig_lock(rig, 0); + return retcode; } if (!caps->set_vfo) { + rig_lock(rig, 0); return -RIG_ENTARGET; } @@ -213,11 +223,13 @@ int HAMLIB_API rig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) if (retcode != RIG_OK) { + rig_lock(rig, 0); return retcode; } retcode = caps->get_level(rig, vfo, level, val); caps->set_vfo(rig, curr_vfo); + rig_lock(rig, 0); return retcode; } ----------------------------------------------------------------------- Summary of changes: src/settings.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-05-26 16:16:01
|
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 717d720a3605745a47812908b088117580e4e10c (commit) via b5df48d8d9839460e13201765b278c6a32741158 (commit) from 43017b38f08c6ed75fa9c5a4d88bdb0875e7c15a (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 717d720a3605745a47812908b088117580e4e10c Merge: 43017b38f b5df48d8d Author: Nate Bargmann <n0...@n0...> Date: Mon May 26 11:09:36 2025 -0500 Merge GitHub PR #1744 commit b5df48d8d9839460e13201765b278c6a32741158 Author: George Baltz N3GB <Geo...@gm...> Date: Sat May 24 20:20:10 2025 -0400 Add locking around get/set levels diff --git a/src/settings.c b/src/settings.c index 8dfbb6731..0667160b0 100644 --- a/src/settings.c +++ b/src/settings.c @@ -90,6 +90,7 @@ int HAMLIB_API rig_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) return -RIG_ENAVAIL; } + rig_lock(rig, 1); if ((caps->targetable_vfo & RIG_TARGETABLE_LEVEL) || vfo == RIG_VFO_CURR || vfo == STATE(rig)->current_vfo) @@ -103,12 +104,14 @@ int HAMLIB_API rig_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) } #endif - - return caps->set_level(rig, vfo, level, val); + retcode = caps->set_level(rig, vfo, level, val); + rig_lock(rig, 0); + return retcode; } if (!caps->set_vfo) { + rig_lock(rig, 0); return -RIG_ENTARGET; } @@ -117,11 +120,13 @@ int HAMLIB_API rig_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) if (retcode != RIG_OK) { + rig_lock(rig, 0); return retcode; } retcode = caps->set_level(rig, vfo, level, val); caps->set_vfo(rig, curr_vfo); + rig_lock(rig, 0); return retcode; } @@ -172,6 +177,7 @@ int HAMLIB_API rig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) return -RIG_ENAVAIL; } + rig_lock(rig, 1); // Keep Out! /* * Special case(frontend emulation): calibrated S-meter reading */ @@ -187,10 +193,12 @@ int HAMLIB_API rig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) if (retcode != RIG_OK) { + rig_lock(rig, 0); return retcode; } val->i = (int)rig_raw2val(rawstr.i, &rs->str_cal); + rig_lock(rig, 0); return RIG_OK; } @@ -199,12 +207,14 @@ int HAMLIB_API rig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) || vfo == RIG_VFO_CURR || vfo == rs->current_vfo) { - - return caps->get_level(rig, vfo, level, val); + retcode = caps->get_level(rig, vfo, level, val); + rig_lock(rig, 0); + return retcode; } if (!caps->set_vfo) { + rig_lock(rig, 0); return -RIG_ENTARGET; } @@ -213,11 +223,13 @@ int HAMLIB_API rig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) if (retcode != RIG_OK) { + rig_lock(rig, 0); return retcode; } retcode = caps->get_level(rig, vfo, level, val); caps->set_vfo(rig, curr_vfo); + rig_lock(rig, 0); return retcode; } ----------------------------------------------------------------------- Summary of changes: src/settings.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-05-26 15:53:43
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 43017b38f08c6ed75fa9c5a4d88bdb0875e7c15a (commit) via 3034631b2f99f32680e2939035f45019a2fc38c3 (commit) from f459eea516a3e5c9b74c72dd4a430fcde1764f71 (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 43017b38f08c6ed75fa9c5a4d88bdb0875e7c15a Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Mon May 26 08:25:17 2025 +0200 Fix typo Add closing tag for example text. diff --git a/doc/man1/rotctld.1 b/doc/man1/rotctld.1 index 234b71a04..d1cd13ed1 100644 --- a/doc/man1/rotctld.1 +++ b/doc/man1/rotctld.1 @@ -159,6 +159,7 @@ rotctld -T 127.0.0.1 (bind only to 127.0.0.1) .in +4n rotctl -m 2 (binds to all interfaces) rotctl -m 2 -r 127.0.0.1 (bind only to 127.0.0.1) +.EE . .TP .BR \-t ", " \-\-port = \fInumber\fP commit 3034631b2f99f32680e2939035f45019a2fc38c3 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat May 24 20:03:33 2025 +0200 Fix typo diff --git a/rigs/dummy/amp_dummy.c b/rigs/dummy/amp_dummy.c index d04d586e6..1b94884a5 100644 --- a/rigs/dummy/amp_dummy.c +++ b/rigs/dummy/amp_dummy.c @@ -186,7 +186,7 @@ static int dummy_amp_get_level(AMP *amp, setting_t level, value_t *val) return RIG_OK; case AMP_LEVEL_NH: - rig_debug(RIG_DEBUG_VERBOSE, "%s AMP_LEVEL_UH\n", __func__); + rig_debug(RIG_DEBUG_VERBOSE, "%s AMP_LEVEL_NH\n", __func__); val->i = flag == 0 ? 0 : 8370; return RIG_OK; ----------------------------------------------------------------------- Summary of changes: doc/man1/rotctld.1 | 1 + rigs/dummy/amp_dummy.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |
From: n0nb <n0...@us...> - 2025-05-26 15:52:30
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, Hamlib-4.6.3 has been updated via f0ac83bcba5b7bf0a6a2db18d31069bbd118cd41 (commit) via ffb61c29a5aa0eca95d4cf62e3cb15c610a223ce (commit) from e641162a6be7570a20b6e0189a53063cdbca1a39 (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 f0ac83bcba5b7bf0a6a2db18d31069bbd118cd41 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Mon May 26 08:25:17 2025 +0200 Fix typo Add closing tag for example text. (cherry picked from commit 43017b38f08c6ed75fa9c5a4d88bdb0875e7c15a) diff --git a/doc/man1/rotctld.1 b/doc/man1/rotctld.1 index 234b71a04..d1cd13ed1 100644 --- a/doc/man1/rotctld.1 +++ b/doc/man1/rotctld.1 @@ -159,6 +159,7 @@ rotctld -T 127.0.0.1 (bind only to 127.0.0.1) .in +4n rotctl -m 2 (binds to all interfaces) rotctl -m 2 -r 127.0.0.1 (bind only to 127.0.0.1) +.EE . .TP .BR \-t ", " \-\-port = \fInumber\fP commit ffb61c29a5aa0eca95d4cf62e3cb15c610a223ce Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat May 24 20:03:33 2025 +0200 Fix typo (cherry picked from commit 3034631b2f99f32680e2939035f45019a2fc38c3) diff --git a/rigs/dummy/amp_dummy.c b/rigs/dummy/amp_dummy.c index d04d586e6..1b94884a5 100644 --- a/rigs/dummy/amp_dummy.c +++ b/rigs/dummy/amp_dummy.c @@ -186,7 +186,7 @@ static int dummy_amp_get_level(AMP *amp, setting_t level, value_t *val) return RIG_OK; case AMP_LEVEL_NH: - rig_debug(RIG_DEBUG_VERBOSE, "%s AMP_LEVEL_UH\n", __func__); + rig_debug(RIG_DEBUG_VERBOSE, "%s AMP_LEVEL_NH\n", __func__); val->i = flag == 0 ? 0 : 8370; return RIG_OK; ----------------------------------------------------------------------- Summary of changes: doc/man1/rotctld.1 | 1 + rigs/dummy/amp_dummy.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |