kopia lustrzana https://github.com/Hamlib/Hamlib
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/385pull/412/head
rodzic
37cff7ffc1
commit
f0dc0f71d4
|
@ -87,7 +87,7 @@ const struct rig_caps ftdx5000_caps =
|
||||||
.max_xit = Hz(9999),
|
.max_xit = Hz(9999),
|
||||||
.max_ifshift = Hz(1000),
|
.max_ifshift = Hz(1000),
|
||||||
.vfo_ops = FTDX5000_VFO_OPS,
|
.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 */
|
.transceive = RIG_TRN_OFF, /* May enable later as the 5000 has an Auto Info command */
|
||||||
.bank_qty = 0,
|
.bank_qty = 0,
|
||||||
.chan_desc_sz = 0,
|
.chan_desc_sz = 0,
|
||||||
|
@ -387,7 +387,7 @@ const struct rig_caps ftdx101d_caps =
|
||||||
RIG_MODEL(RIG_MODEL_FTDX101D),
|
RIG_MODEL(RIG_MODEL_FTDX101D),
|
||||||
.model_name = "FT-DX101D",
|
.model_name = "FT-DX101D",
|
||||||
.mfg_name = "Yaesu",
|
.mfg_name = "Yaesu",
|
||||||
.version = NEWCAT_VER ".0",
|
.version = NEWCAT_VER ".1",
|
||||||
.copyright = "LGPL",
|
.copyright = "LGPL",
|
||||||
.status = RIG_STATUS_STABLE,
|
.status = RIG_STATUS_STABLE,
|
||||||
.rig_type = RIG_TYPE_TRANSCEIVER,
|
.rig_type = RIG_TYPE_TRANSCEIVER,
|
||||||
|
@ -422,7 +422,7 @@ const struct rig_caps ftdx101d_caps =
|
||||||
.max_xit = Hz(9999),
|
.max_xit = Hz(9999),
|
||||||
.max_ifshift = Hz(1000),
|
.max_ifshift = Hz(1000),
|
||||||
.vfo_ops = FTDX5000_VFO_OPS,
|
.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 */
|
.transceive = RIG_TRN_OFF, /* May enable later as the 5000 has an Auto Info command */
|
||||||
.bank_qty = 0,
|
.bank_qty = 0,
|
||||||
.chan_desc_sz = 0,
|
.chan_desc_sz = 0,
|
||||||
|
|
|
@ -3550,7 +3550,7 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
|
||||||
return err;
|
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';
|
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,
|
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "CT0%d%c", status ? 2 : 0,
|
||||||
cat_term);
|
cat_term);
|
||||||
|
|
||||||
|
if (rig->caps->targetable_vfo & RIG_TARGETABLE_TONE)
|
||||||
|
{
|
||||||
priv->cmd_str[2] = main_sub_vfo;
|
priv->cmd_str[2] = main_sub_vfo;
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RIG_FUNC_TSQL:
|
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,
|
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "CT0%d%c", status ? 1 : 0,
|
||||||
cat_term);
|
cat_term);
|
||||||
|
|
||||||
|
if (rig->caps->targetable_vfo & RIG_TARGETABLE_TONE)
|
||||||
|
{
|
||||||
priv->cmd_str[2] = main_sub_vfo;
|
priv->cmd_str[2] = main_sub_vfo;
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RIG_FUNC_LOCK:
|
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,
|
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "NB0%d%c", status ? 1 : 0,
|
||||||
cat_term);
|
cat_term);
|
||||||
|
if (rig->caps->targetable_vfo & RIG_TARGETABLE_MODE){
|
||||||
priv->cmd_str[2] = main_sub_vfo;
|
priv->cmd_str[2] = main_sub_vfo;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RIG_FUNC_NR:
|
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,
|
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "NR0%d%c", status ? 1 : 0,
|
||||||
cat_term);
|
cat_term);
|
||||||
|
if (rig->caps->targetable_vfo & RIG_TARGETABLE_MODE){
|
||||||
priv->cmd_str[2] = main_sub_vfo;
|
priv->cmd_str[2] = main_sub_vfo;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RIG_FUNC_COMP:
|
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);
|
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;
|
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);
|
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;
|
priv->cmd_str[2] = main_sub_vfo;
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
typedef char ncboolean;
|
typedef char ncboolean;
|
||||||
|
|
||||||
/* shared function version */
|
/* shared function version */
|
||||||
#define NEWCAT_VER "20200926"
|
#define NEWCAT_VER "20200927"
|
||||||
|
|
||||||
/* Hopefully large enough for future use, 128 chars plus '\0' */
|
/* Hopefully large enough for future use, 128 chars plus '\0' */
|
||||||
#define NEWCAT_DATA_LEN 129
|
#define NEWCAT_DATA_LEN 129
|
||||||
|
|
Ładowanie…
Reference in New Issue