kopia lustrzana https://github.com/Hamlib/Hamlib
rodzic
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);
|
ret = read_string(rp, (unsigned char *) buf, BUF_MAX, "\n", 1, 0, 1);
|
||||||
strtok(buf, "\r\n"); // chop the EOL
|
strtok(buf, "\r\n"); // chop the EOL
|
||||||
|
|
||||||
|
rig_debug(RIG_DEBUG_ERR, "## %s\n", buf);
|
||||||
if (ret <= 0)
|
if (ret <= 0)
|
||||||
{
|
{
|
||||||
RETURNFUNC((ret < 0) ? ret : -RIG_EPROTO);
|
RETURNFUNC((ret < 0) ? ret : -RIG_EPROTO);
|
||||||
|
@ -646,7 +647,7 @@ static int netrigctl_open(RIG *rig)
|
||||||
{
|
{
|
||||||
if (strcmp(setting, "vfo_ops") == 0)
|
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_debug(RIG_DEBUG_TRACE, "%s: %s set to %d\n", __func__, setting,
|
||||||
rig->caps->vfo_ops);
|
rig->caps->vfo_ops);
|
||||||
}
|
}
|
||||||
|
@ -664,7 +665,7 @@ static int netrigctl_open(RIG *rig)
|
||||||
* locally overridden it
|
* locally overridden it
|
||||||
*/
|
*/
|
||||||
pttp->type.ptt = RIG_PTT_RIG_MICDATA;
|
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,
|
rig_debug(RIG_DEBUG_TRACE, "%s: %s set to %d\n", __func__, setting,
|
||||||
pttp->type.ptt);
|
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);
|
rig_debug(RIG_DEBUG_VERBOSE, "%s: ptt_type= %d\n", __func__, temp);
|
||||||
pttp->type.ptt = 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)
|
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_debug(RIG_DEBUG_VERBOSE, "%s: targetable_vfo=0x%2x\n", __func__,
|
||||||
rig->caps->targetable_vfo);
|
rig->caps->targetable_vfo);
|
||||||
}
|
}
|
||||||
|
@ -862,7 +863,7 @@ static int netrigctl_open(RIG *rig)
|
||||||
int level;
|
int level;
|
||||||
sscanf(p, "%d", &level);
|
sscanf(p, "%d", &level);
|
||||||
|
|
||||||
if (RIG_LEVEL_IS_FLOAT(level))
|
if (RIG_PARM_IS_FLOAT(level))
|
||||||
{
|
{
|
||||||
double min, max, step;
|
double min, max, step;
|
||||||
sscanf(p, "%*d=%lf,%lf,%lf", &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].max.f = rs->parm_gran[i].max.f = max;
|
||||||
rig->caps->parm_gran[i].step.f = rs->parm_gran[i].step.f = step;
|
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;
|
int min, max, step;
|
||||||
sscanf(p, "%*d=%d,%d,%d", &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),
|
RIG_MODEL(RIG_MODEL_NETRIGCTL),
|
||||||
.model_name = "NET rigctl",
|
.model_name = "NET rigctl",
|
||||||
.mfg_name = "Hamlib",
|
.mfg_name = "Hamlib",
|
||||||
.version = "20231229.0",
|
.version = "20240226.0",
|
||||||
.copyright = "LGPL",
|
.copyright = "LGPL",
|
||||||
.status = RIG_STATUS_STABLE,
|
.status = RIG_STATUS_STABLE,
|
||||||
.rig_type = RIG_TYPE_OTHER,
|
.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 } },
|
[LVL_RFPOWER] = { .min = { .f = .05 }, .max = { .f = 1.0 }, .step = { .f = 1.0f / 100.0f } },
|
||||||
},
|
},
|
||||||
.parm_gran = {
|
.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,
|
.ctcss_list = common_ctcss_list,
|
||||||
|
|
|
@ -3919,7 +3919,7 @@ declare_proto_rig(vfo_op)
|
||||||
if (!strcmp(arg1, "?"))
|
if (!strcmp(arg1, "?"))
|
||||||
{
|
{
|
||||||
char s[SPRINTF_MAX_SIZE];
|
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);
|
fprintf(fout, "%s\n", s);
|
||||||
RETURNFUNC2(RIG_OK);
|
RETURNFUNC2(RIG_OK);
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue