[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 735e1810dff3ddd10c54c
Library to control radio transceivers and receivers
Brought to you by:
n0nb
|
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
|