[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 761f1d3b0024c49899352
Library to control radio transceivers and receivers
Brought to you by:
n0nb
|
From: n0nb <n0...@us...> - 2024-01-18 17:54:27
|
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 761f1d3b0024c4989935207a9e731c57eb2ccd8c (commit)
via 48d3f3f7509034aaaf9ed2cd98ab4b486b62f85e (commit)
from aec9348138c28a6b3d8569067e9c0717bf234843 (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 761f1d3b0024c4989935207a9e731c57eb2ccd8c
Author: Mike Black W9MDB <mdb...@ya...>
Date: Thu Jan 18 09:18:49 2024 -0600
Add rest of RIG_FUNC_SYNC changes
diff --git a/NEWS b/NEWS
index 70fe9e26f..29fdbb15a 100644
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,7 @@ Version 5.x -- future
* Change FT1000MP Mark V model names to align with FT1000MP
Version 4.6
+ * Added RIG_FUNC_SYNC for FTDX101D/MP
* Added Barrett 4100
* Added DL2MAN (tr)uSDX -- needs refinement
* Added Thetis entry -- derived from FlexRadio/Apache PowerSDR
diff --git a/src/misc.c b/src/misc.c
index 241765f32..c296e2972 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -740,6 +740,7 @@ static const struct
{ RIG_FUNC_SEND_MORSE, "SEND_MORSE" },
{ RIG_FUNC_SEND_VOICE_MEM, "SEND_VOICE_MEM" },
{ RIG_FUNC_OVF_STATUS, "OVF_STATUS" },
+ { RIG_FUNC_SYNC, "SYNC" },
{ RIG_FUNC_NONE, "" },
};
diff --git a/src/sprintflst.c b/src/sprintflst.c
index ca87d8b6f..b6d70b125 100644
--- a/src/sprintflst.c
+++ b/src/sprintflst.c
@@ -177,6 +177,7 @@ int rig_sprintf_func(char *str, int nlen, setting_t func)
if (!ms || !ms[0])
{
+ rig_debug(RIG_EINTERNAL, "%s: unknown RIG_FUNC=%x\n", __func__, i);
continue; /* unknown, FIXME! */
}
commit 48d3f3f7509034aaaf9ed2cd98ab4b486b62f85e
Author: Mike Black W9MDB <mdb...@ya...>
Date: Thu Jan 18 07:56:30 2024 -0600
Add RIG_FUNC_SYNC -- only for FTDX101D/MP right now.
diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h
index 8044342c6..4e40e5c46 100644
--- a/include/hamlib/rig.h
+++ b/include/hamlib/rig.h
@@ -1273,7 +1273,7 @@ typedef uint64_t setting_t;
#define RIG_FUNC_SEND_MORSE CONSTANT_64BIT_FLAG (45) /*!< \c SEND_MORSE -- Send specified characters using CW */
#define RIG_FUNC_SEND_VOICE_MEM CONSTANT_64BIT_FLAG (46) /*!< \c SEND_VOICE_MEM -- Transmit in SSB message stored in memory */
#define RIG_FUNC_OVF_STATUS CONSTANT_64BIT_FLAG (47) /*!< \c OVF -- Read overflow status 0=Off, 1=On */
-#define RIG_FUNC_BIT48 CONSTANT_64BIT_FLAG (48) /*!< \c available for future RIG_FUNC items */
+#define RIG_FUNC_SYNC CONSTANT_64BIT_FLAG (48) /*!< \c Synchronize VFOS -- FTDX101D/MP for now SY command */
#define RIG_FUNC_BIT49 CONSTANT_64BIT_FLAG (49) /*!< \c available for future RIG_FUNC items */
#define RIG_FUNC_BIT50 CONSTANT_64BIT_FLAG (50) /*!< \c available for future RIG_FUNC items */
#define RIG_FUNC_BIT51 CONSTANT_64BIT_FLAG (51) /*!< \c available for future RIG_FUNC items */
diff --git a/rigs/yaesu/ftdx101.h b/rigs/yaesu/ftdx101.h
index fd830f1c5..64a433a3c 100644
--- a/rigs/yaesu/ftdx101.h
+++ b/rigs/yaesu/ftdx101.h
@@ -65,7 +65,8 @@
#define FTDX101_FUNCS (RIG_FUNC_TONE|RIG_FUNC_TSQL|RIG_FUNC_LOCK|\
RIG_FUNC_MON|RIG_FUNC_NB|RIG_FUNC_NR|RIG_FUNC_VOX|\
RIG_FUNC_FBKIN|RIG_FUNC_COMP|RIG_FUNC_ANF|RIG_FUNC_MN|\
- RIG_FUNC_RIT|RIG_FUNC_XIT|RIG_FUNC_TUNER|RIG_FUNC_APF)
+ RIG_FUNC_RIT|RIG_FUNC_XIT|RIG_FUNC_TUNER|RIG_FUNC_APF|\
+ RIG_FUNC_SYNC)
/* TBC */
#define FTDX101_VFO_OPS (RIG_OP_TUNE|RIG_OP_CPY|RIG_OP_XCHG|\
diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c
index fa278e7f6..b579e1abb 100644
--- a/rigs/yaesu/newcat.c
+++ b/rigs/yaesu/newcat.c
@@ -6401,6 +6401,16 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
break;
+ case RIG_FUNC_SYNC:
+ if (!newcat_valid_command(rig, "SY"))
+ {
+ RETURNFUNC(-RIG_ENAVAIL);
+ }
+
+ SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "SY%d%c", status ? 1 : 0,
+ cat_term);
+ break;
+
default:
RETURNFUNC(-RIG_EINVAL);
}
@@ -6694,6 +6704,15 @@ int newcat_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)
break;
+ case RIG_FUNC_SYNC:
+ if (!newcat_valid_command(rig, "SY"))
+ {
+ RETURNFUNC(-RIG_ENAVAIL);
+ }
+
+ SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "SY%c", cat_term);
+ break;
+
default:
RETURNFUNC(-RIG_EINVAL);
}
@@ -6808,6 +6827,10 @@ int newcat_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)
break;
+ case RIG_FUNC_SYNC:
+ *status = (retfunc[0] == '1') ? 1 : 0;
+ break;
+
default:
RETURNFUNC(-RIG_EINVAL);
}
diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h
index 43ffe73f2..dadf05f27 100644
--- a/rigs/yaesu/newcat.h
+++ b/rigs/yaesu/newcat.h
@@ -50,7 +50,7 @@
typedef char ncboolean;
/* shared function version */
-#define NEWCAT_VER "20240113"
+#define NEWCAT_VER "20240118"
/* Hopefully large enough for future use, 128 chars plus '\0' */
#define NEWCAT_DATA_LEN 129
-----------------------------------------------------------------------
Summary of changes:
NEWS | 1 +
include/hamlib/rig.h | 2 +-
rigs/yaesu/ftdx101.h | 3 ++-
rigs/yaesu/newcat.c | 23 +++++++++++++++++++++++
rigs/yaesu/newcat.h | 2 +-
src/misc.c | 1 +
src/sprintflst.c | 1 +
7 files changed, 30 insertions(+), 3 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|