[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 98a0184680a70aa4943ea
Library to control radio transceivers and receivers
Brought to you by:
n0nb
|
From: n0nb <n0...@us...> - 2025-02-22 21:50:09
|
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 98a0184680a70aa4943ea2ba7dbcf8ca03bebf1f (commit)
via 84c656edd1a04a0b9c6f558274a108496b7d7521 (commit)
via e93d368fcbb0c28254de48ff5bad93345c66874c (commit)
via f2fe51fac889c2c9606a164a69029d7b4736a143 (commit)
via 9a2f72fc328760b6c47cbcfeb81af22bd3b92805 (commit)
via e95cc440d73964567a27b3d58bb48c826a46284b (commit)
via 2070edab861bfb018fcb613d13565f4512618ad0 (commit)
via 2d3f5fe8a153c134f289d676618daf3eb3103fde (commit)
via 3fcf3006296ef6f768dcc558e19bed5457819ac8 (commit)
from a6e280ca2ea3b49ada7d52bfd0fabf9633a18fb2 (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 98a0184680a70aa4943ea2ba7dbcf8ca03bebf1f
Author: Michael Black W9MDB <mdb...@ya...>
Date: Tue Feb 18 09:10:26 2025 -0600
Remote -w451 flag -- not available in all versions of gcc
diff --git a/bindings/Makefile.am b/bindings/Makefile.am
index d5bd8aca8..34272b70c 100644
--- a/bindings/Makefile.am
+++ b/bindings/Makefile.am
@@ -4,7 +4,7 @@
#
AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/include -I$(top_srcdir)/bindings \
- $(TCL_INCLUDE_SPEC) $(PYTHON_CPPFLAGS) -w451
+ $(TCL_INCLUDE_SPEC) $(PYTHON_CPPFLAGS)
AM_CFLAGS = @AM_CPPFLAGS@ -fno-strict-aliasing
AM_CXXFLAGS = -O2
diff --git a/src/rig.c b/src/rig.c
index 739a17fce..6e772fcf0 100644
--- a/src/rig.c
+++ b/src/rig.c
@@ -8769,7 +8769,7 @@ void *morse_data_handler(void *arg)
int nloops = 10;
MUTEX_LOCK(morse_mutex); // wait until the write is idle
- rig_lock(rig, 1);
+ rig_lock(rig, 1);
do
{
result = rig->caps->send_morse(rig, RIG_VFO_CURR, c);
commit 84c656edd1a04a0b9c6f558274a108496b7d7521
Author: Michael Black W9MDB <mdb...@ya...>
Date: Sun Feb 16 10:57:11 2025 -0600
Fix CODAN 2110 -- correct model# and all the minor changes to the CICS protocol
diff --git a/NEWS b/NEWS
index 07d28147a..9ab81f35b 100644
--- a/NEWS
+++ b/NEWS
@@ -14,7 +14,7 @@ Version 5.x -- future
Version 4.6.3
* Fix rigctl showing hamlib_verson when connecting to rigctld
- * Add rig CODAN 2021
+ * Add rig CODAN 2110
Version 4.6.2
* Add missing levels for IC746/PRO RIG_LEVEL_RFPOWER_METER,RIG_LEVEL_RFPOWER_METER_WATTS,RIG_LEVEL_SWR,RIG_LEVEL_ALC
diff --git a/include/hamlib/riglist.h b/include/hamlib/riglist.h
index 88d0b28ce..b7a441c0a 100644
--- a/include/hamlib/riglist.h
+++ b/include/hamlib/riglist.h
@@ -657,7 +657,7 @@
#define RIG_BACKEND_CODAN "codan"
#define RIG_MODEL_CODAN_ENVOY RIG_MAKE_MODEL(RIG_CODAN, 1)
#define RIG_MODEL_CODAN_NGT RIG_MAKE_MODEL(RIG_CODAN, 2)
-#define RIG_MODEL_CODAN_2021 RIG_MAKE_MODEL(RIG_CODAN, 3)
+#define RIG_MODEL_CODAN_2110 RIG_MAKE_MODEL(RIG_CODAN, 3)
/*
* Gomspace
diff --git a/rigs/codan/codan.c b/rigs/codan/codan.c
index 50dcce4a1..84ae99e86 100644
--- a/rigs/codan/codan.c
+++ b/rigs/codan/codan.c
@@ -48,21 +48,21 @@ int codan_transaction(RIG *rig, char *cmd, int expected, char **result)
int retval;
hamlib_port_t *rp = RIGPORT(rig);
struct codan_priv_data *priv = STATE(rig)->priv;
- //int retry = 3;
+ int retry = 3;
rig_debug(RIG_DEBUG_VERBOSE, "%s: cmd=%s\n", __func__, cmd);
- // Seems the 2021 wants LF instead of CR
- if (rig->caps->rig_model == RIG_MODEL_CODAN_2021)
+ // Seems the 2110 wants CR instead of LF
+ if (rig->caps->rig_model == RIG_MODEL_CODAN_2110)
{
- SNPRINTF(cmd_buf, sizeof(cmd_buf), "%s%d", cmd, 0x0a);
+ SNPRINTF(cmd_buf, sizeof(cmd_buf), "%s%c", cmd, 0x0d);
}
else
{
- SNPRINTF(cmd_buf, sizeof(cmd_buf), "%s%d", cmd, 0x0d);
+ SNPRINTF(cmd_buf, sizeof(cmd_buf), "%s%c", cmd, 0x0a);
}
- rig_flush(rp);
+repeat:
retval = write_block(rp, (unsigned char *) cmd_buf, strlen(cmd_buf));
hl_usleep(rig->caps->post_write_delay);
@@ -83,6 +83,10 @@ again1:
if (strncmp(cmd, priv->ret_data, strlen(cmd)) == 0) { goto again1; }
+ if (strstr(priv->ret_data, "ERROR") && --retry > 0) { goto repeat; }
+
+ if (strstr(priv->ret_data, "CHAN") && --retry > 0) { goto again1; }
+
if (retval < 0)
{
return retval;
@@ -97,6 +101,10 @@ again2:
if (strncmp(cmd, priv->ret_data, strlen(cmd)) == 0) { goto again2; }
+ if (strstr(priv->ret_data, "ERROR") && --retry > 0) { goto repeat; }
+
+ if (strstr(priv->ret_data, "CHAN")) { goto again2; }
+
if (retval < 0)
{
return retval;
@@ -162,6 +170,28 @@ int codan_init(RIG *rig)
RETURNFUNC2(RIG_OK);
}
+int codan_set_freq_2110(RIG *rig, vfo_t vfo, freq_t freq)
+{
+ char cmd_buf[MAXCMDLEN];
+ int retval;
+
+ rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s freq=%.0f\n", __func__,
+ rig_strvfo(vfo), freq);
+
+ // Purportedly can't do split so we just set VFOB=VFOA
+ SNPRINTF(cmd_buf, sizeof(cmd_buf), "\rfreq %.0f", freq / 1000);
+
+ char *response = NULL;
+ retval = codan_transaction(rig, cmd_buf, 0, &response);
+
+ if (retval < 0)
+ {
+ return retval;
+ }
+
+ return retval;
+}
+
int codan_open(RIG *rig)
{
char *results = NULL;
@@ -176,7 +206,15 @@ int codan_open(RIG *rig)
}
codan_transaction(rig, "login", 1, &results);
- codan_set_freq(rig, RIG_VFO_A, 14074000.0);
+
+ if (rig->caps->rig_model == RIG_MODEL_CODAN_2110)
+ {
+ codan_set_freq_2110(rig, RIG_VFO_A, 14074000.0);
+ }
+ else
+ {
+ codan_set_freq(rig, RIG_VFO_A, 14074000.0);
+ }
RETURNFUNC2(RIG_OK);
}
@@ -393,6 +431,38 @@ int codan_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
return RIG_OK;
}
+int codan_get_ptt_2110(RIG *rig, vfo_t vfo, ptt_t *ptt)
+{
+ int retval;
+ char *response = NULL;
+
+ rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s\n", __func__, rig_strvfo(vfo));
+
+ retval = codan_transaction(rig, "ptt", 0, &response);
+
+ if (retval != RIG_OK)
+ {
+ rig_debug(RIG_DEBUG_ERR, "%s: error response?='%s'\n", __func__, response);
+ return retval;
+ }
+
+ const char *p = strstr(response, "PTT");
+
+ if (p)
+ {
+ if (strstr(p, "OFF")) { *ptt = 0; }
+ else { *ptt = 1; }
+ }
+ else
+ {
+ rig_debug(RIG_DEBUG_ERR, "%s: unable to find Ptt in %s\n", __func__, response);
+ return -RIG_EPROTO;
+ }
+
+ return RIG_OK;
+}
+
+
/*
* codan_set_ptt
* Assumes rig!=NULL
@@ -421,6 +491,32 @@ int codan_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
return RIG_OK;
}
+int codan_set_ptt_2110(RIG *rig, vfo_t vfo, ptt_t ptt)
+{
+ int retval;
+ char cmd_buf[MAXCMDLEN];
+ char *response;
+
+ rig_debug(RIG_DEBUG_VERBOSE, "%s: ptt=%d\n", __func__, ptt);
+
+ SNPRINTF(cmd_buf, sizeof(cmd_buf), "ptt %s",
+ ptt == 0 ? "off" : "on");
+ response = NULL;
+ retval = codan_transaction(rig, cmd_buf, 0, &response);
+
+ if (retval < 0)
+ {
+ rig_debug(RIG_DEBUG_ERR, "%s: invalid response=%s\n", __func__, response);
+ return retval;
+ }
+
+ rig_debug(RIG_DEBUG_VERBOSE, "%s: cmd result=%s\n", __func__, response);
+
+ return RIG_OK;
+}
+
+
+
@@ -552,14 +648,14 @@ struct rig_caps codan_ngs_caps =
.hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS
};
-struct rig_caps codan_2021_caps =
+struct rig_caps codan_2110_caps =
{
- RIG_MODEL(RIG_MODEL_CODAN_2021),
- .model_name = "2021",
+ RIG_MODEL(RIG_MODEL_CODAN_2110),
+ .model_name = "2110",
.mfg_name = "CODAN",
.version = BACKEND_VER ".0",
.copyright = "LGPL",
- .status = RIG_STATUS_ALPHA,
+ .status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER,
.targetable_vfo = RIG_TARGETABLE_FREQ,
.ptt_type = RIG_PTT_RIG,
@@ -603,15 +699,16 @@ struct rig_caps codan_2021_caps =
.priv = NULL,
.rig_init = codan_init,
+ .rig_open = codan_open,
.rig_cleanup = codan_cleanup,
- .set_freq = codan_set_freq,
+ .set_freq = codan_set_freq_2110,
.get_freq = codan_get_freq,
.set_mode = codan_set_mode,
.get_mode = codan_get_mode,
- .set_ptt = codan_set_ptt,
- .get_ptt = codan_get_ptt,
+ .set_ptt = codan_set_ptt_2110,
+ .get_ptt = codan_get_ptt_2110,
.hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS
};
@@ -621,7 +718,7 @@ DECLARE_INITRIG_BACKEND(codan)
rig_register(&codan_envoy_caps);
rig_register(&codan_ngs_caps);
- rig_register(&codan_2021_caps);
+ rig_register(&codan_2110_caps);
rig_debug(RIG_DEBUG_VERBOSE, "%s: _init back from rig_register\n", __func__);
return RIG_OK;
diff --git a/rigs/codan/codan.h b/rigs/codan/codan.h
index b7eac8310..96ae9e10d 100644
--- a/rigs/codan/codan.h
+++ b/rigs/codan/codan.h
@@ -24,7 +24,7 @@
#include "hamlib/rig.h"
-#define BACKEND_VER "20240318"
+#define BACKEND_VER "20250216"
#define EOM "\x0d"
#define TRUE 1
commit e93d368fcbb0c28254de48ff5bad93345c66874c
Author: Michael Black W9MDB <mdb...@ya...>
Date: Sat Feb 15 16:20:56 2025 -0600
Suppress swig 452 warning
diff --git a/bindings/Makefile.am b/bindings/Makefile.am
index 34272b70c..d5bd8aca8 100644
--- a/bindings/Makefile.am
+++ b/bindings/Makefile.am
@@ -4,7 +4,7 @@
#
AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/include -I$(top_srcdir)/bindings \
- $(TCL_INCLUDE_SPEC) $(PYTHON_CPPFLAGS)
+ $(TCL_INCLUDE_SPEC) $(PYTHON_CPPFLAGS) -w451
AM_CFLAGS = @AM_CPPFLAGS@ -fno-strict-aliasing
AM_CXXFLAGS = -O2
commit f2fe51fac889c2c9606a164a69029d7b4736a143
Author: Michael Black W9MDB <mdb...@ya...>
Date: Sat Feb 15 16:16:46 2025 -0600
Fix codan.c some more
diff --git a/rigs/codan/codan.c b/rigs/codan/codan.c
index 99dbffe89..50dcce4a1 100644
--- a/rigs/codan/codan.c
+++ b/rigs/codan/codan.c
@@ -424,7 +424,7 @@ int codan_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
-struct rig_caps envoy_caps =
+struct rig_caps codan_envoy_caps =
{
RIG_MODEL(RIG_MODEL_CODAN_ENVOY),
.model_name = "Envoy",
@@ -489,7 +489,7 @@ struct rig_caps envoy_caps =
.hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS
};
-struct rig_caps ngs_caps =
+struct rig_caps codan_ngs_caps =
{
RIG_MODEL(RIG_MODEL_CODAN_NGT),
.model_name = "NGT",
commit 9a2f72fc328760b6c47cbcfeb81af22bd3b92805
Author: Michael Black W9MDB <mdb...@ya...>
Date: Sat Feb 15 16:09:15 2025 -0600
Fix codan.c
diff --git a/rigs/codan/codan.c b/rigs/codan/codan.c
index 2b64dd7be..99dbffe89 100644
--- a/rigs/codan/codan.c
+++ b/rigs/codan/codan.c
@@ -51,12 +51,16 @@ int codan_transaction(RIG *rig, char *cmd, int expected, char **result)
//int retry = 3;
rig_debug(RIG_DEBUG_VERBOSE, "%s: cmd=%s\n", __func__, cmd);
-
+
// Seems the 2021 wants LF instead of CR
if (rig->caps->rig_model == RIG_MODEL_CODAN_2021)
+ {
SNPRINTF(cmd_buf, sizeof(cmd_buf), "%s%d", cmd, 0x0a);
+ }
else
+ {
SNPRINTF(cmd_buf, sizeof(cmd_buf), "%s%d", cmd, 0x0d);
+ }
rig_flush(rp);
retval = write_block(rp, (unsigned char *) cmd_buf, strlen(cmd_buf));
@@ -76,7 +80,8 @@ again1:
"\x0a", 1, 0, 1);
rig_debug(RIG_DEBUG_VERBOSE, "%s: result=%s, resultlen=%d\n", __func__,
priv->ret_data, (int)strlen(priv->ret_data));
- if (strncmp(cmd, priv->ret_data, strlen(cmd))==0) goto again1;
+
+ if (strncmp(cmd, priv->ret_data, strlen(cmd)) == 0) { goto again1; }
if (retval < 0)
{
@@ -89,7 +94,8 @@ again2:
retval = read_string(rp, (unsigned char *) priv->ret_data,
sizeof(priv->ret_data),
"\x0a", 1, 0, 1);
- if (strncmp(cmd, priv->ret_data, strlen(cmd))==0) goto again2;
+
+ if (strncmp(cmd, priv->ret_data, strlen(cmd)) == 0) { goto again2; }
if (retval < 0)
{
@@ -546,7 +552,7 @@ struct rig_caps ngs_caps =
.hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS
};
-struct rig_caps ngs_caps =
+struct rig_caps codan_2021_caps =
{
RIG_MODEL(RIG_MODEL_CODAN_2021),
.model_name = "2021",
commit e95cc440d73964567a27b3d58bb48c826a46284b
Merge: 2070edab8 2d3f5fe8a
Author: Michael Black W9MDB <mdb...@ya...>
Date: Sat Feb 15 16:05:38 2025 -0600
Merge branch 'master' of github.com:Hamlib/Hamlib
commit 2070edab861bfb018fcb613d13565f4512618ad0
Author: Michael Black W9MDB <mdb...@ya...>
Date: Sat Feb 15 16:05:21 2025 -0600
Add CODAN 2021
diff --git a/NEWS b/NEWS
index 14d02f805..07d28147a 100644
--- a/NEWS
+++ b/NEWS
@@ -14,6 +14,7 @@ Version 5.x -- future
Version 4.6.3
* Fix rigctl showing hamlib_verson when connecting to rigctld
+ * Add rig CODAN 2021
Version 4.6.2
* Add missing levels for IC746/PRO RIG_LEVEL_RFPOWER_METER,RIG_LEVEL_RFPOWER_METER_WATTS,RIG_LEVEL_SWR,RIG_LEVEL_ALC
diff --git a/include/hamlib/riglist.h b/include/hamlib/riglist.h
index 768c40691..88d0b28ce 100644
--- a/include/hamlib/riglist.h
+++ b/include/hamlib/riglist.h
@@ -657,6 +657,7 @@
#define RIG_BACKEND_CODAN "codan"
#define RIG_MODEL_CODAN_ENVOY RIG_MAKE_MODEL(RIG_CODAN, 1)
#define RIG_MODEL_CODAN_NGT RIG_MAKE_MODEL(RIG_CODAN, 2)
+#define RIG_MODEL_CODAN_2021 RIG_MAKE_MODEL(RIG_CODAN, 3)
/*
* Gomspace
diff --git a/rigs/codan/codan.c b/rigs/codan/codan.c
index 92b146709..2b64dd7be 100644
--- a/rigs/codan/codan.c
+++ b/rigs/codan/codan.c
@@ -51,8 +51,12 @@ int codan_transaction(RIG *rig, char *cmd, int expected, char **result)
//int retry = 3;
rig_debug(RIG_DEBUG_VERBOSE, "%s: cmd=%s\n", __func__, cmd);
-
- SNPRINTF(cmd_buf, sizeof(cmd_buf), "%s%s", cmd, EOM);
+
+ // Seems the 2021 wants LF instead of CR
+ if (rig->caps->rig_model == RIG_MODEL_CODAN_2021)
+ SNPRINTF(cmd_buf, sizeof(cmd_buf), "%s%d", cmd, 0x0a);
+ else
+ SNPRINTF(cmd_buf, sizeof(cmd_buf), "%s%d", cmd, 0x0d);
rig_flush(rp);
retval = write_block(rp, (unsigned char *) cmd_buf, strlen(cmd_buf));
@@ -65,12 +69,14 @@ int codan_transaction(RIG *rig, char *cmd, int expected, char **result)
if (expected == 0)
{
+again1:
// response format is response...0x0d0x0a
retval = read_string(rp, (unsigned char *) priv->ret_data,
sizeof(priv->ret_data),
"\x0a", 1, 0, 1);
rig_debug(RIG_DEBUG_VERBOSE, "%s: result=%s, resultlen=%d\n", __func__,
priv->ret_data, (int)strlen(priv->ret_data));
+ if (strncmp(cmd, priv->ret_data, strlen(cmd))==0) goto again1;
if (retval < 0)
{
@@ -79,9 +85,11 @@ int codan_transaction(RIG *rig, char *cmd, int expected, char **result)
}
else
{
+again2:
retval = read_string(rp, (unsigned char *) priv->ret_data,
sizeof(priv->ret_data),
"\x0a", 1, 0, 1);
+ if (strncmp(cmd, priv->ret_data, strlen(cmd))==0) goto again2;
if (retval < 0)
{
@@ -538,14 +546,76 @@ struct rig_caps ngs_caps =
.hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS
};
+struct rig_caps ngs_caps =
+{
+ RIG_MODEL(RIG_MODEL_CODAN_2021),
+ .model_name = "2021",
+ .mfg_name = "CODAN",
+ .version = BACKEND_VER ".0",
+ .copyright = "LGPL",
+ .status = RIG_STATUS_ALPHA,
+ .rig_type = RIG_TYPE_TRANSCEIVER,
+ .targetable_vfo = RIG_TARGETABLE_FREQ,
+ .ptt_type = RIG_PTT_RIG,
+ .dcd_type = RIG_DCD_NONE,
+ .port_type = RIG_PORT_SERIAL,
+ .serial_rate_min = 9600,
+ .serial_rate_max = 115200,
+ .serial_data_bits = 8,
+ .serial_stop_bits = 1,
+ .serial_parity = RIG_PARITY_NONE,
+ .serial_handshake = RIG_HANDSHAKE_NONE,
+ .write_delay = 0,
+ .post_write_delay = 50,
+ .timeout = 1000,
+ .retry = 3,
+
+ .has_get_func = RIG_FUNC_NONE,
+ .has_set_func = RIG_FUNC_NONE,
+ .has_get_level = RIG_LEVEL_NONE,
+ .has_set_level = RIG_LEVEL_NONE,
+ .has_get_parm = RIG_PARM_NONE,
+ .has_set_parm = RIG_PARM_NONE,
+ .transceive = RIG_TRN_RIG,
+ .rx_range_list1 = {{
+ .startf = kHz(1600), .endf = MHz(30), .modes = CODAN_MODES,
+ .low_power = -1, .high_power = -1, CODAN_VFOS, RIG_ANT_1
+ },
+ RIG_FRNG_END,
+ },
+ .rx_range_list2 = {RIG_FRNG_END,},
+ .tx_range_list1 = {RIG_FRNG_END,},
+ .tx_range_list2 = {RIG_FRNG_END,},
+ .tuning_steps = { {CODAN_MODES, 1}, {CODAN_MODES, RIG_TS_ANY}, RIG_TS_END, },
+ .filters = {
+ {RIG_MODE_SSB, kHz(2.4)},
+ {RIG_MODE_SSB, kHz(0.5)},
+ {RIG_MODE_SSB, kHz(2.7)},
+ {RIG_MODE_SSB, kHz(3.0)},
+ RIG_FLT_END,
+ },
+ .priv = NULL,
+
+ .rig_init = codan_init,
+ .rig_cleanup = codan_cleanup,
+ .set_freq = codan_set_freq,
+ .get_freq = codan_get_freq,
+ .set_mode = codan_set_mode,
+ .get_mode = codan_get_mode,
+
+ .set_ptt = codan_set_ptt,
+ .get_ptt = codan_get_ptt,
+ .hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS
+};
DECLARE_INITRIG_BACKEND(codan)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s: _init called\n", __func__);
- rig_register(&envoy_caps);
- rig_register(&ngs_caps);
+ rig_register(&codan_envoy_caps);
+ rig_register(&codan_ngs_caps);
+ rig_register(&codan_2021_caps);
rig_debug(RIG_DEBUG_VERBOSE, "%s: _init back from rig_register\n", __func__);
return RIG_OK;
diff --git a/rigs/codan/codan.h b/rigs/codan/codan.h
index ad334276a..b7eac8310 100644
--- a/rigs/codan/codan.h
+++ b/rigs/codan/codan.h
@@ -26,7 +26,7 @@
#define BACKEND_VER "20240318"
-#define EOM "\x0a"
+#define EOM "\x0d"
#define TRUE 1
#define FALSE 0
// For the current implemented command set 64 is long enough
@@ -34,8 +34,9 @@
// But that would 9999*41 or 406KB so didn't do that right now
#define CODAN_DATA_LEN 64
-extern struct rig_caps envoy_caps;
-extern struct rig_caps ngs_caps;
+extern struct rig_caps codan_envoy_caps;
+extern struct rig_caps codan_ngs_caps;
+extern struct rig_caps codan_2021_caps;
struct codan_priv_data {
char cmd_str[CODAN_DATA_LEN]; /* command string buffer */
commit 2d3f5fe8a153c134f289d676618daf3eb3103fde
Merge: a6e280ca2 3fcf30062
Author: Michael Black <mdb...@ya...>
Date: Fri Feb 14 12:45:44 2025 -0600
Merge pull request #1672 from clzls/fix-typo-pmr171
pmr171.c: Fix typo in get_freq
commit 3fcf3006296ef6f768dcc558e19bed5457819ac8
Author: Chen (Kina) <164...@us...>
Date: Sat Feb 15 02:41:42 2025 +0800
pmr171.c: Fix typo in get_freq
Fix typo in get_freq returning freqMainB in any situations.
diff --git a/rigs/yaesu/pmr171.c b/rigs/yaesu/pmr171.c
index 46d3b3d69..bdff4fd1f 100644
--- a/rigs/yaesu/pmr171.c
+++ b/rigs/yaesu/pmr171.c
@@ -579,12 +579,12 @@ static int pmr171_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
vfob);
// Now grab the ptt status
- cachep->ptt = reply[6] == 1;
+ cachep->ptt = (reply[6] == 1);
// And the mode
cachep->modeMainA = guohe2rmode(reply[7], pmr171_modes);
cachep->modeMainB = guohe2rmode(reply[8], pmr171_modes);
- if (vfo == RIG_VFO_B) { *freq = cachep->freqMainA; }
+ if (vfo == RIG_VFO_A) { *freq = cachep->freqMainA; }
else { *freq = cachep->freqMainB; }
return RIG_OK;
-----------------------------------------------------------------------
Summary of changes:
NEWS | 1 +
include/hamlib/riglist.h | 1 +
rigs/codan/codan.c | 189 +++++++++++++++++++++++++++++++++++++++++++++--
rigs/codan/codan.h | 9 ++-
rigs/yaesu/pmr171.c | 4 +-
src/rig.c | 2 +-
6 files changed, 191 insertions(+), 15 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|