mirror of
https://github.com/Hamlib/Hamlib.git
synced 2024-09-21 10:27:18 +00:00
parent
eaae02ef00
commit
25ee5d65d5
@ -635,6 +635,7 @@ static int netrigctl_open(RIG *rig)
|
||||
ret = read_string(rp, (unsigned char *) buf, BUF_MAX, "\n", 1, 0, 1);
|
||||
strtok(buf, "\r\n"); // chop the EOL
|
||||
|
||||
rig_debug(RIG_DEBUG_ERR, "## %s\n", buf);
|
||||
if (ret <= 0)
|
||||
{
|
||||
RETURNFUNC((ret < 0) ? ret : -RIG_EPROTO);
|
||||
@ -646,7 +647,7 @@ static int netrigctl_open(RIG *rig)
|
||||
{
|
||||
if (strcmp(setting, "vfo_ops") == 0)
|
||||
{
|
||||
rig->caps->vfo_ops = strtoll(value, NULL, 0);
|
||||
rig->caps->vfo_ops = rig->state.vfo_ops = strtoll(value, NULL, 0);
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: %s set to %d\n", __func__, setting,
|
||||
rig->caps->vfo_ops);
|
||||
}
|
||||
@ -664,7 +665,7 @@ static int netrigctl_open(RIG *rig)
|
||||
* locally overridden it
|
||||
*/
|
||||
pttp->type.ptt = RIG_PTT_RIG_MICDATA;
|
||||
rig->caps->ptt_type = RIG_PTT_RIG_MICDATA;
|
||||
rig->caps->ptt_type = rig->state.ptt_type = RIG_PTT_RIG_MICDATA;
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: %s set to %d\n", __func__, setting,
|
||||
pttp->type.ptt);
|
||||
}
|
||||
@ -672,13 +673,13 @@ static int netrigctl_open(RIG *rig)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: ptt_type= %d\n", __func__, temp);
|
||||
pttp->type.ptt = temp;
|
||||
rig->caps->ptt_type = temp;
|
||||
rig->caps->ptt_type = rig->state.ptt_type = temp;
|
||||
}
|
||||
}
|
||||
|
||||
else if (strcmp(setting, "targetable_vfo") == 0)
|
||||
{
|
||||
rig->caps->targetable_vfo = strtol(value, NULL, 0);
|
||||
rig->caps->targetable_vfo = rig->state.targetable_vfo = strtol(value, NULL, 0);
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: targetable_vfo=0x%2x\n", __func__,
|
||||
rig->caps->targetable_vfo);
|
||||
}
|
||||
@ -862,7 +863,7 @@ static int netrigctl_open(RIG *rig)
|
||||
int level;
|
||||
sscanf(p, "%d", &level);
|
||||
|
||||
if (RIG_LEVEL_IS_FLOAT(level))
|
||||
if (RIG_PARM_IS_FLOAT(level))
|
||||
{
|
||||
double min, max, step;
|
||||
sscanf(p, "%*d=%lf,%lf,%lf", &min, &max, &step);
|
||||
@ -870,7 +871,11 @@ static int netrigctl_open(RIG *rig)
|
||||
rig->caps->parm_gran[i].max.f = rs->parm_gran[i].max.f = max;
|
||||
rig->caps->parm_gran[i].step.f = rs->parm_gran[i].step.f = step;
|
||||
}
|
||||
else
|
||||
else if (RIG_PARM_IS_STRING(level))
|
||||
{
|
||||
rig->caps->parm_gran[i].step.s = strdup(value);
|
||||
}
|
||||
else // must be INT
|
||||
{
|
||||
int min, max, step;
|
||||
sscanf(p, "%*d=%d,%d,%d", &min, &max, &step);
|
||||
@ -2807,7 +2812,7 @@ struct rig_caps netrigctl_caps =
|
||||
RIG_MODEL(RIG_MODEL_NETRIGCTL),
|
||||
.model_name = "NET rigctl",
|
||||
.mfg_name = "Hamlib",
|
||||
.version = "20231229.0",
|
||||
.version = "20240226.0",
|
||||
.copyright = "LGPL",
|
||||
.status = RIG_STATUS_STABLE,
|
||||
.rig_type = RIG_TYPE_OTHER,
|
||||
|
@ -206,7 +206,7 @@ struct rig_caps ft991_caps =
|
||||
[LVL_RFPOWER] = { .min = { .f = .05 }, .max = { .f = 1.0 }, .step = { .f = 1.0f / 100.0f } },
|
||||
},
|
||||
.parm_gran = {
|
||||
[PARM_BANDSELECT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.s = "BAND160M,BAND80M,BANDUNUSED,BAND40M,BAND30M,BAND20M,BAND17M,BAND15M,BAND12M,BAND10M,BAND6M,BANDGEN,BANDMW,BANDUNUSED,BANDAIR,BAND70CM,BAND33CM"}}
|
||||
[PARM_BANDSELECT] = {.step = {.s = "BAND160M,BAND80M,BANDUNUSED,BAND40M,BAND30M,BAND20M,BAND17M,BAND15M,BAND12M,BAND10M,BAND6M,BANDGEN,BANDMW,BANDUNUSED,BANDAIR,BAND70CM,BAND33CM"}}
|
||||
},
|
||||
|
||||
.ctcss_list = common_ctcss_list,
|
||||
|
@ -3919,7 +3919,7 @@ declare_proto_rig(vfo_op)
|
||||
if (!strcmp(arg1, "?"))
|
||||
{
|
||||
char s[SPRINTF_MAX_SIZE];
|
||||
rig_sprintf_vfop(s, sizeof(s), rig->caps->vfo_ops);
|
||||
rig_sprintf_vfop(s, sizeof(s), rig->state.vfo_ops);
|
||||
fprintf(fout, "%s\n", s);
|
||||
RETURNFUNC2(RIG_OK);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user