[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 4571dcb2a50497162e464
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Michael B. <mdb...@us...> - 2021-01-10 20:40:42
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 4571dcb2a50497162e464d6928e86fc7571a1f2c (commit) via 736959f41ac8cae181713e444df0e7d0565b2717 (commit) from 2b3439b75136e20b1f3fa7dce76daf02a894a31c (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 4571dcb2a50497162e464d6928e86fc7571a1f2c Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jan 10 14:39:39 2021 -0600 Fix rig_get_function_ptr return value https://github.com/Hamlib/Hamlib/issues/502 diff --git a/src/misc.c b/src/misc.c index 17a790ac..205f47ca 100644 --- a/src/misc.c +++ b/src/misc.c @@ -2073,13 +2073,13 @@ void *rig_get_function_ptr(rig_model_t rig_model, default: rig_debug(RIG_DEBUG_ERR, "Unknown function?? function=%d\n", rig_function); - return NULL; - } - return RIG_OK; + return NULL; } +// negative return indicates error +// watch out for integer values that may be negative int rig_get_caps_int(rig_model_t rig_model, enum rig_caps_int_e rig_caps) { const struct rig_caps *caps = rig_get_caps(rig_model); @@ -2102,8 +2102,6 @@ int rig_get_caps_int(rig_model_t rig_model, enum rig_caps_int_e rig_caps) rig_debug(RIG_DEBUG_ERR, "%s: Unknown rig_caps value=%d\n", __func__, rig_caps); return -RIG_EINVAL; } - - return RIG_OK; } const char *rig_get_caps_cptr(rig_model_t rig_model, commit 736959f41ac8cae181713e444df0e7d0565b2717 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jan 10 14:35:37 2021 -0600 Fix ft100.c RPT_SHIFT bit masking https://github.com/Hamlib/Hamlib/issues/501 diff --git a/rigs/yaesu/ft100.c b/rigs/yaesu/ft100.c index 31a5f993..da0a018c 100644 --- a/rigs/yaesu/ft100.c +++ b/rigs/yaesu/ft100.c @@ -174,7 +174,7 @@ const struct rig_caps ft100_caps = RIG_MODEL(RIG_MODEL_FT100), .model_name = "FT-100", .mfg_name = "Yaesu", - .version = "20210102.0", + .version = "20210110.0", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -1022,8 +1022,8 @@ int ft100_get_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t *shift) *shift = RIG_RPT_SHIFT_NONE; - if (priv->status.flag1 && 1 << 2) { *shift = RIG_RPT_SHIFT_MINUS; } - else if (priv->status.flag1 && 1 << 3) { *shift = RIG_RPT_SHIFT_PLUS; } + if (priv->status.flag1 & (1 << 2)) { *shift = RIG_RPT_SHIFT_MINUS; } + else if (priv->status.flag1 & (1 << 3)) { *shift = RIG_RPT_SHIFT_PLUS; } rig_debug(RIG_DEBUG_VERBOSE, "%s: flag1=0x%02x\n", __func__, priv->status.flag1); ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/ft100.c | 6 +++--- src/misc.c | 8 +++----- 2 files changed, 6 insertions(+), 8 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |