[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 19e819948f9b7ce0c593d
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Michael B. <mdb...@us...> - 2021-01-08 13:17:38
|
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 19e819948f9b7ce0c593dc6e934b68d4f5e8426e (commit) from 62066d5b74e8ef909aeb37093446f757160454d0 (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 19e819948f9b7ce0c593dc6e934b68d4f5e8426e Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Jan 8 07:16:45 2021 -0600 Add RIG_TARGETABLE_ANT and fix Yaesu rigs -- Yaesu are only ones needing this right now https://github.com/Hamlib/Hamlib/pull/495 diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index cc731fb7..a5281350 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -473,6 +473,7 @@ typedef unsigned int vfo_t; #define RIG_TARGETABLE_PTT (1<<7) #define RIG_TARGETABLE_MEM (1<<8) #define RIG_TARGETABLE_BANK (1<<9) +#define RIG_TARGETABLE_ANT (1<<10) #define RIG_TARGETABLE_COMMON (RIG_TARGETABLE_RITXIT | RIG_TARGETABLE_PTT | RIG_TARGETABLE_MEM | RIG_TARGETABLE_BANK) #define RIG_TARGETABLE_ALL 0x7fffffff //! @endcond diff --git a/rigs/yaesu/ft5000.c b/rigs/yaesu/ft5000.c index 0a8e6cf8..58c0327e 100644 --- a/rigs/yaesu/ft5000.c +++ b/rigs/yaesu/ft5000.c @@ -126,7 +126,7 @@ const struct rig_caps ftdx5000_caps = .max_xit = Hz(9999), .max_ifshift = Hz(1000), .vfo_ops = FTDX5000_VFO_OPS, - .targetable_vfo = RIG_TARGETABLE_FREQ | RIG_TARGETABLE_MODE | RIG_TARGETABLE_FUNC | RIG_TARGETABLE_LEVEL, + .targetable_vfo = RIG_TARGETABLE_FREQ | RIG_TARGETABLE_MODE | RIG_TARGETABLE_FUNC | RIG_TARGETABLE_LEVEL | RIG_TARGETABLE_ANT, .transceive = RIG_TRN_OFF, /* May enable later as the 5000 has an Auto Info command */ .bank_qty = 0, .chan_desc_sz = 0, diff --git a/rigs/yaesu/ft9000.c b/rigs/yaesu/ft9000.c index cd573c37..746225c7 100644 --- a/rigs/yaesu/ft9000.c +++ b/rigs/yaesu/ft9000.c @@ -89,7 +89,7 @@ const struct rig_caps ft9000_caps = .max_xit = Hz(9999), .max_ifshift = Hz(1000), .vfo_ops = FT9000_VFO_OPS, - .targetable_vfo = RIG_TARGETABLE_FREQ | RIG_TARGETABLE_MODE, + .targetable_vfo = RIG_TARGETABLE_FREQ | RIG_TARGETABLE_MODE | RIG_TARGETABLE_ANT, .transceive = RIG_TRN_OFF, /* May enable later as the 9000 has an Auto Info command */ .bank_qty = 0, .chan_desc_sz = 0, diff --git a/rigs/yaesu/ftdx10.c b/rigs/yaesu/ftdx10.c index aa4e7c95..40498068 100644 --- a/rigs/yaesu/ftdx10.c +++ b/rigs/yaesu/ftdx10.c @@ -214,8 +214,8 @@ const struct rig_caps ftdx10_caps = .get_rit = newcat_get_rit, .set_xit = newcat_set_xit, .get_xit = newcat_get_xit, - .set_ant = newcat_set_ant, - .get_ant = newcat_get_ant, + .set_ant = NULL, + .get_ant = NULL, .get_func = newcat_get_func, .set_func = newcat_set_func, .get_level = newcat_get_level, diff --git a/rigs/yaesu/ftdx101.c b/rigs/yaesu/ftdx101.c index 8ecc1b77..24a77bd3 100644 --- a/rigs/yaesu/ftdx101.c +++ b/rigs/yaesu/ftdx101.c @@ -113,7 +113,7 @@ const struct rig_caps ftdx101d_caps = .max_xit = Hz(9999), .max_ifshift = Hz(1200), .vfo_ops = FTDX101_VFO_OPS, - .targetable_vfo = RIG_TARGETABLE_FREQ | RIG_TARGETABLE_MODE | RIG_TARGETABLE_FUNC | RIG_TARGETABLE_LEVEL | RIG_TARGETABLE_COMMON, + .targetable_vfo = RIG_TARGETABLE_FREQ | RIG_TARGETABLE_MODE | RIG_TARGETABLE_FUNC | RIG_TARGETABLE_LEVEL | RIG_TARGETABLE_COMMON | RIG_TARGETABLE_ANT, .transceive = RIG_TRN_OFF, /* May enable later as the FTDX101 has an Auto Info command */ .bank_qty = 0, .chan_desc_sz = 0, diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index f5a03ea1..97d9ebaf 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -3010,7 +3010,7 @@ int newcat_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option) return err; } - if ((rig->caps->targetable_vfo & RIG_TARGETABLE_MODE) && !is_ft2000) + if ((rig->caps->targetable_vfo & RIG_TARGETABLE_ANT)) { main_sub_vfo = (RIG_VFO_B == vfo || RIG_VFO_SUB == vfo) ? '1' : '0'; } diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h index 3ed57ca6..7954f8e9 100644 --- a/rigs/yaesu/newcat.h +++ b/rigs/yaesu/newcat.h @@ -50,7 +50,7 @@ typedef char ncboolean; /* shared function version */ -#define NEWCAT_VER "20210104" +#define NEWCAT_VER "20210108" /* Hopefully large enough for future use, 128 chars plus '\0' */ #define NEWCAT_DATA_LEN 129 diff --git a/src/rig.c b/src/rig.c index 18cceacb..bcd8377d 100644 --- a/src/rig.c +++ b/src/rig.c @@ -4289,7 +4289,7 @@ int HAMLIB_API rig_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option) return -RIG_ENAVAIL; } - if ((caps->targetable_vfo & RIG_TARGETABLE_PURE) + if ((caps->targetable_vfo & RIG_TARGETABLE_ANT) || vfo == RIG_VFO_CURR || vfo == rig->state.current_vfo) { @@ -4364,7 +4364,7 @@ int HAMLIB_API rig_get_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t *option, return -RIG_ENAVAIL; } - if ((caps->targetable_vfo & RIG_TARGETABLE_PURE) + if ((caps->targetable_vfo & RIG_TARGETABLE_ANT) || vfo == RIG_VFO_CURR || vfo == rig->state.current_vfo) { ----------------------------------------------------------------------- Summary of changes: include/hamlib/rig.h | 1 + rigs/yaesu/ft5000.c | 2 +- rigs/yaesu/ft9000.c | 2 +- rigs/yaesu/ftdx10.c | 4 ++-- rigs/yaesu/ftdx101.c | 2 +- rigs/yaesu/newcat.c | 2 +- rigs/yaesu/newcat.h | 2 +- src/rig.c | 4 ++-- 8 files changed, 10 insertions(+), 9 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |