[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 7561642898e81e72c1a6a
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Michael B. <mdb...@us...> - 2021-09-15 18:42:13
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 7561642898e81e72c1a6a2292fec7e35f87bdbee (commit) via b49d2b6c05881583f9b5d700dcb4a21fc621bd91 (commit) via 61785075d3e3dd98da8e8a3d642a513fe47c6b68 (commit) via 25318f6e16a19ccd0360afff1ba6911b0bd59fbb (commit) via efb57f9a108d4754544a8d918e8bb196089bf206 (commit) via 9b618b6f477b16a913beea47b5f358f30f7cca15 (commit) via 1a7a7a5ae7e5bfae4027016f62a7ee82ed900eae (commit) via 8ab0f0167d9ba6f84dafbd82c85f2f7374224c31 (commit) via d60e82c222ce7ee8a1d072c1f8bfbdab494ededc (commit) via c008f2aa5929c8cfc731bdb5f18c604b6c0c25c5 (commit) via 16263e83382645a75e29a5a442ac5712bd54a3b2 (commit) from 0f2a92b2de7118f303215cccd1188199711a4b4d (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 7561642898e81e72c1a6a2292fec7e35f87bdbee Author: Mike Black W9MDB <mdb...@ya...> Date: Wed Sep 15 13:36:45 2021 -0500 Turns out thd72 has a mini USB so may take hardware flow control diff --git a/rigs/kenwood/thd72.c b/rigs/kenwood/thd72.c index 7b1577b3..76016bfb 100644 --- a/rigs/kenwood/thd72.c +++ b/rigs/kenwood/thd72.c @@ -1642,7 +1642,7 @@ const struct rig_caps thd72a_caps = .serial_data_bits = 8, .serial_stop_bits = 1, .serial_parity = RIG_PARITY_NONE, - .serial_handshake = RIG_HANDSHAKE_XONXOFF, + .serial_handshake = RIG_HANDSHAKE_HARDWARE, .write_delay = 0, .post_write_delay = 0, .timeout = 300, commit b49d2b6c05881583f9b5d700dcb4a21fc621bd91 Author: Mike Black W9MDB <mdb...@ya...> Date: Wed Sep 15 10:27:34 2021 -0500 Add CLOCK_REALTIME flag to cppcheck.sh diff --git a/cppcheck.sh b/cppcheck.sh index bba1f980..d71b45ba 100755 --- a/cppcheck.sh +++ b/cppcheck.sh @@ -73,6 +73,7 @@ CHECK="\ -U IPV6_V6ONLY \ -D SIGINT \ -D WIN32 \ +-D CLOCK_REALTIME \ -D HAVE_SIGNAL" # If no directory or file name provided, scan the entire project. commit 61785075d3e3dd98da8e8a3d642a513fe47c6b68 Author: Mike Black W9MDB <mdb...@ya...> Date: Wed Sep 15 10:24:42 2021 -0500 Reduce scope of some vars in sprintflst.c diff --git a/src/sprintflst.c b/src/sprintflst.c index 3e3e8ad1..83fbac1f 100644 --- a/src/sprintflst.c +++ b/src/sprintflst.c @@ -731,13 +731,14 @@ int rot_sprintf_status(char *str, int nlen, rot_status_t status) int rig_sprintf_spectrum_modes(char *str, int nlen, const enum rig_spectrum_mode_e *modes) { - int i, len = 0, lentmp; + int i, len = 0; *str = '\0'; for (i = 0; i < HAMLIB_MAX_SPECTRUM_MODES; i++) { const char *sm; + int lentmp; if (modes[i] == RIG_SPECTRUM_MODE_NONE) { @@ -768,12 +769,14 @@ int rig_sprintf_spectrum_modes(char *str, int nlen, int rig_sprintf_spectrum_spans(char *str, int nlen, const freq_t *spans) { - int i, len = 0, lentmp; + int i, len = 0; *str = '\0'; for (i = 0; i < HAMLIB_MAX_SPECTRUM_SPANS; i++) { + int lentmp; + if (spans[i] == 0) { break; @@ -796,12 +799,14 @@ int rig_sprintf_spectrum_spans(char *str, int nlen, const freq_t *spans) int rig_sprintf_spectrum_avg_modes(char *str, int nlen, const struct rig_spectrum_avg_mode *avg_modes) { - int i, len = 0, lentmp; + int i, len = 0; *str = '\0'; for (i = 0; i < HAMLIB_MAX_SPECTRUM_MODES; i++) { + int lentmp; + if (avg_modes[i].name == NULL || avg_modes[i].id < 0) { break; commit 25318f6e16a19ccd0360afff1ba6911b0bd59fbb Author: Mike Black W9MDB <mdb...@ya...> Date: Wed Sep 15 10:21:56 2021 -0500 Remove mandatory libusb requirement in gr_pwin32.m4 diff --git a/macros/gr_pwin32.m4 b/macros/gr_pwin32.m4 index 87920f90..df37e12a 100644 --- a/macros/gr_pwin32.m4 +++ b/macros/gr_pwin32.m4 @@ -22,7 +22,7 @@ AC_DEFUN([GR_PWIN32], [ -AC_SEARCH_LIBS([nanosleep], [pthread], [], [AC_MSG_ERROR([unable to find nanosleep])]) +AC_SEARCH_LIBS([nanosleep], [pthread]) AC_CHECK_HEADERS([pthread.h]) AC_CHECK_HEADERS([sys/types.h]) AC_CHECK_HEADERS([windows.h]) commit efb57f9a108d4754544a8d918e8bb196089bf206 Author: Mike Black W9MDB <mdb...@ya...> Date: Wed Sep 15 08:57:34 2021 -0500 Change hardware flow back to xonxoff for THD72 Promote all TH rigs to stable diff --git a/rigs/kenwood/thd7.c b/rigs/kenwood/thd7.c index ccfdf9ff..61e96995 100644 --- a/rigs/kenwood/thd7.c +++ b/rigs/kenwood/thd7.c @@ -88,7 +88,7 @@ const struct rig_caps thd7a_caps = .mfg_name = "Kenwood", .version = TH_VER ".0", .copyright = "LGPL", - .status = RIG_STATUS_BETA, + .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_HANDHELD | RIG_FLAG_APRS | RIG_FLAG_TNC | RIG_FLAG_DXCLUSTER, .ptt_type = RIG_PTT_RIG, .dcd_type = RIG_DCD_RIG, diff --git a/rigs/kenwood/thd72.c b/rigs/kenwood/thd72.c index 76016bfb..7b1577b3 100644 --- a/rigs/kenwood/thd72.c +++ b/rigs/kenwood/thd72.c @@ -1642,7 +1642,7 @@ const struct rig_caps thd72a_caps = .serial_data_bits = 8, .serial_stop_bits = 1, .serial_parity = RIG_PARITY_NONE, - .serial_handshake = RIG_HANDSHAKE_HARDWARE, + .serial_handshake = RIG_HANDSHAKE_XONXOFF, .write_delay = 0, .post_write_delay = 0, .timeout = 300, diff --git a/rigs/kenwood/thf6a.c b/rigs/kenwood/thf6a.c index d7eb1513..d3ac49dd 100644 --- a/rigs/kenwood/thf6a.c +++ b/rigs/kenwood/thf6a.c @@ -124,7 +124,7 @@ const struct rig_caps thf6a_caps = .mfg_name = "Kenwood", .version = TH_VER ".0", .copyright = "LGPL", - .status = RIG_STATUS_BETA, + .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_HANDHELD, .ptt_type = RIG_PTT_RIG, .dcd_type = RIG_DCD_RIG, diff --git a/rigs/kenwood/thf7.c b/rigs/kenwood/thf7.c index eda15a8d..f1d395d7 100644 --- a/rigs/kenwood/thf7.c +++ b/rigs/kenwood/thf7.c @@ -118,7 +118,7 @@ const struct rig_caps thf7e_caps = .mfg_name = "Kenwood", .version = TH_VER ".0", .copyright = "LGPL", - .status = RIG_STATUS_BETA, + .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_HANDHELD, .ptt_type = RIG_PTT_RIG, .dcd_type = RIG_DCD_RIG, diff --git a/rigs/kenwood/thg71.c b/rigs/kenwood/thg71.c index 332b09de..0cf46337 100644 --- a/rigs/kenwood/thg71.c +++ b/rigs/kenwood/thg71.c @@ -92,7 +92,7 @@ const struct rig_caps thg71_caps = .mfg_name = "Kenwood", .version = TH_VER ".0", .copyright = "LGPL", - .status = RIG_STATUS_BETA, + .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_HANDHELD, .ptt_type = RIG_PTT_RIG, .dcd_type = RIG_DCD_RIG, commit 9b618b6f477b16a913beea47b5f358f30f7cca15 Author: Mike Black W9MDB <mdb...@ya...> Date: Tue Sep 14 22:18:35 2021 -0500 Patch from Stephen McCallum for THD72 change to hardware flow diff --git a/rigs/kenwood/thd72.c b/rigs/kenwood/thd72.c index 03948ed8..76016bfb 100644 --- a/rigs/kenwood/thd72.c +++ b/rigs/kenwood/thd72.c @@ -1632,7 +1632,7 @@ const struct rig_caps thd72a_caps = .mfg_name = "Kenwood", .version = TH_VER ".0", .copyright = "LGPL", - .status = RIG_STATUS_BETA, + .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_HANDHELD | RIG_FLAG_APRS | RIG_FLAG_TNC | RIG_FLAG_DXCLUSTER, .ptt_type = RIG_PTT_RIG, .dcd_type = RIG_DCD_RIG, @@ -1642,7 +1642,7 @@ const struct rig_caps thd72a_caps = .serial_data_bits = 8, .serial_stop_bits = 1, .serial_parity = RIG_PARITY_NONE, - .serial_handshake = RIG_HANDSHAKE_XONXOFF, + .serial_handshake = RIG_HANDSHAKE_HARDWARE, .write_delay = 0, .post_write_delay = 0, .timeout = 300, commit 1a7a7a5ae7e5bfae4027016f62a7ee82ed900eae Author: Mike Black W9MDB <mdb...@ya...> Date: Tue Sep 14 11:29:07 2021 -0500 Fix flrig modeMap loop to ignore NULL entries https://github.com/Hamlib/Hamlib/issues/798 diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index 96b226f2..9d65fe78 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -673,6 +673,7 @@ static const char *modeMapGetFLRig(rmode_t modeHamlib) for (i = 0; modeMap[i].mode_hamlib != 0; ++i) { + if (modeMap[i].mode_flrig == NULL) continue; rig_debug(RIG_DEBUG_TRACE, "%s: checking modeMap[%d]=%.0f to modeHamlib=%.0f, mode_flrig='%s'\n", __func__, i, (double)modeMap[i].mode_hamlib, (double)modeHamlib, modeMap[i].mode_flrig); commit 8ab0f0167d9ba6f84dafbd82c85f2f7374224c31 Author: Mike Black W9MDB <mdb...@ya...> Date: Tue Sep 14 10:02:21 2021 -0500 Make flrig compatible with older versions e.g. 1.3.42 on RPi https://github.com/Hamlib/Hamlib/issues/798 diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index d5864d92..96b226f2 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -144,7 +144,7 @@ const struct rig_caps flrig_caps = RIG_MODEL(RIG_MODEL_FLRIG), .model_name = "FLRig", .mfg_name = "FLRig", - .version = "202100911", + .version = "202100914", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -796,12 +796,12 @@ static int flrig_open(RIG *rig) if (retval != RIG_OK) { - rig_debug(RIG_DEBUG_ERR, "%s: get_version failed: %s\n", __func__, + rig_debug(RIG_DEBUG_ERR, "%s: get_version failed: %s\nAssuming version < 1.3.54", __func__, rigerror(retval)); - RETURNFUNC(retval); + // we fall through and assume old version } - int v1, v2, v3, v4; + int v1=0, v2=0, v3=0, v4=0; sscanf(value, "%d.%d.%d.%d", &v1, &v2, &v3, &v4); if (v1 >= 1 && v2 >= 3 && v3 >= 54) commit d60e82c222ce7ee8a1d072c1f8bfbdab494ededc Author: Mike Black W9MDB <mdb...@ya...> Date: Mon Sep 13 17:41:53 2021 -0500 Reduce scope of vars in rig.c diff --git a/src/rig.c b/src/rig.c index 0f750690..d85dceb5 100644 --- a/src/rig.c +++ b/src/rig.c @@ -3131,7 +3131,7 @@ int HAMLIB_API rig_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) const struct rig_caps *caps; struct rig_state *rs = &rig->state; int retcode = RIG_OK; - int rc2, status; + int status; vfo_t curr_vfo; int cache_ms; int targetable_ptt = 0; @@ -3226,7 +3226,7 @@ int HAMLIB_API rig_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) /* try and revert even if we had an error above */ if (!targetable_ptt) { - rc2 = caps->set_vfo(rig, curr_vfo); + int rc2 = caps->set_vfo(rig, curr_vfo); if (RIG_OK == retcode) { @@ -6485,13 +6485,12 @@ const char *HAMLIB_API rig_get_info(RIG *rig) static void make_crc_table(unsigned long crcTable[]) { unsigned long POLYNOMIAL = 0xEDB88320; - unsigned long remainder; unsigned char b = 0; do { // Start with the data byte - remainder = b; + unsigned long remainder = b; unsigned long bit; commit c008f2aa5929c8cfc731bdb5f18c604b6c0c25c5 Author: Mike Black W9MDB <mdb...@ya...> Date: Mon Sep 13 17:39:20 2021 -0500 Make remove_opened_rig arg in rotator.c const diff --git a/src/rotator.c b/src/rotator.c index 8f72ad39..f556f79c 100644 --- a/src/rotator.c +++ b/src/rotator.c @@ -124,7 +124,7 @@ static int add_opened_rot(ROT *rot) } -static int remove_opened_rot(ROT *rot) +static int remove_opened_rot(const ROT *rot) { struct opened_rot_l *p, *q; q = NULL; commit 16263e83382645a75e29a5a442ac5712bd54a3b2 Author: Mike Black W9MDB <mdb...@ya...> Date: Mon Sep 13 17:38:37 2021 -0500 Remove shadow var from rig.c diff --git a/src/rig.c b/src/rig.c index aeae9f2a..0f750690 100644 --- a/src/rig.c +++ b/src/rig.c @@ -2117,8 +2117,6 @@ int HAMLIB_API rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) // so we'll just reuse the cache for that condition if (*freq == 0) { - rmode_t mode; - pbwidth_t width; int freq_ms, mode_ms, width_ms; rig_get_cache(rig, vfo, freq, &freq_ms, &mode, &mode_ms, &width, &width_ms); } ----------------------------------------------------------------------- Summary of changes: cppcheck.sh | 1 + macros/gr_pwin32.m4 | 2 +- rigs/dummy/flrig.c | 9 +++++---- rigs/kenwood/thd7.c | 2 +- rigs/kenwood/thd72.c | 4 ++-- rigs/kenwood/thf6a.c | 2 +- rigs/kenwood/thf7.c | 2 +- rigs/kenwood/thg71.c | 2 +- src/rig.c | 9 +++------ src/rotator.c | 2 +- src/sprintflst.c | 11 ++++++++--- 11 files changed, 25 insertions(+), 21 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |