[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 46711b1db4b4f737964f7
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: n0nb <n0...@us...> - 2024-12-04 20:21:23
|
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 46711b1db4b4f737964f700941c1184db81d5bf1 (commit) via 941e69eda5b5516e5614f1b69b23fbd69ca74430 (commit) via dd15ffc7bd47a6ba481e42d6211a0f50c908d6c7 (commit) via 8f0e9909da7c3f93cc68515b58ce6f199cc61425 (commit) via 3e0a9eeae703765f932ffa3dc95e8ed65ec9540d (commit) from d1d4964a193217da42f57ef7bdeb59796ea7acc2 (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 46711b1db4b4f737964f700941c1184db81d5bf1 Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Dec 4 10:00:41 2024 -0600 Fix FLRig STRENGTH reading to use rig.get_DBM instead of rig.get_smeter -- much better representation diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index bfabc388b..e739acf81 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -143,7 +143,7 @@ struct rig_caps flrig_caps = RIG_MODEL(RIG_MODEL_FLRIG), .model_name = "", .mfg_name = "FLRig", - .version = "20241110.0", + .version = "20241204.0", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -2332,7 +2332,7 @@ static int flrig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) case RIG_LEVEL_MICGAIN: cmd = "rig.get_micgain"; break; - case RIG_LEVEL_STRENGTH: cmd = "rig.get_smeter"; break; + case RIG_LEVEL_STRENGTH: cmd = "rig.get_DBM"; break; case RIG_LEVEL_SWR: cmd = "rig.get_swrmeter"; @@ -2386,7 +2386,7 @@ static int flrig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) } case RIG_LEVEL_STRENGTH: - val->i = atoi(value) - 54; + val->i = atoi(value); //if (val->i > 0) val->i /= 10; rig_debug(RIG_DEBUG_TRACE, "%s: val.i='%s'(%d)\n", __func__, value, val->i); break; commit 941e69eda5b5516e5614f1b69b23fbd69ca74430 Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Dec 3 23:19:16 2024 -0600 Fix set_mode on rigctlcom diff --git a/tests/rigctlcom.c b/tests/rigctlcom.c index 4bf136ec3..fca7aaabd 100644 --- a/tests/rigctlcom.c +++ b/tests/rigctlcom.c @@ -1604,7 +1604,7 @@ static int handle_ts2000(void *arg) } else if (strncmp(arg, "MD", 2) == 0) { - char response[32]; + //char response[32]; mode_t mode = 0; int imode = 0; @@ -1632,9 +1632,11 @@ static int handle_ts2000(void *arg) case 9: mode = RIG_MODE_RTTYR; break; } - + rig_set_mode(my_rig, RIG_VFO_A, mode, -1); +#if 0 SNPRINTF(response, sizeof(response), "MD%c;", mode + '0'); return write_block2((void *)__func__, &my_com, response, strlen(response)); +#endif } else if (strcmp(arg, "PS1;") == 0) { commit dd15ffc7bd47a6ba481e42d6211a0f50c908d6c7 Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Dec 3 23:18:48 2024 -0600 Add KY command to simts590 diff --git a/simulators/simts590.c b/simulators/simts590.c index ee2db59b6..759283a9c 100644 --- a/simulators/simts590.c +++ b/simulators/simts590.c @@ -431,6 +431,11 @@ int main(int argc, char *argv[]) SNPRINTF(buf, sizeof(buf), "SL%02d;", width_low); WRITE(fd, buf, strlen(buf)); } + else if (strcmp(buf, "KY;") == 0) + { + SNPRINTF(buf, sizeof(buf), "KY0;"); + WRITE(fd, buf, strlen(buf)); + } else if (strlen(buf) > 0) { commit 8f0e9909da7c3f93cc68515b58ce6f199cc61425 Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Dec 3 15:32:08 2024 -0600 astyle icom.h and update icom date diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 8045d8890..0e651af5b 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -2110,7 +2110,9 @@ pbwidth_t icom_get_dsp_flt(RIG *rig, rmode_t mode) RIG_MODE_RTTYR | RIG_MODE_PKTUSB | RIG_MODE_PKTLSB)) { rig_debug(RIG_DEBUG_TRACE, "%s: using filtericom width=%d\n", __func__, i); - if (i > sizeof(filtericom)/sizeof(int)) i = 40; + + if (i > sizeof(filtericom) / sizeof(int)) { i = 40; } + RETURNFUNC2(filtericom[i]); } } @@ -2181,7 +2183,8 @@ int icom_set_dsp_flt(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) } flt_idx = width <= 500 ? ((width + 49) / 50) - 1 : ((width + 99) / 100) + 4; - if (flt_idx > 40) flt_idx = 40; + + if (flt_idx > 40) { flt_idx = 40; } } else { @@ -2684,8 +2687,9 @@ int icom_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) if (width <= 3) { rig_debug(RIG_DEBUG_TRACE, "%s: setting filter=%d\n", __func__, (int)width); - return RIG_OK; + return RIG_OK; } + if (((width != RIG_PASSBAND_NOCHANGE) && (width != current_width)) || (priv->filter_usbd > 0 || priv->filter_usb > 0 || priv->filter_cw > 0 || priv->filter_fm > 0)) diff --git a/rigs/icom/icom.h b/rigs/icom/icom.h index faf004030..c78c64e55 100644 --- a/rigs/icom/icom.h +++ b/rigs/icom/icom.h @@ -35,7 +35,7 @@ #include <sys/time.h> #endif -#define BACKEND_VER "20241127" +#define BACKEND_VER "20241203" #define ICOM_IS_ID31 rig_is_model(rig, RIG_MODEL_ID31) #define ICOM_IS_ID51 rig_is_model(rig, RIG_MODEL_ID51) commit 3e0a9eeae703765f932ffa3dc95e8ed65ec9540d Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Dec 3 15:31:16 2024 -0600 Fix icom filter selection and bandwidth limits diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 363772cc2..8045d8890 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -2110,6 +2110,7 @@ pbwidth_t icom_get_dsp_flt(RIG *rig, rmode_t mode) RIG_MODE_RTTYR | RIG_MODE_PKTUSB | RIG_MODE_PKTLSB)) { rig_debug(RIG_DEBUG_TRACE, "%s: using filtericom width=%d\n", __func__, i); + if (i > sizeof(filtericom)/sizeof(int)) i = 40; RETURNFUNC2(filtericom[i]); } } @@ -2179,8 +2180,8 @@ int icom_set_dsp_flt(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) width = 1; } - flt_idx = - width <= 500 ? ((width + 49) / 50) - 1 : ((width + 99) / 100) + 4; + flt_idx = width <= 500 ? ((width + 49) / 50) - 1 : ((width + 99) / 100) + 4; + if (flt_idx > 40) flt_idx = 40; } else { @@ -2679,6 +2680,12 @@ int icom_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) } } + // no change and not setting filter number either + if (width <= 3) + { + rig_debug(RIG_DEBUG_TRACE, "%s: setting filter=%d\n", __func__, (int)width); + return RIG_OK; + } if (((width != RIG_PASSBAND_NOCHANGE) && (width != current_width)) || (priv->filter_usbd > 0 || priv->filter_usb > 0 || priv->filter_cw > 0 || priv->filter_fm > 0)) ----------------------------------------------------------------------- Summary of changes: rigs/dummy/flrig.c | 6 +++--- rigs/icom/icom.c | 15 +++++++++++++-- rigs/icom/icom.h | 2 +- simulators/simts590.c | 5 +++++ tests/rigctlcom.c | 6 ++++-- 5 files changed, 26 insertions(+), 8 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |