[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. f0dc0f71d44bce269d88d
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Michael B. <mdb...@us...> - 2020-09-27 21:03:18
|
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 f0dc0f71d44bce269d88d8d259c4c1fb14223f2b (commit) from 37cff7ffc1e270e8214f5565082d7e830c7879bc (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 f0dc0f71d44bce269d88d8d259c4c1fb14223f2b Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Sep 27 16:01:48 2020 -0500 Add RIG_TARGETABLE_FUNC and RIG_TARGETABLE_TONE to ftdx101d Ensure VFO is only set on FUNC calls when TARGETABLE_FUNC is on for newcat.c https://github.com/Hamlib/Hamlib/issues/385 diff --git a/rigs/yaesu/ft5000.c b/rigs/yaesu/ft5000.c index 7602e647..5e08ae29 100644 --- a/rigs/yaesu/ft5000.c +++ b/rigs/yaesu/ft5000.c @@ -87,7 +87,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, + .targetable_vfo = RIG_TARGETABLE_FREQ | RIG_TARGETABLE_MODE | RIG_TARGETABLE_TONE, .transceive = RIG_TRN_OFF, /* May enable later as the 5000 has an Auto Info command */ .bank_qty = 0, .chan_desc_sz = 0, @@ -387,7 +387,7 @@ const struct rig_caps ftdx101d_caps = RIG_MODEL(RIG_MODEL_FTDX101D), .model_name = "FT-DX101D", .mfg_name = "Yaesu", - .version = NEWCAT_VER ".0", + .version = NEWCAT_VER ".1", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -422,7 +422,7 @@ const struct rig_caps ftdx101d_caps = .max_xit = Hz(9999), .max_ifshift = Hz(1000), .vfo_ops = FTDX5000_VFO_OPS, - .targetable_vfo = RIG_TARGETABLE_FREQ | RIG_TARGETABLE_MODE, + .targetable_vfo = RIG_TARGETABLE_FREQ | RIG_TARGETABLE_MODE | RIG_TARGETABLE_FUNC, .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/newcat.c b/rigs/yaesu/newcat.c index e275c99a..7814c936 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -3550,7 +3550,7 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) return err; } - if (rig->caps->targetable_vfo & RIG_TARGETABLE_MODE) + if (rig->caps->targetable_vfo & (RIG_TARGETABLE_MODE | RIG_TARGETABLE_TONE)) { main_sub_vfo = (RIG_VFO_B == vfo) ? '1' : '0'; } @@ -3607,7 +3607,12 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) snprintf(priv->cmd_str, sizeof(priv->cmd_str), "CT0%d%c", status ? 2 : 0, cat_term); - priv->cmd_str[2] = main_sub_vfo; + + if (rig->caps->targetable_vfo & RIG_TARGETABLE_TONE) + { + priv->cmd_str[2] = main_sub_vfo; + } + break; case RIG_FUNC_TSQL: @@ -3618,7 +3623,12 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) snprintf(priv->cmd_str, sizeof(priv->cmd_str), "CT0%d%c", status ? 1 : 0, cat_term); - priv->cmd_str[2] = main_sub_vfo; + + if (rig->caps->targetable_vfo & RIG_TARGETABLE_TONE) + { + priv->cmd_str[2] = main_sub_vfo; + } + break; case RIG_FUNC_LOCK: @@ -3649,7 +3659,9 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) snprintf(priv->cmd_str, sizeof(priv->cmd_str), "NB0%d%c", status ? 1 : 0, cat_term); + if (rig->caps->targetable_vfo & RIG_TARGETABLE_MODE){ priv->cmd_str[2] = main_sub_vfo; + } break; case RIG_FUNC_NR: @@ -3660,7 +3672,9 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) snprintf(priv->cmd_str, sizeof(priv->cmd_str), "NR0%d%c", status ? 1 : 0, cat_term); + if (rig->caps->targetable_vfo & RIG_TARGETABLE_MODE){ priv->cmd_str[2] = main_sub_vfo; + } break; case RIG_FUNC_COMP: @@ -3780,7 +3794,7 @@ int newcat_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status) snprintf(priv->cmd_str, sizeof(priv->cmd_str), "CT0%c", cat_term); - if (rig->caps->targetable_vfo & RIG_TARGETABLE_MODE) + if (rig->caps->targetable_vfo & RIG_TARGETABLE_TONE) { priv->cmd_str[2] = main_sub_vfo; } @@ -3795,7 +3809,7 @@ int newcat_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status) snprintf(priv->cmd_str, sizeof(priv->cmd_str), "CT0%c", cat_term); - if (rig->caps->targetable_vfo & RIG_TARGETABLE_MODE) + if (rig->caps->targetable_vfo & RIG_TARGETABLE_TONE) { priv->cmd_str[2] = main_sub_vfo; } @@ -6485,56 +6499,56 @@ int newcat_get_cmd(RIG *rig) } // any command that is read only should not expire cache - is_read_cmd = - strcmp(priv->cmd_str,"AG0;")==0 - || strcmp(priv->cmd_str,"AG1;")==0 - || strcmp(priv->cmd_str,"AN0;")==0 - || strcmp(priv->cmd_str,"AN1;")==0 - || strcmp(priv->cmd_str,"BP00;")==0 - || strcmp(priv->cmd_str,"BP01;")==0 - || strcmp(priv->cmd_str,"BP10;")==0 - || strcmp(priv->cmd_str,"BP11;")==0 - || strcmp(priv->cmd_str,"CN00;")==0 - || strcmp(priv->cmd_str,"CN10;")==0 - || strcmp(priv->cmd_str,"CO00;")==0 - || strcmp(priv->cmd_str,"CO01;")==0 - || strcmp(priv->cmd_str,"CO02;")==0 - || strcmp(priv->cmd_str,"CO03;")==0 - || strcmp(priv->cmd_str,"CO10;")==0 - || strcmp(priv->cmd_str,"CO11;")==0 - || strcmp(priv->cmd_str,"CO12;")==0 - || strcmp(priv->cmd_str,"CO13;")==0 - || strcmp(priv->cmd_str,"IS1;")==0 - || strcmp(priv->cmd_str,"IS0;")==0 - || strcmp(priv->cmd_str,"IS1;")==0 - || strcmp(priv->cmd_str,"MD0;")==0 - || strcmp(priv->cmd_str,"MD1;")==0 - || strcmp(priv->cmd_str,"NA0;")==0 - || strcmp(priv->cmd_str,"NA1;")==0 - || strcmp(priv->cmd_str,"NB0;")==0 - || strcmp(priv->cmd_str,"NB1;")==0 - || strcmp(priv->cmd_str,"NL0;")==0 - || strcmp(priv->cmd_str,"NL1;")==0 - || strcmp(priv->cmd_str,"NR0;")==0 - || strcmp(priv->cmd_str,"NR1;")==0 - || strcmp(priv->cmd_str,"OS0;")==0 - || strcmp(priv->cmd_str,"OS1;")==0 - || strcmp(priv->cmd_str,"PA0;")==0 - || strcmp(priv->cmd_str,"PA1;")==0 - || strcmp(priv->cmd_str,"RA0;")==0 - || strcmp(priv->cmd_str,"RA1;")==0 - || strcmp(priv->cmd_str,"RF0;")==0 - || strcmp(priv->cmd_str,"RF1;")==0 - || strcmp(priv->cmd_str,"RL0;")==0 - || strcmp(priv->cmd_str,"RL1;")==0 - || strcmp(priv->cmd_str,"RM0;")==0 - || strcmp(priv->cmd_str,"RM1;")==0 - || strcmp(priv->cmd_str,"SM0;")==0 - || strcmp(priv->cmd_str,"SM1;")==0 - || strcmp(priv->cmd_str,"SQ0;")==0 - || strcmp(priv->cmd_str,"SQ1;")==0 - || strcmp(priv->cmd_str,"VT0;")==0 - || strcmp(priv->cmd_str,"VT1;")==0; + is_read_cmd = + strcmp(priv->cmd_str, "AG0;") == 0 + || strcmp(priv->cmd_str, "AG1;") == 0 + || strcmp(priv->cmd_str, "AN0;") == 0 + || strcmp(priv->cmd_str, "AN1;") == 0 + || strcmp(priv->cmd_str, "BP00;") == 0 + || strcmp(priv->cmd_str, "BP01;") == 0 + || strcmp(priv->cmd_str, "BP10;") == 0 + || strcmp(priv->cmd_str, "BP11;") == 0 + || strcmp(priv->cmd_str, "CN00;") == 0 + || strcmp(priv->cmd_str, "CN10;") == 0 + || strcmp(priv->cmd_str, "CO00;") == 0 + || strcmp(priv->cmd_str, "CO01;") == 0 + || strcmp(priv->cmd_str, "CO02;") == 0 + || strcmp(priv->cmd_str, "CO03;") == 0 + || strcmp(priv->cmd_str, "CO10;") == 0 + || strcmp(priv->cmd_str, "CO11;") == 0 + || strcmp(priv->cmd_str, "CO12;") == 0 + || strcmp(priv->cmd_str, "CO13;") == 0 + || strcmp(priv->cmd_str, "IS1;") == 0 + || strcmp(priv->cmd_str, "IS0;") == 0 + || strcmp(priv->cmd_str, "IS1;") == 0 + || strcmp(priv->cmd_str, "MD0;") == 0 + || strcmp(priv->cmd_str, "MD1;") == 0 + || strcmp(priv->cmd_str, "NA0;") == 0 + || strcmp(priv->cmd_str, "NA1;") == 0 + || strcmp(priv->cmd_str, "NB0;") == 0 + || strcmp(priv->cmd_str, "NB1;") == 0 + || strcmp(priv->cmd_str, "NL0;") == 0 + || strcmp(priv->cmd_str, "NL1;") == 0 + || strcmp(priv->cmd_str, "NR0;") == 0 + || strcmp(priv->cmd_str, "NR1;") == 0 + || strcmp(priv->cmd_str, "OS0;") == 0 + || strcmp(priv->cmd_str, "OS1;") == 0 + || strcmp(priv->cmd_str, "PA0;") == 0 + || strcmp(priv->cmd_str, "PA1;") == 0 + || strcmp(priv->cmd_str, "RA0;") == 0 + || strcmp(priv->cmd_str, "RA1;") == 0 + || strcmp(priv->cmd_str, "RF0;") == 0 + || strcmp(priv->cmd_str, "RF1;") == 0 + || strcmp(priv->cmd_str, "RL0;") == 0 + || strcmp(priv->cmd_str, "RL1;") == 0 + || strcmp(priv->cmd_str, "RM0;") == 0 + || strcmp(priv->cmd_str, "RM1;") == 0 + || strcmp(priv->cmd_str, "SM0;") == 0 + || strcmp(priv->cmd_str, "SM1;") == 0 + || strcmp(priv->cmd_str, "SQ0;") == 0 + || strcmp(priv->cmd_str, "SQ1;") == 0 + || strcmp(priv->cmd_str, "VT0;") == 0 + || strcmp(priv->cmd_str, "VT1;") == 0; if (priv->cmd_str[2] != ';' && !is_read_cmd) // then we must be setting something so we'll invalidate the cache diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h index 05dd5519..0fef21fd 100644 --- a/rigs/yaesu/newcat.h +++ b/rigs/yaesu/newcat.h @@ -50,7 +50,7 @@ typedef char ncboolean; /* shared function version */ -#define NEWCAT_VER "20200926" +#define NEWCAT_VER "20200927" /* Hopefully large enough for future use, 128 chars plus '\0' */ #define NEWCAT_DATA_LEN 129 ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/ft5000.c | 6 +-- rigs/yaesu/newcat.c | 124 +++++++++++++++++++++++++++++----------------------- rigs/yaesu/newcat.h | 2 +- 3 files changed, 73 insertions(+), 59 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |